From c03bbd8fe47944825b863fa2f3e3c8ae24552b35 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 31 Mar 2026 17:33:55 +0000 Subject: [PATCH 1/2] chore(php): move all remaining migration_mode=MIGRATING to NEW_SURFACE_ONLY PiperOrigin-RevId: 886270461 Source-Link: https://github.com/googleapis/googleapis/commit/359422ce8d726f52e0ad35b48024896c714fa033 Source-Link: https://github.com/googleapis/googleapis-gen/commit/898376929e854a8efc30f4b94cf3720ba0b68f58 Copy-Tag: eyJwIjoiRXJyb3JSZXBvcnRpbmcvLk93bEJvdC55YW1sIiwiaCI6Ijg5ODM3NjkyOWU4NTRhOGVmYzMwZjRiOTRjZjM3MjBiYTBiNjhmNTgifQ== Copy-Tag: eyJwIjoiRmlyZXN0b3JlLy5Pd2xCb3QueWFtbCIsImgiOiI4OTgzNzY5MjllODU0YThlZmMzMGY0Yjk0Y2YzNzIwYmEwYjY4ZjU4In0= Copy-Tag: eyJwIjoiTG9nZ2luZy8uT3dsQm90LnlhbWwiLCJoIjoiODk4Mzc2OTI5ZTg1NGE4ZWZjMzBmNGI5NGNmMzcyMGJhMGI2OGY1OCJ9 Copy-Tag: eyJwIjoiTG9uZ1J1bm5pbmcvLk93bEJvdC55YW1sIiwiaCI6Ijg5ODM3NjkyOWU4NTRhOGVmYzMwZjRiOTRjZjM3MjBiYTBiNjhmNTgifQ== Copy-Tag: eyJwIjoiVHJhY2UvLk93bEJvdC55YW1sIiwiaCI6Ijg5ODM3NjkyOWU4NTRhOGVmYzMwZjRiOTRjZjM3MjBiYTBiNjhmNTgifQ== Copy-Tag: eyJwIjoiVmlzaW9uQWkvLk93bEJvdC55YW1sIiwiaCI6Ijg5ODM3NjkyOWU4NTRhOGVmYzMwZjRiOTRjZjM3MjBiYTBiNjhmNTgifQ== --- .../Clouderrorreporting/V1Beta1/Common.php | 26 + .../V1Beta1/ErrorGroupService.php | 29 + .../V1Beta1/ErrorStatsService.php | 31 + .../V1Beta1/ReportErrorsService.php | 30 + .../V1beta1/DeleteEventsRequest.php | 128 + .../V1beta1/DeleteEventsResponse.php | 33 + .../ErrorReporting/V1beta1/ErrorContext.php | 206 + .../ErrorReporting/V1beta1/ErrorEvent.php | 207 + .../ErrorReporting/V1beta1/ErrorGroup.php | 245 + .../V1beta1/ErrorGroupOrder.php | 76 + .../V1beta1/ErrorGroupStats.php | 492 ++ .../V1beta1/GetGroupRequest.php | 159 + .../V1beta1/HttpRequestContext.php | 252 + .../V1beta1/ListEventsRequest.php | 361 ++ .../V1beta1/ListEventsResponse.php | 153 + .../V1beta1/ListGroupStatsRequest.php | 638 ++ .../V1beta1/ListGroupStatsResponse.php | 165 + .../ErrorReporting/V1beta1/QueryTimeRange.php | 73 + .../V1beta1/QueryTimeRange/Period.php | 87 + .../V1beta1/ReportErrorEventRequest.php | 148 + .../V1beta1/ReportErrorEventResponse.php | 34 + .../V1beta1/ReportedErrorEvent.php | 311 + .../V1beta1/ResolutionStatus.php | 78 + .../ErrorReporting/V1beta1/ServiceContext.php | 180 + .../V1beta1/ServiceContextFilter.php | 150 + .../ErrorReporting/V1beta1/SourceLocation.php | 150 + .../ErrorReporting/V1beta1/TimedCount.php | 157 + .../V1beta1/TimedCountAlignment.php | 74 + .../ErrorReporting/V1beta1/TrackingIssue.php | 71 + .../V1beta1/UpdateGroupRequest.php | 90 + .../ErrorGroupServiceClient/get_group.php | 89 + .../ErrorGroupServiceClient/update_group.php | 60 + .../ErrorStatsServiceClient/delete_events.php | 82 + .../ErrorStatsServiceClient/list_events.php | 95 + .../list_group_stats.php | 91 + .../report_error_event.php | 127 + .../Client/ErrorGroupServiceClient.php | 296 + .../Client/ErrorStatsServiceClient.php | 325 + .../Client/ReportErrorsServiceClient.php | 282 + .../v1beta1/src/V1beta1/gapic_metadata.json | 66 + .../error_group_service_client_config.json | 45 + .../error_group_service_descriptor_config.php | 56 + ...error_group_service_rest_client_config.php | 66 + .../error_stats_service_client_config.json | 50 + .../error_stats_service_descriptor_config.php | 83 + ...error_stats_service_rest_client_config.php | 86 + .../report_errors_service_client_config.json | 37 + ...eport_errors_service_descriptor_config.php | 43 + ...port_errors_service_rest_client_config.php | 41 + .../Client/ErrorGroupServiceClientTest.php | 226 + .../Client/ErrorStatsServiceClientTest.php | 307 + .../Client/ReportErrorsServiceClientTest.php | 175 + .../Google/Firestore/Admin/V1/Backup.php | 27 + .../Google/Firestore/Admin/V1/Database.php | 29 + .../Google/Firestore/Admin/V1/Field.php | 28 + .../Firestore/Admin/V1/FirestoreAdmin.php | 41 + .../Google/Firestore/Admin/V1/Index.php | 26 + .../Google/Firestore/Admin/V1/Location.php | 24 + .../Google/Firestore/Admin/V1/Operation.php | 29 + .../Firestore/Admin/V1/RealtimeUpdates.php | 24 + .../Google/Firestore/Admin/V1/Schedule.php | 29 + .../Google/Firestore/Admin/V1/Snapshot.php | 27 + .../Google/Firestore/Admin/V1/UserCreds.php | 27 + .../Cloud/Firestore/Admin/V1/Backup.php | 327 + .../Cloud/Firestore/Admin/V1/Backup/State.php | 69 + .../Cloud/Firestore/Admin/V1/Backup/Stats.php | 139 + .../Firestore/Admin/V1/BackupSchedule.php | 316 + .../Admin/V1/BulkDeleteDocumentsMetadata.php | 373 ++ .../Admin/V1/BulkDeleteDocumentsRequest.php | 193 + .../Admin/V1/BulkDeleteDocumentsResponse.php | 34 + .../Admin/V1/CloneDatabaseMetadata.php | 278 + .../Admin/V1/CloneDatabaseRequest.php | 284 + .../Admin/V1/CreateBackupScheduleRequest.php | 134 + .../Admin/V1/CreateDatabaseMetadata.php | 33 + .../Admin/V1/CreateDatabaseRequest.php | 196 + .../Firestore/Admin/V1/CreateIndexRequest.php | 133 + .../Admin/V1/CreateUserCredsRequest.php | 190 + .../Firestore/Admin/V1/DailyRecurrence.php | 34 + .../Cloud/Firestore/Admin/V1/Database.php | 1125 ++++ .../V1/Database/AppEngineIntegrationMode.php | 66 + .../Admin/V1/Database/CmekConfig.php | 151 + .../Admin/V1/Database/ConcurrencyMode.php | 78 + .../Admin/V1/Database/DataAccessMode.php | 61 + .../Admin/V1/Database/DatabaseEdition.php | 62 + .../Admin/V1/Database/DatabaseType.php | 64 + .../V1/Database/DeleteProtectionState.php | 61 + .../Admin/V1/Database/EncryptionConfig.php | 144 + .../CustomerManagedEncryptionOptions.php | 96 + .../GoogleDefaultEncryptionOptions.php | 33 + .../SourceEncryptionOptions.php | 34 + .../PointInTimeRecoveryEnablement.php | 67 + .../Admin/V1/Database/SourceInfo.php | 120 + .../V1/Database/SourceInfo/BackupSource.php | 75 + .../Admin/V1/DeleteBackupRequest.php | 88 + .../Admin/V1/DeleteBackupScheduleRequest.php | 92 + .../Admin/V1/DeleteDatabaseMetadata.php | 33 + .../Admin/V1/DeleteDatabaseRequest.php | 129 + .../Firestore/Admin/V1/DeleteIndexRequest.php | 87 + .../Admin/V1/DeleteUserCredsRequest.php | 87 + .../Admin/V1/DisableUserCredsRequest.php | 87 + .../Admin/V1/EnableUserCredsRequest.php | 87 + .../Admin/V1/ExportDocumentsMetadata.php | 403 ++ .../Admin/V1/ExportDocumentsRequest.php | 305 + .../Admin/V1/ExportDocumentsResponse.php | 76 + .../Google/Cloud/Firestore/Admin/V1/Field.php | 253 + .../Firestore/Admin/V1/Field/IndexConfig.php | 205 + .../Firestore/Admin/V1/Field/TtlConfig.php | 140 + .../Admin/V1/Field/TtlConfig/State.php | 75 + .../Admin/V1/FieldOperationMetadata.php | 373 ++ .../IndexConfigDelta.php | 111 + .../IndexConfigDelta/ChangeType.php | 61 + .../FieldOperationMetadata/TtlConfigDelta.php | 115 + .../TtlConfigDelta/ChangeType.php | 61 + .../Firestore/Admin/V1/GetBackupRequest.php | 88 + .../Admin/V1/GetBackupScheduleRequest.php | 93 + .../Firestore/Admin/V1/GetDatabaseRequest.php | 87 + .../Firestore/Admin/V1/GetFieldRequest.php | 87 + .../Firestore/Admin/V1/GetIndexRequest.php | 87 + .../Admin/V1/GetUserCredsRequest.php | 87 + .../Admin/V1/ImportDocumentsMetadata.php | 351 + .../Admin/V1/ImportDocumentsRequest.php | 229 + .../Google/Cloud/Firestore/Admin/V1/Index.php | 432 ++ .../Firestore/Admin/V1/Index/ApiScope.php | 63 + .../Firestore/Admin/V1/Index/Density.php | 109 + .../Firestore/Admin/V1/Index/IndexField.php | 191 + .../Admin/V1/Index/IndexField/ArrayConfig.php | 54 + .../Admin/V1/Index/IndexField/Order.php | 61 + .../V1/Index/IndexField/VectorConfig.php | 117 + .../IndexField/VectorConfig/FlatIndex.php | 34 + .../Firestore/Admin/V1/Index/QueryScope.php | 74 + .../Cloud/Firestore/Admin/V1/Index/State.php | 83 + .../Admin/V1/IndexOperationMetadata.php | 287 + .../Admin/V1/ListBackupSchedulesRequest.php | 88 + .../Admin/V1/ListBackupSchedulesResponse.php | 68 + .../Firestore/Admin/V1/ListBackupsRequest.php | 169 + .../Admin/V1/ListBackupsResponse.php | 118 + .../Admin/V1/ListDatabasesRequest.php | 120 + .../Admin/V1/ListDatabasesResponse.php | 129 + .../Firestore/Admin/V1/ListFieldsRequest.php | 221 + .../Firestore/Admin/V1/ListFieldsResponse.php | 106 + .../Firestore/Admin/V1/ListIndexesRequest.php | 197 + .../Admin/V1/ListIndexesResponse.php | 106 + .../Admin/V1/ListUserCredsRequest.php | 87 + .../Admin/V1/ListUserCredsResponse.php | 68 + .../Firestore/Admin/V1/LocationMetadata.php | 34 + .../Firestore/Admin/V1/OperationState.php | 98 + .../Cloud/Firestore/Admin/V1/PitrSnapshot.php | 153 + .../Cloud/Firestore/Admin/V1/Progress.php | 103 + .../Admin/V1/RealtimeUpdatesMode.php | 62 + .../Admin/V1/ResetUserPasswordRequest.php | 87 + .../Admin/V1/RestoreDatabaseMetadata.php | 268 + .../Admin/V1/RestoreDatabaseRequest.php | 278 + .../Admin/V1/UpdateBackupScheduleRequest.php | 137 + .../Admin/V1/UpdateDatabaseMetadata.php | 33 + .../Admin/V1/UpdateDatabaseRequest.php | 137 + .../Firestore/Admin/V1/UpdateFieldRequest.php | 139 + .../Cloud/Firestore/Admin/V1/UserCreds.php | 281 + .../Admin/V1/UserCreds/ResourceIdentity.php | 71 + .../Firestore/Admin/V1/UserCreds/State.php | 61 + .../Firestore/Admin/V1/WeeklyRecurrence.php | 72 + .../bulk_delete_documents.php | 91 + .../FirestoreAdminClient/clone_database.php | 125 + .../create_backup_schedule.php | 77 + .../FirestoreAdminClient/create_database.php | 96 + .../V1/FirestoreAdminClient/create_index.php | 94 + .../create_user_creds.php | 82 + .../V1/FirestoreAdminClient/delete_backup.php | 71 + .../delete_backup_schedule.php | 76 + .../FirestoreAdminClient/delete_database.php | 84 + .../V1/FirestoreAdminClient/delete_index.php | 75 + .../delete_user_creds.php | 70 + .../disable_user_creds.php | 72 + .../enable_user_creds.php | 72 + .../FirestoreAdminClient/export_documents.php | 94 + .../V1/FirestoreAdminClient/get_backup.php | 73 + .../get_backup_schedule.php | 78 + .../V1/FirestoreAdminClient/get_database.php | 72 + .../V1/FirestoreAdminClient/get_field.php | 77 + .../V1/FirestoreAdminClient/get_index.php | 77 + .../FirestoreAdminClient/get_user_creds.php | 73 + .../FirestoreAdminClient/import_documents.php | 85 + .../list_backup_schedules.php | 73 + .../V1/FirestoreAdminClient/list_backups.php | 76 + .../FirestoreAdminClient/list_databases.php | 72 + .../V1/FirestoreAdminClient/list_fields.php | 89 + .../V1/FirestoreAdminClient/list_indexes.php | 81 + .../FirestoreAdminClient/list_user_creds.php | 73 + .../reset_user_password.php | 72 + .../FirestoreAdminClient/restore_database.php | 124 + .../update_backup_schedule.php | 59 + .../FirestoreAdminClient/update_database.php | 71 + .../V1/FirestoreAdminClient/update_field.php | 122 + .../src/V1/Client/FirestoreAdminClient.php | 1473 +++++ .../v1/Admin/src/V1/gapic_metadata.json | 178 + .../firestore_admin_client_config.json | 226 + .../firestore_admin_descriptor_config.php | 523 ++ .../firestore_admin_rest_client_config.php | 452 ++ .../V1/Client/FirestoreAdminClientTest.php | 2977 +++++++++ .../Google/Firestore/V1/AggregationResult.php | 25 + .../Google/Firestore/V1/BloomFilter.php | 24 + .../Google/Firestore/V1/Common.php | 25 + .../Google/Firestore/V1/Document.php | 28 + .../Google/Firestore/V1/ExplainStats.php | 25 + .../Google/Firestore/V1/Firestore.php | 40 + .../Google/Firestore/V1/Pipeline.php | 26 + .../GPBMetadata/Google/Firestore/V1/Query.php | 27 + .../Google/Firestore/V1/QueryProfile.php | 27 + .../GPBMetadata/Google/Firestore/V1/Write.php | 28 + .../Cloud/Firestore/V1/AggregationResult.php | 86 + .../Google/Cloud/Firestore/V1/ArrayValue.php | 67 + .../Firestore/V1/BatchGetDocumentsRequest.php | 296 + .../V1/BatchGetDocumentsResponse.php | 214 + .../Cloud/Firestore/V1/BatchWriteRequest.php | 152 + .../Cloud/Firestore/V1/BatchWriteResponse.php | 118 + .../Firestore/V1/BeginTransactionRequest.php | 134 + .../Firestore/V1/BeginTransactionResponse.php | 68 + .../Google/Cloud/Firestore/V1/BitSequence.php | 124 + .../Google/Cloud/Firestore/V1/BloomFilter.php | 119 + .../Cloud/Firestore/V1/CommitRequest.php | 161 + .../Cloud/Firestore/V1/CommitResponse.php | 123 + .../Firestore/V1/CreateDocumentRequest.php | 248 + .../src/Google/Cloud/Firestore/V1/Cursor.php | 113 + .../Firestore/V1/DeleteDocumentRequest.php | 134 + .../Google/Cloud/Firestore/V1/Document.php | 290 + .../Cloud/Firestore/V1/DocumentChange.php | 154 + .../Cloud/Firestore/V1/DocumentDelete.php | 158 + .../Cloud/Firestore/V1/DocumentMask.php | 80 + .../Cloud/Firestore/V1/DocumentRemove.php | 160 + .../Cloud/Firestore/V1/DocumentTransform.php | 109 + .../V1/DocumentTransform/FieldTransform.php | 414 ++ .../FieldTransform/ServerValue.php | 56 + .../Firestore/V1/ExecutePipelineRequest.php | 240 + .../Firestore/V1/ExecutePipelineResponse.php | 285 + .../Cloud/Firestore/V1/ExecutionStats.php | 237 + .../Cloud/Firestore/V1/ExistenceFilter.php | 209 + .../Cloud/Firestore/V1/ExplainMetrics.php | 129 + .../Cloud/Firestore/V1/ExplainOptions.php | 83 + .../Cloud/Firestore/V1/ExplainStats.php | 87 + .../Cloud/Firestore/V1/GetDocumentRequest.php | 208 + .../Firestore/V1/ListCollectionIdsRequest.php | 219 + .../V1/ListCollectionIdsResponse.php | 102 + .../Firestore/V1/ListDocumentsRequest.php | 462 ++ .../Firestore/V1/ListDocumentsResponse.php | 106 + .../Cloud/Firestore/V1/ListenRequest.php | 180 + .../Cloud/Firestore/V1/ListenResponse.php | 219 + .../Google/Cloud/Firestore/V1/MapValue.php | 83 + .../Google/Cloud/Firestore/V1/PBFunction.php | 149 + .../Firestore/V1/PartitionQueryRequest.php | 364 ++ .../Firestore/V1/PartitionQueryResponse.php | 162 + .../Google/Cloud/Firestore/V1/Pipeline.php | 67 + .../Cloud/Firestore/V1/Pipeline/Stage.php | 157 + .../Google/Cloud/Firestore/V1/PlanSummary.php | 83 + .../Cloud/Firestore/V1/Precondition.php | 114 + .../Cloud/Firestore/V1/RollbackRequest.php | 121 + .../V1/RunAggregationQueryRequest.php | 304 + .../V1/RunAggregationQueryResponse.php | 244 + .../Cloud/Firestore/V1/RunQueryRequest.php | 306 + .../Cloud/Firestore/V1/RunQueryResponse.php | 327 + .../V1/StructuredAggregationQuery.php | 122 + .../Aggregation.php | 287 + .../Aggregation/Avg.php | 83 + .../Aggregation/Count.php | 166 + .../Aggregation/Sum.php | 92 + .../Cloud/Firestore/V1/StructuredPipeline.php | 114 + .../Cloud/Firestore/V1/StructuredQuery.php | 652 ++ .../V1/StructuredQuery/CollectionSelector.php | 113 + .../V1/StructuredQuery/CompositeFilter.php | 109 + .../CompositeFilter/Operator.php | 65 + .../V1/StructuredQuery/Direction.php | 61 + .../V1/StructuredQuery/FieldFilter.php | 155 + .../StructuredQuery/FieldFilter/Operator.php | 143 + .../V1/StructuredQuery/FieldReference.php | 83 + .../Firestore/V1/StructuredQuery/Filter.php | 141 + .../V1/StructuredQuery/FindNearest.php | 396 ++ .../FindNearest/DistanceMeasure.php | 80 + .../Firestore/V1/StructuredQuery/Order.php | 111 + .../V1/StructuredQuery/Projection.php | 75 + .../V1/StructuredQuery/UnaryFilter.php | 109 + .../StructuredQuery/UnaryFilter/Operator.php | 81 + .../src/Google/Cloud/Firestore/V1/Target.php | 407 ++ .../Firestore/V1/Target/DocumentsTarget.php | 79 + .../Cloud/Firestore/V1/Target/QueryTarget.php | 129 + .../Cloud/Firestore/V1/TargetChange.php | 267 + .../V1/TargetChange/TargetChangeType.php | 83 + .../Cloud/Firestore/V1/TransactionOptions.php | 108 + .../V1/TransactionOptions/PBReadOnly.php | 84 + .../V1/TransactionOptions/ReadWrite.php | 69 + .../Firestore/V1/UpdateDocumentRequest.php | 268 + .../src/Google/Cloud/Firestore/V1/Value.php | 603 ++ .../src/Google/Cloud/Firestore/V1/Write.php | 314 + .../Cloud/Firestore/V1/WriteRequest.php | 277 + .../Cloud/Firestore/V1/WriteResponse.php | 203 + .../Google/Cloud/Firestore/V1/WriteResult.php | 131 + .../FirestoreClient/batch_get_documents.php | 86 + .../V1/FirestoreClient/batch_write.php | 66 + .../V1/FirestoreClient/begin_transaction.php | 71 + .../v1/samples/V1/FirestoreClient/commit.php | 74 + .../V1/FirestoreClient/create_document.php | 83 + .../V1/FirestoreClient/delete_document.php | 69 + .../V1/FirestoreClient/execute_pipeline.php | 76 + .../V1/FirestoreClient/get_document.php | 71 + .../FirestoreClient/list_collection_ids.php | 77 + .../V1/FirestoreClient/list_documents.php | 89 + .../v1/samples/V1/FirestoreClient/listen.php | 78 + .../V1/FirestoreClient/partition_query.php | 64 + .../samples/V1/FirestoreClient/rollback.php | 72 + .../FirestoreClient/run_aggregation_query.php | 92 + .../samples/V1/FirestoreClient/run_query.php | 80 + .../V1/FirestoreClient/update_document.php | 62 + .../v1/samples/V1/FirestoreClient/write.php | 79 + .../v1/src/V1/Client/FirestoreClient.php | 662 ++ .../Firestore/v1/src/V1/gapic_metadata.json | 103 + .../V1/resources/firestore_client_config.json | 176 + .../resources/firestore_descriptor_config.php | 295 + .../firestore_rest_client_config.php | 304 + .../Unit/V1/Client/FirestoreClientTest.php | 1405 ++++ .../Google/Logging/V2/LogEntry.php | 32 + .../GPBMetadata/Google/Logging/V2/Logging.php | 33 + .../Google/Logging/V2/LoggingConfig.php | 32 + .../Google/Logging/V2/LoggingMetrics.php | 32 + .../Cloud/Logging/V2/BigQueryDataset.php | 87 + .../Cloud/Logging/V2/BigQueryOptions.php | 149 + .../Cloud/Logging/V2/BucketMetadata.php | 230 + .../Google/Cloud/Logging/V2/CmekSettings.php | 320 + .../Logging/V2/CopyLogEntriesMetadata.php | 317 + .../Logging/V2/CopyLogEntriesRequest.php | 147 + .../Logging/V2/CopyLogEntriesResponse.php | 67 + .../Cloud/Logging/V2/CreateBucketRequest.php | 173 + .../Logging/V2/CreateExclusionRequest.php | 170 + .../Cloud/Logging/V2/CreateLinkRequest.php | 194 + .../Logging/V2/CreateLogMetricRequest.php | 144 + .../Cloud/Logging/V2/CreateSinkRequest.php | 244 + .../Cloud/Logging/V2/CreateViewRequest.php | 165 + .../Cloud/Logging/V2/DeleteBucketRequest.php | 91 + .../Logging/V2/DeleteExclusionRequest.php | 114 + .../Cloud/Logging/V2/DeleteLinkRequest.php | 102 + .../Logging/V2/DeleteLogMetricRequest.php | 87 + .../Cloud/Logging/V2/DeleteLogRequest.php | 129 + .../Cloud/Logging/V2/DeleteSinkRequest.php | 119 + .../Cloud/Logging/V2/DeleteViewRequest.php | 79 + .../Cloud/Logging/V2/GetBucketRequest.php | 91 + .../Logging/V2/GetCmekSettingsRequest.php | 111 + .../Cloud/Logging/V2/GetExclusionRequest.php | 114 + .../Cloud/Logging/V2/GetLinkRequest.php | 102 + .../Cloud/Logging/V2/GetLogMetricRequest.php | 87 + .../Cloud/Logging/V2/GetSettingsRequest.php | 139 + .../Cloud/Logging/V2/GetSinkRequest.php | 114 + .../Cloud/Logging/V2/GetViewRequest.php | 79 + .../Google/Cloud/Logging/V2/IndexConfig.php | 173 + .../src/Google/Cloud/Logging/V2/IndexType.php | 62 + .../Cloud/Logging/V2/LifecycleState.php | 86 + .../src/Google/Cloud/Logging/V2/Link.php | 271 + .../Google/Cloud/Logging/V2/LinkMetadata.php | 230 + .../Cloud/Logging/V2/ListBucketsRequest.php | 206 + .../Cloud/Logging/V2/ListBucketsResponse.php | 109 + .../Logging/V2/ListExclusionsRequest.php | 190 + .../Logging/V2/ListExclusionsResponse.php | 109 + .../Cloud/Logging/V2/ListLinksRequest.php | 178 + .../Cloud/Logging/V2/ListLinksResponse.php | 109 + .../Logging/V2/ListLogEntriesRequest.php | 354 + .../Logging/V2/ListLogEntriesResponse.php | 141 + .../Logging/V2/ListLogMetricsRequest.php | 175 + .../Logging/V2/ListLogMetricsResponse.php | 109 + .../Cloud/Logging/V2/ListLogsRequest.php | 264 + .../Cloud/Logging/V2/ListLogsResponse.php | 117 + ...istMonitoredResourceDescriptorsRequest.php | 121 + ...stMonitoredResourceDescriptorsResponse.php | 109 + .../Cloud/Logging/V2/ListSinksRequest.php | 190 + .../Cloud/Logging/V2/ListSinksResponse.php | 109 + .../Cloud/Logging/V2/ListViewsRequest.php | 174 + .../Cloud/Logging/V2/ListViewsResponse.php | 109 + .../Cloud/Logging/V2/LocationMetadata.php | 71 + .../src/Google/Cloud/Logging/V2/LogBucket.php | 525 ++ .../src/Google/Cloud/Logging/V2/LogEntry.php | 1061 +++ .../Cloud/Logging/V2/LogEntryOperation.php | 182 + .../Logging/V2/LogEntrySourceLocation.php | 164 + .../Google/Cloud/Logging/V2/LogExclusion.php | 321 + .../src/Google/Cloud/Logging/V2/LogMetric.php | 769 +++ .../Cloud/Logging/V2/LogMetric/ApiVersion.php | 54 + .../src/Google/Cloud/Logging/V2/LogSink.php | 688 ++ .../Logging/V2/LogSink/VersionFormat.php | 61 + .../src/Google/Cloud/Logging/V2/LogSplit.php | 153 + .../src/Google/Cloud/Logging/V2/LogView.php | 267 + .../Cloud/Logging/V2/OperationState.php | 93 + .../src/Google/Cloud/Logging/V2/Settings.php | 324 + .../Logging/V2/TailLogEntriesRequest.php | 209 + .../Logging/V2/TailLogEntriesResponse.php | 125 + .../SuppressionInfo.php | 101 + .../SuppressionInfo/Reason.php | 65 + .../Logging/V2/UndeleteBucketRequest.php | 91 + .../Cloud/Logging/V2/UpdateBucketRequest.php | 199 + .../Logging/V2/UpdateCmekSettingsRequest.php | 223 + .../Logging/V2/UpdateExclusionRequest.php | 242 + .../Logging/V2/UpdateLogMetricRequest.php | 149 + .../Logging/V2/UpdateSettingsRequest.php | 236 + .../Cloud/Logging/V2/UpdateSinkRequest.php | 368 ++ .../Cloud/Logging/V2/UpdateViewRequest.php | 187 + .../V2/WriteLogEntriesPartialErrors.php | 83 + .../Logging/V2/WriteLogEntriesRequest.php | 507 ++ .../Logging/V2/WriteLogEntriesResponse.php | 33 + .../copy_log_entries.php | 89 + .../ConfigServiceV2Client/create_bucket.php | 85 + .../create_bucket_async.php | 98 + .../create_exclusion.php | 106 + .../V2/ConfigServiceV2Client/create_link.php | 97 + .../V2/ConfigServiceV2Client/create_sink.php | 110 + .../V2/ConfigServiceV2Client/create_view.php | 84 + .../ConfigServiceV2Client/delete_bucket.php | 82 + .../delete_exclusion.php | 78 + .../V2/ConfigServiceV2Client/delete_link.php | 86 + .../V2/ConfigServiceV2Client/delete_sink.php | 80 + .../V2/ConfigServiceV2Client/delete_view.php | 83 + .../V2/ConfigServiceV2Client/get_bucket.php | 80 + .../get_cmek_settings.php | 66 + .../ConfigServiceV2Client/get_exclusion.php | 80 + .../V2/ConfigServiceV2Client/get_link.php | 76 + .../V2/ConfigServiceV2Client/get_settings.php | 94 + .../V2/ConfigServiceV2Client/get_sink.php | 80 + .../V2/ConfigServiceV2Client/get_view.php | 82 + .../V2/ConfigServiceV2Client/list_buckets.php | 85 + .../ConfigServiceV2Client/list_exclusions.php | 81 + .../V2/ConfigServiceV2Client/list_links.php | 81 + .../V2/ConfigServiceV2Client/list_sinks.php | 81 + .../V2/ConfigServiceV2Client/list_views.php | 77 + .../ConfigServiceV2Client/undelete_bucket.php | 79 + .../ConfigServiceV2Client/update_bucket.php | 90 + .../update_bucket_async.php | 102 + .../update_cmek_settings.php | 71 + .../update_exclusion.php | 107 + .../ConfigServiceV2Client/update_settings.php | 97 + .../V2/ConfigServiceV2Client/update_sink.php | 111 + .../V2/ConfigServiceV2Client/update_view.php | 82 + .../V2/LoggingServiceV2Client/delete_log.php | 84 + .../list_log_entries.php | 96 + .../V2/LoggingServiceV2Client/list_logs.php | 81 + .../list_monitored_resource_descriptors.php | 62 + .../tail_log_entries.php | 90 + .../write_log_entries.php | 105 + .../create_log_metric.php | 104 + .../delete_log_metric.php | 71 + .../MetricsServiceV2Client/get_log_metric.php | 73 + .../list_log_metrics.php | 78 + .../update_log_metric.php | 106 + .../src/V2/Client/ConfigServiceV2Client.php | 2039 ++++++ .../src/V2/Client/LoggingServiceV2Client.php | 541 ++ .../src/V2/Client/MetricsServiceV2Client.php | 384 ++ .../Logging/v2/src/V2/gapic_metadata.json | 251 + .../config_service_v2_client_config.json | 206 + .../config_service_v2_descriptor_config.php | 524 ++ .../config_service_v2_rest_client_config.php | 1167 ++++ .../logging_service_v2_client_config.json | 83 + .../logging_service_v2_descriptor_config.php | 106 + .../logging_service_v2_rest_client_config.php | 211 + .../metrics_service_v2_client_config.json | 71 + .../metrics_service_v2_descriptor_config.php | 100 + .../metrics_service_v2_rest_client_config.php | 180 + .../V2/Client/ConfigServiceV2ClientTest.php | 2819 ++++++++ .../V2/Client/LoggingServiceV2ClientTest.php | 530 ++ .../V2/Client/MetricsServiceV2ClientTest.php | 498 ++ .../Google/Longrunning/Operations.php | 31 + .../LongRunning/CancelOperationRequest.php | 81 + .../LongRunning/DeleteOperationRequest.php | 81 + .../LongRunning/GetOperationRequest.php | 81 + .../LongRunning/ListOperationsRequest.php | 247 + .../LongRunning/ListOperationsResponse.php | 148 + .../src/Google/LongRunning/Operation.php | 270 + .../src/Google/LongRunning/OperationInfo.php | 144 + .../LongRunning/WaitOperationRequest.php | 120 + .../LongRunning/Client/OperationsClient.php | 344 + .../src/LongRunning/gapic_metadata.json | 43 + .../resources/operations_client_config.json | 59 + .../operations_descriptor_config.php | 88 + .../operations_rest_client_config.php | 76 + .../Unit/Client/OperationsClientTest.php | 418 ++ .../Google/Devtools/Cloudtrace/V1/Trace.php | 29 + .../Google/Cloud/Trace/V1/GetTraceRequest.php | 116 + .../Cloud/Trace/V1/ListTracesRequest.php | 507 ++ .../Trace/V1/ListTracesRequest/ViewType.php | 72 + .../Cloud/Trace/V1/ListTracesResponse.php | 109 + .../Cloud/Trace/V1/PatchTracesRequest.php | 126 + .../proto/src/Google/Cloud/Trace/V1/Trace.php | 145 + .../src/Google/Cloud/Trace/V1/TraceSpan.php | 451 ++ .../Cloud/Trace/V1/TraceSpan/SpanKind.php | 64 + .../src/Google/Cloud/Trace/V1/Traces.php | 67 + .../V1/TraceServiceClient/get_trace.php | 73 + .../V1/TraceServiceClient/list_traces.php | 75 + .../V1/TraceServiceClient/patch_traces.php | 75 + .../v1/src/V1/Client/TraceServiceClient.php | 270 + .../Trace/v1/src/V1/gapic_metadata.json | 33 + .../trace_service_client_config.json | 50 + .../trace_service_descriptor_config.php | 78 + .../trace_service_rest_client_config.php | 68 + .../Unit/V1/Client/TraceServiceClientTest.php | 313 + .../Google/Devtools/Cloudtrace/V2/Trace.php | 29 + .../Google/Devtools/Cloudtrace/V2/Tracing.php | 30 + .../Google/Cloud/Trace/V2/AttributeValue.php | 141 + .../Cloud/Trace/V2/BatchWriteSpansRequest.php | 127 + .../src/Google/Cloud/Trace/V2/Module.php | 129 + .../proto/src/Google/Cloud/Trace/V2/Span.php | 783 +++ .../Google/Cloud/Trace/V2/Span/Attributes.php | 129 + .../src/Google/Cloud/Trace/V2/Span/Link.php | 186 + .../Google/Cloud/Trace/V2/Span/Link/Type.php | 62 + .../src/Google/Cloud/Trace/V2/Span/Links.php | 106 + .../Google/Cloud/Trace/V2/Span/SpanKind.php | 92 + .../Google/Cloud/Trace/V2/Span/TimeEvent.php | 152 + .../Trace/V2/Span/TimeEvent/Annotation.php | 129 + .../Trace/V2/Span/TimeEvent/MessageEvent.php | 185 + .../V2/Span/TimeEvent/MessageEvent/Type.php | 61 + .../Google/Cloud/Trace/V2/Span/TimeEvents.php | 145 + .../src/Google/Cloud/Trace/V2/StackTrace.php | 135 + .../Cloud/Trace/V2/StackTrace/StackFrame.php | 345 + .../Cloud/Trace/V2/StackTrace/StackFrames.php | 109 + .../Cloud/Trace/V2/TruncatableString.php | 125 + .../TraceServiceClient/batch_write_spans.php | 103 + .../V2/TraceServiceClient/create_span.php | 91 + .../v2/src/V2/Client/TraceServiceClient.php | 304 + .../Trace/v2/src/V2/gapic_metadata.json | 28 + .../trace_service_client_config.json | 58 + .../trace_service_descriptor_config.php | 56 + .../trace_service_rest_client_config.php | 53 + .../Unit/V2/Client/TraceServiceClientTest.php | 254 + .../Google/Cloud/Visionai/V1/Annotations.php | 26 + .../Google/Cloud/Visionai/V1/Common.php | 27 + .../Cloud/Visionai/V1/HealthService.php | 27 + .../Google/Cloud/Visionai/V1/Lva.php | 24 + .../Google/Cloud/Visionai/V1/LvaResources.php | 28 + .../Google/Cloud/Visionai/V1/LvaService.php | 33 + .../Google/Cloud/Visionai/V1/Platform.php | 36 + .../Cloud/Visionai/V1/StreamingResources.php | 29 + .../Cloud/Visionai/V1/StreamingService.php | 29 + .../Cloud/Visionai/V1/StreamsResources.php | 28 + .../Cloud/Visionai/V1/StreamsService.php | 34 + .../Google/Cloud/Visionai/V1/Warehouse.php | 38 + .../V1/AIEnabledDevicesInputConfig.php | 33 + .../Cloud/VisionAI/V1/AcceleratorType.php | 103 + .../Cloud/VisionAI/V1/AcquireLeaseRequest.php | 179 + .../V1/AddApplicationStreamInputRequest.php | 203 + .../V1/AddApplicationStreamInputResponse.php | 33 + .../VisionAI/V1/AddCollectionItemRequest.php | 90 + .../VisionAI/V1/AddCollectionItemResponse.php | 77 + .../src/Google/Cloud/VisionAI/V1/Analysis.php | 371 ++ .../Cloud/VisionAI/V1/AnalysisDefinition.php | 72 + .../VisionAI/V1/AnalyzeAssetMetadata.php | 155 + .../AnalyzeAssetMetadata/AnalysisStatus.php | 131 + .../AnalysisStatus/State.php | 68 + .../Cloud/VisionAI/V1/AnalyzeAssetRequest.php | 75 + .../VisionAI/V1/AnalyzeAssetResponse.php | 33 + .../VisionAI/V1/AnalyzeCorpusMetadata.php | 77 + .../VisionAI/V1/AnalyzeCorpusRequest.php | 75 + .../VisionAI/V1/AnalyzeCorpusResponse.php | 33 + .../Cloud/VisionAI/V1/AnalyzerDefinition.php | 280 + .../V1/AnalyzerDefinition/DebugOptions.php | 67 + .../V1/AnalyzerDefinition/OperatorOption.php | 101 + .../V1/AnalyzerDefinition/StreamInput.php | 79 + .../Google/Cloud/VisionAI/V1/Annotation.php | 120 + .../V1/AnnotationCustomizedStruct.php | 67 + .../Cloud/VisionAI/V1/AnnotationList.php | 67 + .../VisionAI/V1/AnnotationMatchingResult.php | 167 + .../Cloud/VisionAI/V1/AnnotationValue.php | 375 ++ .../V1/AppPlatformCloudFunctionRequest.php | 118 + .../StructedInputAnnotation.php | 112 + .../V1/AppPlatformCloudFunctionResponse.php | 155 + .../StructedOutputAnnotation.php | 78 + .../VisionAI/V1/AppPlatformEventBody.php | 165 + .../Cloud/VisionAI/V1/AppPlatformMetadata.php | 175 + .../Google/Cloud/VisionAI/V1/Application.php | 417 ++ .../V1/Application/ApplicationRuntimeInfo.php | 155 + .../GlobalOutputResource.php | 159 + .../MonitoringConfig.php | 67 + .../VisionAI/V1/Application/BillingMode.php | 61 + .../Cloud/VisionAI/V1/Application/State.php | 117 + .../Cloud/VisionAI/V1/ApplicationConfigs.php | 111 + .../EventDeliveryConfig.php | 135 + .../Cloud/VisionAI/V1/ApplicationInstance.php | 111 + .../VisionAI/V1/ApplicationNodeAnnotation.php | 102 + .../VisionAI/V1/ApplicationStreamInput.php | 70 + .../src/Google/Cloud/VisionAI/V1/Asset.php | 178 + .../Google/Cloud/VisionAI/V1/AssetSource.php | 108 + .../V1/AssetSource/AssetContentData.php | 60 + .../V1/AssetSource/AssetGcsSource.php | 67 + .../Cloud/VisionAI/V1/AttributeValue.php | 174 + .../VisionAI/V1/AutoscalingMetricSpec.php | 131 + .../VisionAI/V1/BatchOperationStatus.php | 109 + .../VisionAI/V1/BatchRunProcessRequest.php | 195 + .../BatchRunProcessOptions.php | 101 + .../VisionAI/V1/BatchRunProcessResponse.php | 101 + .../Cloud/VisionAI/V1/BigQueryConfig.php | 259 + .../Google/Cloud/VisionAI/V1/BoolValue.php | 58 + .../src/Google/Cloud/VisionAI/V1/Channel.php | 291 + .../Google/Cloud/VisionAI/V1/CircleArea.php | 135 + .../V1/ClassificationPredictionResult.php | 143 + .../Cloud/VisionAI/V1/ClipAssetRequest.php | 119 + .../Cloud/VisionAI/V1/ClipAssetResponse.php | 71 + .../V1/ClipAssetResponse/TimeIndexedUri.php | 111 + .../src/Google/Cloud/VisionAI/V1/Cluster.php | 325 + .../Cloud/VisionAI/V1/Cluster/State.php | 77 + .../Google/Cloud/VisionAI/V1/ClusterInfo.php | 99 + .../Google/Cloud/VisionAI/V1/Collection.php | 148 + .../Cloud/VisionAI/V1/CollectionItem.php | 148 + .../Cloud/VisionAI/V1/CollectionItem/Type.php | 54 + .../Cloud/VisionAI/V1/CommitRequest.php | 69 + .../Cloud/VisionAI/V1/ControlledMode.php | 143 + .../src/Google/Cloud/VisionAI/V1/Corpus.php | 387 ++ .../Google/Cloud/VisionAI/V1/Corpus/Type.php | 69 + .../VisionAI/V1/CreateAnalysisRequest.php | 237 + .../VisionAI/V1/CreateAnnotationRequest.php | 209 + .../V1/CreateApplicationInstancesRequest.php | 199 + .../V1/CreateApplicationInstancesResponse.php | 33 + .../VisionAI/V1/CreateApplicationRequest.php | 235 + .../Cloud/VisionAI/V1/CreateAssetRequest.php | 209 + .../VisionAI/V1/CreateClusterRequest.php | 237 + .../VisionAI/V1/CreateCollectionMetadata.php | 77 + .../VisionAI/V1/CreateCollectionRequest.php | 204 + .../VisionAI/V1/CreateCorpusMetadata.php | 121 + .../Cloud/VisionAI/V1/CreateCorpusRequest.php | 126 + .../VisionAI/V1/CreateDataSchemaRequest.php | 137 + .../Cloud/VisionAI/V1/CreateDraftRequest.php | 237 + .../Cloud/VisionAI/V1/CreateEventRequest.php | 237 + .../V1/CreateIndexEndpointMetadata.php | 77 + .../V1/CreateIndexEndpointRequest.php | 189 + .../Cloud/VisionAI/V1/CreateIndexMetadata.php | 77 + .../Cloud/VisionAI/V1/CreateIndexRequest.php | 199 + .../VisionAI/V1/CreateOperatorRequest.php | 237 + .../VisionAI/V1/CreateProcessRequest.php | 237 + .../VisionAI/V1/CreateProcessorRequest.php | 237 + .../VisionAI/V1/CreateSearchConfigRequest.php | 188 + .../V1/CreateSearchHypernymRequest.php | 183 + .../Cloud/VisionAI/V1/CreateSeriesRequest.php | 237 + .../Cloud/VisionAI/V1/CreateStreamRequest.php | 237 + .../src/Google/Cloud/VisionAI/V1/Criteria.php | 336 + .../VisionAI/V1/CustomProcessorSourceInfo.php | 240 + .../CustomProcessorSourceInfo/ModelSchema.php | 178 + .../ProductRecognizerArtifact.php | 113 + .../CustomProcessorSourceInfo/SourceType.php | 68 + .../Google/Cloud/VisionAI/V1/DataSchema.php | 166 + .../Cloud/VisionAI/V1/DataSchemaDetails.php | 298 + .../CustomizedStructConfig.php | 67 + .../V1/DataSchemaDetails/DataType.php | 176 + .../V1/DataSchemaDetails/Granularity.php | 61 + .../V1/DataSchemaDetails/ListConfig.php | 77 + .../V1/DataSchemaDetails/ProtoAnyConfig.php | 67 + .../V1/DataSchemaDetails/SearchStrategy.php | 149 + .../ConfidenceScoreIndexConfig.php | 258 + .../SearchStrategy/SearchStrategyType.php | 63 + .../src/Google/Cloud/VisionAI/V1/DataType.php | 77 + .../Cloud/VisionAI/V1/DateTimeRange.php | 121 + .../Cloud/VisionAI/V1/DateTimeRangeArray.php | 67 + .../Cloud/VisionAI/V1/DedicatedResources.php | 328 + .../VisionAI/V1/DeleteAnalysisRequest.php | 155 + .../VisionAI/V1/DeleteAnnotationRequest.php | 91 + .../V1/DeleteApplicationInstancesRequest.php | 199 + .../V1/DeleteApplicationInstancesResponse.php | 33 + .../VisionAI/V1/DeleteApplicationRequest.php | 197 + .../Cloud/VisionAI/V1/DeleteAssetMetadata.php | 34 + .../Cloud/VisionAI/V1/DeleteAssetRequest.php | 91 + .../VisionAI/V1/DeleteClusterRequest.php | 155 + .../VisionAI/V1/DeleteCollectionMetadata.php | 77 + .../VisionAI/V1/DeleteCollectionRequest.php | 86 + .../Cloud/VisionAI/V1/DeleteCorpusRequest.php | 81 + .../VisionAI/V1/DeleteDataSchemaRequest.php | 91 + .../Cloud/VisionAI/V1/DeleteDraftRequest.php | 155 + .../Cloud/VisionAI/V1/DeleteEventRequest.php | 155 + .../V1/DeleteIndexEndpointMetadata.php | 77 + .../V1/DeleteIndexEndpointRequest.php | 81 + .../Cloud/VisionAI/V1/DeleteIndexMetadata.php | 33 + .../Cloud/VisionAI/V1/DeleteIndexRequest.php | 91 + .../VisionAI/V1/DeleteOperatorRequest.php | 155 + .../VisionAI/V1/DeleteProcessRequest.php | 155 + .../VisionAI/V1/DeleteProcessorRequest.php | 155 + .../VisionAI/V1/DeleteSearchConfigRequest.php | 91 + .../V1/DeleteSearchHypernymRequest.php | 91 + .../Cloud/VisionAI/V1/DeleteSeriesRequest.php | 155 + .../Cloud/VisionAI/V1/DeleteStreamRequest.php | 155 + .../VisionAI/V1/DeployApplicationRequest.php | 241 + .../VisionAI/V1/DeployApplicationResponse.php | 34 + .../Cloud/VisionAI/V1/DeployIndexMetadata.php | 111 + .../Cloud/VisionAI/V1/DeployIndexRequest.php | 119 + .../Cloud/VisionAI/V1/DeployIndexResponse.php | 33 + .../Cloud/VisionAI/V1/DeployedIndex.php | 75 + .../VisionAI/V1/DeployedIndexReference.php | 67 + .../src/Google/Cloud/VisionAI/V1/Draft.php | 301 + .../Google/Cloud/VisionAI/V1/EagerMode.php | 33 + .../src/Google/Cloud/VisionAI/V1/Event.php | 313 + .../Google/Cloud/VisionAI/V1/Event/Clock.php | 62 + .../Google/Cloud/VisionAI/V1/EventUpdate.php | 217 + .../Google/Cloud/VisionAI/V1/FacetBucket.php | 146 + .../Cloud/VisionAI/V1/FacetBucket/Range.php | 121 + .../Cloud/VisionAI/V1/FacetBucketType.php | 75 + .../Google/Cloud/VisionAI/V1/FacetGroup.php | 224 + .../Cloud/VisionAI/V1/FacetProperty.php | 329 + .../FacetProperty/CustomRangeBucketSpec.php | 74 + .../V1/FacetProperty/DateTimeBucketSpec.php | 67 + .../DateTimeBucketSpec/Granularity.php | 68 + .../V1/FacetProperty/FixedRangeBucketSpec.php | 169 + .../Google/Cloud/VisionAI/V1/FacetValue.php | 141 + .../Google/Cloud/VisionAI/V1/FloatRange.php | 121 + .../Cloud/VisionAI/V1/FloatRangeArray.php | 67 + .../Cloud/VisionAI/V1/GcsOutputConfig.php | 67 + .../Google/Cloud/VisionAI/V1/GcsSource.php | 67 + .../V1/GeneralObjectDetectionConfig.php | 33 + .../VisionAI/V1/GenerateHlsUriRequest.php | 151 + .../VisionAI/V1/GenerateHlsUriResponse.php | 109 + .../V1/GenerateRetrievalUrlRequest.php | 75 + .../V1/GenerateRetrievalUrlResponse.php | 67 + .../V1/GenerateStreamHlsTokenRequest.php | 80 + .../V1/GenerateStreamHlsTokenResponse.php | 127 + .../Cloud/VisionAI/V1/GeoCoordinate.php | 101 + .../Cloud/VisionAI/V1/GeoLocationArray.php | 67 + .../Cloud/VisionAI/V1/GetAnalysisRequest.php | 81 + .../VisionAI/V1/GetAnnotationRequest.php | 91 + .../VisionAI/V1/GetApplicationRequest.php | 81 + .../Cloud/VisionAI/V1/GetAssetRequest.php | 91 + .../Cloud/VisionAI/V1/GetClusterRequest.php | 81 + .../VisionAI/V1/GetCollectionRequest.php | 86 + .../Cloud/VisionAI/V1/GetCorpusRequest.php | 81 + .../VisionAI/V1/GetDataSchemaRequest.php | 91 + .../Cloud/VisionAI/V1/GetDraftRequest.php | 81 + .../Cloud/VisionAI/V1/GetEventRequest.php | 81 + .../VisionAI/V1/GetIndexEndpointRequest.php | 81 + .../Cloud/VisionAI/V1/GetIndexRequest.php | 91 + .../Cloud/VisionAI/V1/GetInstanceRequest.php | 81 + .../Cloud/VisionAI/V1/GetOperatorRequest.php | 81 + .../Cloud/VisionAI/V1/GetProcessRequest.php | 81 + .../Cloud/VisionAI/V1/GetProcessorRequest.php | 81 + .../VisionAI/V1/GetSearchConfigRequest.php | 91 + .../VisionAI/V1/GetSearchHypernymRequest.php | 91 + .../Cloud/VisionAI/V1/GetSeriesRequest.php | 81 + .../Cloud/VisionAI/V1/GetStreamRequest.php | 81 + .../VisionAI/V1/GetStreamThumbnailRequest.php | 228 + .../V1/GetStreamThumbnailResponse.php | 34 + .../VisionAI/V1/GstreamerBufferDescriptor.php | 233 + .../Cloud/VisionAI/V1/HealthCheckRequest.php | 67 + .../Cloud/VisionAI/V1/HealthCheckResponse.php | 145 + .../ImageObjectDetectionPredictionResult.php | 205 + .../Google/Cloud/VisionAI/V1/ImageQuery.php | 114 + .../V1/ImageSegmentationPredictionResult.php | 137 + .../VisionAI/V1/ImportAssetsMetadata.php | 125 + .../Cloud/VisionAI/V1/ImportAssetsRequest.php | 126 + .../VisionAI/V1/ImportAssetsResponse.php | 33 + .../src/Google/Cloud/VisionAI/V1/Index.php | 455 ++ .../Google/Cloud/VisionAI/V1/Index/State.php | 69 + .../Cloud/VisionAI/V1/IndexAssetMetadata.php | 165 + .../Cloud/VisionAI/V1/IndexAssetRequest.php | 117 + .../Cloud/VisionAI/V1/IndexAssetResponse.php | 33 + .../Cloud/VisionAI/V1/IndexEndpoint.php | 523 ++ .../Cloud/VisionAI/V1/IndexEndpoint/State.php | 75 + .../Google/Cloud/VisionAI/V1/IndexedAsset.php | 205 + .../Cloud/VisionAI/V1/IndexingStatus.php | 101 + .../VisionAI/V1/IndexingStatus/State.php | 68 + .../Cloud/VisionAI/V1/IngestAssetRequest.php | 114 + .../VisionAI/V1/IngestAssetRequest/Config.php | 113 + .../IngestAssetRequest/Config/VideoType.php | 67 + .../Config/VideoType/ContainerFormat.php | 54 + .../V1/IngestAssetRequest/TimeIndexedData.php | 111 + .../Cloud/VisionAI/V1/IngestAssetResponse.php | 77 + .../src/Google/Cloud/VisionAI/V1/Instance.php | 406 ++ .../VisionAI/V1/Instance/InputResource.php | 301 + .../VisionAI/V1/Instance/InstanceType.php | 70 + .../VisionAI/V1/Instance/OutputResource.php | 235 + .../Cloud/VisionAI/V1/Instance/State.php | 124 + .../src/Google/Cloud/VisionAI/V1/IntRange.php | 121 + .../Cloud/VisionAI/V1/IntRangeArray.php | 67 + .../src/Google/Cloud/VisionAI/V1/Lease.php | 213 + .../Google/Cloud/VisionAI/V1/LeaseType.php | 61 + .../Cloud/VisionAI/V1/ListAnalysesRequest.php | 221 + .../VisionAI/V1/ListAnalysesResponse.php | 135 + .../VisionAI/V1/ListAnnotationsRequest.php | 268 + .../VisionAI/V1/ListAnnotationsResponse.php | 105 + .../VisionAI/V1/ListApplicationsRequest.php | 221 + .../VisionAI/V1/ListApplicationsResponse.php | 135 + .../Cloud/VisionAI/V1/ListAssetsRequest.php | 229 + .../Cloud/VisionAI/V1/ListAssetsResponse.php | 105 + .../Cloud/VisionAI/V1/ListClustersRequest.php | 221 + .../VisionAI/V1/ListClustersResponse.php | 135 + .../VisionAI/V1/ListCollectionsRequest.php | 174 + .../VisionAI/V1/ListCollectionsResponse.php | 105 + .../Cloud/VisionAI/V1/ListCorporaRequest.php | 230 + .../Cloud/VisionAI/V1/ListCorporaResponse.php | 113 + .../VisionAI/V1/ListDataSchemasRequest.php | 179 + .../VisionAI/V1/ListDataSchemasResponse.php | 105 + .../Cloud/VisionAI/V1/ListDraftsRequest.php | 221 + .../Cloud/VisionAI/V1/ListDraftsResponse.php | 135 + .../Cloud/VisionAI/V1/ListEventsRequest.php | 221 + .../Cloud/VisionAI/V1/ListEventsResponse.php | 135 + .../VisionAI/V1/ListIndexEndpointsRequest.php | 235 + .../V1/ListIndexEndpointsResponse.php | 101 + .../Cloud/VisionAI/V1/ListIndexesRequest.php | 183 + .../Cloud/VisionAI/V1/ListIndexesResponse.php | 105 + .../VisionAI/V1/ListInstancesRequest.php | 221 + .../VisionAI/V1/ListInstancesResponse.php | 135 + .../VisionAI/V1/ListOperatorsRequest.php | 221 + .../VisionAI/V1/ListOperatorsResponse.php | 135 + .../V1/ListPrebuiltProcessorsRequest.php | 81 + .../V1/ListPrebuiltProcessorsResponse.php | 67 + .../VisionAI/V1/ListProcessesRequest.php | 221 + .../VisionAI/V1/ListProcessesResponse.php | 135 + .../VisionAI/V1/ListProcessorsRequest.php | 221 + .../VisionAI/V1/ListProcessorsResponse.php | 135 + .../V1/ListPublicOperatorsRequest.php | 221 + .../V1/ListPublicOperatorsResponse.php | 101 + .../VisionAI/V1/ListSearchConfigsRequest.php | 183 + .../VisionAI/V1/ListSearchConfigsResponse.php | 105 + .../V1/ListSearchHypernymsRequest.php | 183 + .../V1/ListSearchHypernymsResponse.php | 105 + .../Cloud/VisionAI/V1/ListSeriesRequest.php | 221 + .../Cloud/VisionAI/V1/ListSeriesResponse.php | 135 + .../Cloud/VisionAI/V1/ListStreamsRequest.php | 221 + .../Cloud/VisionAI/V1/ListStreamsResponse.php | 135 + .../Google/Cloud/VisionAI/V1/MachineSpec.php | 171 + .../VisionAI/V1/MaterializeChannelRequest.php | 237 + .../VisionAI/V1/MediaWarehouseConfig.php | 164 + .../Google/Cloud/VisionAI/V1/ModelType.php | 124 + .../src/Google/Cloud/VisionAI/V1/Node.php | 305 + .../Cloud/VisionAI/V1/Node/InputEdge.php | 143 + .../Cloud/VisionAI/V1/NormalizedPolygon.php | 71 + .../Cloud/VisionAI/V1/NormalizedPolyline.php | 68 + .../Cloud/VisionAI/V1/NormalizedVertex.php | 103 + .../V1/ObjectDetectionPredictionResult.php | 111 + .../Entity.php | 101 + .../IdentifiedBox.php | 189 + .../IdentifiedBox/NormalizedBoundingBox.php | 169 + .../VisionAI/V1/OccupancyCountConfig.php | 147 + .../V1/OccupancyCountingPredictionResult.php | 275 + .../DwellTimeInfo.php | 189 + .../Entity.php | 101 + .../IdentifiedBox.php | 227 + .../IdentifiedBox/NormalizedBoundingBox.php | 169 + .../Stats.php | 135 + .../Stats/AccumulatedObjectCount.php | 122 + .../Stats/ActiveZoneCount.php | 111 + .../Stats/CrossingLineCount.php | 213 + .../Stats/ObjectCount.php | 112 + .../TrackInfo.php | 111 + .../Cloud/VisionAI/V1/OperationMetadata.php | 307 + .../src/Google/Cloud/VisionAI/V1/Operator.php | 267 + .../Cloud/VisionAI/V1/OperatorDefinition.php | 291 + .../OperatorDefinition/ArgumentDefinition.php | 114 + .../AttributeDefinition.php | 157 + .../Cloud/VisionAI/V1/OperatorQuery.php | 135 + .../src/Google/Cloud/VisionAI/V1/Packet.php | 111 + .../Google/Cloud/VisionAI/V1/PacketHeader.php | 369 ++ .../Google/Cloud/VisionAI/V1/PacketType.php | 115 + .../VisionAI/V1/PacketType/TypeDescriptor.php | 166 + .../Google/Cloud/VisionAI/V1/Partition.php | 166 + .../Partition/RelativeTemporalPartition.php | 122 + .../V1/Partition/SpatialPartition.php | 209 + .../V1/Partition/TemporalPartition.php | 122 + .../Cloud/VisionAI/V1/PersonBlurConfig.php | 101 + .../V1/PersonBlurConfig/PersonBlurType.php | 61 + .../V1/PersonVehicleDetectionConfig.php | 117 + ...onalProtectiveEquipmentDetectionConfig.php | 135 + ...onalProtectiveEquipmentDetectionOutput.php | 111 + .../DetectedPerson.php | 414 ++ .../NormalizedBoundingBox.php | 169 + .../PPEEntity.php | 173 + .../PPEIdentifiedBox.php | 189 + .../PersonEntity.php | 67 + .../PersonIdentifiedBox.php | 190 + .../src/Google/Cloud/VisionAI/V1/Process.php | 427 ++ .../Google/Cloud/VisionAI/V1/Processor.php | 593 ++ .../VisionAI/V1/Processor/ProcessorState.php | 73 + .../VisionAI/V1/Processor/ProcessorType.php | 78 + .../Cloud/VisionAI/V1/ProcessorConfig.php | 618 ++ .../Cloud/VisionAI/V1/ProcessorIOSpec.php | 185 + .../ProcessorIOSpec/GraphInputChannelSpec.php | 235 + .../GraphOutputChannelSpec.php | 128 + .../InstanceResourceInputBindingSpec.php | 151 + .../InstanceResourceOutputBindingSpec.php | 137 + .../VisionAI/V1/ProductRecognizerConfig.php | 105 + .../Cloud/VisionAI/V1/RawImageDescriptor.php | 135 + .../V1/ReceiveEventsControlResponse.php | 126 + .../VisionAI/V1/ReceiveEventsRequest.php | 108 + .../V1/ReceiveEventsRequest/SetupRequest.php | 300 + .../VisionAI/V1/ReceiveEventsResponse.php | 108 + .../V1/ReceivePacketsControlResponse.php | 126 + .../VisionAI/V1/ReceivePacketsRequest.php | 111 + .../V1/ReceivePacketsRequest/SetupRequest.php | 306 + .../VisionAI/V1/ReceivePacketsResponse.php | 108 + .../src/Google/Cloud/VisionAI/V1/Registry.php | 65 + .../Cloud/VisionAI/V1/ReleaseLeaseRequest.php | 135 + .../VisionAI/V1/ReleaseLeaseResponse.php | 33 + .../RemoveApplicationStreamInputRequest.php | 199 + .../TargetStreamInput.php | 60 + .../RemoveApplicationStreamInputResponse.php | 33 + .../V1/RemoveCollectionItemRequest.php | 90 + .../V1/RemoveCollectionItemResponse.php | 77 + .../VisionAI/V1/RemoveIndexAssetMetadata.php | 165 + .../VisionAI/V1/RemoveIndexAssetRequest.php | 117 + .../VisionAI/V1/RemoveIndexAssetResponse.php | 33 + .../Cloud/VisionAI/V1/RenewLeaseRequest.php | 179 + .../Cloud/VisionAI/V1/RequestMetadata.php | 259 + .../V1/ResolveOperatorInfoRequest.php | 117 + .../V1/ResolveOperatorInfoResponse.php | 67 + .../Cloud/VisionAI/V1/ResourceAnnotations.php | 129 + .../VisionAI/V1/ResourceSpecification.php | 337 + .../src/Google/Cloud/VisionAI/V1/RunMode.php | 63 + .../Google/Cloud/VisionAI/V1/RunStatus.php | 101 + .../Cloud/VisionAI/V1/RunStatus/State.php | 84 + .../VisionAI/V1/SchemaKeySortingStrategy.php | 67 + .../V1/SchemaKeySortingStrategy/Option.php | 149 + .../Option/AggregateMethod.php | 66 + .../Cloud/VisionAI/V1/SearchAssetsRequest.php | 409 ++ .../VisionAI/V1/SearchAssetsResponse.php | 139 + .../Cloud/VisionAI/V1/SearchCapability.php | 67 + .../VisionAI/V1/SearchCapability/Type.php | 54 + .../VisionAI/V1/SearchCapabilitySetting.php | 67 + .../Google/Cloud/VisionAI/V1/SearchConfig.php | 176 + .../VisionAI/V1/SearchCriteriaProperty.php | 143 + .../Cloud/VisionAI/V1/SearchHypernym.php | 148 + .../V1/SearchIndexEndpointRequest.php | 310 + .../V1/SearchIndexEndpointResponse.php | 105 + .../Cloud/VisionAI/V1/SearchResultItem.php | 304 + .../Cloud/VisionAI/V1/SendPacketsRequest.php | 108 + .../Cloud/VisionAI/V1/SendPacketsResponse.php | 33 + .../src/Google/Cloud/VisionAI/V1/Series.php | 291 + .../Cloud/VisionAI/V1/SeriesMetadata.php | 71 + .../Cloud/VisionAI/V1/ServerMetadata.php | 131 + .../src/Google/Cloud/VisionAI/V1/Stream.php | 335 + .../Cloud/VisionAI/V1/StreamAnnotation.php | 252 + .../VisionAI/V1/StreamAnnotationType.php | 66 + .../Cloud/VisionAI/V1/StreamAnnotations.php | 67 + .../VisionAI/V1/StreamWithAnnotation.php | 164 + .../StreamWithAnnotation/NodeAnnotation.php | 101 + .../Google/Cloud/VisionAI/V1/StringArray.php | 67 + .../Cloud/VisionAI/V1/TagParsingConfig.php | 71 + .../TagParsingConfig/EntityParsingConfig.php | 139 + .../EntityMatchingStrategy.php | 62 + .../Cloud/VisionAI/V1/TagRecognizerConfig.php | 115 + .../V1/UndeployApplicationRequest.php | 165 + .../V1/UndeployApplicationResponse.php | 33 + .../VisionAI/V1/UndeployIndexMetadata.php | 111 + .../VisionAI/V1/UndeployIndexRequest.php | 75 + .../VisionAI/V1/UndeployIndexResponse.php | 33 + .../VisionAI/V1/UniversalInputConfig.php | 33 + .../VisionAI/V1/UpdateAnalysisRequest.php | 230 + .../VisionAI/V1/UpdateAnnotationRequest.php | 151 + .../V1/UpdateApplicationInstancesRequest.php | 232 + .../UpdateApplicationInstance.php | 169 + .../V1/UpdateApplicationInstancesResponse.php | 33 + .../VisionAI/V1/UpdateApplicationRequest.php | 230 + .../UpdateApplicationStreamInputRequest.php | 241 + .../UpdateApplicationStreamInputResponse.php | 33 + .../Cloud/VisionAI/V1/UpdateAssetRequest.php | 152 + .../VisionAI/V1/UpdateClusterRequest.php | 230 + .../VisionAI/V1/UpdateCollectionRequest.php | 182 + .../Cloud/VisionAI/V1/UpdateCorpusRequest.php | 136 + .../VisionAI/V1/UpdateDataSchemaRequest.php | 146 + .../Cloud/VisionAI/V1/UpdateDraftRequest.php | 268 + .../Cloud/VisionAI/V1/UpdateEventRequest.php | 230 + .../V1/UpdateIndexEndpointMetadata.php | 77 + .../V1/UpdateIndexEndpointRequest.php | 166 + .../Cloud/VisionAI/V1/UpdateIndexMetadata.php | 77 + .../Cloud/VisionAI/V1/UpdateIndexRequest.php | 161 + .../VisionAI/V1/UpdateOperatorRequest.php | 230 + .../VisionAI/V1/UpdateProcessRequest.php | 230 + .../VisionAI/V1/UpdateProcessorRequest.php | 230 + .../VisionAI/V1/UpdateSearchConfigRequest.php | 157 + .../V1/UpdateSearchHypernymRequest.php | 156 + .../Cloud/VisionAI/V1/UpdateSeriesRequest.php | 230 + .../Cloud/VisionAI/V1/UpdateStreamRequest.php | 230 + .../Cloud/VisionAI/V1/UploadAssetMetadata.php | 121 + .../Cloud/VisionAI/V1/UploadAssetRequest.php | 119 + .../Cloud/VisionAI/V1/UploadAssetResponse.php | 33 + .../VisionAI/V1/UserSpecifiedAnnotation.php | 163 + .../VisionAI/V1/VertexAutoMLVideoConfig.php | 185 + .../VisionAI/V1/VertexAutoMLVisionConfig.php | 109 + .../Cloud/VisionAI/V1/VertexCustomConfig.php | 351 + ...VideoActionRecognitionPredictionResult.php | 167 + .../IdentifiedAction.php | 141 + .../VideoClassificationPredictionResult.php | 171 + .../IdentifiedClassification.php | 141 + .../VideoObjectTrackingPredictionResult.php | 167 + .../BoundingBox.php | 171 + .../DetectedObject.php | 231 + .../VisionAI/V1/VideoStreamInputConfig.php | 108 + .../V1/ViewCollectionItemsRequest.php | 178 + .../V1/ViewCollectionItemsResponse.php | 105 + .../VisionAI/V1/ViewIndexedAssetsRequest.php | 229 + .../VisionAI/V1/ViewIndexedAssetsResponse.php | 105 + .../add_application_stream_input.php | 88 + .../AppPlatformClient/create_application.php | 94 + .../create_application_instances.php | 108 + .../V1/AppPlatformClient/create_draft.php | 94 + .../V1/AppPlatformClient/create_processor.php | 94 + .../AppPlatformClient/delete_application.php | 80 + .../delete_application_instances.php | 99 + .../V1/AppPlatformClient/delete_draft.php | 85 + .../V1/AppPlatformClient/delete_processor.php | 80 + .../AppPlatformClient/deploy_application.php | 85 + .../V1/AppPlatformClient/get_application.php | 71 + .../V1/AppPlatformClient/get_draft.php | 76 + .../V1/AppPlatformClient/get_instance.php | 76 + .../V1/AppPlatformClient/get_location.php | 57 + .../V1/AppPlatformClient/get_processor.php | 71 + .../AppPlatformClient/list_applications.php | 76 + .../V1/AppPlatformClient/list_drafts.php | 76 + .../V1/AppPlatformClient/list_instances.php | 76 + .../V1/AppPlatformClient/list_locations.php | 62 + .../list_prebuilt_processors.php | 72 + .../V1/AppPlatformClient/list_processors.php | 76 + .../remove_application_stream_input.php | 87 + .../undeploy_application.php | 85 + .../AppPlatformClient/update_application.php | 84 + .../update_application_instances.php | 88 + .../update_application_stream_input.php | 87 + .../V1/AppPlatformClient/update_draft.php | 84 + .../V1/AppPlatformClient/update_processor.php | 84 + .../HealthCheckServiceClient/get_location.php | 57 + .../HealthCheckServiceClient/health_check.php | 57 + .../list_locations.php | 62 + .../batch_run_process.php | 120 + .../create_analysis.php | 88 + .../create_operator.php | 88 + .../create_process.php | 100 + .../delete_analysis.php | 85 + .../delete_operator.php | 80 + .../delete_process.php | 85 + .../LiveVideoAnalyticsClient/get_analysis.php | 76 + .../LiveVideoAnalyticsClient/get_location.php | 57 + .../LiveVideoAnalyticsClient/get_operator.php | 71 + .../LiveVideoAnalyticsClient/get_process.php | 76 + .../list_analyses.php | 76 + .../list_locations.php | 62 + .../list_operators.php | 76 + .../list_processes.php | 76 + .../list_public_operators.php | 76 + .../resolve_operator_info.php | 78 + .../update_analysis.php | 74 + .../update_operator.php | 74 + .../update_process.php | 93 + .../StreamingServiceClient/acquire_lease.php | 57 + .../StreamingServiceClient/get_location.php | 57 + .../StreamingServiceClient/list_locations.php | 62 + .../StreamingServiceClient/receive_events.php | 63 + .../receive_packets.php | 63 + .../StreamingServiceClient/release_lease.php | 57 + .../V1/StreamingServiceClient/renew_lease.php | 57 + .../StreamingServiceClient/send_packets.php | 63 + .../StreamsServiceClient/create_cluster.php | 88 + .../V1/StreamsServiceClient/create_event.php | 88 + .../V1/StreamsServiceClient/create_series.php | 110 + .../V1/StreamsServiceClient/create_stream.php | 88 + .../StreamsServiceClient/delete_cluster.php | 80 + .../V1/StreamsServiceClient/delete_event.php | 80 + .../V1/StreamsServiceClient/delete_series.php | 85 + .../V1/StreamsServiceClient/delete_stream.php | 85 + .../generate_stream_hls_token.php | 70 + .../V1/StreamsServiceClient/get_cluster.php | 71 + .../V1/StreamsServiceClient/get_event.php | 71 + .../V1/StreamsServiceClient/get_location.php | 57 + .../V1/StreamsServiceClient/get_series.php | 76 + .../V1/StreamsServiceClient/get_stream.php | 76 + .../get_stream_thumbnail.php | 85 + .../V1/StreamsServiceClient/list_clusters.php | 76 + .../V1/StreamsServiceClient/list_events.php | 76 + .../StreamsServiceClient/list_locations.php | 62 + .../V1/StreamsServiceClient/list_series.php | 76 + .../V1/StreamsServiceClient/list_streams.php | 76 + .../materialize_channel.php | 115 + .../StreamsServiceClient/update_cluster.php | 74 + .../V1/StreamsServiceClient/update_event.php | 74 + .../V1/StreamsServiceClient/update_series.php | 102 + .../V1/StreamsServiceClient/update_stream.php | 74 + .../WarehouseClient/add_collection_item.php | 92 + .../V1/WarehouseClient/analyze_asset.php | 90 + .../V1/WarehouseClient/analyze_corpus.php | 85 + .../samples/V1/WarehouseClient/clip_asset.php | 86 + .../V1/WarehouseClient/create_annotation.php | 80 + .../V1/WarehouseClient/create_asset.php | 75 + .../V1/WarehouseClient/create_collection.php | 86 + .../V1/WarehouseClient/create_corpus.php | 88 + .../V1/WarehouseClient/create_data_schema.php | 81 + .../V1/WarehouseClient/create_index.php | 87 + .../WarehouseClient/create_index_endpoint.php | 85 + .../WarehouseClient/create_search_config.php | 95 + .../create_search_hypernym.php | 74 + .../V1/WarehouseClient/delete_annotation.php | 77 + .../V1/WarehouseClient/delete_asset.php | 87 + .../V1/WarehouseClient/delete_collection.php | 86 + .../V1/WarehouseClient/delete_corpus.php | 70 + .../V1/WarehouseClient/delete_data_schema.php | 76 + .../V1/WarehouseClient/delete_index.php | 88 + .../WarehouseClient/delete_index_endpoint.php | 80 + .../WarehouseClient/delete_search_config.php | 79 + .../delete_search_hypernym.php | 76 + .../V1/WarehouseClient/deploy_index.php | 105 + .../V1/WarehouseClient/generate_hls_uri.php | 80 + .../generate_retrieval_url.php | 80 + .../V1/WarehouseClient/get_annotation.php | 79 + .../samples/V1/WarehouseClient/get_asset.php | 78 + .../V1/WarehouseClient/get_collection.php | 77 + .../samples/V1/WarehouseClient/get_corpus.php | 71 + .../V1/WarehouseClient/get_data_schema.php | 78 + .../samples/V1/WarehouseClient/get_index.php | 78 + .../V1/WarehouseClient/get_index_endpoint.php | 71 + .../V1/WarehouseClient/get_location.php | 57 + .../V1/WarehouseClient/get_search_config.php | 78 + .../WarehouseClient/get_search_hypernym.php | 78 + .../V1/WarehouseClient/import_assets.php | 87 + .../V1/WarehouseClient/index_asset.php | 91 + .../V1/WarehouseClient/ingest_asset.php | 66 + .../V1/WarehouseClient/list_annotations.php | 62 + .../V1/WarehouseClient/list_assets.php | 78 + .../V1/WarehouseClient/list_collections.php | 77 + .../V1/WarehouseClient/list_corpora.php | 75 + .../V1/WarehouseClient/list_data_schemas.php | 78 + .../WarehouseClient/list_index_endpoints.php | 76 + .../V1/WarehouseClient/list_indexes.php | 78 + .../V1/WarehouseClient/list_locations.php | 62 + .../WarehouseClient/list_search_configs.php | 78 + .../WarehouseClient/list_search_hypernyms.php | 78 + .../remove_collection_item.php | 92 + .../V1/WarehouseClient/remove_index_asset.php | 91 + .../V1/WarehouseClient/search_assets.php | 77 + .../WarehouseClient/search_index_endpoint.php | 82 + .../V1/WarehouseClient/undeploy_index.php | 89 + .../V1/WarehouseClient/update_annotation.php | 59 + .../V1/WarehouseClient/update_asset.php | 59 + .../V1/WarehouseClient/update_collection.php | 59 + .../V1/WarehouseClient/update_corpus.php | 73 + .../V1/WarehouseClient/update_data_schema.php | 75 + .../V1/WarehouseClient/update_index.php | 76 + .../WarehouseClient/update_index_endpoint.php | 74 + .../WarehouseClient/update_search_config.php | 72 + .../update_search_hypernym.php | 59 + .../V1/WarehouseClient/upload_asset.php | 99 + .../WarehouseClient/view_collection_items.php | 82 + .../WarehouseClient/view_indexed_assets.php | 83 + .../v1/src/V1/Client/AppPlatformClient.php | 1204 ++++ .../V1/Client/HealthCheckServiceClient.php | 314 + .../V1/Client/LiveVideoAnalyticsClient.php | 933 +++ .../src/V1/Client/StreamingServiceClient.php | 436 ++ .../v1/src/V1/Client/StreamsServiceClient.php | 1099 ++++ .../v1/src/V1/Client/WarehouseClient.php | 2361 +++++++ .../VisionAi/v1/src/V1/gapic_metadata.json | 808 +++ .../resources/app_platform_client_config.json | 162 + .../app_platform_descriptor_config.php | 536 ++ .../app_platform_rest_client_config.php | 443 ++ .../health_check_service_client_config.json | 37 + ...health_check_service_descriptor_config.php | 77 + ...ealth_check_service_rest_client_config.php | 141 + .../live_video_analytics_client_config.json | 174 + ...live_video_analytics_descriptor_config.php | 390 ++ ...ive_video_analytics_rest_client_config.php | 357 + .../streaming_service_client_config.json | 56 + .../streaming_service_descriptor_config.php | 122 + .../streaming_service_rest_client_config.php | 166 + .../streams_service_client_config.json | 147 + .../streams_service_descriptor_config.php | 480 ++ .../streams_service_rest_client_config.php | 425 ++ .../V1/resources/warehouse_client_config.json | 369 ++ .../resources/warehouse_descriptor_config.php | 1066 +++ .../warehouse_rest_client_config.php | 865 +++ .../Unit/V1/Client/AppPlatformClientTest.php | 3108 +++++++++ .../Client/HealthCheckServiceClientTest.php | 274 + .../Client/LiveVideoAnalyticsClientTest.php | 2167 +++++++ .../V1/Client/StreamingServiceClientTest.php | 666 ++ .../V1/Client/StreamsServiceClientTest.php | 2786 ++++++++ .../Unit/V1/Client/WarehouseClientTest.php | 5732 +++++++++++++++++ 1159 files changed, 192918 insertions(+) create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorGroupService.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ReportErrorsService.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventRequest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/get_group.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/update_group.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/delete_events.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_events.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_group_stats.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ReportErrorsServiceClient/report_error_event.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ErrorGroupServiceClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ErrorStatsServiceClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ReportErrorsServiceClient.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_client_config.json create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_descriptor_config.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ErrorGroupServiceClientTest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ErrorStatsServiceClientTest.php create mode 100644 owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ReportErrorsServiceClientTest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Backup.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/RealtimeUpdates.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Schedule.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Snapshot.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/UserCreds.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/State.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/Stats.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BackupSchedule.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateBackupScheduleRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateUserCredsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DailyRecurrence.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/CmekConfig.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DataAccessMode.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseEdition.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DeleteProtectionState.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/CustomerManagedEncryptionOptions.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/GoogleDefaultEncryptionOptions.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/SourceEncryptionOptions.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/PointInTimeRecoveryEnablement.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo/BackupSource.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupScheduleRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteUserCredsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DisableUserCredsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/EnableUserCredsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupScheduleRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetUserCredsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/ApiScope.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/Density.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig/FlatIndex.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/PitrSnapshot.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RealtimeUpdatesMode.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ResetUserPasswordRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateBackupScheduleRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/ResourceIdentity.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/State.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/WeeklyRecurrence.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/bulk_delete_documents.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/clone_database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_backup_schedule.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_user_creds.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup_schedule.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_user_creds.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/disable_user_creds.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/enable_user_creds.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup_schedule.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_user_creds.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backup_schedules.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backups.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_user_creds.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/reset_user_password.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/restore_database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_backup_schedule.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/Client/FirestoreAdminClient.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json create mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php create mode 100644 owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/Client/FirestoreAdminClientTest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/BloomFilter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/ExplainStats.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Pipeline.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/QueryProfile.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BitSequence.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BloomFilter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutionStats.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainMetrics.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainOptions.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainStats.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PBFunction.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline/Stage.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PlanSummary.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Avg.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Sum.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredPipeline.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest/DistanceMeasure.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadWrite.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php create mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/execute_pipeline.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php create mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php create mode 100644 owl-bot-staging/Firestore/v1/src/V1/Client/FirestoreClient.php create mode 100644 owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json create mode 100644 owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php create mode 100644 owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php create mode 100644 owl-bot-staging/Firestore/v1/tests/Unit/V1/Client/FirestoreClientTest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LogEntry.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/Logging.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingConfig.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingMetrics.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryDataset.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryOptions.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BucketMetadata.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CmekSettings.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesMetadata.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesResponse.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateBucketRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateExclusionRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLinkRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLogMetricRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateSinkRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateViewRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteBucketRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteExclusionRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLinkRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogMetricRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteSinkRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteViewRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetBucketRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetCmekSettingsRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetExclusionRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLinkRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLogMetricRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSettingsRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSinkRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetViewRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexConfig.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexType.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LifecycleState.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/Link.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LinkMetadata.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsResponse.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsResponse.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksResponse.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesResponse.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsResponse.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsResponse.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsResponse.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksResponse.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsResponse.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LocationMetadata.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogBucket.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntry.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntryOperation.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntrySourceLocation.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogExclusion.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric/ApiVersion.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink/VersionFormat.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSplit.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogView.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/OperationState.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/Settings.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo/Reason.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UndeleteBucketRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateBucketRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateCmekSettingsRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateExclusionRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateLogMetricRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSettingsRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSinkRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateViewRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesPartialErrors.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesRequest.php create mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesResponse.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/copy_log_entries.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket_async.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_exclusion.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_link.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_sink.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_view.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_bucket.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_exclusion.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_link.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_sink.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_view.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_bucket.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_cmek_settings.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_exclusion.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_link.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_settings.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_sink.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_view.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_buckets.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_exclusions.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_links.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_sinks.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_views.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/undelete_bucket.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket_async.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_cmek_settings.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_exclusion.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_settings.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_sink.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_view.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/delete_log.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_log_entries.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_logs.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_monitored_resource_descriptors.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/tail_log_entries.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/write_log_entries.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/create_log_metric.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/delete_log_metric.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/get_log_metric.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/list_log_metrics.php create mode 100644 owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/update_log_metric.php create mode 100644 owl-bot-staging/Logging/v2/src/V2/Client/ConfigServiceV2Client.php create mode 100644 owl-bot-staging/Logging/v2/src/V2/Client/LoggingServiceV2Client.php create mode 100644 owl-bot-staging/Logging/v2/src/V2/Client/MetricsServiceV2Client.php create mode 100644 owl-bot-staging/Logging/v2/src/V2/gapic_metadata.json create mode 100644 owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_client_config.json create mode 100644 owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_descriptor_config.php create mode 100644 owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_rest_client_config.php create mode 100644 owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_client_config.json create mode 100644 owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_descriptor_config.php create mode 100644 owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_rest_client_config.php create mode 100644 owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_client_config.json create mode 100644 owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_descriptor_config.php create mode 100644 owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_rest_client_config.php create mode 100644 owl-bot-staging/Logging/v2/tests/Unit/V2/Client/ConfigServiceV2ClientTest.php create mode 100644 owl-bot-staging/Logging/v2/tests/Unit/V2/Client/LoggingServiceV2ClientTest.php create mode 100644 owl-bot-staging/Logging/v2/tests/Unit/V2/Client/MetricsServiceV2ClientTest.php create mode 100644 owl-bot-staging/LongRunning/proto/src/GPBMetadata/Google/Longrunning/Operations.php create mode 100644 owl-bot-staging/LongRunning/proto/src/Google/LongRunning/CancelOperationRequest.php create mode 100644 owl-bot-staging/LongRunning/proto/src/Google/LongRunning/DeleteOperationRequest.php create mode 100644 owl-bot-staging/LongRunning/proto/src/Google/LongRunning/GetOperationRequest.php create mode 100644 owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsRequest.php create mode 100644 owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsResponse.php create mode 100644 owl-bot-staging/LongRunning/proto/src/Google/LongRunning/Operation.php create mode 100644 owl-bot-staging/LongRunning/proto/src/Google/LongRunning/OperationInfo.php create mode 100644 owl-bot-staging/LongRunning/proto/src/Google/LongRunning/WaitOperationRequest.php create mode 100644 owl-bot-staging/LongRunning/src/LongRunning/Client/OperationsClient.php create mode 100644 owl-bot-staging/LongRunning/src/LongRunning/gapic_metadata.json create mode 100644 owl-bot-staging/LongRunning/src/LongRunning/resources/operations_client_config.json create mode 100644 owl-bot-staging/LongRunning/src/LongRunning/resources/operations_descriptor_config.php create mode 100644 owl-bot-staging/LongRunning/src/LongRunning/resources/operations_rest_client_config.php create mode 100644 owl-bot-staging/LongRunning/tests/Unit/Client/OperationsClientTest.php create mode 100644 owl-bot-staging/Trace/v1/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V1/Trace.php create mode 100644 owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/GetTraceRequest.php create mode 100644 owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest.php create mode 100644 owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest/ViewType.php create mode 100644 owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesResponse.php create mode 100644 owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/PatchTracesRequest.php create mode 100644 owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/Trace.php create mode 100644 owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/TraceSpan.php create mode 100644 owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/TraceSpan/SpanKind.php create mode 100644 owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/Traces.php create mode 100644 owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/get_trace.php create mode 100644 owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/list_traces.php create mode 100644 owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/patch_traces.php create mode 100644 owl-bot-staging/Trace/v1/src/V1/Client/TraceServiceClient.php create mode 100644 owl-bot-staging/Trace/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/Trace/v1/src/V1/resources/trace_service_client_config.json create mode 100644 owl-bot-staging/Trace/v1/src/V1/resources/trace_service_descriptor_config.php create mode 100644 owl-bot-staging/Trace/v1/src/V1/resources/trace_service_rest_client_config.php create mode 100644 owl-bot-staging/Trace/v1/tests/Unit/V1/Client/TraceServiceClientTest.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V2/Trace.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V2/Tracing.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/AttributeValue.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/BatchWriteSpansRequest.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Module.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Attributes.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link/Type.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Links.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/SpanKind.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/Annotation.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent/Type.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvents.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrame.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrames.php create mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/TruncatableString.php create mode 100644 owl-bot-staging/Trace/v2/samples/V2/TraceServiceClient/batch_write_spans.php create mode 100644 owl-bot-staging/Trace/v2/samples/V2/TraceServiceClient/create_span.php create mode 100644 owl-bot-staging/Trace/v2/src/V2/Client/TraceServiceClient.php create mode 100644 owl-bot-staging/Trace/v2/src/V2/gapic_metadata.json create mode 100644 owl-bot-staging/Trace/v2/src/V2/resources/trace_service_client_config.json create mode 100644 owl-bot-staging/Trace/v2/src/V2/resources/trace_service_descriptor_config.php create mode 100644 owl-bot-staging/Trace/v2/src/V2/resources/trace_service_rest_client_config.php create mode 100644 owl-bot-staging/Trace/v2/tests/Unit/V2/Client/TraceServiceClientTest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Annotations.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Common.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/HealthService.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Lva.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/LvaResources.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/LvaService.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Platform.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamingResources.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamingService.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamsResources.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamsService.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Warehouse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AIEnabledDevicesInputConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AcceleratorType.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AcquireLeaseRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddApplicationStreamInputRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddApplicationStreamInputResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddCollectionItemRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddCollectionItemResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Analysis.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalysisDefinition.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata/AnalysisStatus.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata/AnalysisStatus/State.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/DebugOptions.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/OperatorOption.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/StreamInput.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Annotation.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationCustomizedStruct.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationList.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationMatchingResult.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationValue.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionRequest/StructedInputAnnotation.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionResponse/StructedOutputAnnotation.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformEventBody.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo/GlobalOutputResource.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo/MonitoringConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/BillingMode.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/State.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationConfigs.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationConfigs/EventDeliveryConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationInstance.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationNodeAnnotation.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationStreamInput.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Asset.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource/AssetContentData.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource/AssetGcsSource.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AttributeValue.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AutoscalingMetricSpec.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchOperationStatus.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessRequest/BatchRunProcessOptions.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BigQueryConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BoolValue.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Channel.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CircleArea.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClassificationPredictionResult.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetResponse/TimeIndexedUri.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Cluster.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Cluster/State.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClusterInfo.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Collection.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CollectionItem.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CollectionItem/Type.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CommitRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ControlledMode.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Corpus.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Corpus/Type.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAnalysisRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAnnotationRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationInstancesRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationInstancesResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAssetRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateClusterRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCollectionMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCollectionRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCorpusMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCorpusRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateDataSchemaRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateDraftRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateEventRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexEndpointMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexEndpointRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateOperatorRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateProcessRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateProcessorRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSearchConfigRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSearchHypernymRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSeriesRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateStreamRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Criteria.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/ModelSchema.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/ProductRecognizerArtifact.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/SourceType.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchema.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/CustomizedStructConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/DataType.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/Granularity.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/ListConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/ProtoAnyConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy/ConfidenceScoreIndexConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy/SearchStrategyType.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataType.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DateTimeRange.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DateTimeRangeArray.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DedicatedResources.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAnalysisRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAnnotationRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationInstancesRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationInstancesResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAssetMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAssetRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteClusterRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCollectionMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCollectionRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCorpusRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteDataSchemaRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteDraftRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteEventRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexEndpointMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexEndpointRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteOperatorRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteProcessRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteProcessorRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSearchConfigRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSearchHypernymRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSeriesRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteStreamRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployApplicationRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployApplicationResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployedIndex.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployedIndexReference.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Draft.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/EagerMode.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Event.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Event/Clock.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/EventUpdate.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucket.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucket/Range.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucketType.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetGroup.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/CustomRangeBucketSpec.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/DateTimeBucketSpec.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/DateTimeBucketSpec/Granularity.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/FixedRangeBucketSpec.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetValue.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FloatRange.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FloatRangeArray.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GcsOutputConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GcsSource.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeneralObjectDetectionConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateHlsUriRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateHlsUriResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateRetrievalUrlRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateRetrievalUrlResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateStreamHlsTokenRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateStreamHlsTokenResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeoCoordinate.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeoLocationArray.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAnalysisRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAnnotationRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetApplicationRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAssetRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetClusterRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetCollectionRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetCorpusRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetDataSchemaRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetDraftRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetEventRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetIndexEndpointRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetIndexRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetInstanceRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetOperatorRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetProcessRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetProcessorRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSearchConfigRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSearchHypernymRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSeriesRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamThumbnailRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamThumbnailResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GstreamerBufferDescriptor.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/HealthCheckRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/HealthCheckResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageObjectDetectionPredictionResult.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageQuery.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageSegmentationPredictionResult.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Index.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Index/State.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexEndpoint.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexEndpoint/State.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexedAsset.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexingStatus.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexingStatus/State.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config/VideoType.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config/VideoType/ContainerFormat.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/TimeIndexedData.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/InputResource.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/InstanceType.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/OutputResource.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/State.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IntRange.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IntRangeArray.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Lease.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/LeaseType.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnalysesRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnalysesResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnnotationsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnnotationsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListApplicationsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListApplicationsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAssetsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAssetsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListClustersRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListClustersResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCollectionsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCollectionsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCorporaRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCorporaResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDataSchemasRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDataSchemasResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDraftsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDraftsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListEventsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListEventsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexEndpointsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexEndpointsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexesRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexesResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListInstancesRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListInstancesResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListOperatorsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListOperatorsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPrebuiltProcessorsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPrebuiltProcessorsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessesRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessesResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessorsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessorsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPublicOperatorsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPublicOperatorsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchConfigsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchConfigsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchHypernymsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchHypernymsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSeriesRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSeriesResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListStreamsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListStreamsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MachineSpec.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MaterializeChannelRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MediaWarehouseConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ModelType.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Node.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Node/InputEdge.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedPolygon.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedPolyline.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedVertex.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/Entity.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/IdentifiedBox.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/IdentifiedBox/NormalizedBoundingBox.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/DwellTimeInfo.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Entity.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/IdentifiedBox.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/IdentifiedBox/NormalizedBoundingBox.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/AccumulatedObjectCount.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/ActiveZoneCount.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/CrossingLineCount.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/ObjectCount.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/TrackInfo.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperationMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Operator.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition/ArgumentDefinition.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition/AttributeDefinition.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorQuery.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Packet.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketHeader.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketType.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketType/TypeDescriptor.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/RelativeTemporalPartition.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/SpatialPartition.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/TemporalPartition.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonBlurConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonBlurConfig/PersonBlurType.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonVehicleDetectionConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/DetectedPerson.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/NormalizedBoundingBox.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PPEEntity.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PPEIdentifiedBox.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PersonEntity.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PersonIdentifiedBox.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Process.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor/ProcessorState.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor/ProcessorType.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/GraphInputChannelSpec.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/GraphOutputChannelSpec.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/InstanceResourceInputBindingSpec.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/InstanceResourceOutputBindingSpec.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProductRecognizerConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RawImageDescriptor.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsControlResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsRequest/SetupRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsControlResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsRequest/SetupRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Registry.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReleaseLeaseRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReleaseLeaseResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputRequest/TargetStreamInput.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveCollectionItemRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveCollectionItemResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RenewLeaseRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RequestMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResolveOperatorInfoRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResolveOperatorInfoResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResourceAnnotations.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResourceSpecification.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunMode.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunStatus.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunStatus/State.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy/Option.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy/Option/AggregateMethod.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchAssetsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchAssetsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapability.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapability/Type.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapabilitySetting.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCriteriaProperty.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchHypernym.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchIndexEndpointRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchIndexEndpointResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchResultItem.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SendPacketsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SendPacketsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Series.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SeriesMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ServerMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Stream.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotation.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotationType.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotations.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamWithAnnotation.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamWithAnnotation/NodeAnnotation.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StringArray.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig/EntityParsingConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig/EntityParsingConfig/EntityMatchingStrategy.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagRecognizerConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployApplicationRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployApplicationResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UniversalInputConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAnalysisRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAnnotationRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesRequest/UpdateApplicationInstance.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationStreamInputRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationStreamInputResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAssetRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateClusterRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateCollectionRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateCorpusRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateDataSchemaRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateDraftRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateEventRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexEndpointMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexEndpointRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateOperatorRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateProcessRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateProcessorRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSearchConfigRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSearchHypernymRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSeriesRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateStreamRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetMetadata.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UserSpecifiedAnnotation.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexAutoMLVideoConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexAutoMLVisionConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexCustomConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoActionRecognitionPredictionResult.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoActionRecognitionPredictionResult/IdentifiedAction.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoClassificationPredictionResult.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoClassificationPredictionResult/IdentifiedClassification.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult/BoundingBox.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult/DetectedObject.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoStreamInputConfig.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewCollectionItemsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewCollectionItemsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewIndexedAssetsRequest.php create mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewIndexedAssetsResponse.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/add_application_stream_input.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_application.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_application_instances.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_draft.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_processor.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_application.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_application_instances.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_draft.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_processor.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/deploy_application.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_application.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_draft.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_instance.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_location.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_processor.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_applications.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_drafts.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_instances.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_locations.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_prebuilt_processors.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_processors.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/remove_application_stream_input.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/undeploy_application.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application_instances.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application_stream_input.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_draft.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_processor.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/get_location.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/health_check.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/list_locations.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/batch_run_process.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_analysis.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_operator.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_process.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_analysis.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_operator.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_process.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_analysis.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_location.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_operator.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_process.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_analyses.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_locations.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_operators.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_processes.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_public_operators.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/resolve_operator_info.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_analysis.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_operator.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_process.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/acquire_lease.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/get_location.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/list_locations.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/receive_events.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/receive_packets.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/release_lease.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/renew_lease.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/send_packets.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_cluster.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_event.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_series.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_stream.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_cluster.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_event.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_series.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_stream.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/generate_stream_hls_token.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_cluster.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_event.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_location.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_series.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_stream.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_stream_thumbnail.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_clusters.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_events.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_locations.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_series.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_streams.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/materialize_channel.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_cluster.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_event.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_series.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_stream.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/add_collection_item.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/analyze_asset.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/analyze_corpus.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/clip_asset.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_annotation.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_asset.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_collection.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_corpus.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_data_schema.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_index.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_index_endpoint.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_search_config.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_search_hypernym.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_annotation.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_asset.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_collection.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_corpus.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_data_schema.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_index.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_index_endpoint.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_search_config.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_search_hypernym.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/deploy_index.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/generate_hls_uri.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/generate_retrieval_url.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_annotation.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_asset.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_collection.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_corpus.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_data_schema.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_index.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_index_endpoint.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_location.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_search_config.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_search_hypernym.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/import_assets.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/index_asset.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/ingest_asset.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_annotations.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_assets.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_collections.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_corpora.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_data_schemas.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_index_endpoints.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_indexes.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_locations.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_search_configs.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_search_hypernyms.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/remove_collection_item.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/remove_index_asset.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/search_assets.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/search_index_endpoint.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/undeploy_index.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_annotation.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_asset.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_collection.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_corpus.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_data_schema.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_index.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_index_endpoint.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_search_config.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_search_hypernym.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/upload_asset.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/view_collection_items.php create mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/view_indexed_assets.php create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/Client/AppPlatformClient.php create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/Client/HealthCheckServiceClient.php create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/Client/LiveVideoAnalyticsClient.php create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/Client/StreamingServiceClient.php create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/Client/StreamsServiceClient.php create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/Client/WarehouseClient.php create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_client_config.json create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_descriptor_config.php create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_rest_client_config.php create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_client_config.json create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_descriptor_config.php create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_rest_client_config.php create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_client_config.json create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_descriptor_config.php create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_rest_client_config.php create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_client_config.json create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_descriptor_config.php create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_rest_client_config.php create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_client_config.json create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_descriptor_config.php create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_rest_client_config.php create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_client_config.json create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_descriptor_config.php create mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_rest_client_config.php create mode 100644 owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/AppPlatformClientTest.php create mode 100644 owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/HealthCheckServiceClientTest.php create mode 100644 owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/LiveVideoAnalyticsClientTest.php create mode 100644 owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/StreamingServiceClientTest.php create mode 100644 owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/StreamsServiceClientTest.php create mode 100644 owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/WarehouseClientTest.php diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php new file mode 100644 index 000000000000..ea7f3a7a57ca --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile( + "\x0A\xC0\x0C\x0A8google/devtools/clouderrorreporting/v1beta1/common.proto\x12+google.devtools.clouderrorreporting.v1beta1\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB2\x02\x0A\x0AErrorGroup\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x10\x0A\x08group_id\x18\x02 \x01(\x09\x12S\x0A\x0Ftracking_issues\x18\x03 \x03(\x0B2:.google.devtools.clouderrorreporting.v1beta1.TrackingIssue\x12X\x0A\x11resolution_status\x18\x05 \x01(\x0E2=.google.devtools.clouderrorreporting.v1beta1.ResolutionStatus:U\xEAAR\x0A-clouderrorreporting.googleapis.com/ErrorGroup\x12!projects/{project}/groups/{group}\"\x1C\x0A\x0DTrackingIssue\x12\x0B\x0A\x03url\x18\x01 \x01(\x09\"\xEF\x01\x0A\x0AErrorEvent\x12.\x0A\x0Aevent_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12T\x0A\x0Fservice_context\x18\x02 \x01(\x0B2;.google.devtools.clouderrorreporting.v1beta1.ServiceContext\x12\x0F\x0A\x07message\x18\x03 \x01(\x09\x12J\x0A\x07context\x18\x05 \x01(\x0B29.google.devtools.clouderrorreporting.v1beta1.ErrorContext\"I\x0A\x0EServiceContext\x12\x0F\x0A\x07service\x18\x02 \x01(\x09\x12\x0F\x0A\x07version\x18\x03 \x01(\x09\x12\x15\x0A\x0Dresource_type\x18\x04 \x01(\x09\"\xC9\x01\x0A\x0CErrorContext\x12U\x0A\x0Chttp_request\x18\x01 \x01(\x0B2?.google.devtools.clouderrorreporting.v1beta1.HttpRequestContext\x12\x0C\x0A\x04user\x18\x02 \x01(\x09\x12T\x0A\x0Freport_location\x18\x03 \x01(\x0B2;.google.devtools.clouderrorreporting.v1beta1.SourceLocation\"\x88\x01\x0A\x12HttpRequestContext\x12\x0E\x0A\x06method\x18\x01 \x01(\x09\x12\x0B\x0A\x03url\x18\x02 \x01(\x09\x12\x12\x0A\x0Auser_agent\x18\x03 \x01(\x09\x12\x10\x0A\x08referrer\x18\x04 \x01(\x09\x12\x1C\x0A\x14response_status_code\x18\x05 \x01(\x05\x12\x11\x0A\x09remote_ip\x18\x06 \x01(\x09\"O\x0A\x0ESourceLocation\x12\x11\x0A\x09file_path\x18\x01 \x01(\x09\x12\x13\x0A\x0Bline_number\x18\x02 \x01(\x05\x12\x15\x0A\x0Dfunction_name\x18\x04 \x01(\x09*j\x0A\x10ResolutionStatus\x12!\x0A\x1DRESOLUTION_STATUS_UNSPECIFIED\x10\x00\x12\x08\x0A\x04OPEN\x10\x01\x12\x10\x0A\x0CACKNOWLEDGED\x10\x02\x12\x0C\x0A\x08RESOLVED\x10\x03\x12\x09\x0A\x05MUTED\x10\x04B\x89\x02\x0A/com.google.devtools.clouderrorreporting.v1beta1B\x0BCommonProtoP\x01ZOcloud.google.com/go/errorreporting/apiv1beta1/errorreportingpb;errorreportingpb\xF8\x01\x01\xAA\x02#Google.Cloud.ErrorReporting.V1Beta1\xCA\x02#Google\\Cloud\\ErrorReporting\\V1beta1\xEA\x02&Google::Cloud::ErrorReporting::V1beta1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorGroupService.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorGroupService.php new file mode 100644 index 000000000000..7db9757e5c51 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorGroupService.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xDB\x0A\x0AEgoogle/devtools/clouderrorreporting/v1beta1/error_group_service.proto\x12+google.devtools.clouderrorreporting.v1beta1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A8google/devtools/clouderrorreporting/v1beta1/common.proto\"\\\x0A\x0FGetGroupRequest\x12I\x0A\x0Agroup_name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-clouderrorreporting.googleapis.com/ErrorGroup\"a\x0A\x12UpdateGroupRequest\x12K\x0A\x05group\x18\x01 \x01(\x0B27.google.devtools.clouderrorreporting.v1beta1.ErrorGroupB\x03\xE0A\x022\xF5\x04\x0A\x11ErrorGroupService\x12\xFA\x01\x0A\x08GetGroup\x12<.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest\x1A7.google.devtools.clouderrorreporting.v1beta1.ErrorGroup\"w\xDAA\x0Agroup_name\x82\xD3\xE4\x93\x02d\x12)/v1beta1/{group_name=projects/*/groups/*}Z7\x125/v1beta1/{group_name=projects/*/locations/*/groups/*}\x12\x8A\x02\x0A\x0BUpdateGroup\x12?.google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest\x1A7.google.devtools.clouderrorreporting.v1beta1.ErrorGroup\"\x80\x01\xDAA\x05group\x82\xD3\xE4\x93\x02r\x1A)/v1beta1/{group.name=projects/*/groups/*}:\x05groupZ>\x1A5/v1beta1/{group.name=projects/*/locations/*/groups/*}:\x05group\x1AV\xCAA\"clouderrorreporting.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\x94\x02\x0A/com.google.devtools.clouderrorreporting.v1beta1B\x16ErrorGroupServiceProtoP\x01ZOcloud.google.com/go/errorreporting/apiv1beta1/errorreportingpb;errorreportingpb\xF8\x01\x01\xAA\x02#Google.Cloud.ErrorReporting.V1Beta1\xCA\x02#Google\\Cloud\\ErrorReporting\\V1beta1\xEA\x02&Google::Cloud::ErrorReporting::V1beta1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php new file mode 100644 index 000000000000..dce20da33697 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + "\x0A\xBD!\x0AEgoogle/devtools/clouderrorreporting/v1beta1/error_stats_service.proto\x12+google.devtools.clouderrorreporting.v1beta1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A8google/devtools/clouderrorreporting/v1beta1/common.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x83\x05\x0A\x15ListGroupStatsRequest\x12I\x0A\x0Cproject_name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+cloudresourcemanager.googleapis.com/Project\x12\x15\x0A\x08group_id\x18\x02 \x03(\x09B\x03\xE0A\x01\x12^\x0A\x0Eservice_filter\x18\x03 \x01(\x0B2A.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilterB\x03\xE0A\x01\x12T\x0A\x0Atime_range\x18\x05 \x01(\x0B2;.google.devtools.clouderrorreporting.v1beta1.QueryTimeRangeB\x03\xE0A\x01\x12<\x0A\x14timed_count_duration\x18\x06 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01\x12X\x0A\x09alignment\x18\x07 \x01(\x0E2@.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignmentB\x03\xE0A\x01\x127\x0A\x0Ealignment_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x01\x12P\x0A\x05order\x18\x09 \x01(\x0E2<.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrderB\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x0B \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x0C \x01(\x09B\x03\xE0A\x01\"\xC0\x01\x0A\x16ListGroupStatsResponse\x12W\x0A\x11error_group_stats\x18\x01 \x03(\x0B2<.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x124\x0A\x10time_range_begin\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x86\x04\x0A\x0FErrorGroupStats\x12F\x0A\x05group\x18\x01 \x01(\x0B27.google.devtools.clouderrorreporting.v1beta1.ErrorGroup\x12\x0D\x0A\x05count\x18\x02 \x01(\x03\x12\x1C\x0A\x14affected_users_count\x18\x03 \x01(\x03\x12M\x0A\x0Ctimed_counts\x18\x04 \x03(\x0B27.google.devtools.clouderrorreporting.v1beta1.TimedCount\x123\x0A\x0Ffirst_seen_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.Timestamp\x122\x0A\x0Elast_seen_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12V\x0A\x11affected_services\x18\x07 \x03(\x0B2;.google.devtools.clouderrorreporting.v1beta1.ServiceContext\x12\x1D\x0A\x15num_affected_services\x18\x08 \x01(\x05\x12O\x0A\x0Erepresentative\x18\x09 \x01(\x0B27.google.devtools.clouderrorreporting.v1beta1.ErrorEvent\"y\x0A\x0ATimedCount\x12\x0D\x0A\x05count\x18\x01 \x01(\x03\x12.\x0A\x0Astart_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\xDC\x02\x0A\x11ListEventsRequest\x12I\x0A\x0Cproject_name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+cloudresourcemanager.googleapis.com/Project\x12\x15\x0A\x08group_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12^\x0A\x0Eservice_filter\x18\x03 \x01(\x0B2A.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilterB\x03\xE0A\x01\x12T\x0A\x0Atime_range\x18\x04 \x01(\x0B2;.google.devtools.clouderrorreporting.v1beta1.QueryTimeRangeB\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x06 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x07 \x01(\x09B\x03\xE0A\x01\"\xB2\x01\x0A\x12ListEventsResponse\x12M\x0A\x0Cerror_events\x18\x01 \x03(\x0B27.google.devtools.clouderrorreporting.v1beta1.ErrorEvent\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x124\x0A\x10time_range_begin\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\xE7\x01\x0A\x0EQueryTimeRange\x12R\x0A\x06period\x18\x01 \x01(\x0E2B.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period\"\x80\x01\x0A\x06Period\x12\x16\x0A\x12PERIOD_UNSPECIFIED\x10\x00\x12\x11\x0A\x0DPERIOD_1_HOUR\x10\x01\x12\x12\x0A\x0EPERIOD_6_HOURS\x10\x02\x12\x10\x0A\x0CPERIOD_1_DAY\x10\x03\x12\x11\x0A\x0DPERIOD_1_WEEK\x10\x04\x12\x12\x0A\x0EPERIOD_30_DAYS\x10\x05\"^\x0A\x14ServiceContextFilter\x12\x14\x0A\x07service\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x14\x0A\x07version\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x1A\x0A\x0Dresource_type\x18\x04 \x01(\x09B\x03\xE0A\x01\"`\x0A\x13DeleteEventsRequest\x12I\x0A\x0Cproject_name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+cloudresourcemanager.googleapis.com/Project\"\x16\x0A\x14DeleteEventsResponse*u\x0A\x13TimedCountAlignment\x12%\x0A!ERROR_COUNT_ALIGNMENT_UNSPECIFIED\x10\x00\x12\x1B\x0A\x17ALIGNMENT_EQUAL_ROUNDED\x10\x01\x12\x1A\x0A\x16ALIGNMENT_EQUAL_AT_END\x10\x02*}\x0A\x0FErrorGroupOrder\x12\x1B\x0A\x17GROUP_ORDER_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ACOUNT_DESC\x10\x01\x12\x12\x0A\x0ELAST_SEEN_DESC\x10\x02\x12\x10\x0A\x0CCREATED_DESC\x10\x03\x12\x17\x0A\x13AFFECTED_USERS_DESC\x10\x042\xBC\x07\x0A\x11ErrorStatsService\x12\xA8\x02\x0A\x0EListGroupStats\x12B.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest\x1AC.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse\"\x8C\x01\xDAA\x17project_name,time_range\x82\xD3\xE4\x93\x02l\x12-/v1beta1/{project_name=projects/*}/groupStatsZ;\x129/v1beta1/{project_name=projects/*/locations/*}/groupStats\x12\x92\x02\x0A\x0AListEvents\x12>.google.devtools.clouderrorreporting.v1beta1.ListEventsRequest\x1A?.google.devtools.clouderrorreporting.v1beta1.ListEventsResponse\"\x82\x01\xDAA\x15project_name,group_id\x82\xD3\xE4\x93\x02d\x12)/v1beta1/{project_name=projects/*}/eventsZ7\x125/v1beta1/{project_name=projects/*/locations/*}/events\x12\x8E\x02\x0A\x0CDeleteEvents\x12@.google.devtools.clouderrorreporting.v1beta1.DeleteEventsRequest\x1AA.google.devtools.clouderrorreporting.v1beta1.DeleteEventsResponse\"y\xDAA\x0Cproject_name\x82\xD3\xE4\x93\x02d*)/v1beta1/{project_name=projects/*}/eventsZ7*5/v1beta1/{project_name=projects/*/locations/*}/events\x1AV\xCAA\"clouderrorreporting.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\x94\x02\x0A/com.google.devtools.clouderrorreporting.v1beta1B\x16ErrorStatsServiceProtoP\x01ZOcloud.google.com/go/errorreporting/apiv1beta1/errorreportingpb;errorreportingpb\xF8\x01\x01\xAA\x02#Google.Cloud.ErrorReporting.V1Beta1\xCA\x02#Google\\Cloud\\ErrorReporting\\V1beta1\xEA\x02&Google::Cloud::ErrorReporting::V1beta1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ReportErrorsService.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ReportErrorsService.php new file mode 100644 index 000000000000..b9c64ae90ea2 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ReportErrorsService.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + "\x0A\x95\x0B\x0AGgoogle/devtools/clouderrorreporting/v1beta1/report_errors_service.proto\x12+google.devtools.clouderrorreporting.v1beta1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A8google/devtools/clouderrorreporting/v1beta1/common.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB9\x01\x0A\x17ReportErrorEventRequest\x12I\x0A\x0Cproject_name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+cloudresourcemanager.googleapis.com/Project\x12S\x0A\x05event\x18\x02 \x01(\x0B2?.google.devtools.clouderrorreporting.v1beta1.ReportedErrorEventB\x03\xE0A\x02\"\x1A\x0A\x18ReportErrorEventResponse\"\x8B\x02\x0A\x12ReportedErrorEvent\x123\x0A\x0Aevent_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x01\x12Y\x0A\x0Fservice_context\x18\x02 \x01(\x0B2;.google.devtools.clouderrorreporting.v1beta1.ServiceContextB\x03\xE0A\x02\x12\x14\x0A\x07message\x18\x03 \x01(\x09B\x03\xE0A\x02\x12O\x0A\x07context\x18\x04 \x01(\x0B29.google.devtools.clouderrorreporting.v1beta1.ErrorContextB\x03\xE0A\x012\xE5\x02\x0A\x13ReportErrorsService\x12\xF5\x01\x0A\x10ReportErrorEvent\x12D.google.devtools.clouderrorreporting.v1beta1.ReportErrorEventRequest\x1AE.google.devtools.clouderrorreporting.v1beta1.ReportErrorEventResponse\"T\xDAA\x12project_name,event\x82\xD3\xE4\x93\x029\"0/v1beta1/{project_name=projects/*}/events:report:\x05event\x1AV\xCAA\"clouderrorreporting.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\x96\x02\x0A/com.google.devtools.clouderrorreporting.v1beta1B\x18ReportErrorsServiceProtoP\x01ZOcloud.google.com/go/errorreporting/apiv1beta1/errorreportingpb;errorreportingpb\xF8\x01\x01\xAA\x02#Google.Cloud.ErrorReporting.V1Beta1\xCA\x02#Google\\Cloud\\ErrorReporting\\V1beta1\xEA\x02&Google::Cloud::ErrorReporting::V1beta1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php new file mode 100644 index 000000000000..9d8ea289b591 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php @@ -0,0 +1,128 @@ +google.devtools.clouderrorreporting.v1beta1.DeleteEventsRequest + */ +class DeleteEventsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, + * where `{projectID}` is the [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is + * a Cloud region. + * Examples: `projects/my-project-123`, + * `projects/my-project-123/locations/global`. + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $project_name = ''; + + /** + * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, + * where `{projectID}` is the [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is + * a Cloud region. + * + * Examples: `projects/my-project-123`, + * `projects/my-project-123/locations/global`. + * + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. Please see + * {@see ErrorStatsServiceClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\ErrorReporting\V1beta1\DeleteEventsRequest + * + * @experimental + */ + public static function build(string $projectName): self + { + return (new self()) + ->setProjectName($projectName); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_name + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, + * where `{projectID}` is the [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is + * a Cloud region. + * Examples: `projects/my-project-123`, + * `projects/my-project-123/locations/global`. + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, + * where `{projectID}` is the [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is + * a Cloud region. + * Examples: `projects/my-project-123`, + * `projects/my-project-123/locations/global`. + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getProjectName() + { + return $this->project_name; + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, + * where `{projectID}` is the [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is + * a Cloud region. + * Examples: `projects/my-project-123`, + * `projects/my-project-123/locations/global`. + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProjectName($var) + { + GPBUtil::checkString($var, True); + $this->project_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php new file mode 100644 index 000000000000..6fb5c40484e0 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php @@ -0,0 +1,33 @@ +google.devtools.clouderrorreporting.v1beta1.DeleteEventsResponse + */ +class DeleteEventsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php new file mode 100644 index 000000000000..306dad0bd7db --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php @@ -0,0 +1,206 @@ +google.devtools.clouderrorreporting.v1beta1.ErrorContext + */ +class ErrorContext extends \Google\Protobuf\Internal\Message +{ + /** + * The HTTP request which was processed when the error was + * triggered. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1; + */ + protected $http_request = null; + /** + * The user who caused or was affected by the crash. + * This can be a user ID, an email address, or an arbitrary token that + * uniquely identifies the user. + * When sending an error report, leave this field empty if the user was not + * logged in. In this case the + * Error Reporting system will use other data, such as remote IP address, to + * distinguish affected users. See `affected_users_count` in + * `ErrorGroupStats`. + * + * Generated from protobuf field string user = 2; + */ + protected $user = ''; + /** + * The location in the source code where the decision was made to + * report the error, usually the place where it was logged. + * For a logged exception this would be the source line where the + * exception is logged, usually close to the place where it was + * caught. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.SourceLocation report_location = 3; + */ + protected $report_location = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext $http_request + * The HTTP request which was processed when the error was + * triggered. + * @type string $user + * The user who caused or was affected by the crash. + * This can be a user ID, an email address, or an arbitrary token that + * uniquely identifies the user. + * When sending an error report, leave this field empty if the user was not + * logged in. In this case the + * Error Reporting system will use other data, such as remote IP address, to + * distinguish affected users. See `affected_users_count` in + * `ErrorGroupStats`. + * @type \Google\Cloud\ErrorReporting\V1beta1\SourceLocation $report_location + * The location in the source code where the decision was made to + * report the error, usually the place where it was logged. + * For a logged exception this would be the source line where the + * exception is logged, usually close to the place where it was + * caught. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The HTTP request which was processed when the error was + * triggered. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1; + * @return \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext|null + */ + public function getHttpRequest() + { + return $this->http_request; + } + + public function hasHttpRequest() + { + return isset($this->http_request); + } + + public function clearHttpRequest() + { + unset($this->http_request); + } + + /** + * The HTTP request which was processed when the error was + * triggered. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1; + * @param \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext $var + * @return $this + */ + public function setHttpRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext::class); + $this->http_request = $var; + + return $this; + } + + /** + * The user who caused or was affected by the crash. + * This can be a user ID, an email address, or an arbitrary token that + * uniquely identifies the user. + * When sending an error report, leave this field empty if the user was not + * logged in. In this case the + * Error Reporting system will use other data, such as remote IP address, to + * distinguish affected users. See `affected_users_count` in + * `ErrorGroupStats`. + * + * Generated from protobuf field string user = 2; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * The user who caused or was affected by the crash. + * This can be a user ID, an email address, or an arbitrary token that + * uniquely identifies the user. + * When sending an error report, leave this field empty if the user was not + * logged in. In this case the + * Error Reporting system will use other data, such as remote IP address, to + * distinguish affected users. See `affected_users_count` in + * `ErrorGroupStats`. + * + * Generated from protobuf field string user = 2; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * The location in the source code where the decision was made to + * report the error, usually the place where it was logged. + * For a logged exception this would be the source line where the + * exception is logged, usually close to the place where it was + * caught. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.SourceLocation report_location = 3; + * @return \Google\Cloud\ErrorReporting\V1beta1\SourceLocation|null + */ + public function getReportLocation() + { + return $this->report_location; + } + + public function hasReportLocation() + { + return isset($this->report_location); + } + + public function clearReportLocation() + { + unset($this->report_location); + } + + /** + * The location in the source code where the decision was made to + * report the error, usually the place where it was logged. + * For a logged exception this would be the source line where the + * exception is logged, usually close to the place where it was + * caught. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.SourceLocation report_location = 3; + * @param \Google\Cloud\ErrorReporting\V1beta1\SourceLocation $var + * @return $this + */ + public function setReportLocation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\SourceLocation::class); + $this->report_location = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php new file mode 100644 index 000000000000..ce67ba92a10c --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php @@ -0,0 +1,207 @@ +google.devtools.clouderrorreporting.v1beta1.ErrorEvent + */ +class ErrorEvent extends \Google\Protobuf\Internal\Message +{ + /** + * Time when the event occurred as provided in the error report. + * If the report did not contain a timestamp, the time the error was received + * by the Error Reporting system is used. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1; + */ + protected $event_time = null; + /** + * The `ServiceContext` for which this error was reported. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2; + */ + protected $service_context = null; + /** + * The stack trace that was reported or logged by the service. + * + * Generated from protobuf field string message = 3; + */ + protected $message = ''; + /** + * Data about the context in which the error occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5; + */ + protected $context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $event_time + * Time when the event occurred as provided in the error report. + * If the report did not contain a timestamp, the time the error was received + * by the Error Reporting system is used. + * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $service_context + * The `ServiceContext` for which this error was reported. + * @type string $message + * The stack trace that was reported or logged by the service. + * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $context + * Data about the context in which the error occurred. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Time when the event occurred as provided in the error report. + * If the report did not contain a timestamp, the time the error was received + * by the Error Reporting system is used. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEventTime() + { + return $this->event_time; + } + + public function hasEventTime() + { + return isset($this->event_time); + } + + public function clearEventTime() + { + unset($this->event_time); + } + + /** + * Time when the event occurred as provided in the error report. + * If the report did not contain a timestamp, the time the error was received + * by the Error Reporting system is used. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->event_time = $var; + + return $this; + } + + /** + * The `ServiceContext` for which this error was reported. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2; + * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContext|null + */ + public function getServiceContext() + { + return $this->service_context; + } + + public function hasServiceContext() + { + return isset($this->service_context); + } + + public function clearServiceContext() + { + unset($this->service_context); + } + + /** + * The `ServiceContext` for which this error was reported. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2; + * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $var + * @return $this + */ + public function setServiceContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); + $this->service_context = $var; + + return $this; + } + + /** + * The stack trace that was reported or logged by the service. + * + * Generated from protobuf field string message = 3; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * The stack trace that was reported or logged by the service. + * + * Generated from protobuf field string message = 3; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Data about the context in which the error occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5; + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorContext|null + */ + public function getContext() + { + return $this->context; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * Data about the context in which the error occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5; + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorContext::class); + $this->context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php new file mode 100644 index 000000000000..2cdcc20d9fa9 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php @@ -0,0 +1,245 @@ +google.devtools.clouderrorreporting.v1beta1.ErrorGroup + */ +class ErrorGroup extends \Google\Protobuf\Internal\Message +{ + /** + * The group resource name. + * Written as `projects/{projectID}/groups/{group_id}` or + * `projects/{projectID}/locations/{location}/groups/{group_id}` + * Examples: `projects/my-project-123/groups/my-group`, + * `projects/my-project-123/locations/us-central1/groups/my-group` + * In the group resource name, the `group_id` is a unique identifier for a + * particular error group. The identifier is derived from key parts of the + * error-log content and is treated as Service Data. For information about + * how Service Data is handled, see [Google Cloud Privacy + * Notice](https://cloud.google.com/terms/cloud-privacy-notice). + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * An opaque identifier of the group. This field is assigned by the Error + * Reporting system and always populated. + * In the group resource name, the `group_id` is a unique identifier for a + * particular error group. The identifier is derived from key parts of the + * error-log content and is treated as Service Data. For information about + * how Service Data is handled, see [Google Cloud Privacy + * Notice](https://cloud.google.com/terms/cloud-privacy-notice). + * + * Generated from protobuf field string group_id = 2; + */ + protected $group_id = ''; + /** + * Associated tracking issues. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3; + */ + private $tracking_issues; + /** + * Error group's resolution status. + * An unspecified resolution status will be interpreted as OPEN + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; + */ + protected $resolution_status = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The group resource name. + * Written as `projects/{projectID}/groups/{group_id}` or + * `projects/{projectID}/locations/{location}/groups/{group_id}` + * Examples: `projects/my-project-123/groups/my-group`, + * `projects/my-project-123/locations/us-central1/groups/my-group` + * In the group resource name, the `group_id` is a unique identifier for a + * particular error group. The identifier is derived from key parts of the + * error-log content and is treated as Service Data. For information about + * how Service Data is handled, see [Google Cloud Privacy + * Notice](https://cloud.google.com/terms/cloud-privacy-notice). + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. + * @type string $group_id + * An opaque identifier of the group. This field is assigned by the Error + * Reporting system and always populated. + * In the group resource name, the `group_id` is a unique identifier for a + * particular error group. The identifier is derived from key parts of the + * error-log content and is treated as Service Data. For information about + * how Service Data is handled, see [Google Cloud Privacy + * Notice](https://cloud.google.com/terms/cloud-privacy-notice). + * @type \Google\Cloud\ErrorReporting\V1beta1\TrackingIssue[] $tracking_issues + * Associated tracking issues. + * @type int $resolution_status + * Error group's resolution status. + * An unspecified resolution status will be interpreted as OPEN + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The group resource name. + * Written as `projects/{projectID}/groups/{group_id}` or + * `projects/{projectID}/locations/{location}/groups/{group_id}` + * Examples: `projects/my-project-123/groups/my-group`, + * `projects/my-project-123/locations/us-central1/groups/my-group` + * In the group resource name, the `group_id` is a unique identifier for a + * particular error group. The identifier is derived from key parts of the + * error-log content and is treated as Service Data. For information about + * how Service Data is handled, see [Google Cloud Privacy + * Notice](https://cloud.google.com/terms/cloud-privacy-notice). + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The group resource name. + * Written as `projects/{projectID}/groups/{group_id}` or + * `projects/{projectID}/locations/{location}/groups/{group_id}` + * Examples: `projects/my-project-123/groups/my-group`, + * `projects/my-project-123/locations/us-central1/groups/my-group` + * In the group resource name, the `group_id` is a unique identifier for a + * particular error group. The identifier is derived from key parts of the + * error-log content and is treated as Service Data. For information about + * how Service Data is handled, see [Google Cloud Privacy + * Notice](https://cloud.google.com/terms/cloud-privacy-notice). + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. + * + * 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; + } + + /** + * An opaque identifier of the group. This field is assigned by the Error + * Reporting system and always populated. + * In the group resource name, the `group_id` is a unique identifier for a + * particular error group. The identifier is derived from key parts of the + * error-log content and is treated as Service Data. For information about + * how Service Data is handled, see [Google Cloud Privacy + * Notice](https://cloud.google.com/terms/cloud-privacy-notice). + * + * Generated from protobuf field string group_id = 2; + * @return string + */ + public function getGroupId() + { + return $this->group_id; + } + + /** + * An opaque identifier of the group. This field is assigned by the Error + * Reporting system and always populated. + * In the group resource name, the `group_id` is a unique identifier for a + * particular error group. The identifier is derived from key parts of the + * error-log content and is treated as Service Data. For information about + * how Service Data is handled, see [Google Cloud Privacy + * Notice](https://cloud.google.com/terms/cloud-privacy-notice). + * + * Generated from protobuf field string group_id = 2; + * @param string $var + * @return $this + */ + public function setGroupId($var) + { + GPBUtil::checkString($var, True); + $this->group_id = $var; + + return $this; + } + + /** + * Associated tracking issues. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3; + * @return RepeatedField<\Google\Cloud\ErrorReporting\V1beta1\TrackingIssue> + */ + public function getTrackingIssues() + { + return $this->tracking_issues; + } + + /** + * Associated tracking issues. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3; + * @param \Google\Cloud\ErrorReporting\V1beta1\TrackingIssue[] $var + * @return $this + */ + public function setTrackingIssues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\TrackingIssue::class); + $this->tracking_issues = $arr; + + return $this; + } + + /** + * Error group's resolution status. + * An unspecified resolution status will be interpreted as OPEN + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; + * @return int + */ + public function getResolutionStatus() + { + return $this->resolution_status; + } + + /** + * Error group's resolution status. + * An unspecified resolution status will be interpreted as OPEN + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; + * @param int $var + * @return $this + */ + public function setResolutionStatus($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\ResolutionStatus::class); + $this->resolution_status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php new file mode 100644 index 000000000000..fd726de75f01 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php @@ -0,0 +1,76 @@ +google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder + */ +class ErrorGroupOrder +{ + /** + * No group order specified. + * + * Generated from protobuf enum GROUP_ORDER_UNSPECIFIED = 0; + */ + const GROUP_ORDER_UNSPECIFIED = 0; + /** + * Total count of errors in the given time window in descending order. + * + * Generated from protobuf enum COUNT_DESC = 1; + */ + const COUNT_DESC = 1; + /** + * Timestamp when the group was last seen in the given time window + * in descending order. + * + * Generated from protobuf enum LAST_SEEN_DESC = 2; + */ + const LAST_SEEN_DESC = 2; + /** + * Timestamp when the group was created in descending order. + * + * Generated from protobuf enum CREATED_DESC = 3; + */ + const CREATED_DESC = 3; + /** + * Number of affected users in the given time window in descending order. + * + * Generated from protobuf enum AFFECTED_USERS_DESC = 4; + */ + const AFFECTED_USERS_DESC = 4; + + private static $valueToName = [ + self::GROUP_ORDER_UNSPECIFIED => 'GROUP_ORDER_UNSPECIFIED', + self::COUNT_DESC => 'COUNT_DESC', + self::LAST_SEEN_DESC => 'LAST_SEEN_DESC', + self::CREATED_DESC => 'CREATED_DESC', + self::AFFECTED_USERS_DESC => 'AFFECTED_USERS_DESC', + ]; + + 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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php new file mode 100644 index 000000000000..d7cbbab95436 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php @@ -0,0 +1,492 @@ +google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats + */ +class ErrorGroupStats extends \Google\Protobuf\Internal\Message +{ + /** + * Group data that is independent of the filter criteria. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1; + */ + protected $group = null; + /** + * Approximate total number of events in the given group that match + * the filter criteria. + * + * Generated from protobuf field int64 count = 2; + */ + protected $count = 0; + /** + * Approximate number of affected users in the given group that + * match the filter criteria. + * Users are distinguished by data in the [ErrorContext] + * [google.devtools.clouderrorreporting.v1beta1.ErrorContext] of the + * individual error events, such as their login name or their remote + * IP address in case of HTTP requests. + * The number of affected users can be zero even if the number of + * errors is non-zero if no data was provided from which the + * affected user could be deduced. + * Users are counted based on data in the request + * context that was provided in the error report. If more users are + * implicitly affected, such as due to a crash of the whole service, + * this is not reflected here. + * + * Generated from protobuf field int64 affected_users_count = 3; + */ + protected $affected_users_count = 0; + /** + * Approximate number of occurrences over time. + * Timed counts returned by ListGroups are guaranteed to be: + * - Inside the requested time interval + * - Non-overlapping, and + * - Ordered by ascending time. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4; + */ + private $timed_counts; + /** + * Approximate first occurrence that was ever seen for this group + * and which matches the given filter criteria, ignoring the + * time_range that was specified in the request. + * + * Generated from protobuf field .google.protobuf.Timestamp first_seen_time = 5; + */ + protected $first_seen_time = null; + /** + * Approximate last occurrence that was ever seen for this group and + * which matches the given filter criteria, ignoring the time_range + * that was specified in the request. + * + * Generated from protobuf field .google.protobuf.Timestamp last_seen_time = 6; + */ + protected $last_seen_time = null; + /** + * Service contexts with a non-zero error count for the given filter + * criteria. This list can be truncated if multiple services are affected. + * Refer to `num_affected_services` for the total count. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7; + */ + private $affected_services; + /** + * The total number of services with a non-zero error count for the given + * filter criteria. + * + * Generated from protobuf field int32 num_affected_services = 8; + */ + protected $num_affected_services = 0; + /** + * An arbitrary event that is chosen as representative for the whole group. + * The representative event is intended to be used as a quick preview for + * the whole group. Events in the group are usually sufficiently similar + * to each other such that showing an arbitrary representative provides + * insight into the characteristics of the group as a whole. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9; + */ + protected $representative = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $group + * Group data that is independent of the filter criteria. + * @type int|string $count + * Approximate total number of events in the given group that match + * the filter criteria. + * @type int|string $affected_users_count + * Approximate number of affected users in the given group that + * match the filter criteria. + * Users are distinguished by data in the [ErrorContext] + * [google.devtools.clouderrorreporting.v1beta1.ErrorContext] of the + * individual error events, such as their login name or their remote + * IP address in case of HTTP requests. + * The number of affected users can be zero even if the number of + * errors is non-zero if no data was provided from which the + * affected user could be deduced. + * Users are counted based on data in the request + * context that was provided in the error report. If more users are + * implicitly affected, such as due to a crash of the whole service, + * this is not reflected here. + * @type \Google\Cloud\ErrorReporting\V1beta1\TimedCount[] $timed_counts + * Approximate number of occurrences over time. + * Timed counts returned by ListGroups are guaranteed to be: + * - Inside the requested time interval + * - Non-overlapping, and + * - Ordered by ascending time. + * @type \Google\Protobuf\Timestamp $first_seen_time + * Approximate first occurrence that was ever seen for this group + * and which matches the given filter criteria, ignoring the + * time_range that was specified in the request. + * @type \Google\Protobuf\Timestamp $last_seen_time + * Approximate last occurrence that was ever seen for this group and + * which matches the given filter criteria, ignoring the time_range + * that was specified in the request. + * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContext[] $affected_services + * Service contexts with a non-zero error count for the given filter + * criteria. This list can be truncated if multiple services are affected. + * Refer to `num_affected_services` for the total count. + * @type int $num_affected_services + * The total number of services with a non-zero error count for the given + * filter criteria. + * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent $representative + * An arbitrary event that is chosen as representative for the whole group. + * The representative event is intended to be used as a quick preview for + * the whole group. Events in the group are usually sufficiently similar + * to each other such that showing an arbitrary representative provides + * insight into the characteristics of the group as a whole. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Group data that is independent of the filter criteria. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1; + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup|null + */ + public function getGroup() + { + return $this->group; + } + + public function hasGroup() + { + return isset($this->group); + } + + public function clearGroup() + { + unset($this->group); + } + + /** + * Group data that is independent of the filter criteria. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1; + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup::class); + $this->group = $var; + + return $this; + } + + /** + * Approximate total number of events in the given group that match + * the filter criteria. + * + * Generated from protobuf field int64 count = 2; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * Approximate total number of events in the given group that match + * the filter criteria. + * + * Generated from protobuf field int64 count = 2; + * @param int|string $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt64($var); + $this->count = $var; + + return $this; + } + + /** + * Approximate number of affected users in the given group that + * match the filter criteria. + * Users are distinguished by data in the [ErrorContext] + * [google.devtools.clouderrorreporting.v1beta1.ErrorContext] of the + * individual error events, such as their login name or their remote + * IP address in case of HTTP requests. + * The number of affected users can be zero even if the number of + * errors is non-zero if no data was provided from which the + * affected user could be deduced. + * Users are counted based on data in the request + * context that was provided in the error report. If more users are + * implicitly affected, such as due to a crash of the whole service, + * this is not reflected here. + * + * Generated from protobuf field int64 affected_users_count = 3; + * @return int|string + */ + public function getAffectedUsersCount() + { + return $this->affected_users_count; + } + + /** + * Approximate number of affected users in the given group that + * match the filter criteria. + * Users are distinguished by data in the [ErrorContext] + * [google.devtools.clouderrorreporting.v1beta1.ErrorContext] of the + * individual error events, such as their login name or their remote + * IP address in case of HTTP requests. + * The number of affected users can be zero even if the number of + * errors is non-zero if no data was provided from which the + * affected user could be deduced. + * Users are counted based on data in the request + * context that was provided in the error report. If more users are + * implicitly affected, such as due to a crash of the whole service, + * this is not reflected here. + * + * Generated from protobuf field int64 affected_users_count = 3; + * @param int|string $var + * @return $this + */ + public function setAffectedUsersCount($var) + { + GPBUtil::checkInt64($var); + $this->affected_users_count = $var; + + return $this; + } + + /** + * Approximate number of occurrences over time. + * Timed counts returned by ListGroups are guaranteed to be: + * - Inside the requested time interval + * - Non-overlapping, and + * - Ordered by ascending time. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4; + * @return RepeatedField<\Google\Cloud\ErrorReporting\V1beta1\TimedCount> + */ + public function getTimedCounts() + { + return $this->timed_counts; + } + + /** + * Approximate number of occurrences over time. + * Timed counts returned by ListGroups are guaranteed to be: + * - Inside the requested time interval + * - Non-overlapping, and + * - Ordered by ascending time. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4; + * @param \Google\Cloud\ErrorReporting\V1beta1\TimedCount[] $var + * @return $this + */ + public function setTimedCounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\TimedCount::class); + $this->timed_counts = $arr; + + return $this; + } + + /** + * Approximate first occurrence that was ever seen for this group + * and which matches the given filter criteria, ignoring the + * time_range that was specified in the request. + * + * Generated from protobuf field .google.protobuf.Timestamp first_seen_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getFirstSeenTime() + { + return $this->first_seen_time; + } + + public function hasFirstSeenTime() + { + return isset($this->first_seen_time); + } + + public function clearFirstSeenTime() + { + unset($this->first_seen_time); + } + + /** + * Approximate first occurrence that was ever seen for this group + * and which matches the given filter criteria, ignoring the + * time_range that was specified in the request. + * + * Generated from protobuf field .google.protobuf.Timestamp first_seen_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setFirstSeenTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->first_seen_time = $var; + + return $this; + } + + /** + * Approximate last occurrence that was ever seen for this group and + * which matches the given filter criteria, ignoring the time_range + * that was specified in the request. + * + * Generated from protobuf field .google.protobuf.Timestamp last_seen_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastSeenTime() + { + return $this->last_seen_time; + } + + public function hasLastSeenTime() + { + return isset($this->last_seen_time); + } + + public function clearLastSeenTime() + { + unset($this->last_seen_time); + } + + /** + * Approximate last occurrence that was ever seen for this group and + * which matches the given filter criteria, ignoring the time_range + * that was specified in the request. + * + * Generated from protobuf field .google.protobuf.Timestamp last_seen_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastSeenTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_seen_time = $var; + + return $this; + } + + /** + * Service contexts with a non-zero error count for the given filter + * criteria. This list can be truncated if multiple services are affected. + * Refer to `num_affected_services` for the total count. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7; + * @return RepeatedField<\Google\Cloud\ErrorReporting\V1beta1\ServiceContext> + */ + public function getAffectedServices() + { + return $this->affected_services; + } + + /** + * Service contexts with a non-zero error count for the given filter + * criteria. This list can be truncated if multiple services are affected. + * Refer to `num_affected_services` for the total count. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7; + * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContext[] $var + * @return $this + */ + public function setAffectedServices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); + $this->affected_services = $arr; + + return $this; + } + + /** + * The total number of services with a non-zero error count for the given + * filter criteria. + * + * Generated from protobuf field int32 num_affected_services = 8; + * @return int + */ + public function getNumAffectedServices() + { + return $this->num_affected_services; + } + + /** + * The total number of services with a non-zero error count for the given + * filter criteria. + * + * Generated from protobuf field int32 num_affected_services = 8; + * @param int $var + * @return $this + */ + public function setNumAffectedServices($var) + { + GPBUtil::checkInt32($var); + $this->num_affected_services = $var; + + return $this; + } + + /** + * An arbitrary event that is chosen as representative for the whole group. + * The representative event is intended to be used as a quick preview for + * the whole group. Events in the group are usually sufficiently similar + * to each other such that showing an arbitrary representative provides + * insight into the characteristics of the group as a whole. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9; + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent|null + */ + public function getRepresentative() + { + return $this->representative; + } + + public function hasRepresentative() + { + return isset($this->representative); + } + + public function clearRepresentative() + { + unset($this->representative); + } + + /** + * An arbitrary event that is chosen as representative for the whole group. + * The representative event is intended to be used as a quick preview for + * the whole group. Events in the group are usually sufficiently similar + * to each other such that showing an arbitrary representative provides + * insight into the characteristics of the group as a whole. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9; + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent $var + * @return $this + */ + public function setRepresentative($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent::class); + $this->representative = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php new file mode 100644 index 000000000000..1c1331021d26 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php @@ -0,0 +1,159 @@ +google.devtools.clouderrorreporting.v1beta1.GetGroupRequest + */ +class GetGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The group resource name. Written as either + * `projects/{projectID}/groups/{group_id}` or + * `projects/{projectID}/locations/{location}/groups/{group_id}`. Call + * [groupStats.list] + * [google.devtools.clouderrorreporting.v1beta1.ErrorStatsService.ListGroupStats] + * to return a list of groups belonging to this project. + * Examples: `projects/my-project-123/groups/my-group`, + * `projects/my-project-123/locations/global/groups/my-group` + * In the group resource name, the `group_id` is a unique identifier for a + * particular error group. The identifier is derived from key parts of the + * error-log content and is treated as Service Data. For information about + * how Service Data is handled, see [Google Cloud Privacy + * Notice](https://cloud.google.com/terms/cloud-privacy-notice). + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. + * + * Generated from protobuf field string group_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $group_name = ''; + + /** + * @param string $groupName Required. The group resource name. Written as either + * `projects/{projectID}/groups/{group_id}` or + * `projects/{projectID}/locations/{location}/groups/{group_id}`. Call + * [groupStats.list] + * [google.devtools.clouderrorreporting.v1beta1.ErrorStatsService.ListGroupStats] + * to return a list of groups belonging to this project. + * + * Examples: `projects/my-project-123/groups/my-group`, + * `projects/my-project-123/locations/global/groups/my-group` + * + * In the group resource name, the `group_id` is a unique identifier for a + * particular error group. The identifier is derived from key parts of the + * error-log content and is treated as Service Data. For information about + * how Service Data is handled, see [Google Cloud Privacy + * Notice](https://cloud.google.com/terms/cloud-privacy-notice). + * + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. Please see + * {@see ErrorGroupServiceClient::errorGroupName()} for help formatting this field. + * + * @return \Google\Cloud\ErrorReporting\V1beta1\GetGroupRequest + * + * @experimental + */ + public static function build(string $groupName): self + { + return (new self()) + ->setGroupName($groupName); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $group_name + * Required. The group resource name. Written as either + * `projects/{projectID}/groups/{group_id}` or + * `projects/{projectID}/locations/{location}/groups/{group_id}`. Call + * [groupStats.list] + * [google.devtools.clouderrorreporting.v1beta1.ErrorStatsService.ListGroupStats] + * to return a list of groups belonging to this project. + * Examples: `projects/my-project-123/groups/my-group`, + * `projects/my-project-123/locations/global/groups/my-group` + * In the group resource name, the `group_id` is a unique identifier for a + * particular error group. The identifier is derived from key parts of the + * error-log content and is treated as Service Data. For information about + * how Service Data is handled, see [Google Cloud Privacy + * Notice](https://cloud.google.com/terms/cloud-privacy-notice). + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorGroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The group resource name. Written as either + * `projects/{projectID}/groups/{group_id}` or + * `projects/{projectID}/locations/{location}/groups/{group_id}`. Call + * [groupStats.list] + * [google.devtools.clouderrorreporting.v1beta1.ErrorStatsService.ListGroupStats] + * to return a list of groups belonging to this project. + * Examples: `projects/my-project-123/groups/my-group`, + * `projects/my-project-123/locations/global/groups/my-group` + * In the group resource name, the `group_id` is a unique identifier for a + * particular error group. The identifier is derived from key parts of the + * error-log content and is treated as Service Data. For information about + * how Service Data is handled, see [Google Cloud Privacy + * Notice](https://cloud.google.com/terms/cloud-privacy-notice). + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. + * + * Generated from protobuf field string group_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getGroupName() + { + return $this->group_name; + } + + /** + * Required. The group resource name. Written as either + * `projects/{projectID}/groups/{group_id}` or + * `projects/{projectID}/locations/{location}/groups/{group_id}`. Call + * [groupStats.list] + * [google.devtools.clouderrorreporting.v1beta1.ErrorStatsService.ListGroupStats] + * to return a list of groups belonging to this project. + * Examples: `projects/my-project-123/groups/my-group`, + * `projects/my-project-123/locations/global/groups/my-group` + * In the group resource name, the `group_id` is a unique identifier for a + * particular error group. The identifier is derived from key parts of the + * error-log content and is treated as Service Data. For information about + * how Service Data is handled, see [Google Cloud Privacy + * Notice](https://cloud.google.com/terms/cloud-privacy-notice). + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. + * + * Generated from protobuf field string group_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setGroupName($var) + { + GPBUtil::checkString($var, True); + $this->group_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php new file mode 100644 index 000000000000..f77253422435 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php @@ -0,0 +1,252 @@ +google.devtools.clouderrorreporting.v1beta1.HttpRequestContext + */ +class HttpRequestContext extends \Google\Protobuf\Internal\Message +{ + /** + * The type of HTTP request, such as `GET`, `POST`, etc. + * + * Generated from protobuf field string method = 1; + */ + protected $method = ''; + /** + * The URL of the request. + * + * Generated from protobuf field string url = 2; + */ + protected $url = ''; + /** + * The user agent information that is provided with the request. + * + * Generated from protobuf field string user_agent = 3; + */ + protected $user_agent = ''; + /** + * The referrer information that is provided with the request. + * + * Generated from protobuf field string referrer = 4; + */ + protected $referrer = ''; + /** + * The HTTP response status code for the request. + * + * Generated from protobuf field int32 response_status_code = 5; + */ + protected $response_status_code = 0; + /** + * The IP address from which the request originated. + * This can be IPv4, IPv6, or a token which is derived from the + * IP address, depending on the data that has been provided + * in the error report. + * + * Generated from protobuf field string remote_ip = 6; + */ + protected $remote_ip = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $method + * The type of HTTP request, such as `GET`, `POST`, etc. + * @type string $url + * The URL of the request. + * @type string $user_agent + * The user agent information that is provided with the request. + * @type string $referrer + * The referrer information that is provided with the request. + * @type int $response_status_code + * The HTTP response status code for the request. + * @type string $remote_ip + * The IP address from which the request originated. + * This can be IPv4, IPv6, or a token which is derived from the + * IP address, depending on the data that has been provided + * in the error report. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The type of HTTP request, such as `GET`, `POST`, etc. + * + * Generated from protobuf field string method = 1; + * @return string + */ + public function getMethod() + { + return $this->method; + } + + /** + * The type of HTTP request, such as `GET`, `POST`, etc. + * + * Generated from protobuf field string method = 1; + * @param string $var + * @return $this + */ + public function setMethod($var) + { + GPBUtil::checkString($var, True); + $this->method = $var; + + return $this; + } + + /** + * The URL of the request. + * + * Generated from protobuf field string url = 2; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * The URL of the request. + * + * Generated from protobuf field string url = 2; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * The user agent information that is provided with the request. + * + * Generated from protobuf field string user_agent = 3; + * @return string + */ + public function getUserAgent() + { + return $this->user_agent; + } + + /** + * The user agent information that is provided with the request. + * + * Generated from protobuf field string user_agent = 3; + * @param string $var + * @return $this + */ + public function setUserAgent($var) + { + GPBUtil::checkString($var, True); + $this->user_agent = $var; + + return $this; + } + + /** + * The referrer information that is provided with the request. + * + * Generated from protobuf field string referrer = 4; + * @return string + */ + public function getReferrer() + { + return $this->referrer; + } + + /** + * The referrer information that is provided with the request. + * + * Generated from protobuf field string referrer = 4; + * @param string $var + * @return $this + */ + public function setReferrer($var) + { + GPBUtil::checkString($var, True); + $this->referrer = $var; + + return $this; + } + + /** + * The HTTP response status code for the request. + * + * Generated from protobuf field int32 response_status_code = 5; + * @return int + */ + public function getResponseStatusCode() + { + return $this->response_status_code; + } + + /** + * The HTTP response status code for the request. + * + * Generated from protobuf field int32 response_status_code = 5; + * @param int $var + * @return $this + */ + public function setResponseStatusCode($var) + { + GPBUtil::checkInt32($var); + $this->response_status_code = $var; + + return $this; + } + + /** + * The IP address from which the request originated. + * This can be IPv4, IPv6, or a token which is derived from the + * IP address, depending on the data that has been provided + * in the error report. + * + * Generated from protobuf field string remote_ip = 6; + * @return string + */ + public function getRemoteIp() + { + return $this->remote_ip; + } + + /** + * The IP address from which the request originated. + * This can be IPv4, IPv6, or a token which is derived from the + * IP address, depending on the data that has been provided + * in the error report. + * + * Generated from protobuf field string remote_ip = 6; + * @param string $var + * @return $this + */ + public function setRemoteIp($var) + { + GPBUtil::checkString($var, True); + $this->remote_ip = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php new file mode 100644 index 000000000000..3f44f5a95443 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php @@ -0,0 +1,361 @@ +google.devtools.clouderrorreporting.v1beta1.ListEventsRequest + */ +class ListEventsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, + * where `{projectID}` is the [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is + * a Cloud region. + * Examples: `projects/my-project-123`, + * `projects/my-project-123/locations/global`. + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $project_name = ''; + /** + * Required. The group for which events shall be returned. + * The `group_id` is a unique identifier for a particular error group. The + * identifier is derived from key parts of the error-log content and is + * treated as Service Data. For information about how Service Data + * is handled, see [Google Cloud Privacy + * Notice](https://cloud.google.com/terms/cloud-privacy-notice). + * + * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group_id = ''; + /** + * Optional. List only ErrorGroups which belong to a service context that + * matches the filter. + * Data for all service contexts is returned if this field is not specified. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_filter = null; + /** + * Optional. List only data for the given time range. + * If not set a default time range is used. The field time_range_begin + * in the response will specify the beginning of this time range. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $time_range = null; + /** + * Optional. The maximum number of results to return per response. + * + * Generated from protobuf field int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A `next_page_token` provided by a previous response. + * + * Generated from protobuf field string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, + * where `{projectID}` is the [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is + * a Cloud region. + * + * Examples: `projects/my-project-123`, + * `projects/my-project-123/locations/global`. + * + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. Please see + * {@see ErrorStatsServiceClient::projectName()} for help formatting this field. + * @param string $groupId Required. The group for which events shall be returned. + * The `group_id` is a unique identifier for a particular error group. The + * identifier is derived from key parts of the error-log content and is + * treated as Service Data. For information about how Service Data + * is handled, see [Google Cloud Privacy + * Notice](https://cloud.google.com/terms/cloud-privacy-notice). + * + * @return \Google\Cloud\ErrorReporting\V1beta1\ListEventsRequest + * + * @experimental + */ + public static function build(string $projectName, string $groupId): self + { + return (new self()) + ->setProjectName($projectName) + ->setGroupId($groupId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_name + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, + * where `{projectID}` is the [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is + * a Cloud region. + * Examples: `projects/my-project-123`, + * `projects/my-project-123/locations/global`. + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. + * @type string $group_id + * Required. The group for which events shall be returned. + * The `group_id` is a unique identifier for a particular error group. The + * identifier is derived from key parts of the error-log content and is + * treated as Service Data. For information about how Service Data + * is handled, see [Google Cloud Privacy + * Notice](https://cloud.google.com/terms/cloud-privacy-notice). + * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $service_filter + * Optional. List only ErrorGroups which belong to a service context that + * matches the filter. + * Data for all service contexts is returned if this field is not specified. + * @type \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $time_range + * Optional. List only data for the given time range. + * If not set a default time range is used. The field time_range_begin + * in the response will specify the beginning of this time range. + * @type int $page_size + * Optional. The maximum number of results to return per response. + * @type string $page_token + * Optional. A `next_page_token` provided by a previous response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, + * where `{projectID}` is the [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is + * a Cloud region. + * Examples: `projects/my-project-123`, + * `projects/my-project-123/locations/global`. + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getProjectName() + { + return $this->project_name; + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, + * where `{projectID}` is the [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is + * a Cloud region. + * Examples: `projects/my-project-123`, + * `projects/my-project-123/locations/global`. + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProjectName($var) + { + GPBUtil::checkString($var, True); + $this->project_name = $var; + + return $this; + } + + /** + * Required. The group for which events shall be returned. + * The `group_id` is a unique identifier for a particular error group. The + * identifier is derived from key parts of the error-log content and is + * treated as Service Data. For information about how Service Data + * is handled, see [Google Cloud Privacy + * Notice](https://cloud.google.com/terms/cloud-privacy-notice). + * + * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGroupId() + { + return $this->group_id; + } + + /** + * Required. The group for which events shall be returned. + * The `group_id` is a unique identifier for a particular error group. The + * identifier is derived from key parts of the error-log content and is + * treated as Service Data. For information about how Service Data + * is handled, see [Google Cloud Privacy + * Notice](https://cloud.google.com/terms/cloud-privacy-notice). + * + * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGroupId($var) + { + GPBUtil::checkString($var, True); + $this->group_id = $var; + + return $this; + } + + /** + * Optional. List only ErrorGroups which belong to a service context that + * matches the filter. + * Data for all service contexts is returned if this field is not specified. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter|null + */ + public function getServiceFilter() + { + return $this->service_filter; + } + + public function hasServiceFilter() + { + return isset($this->service_filter); + } + + public function clearServiceFilter() + { + unset($this->service_filter); + } + + /** + * Optional. List only ErrorGroups which belong to a service context that + * matches the filter. + * Data for all service contexts is returned if this field is not specified. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $var + * @return $this + */ + public function setServiceFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter::class); + $this->service_filter = $var; + + return $this; + } + + /** + * Optional. List only data for the given time range. + * If not set a default time range is used. The field time_range_begin + * in the response will specify the beginning of this time range. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange|null + */ + public function getTimeRange() + { + return $this->time_range; + } + + public function hasTimeRange() + { + return isset($this->time_range); + } + + public function clearTimeRange() + { + unset($this->time_range); + } + + /** + * Optional. List only data for the given time range. + * If not set a default time range is used. The field time_range_begin + * in the response will specify the beginning of this time range. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $var + * @return $this + */ + public function setTimeRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange::class); + $this->time_range = $var; + + return $this; + } + + /** + * Optional. The maximum number of results to return per response. + * + * Generated from protobuf field int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return per response. + * + * Generated from protobuf field int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A `next_page_token` provided by a previous response. + * + * Generated from protobuf field string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A `next_page_token` provided by a previous response. + * + * Generated from protobuf field string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php new file mode 100644 index 000000000000..511b515030c8 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php @@ -0,0 +1,153 @@ +google.devtools.clouderrorreporting.v1beta1.ListEventsResponse + */ +class ListEventsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The error events which match the given request. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorEvent error_events = 1; + */ + private $error_events; + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The timestamp specifies the start time to which the request was restricted. + * + * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; + */ + protected $time_range_begin = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent[] $error_events + * The error events which match the given request. + * @type string $next_page_token + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * @type \Google\Protobuf\Timestamp $time_range_begin + * The timestamp specifies the start time to which the request was restricted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * The error events which match the given request. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorEvent error_events = 1; + * @return RepeatedField<\Google\Cloud\ErrorReporting\V1beta1\ErrorEvent> + */ + public function getErrorEvents() + { + return $this->error_events; + } + + /** + * The error events which match the given request. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorEvent error_events = 1; + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent[] $var + * @return $this + */ + public function setErrorEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent::class); + $this->error_events = $arr; + + return $this; + } + + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view 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; + } + + /** + * The timestamp specifies the start time to which the request was restricted. + * + * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTimeRangeBegin() + { + return $this->time_range_begin; + } + + public function hasTimeRangeBegin() + { + return isset($this->time_range_begin); + } + + public function clearTimeRangeBegin() + { + unset($this->time_range_begin); + } + + /** + * The timestamp specifies the start time to which the request was restricted. + * + * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTimeRangeBegin($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->time_range_begin = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php new file mode 100644 index 000000000000..ec0d47f0af44 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php @@ -0,0 +1,638 @@ +google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest + */ +class ListGroupStatsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectNumber}`, where + * `{projectID}` and `{projectNumber}` can be found in the + * [Google Cloud console](https://support.google.com/cloud/answer/6158840). + * It may also include a location, such as + * `projects/{projectID}/locations/{location}` where `{location}` is a cloud + * region. + * Examples: `projects/my-project-123`, `projects/5551234`, + * `projects/my-project-123/locations/us-central1`, + * `projects/5551234/locations/us-central1`. + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. Use `-` as a wildcard to request group stats + * from all regions. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $project_name = ''; + /** + * Optional. List all [ErrorGroupStats] + * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with these + * IDs. The `group_id` is a unique identifier for a particular error group. + * The identifier is derived from key parts of the error-log content and is + * treated as Service Data. For information about how Service Data + * is handled, see [Google Cloud Privacy Notice] + * (https://cloud.google.com/terms/cloud-privacy-notice). + * + * Generated from protobuf field repeated string group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $group_id; + /** + * Optional. List only [ErrorGroupStats] + * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] which belong + * to a service context that matches the filter. Data for all service contexts + * is returned if this field is not specified. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service_filter = null; + /** + * Optional. List data for the given time range. + * If not set, a default time range is used. The field + * [time_range_begin] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.time_range_begin] + * in the response will specify the beginning of this time range. Only + * [ErrorGroupStats] + * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with a + * non-zero count in the given time range are returned, unless the request + * contains an explicit [group_id] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] + * list. If a [group_id] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] + * list is given, also [ErrorGroupStats] + * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with zero + * occurrences are returned. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $time_range = null; + /** + * Optional. The preferred duration for a single returned [TimedCount] + * [google.devtools.clouderrorreporting.v1beta1.TimedCount]. If not set, no + * timed counts are returned. + * + * Generated from protobuf field .google.protobuf.Duration timed_count_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $timed_count_duration = null; + /** + * Optional. The alignment of the timed counts to be returned. + * Default is `ALIGNMENT_EQUAL_AT_END`. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $alignment = 0; + /** + * Optional. Time where the timed counts shall be aligned if rounded + * alignment is chosen. Default is 00:00 UTC. + * + * Generated from protobuf field .google.protobuf.Timestamp alignment_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $alignment_time = null; + /** + * Optional. The sort order in which the results are returned. + * Default is `COUNT_DESC`. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order = 0; + /** + * Optional. The maximum number of results to return per response. + * Default is 20. + * + * Generated from protobuf field int32 page_size = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A [next_page_token] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.next_page_token] + * provided by a previous response. To view additional results, pass this + * token along with the identical query parameters as the first request. + * + * Generated from protobuf field string page_token = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectNumber}`, where + * `{projectID}` and `{projectNumber}` can be found in the + * [Google Cloud console](https://support.google.com/cloud/answer/6158840). + * It may also include a location, such as + * `projects/{projectID}/locations/{location}` where `{location}` is a cloud + * region. + * + * Examples: `projects/my-project-123`, `projects/5551234`, + * `projects/my-project-123/locations/us-central1`, + * `projects/5551234/locations/us-central1`. + * + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. Use `-` as a wildcard to request group stats + * from all regions. Please see + * {@see ErrorStatsServiceClient::projectName()} for help formatting this field. + * @param \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $timeRange Optional. List data for the given time range. + * If not set, a default time range is used. The field + * [time_range_begin] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.time_range_begin] + * in the response will specify the beginning of this time range. Only + * [ErrorGroupStats] + * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with a + * non-zero count in the given time range are returned, unless the request + * contains an explicit [group_id] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] + * list. If a [group_id] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] + * list is given, also [ErrorGroupStats] + * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with zero + * occurrences are returned. + * + * @return \Google\Cloud\ErrorReporting\V1beta1\ListGroupStatsRequest + * + * @experimental + */ + public static function build(string $projectName, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $timeRange): self + { + return (new self()) + ->setProjectName($projectName) + ->setTimeRange($timeRange); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_name + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectNumber}`, where + * `{projectID}` and `{projectNumber}` can be found in the + * [Google Cloud console](https://support.google.com/cloud/answer/6158840). + * It may also include a location, such as + * `projects/{projectID}/locations/{location}` where `{location}` is a cloud + * region. + * Examples: `projects/my-project-123`, `projects/5551234`, + * `projects/my-project-123/locations/us-central1`, + * `projects/5551234/locations/us-central1`. + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. Use `-` as a wildcard to request group stats + * from all regions. + * @type string[] $group_id + * Optional. List all [ErrorGroupStats] + * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with these + * IDs. The `group_id` is a unique identifier for a particular error group. + * The identifier is derived from key parts of the error-log content and is + * treated as Service Data. For information about how Service Data + * is handled, see [Google Cloud Privacy Notice] + * (https://cloud.google.com/terms/cloud-privacy-notice). + * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $service_filter + * Optional. List only [ErrorGroupStats] + * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] which belong + * to a service context that matches the filter. Data for all service contexts + * is returned if this field is not specified. + * @type \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $time_range + * Optional. List data for the given time range. + * If not set, a default time range is used. The field + * [time_range_begin] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.time_range_begin] + * in the response will specify the beginning of this time range. Only + * [ErrorGroupStats] + * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with a + * non-zero count in the given time range are returned, unless the request + * contains an explicit [group_id] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] + * list. If a [group_id] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] + * list is given, also [ErrorGroupStats] + * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with zero + * occurrences are returned. + * @type \Google\Protobuf\Duration $timed_count_duration + * Optional. The preferred duration for a single returned [TimedCount] + * [google.devtools.clouderrorreporting.v1beta1.TimedCount]. If not set, no + * timed counts are returned. + * @type int $alignment + * Optional. The alignment of the timed counts to be returned. + * Default is `ALIGNMENT_EQUAL_AT_END`. + * @type \Google\Protobuf\Timestamp $alignment_time + * Optional. Time where the timed counts shall be aligned if rounded + * alignment is chosen. Default is 00:00 UTC. + * @type int $order + * Optional. The sort order in which the results are returned. + * Default is `COUNT_DESC`. + * @type int $page_size + * Optional. The maximum number of results to return per response. + * Default is 20. + * @type string $page_token + * Optional. A [next_page_token] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.next_page_token] + * provided by a previous response. To view additional results, pass this + * token along with the identical query parameters as the first request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectNumber}`, where + * `{projectID}` and `{projectNumber}` can be found in the + * [Google Cloud console](https://support.google.com/cloud/answer/6158840). + * It may also include a location, such as + * `projects/{projectID}/locations/{location}` where `{location}` is a cloud + * region. + * Examples: `projects/my-project-123`, `projects/5551234`, + * `projects/my-project-123/locations/us-central1`, + * `projects/5551234/locations/us-central1`. + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. Use `-` as a wildcard to request group stats + * from all regions. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getProjectName() + { + return $this->project_name; + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectID}` or `projects/{projectNumber}`, where + * `{projectID}` and `{projectNumber}` can be found in the + * [Google Cloud console](https://support.google.com/cloud/answer/6158840). + * It may also include a location, such as + * `projects/{projectID}/locations/{location}` where `{location}` is a cloud + * region. + * Examples: `projects/my-project-123`, `projects/5551234`, + * `projects/my-project-123/locations/us-central1`, + * `projects/5551234/locations/us-central1`. + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support). `global` is + * the default when unspecified. Use `-` as a wildcard to request group stats + * from all regions. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProjectName($var) + { + GPBUtil::checkString($var, True); + $this->project_name = $var; + + return $this; + } + + /** + * Optional. List all [ErrorGroupStats] + * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with these + * IDs. The `group_id` is a unique identifier for a particular error group. + * The identifier is derived from key parts of the error-log content and is + * treated as Service Data. For information about how Service Data + * is handled, see [Google Cloud Privacy Notice] + * (https://cloud.google.com/terms/cloud-privacy-notice). + * + * Generated from protobuf field repeated string group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getGroupId() + { + return $this->group_id; + } + + /** + * Optional. List all [ErrorGroupStats] + * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with these + * IDs. The `group_id` is a unique identifier for a particular error group. + * The identifier is derived from key parts of the error-log content and is + * treated as Service Data. For information about how Service Data + * is handled, see [Google Cloud Privacy Notice] + * (https://cloud.google.com/terms/cloud-privacy-notice). + * + * Generated from protobuf field repeated string group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setGroupId($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->group_id = $arr; + + return $this; + } + + /** + * Optional. List only [ErrorGroupStats] + * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] which belong + * to a service context that matches the filter. Data for all service contexts + * is returned if this field is not specified. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter|null + */ + public function getServiceFilter() + { + return $this->service_filter; + } + + public function hasServiceFilter() + { + return isset($this->service_filter); + } + + public function clearServiceFilter() + { + unset($this->service_filter); + } + + /** + * Optional. List only [ErrorGroupStats] + * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] which belong + * to a service context that matches the filter. Data for all service contexts + * is returned if this field is not specified. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $var + * @return $this + */ + public function setServiceFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter::class); + $this->service_filter = $var; + + return $this; + } + + /** + * Optional. List data for the given time range. + * If not set, a default time range is used. The field + * [time_range_begin] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.time_range_begin] + * in the response will specify the beginning of this time range. Only + * [ErrorGroupStats] + * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with a + * non-zero count in the given time range are returned, unless the request + * contains an explicit [group_id] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] + * list. If a [group_id] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] + * list is given, also [ErrorGroupStats] + * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with zero + * occurrences are returned. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange|null + */ + public function getTimeRange() + { + return $this->time_range; + } + + public function hasTimeRange() + { + return isset($this->time_range); + } + + public function clearTimeRange() + { + unset($this->time_range); + } + + /** + * Optional. List data for the given time range. + * If not set, a default time range is used. The field + * [time_range_begin] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.time_range_begin] + * in the response will specify the beginning of this time range. Only + * [ErrorGroupStats] + * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with a + * non-zero count in the given time range are returned, unless the request + * contains an explicit [group_id] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] + * list. If a [group_id] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] + * list is given, also [ErrorGroupStats] + * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with zero + * occurrences are returned. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $var + * @return $this + */ + public function setTimeRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange::class); + $this->time_range = $var; + + return $this; + } + + /** + * Optional. The preferred duration for a single returned [TimedCount] + * [google.devtools.clouderrorreporting.v1beta1.TimedCount]. If not set, no + * timed counts are returned. + * + * Generated from protobuf field .google.protobuf.Duration timed_count_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getTimedCountDuration() + { + return $this->timed_count_duration; + } + + public function hasTimedCountDuration() + { + return isset($this->timed_count_duration); + } + + public function clearTimedCountDuration() + { + unset($this->timed_count_duration); + } + + /** + * Optional. The preferred duration for a single returned [TimedCount] + * [google.devtools.clouderrorreporting.v1beta1.TimedCount]. If not set, no + * timed counts are returned. + * + * Generated from protobuf field .google.protobuf.Duration timed_count_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimedCountDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timed_count_duration = $var; + + return $this; + } + + /** + * Optional. The alignment of the timed counts to be returned. + * Default is `ALIGNMENT_EQUAL_AT_END`. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getAlignment() + { + return $this->alignment; + } + + /** + * Optional. The alignment of the timed counts to be returned. + * Default is `ALIGNMENT_EQUAL_AT_END`. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setAlignment($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\TimedCountAlignment::class); + $this->alignment = $var; + + return $this; + } + + /** + * Optional. Time where the timed counts shall be aligned if rounded + * alignment is chosen. Default is 00:00 UTC. + * + * Generated from protobuf field .google.protobuf.Timestamp alignment_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getAlignmentTime() + { + return $this->alignment_time; + } + + public function hasAlignmentTime() + { + return isset($this->alignment_time); + } + + public function clearAlignmentTime() + { + unset($this->alignment_time); + } + + /** + * Optional. Time where the timed counts shall be aligned if rounded + * alignment is chosen. Default is 00:00 UTC. + * + * Generated from protobuf field .google.protobuf.Timestamp alignment_time = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setAlignmentTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->alignment_time = $var; + + return $this; + } + + /** + * Optional. The sort order in which the results are returned. + * Default is `COUNT_DESC`. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getOrder() + { + return $this->order; + } + + /** + * Optional. The sort order in which the results are returned. + * Default is `COUNT_DESC`. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setOrder($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupOrder::class); + $this->order = $var; + + return $this; + } + + /** + * Optional. The maximum number of results to return per response. + * Default is 20. + * + * Generated from protobuf field int32 page_size = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return per response. + * Default is 20. + * + * Generated from protobuf field int32 page_size = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A [next_page_token] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.next_page_token] + * provided by a previous response. To view additional results, pass this + * token along with the identical query parameters as the first request. + * + * Generated from protobuf field string page_token = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A [next_page_token] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.next_page_token] + * provided by a previous response. To view additional results, pass this + * token along with the identical query parameters as the first request. + * + * Generated from protobuf field string page_token = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php new file mode 100644 index 000000000000..fd7da35d035c --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php @@ -0,0 +1,165 @@ +google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse + */ +class ListGroupStatsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The error group stats which match the given request. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats error_group_stats = 1; + */ + private $error_group_stats; + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The timestamp specifies the start time to which the request was restricted. + * The start time is set based on the requested time range. It may be adjusted + * to a later time if a project has exceeded the storage quota and older data + * has been deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; + */ + protected $time_range_begin = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats[] $error_group_stats + * The error group stats which match the given request. + * @type string $next_page_token + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * @type \Google\Protobuf\Timestamp $time_range_begin + * The timestamp specifies the start time to which the request was restricted. + * The start time is set based on the requested time range. It may be adjusted + * to a later time if a project has exceeded the storage quota and older data + * has been deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * The error group stats which match the given request. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats error_group_stats = 1; + * @return RepeatedField<\Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats> + */ + public function getErrorGroupStats() + { + return $this->error_group_stats; + } + + /** + * The error group stats which match the given request. + * + * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats error_group_stats = 1; + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats[] $var + * @return $this + */ + public function setErrorGroupStats($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats::class); + $this->error_group_stats = $arr; + + return $this; + } + + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view the next page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If non-empty, more results are available. + * Pass this token, along with the same query parameters as the first + * request, to view 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; + } + + /** + * The timestamp specifies the start time to which the request was restricted. + * The start time is set based on the requested time range. It may be adjusted + * to a later time if a project has exceeded the storage quota and older data + * has been deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTimeRangeBegin() + { + return $this->time_range_begin; + } + + public function hasTimeRangeBegin() + { + return isset($this->time_range_begin); + } + + public function clearTimeRangeBegin() + { + unset($this->time_range_begin); + } + + /** + * The timestamp specifies the start time to which the request was restricted. + * The start time is set based on the requested time range. It may be adjusted + * to a later time if a project has exceeded the storage quota and older data + * has been deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTimeRangeBegin($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->time_range_begin = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php new file mode 100644 index 000000000000..182c809c7075 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php @@ -0,0 +1,73 @@ +google.devtools.clouderrorreporting.v1beta1.QueryTimeRange + */ +class QueryTimeRange extends \Google\Protobuf\Internal\Message +{ + /** + * Restricts the query to the specified time range. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1; + */ + protected $period = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $period + * Restricts the query to the specified time range. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Restricts the query to the specified time range. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1; + * @return int + */ + public function getPeriod() + { + return $this->period; + } + + /** + * Restricts the query to the specified time range. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1; + * @param int $var + * @return $this + */ + public function setPeriod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange\Period::class); + $this->period = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php new file mode 100644 index 000000000000..cd961eda5830 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php @@ -0,0 +1,87 @@ +google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period + */ +class Period +{ + /** + * Do not use. + * + * Generated from protobuf enum PERIOD_UNSPECIFIED = 0; + */ + const PERIOD_UNSPECIFIED = 0; + /** + * Retrieve data for the last hour. + * Recommended minimum timed count duration: 1 min. + * + * Generated from protobuf enum PERIOD_1_HOUR = 1; + */ + const PERIOD_1_HOUR = 1; + /** + * Retrieve data for the last 6 hours. + * Recommended minimum timed count duration: 10 min. + * + * Generated from protobuf enum PERIOD_6_HOURS = 2; + */ + const PERIOD_6_HOURS = 2; + /** + * Retrieve data for the last day. + * Recommended minimum timed count duration: 1 hour. + * + * Generated from protobuf enum PERIOD_1_DAY = 3; + */ + const PERIOD_1_DAY = 3; + /** + * Retrieve data for the last week. + * Recommended minimum timed count duration: 6 hours. + * + * Generated from protobuf enum PERIOD_1_WEEK = 4; + */ + const PERIOD_1_WEEK = 4; + /** + * Retrieve data for the last 30 days. + * Recommended minimum timed count duration: 1 day. + * + * Generated from protobuf enum PERIOD_30_DAYS = 5; + */ + const PERIOD_30_DAYS = 5; + + private static $valueToName = [ + self::PERIOD_UNSPECIFIED => 'PERIOD_UNSPECIFIED', + self::PERIOD_1_HOUR => 'PERIOD_1_HOUR', + self::PERIOD_6_HOURS => 'PERIOD_6_HOURS', + self::PERIOD_1_DAY => 'PERIOD_1_DAY', + self::PERIOD_1_WEEK => 'PERIOD_1_WEEK', + self::PERIOD_30_DAYS => 'PERIOD_30_DAYS', + ]; + + 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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventRequest.php new file mode 100644 index 000000000000..35fd2ac21916 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventRequest.php @@ -0,0 +1,148 @@ +google.devtools.clouderrorreporting.v1beta1.ReportErrorEventRequest + */ +class ReportErrorEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectId}`, where `{projectId}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: // `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $project_name = ''; + /** + * Required. The error event to be reported. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent event = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $event = null; + + /** + * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectId}`, where `{projectId}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * + * Example: // `projects/my-project-123`. Please see + * {@see ReportErrorsServiceClient::projectName()} for help formatting this field. + * @param \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent $event Required. The error event to be reported. + * + * @return \Google\Cloud\ErrorReporting\V1beta1\ReportErrorEventRequest + * + * @experimental + */ + public static function build(string $projectName, \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent $event): self + { + return (new self()) + ->setProjectName($projectName) + ->setEvent($event); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_name + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectId}`, where `{projectId}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: // `projects/my-project-123`. + * @type \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent $event + * Required. The error event to be reported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ReportErrorsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectId}`, where `{projectId}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: // `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getProjectName() + { + return $this->project_name; + } + + /** + * Required. The resource name of the Google Cloud Platform project. Written + * as `projects/{projectId}`, where `{projectId}` is the + * [Google Cloud Platform project + * ID](https://support.google.com/cloud/answer/6158840). + * Example: // `projects/my-project-123`. + * + * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setProjectName($var) + { + GPBUtil::checkString($var, True); + $this->project_name = $var; + + return $this; + } + + /** + * Required. The error event to be reported. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent|null + */ + public function getEvent() + { + return $this->event; + } + + public function hasEvent() + { + return isset($this->event); + } + + public function clearEvent() + { + unset($this->event); + } + + /** + * Required. The error event to be reported. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent::class); + $this->event = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php new file mode 100644 index 000000000000..53165d85178d --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php @@ -0,0 +1,34 @@ +google.devtools.clouderrorreporting.v1beta1.ReportErrorEventResponse + */ +class ReportErrorEventResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ReportErrorsService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php new file mode 100644 index 000000000000..e593e184593a --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php @@ -0,0 +1,311 @@ +google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent + */ +class ReportedErrorEvent extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Time when the event occurred. + * If not provided, the time when the event was received by the + * Error Reporting system is used. If provided, the time must not + * exceed the [logs retention + * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in + * the past, or be more than 24 hours in the future. + * If an invalid time is provided, then an error is returned. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $event_time = null; + /** + * Required. The service context in which this error has occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $service_context = null; + /** + * Required. The error message. + * If no `context.reportLocation` is provided, the message must contain a + * header (typically consisting of the exception type name and an error + * message) and an exception stack trace in one of the supported programming + * languages and formats. + * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. + * Supported stack trace formats are: + * * **Java**: Must be the return value of + * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). + * * **Python**: Must be the return value of + * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). + * * **JavaScript**: Must be the value of + * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned + * by V8. + * * **Ruby**: Must contain frames returned by + * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). + * * **C#**: Must be the return value of + * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). + * * **PHP**: Must be prefixed with `"PHP (Notice|Parse error|Fatal + * error|Warning): "` and contain the result of + * [`(string)$exception`](https://php.net/manual/en/exception.tostring.php). + * * **Go**: Must be the return value of + * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). + * + * Generated from protobuf field string message = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $message = ''; + /** + * Optional. A description of the context in which the error occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $context = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $event_time + * Optional. Time when the event occurred. + * If not provided, the time when the event was received by the + * Error Reporting system is used. If provided, the time must not + * exceed the [logs retention + * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in + * the past, or be more than 24 hours in the future. + * If an invalid time is provided, then an error is returned. + * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $service_context + * Required. The service context in which this error has occurred. + * @type string $message + * Required. The error message. + * If no `context.reportLocation` is provided, the message must contain a + * header (typically consisting of the exception type name and an error + * message) and an exception stack trace in one of the supported programming + * languages and formats. + * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. + * Supported stack trace formats are: + * * **Java**: Must be the return value of + * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). + * * **Python**: Must be the return value of + * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). + * * **JavaScript**: Must be the value of + * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned + * by V8. + * * **Ruby**: Must contain frames returned by + * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). + * * **C#**: Must be the return value of + * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). + * * **PHP**: Must be prefixed with `"PHP (Notice|Parse error|Fatal + * error|Warning): "` and contain the result of + * [`(string)$exception`](https://php.net/manual/en/exception.tostring.php). + * * **Go**: Must be the return value of + * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). + * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $context + * Optional. A description of the context in which the error occurred. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ReportErrorsService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Time when the event occurred. + * If not provided, the time when the event was received by the + * Error Reporting system is used. If provided, the time must not + * exceed the [logs retention + * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in + * the past, or be more than 24 hours in the future. + * If an invalid time is provided, then an error is returned. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEventTime() + { + return $this->event_time; + } + + public function hasEventTime() + { + return isset($this->event_time); + } + + public function clearEventTime() + { + unset($this->event_time); + } + + /** + * Optional. Time when the event occurred. + * If not provided, the time when the event was received by the + * Error Reporting system is used. If provided, the time must not + * exceed the [logs retention + * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in + * the past, or be more than 24 hours in the future. + * If an invalid time is provided, then an error is returned. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->event_time = $var; + + return $this; + } + + /** + * Required. The service context in which this error has occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContext|null + */ + public function getServiceContext() + { + return $this->service_context; + } + + public function hasServiceContext() + { + return isset($this->service_context); + } + + public function clearServiceContext() + { + unset($this->service_context); + } + + /** + * Required. The service context in which this error has occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $var + * @return $this + */ + public function setServiceContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); + $this->service_context = $var; + + return $this; + } + + /** + * Required. The error message. + * If no `context.reportLocation` is provided, the message must contain a + * header (typically consisting of the exception type name and an error + * message) and an exception stack trace in one of the supported programming + * languages and formats. + * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. + * Supported stack trace formats are: + * * **Java**: Must be the return value of + * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). + * * **Python**: Must be the return value of + * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). + * * **JavaScript**: Must be the value of + * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned + * by V8. + * * **Ruby**: Must contain frames returned by + * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). + * * **C#**: Must be the return value of + * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). + * * **PHP**: Must be prefixed with `"PHP (Notice|Parse error|Fatal + * error|Warning): "` and contain the result of + * [`(string)$exception`](https://php.net/manual/en/exception.tostring.php). + * * **Go**: Must be the return value of + * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). + * + * Generated from protobuf field string message = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * Required. The error message. + * If no `context.reportLocation` is provided, the message must contain a + * header (typically consisting of the exception type name and an error + * message) and an exception stack trace in one of the supported programming + * languages and formats. + * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. + * Supported stack trace formats are: + * * **Java**: Must be the return value of + * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). + * * **Python**: Must be the return value of + * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). + * * **JavaScript**: Must be the value of + * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned + * by V8. + * * **Ruby**: Must contain frames returned by + * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). + * * **C#**: Must be the return value of + * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). + * * **PHP**: Must be prefixed with `"PHP (Notice|Parse error|Fatal + * error|Warning): "` and contain the result of + * [`(string)$exception`](https://php.net/manual/en/exception.tostring.php). + * * **Go**: Must be the return value of + * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). + * + * Generated from protobuf field string message = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + + /** + * Optional. A description of the context in which the error occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorContext|null + */ + public function getContext() + { + return $this->context; + } + + public function hasContext() + { + return isset($this->context); + } + + public function clearContext() + { + unset($this->context); + } + + /** + * Optional. A description of the context in which the error occurred. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $var + * @return $this + */ + public function setContext($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorContext::class); + $this->context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php new file mode 100644 index 000000000000..a50feb043ec5 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php @@ -0,0 +1,78 @@ +google.devtools.clouderrorreporting.v1beta1.ResolutionStatus + */ +class ResolutionStatus +{ + /** + * Status is unknown. When left unspecified in requests, it is treated like + * OPEN. + * + * Generated from protobuf enum RESOLUTION_STATUS_UNSPECIFIED = 0; + */ + const RESOLUTION_STATUS_UNSPECIFIED = 0; + /** + * The error group is not being addressed. This is the default for + * new groups. It is also used for errors re-occurring after marked RESOLVED. + * + * Generated from protobuf enum OPEN = 1; + */ + const OPEN = 1; + /** + * Error Group manually acknowledged, it can have an issue link attached. + * + * Generated from protobuf enum ACKNOWLEDGED = 2; + */ + const ACKNOWLEDGED = 2; + /** + * Error Group manually resolved, more events for this group are not expected + * to occur. + * + * Generated from protobuf enum RESOLVED = 3; + */ + const RESOLVED = 3; + /** + * The error group is muted and excluded by default on group stats requests. + * + * Generated from protobuf enum MUTED = 4; + */ + const MUTED = 4; + + private static $valueToName = [ + self::RESOLUTION_STATUS_UNSPECIFIED => 'RESOLUTION_STATUS_UNSPECIFIED', + self::OPEN => 'OPEN', + self::ACKNOWLEDGED => 'ACKNOWLEDGED', + self::RESOLVED => 'RESOLVED', + self::MUTED => 'MUTED', + ]; + + 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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php new file mode 100644 index 000000000000..5085fd5df2d8 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php @@ -0,0 +1,180 @@ +google.devtools.clouderrorreporting.v1beta1.ServiceContext + */ +class ServiceContext extends \Google\Protobuf\Internal\Message +{ + /** + * An identifier of the service, such as the name of the + * executable, job, or Google App Engine service name. This field is expected + * to have a low number of values that are relatively stable over time, as + * opposed to `version`, which can be changed whenever new code is deployed. + * Contains the service name for error reports extracted from Google + * App Engine logs or `default` if the App Engine default service is used. + * + * Generated from protobuf field string service = 2; + */ + protected $service = ''; + /** + * Represents the source code version that the developer provided, + * which could represent a version label or a Git SHA-1 hash, for example. + * For App Engine standard environment, the version is set to the version of + * the app. + * + * Generated from protobuf field string version = 3; + */ + protected $version = ''; + /** + * Type of the MonitoredResource. List of possible values: + * https://cloud.google.com/monitoring/api/resources + * Value is set automatically for incoming errors and must not be set when + * reporting errors. + * + * Generated from protobuf field string resource_type = 4; + */ + protected $resource_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service + * An identifier of the service, such as the name of the + * executable, job, or Google App Engine service name. This field is expected + * to have a low number of values that are relatively stable over time, as + * opposed to `version`, which can be changed whenever new code is deployed. + * Contains the service name for error reports extracted from Google + * App Engine logs or `default` if the App Engine default service is used. + * @type string $version + * Represents the source code version that the developer provided, + * which could represent a version label or a Git SHA-1 hash, for example. + * For App Engine standard environment, the version is set to the version of + * the app. + * @type string $resource_type + * Type of the MonitoredResource. List of possible values: + * https://cloud.google.com/monitoring/api/resources + * Value is set automatically for incoming errors and must not be set when + * reporting errors. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * An identifier of the service, such as the name of the + * executable, job, or Google App Engine service name. This field is expected + * to have a low number of values that are relatively stable over time, as + * opposed to `version`, which can be changed whenever new code is deployed. + * Contains the service name for error reports extracted from Google + * App Engine logs or `default` if the App Engine default service is used. + * + * Generated from protobuf field string service = 2; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * An identifier of the service, such as the name of the + * executable, job, or Google App Engine service name. This field is expected + * to have a low number of values that are relatively stable over time, as + * opposed to `version`, which can be changed whenever new code is deployed. + * Contains the service name for error reports extracted from Google + * App Engine logs or `default` if the App Engine default service is used. + * + * Generated from protobuf field string service = 2; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * Represents the source code version that the developer provided, + * which could represent a version label or a Git SHA-1 hash, for example. + * For App Engine standard environment, the version is set to the version of + * the app. + * + * Generated from protobuf field string version = 3; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Represents the source code version that the developer provided, + * which could represent a version label or a Git SHA-1 hash, for example. + * For App Engine standard environment, the version is set to the version of + * the app. + * + * Generated from protobuf field string version = 3; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Type of the MonitoredResource. List of possible values: + * https://cloud.google.com/monitoring/api/resources + * Value is set automatically for incoming errors and must not be set when + * reporting errors. + * + * Generated from protobuf field string resource_type = 4; + * @return string + */ + public function getResourceType() + { + return $this->resource_type; + } + + /** + * Type of the MonitoredResource. List of possible values: + * https://cloud.google.com/monitoring/api/resources + * Value is set automatically for incoming errors and must not be set when + * reporting errors. + * + * Generated from protobuf field string resource_type = 4; + * @param string $var + * @return $this + */ + public function setResourceType($var) + { + GPBUtil::checkString($var, True); + $this->resource_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php new file mode 100644 index 000000000000..a364b5d8d7f7 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php @@ -0,0 +1,150 @@ +google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter + */ +class ServiceContextFilter extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The exact value to match against + * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). + * + * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $service = ''; + /** + * Optional. The exact value to match against + * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). + * + * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $version = ''; + /** + * Optional. The exact value to match against + * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). + * + * Generated from protobuf field string resource_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $resource_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $service + * Optional. The exact value to match against + * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). + * @type string $version + * Optional. The exact value to match against + * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). + * @type string $resource_type + * Optional. The exact value to match against + * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The exact value to match against + * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). + * + * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getService() + { + return $this->service; + } + + /** + * Optional. The exact value to match against + * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). + * + * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setService($var) + { + GPBUtil::checkString($var, True); + $this->service = $var; + + return $this; + } + + /** + * Optional. The exact value to match against + * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). + * + * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getVersion() + { + return $this->version; + } + + /** + * Optional. The exact value to match against + * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). + * + * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setVersion($var) + { + GPBUtil::checkString($var, True); + $this->version = $var; + + return $this; + } + + /** + * Optional. The exact value to match against + * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). + * + * Generated from protobuf field string resource_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getResourceType() + { + return $this->resource_type; + } + + /** + * Optional. The exact value to match against + * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). + * + * Generated from protobuf field string resource_type = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setResourceType($var) + { + GPBUtil::checkString($var, True); + $this->resource_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php new file mode 100644 index 000000000000..b151d1f44176 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php @@ -0,0 +1,150 @@ +google.devtools.clouderrorreporting.v1beta1.SourceLocation + */ +class SourceLocation extends \Google\Protobuf\Internal\Message +{ + /** + * The source code filename, which can include a truncated relative + * path, or a full path from a production machine. + * + * Generated from protobuf field string file_path = 1; + */ + protected $file_path = ''; + /** + * 1-based. 0 indicates that the line number is unknown. + * + * Generated from protobuf field int32 line_number = 2; + */ + protected $line_number = 0; + /** + * Human-readable name of a function or method. + * The value can include optional context like the class or package name. + * For example, `my.package.MyClass.method` in case of Java. + * + * Generated from protobuf field string function_name = 4; + */ + protected $function_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $file_path + * The source code filename, which can include a truncated relative + * path, or a full path from a production machine. + * @type int $line_number + * 1-based. 0 indicates that the line number is unknown. + * @type string $function_name + * Human-readable name of a function or method. + * The value can include optional context like the class or package name. + * For example, `my.package.MyClass.method` in case of Java. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The source code filename, which can include a truncated relative + * path, or a full path from a production machine. + * + * Generated from protobuf field string file_path = 1; + * @return string + */ + public function getFilePath() + { + return $this->file_path; + } + + /** + * The source code filename, which can include a truncated relative + * path, or a full path from a production machine. + * + * Generated from protobuf field string file_path = 1; + * @param string $var + * @return $this + */ + public function setFilePath($var) + { + GPBUtil::checkString($var, True); + $this->file_path = $var; + + return $this; + } + + /** + * 1-based. 0 indicates that the line number is unknown. + * + * Generated from protobuf field int32 line_number = 2; + * @return int + */ + public function getLineNumber() + { + return $this->line_number; + } + + /** + * 1-based. 0 indicates that the line number is unknown. + * + * Generated from protobuf field int32 line_number = 2; + * @param int $var + * @return $this + */ + public function setLineNumber($var) + { + GPBUtil::checkInt32($var); + $this->line_number = $var; + + return $this; + } + + /** + * Human-readable name of a function or method. + * The value can include optional context like the class or package name. + * For example, `my.package.MyClass.method` in case of Java. + * + * Generated from protobuf field string function_name = 4; + * @return string + */ + public function getFunctionName() + { + return $this->function_name; + } + + /** + * Human-readable name of a function or method. + * The value can include optional context like the class or package name. + * For example, `my.package.MyClass.method` in case of Java. + * + * Generated from protobuf field string function_name = 4; + * @param string $var + * @return $this + */ + public function setFunctionName($var) + { + GPBUtil::checkString($var, True); + $this->function_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php new file mode 100644 index 000000000000..a305f0f53dbf --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php @@ -0,0 +1,157 @@ +google.devtools.clouderrorreporting.v1beta1.TimedCount + */ +class TimedCount extends \Google\Protobuf\Internal\Message +{ + /** + * Approximate number of occurrences in the given time period. + * + * Generated from protobuf field int64 count = 1; + */ + protected $count = 0; + /** + * Start of the time period to which `count` refers (included). + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + */ + protected $start_time = null; + /** + * End of the time period to which `count` refers (excluded). + * + * 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|string $count + * Approximate number of occurrences in the given time period. + * @type \Google\Protobuf\Timestamp $start_time + * Start of the time period to which `count` refers (included). + * @type \Google\Protobuf\Timestamp $end_time + * End of the time period to which `count` refers (excluded). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); + parent::__construct($data); + } + + /** + * Approximate number of occurrences in the given time period. + * + * Generated from protobuf field int64 count = 1; + * @return int|string + */ + public function getCount() + { + return $this->count; + } + + /** + * Approximate number of occurrences in the given time period. + * + * Generated from protobuf field int64 count = 1; + * @param int|string $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt64($var); + $this->count = $var; + + return $this; + } + + /** + * Start of the time period to which `count` refers (included). + * + * 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); + } + + /** + * Start of the time period to which `count` refers (included). + * + * 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; + } + + /** + * End of the time period to which `count` refers (excluded). + * + * 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); + } + + /** + * End of the time period to which `count` refers (excluded). + * + * 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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php new file mode 100644 index 000000000000..697ac5cb0e0f --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php @@ -0,0 +1,74 @@ +google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment + */ +class TimedCountAlignment +{ + /** + * No alignment specified. + * + * Generated from protobuf enum ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0; + */ + const ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0; + /** + * The time periods shall be consecutive, have width equal to the + * requested duration, and be aligned at the + * [alignment_time] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.alignment_time] + * provided in the request. + * The [alignment_time] + * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.alignment_time] + * does not have to be inside the query period but even if it is outside, only + * time periods are returned which overlap with the query period. + * A rounded alignment will typically result in a different size of the first + * or the last time period. + * + * Generated from protobuf enum ALIGNMENT_EQUAL_ROUNDED = 1; + */ + const ALIGNMENT_EQUAL_ROUNDED = 1; + /** + * The time periods shall be consecutive, have width equal to the + * requested duration, and be aligned at the end of the requested time + * period. This can result in a different size of the + * first time period. + * + * Generated from protobuf enum ALIGNMENT_EQUAL_AT_END = 2; + */ + const ALIGNMENT_EQUAL_AT_END = 2; + + private static $valueToName = [ + self::ERROR_COUNT_ALIGNMENT_UNSPECIFIED => 'ERROR_COUNT_ALIGNMENT_UNSPECIFIED', + self::ALIGNMENT_EQUAL_ROUNDED => 'ALIGNMENT_EQUAL_ROUNDED', + self::ALIGNMENT_EQUAL_AT_END => 'ALIGNMENT_EQUAL_AT_END', + ]; + + 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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php new file mode 100644 index 000000000000..d98de124d2ff --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php @@ -0,0 +1,71 @@ +google.devtools.clouderrorreporting.v1beta1.TrackingIssue + */ +class TrackingIssue extends \Google\Protobuf\Internal\Message +{ + /** + * A URL pointing to a related entry in an issue tracking system. + * Example: `https://github.com/user/project/issues/4` + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * A URL pointing to a related entry in an issue tracking system. + * Example: `https://github.com/user/project/issues/4` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); + parent::__construct($data); + } + + /** + * A URL pointing to a related entry in an issue tracking system. + * Example: `https://github.com/user/project/issues/4` + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * A URL pointing to a related entry in an issue tracking system. + * Example: `https://github.com/user/project/issues/4` + * + * Generated from protobuf field string url = 1; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php new file mode 100644 index 000000000000..be77fb479d98 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php @@ -0,0 +1,90 @@ +google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest + */ +class UpdateGroupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The group which replaces the resource on the server. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $group = null; + + /** + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $group Required. The group which replaces the resource on the server. + * + * @return \Google\Cloud\ErrorReporting\V1beta1\UpdateGroupRequest + * + * @experimental + */ + public static function build(\Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $group): self + { + return (new self()) + ->setGroup($group); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $group + * Required. The group which replaces the resource on the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorGroupService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The group which replaces the resource on the server. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup|null + */ + public function getGroup() + { + return $this->group; + } + + public function hasGroup() + { + return isset($this->group); + } + + public function clearGroup() + { + unset($this->group); + } + + /** + * Required. The group which replaces the resource on the server. + * + * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $var + * @return $this + */ + public function setGroup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup::class); + $this->group = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/get_group.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/get_group.php new file mode 100644 index 000000000000..2b9ce3baad93 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/get_group.php @@ -0,0 +1,89 @@ +setGroupName($formattedGroupName); + + // Call the API and handle any network failures. + try { + /** @var ErrorGroup $response */ + $response = $errorGroupServiceClient->getGroup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedGroupName = ErrorGroupServiceClient::errorGroupName('[PROJECT]', '[GROUP]'); + + get_group_sample($formattedGroupName); +} +// [END clouderrorreporting_v1beta1_generated_ErrorGroupService_GetGroup_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/update_group.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/update_group.php new file mode 100644 index 000000000000..9cb7632b7485 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/update_group.php @@ -0,0 +1,60 @@ +setGroup($group); + + // Call the API and handle any network failures. + try { + /** @var ErrorGroup $response */ + $response = $errorGroupServiceClient->updateGroup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END clouderrorreporting_v1beta1_generated_ErrorGroupService_UpdateGroup_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/delete_events.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/delete_events.php new file mode 100644 index 000000000000..80e4b40346fc --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/delete_events.php @@ -0,0 +1,82 @@ +setProjectName($formattedProjectName); + + // Call the API and handle any network failures. + try { + /** @var DeleteEventsResponse $response */ + $response = $errorStatsServiceClient->deleteEvents($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedProjectName = ErrorStatsServiceClient::projectName('[PROJECT]'); + + delete_events_sample($formattedProjectName); +} +// [END clouderrorreporting_v1beta1_generated_ErrorStatsService_DeleteEvents_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_events.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_events.php new file mode 100644 index 000000000000..d212826032d8 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_events.php @@ -0,0 +1,95 @@ +setProjectName($formattedProjectName) + ->setGroupId($groupId); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $errorStatsServiceClient->listEvents($request); + + /** @var ErrorEvent $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 +{ + $formattedProjectName = ErrorStatsServiceClient::projectName('[PROJECT]'); + $groupId = '[GROUP_ID]'; + + list_events_sample($formattedProjectName, $groupId); +} +// [END clouderrorreporting_v1beta1_generated_ErrorStatsService_ListEvents_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_group_stats.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_group_stats.php new file mode 100644 index 000000000000..26b6ca6d8ee9 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_group_stats.php @@ -0,0 +1,91 @@ +setProjectName($formattedProjectName); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $errorStatsServiceClient->listGroupStats($request); + + /** @var ErrorGroupStats $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 +{ + $formattedProjectName = ErrorStatsServiceClient::projectName('[PROJECT]'); + + list_group_stats_sample($formattedProjectName); +} +// [END clouderrorreporting_v1beta1_generated_ErrorStatsService_ListGroupStats_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ReportErrorsServiceClient/report_error_event.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ReportErrorsServiceClient/report_error_event.php new file mode 100644 index 000000000000..81e5da2751ff --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ReportErrorsServiceClient/report_error_event.php @@ -0,0 +1,127 @@ +setServiceContext($eventServiceContext) + ->setMessage($eventMessage); + $request = (new ReportErrorEventRequest()) + ->setProjectName($formattedProjectName) + ->setEvent($event); + + // Call the API and handle any network failures. + try { + /** @var ReportErrorEventResponse $response */ + $response = $reportErrorsServiceClient->reportErrorEvent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedProjectName = ReportErrorsServiceClient::projectName('[PROJECT]'); + $eventMessage = '[MESSAGE]'; + + report_error_event_sample($formattedProjectName, $eventMessage); +} +// [END clouderrorreporting_v1beta1_generated_ReportErrorsService_ReportErrorEvent_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ErrorGroupServiceClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ErrorGroupServiceClient.php new file mode 100644 index 000000000000..213cebe6d9be --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ErrorGroupServiceClient.php @@ -0,0 +1,296 @@ + getGroupAsync(GetGroupRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateGroupAsync(UpdateGroupRequest $request, array $optionalArgs = []) + */ +final class ErrorGroupServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'clouderrorreporting.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'clouderrorreporting.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/error_group_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/error_group_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/error_group_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/error_group_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a error_group + * resource. + * + * @param string $project + * @param string $group + * + * @return string The formatted error_group resource. + * + * @experimental + */ + public static function errorGroupName(string $project, string $group): string + { + return self::getPathTemplate('errorGroup')->render([ + 'project' => $project, + 'group' => $group, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - errorGroup: projects/{project}/groups/{group} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + * + * @experimental + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'clouderrorreporting.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\ErrorReporting\V1beta1\ErrorGroupServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new ErrorGroupServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Get the specified group. + * + * The async variant is {@see ErrorGroupServiceClient::getGroupAsync()} . + * + * @example samples/V1beta1/ErrorGroupServiceClient/get_group.php + * + * @param GetGroupRequest $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 ErrorGroup + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getGroup(GetGroupRequest $request, array $callOptions = []): ErrorGroup + { + return $this->startApiCall('GetGroup', $request, $callOptions)->wait(); + } + + /** + * Replace the data for the specified group. + * Fails if the group does not exist. + * + * The async variant is {@see ErrorGroupServiceClient::updateGroupAsync()} . + * + * @example samples/V1beta1/ErrorGroupServiceClient/update_group.php + * + * @param UpdateGroupRequest $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 ErrorGroup + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function updateGroup(UpdateGroupRequest $request, array $callOptions = []): ErrorGroup + { + return $this->startApiCall('UpdateGroup', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ErrorStatsServiceClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ErrorStatsServiceClient.php new file mode 100644 index 000000000000..76c0f051d4a6 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ErrorStatsServiceClient.php @@ -0,0 +1,325 @@ + deleteEventsAsync(DeleteEventsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listEventsAsync(ListEventsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listGroupStatsAsync(ListGroupStatsRequest $request, array $optionalArgs = []) + */ +final class ErrorStatsServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'clouderrorreporting.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'clouderrorreporting.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/error_stats_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/error_stats_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/error_stats_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/error_stats_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + * + * @experimental + */ + 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 + * - 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. + * + * @experimental + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'clouderrorreporting.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\ErrorReporting\V1beta1\ErrorStatsServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new ErrorStatsServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Deletes all error events of a given project. + * + * The async variant is {@see ErrorStatsServiceClient::deleteEventsAsync()} . + * + * @example samples/V1beta1/ErrorStatsServiceClient/delete_events.php + * + * @param DeleteEventsRequest $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 DeleteEventsResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function deleteEvents(DeleteEventsRequest $request, array $callOptions = []): DeleteEventsResponse + { + return $this->startApiCall('DeleteEvents', $request, $callOptions)->wait(); + } + + /** + * Lists the specified events. + * + * The async variant is {@see ErrorStatsServiceClient::listEventsAsync()} . + * + * @example samples/V1beta1/ErrorStatsServiceClient/list_events.php + * + * @param ListEventsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function listEvents(ListEventsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEvents', $request, $callOptions); + } + + /** + * Lists the specified groups. + * + * The async variant is {@see ErrorStatsServiceClient::listGroupStatsAsync()} . + * + * @example samples/V1beta1/ErrorStatsServiceClient/list_group_stats.php + * + * @param ListGroupStatsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function listGroupStats(ListGroupStatsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListGroupStats', $request, $callOptions); + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ReportErrorsServiceClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ReportErrorsServiceClient.php new file mode 100644 index 000000000000..fc5706e73e71 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ReportErrorsServiceClient.php @@ -0,0 +1,282 @@ + reportErrorEventAsync(ReportErrorEventRequest $request, array $optionalArgs = []) + */ +final class ReportErrorsServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'clouderrorreporting.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'clouderrorreporting.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/report_errors_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/report_errors_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/report_errors_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/report_errors_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + * + * @experimental + */ + 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 + * - 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. + * + * @experimental + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'clouderrorreporting.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\ErrorReporting\V1beta1\ReportErrorsServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new ReportErrorsServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + * + * @experimental + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Report an individual error event and record the event to a log. + * + * This endpoint accepts **either** an OAuth token, + * **or** an [API key](https://support.google.com/cloud/answer/6158862) + * for authentication. To use an API key, append it to the URL as the value of + * a `key` parameter. For example: + * + * `POST + * https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456` + * + * **Note:** [Error Reporting] (https://cloud.google.com/error-reporting) + * is a service built on Cloud Logging and can analyze log entries when all of + * the following are true: + * + * * Customer-managed encryption keys (CMEK) are disabled on the log bucket. + * * The log bucket satisfies one of the following: + * * The log bucket is stored in the same project where the logs + * originated. + * * The logs were routed to a project, and then that project stored those + * logs in a log bucket that it owns. + * + * The async variant is {@see ReportErrorsServiceClient::reportErrorEventAsync()} . + * + * @example samples/V1beta1/ReportErrorsServiceClient/report_error_event.php + * + * @param ReportErrorEventRequest $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 ReportErrorEventResponse + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function reportErrorEvent(ReportErrorEventRequest $request, array $callOptions = []): ReportErrorEventResponse + { + return $this->startApiCall('ReportErrorEvent', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/gapic_metadata.json b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/gapic_metadata.json new file mode 100644 index 000000000000..8f2d0ccc76b5 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/gapic_metadata.json @@ -0,0 +1,66 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.devtools.clouderrorreporting.v1beta1", + "libraryPackage": "Google\\Cloud\\ErrorReporting\\V1beta1", + "services": { + "ErrorGroupService": { + "clients": { + "grpc": { + "libraryClient": "ErrorGroupServiceGapicClient", + "rpcs": { + "GetGroup": { + "methods": [ + "getGroup" + ] + }, + "UpdateGroup": { + "methods": [ + "updateGroup" + ] + } + } + } + } + }, + "ErrorStatsService": { + "clients": { + "grpc": { + "libraryClient": "ErrorStatsServiceGapicClient", + "rpcs": { + "DeleteEvents": { + "methods": [ + "deleteEvents" + ] + }, + "ListEvents": { + "methods": [ + "listEvents" + ] + }, + "ListGroupStats": { + "methods": [ + "listGroupStats" + ] + } + } + } + } + }, + "ReportErrorsService": { + "clients": { + "grpc": { + "libraryClient": "ReportErrorsServiceGapicClient", + "rpcs": { + "ReportErrorEvent": { + "methods": [ + "reportErrorEvent" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_client_config.json b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_client_config.json new file mode 100644 index 000000000000..40af7ebab8d5 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_client_config.json @@ -0,0 +1,45 @@ +{ + "interfaces": { + "google.devtools.clouderrorreporting.v1beta1.ErrorGroupService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetGroup": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateGroup": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_descriptor_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_descriptor_config.php new file mode 100644 index 000000000000..b4513d5886b7 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_descriptor_config.php @@ -0,0 +1,56 @@ + [ + 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService' => [ + 'GetGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ErrorReporting\V1beta1\ErrorGroup', + 'headerParams' => [ + [ + 'keyName' => 'group_name', + 'fieldAccessors' => [ + 'getGroupName', + ], + ], + ], + ], + 'UpdateGroup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ErrorReporting\V1beta1\ErrorGroup', + 'headerParams' => [ + [ + 'keyName' => 'group.name', + 'fieldAccessors' => [ + 'getGroup', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'errorGroup' => 'projects/{project}/groups/{group}', + ], + ], + ], +]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php new file mode 100644 index 000000000000..17314a869ed5 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php @@ -0,0 +1,66 @@ + [ + 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService' => [ + 'GetGroup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{group_name=projects/*/groups/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{group_name=projects/*/locations/*/groups/*}', + ], + ], + 'placeholders' => [ + 'group_name' => [ + 'getters' => [ + 'getGroupName', + ], + ], + ], + ], + 'UpdateGroup' => [ + 'method' => 'put', + 'uriTemplate' => '/v1beta1/{group.name=projects/*/groups/*}', + 'body' => 'group', + 'additionalBindings' => [ + [ + 'method' => 'put', + 'uriTemplate' => '/v1beta1/{group.name=projects/*/locations/*/groups/*}', + 'body' => 'group', + ], + ], + 'placeholders' => [ + 'group.name' => [ + 'getters' => [ + 'getGroup', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json new file mode 100644 index 000000000000..0a7501188091 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json @@ -0,0 +1,50 @@ +{ + "interfaces": { + "google.devtools.clouderrorreporting.v1beta1.ErrorStatsService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "DeleteEvents": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListEvents": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListGroupStats": { + "timeout_millis": 600000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php new file mode 100644 index 000000000000..8d4f1e9b5e8a --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php @@ -0,0 +1,83 @@ + [ + 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService' => [ + 'DeleteEvents' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ErrorReporting\V1beta1\DeleteEventsResponse', + 'headerParams' => [ + [ + 'keyName' => 'project_name', + 'fieldAccessors' => [ + 'getProjectName', + ], + ], + ], + ], + 'ListEvents' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getErrorEvents', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\ErrorReporting\V1beta1\ListEventsResponse', + 'headerParams' => [ + [ + 'keyName' => 'project_name', + 'fieldAccessors' => [ + 'getProjectName', + ], + ], + ], + ], + 'ListGroupStats' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getErrorGroupStats', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\ErrorReporting\V1beta1\ListGroupStatsResponse', + 'headerParams' => [ + [ + 'keyName' => 'project_name', + 'fieldAccessors' => [ + 'getProjectName', + ], + ], + ], + ], + 'templateMap' => [ + 'project' => 'projects/{project}', + ], + ], + ], +]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php new file mode 100644 index 000000000000..bfb26de16ebf --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php @@ -0,0 +1,86 @@ + [ + 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService' => [ + 'DeleteEvents' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v1beta1/{project_name=projects/*/locations/*}/events', + ], + ], + 'placeholders' => [ + 'project_name' => [ + 'getters' => [ + 'getProjectName', + ], + ], + ], + ], + 'ListEvents' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{project_name=projects/*/locations/*}/events', + 'queryParams' => [ + 'group_id', + ], + ], + ], + 'placeholders' => [ + 'project_name' => [ + 'getters' => [ + 'getProjectName', + ], + ], + ], + 'queryParams' => [ + 'group_id', + ], + ], + 'ListGroupStats' => [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{project_name=projects/*}/groupStats', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1beta1/{project_name=projects/*/locations/*}/groupStats', + ], + ], + 'placeholders' => [ + 'project_name' => [ + 'getters' => [ + 'getProjectName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json new file mode 100644 index 000000000000..701d5afb9615 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json @@ -0,0 +1,37 @@ +{ + "interfaces": { + "google.devtools.clouderrorreporting.v1beta1.ReportErrorsService": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 600000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "ReportErrorEvent": { + "timeout_millis": 600000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php new file mode 100644 index 000000000000..098540c27121 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php @@ -0,0 +1,43 @@ + [ + 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService' => [ + 'ReportErrorEvent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\ErrorReporting\V1beta1\ReportErrorEventResponse', + 'headerParams' => [ + [ + 'keyName' => 'project_name', + 'fieldAccessors' => [ + 'getProjectName', + ], + ], + ], + ], + 'templateMap' => [ + 'project' => 'projects/{project}', + ], + ], + ], +]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php new file mode 100644 index 000000000000..3ec9dbf2ce55 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php @@ -0,0 +1,41 @@ + [ + 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService' => [ + 'ReportErrorEvent' => [ + 'method' => 'post', + 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events:report', + 'body' => 'event', + 'placeholders' => [ + 'project_name' => [ + 'getters' => [ + 'getProjectName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ErrorGroupServiceClientTest.php b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ErrorGroupServiceClientTest.php new file mode 100644 index 000000000000..f72789347302 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ErrorGroupServiceClientTest.php @@ -0,0 +1,226 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ErrorGroupServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ErrorGroupServiceClient($options); + } + + /** @test */ + public function getGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $groupId = 'groupId506361563'; + $expectedResponse = new ErrorGroup(); + $expectedResponse->setName($name); + $expectedResponse->setGroupId($groupId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedGroupName = $gapicClient->errorGroupName('[PROJECT]', '[GROUP]'); + $request = (new GetGroupRequest()) + ->setGroupName($formattedGroupName); + $response = $gapicClient->getGroup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/GetGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getGroupName(); + $this->assertProtobufEquals($formattedGroupName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getGroupExceptionTest() + { + $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 + $formattedGroupName = $gapicClient->errorGroupName('[PROJECT]', '[GROUP]'); + $request = (new GetGroupRequest()) + ->setGroupName($formattedGroupName); + try { + $gapicClient->getGroup($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 updateGroupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $groupId = 'groupId506361563'; + $expectedResponse = new ErrorGroup(); + $expectedResponse->setName($name); + $expectedResponse->setGroupId($groupId); + $transport->addResponse($expectedResponse); + // Mock request + $group = new ErrorGroup(); + $request = (new UpdateGroupRequest()) + ->setGroup($group); + $response = $gapicClient->updateGroup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/UpdateGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getGroup(); + $this->assertProtobufEquals($group, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateGroupExceptionTest() + { + $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 + $group = new ErrorGroup(); + $request = (new UpdateGroupRequest()) + ->setGroup($group); + try { + $gapicClient->updateGroup($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 getGroupAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $groupId = 'groupId506361563'; + $expectedResponse = new ErrorGroup(); + $expectedResponse->setName($name); + $expectedResponse->setGroupId($groupId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedGroupName = $gapicClient->errorGroupName('[PROJECT]', '[GROUP]'); + $request = (new GetGroupRequest()) + ->setGroupName($formattedGroupName); + $response = $gapicClient->getGroupAsync($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.devtools.clouderrorreporting.v1beta1.ErrorGroupService/GetGroup', $actualFuncCall); + $actualValue = $actualRequestObject->getGroupName(); + $this->assertProtobufEquals($formattedGroupName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ErrorStatsServiceClientTest.php b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ErrorStatsServiceClientTest.php new file mode 100644 index 000000000000..e0a4d816907b --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ErrorStatsServiceClientTest.php @@ -0,0 +1,307 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ErrorStatsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ErrorStatsServiceClient($options); + } + + /** @test */ + public function deleteEventsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new DeleteEventsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedProjectName = $gapicClient->projectName('[PROJECT]'); + $request = (new DeleteEventsRequest()) + ->setProjectName($formattedProjectName); + $response = $gapicClient->deleteEvents($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/DeleteEvents', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectName(); + $this->assertProtobufEquals($formattedProjectName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteEventsExceptionTest() + { + $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 + $formattedProjectName = $gapicClient->projectName('[PROJECT]'); + $request = (new DeleteEventsRequest()) + ->setProjectName($formattedProjectName); + try { + $gapicClient->deleteEvents($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 listEventsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $errorEventsElement = new ErrorEvent(); + $errorEvents = [ + $errorEventsElement, + ]; + $expectedResponse = new ListEventsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setErrorEvents($errorEvents); + $transport->addResponse($expectedResponse); + // Mock request + $formattedProjectName = $gapicClient->projectName('[PROJECT]'); + $groupId = 'groupId506361563'; + $request = (new ListEventsRequest()) + ->setProjectName($formattedProjectName) + ->setGroupId($groupId); + $response = $gapicClient->listEvents($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getErrorEvents()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListEvents', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectName(); + $this->assertProtobufEquals($formattedProjectName, $actualValue); + $actualValue = $actualRequestObject->getGroupId(); + $this->assertProtobufEquals($groupId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEventsExceptionTest() + { + $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 + $formattedProjectName = $gapicClient->projectName('[PROJECT]'); + $groupId = 'groupId506361563'; + $request = (new ListEventsRequest()) + ->setProjectName($formattedProjectName) + ->setGroupId($groupId); + try { + $gapicClient->listEvents($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 listGroupStatsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $errorGroupStatsElement = new ErrorGroupStats(); + $errorGroupStats = [ + $errorGroupStatsElement, + ]; + $expectedResponse = new ListGroupStatsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setErrorGroupStats($errorGroupStats); + $transport->addResponse($expectedResponse); + // Mock request + $formattedProjectName = $gapicClient->projectName('[PROJECT]'); + $request = (new ListGroupStatsRequest()) + ->setProjectName($formattedProjectName); + $response = $gapicClient->listGroupStats($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getErrorGroupStats()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListGroupStats', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectName(); + $this->assertProtobufEquals($formattedProjectName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listGroupStatsExceptionTest() + { + $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 + $formattedProjectName = $gapicClient->projectName('[PROJECT]'); + $request = (new ListGroupStatsRequest()) + ->setProjectName($formattedProjectName); + try { + $gapicClient->listGroupStats($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 deleteEventsAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new DeleteEventsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedProjectName = $gapicClient->projectName('[PROJECT]'); + $request = (new DeleteEventsRequest()) + ->setProjectName($formattedProjectName); + $response = $gapicClient->deleteEventsAsync($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.devtools.clouderrorreporting.v1beta1.ErrorStatsService/DeleteEvents', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectName(); + $this->assertProtobufEquals($formattedProjectName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ReportErrorsServiceClientTest.php b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ReportErrorsServiceClientTest.php new file mode 100644 index 000000000000..66f19d75a551 --- /dev/null +++ b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ReportErrorsServiceClientTest.php @@ -0,0 +1,175 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ReportErrorsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ReportErrorsServiceClient($options); + } + + /** @test */ + public function reportErrorEventTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ReportErrorEventResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedProjectName = $gapicClient->projectName('[PROJECT]'); + $event = new ReportedErrorEvent(); + $eventServiceContext = new ServiceContext(); + $event->setServiceContext($eventServiceContext); + $eventMessage = 'eventMessage1863181325'; + $event->setMessage($eventMessage); + $request = (new ReportErrorEventRequest()) + ->setProjectName($formattedProjectName) + ->setEvent($event); + $response = $gapicClient->reportErrorEvent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ReportErrorsService/ReportErrorEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectName(); + $this->assertProtobufEquals($formattedProjectName, $actualValue); + $actualValue = $actualRequestObject->getEvent(); + $this->assertProtobufEquals($event, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function reportErrorEventExceptionTest() + { + $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 + $formattedProjectName = $gapicClient->projectName('[PROJECT]'); + $event = new ReportedErrorEvent(); + $eventServiceContext = new ServiceContext(); + $event->setServiceContext($eventServiceContext); + $eventMessage = 'eventMessage1863181325'; + $event->setMessage($eventMessage); + $request = (new ReportErrorEventRequest()) + ->setProjectName($formattedProjectName) + ->setEvent($event); + try { + $gapicClient->reportErrorEvent($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 reportErrorEventAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ReportErrorEventResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedProjectName = $gapicClient->projectName('[PROJECT]'); + $event = new ReportedErrorEvent(); + $eventServiceContext = new ServiceContext(); + $event->setServiceContext($eventServiceContext); + $eventMessage = 'eventMessage1863181325'; + $event->setMessage($eventMessage); + $request = (new ReportErrorEventRequest()) + ->setProjectName($formattedProjectName) + ->setEvent($event); + $response = $gapicClient->reportErrorEventAsync($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.devtools.clouderrorreporting.v1beta1.ReportErrorsService/ReportErrorEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectName(); + $this->assertProtobufEquals($formattedProjectName, $actualValue); + $actualValue = $actualRequestObject->getEvent(); + $this->assertProtobufEquals($event, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Backup.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Backup.php new file mode 100644 index 000000000000..7863bdb50960 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Backup.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xC7\x07\x0A&google/firestore/admin/v1/backup.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xE0\x04\x0A\x06Backup\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12;\x0A\x08database\x18\x02 \x01(\x09B)\xE0A\x03\xFAA#\x0A!firestore.googleapis.com/Database\x12\x19\x0A\x0Cdatabase_uid\x18\x07 \x01(\x09B\x03\xE0A\x03\x126\x0A\x0Dsnapshot_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bexpire_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12;\x0A\x05stats\x18\x06 \x01(\x0B2'.google.firestore.admin.v1.Backup.StatsB\x03\xE0A\x03\x12;\x0A\x05state\x18\x08 \x01(\x0E2'.google.firestore.admin.v1.Backup.StateB\x03\xE0A\x03\x1AW\x0A\x05Stats\x12\x17\x0A\x0Asize_bytes\x18\x01 \x01(\x03B\x03\xE0A\x03\x12\x1B\x0A\x0Edocument_count\x18\x02 \x01(\x03B\x03\xE0A\x03\x12\x18\x0A\x0Bindex_count\x18\x03 \x01(\x03B\x03\xE0A\x03\"J\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x09\x0A\x05READY\x10\x02\x12\x11\x0A\x0DNOT_AVAILABLE\x10\x03:^\xEAA[\x0A\x1Ffirestore.googleapis.com/Backup\x128projects/{project}/locations/{location}/backups/{backup}B\xDA\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0BBackupProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php new file mode 100644 index 000000000000..7e56dd37b714 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xCF\x1D\x0A(google/firestore/admin/v1/database.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A0google/firestore/admin/v1/realtime_updates.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xAB\x19\x0A\x08Database\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x10\x0A\x03uid\x18\x03 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bdelete_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x0Blocation_id\x18\x09 \x01(\x09\x12>\x0A\x04type\x18\x0A \x01(\x0E20.google.firestore.admin.v1.Database.DatabaseType\x12M\x0A\x10concurrency_mode\x18\x0F \x01(\x0E23.google.firestore.admin.v1.Database.ConcurrencyMode\x12@\x0A\x18version_retention_period\x18\x11 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x03\x12>\x0A\x15earliest_version_time\x18\x12 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12l\x0A!point_in_time_recovery_enablement\x18\x15 \x01(\x0E2A.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement\x12a\x0A\x1Bapp_engine_integration_mode\x18\x13 \x01(\x0E2<.google.firestore.admin.v1.Database.AppEngineIntegrationMode\x12\x17\x0A\x0Akey_prefix\x18\x14 \x01(\x09B\x03\xE0A\x03\x12Z\x0A\x17delete_protection_state\x18\x16 \x01(\x0E29.google.firestore.admin.v1.Database.DeleteProtectionState\x12H\x0A\x0Bcmek_config\x18\x17 \x01(\x0B2..google.firestore.admin.v1.Database.CmekConfigB\x03\xE0A\x01\x12\x18\x0A\x0Bprevious_id\x18\x19 \x01(\x09B\x03\xE0A\x03\x12H\x0A\x0Bsource_info\x18\x1A \x01(\x0B2..google.firestore.admin.v1.Database.SourceInfoB\x03\xE0A\x03\x12F\x0A\x04tags\x18\x1D \x03(\x0B2-.google.firestore.admin.v1.Database.TagsEntryB\x09\xE0A\x04\xE0A\x05\xE0A\x01\x12\x1B\x0A\x09free_tier\x18\x1E \x01(\x08B\x03\xE0A\x03H\x00\x88\x01\x01\x12\x0C\x0A\x04etag\x18c \x01(\x09\x12R\x0A\x10database_edition\x18\x1C \x01(\x0E23.google.firestore.admin.v1.Database.DatabaseEditionB\x03\xE0A\x05\x12R\x0A\x15realtime_updates_mode\x18\x1F \x01(\x0E2..google.firestore.admin.v1.RealtimeUpdatesModeB\x03\xE0A\x05\x12[\x0A\x1Afirestore_data_access_mode\x18! \x01(\x0E22.google.firestore.admin.v1.Database.DataAccessModeB\x03\xE0A\x01\x12d\x0A#mongodb_compatible_data_access_mode\x18\" \x01(\x0E22.google.firestore.admin.v1.Database.DataAccessModeB\x03\xE0A\x01\x1AH\x0A\x0ACmekConfig\x12\x19\x0A\x0Ckms_key_name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1F\x0A\x12active_key_version\x18\x02 \x03(\x09B\x03\xE0A\x03\x1A\xE7\x01\x0A\x0ASourceInfo\x12M\x0A\x06backup\x18\x01 \x01(\x0B2;.google.firestore.admin.v1.Database.SourceInfo.BackupSourceH\x00\x12:\x0A\x09operation\x18\x03 \x01(\x09B'\xFAA\$\x0A\"firestore.googleapis.com/Operation\x1AD\x0A\x0CBackupSource\x124\x0A\x06backup\x18\x01 \x01(\x09B\$\xFAA!\x0A\x1Ffirestore.googleapis.com/BackupB\x08\x0A\x06source\x1A\x88\x04\x0A\x10EncryptionConfig\x12x\x0A\x19google_default_encryption\x18\x01 \x01(\x0B2S.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptionsH\x00\x12m\x0A\x15use_source_encryption\x18\x02 \x01(\x0B2L.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptionsH\x00\x12|\x0A\x1Bcustomer_managed_encryption\x18\x03 \x01(\x0B2U.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptionsH\x00\x1A \x0A\x1EGoogleDefaultEncryptionOptions\x1A\x19\x0A\x17SourceEncryptionOptions\x1A=\x0A CustomerManagedEncryptionOptions\x12\x19\x0A\x0Ckms_key_name\x18\x01 \x01(\x09B\x03\xE0A\x02B\x11\x0A\x0Fencryption_type\x1A+\x0A\x09TagsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"W\x0A\x0CDatabaseType\x12\x1D\x0A\x19DATABASE_TYPE_UNSPECIFIED\x10\x00\x12\x14\x0A\x10FIRESTORE_NATIVE\x10\x01\x12\x12\x0A\x0EDATASTORE_MODE\x10\x02\"w\x0A\x0FConcurrencyMode\x12 \x0A\x1CCONCURRENCY_MODE_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0AOPTIMISTIC\x10\x01\x12\x0F\x0A\x0BPESSIMISTIC\x10\x02\x12!\x0A\x1DOPTIMISTIC_WITH_ENTITY_GROUPS\x10\x03\"\x9B\x01\x0A\x1DPointInTimeRecoveryEnablement\x121\x0A-POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED\x10\x00\x12\"\x0A\x1EPOINT_IN_TIME_RECOVERY_ENABLED\x10\x01\x12#\x0A\x1FPOINT_IN_TIME_RECOVERY_DISABLED\x10\x02\"b\x0A\x18AppEngineIntegrationMode\x12+\x0A'APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07ENABLED\x10\x01\x12\x0C\x0A\x08DISABLED\x10\x02\"\x7F\x0A\x15DeleteProtectionState\x12'\x0A#DELETE_PROTECTION_STATE_UNSPECIFIED\x10\x00\x12\x1E\x0A\x1ADELETE_PROTECTION_DISABLED\x10\x01\x12\x1D\x0A\x19DELETE_PROTECTION_ENABLED\x10\x02\"Q\x0A\x0FDatabaseEdition\x12 \x0A\x1CDATABASE_EDITION_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08STANDARD\x10\x01\x12\x0E\x0A\x0AENTERPRISE\x10\x02\"o\x0A\x0EDataAccessMode\x12 \x0A\x1CDATA_ACCESS_MODE_UNSPECIFIED\x10\x00\x12\x1C\x0A\x18DATA_ACCESS_MODE_ENABLED\x10\x01\x12\x1D\x0A\x19DATA_ACCESS_MODE_DISABLED\x10\x02:R\xEAAO\x0A!firestore.googleapis.com/Database\x12'projects/{project}/databases/{database}R\x01\x01B\x0C\x0A\x0A_free_tierB\xC3\x02\x0A\x1Dcom.google.firestore.admin.v1B\x0DDatabaseProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1\xEAAd\x0A\"firestore.googleapis.com/Operation\x12>projects/{project}/databases/{database}/operations/{operation}b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php new file mode 100644 index 000000000000..bdfc8da72b88 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\x8B\x08\x0A%google/firestore/admin/v1/field.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A%google/firestore/admin/v1/index.proto\x1A\x1Egoogle/protobuf/duration.proto\"\x80\x05\x0A\x05Field\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12B\x0A\x0Cindex_config\x18\x02 \x01(\x0B2,.google.firestore.admin.v1.Field.IndexConfig\x12>\x0A\x0Attl_config\x18\x03 \x01(\x0B2*.google.firestore.admin.v1.Field.TtlConfig\x1A\x89\x01\x0A\x0BIndexConfig\x121\x0A\x07indexes\x18\x01 \x03(\x0B2 .google.firestore.admin.v1.Index\x12\x1C\x0A\x14uses_ancestor_config\x18\x02 \x01(\x08\x12\x16\x0A\x0Eancestor_field\x18\x03 \x01(\x09\x12\x11\x0A\x09reverting\x18\x04 \x01(\x08\x1A\xD8\x01\x0A\x09TtlConfig\x12D\x0A\x05state\x18\x01 \x01(\x0E20.google.firestore.admin.v1.Field.TtlConfig.StateB\x03\xE0A\x03\x129\x0A\x11expiration_offset\x18\x03 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01\"J\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x10\x0A\x0CNEEDS_REPAIR\x10\x03:y\xEAAv\x0A\x1Efirestore.googleapis.com/Field\x12Tprojects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}B\xD9\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0AFieldProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php new file mode 100644 index 000000000000..4958902fc482 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php @@ -0,0 +1,41 @@ +internalAddGeneratedFile( + "\x0A\xB3`\x0A/google/firestore/admin/v1/firestore_admin.proto\x12\x19google.firestore.admin.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x18google/api/routing.proto\x1A&google/firestore/admin/v1/backup.proto\x1A(google/firestore/admin/v1/database.proto\x1A%google/firestore/admin/v1/field.proto\x1A%google/firestore/admin/v1/index.proto\x1A)google/firestore/admin/v1/operation.proto\x1A(google/firestore/admin/v1/schedule.proto\x1A(google/firestore/admin/v1/snapshot.proto\x1A*google/firestore/admin/v1/user_creds.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"g\x0A\x14ListDatabasesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!firestore.googleapis.com/Database\x12\x14\x0A\x0Cshow_deleted\x18\x04 \x01(\x08\"\xA8\x01\x0A\x15CreateDatabaseRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!firestore.googleapis.com/Database\x12:\x0A\x08database\x18\x02 \x01(\x0B2#.google.firestore.admin.v1.DatabaseB\x03\xE0A\x02\x12\x18\x0A\x0Bdatabase_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\x18\x0A\x16CreateDatabaseMetadata\"d\x0A\x15ListDatabasesResponse\x126\x0A\x09databases\x18\x01 \x03(\x0B2#.google.firestore.admin.v1.Database\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"M\x0A\x12GetDatabaseRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\"\x84\x01\x0A\x15UpdateDatabaseRequest\x12:\x0A\x08database\x18\x01 \x01(\x0B2#.google.firestore.admin.v1.DatabaseB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"\x18\x0A\x16UpdateDatabaseMetadata\"^\x0A\x15DeleteDatabaseRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x0C\x0A\x04etag\x18\x03 \x01(\x09\"\x18\x0A\x16DeleteDatabaseMetadata\"\xAF\x01\x0A\x16CreateUserCredsRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"firestore.googleapis.com/UserCreds\x12=\x0A\x0Auser_creds\x18\x02 \x01(\x0B2\$.google.firestore.admin.v1.UserCredsB\x03\xE0A\x02\x12\x1A\x0A\x0Duser_creds_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"O\x0A\x13GetUserCredsRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"R\x0A\x14ListUserCredsRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"firestore.googleapis.com/UserCreds\"Q\x0A\x15ListUserCredsResponse\x128\x0A\x0Auser_creds\x18\x01 \x03(\x0B2\$.google.firestore.admin.v1.UserCreds\"R\x0A\x16EnableUserCredsRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"S\x0A\x17DisableUserCredsRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"T\x0A\x18ResetUserPasswordRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"R\x0A\x16DeleteUserCredsRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"\xA1\x01\x0A\x1BCreateBackupScheduleRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12G\x0A\x0Fbackup_schedule\x18\x02 \x01(\x0B2).google.firestore.admin.v1.BackupScheduleB\x03\xE0A\x02\"Y\x0A\x18GetBackupScheduleRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'firestore.googleapis.com/BackupSchedule\"\x97\x01\x0A\x1BUpdateBackupScheduleRequest\x12G\x0A\x0Fbackup_schedule\x18\x01 \x01(\x0B2).google.firestore.admin.v1.BackupScheduleB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"W\x0A\x1AListBackupSchedulesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\"b\x0A\x1BListBackupSchedulesResponse\x12C\x0A\x10backup_schedules\x18\x01 \x03(\x0B2).google.firestore.admin.v1.BackupSchedule\"\\\x0A\x1BDeleteBackupScheduleRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'firestore.googleapis.com/BackupSchedule\"\x8C\x01\x0A\x12CreateIndexRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(firestore.googleapis.com/CollectionGroup\x124\x0A\x05index\x18\x02 \x01(\x0B2 .google.firestore.admin.v1.IndexB\x03\xE0A\x02\"\x8D\x01\x0A\x12ListIndexesRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(firestore.googleapis.com/CollectionGroup\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x03 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\"a\x0A\x13ListIndexesResponse\x121\x0A\x07indexes\x18\x01 \x03(\x0B2 .google.firestore.admin.v1.Index\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"G\x0A\x0FGetIndexRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Efirestore.googleapis.com/Index\"J\x0A\x12DeleteIndexRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Efirestore.googleapis.com/Index\"{\x0A\x12UpdateFieldRequest\x124\x0A\x05field\x18\x01 \x01(\x0B2 .google.firestore.admin.v1.FieldB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"G\x0A\x0FGetFieldRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Efirestore.googleapis.com/Field\"\x8C\x01\x0A\x11ListFieldsRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(firestore.googleapis.com/CollectionGroup\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x03 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\"_\x0A\x12ListFieldsResponse\x120\x0A\x06fields\x18\x01 \x03(\x0B2 .google.firestore.admin.v1.Field\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xCE\x01\x0A\x16ExportDocumentsRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x16\x0A\x0Ecollection_ids\x18\x02 \x03(\x09\x12\x19\x0A\x11output_uri_prefix\x18\x03 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x04 \x03(\x09\x121\x0A\x0Dsnapshot_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x9A\x01\x0A\x16ImportDocumentsRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x16\x0A\x0Ecollection_ids\x18\x02 \x03(\x09\x12\x18\x0A\x10input_uri_prefix\x18\x03 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x04 \x03(\x09\"\x8E\x01\x0A\x1ABulkDeleteDocumentsRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x1B\x0A\x0Ecollection_ids\x18\x02 \x03(\x09B\x03\xE0A\x01\x12\x1A\x0A\x0Dnamespace_ids\x18\x03 \x03(\x09B\x03\xE0A\x01\"\x1D\x0A\x1BBulkDeleteDocumentsResponse\"I\x0A\x10GetBackupRequest\x125\x0A\x04name\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Ffirestore.googleapis.com/Backup\"_\x0A\x12ListBackupsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Location\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\"^\x0A\x13ListBackupsResponse\x122\x0A\x07backups\x18\x01 \x03(\x0B2!.google.firestore.admin.v1.Backup\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"L\x0A\x13DeleteBackupRequest\x125\x0A\x04name\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Ffirestore.googleapis.com/Backup\"\xFC\x02\x0A\x16RestoreDatabaseRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!firestore.googleapis.com/Database\x12\x18\x0A\x0Bdatabase_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x127\x0A\x06backup\x18\x03 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Ffirestore.googleapis.com/Backup\x12T\x0A\x11encryption_config\x18\x09 \x01(\x0B24.google.firestore.admin.v1.Database.EncryptionConfigB\x03\xE0A\x01\x12Q\x0A\x04tags\x18\x0A \x03(\x0B2;.google.firestore.admin.v1.RestoreDatabaseRequest.TagsEntryB\x06\xE0A\x05\xE0A\x01\x1A+\x0A\x09TagsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x84\x03\x0A\x14CloneDatabaseRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!firestore.googleapis.com/Database\x12\x18\x0A\x0Bdatabase_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12C\x0A\x0Dpitr_snapshot\x18\x06 \x01(\x0B2'.google.firestore.admin.v1.PitrSnapshotB\x03\xE0A\x02\x12T\x0A\x11encryption_config\x18\x04 \x01(\x0B24.google.firestore.admin.v1.Database.EncryptionConfigB\x03\xE0A\x01\x12O\x0A\x04tags\x18\x05 \x03(\x0B29.google.firestore.admin.v1.CloneDatabaseRequest.TagsEntryB\x06\xE0A\x05\xE0A\x01\x1A+\x0A\x09TagsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x012\xFB1\x0A\x0EFirestoreAdmin\x12\xDB\x01\x0A\x0BCreateIndex\x12-.google.firestore.admin.v1.CreateIndexRequest\x1A\x1D.google.longrunning.Operation\"~\xCAA\x1F\x0A\x05Index\x12\x16IndexOperationMetadata\xDAA\x0Cparent,index\x82\xD3\xE4\x93\x02G\">/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes:\x05index\x12\xBD\x01\x0A\x0BListIndexes\x12-.google.firestore.admin.v1.ListIndexesRequest\x1A..google.firestore.admin.v1.ListIndexesResponse\"O\xDAA\x06parent\x82\xD3\xE4\x93\x02@\x12>/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes\x12\xA7\x01\x0A\x08GetIndex\x12*.google.firestore.admin.v1.GetIndexRequest\x1A .google.firestore.admin.v1.Index\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@\x12>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xA3\x01\x0A\x0BDeleteIndex\x12-.google.firestore.admin.v1.DeleteIndexRequest\x1A\x16.google.protobuf.Empty\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@*>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xA6\x01\x0A\x08GetField\x12*.google.firestore.admin.v1.GetFieldRequest\x1A .google.firestore.admin.v1.Field\"L\xDAA\x04name\x82\xD3\xE4\x93\x02?\x12=/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}\x12\xD9\x01\x0A\x0BUpdateField\x12-.google.firestore.admin.v1.UpdateFieldRequest\x1A\x1D.google.longrunning.Operation\"|\xCAA\x1F\x0A\x05Field\x12\x16FieldOperationMetadata\xDAA\x05field\x82\xD3\xE4\x93\x02L2C/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}:\x05field\x12\xB9\x01\x0A\x0AListFields\x12,.google.firestore.admin.v1.ListFieldsRequest\x1A-.google.firestore.admin.v1.ListFieldsResponse\"N\xDAA\x06parent\x82\xD3\xE4\x93\x02?\x12=/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields\x12\xDD\x01\x0A\x0FExportDocuments\x121.google.firestore.admin.v1.ExportDocumentsRequest\x1A\x1D.google.longrunning.Operation\"x\xCAA2\x0A\x17ExportDocumentsResponse\x12\x17ExportDocumentsMetadata\xDAA\x04name\x82\xD3\xE4\x93\x026\"1/v1/{name=projects/*/databases/*}:exportDocuments:\x01*\x12\xDB\x01\x0A\x0FImportDocuments\x121.google.firestore.admin.v1.ImportDocumentsRequest\x1A\x1D.google.longrunning.Operation\"v\xCAA0\x0A\x15google.protobuf.Empty\x12\x17ImportDocumentsMetadata\xDAA\x04name\x82\xD3\xE4\x93\x026\"1/v1/{name=projects/*/databases/*}:importDocuments:\x01*\x12\xF2\x01\x0A\x13BulkDeleteDocuments\x125.google.firestore.admin.v1.BulkDeleteDocumentsRequest\x1A\x1D.google.longrunning.Operation\"\x84\x01\xCAA:\x0A\x1BBulkDeleteDocumentsResponse\x12\x1BBulkDeleteDocumentsMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02:\"5/v1/{name=projects/*/databases/*}:bulkDeleteDocuments:\x01*\x12\xD9\x01\x0A\x0ECreateDatabase\x120.google.firestore.admin.v1.CreateDatabaseRequest\x1A\x1D.google.longrunning.Operation\"v\xCAA\"\x0A\x08Database\x12\x16CreateDatabaseMetadata\xDAA\x1Bparent,database,database_id\x82\xD3\xE4\x93\x02-\"!/v1/{parent=projects/*}/databases:\x08database\x12\x93\x01\x0A\x0BGetDatabase\x12-.google.firestore.admin.v1.GetDatabaseRequest\x1A#.google.firestore.admin.v1.Database\"0\xDAA\x04name\x82\xD3\xE4\x93\x02#\x12!/v1/{name=projects/*/databases/*}\x12\xA6\x01\x0A\x0DListDatabases\x12/.google.firestore.admin.v1.ListDatabasesRequest\x1A0.google.firestore.admin.v1.ListDatabasesResponse\"2\xDAA\x06parent\x82\xD3\xE4\x93\x02#\x12!/v1/{parent=projects/*}/databases\x12\xDB\x01\x0A\x0EUpdateDatabase\x120.google.firestore.admin.v1.UpdateDatabaseRequest\x1A\x1D.google.longrunning.Operation\"x\xCAA\"\x0A\x08Database\x12\x16UpdateDatabaseMetadata\xDAA\x14database,update_mask\x82\xD3\xE4\x93\x0262*/v1/{database.name=projects/*/databases/*}:\x08database\x12\xB8\x01\x0A\x0EDeleteDatabase\x120.google.firestore.admin.v1.DeleteDatabaseRequest\x1A\x1D.google.longrunning.Operation\"U\xCAA\"\x0A\x08Database\x12\x16DeleteDatabaseMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02#*!/v1/{name=projects/*/databases/*}\x12\xCF\x01\x0A\x0FCreateUserCreds\x121.google.firestore.admin.v1.CreateUserCredsRequest\x1A\$.google.firestore.admin.v1.UserCreds\"c\xDAA\x1Fparent,user_creds,user_creds_id\x82\xD3\xE4\x93\x02;\"-/v1/{parent=projects/*/databases/*}/userCreds:\x0Auser_creds\x12\xA2\x01\x0A\x0CGetUserCreds\x12..google.firestore.admin.v1.GetUserCredsRequest\x1A\$.google.firestore.admin.v1.UserCreds\"<\xDAA\x04name\x82\xD3\xE4\x93\x02/\x12-/v1/{name=projects/*/databases/*/userCreds/*}\x12\xB2\x01\x0A\x0DListUserCreds\x12/.google.firestore.admin.v1.ListUserCredsRequest\x1A0.google.firestore.admin.v1.ListUserCredsResponse\">\xDAA\x06parent\x82\xD3\xE4\x93\x02/\x12-/v1/{parent=projects/*/databases/*}/userCreds\x12\xB2\x01\x0A\x0FEnableUserCreds\x121.google.firestore.admin.v1.EnableUserCredsRequest\x1A\$.google.firestore.admin.v1.UserCreds\"F\xDAA\x04name\x82\xD3\xE4\x93\x029\"4/v1/{name=projects/*/databases/*/userCreds/*}:enable:\x01*\x12\xB5\x01\x0A\x10DisableUserCreds\x122.google.firestore.admin.v1.DisableUserCredsRequest\x1A\$.google.firestore.admin.v1.UserCreds\"G\xDAA\x04name\x82\xD3\xE4\x93\x02:\"5/v1/{name=projects/*/databases/*/userCreds/*}:disable:\x01*\x12\xBD\x01\x0A\x11ResetUserPassword\x123.google.firestore.admin.v1.ResetUserPasswordRequest\x1A\$.google.firestore.admin.v1.UserCreds\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@\";/v1/{name=projects/*/databases/*/userCreds/*}:resetPassword:\x01*\x12\x9A\x01\x0A\x0FDeleteUserCreds\x121.google.firestore.admin.v1.DeleteUserCredsRequest\x1A\x16.google.protobuf.Empty\"<\xDAA\x04name\x82\xD3\xE4\x93\x02/*-/v1/{name=projects/*/databases/*/userCreds/*}\x12\x97\x01\x0A\x09GetBackup\x12+.google.firestore.admin.v1.GetBackupRequest\x1A!.google.firestore.admin.v1.Backup\":\xDAA\x04name\x82\xD3\xE4\x93\x02-\x12+/v1/{name=projects/*/locations/*/backups/*}\x12\xAA\x01\x0A\x0BListBackups\x12-.google.firestore.admin.v1.ListBackupsRequest\x1A..google.firestore.admin.v1.ListBackupsResponse\"<\xDAA\x06parent\x82\xD3\xE4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/backups\x12\x92\x01\x0A\x0CDeleteBackup\x12..google.firestore.admin.v1.DeleteBackupRequest\x1A\x16.google.protobuf.Empty\":\xDAA\x04name\x82\xD3\xE4\x93\x02-*+/v1/{name=projects/*/locations/*/backups/*}\x12\xBF\x01\x0A\x0FRestoreDatabase\x121.google.firestore.admin.v1.RestoreDatabaseRequest\x1A\x1D.google.longrunning.Operation\"Z\xCAA#\x0A\x08Database\x12\x17RestoreDatabaseMetadata\x82\xD3\xE4\x93\x02.\")/v1/{parent=projects/*}/databases:restore:\x01*\x12\xE0\x01\x0A\x14CreateBackupSchedule\x126.google.firestore.admin.v1.CreateBackupScheduleRequest\x1A).google.firestore.admin.v1.BackupSchedule\"e\xDAA\x16parent,backup_schedule\x82\xD3\xE4\x93\x02F\"3/v1/{parent=projects/*/databases/*}/backupSchedules:\x0Fbackup_schedule\x12\xB7\x01\x0A\x11GetBackupSchedule\x123.google.firestore.admin.v1.GetBackupScheduleRequest\x1A).google.firestore.admin.v1.BackupSchedule\"B\xDAA\x04name\x82\xD3\xE4\x93\x025\x123/v1/{name=projects/*/databases/*/backupSchedules/*}\x12\xCA\x01\x0A\x13ListBackupSchedules\x125.google.firestore.admin.v1.ListBackupSchedulesRequest\x1A6.google.firestore.admin.v1.ListBackupSchedulesResponse\"D\xDAA\x06parent\x82\xD3\xE4\x93\x025\x123/v1/{parent=projects/*/databases/*}/backupSchedules\x12\xF5\x01\x0A\x14UpdateBackupSchedule\x126.google.firestore.admin.v1.UpdateBackupScheduleRequest\x1A).google.firestore.admin.v1.BackupSchedule\"z\xDAA\x1Bbackup_schedule,update_mask\x82\xD3\xE4\x93\x02V2C/v1/{backup_schedule.name=projects/*/databases/*/backupSchedules/*}:\x0Fbackup_schedule\x12\xAA\x01\x0A\x14DeleteBackupSchedule\x126.google.firestore.admin.v1.DeleteBackupScheduleRequest\x1A\x16.google.protobuf.Empty\"B\xDAA\x04name\x82\xD3\xE4\x93\x025*3/v1/{name=projects/*/databases/*/backupSchedules/*}\x12\xB7\x02\x0A\x0DCloneDatabase\x12/.google.firestore.admin.v1.CloneDatabaseRequest\x1A\x1D.google.longrunning.Operation\"\xD5\x01\xCAA!\x0A\x08Database\x12\x15CloneDatabaseMetadata\x82\xD3\xE4\x93\x02,\"'/v1/{parent=projects/*}/databases:clone:\x01*\x8A\xD3\xE4\x93\x02y\x124\x0A\x16pitr_snapshot.database\x12\x1Aprojects/{project_id=*}/**\x12A\x0A\x16pitr_snapshot.database\x12'projects/*/databases/{database_id=*}/**\x1Av\xCAA\x18firestore.googleapis.com\xD2AXhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/datastoreB\xA5\x03\x0A\x1Dcom.google.firestore.admin.v1B\x13FirestoreAdminProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1\xEAAL\x0A!firestore.googleapis.com/Location\x12'projects/{project}/locations/{location}\xEAAq\x0A(firestore.googleapis.com/CollectionGroup\x12Eprojects/{project}/databases/{database}/collectionGroups/{collection}b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php new file mode 100644 index 000000000000..7832c5a6f905 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile( + "\x0A\xC6\x0D\x0A%google/firestore/admin/v1/index.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\"\x82\x0B\x0A\x05Index\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12@\x0A\x0Bquery_scope\x18\x02 \x01(\x0E2+.google.firestore.admin.v1.Index.QueryScope\x12<\x0A\x09api_scope\x18\x05 \x01(\x0E2).google.firestore.admin.v1.Index.ApiScope\x12;\x0A\x06fields\x18\x03 \x03(\x0B2+.google.firestore.admin.v1.Index.IndexField\x125\x0A\x05state\x18\x04 \x01(\x0E2&.google.firestore.admin.v1.Index.State\x12>\x0A\x07density\x18\x06 \x01(\x0E2(.google.firestore.admin.v1.Index.DensityB\x03\xE0A\x05\x12\x15\x0A\x08multikey\x18\x07 \x01(\x08B\x03\xE0A\x01\x12\x18\x0A\x0Bshard_count\x18\x08 \x01(\x05B\x03\xE0A\x01\x12\x13\x0A\x06unique\x18\x0A \x01(\x08B\x03\xE0A\x01\x1A\xA2\x04\x0A\x0AIndexField\x12\x12\x0A\x0Afield_path\x18\x01 \x01(\x09\x12B\x0A\x05order\x18\x02 \x01(\x0E21.google.firestore.admin.v1.Index.IndexField.OrderH\x00\x12O\x0A\x0Carray_config\x18\x03 \x01(\x0E27.google.firestore.admin.v1.Index.IndexField.ArrayConfigH\x00\x12Q\x0A\x0Dvector_config\x18\x04 \x01(\x0B28.google.firestore.admin.v1.Index.IndexField.VectorConfigH\x00\x1A\x8F\x01\x0A\x0CVectorConfig\x12\x16\x0A\x09dimension\x18\x01 \x01(\x05B\x03\xE0A\x02\x12R\x0A\x04flat\x18\x02 \x01(\x0B2B.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndexH\x00\x1A\x0B\x0A\x09FlatIndexB\x06\x0A\x04type\"=\x0A\x05Order\x12\x15\x0A\x11ORDER_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09ASCENDING\x10\x01\x12\x0E\x0A\x0ADESCENDING\x10\x02\"9\x0A\x0BArrayConfig\x12\x1C\x0A\x18ARRAY_CONFIG_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CONTAINS\x10\x01B\x0C\x0A\x0Avalue_mode\"i\x0A\x0AQueryScope\x12\x1B\x0A\x17QUERY_SCOPE_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ACOLLECTION\x10\x01\x12\x14\x0A\x10COLLECTION_GROUP\x10\x02\x12\x18\x0A\x14COLLECTION_RECURSIVE\x10\x03\"K\x0A\x08ApiScope\x12\x0B\x0A\x07ANY_API\x10\x00\x12\x16\x0A\x12DATASTORE_MODE_API\x10\x01\x12\x1A\x0A\x16MONGODB_COMPATIBLE_API\x10\x02\"I\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x09\x0A\x05READY\x10\x02\x12\x10\x0A\x0CNEEDS_REPAIR\x10\x03\"M\x0A\x07Density\x12\x17\x0A\x13DENSITY_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ASPARSE_ALL\x10\x01\x12\x0E\x0A\x0ASPARSE_ANY\x10\x02\x12\x09\x0A\x05DENSE\x10\x03:z\xEAAw\x0A\x1Efirestore.googleapis.com/Index\x12Uprojects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}B\xD9\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0AIndexProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php new file mode 100644 index 000000000000..95b567f8eaae --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xC0\x02\x0A(google/firestore/admin/v1/location.proto\x12\x19google.firestore.admin.v1\"\x12\x0A\x10LocationMetadataB\xDC\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0DLocationProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php new file mode 100644 index 000000000000..9c8527e9e62e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xAD\x1F\x0A)google/firestore/admin/v1/operation.proto\x12\x19google.firestore.admin.v1\x1A%google/firestore/admin/v1/index.proto\x1A(google/firestore/admin/v1/snapshot.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xBD\x02\x0A\x16IndexOperationMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x0D\x0A\x05index\x18\x03 \x01(\x09\x128\x0A\x05state\x18\x04 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x06 \x01(\x0B2#.google.firestore.admin.v1.Progress\"\xCF\x07\x0A\x16FieldOperationMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x0D\x0A\x05field\x18\x03 \x01(\x09\x12_\x0A\x13index_config_deltas\x18\x04 \x03(\x0B2B.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta\x128\x0A\x05state\x18\x05 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x06 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x07 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12Z\x0A\x10ttl_config_delta\x18\x08 \x01(\x0B2@.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta\x1A\xE7\x01\x0A\x10IndexConfigDelta\x12b\x0A\x0Bchange_type\x18\x01 \x01(\x0E2M.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType\x12/\x0A\x05index\x18\x02 \x01(\x0B2 .google.firestore.admin.v1.Index\">\x0A\x0AChangeType\x12\x1B\x0A\x17CHANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\x1A\xE8\x01\x0A\x0ETtlConfigDelta\x12`\x0A\x0Bchange_type\x18\x01 \x01(\x0E2K.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType\x124\x0A\x11expiration_offset\x18\x03 \x01(\x0B2\x19.google.protobuf.Duration\">\x0A\x0AChangeType\x12\x1B\x0A\x17CHANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\"\xB6\x03\x0A\x17ExportDocumentsMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x04 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12\x16\x0A\x0Ecollection_ids\x18\x06 \x03(\x09\x12\x19\x0A\x11output_uri_prefix\x18\x07 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x08 \x03(\x09\x121\x0A\x0Dsnapshot_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x82\x03\x0A\x17ImportDocumentsMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x04 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12\x16\x0A\x0Ecollection_ids\x18\x06 \x03(\x09\x12\x18\x0A\x10input_uri_prefix\x18\x07 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x08 \x03(\x09\"\x9F\x03\x0A\x1BBulkDeleteDocumentsMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x04 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12\x16\x0A\x0Ecollection_ids\x18\x06 \x03(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x07 \x03(\x09\x121\x0A\x0Dsnapshot_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.Timestamp\"4\x0A\x17ExportDocumentsResponse\x12\x19\x0A\x11output_uri_prefix\x18\x01 \x01(\x09\"\xED\x02\x0A\x17RestoreDatabaseMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x128\x0A\x08database\x18\x04 \x01(\x09B&\xFAA#\x0A!firestore.googleapis.com/Database\x124\x0A\x06backup\x18\x05 \x01(\x09B\$\xFAA!\x0A\x1Ffirestore.googleapis.com/Backup\x12@\x0A\x13progress_percentage\x18\x08 \x01(\x0B2#.google.firestore.admin.v1.Progress\"\xF5\x02\x0A\x15CloneDatabaseMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x128\x0A\x08database\x18\x04 \x01(\x09B&\xFAA#\x0A!firestore.googleapis.com/Database\x12>\x0A\x0Dpitr_snapshot\x18\x07 \x01(\x0B2'.google.firestore.admin.v1.PitrSnapshot\x12@\x0A\x13progress_percentage\x18\x06 \x01(\x0B2#.google.firestore.admin.v1.Progress\":\x0A\x08Progress\x12\x16\x0A\x0Eestimated_work\x18\x01 \x01(\x03\x12\x16\x0A\x0Ecompleted_work\x18\x02 \x01(\x03*\x9E\x01\x0A\x0EOperationState\x12\x1F\x0A\x1BOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CINITIALIZING\x10\x01\x12\x0E\x0A\x0APROCESSING\x10\x02\x12\x0E\x0A\x0ACANCELLING\x10\x03\x12\x0E\x0A\x0AFINALIZING\x10\x04\x12\x0E\x0A\x0ASUCCESSFUL\x10\x05\x12\x0A\x0A\x06FAILED\x10\x06\x12\x0D\x0A\x09CANCELLED\x10\x07B\xDD\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0EOperationProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/RealtimeUpdates.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/RealtimeUpdates.php new file mode 100644 index 000000000000..554a536be61d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/RealtimeUpdates.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xC1\x03\x0A0google/firestore/admin/v1/realtime_updates.proto\x12\x19google.firestore.admin.v1*\x83\x01\x0A\x13RealtimeUpdatesMode\x12%\x0A!REALTIME_UPDATES_MODE_UNSPECIFIED\x10\x00\x12!\x0A\x1DREALTIME_UPDATES_MODE_ENABLED\x10\x01\x12\"\x0A\x1EREALTIME_UPDATES_MODE_DISABLED\x10\x02B\xE3\x01\x0A\x1Dcom.google.firestore.admin.v1B\x14RealtimeUpdatesProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Schedule.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Schedule.php new file mode 100644 index 000000000000..045809417af4 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Schedule.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xCA\x07\x0A(google/firestore/admin/v1/schedule.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Bgoogle/type/dayofweek.proto\"\xD6\x03\x0A\x0EBackupSchedule\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x0A \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12,\x0A\x09retention\x18\x06 \x01(\x0B2\x19.google.protobuf.Duration\x12F\x0A\x10daily_recurrence\x18\x07 \x01(\x0B2*.google.firestore.admin.v1.DailyRecurrenceH\x00\x12H\x0A\x11weekly_recurrence\x18\x08 \x01(\x0B2+.google.firestore.admin.v1.WeeklyRecurrenceH\x00:w\xEAAt\x0A'firestore.googleapis.com/BackupSchedule\x12Iprojects/{project}/databases/{database}/backupSchedules/{backup_schedule}B\x0C\x0A\x0Arecurrence\"\x11\x0A\x0FDailyRecurrence\"7\x0A\x10WeeklyRecurrence\x12#\x0A\x03day\x18\x02 \x01(\x0E2\x16.google.type.DayOfWeekB\xDC\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0DScheduleProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Snapshot.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Snapshot.php new file mode 100644 index 000000000000..ae50af2b85eb --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Snapshot.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\x8D\x04\x0A(google/firestore/admin/v1/snapshot.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x9E\x01\x0A\x0CPitrSnapshot\x12;\x0A\x08database\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x19\x0A\x0Cdatabase_uid\x18\x02 \x01(\x0CB\x03\xE0A\x03\x126\x0A\x0Dsnapshot_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x02B\xE0\x01\x0A\x1Dcom.google.firestore.admin.v1B\x11PitrSnapshotProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/UserCreds.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/UserCreds.php new file mode 100644 index 000000000000..801548a219df --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/UserCreds.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xA5\x07\x0A*google/firestore/admin/v1/user_creds.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB7\x04\x0A\x09UserCreds\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12>\x0A\x05state\x18\x04 \x01(\x0E2*.google.firestore.admin.v1.UserCreds.StateB\x03\xE0A\x03\x12\x1C\x0A\x0Fsecure_password\x18\x05 \x01(\x09B\x03\xE0A\x03\x12R\x0A\x11resource_identity\x18\x06 \x01(\x0B25.google.firestore.admin.v1.UserCreds.ResourceIdentityH\x00\x1A*\x0A\x10ResourceIdentity\x12\x16\x0A\x09principal\x18\x01 \x01(\x09B\x03\xE0A\x03\"9\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07ENABLED\x10\x01\x12\x0C\x0A\x08DISABLED\x10\x02:}\xEAAz\x0A\"firestore.googleapis.com/UserCreds\x12>projects/{project}/databases/{database}/userCreds/{user_creds}*\x09userCreds2\x09userCredsB\x13\x0A\x11UserCredsIdentityB\xDD\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0EUserCredsProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup.php new file mode 100644 index 000000000000..1f840d0bcfc9 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup.php @@ -0,0 +1,327 @@ +google.firestore.admin.v1.Backup + */ +class Backup extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The unique resource name of the Backup. + * Format is `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Name of the Firestore database that the backup is from. + * Format is `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $database = ''; + /** + * Output only. The system-generated UUID4 for the Firestore database that the + * backup is from. + * + * Generated from protobuf field string database_uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $database_uid = ''; + /** + * Output only. The backup contains an externally consistent copy of the + * database at this time. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $snapshot_time = null; + /** + * Output only. The timestamp at which this backup expires. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Output only. Statistics about the backup. + * This data only becomes available after the backup is fully materialized to + * secondary storage. This field will be empty till then. + * + * Generated from protobuf field .google.firestore.admin.v1.Backup.Stats stats = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $stats = null; + /** + * Output only. The current state of the backup. + * + * Generated from protobuf field .google.firestore.admin.v1.Backup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The unique resource name of the Backup. + * Format is `projects/{project}/locations/{location}/backups/{backup}`. + * @type string $database + * Output only. Name of the Firestore database that the backup is from. + * Format is `projects/{project}/databases/{database}`. + * @type string $database_uid + * Output only. The system-generated UUID4 for the Firestore database that the + * backup is from. + * @type \Google\Protobuf\Timestamp $snapshot_time + * Output only. The backup contains an externally consistent copy of the + * database at this time. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. The timestamp at which this backup expires. + * @type \Google\Cloud\Firestore\Admin\V1\Backup\Stats $stats + * Output only. Statistics about the backup. + * This data only becomes available after the backup is fully materialized to + * secondary storage. This field will be empty till then. + * @type int $state + * Output only. The current state of the backup. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The unique resource name of the Backup. + * Format is `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The unique resource name of the Backup. + * Format is `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Name of the Firestore database that the backup is from. + * Format is `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Output only. Name of the Firestore database that the backup is from. + * Format is `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Output only. The system-generated UUID4 for the Firestore database that the + * backup is from. + * + * Generated from protobuf field string database_uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDatabaseUid() + { + return $this->database_uid; + } + + /** + * Output only. The system-generated UUID4 for the Firestore database that the + * backup is from. + * + * Generated from protobuf field string database_uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDatabaseUid($var) + { + GPBUtil::checkString($var, True); + $this->database_uid = $var; + + return $this; + } + + /** + * Output only. The backup contains an externally consistent copy of the + * database at this time. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSnapshotTime() + { + return $this->snapshot_time; + } + + public function hasSnapshotTime() + { + return isset($this->snapshot_time); + } + + public function clearSnapshotTime() + { + unset($this->snapshot_time); + } + + /** + * Output only. The backup contains an externally consistent copy of the + * database at this time. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSnapshotTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->snapshot_time = $var; + + return $this; + } + + /** + * Output only. The timestamp at which this backup expires. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. The timestamp at which this backup expires. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * Output only. Statistics about the backup. + * This data only becomes available after the backup is fully materialized to + * secondary storage. This field will be empty till then. + * + * Generated from protobuf field .google.firestore.admin.v1.Backup.Stats stats = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Firestore\Admin\V1\Backup\Stats|null + */ + public function getStats() + { + return $this->stats; + } + + public function hasStats() + { + return isset($this->stats); + } + + public function clearStats() + { + unset($this->stats); + } + + /** + * Output only. Statistics about the backup. + * This data only becomes available after the backup is fully materialized to + * secondary storage. This field will be empty till then. + * + * Generated from protobuf field .google.firestore.admin.v1.Backup.Stats stats = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Firestore\Admin\V1\Backup\Stats $var + * @return $this + */ + public function setStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Backup\Stats::class); + $this->stats = $var; + + return $this; + } + + /** + * Output only. The current state of the backup. + * + * Generated from protobuf field .google.firestore.admin.v1.Backup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current state of the backup. + * + * Generated from protobuf field .google.firestore.admin.v1.Backup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Backup\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/State.php new file mode 100644 index 000000000000..a88be83f7339 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/State.php @@ -0,0 +1,69 @@ +google.firestore.admin.v1.Backup.State + */ +class State +{ + /** + * The state is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The pending backup is still being created. Operations on the + * backup will be rejected in this state. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The backup is complete and ready to use. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * The backup is not available at this moment. + * + * Generated from protobuf enum NOT_AVAILABLE = 3; + */ + const NOT_AVAILABLE = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::NOT_AVAILABLE => 'NOT_AVAILABLE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/Stats.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/Stats.php new file mode 100644 index 000000000000..830da955b0cd --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/Stats.php @@ -0,0 +1,139 @@ +google.firestore.admin.v1.Backup.Stats + */ +class Stats extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Summation of the size of all documents and index entries in + * the backup, measured in bytes. + * + * Generated from protobuf field int64 size_bytes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size_bytes = 0; + /** + * Output only. The total number of documents contained in the backup. + * + * Generated from protobuf field int64 document_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $document_count = 0; + /** + * Output only. The total number of index entries contained in the backup. + * + * Generated from protobuf field int64 index_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $index_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $size_bytes + * Output only. Summation of the size of all documents and index entries in + * the backup, measured in bytes. + * @type int|string $document_count + * Output only. The total number of documents contained in the backup. + * @type int|string $index_count + * Output only. The total number of index entries contained in the backup. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Backup::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Summation of the size of all documents and index entries in + * the backup, measured in bytes. + * + * Generated from protobuf field int64 size_bytes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getSizeBytes() + { + return $this->size_bytes; + } + + /** + * Output only. Summation of the size of all documents and index entries in + * the backup, measured in bytes. + * + * Generated from protobuf field int64 size_bytes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->size_bytes = $var; + + return $this; + } + + /** + * Output only. The total number of documents contained in the backup. + * + * Generated from protobuf field int64 document_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getDocumentCount() + { + return $this->document_count; + } + + /** + * Output only. The total number of documents contained in the backup. + * + * Generated from protobuf field int64 document_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setDocumentCount($var) + { + GPBUtil::checkInt64($var); + $this->document_count = $var; + + return $this; + } + + /** + * Output only. The total number of index entries contained in the backup. + * + * Generated from protobuf field int64 index_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getIndexCount() + { + return $this->index_count; + } + + /** + * Output only. The total number of index entries contained in the backup. + * + * Generated from protobuf field int64 index_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setIndexCount($var) + { + GPBUtil::checkInt64($var); + $this->index_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BackupSchedule.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BackupSchedule.php new file mode 100644 index 000000000000..2f86c6cbe31b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BackupSchedule.php @@ -0,0 +1,316 @@ +google.firestore.admin.v1.BackupSchedule + */ +class BackupSchedule extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The unique backup schedule identifier across all locations and + * databases for the given project. + * This will be auto-assigned. + * Format is + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The timestamp at which this backup schedule was created and + * effective since. + * No backups will be created for this schedule before this time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp at which this backup schedule was most recently + * updated. When a backup schedule is first created, this is the same as + * create_time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * At what relative time in the future, compared to its creation time, + * the backup should be deleted, e.g. keep backups for 7 days. + * The maximum supported retention period is 14 weeks. + * + * Generated from protobuf field .google.protobuf.Duration retention = 6; + */ + protected $retention = null; + protected $recurrence; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The unique backup schedule identifier across all locations and + * databases for the given project. + * This will be auto-assigned. + * Format is + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp at which this backup schedule was created and + * effective since. + * No backups will be created for this schedule before this time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp at which this backup schedule was most recently + * updated. When a backup schedule is first created, this is the same as + * create_time. + * @type \Google\Protobuf\Duration $retention + * At what relative time in the future, compared to its creation time, + * the backup should be deleted, e.g. keep backups for 7 days. + * The maximum supported retention period is 14 weeks. + * @type \Google\Cloud\Firestore\Admin\V1\DailyRecurrence $daily_recurrence + * For a schedule that runs daily. + * @type \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence $weekly_recurrence + * For a schedule that runs weekly on a specific day. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Schedule::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The unique backup schedule identifier across all locations and + * databases for the given project. + * This will be auto-assigned. + * Format is + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The unique backup schedule identifier across all locations and + * databases for the given project. + * This will be auto-assigned. + * Format is + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp at which this backup schedule was created and + * effective since. + * No backups will be created for this schedule before this time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp at which this backup schedule was created and + * effective since. + * No backups will be created for this schedule before this time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp at which this backup schedule was most recently + * updated. When a backup schedule is first created, this is the same as + * create_time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp at which this backup schedule was most recently + * updated. When a backup schedule is first created, this is the same as + * create_time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * At what relative time in the future, compared to its creation time, + * the backup should be deleted, e.g. keep backups for 7 days. + * The maximum supported retention period is 14 weeks. + * + * Generated from protobuf field .google.protobuf.Duration retention = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getRetention() + { + return $this->retention; + } + + public function hasRetention() + { + return isset($this->retention); + } + + public function clearRetention() + { + unset($this->retention); + } + + /** + * At what relative time in the future, compared to its creation time, + * the backup should be deleted, e.g. keep backups for 7 days. + * The maximum supported retention period is 14 weeks. + * + * Generated from protobuf field .google.protobuf.Duration retention = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setRetention($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->retention = $var; + + return $this; + } + + /** + * For a schedule that runs daily. + * + * Generated from protobuf field .google.firestore.admin.v1.DailyRecurrence daily_recurrence = 7; + * @return \Google\Cloud\Firestore\Admin\V1\DailyRecurrence|null + */ + public function getDailyRecurrence() + { + return $this->readOneof(7); + } + + public function hasDailyRecurrence() + { + return $this->hasOneof(7); + } + + /** + * For a schedule that runs daily. + * + * Generated from protobuf field .google.firestore.admin.v1.DailyRecurrence daily_recurrence = 7; + * @param \Google\Cloud\Firestore\Admin\V1\DailyRecurrence $var + * @return $this + */ + public function setDailyRecurrence($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\DailyRecurrence::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * For a schedule that runs weekly on a specific day. + * + * Generated from protobuf field .google.firestore.admin.v1.WeeklyRecurrence weekly_recurrence = 8; + * @return \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence|null + */ + public function getWeeklyRecurrence() + { + return $this->readOneof(8); + } + + public function hasWeeklyRecurrence() + { + return $this->hasOneof(8); + } + + /** + * For a schedule that runs weekly on a specific day. + * + * Generated from protobuf field .google.firestore.admin.v1.WeeklyRecurrence weekly_recurrence = 8; + * @param \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence $var + * @return $this + */ + public function setWeeklyRecurrence($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * @return string + */ + public function getRecurrence() + { + return $this->whichOneof("recurrence"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsMetadata.php new file mode 100644 index 000000000000..37beadb05832 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsMetadata.php @@ -0,0 +1,373 @@ +google.firestore.admin.v1.BulkDeleteDocumentsMetadata + */ +class BulkDeleteDocumentsMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + */ + protected $operation_state = 0; + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + */ + protected $progress_documents = null; + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + protected $progress_bytes = null; + /** + * The IDs of the collection groups that are being deleted. + * + * Generated from protobuf field repeated string collection_ids = 6; + */ + private $collection_ids; + /** + * Which namespace IDs are being deleted. + * + * Generated from protobuf field repeated string namespace_ids = 7; + */ + private $namespace_ids; + /** + * The timestamp that corresponds to the version of the database that is being + * read to get the list of documents to delete. This time can also be used as + * the timestamp of PITR in case of disaster recovery (subject to PITR window + * limit). + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 8; + */ + protected $snapshot_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The time this operation started. + * @type \Google\Protobuf\Timestamp $end_time + * The time this operation completed. Will be unset if operation still in + * progress. + * @type int $operation_state + * The state of the operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents + * The progress, in documents, of this operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes + * The progress, in bytes, of this operation. + * @type string[] $collection_ids + * The IDs of the collection groups that are being deleted. + * @type string[] $namespace_ids + * Which namespace IDs are being deleted. + * @type \Google\Protobuf\Timestamp $snapshot_time + * The timestamp that corresponds to the version of the database that is being + * read to get the list of documents to delete. This time can also be used as + * the timestamp of PITR in case of disaster recovery (subject to PITR window + * limit). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @return int + */ + public function getOperationState() + { + return $this->operation_state; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @param int $var + * @return $this + */ + public function setOperationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); + $this->operation_state = $var; + + return $this; + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressDocuments() + { + return $this->progress_documents; + } + + public function hasProgressDocuments() + { + return isset($this->progress_documents); + } + + public function clearProgressDocuments() + { + unset($this->progress_documents); + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_documents = $var; + + return $this; + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressBytes() + { + return $this->progress_bytes; + } + + public function hasProgressBytes() + { + return isset($this->progress_bytes); + } + + public function clearProgressBytes() + { + unset($this->progress_bytes); + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressBytes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_bytes = $var; + + return $this; + } + + /** + * The IDs of the collection groups that are being deleted. + * + * Generated from protobuf field repeated string collection_ids = 6; + * @return RepeatedField + */ + public function getCollectionIds() + { + return $this->collection_ids; + } + + /** + * The IDs of the collection groups that are being deleted. + * + * Generated from protobuf field repeated string collection_ids = 6; + * @param string[] $var + * @return $this + */ + public function setCollectionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->collection_ids = $arr; + + return $this; + } + + /** + * Which namespace IDs are being deleted. + * + * Generated from protobuf field repeated string namespace_ids = 7; + * @return RepeatedField + */ + public function getNamespaceIds() + { + return $this->namespace_ids; + } + + /** + * Which namespace IDs are being deleted. + * + * Generated from protobuf field repeated string namespace_ids = 7; + * @param string[] $var + * @return $this + */ + public function setNamespaceIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->namespace_ids = $arr; + + return $this; + } + + /** + * The timestamp that corresponds to the version of the database that is being + * read to get the list of documents to delete. This time can also be used as + * the timestamp of PITR in case of disaster recovery (subject to PITR window + * limit). + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 8; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSnapshotTime() + { + return $this->snapshot_time; + } + + public function hasSnapshotTime() + { + return isset($this->snapshot_time); + } + + public function clearSnapshotTime() + { + unset($this->snapshot_time); + } + + /** + * The timestamp that corresponds to the version of the database that is being + * read to get the list of documents to delete. This time can also be used as + * the timestamp of PITR in case of disaster recovery (subject to PITR window + * limit). + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 8; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSnapshotTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->snapshot_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsRequest.php new file mode 100644 index 000000000000..b112a4710b9e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsRequest.php @@ -0,0 +1,193 @@ +google.firestore.admin.v1.BulkDeleteDocumentsRequest + */ +class BulkDeleteDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Database to operate. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. IDs of the collection groups to delete. Unspecified means all + * collection groups. + * Each collection group in this list must be unique. + * + * Generated from protobuf field repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $collection_ids; + /** + * Optional. Namespaces to delete. + * An empty list means all namespaces. This is the recommended + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to delete from them. + * Each namespace in this list must be unique. + * + * Generated from protobuf field repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $namespace_ids; + + /** + * @param string $name Required. Database to operate. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. Please see + * {@see FirestoreAdminClient::databaseName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\BulkDeleteDocumentsRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Database to operate. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * @type string[] $collection_ids + * Optional. IDs of the collection groups to delete. Unspecified means all + * collection groups. + * Each collection group in this list must be unique. + * @type string[] $namespace_ids + * Optional. Namespaces to delete. + * An empty list means all namespaces. This is the recommended + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to delete from them. + * Each namespace in this list must be unique. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. Database to operate. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Database to operate. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. IDs of the collection groups to delete. Unspecified means all + * collection groups. + * Each collection group in this list must be unique. + * + * Generated from protobuf field repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getCollectionIds() + { + return $this->collection_ids; + } + + /** + * Optional. IDs of the collection groups to delete. Unspecified means all + * collection groups. + * Each collection group in this list must be unique. + * + * Generated from protobuf field repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setCollectionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->collection_ids = $arr; + + return $this; + } + + /** + * Optional. Namespaces to delete. + * An empty list means all namespaces. This is the recommended + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to delete from them. + * Each namespace in this list must be unique. + * + * Generated from protobuf field repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getNamespaceIds() + { + return $this->namespace_ids; + } + + /** + * Optional. Namespaces to delete. + * An empty list means all namespaces. This is the recommended + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to delete from them. + * Each namespace in this list must be unique. + * + * Generated from protobuf field repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setNamespaceIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->namespace_ids = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsResponse.php new file mode 100644 index 000000000000..7a6fa0418629 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsResponse.php @@ -0,0 +1,34 @@ +google.firestore.admin.v1.BulkDeleteDocumentsResponse + */ +class BulkDeleteDocumentsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseMetadata.php new file mode 100644 index 000000000000..156b3e92f64f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseMetadata.php @@ -0,0 +1,278 @@ +google.firestore.admin.v1.CloneDatabaseMetadata + */ +class CloneDatabaseMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time the clone was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time the clone finished, unset for ongoing clones. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The operation state of the clone. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + */ + protected $operation_state = 0; + /** + * The name of the database being cloned to. + * + * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { + */ + protected $database = ''; + /** + * The snapshot from which this database was cloned. + * + * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + */ + protected $pitr_snapshot = null; + /** + * How far along the clone is as an estimated percentage of remaining time. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 6; + */ + protected $progress_percentage = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The time the clone was started. + * @type \Google\Protobuf\Timestamp $end_time + * The time the clone finished, unset for ongoing clones. + * @type int $operation_state + * The operation state of the clone. + * @type string $database + * The name of the database being cloned to. + * @type \Google\Cloud\Firestore\Admin\V1\PitrSnapshot $pitr_snapshot + * The snapshot from which this database was cloned. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_percentage + * How far along the clone is as an estimated percentage of remaining time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The time the clone was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The time the clone was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time the clone finished, unset for ongoing clones. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time the clone finished, unset for ongoing clones. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The operation state of the clone. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @return int + */ + public function getOperationState() + { + return $this->operation_state; + } + + /** + * The operation state of the clone. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @param int $var + * @return $this + */ + public function setOperationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); + $this->operation_state = $var; + + return $this; + } + + /** + * The name of the database being cloned to. + * + * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * The name of the database being cloned to. + * + * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The snapshot from which this database was cloned. + * + * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + * @return \Google\Cloud\Firestore\Admin\V1\PitrSnapshot|null + */ + public function getPitrSnapshot() + { + return $this->pitr_snapshot; + } + + public function hasPitrSnapshot() + { + return isset($this->pitr_snapshot); + } + + public function clearPitrSnapshot() + { + unset($this->pitr_snapshot); + } + + /** + * The snapshot from which this database was cloned. + * + * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; + * @param \Google\Cloud\Firestore\Admin\V1\PitrSnapshot $var + * @return $this + */ + public function setPitrSnapshot($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\PitrSnapshot::class); + $this->pitr_snapshot = $var; + + return $this; + } + + /** + * How far along the clone is as an estimated percentage of remaining time. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 6; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressPercentage() + { + return $this->progress_percentage; + } + + public function hasProgressPercentage() + { + return isset($this->progress_percentage); + } + + public function clearProgressPercentage() + { + unset($this->progress_percentage); + } + + /** + * How far along the clone is as an estimated percentage of remaining time. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 6; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressPercentage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_percentage = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseRequest.php new file mode 100644 index 000000000000..16f607528833 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseRequest.php @@ -0,0 +1,284 @@ +google.firestore.admin.v1.CloneDatabaseRequest + */ +class CloneDatabaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project to clone the database in. Format is + * `projects/{project_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. This database ID must not be + * associated with an existing database. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * + * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database_id = ''; + /** + * Required. Specification of the PITR data to clone from. The source database + * must exist. + * The cloned database will be created in the same location as the source + * database. + * + * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $pitr_snapshot = null; + /** + * Optional. Encryption configuration for the cloned database. + * If this field is not specified, the cloned database will use + * the same encryption configuration as the source database, namely + * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encryption_config = null; + /** + * Optional. Immutable. Tags to be bound to the cloned database. + * The tags should be provided in the format of + * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + * + * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + private $tags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project to clone the database in. Format is + * `projects/{project_id}`. + * @type string $database_id + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. This database ID must not be + * associated with an existing database. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * @type \Google\Cloud\Firestore\Admin\V1\PitrSnapshot $pitr_snapshot + * Required. Specification of the PITR data to clone from. The source database + * must exist. + * The cloned database will be created in the same location as the source + * database. + * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig $encryption_config + * Optional. Encryption configuration for the cloned database. + * If this field is not specified, the cloned database will use + * the same encryption configuration as the source database, namely + * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. + * @type array|\Google\Protobuf\Internal\MapField $tags + * Optional. Immutable. Tags to be bound to the cloned database. + * The tags should be provided in the format of + * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project to clone the database in. Format is + * `projects/{project_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project to clone the database in. Format is + * `projects/{project_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. This database ID must not be + * associated with an existing database. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * + * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabaseId() + { + return $this->database_id; + } + + /** + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. This database ID must not be + * associated with an existing database. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * + * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabaseId($var) + { + GPBUtil::checkString($var, True); + $this->database_id = $var; + + return $this; + } + + /** + * Required. Specification of the PITR data to clone from. The source database + * must exist. + * The cloned database will be created in the same location as the source + * database. + * + * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\Admin\V1\PitrSnapshot|null + */ + public function getPitrSnapshot() + { + return $this->pitr_snapshot; + } + + public function hasPitrSnapshot() + { + return isset($this->pitr_snapshot); + } + + public function clearPitrSnapshot() + { + unset($this->pitr_snapshot); + } + + /** + * Required. Specification of the PITR data to clone from. The source database + * must exist. + * The cloned database will be created in the same location as the source + * database. + * + * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\Admin\V1\PitrSnapshot $var + * @return $this + */ + public function setPitrSnapshot($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\PitrSnapshot::class); + $this->pitr_snapshot = $var; + + return $this; + } + + /** + * Optional. Encryption configuration for the cloned database. + * If this field is not specified, the cloned database will use + * the same encryption configuration as the source database, namely + * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig|null + */ + public function getEncryptionConfig() + { + return $this->encryption_config; + } + + public function hasEncryptionConfig() + { + return isset($this->encryption_config); + } + + public function clearEncryptionConfig() + { + unset($this->encryption_config); + } + + /** + * Optional. Encryption configuration for the cloned database. + * If this field is not specified, the cloned database will use + * the same encryption configuration as the source database, namely + * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig $var + * @return $this + */ + public function setEncryptionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig::class); + $this->encryption_config = $var; + + return $this; + } + + /** + * Optional. Immutable. Tags to be bound to the cloned database. + * The tags should be provided in the format of + * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + * + * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. Immutable. Tags to be bound to the cloned database. + * The tags should be provided in the format of + * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + * + * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateBackupScheduleRequest.php new file mode 100644 index 000000000000..5b111b40539a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateBackupScheduleRequest.php @@ -0,0 +1,134 @@ +google.firestore.admin.v1.CreateBackupScheduleRequest + */ +class CreateBackupScheduleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent database. + * Format `projects/{project}/databases/{database}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The backup schedule to create. + * + * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_schedule = null; + + /** + * @param string $parent Required. The parent database. + * + * Format `projects/{project}/databases/{database}` + * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. + * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule Required. The backup schedule to create. + * + * @return \Google\Cloud\Firestore\Admin\V1\CreateBackupScheduleRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule): self + { + return (new self()) + ->setParent($parent) + ->setBackupSchedule($backupSchedule); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent database. + * Format `projects/{project}/databases/{database}` + * @type \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backup_schedule + * Required. The backup schedule to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent database. + * Format `projects/{project}/databases/{database}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent database. + * Format `projects/{project}/databases/{database}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The backup schedule to create. + * + * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\Admin\V1\BackupSchedule|null + */ + public function getBackupSchedule() + { + return $this->backup_schedule; + } + + public function hasBackupSchedule() + { + return isset($this->backup_schedule); + } + + public function clearBackupSchedule() + { + unset($this->backup_schedule); + } + + /** + * Required. The backup schedule to create. + * + * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $var + * @return $this + */ + public function setBackupSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\BackupSchedule::class); + $this->backup_schedule = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseMetadata.php new file mode 100644 index 000000000000..6d7f95468786 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseMetadata.php @@ -0,0 +1,33 @@ +google.firestore.admin.v1.CreateDatabaseMetadata + */ +class CreateDatabaseMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseRequest.php new file mode 100644 index 000000000000..11c925f81e0f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseRequest.php @@ -0,0 +1,196 @@ +google.firestore.admin.v1.CreateDatabaseRequest + */ +class CreateDatabaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A parent name of the form + * `projects/{project_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The Database to create. + * + * Generated from protobuf field .google.firestore.admin.v1.Database database = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = null; + /** + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * + * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database_id = ''; + + /** + * @param string $parent Required. A parent name of the form + * `projects/{project_id}` + * Please see {@see FirestoreAdminClient::projectName()} for help formatting this field. + * @param \Google\Cloud\Firestore\Admin\V1\Database $database Required. The Database to create. + * @param string $databaseId Required. The ID to use for the database, which will become the final + * component of the database's resource name. + * + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * + * "(default)" database ID is also valid if the database is Standard edition. + * + * @return \Google\Cloud\Firestore\Admin\V1\CreateDatabaseRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Firestore\Admin\V1\Database $database, string $databaseId): self + { + return (new self()) + ->setParent($parent) + ->setDatabase($database) + ->setDatabaseId($databaseId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. A parent name of the form + * `projects/{project_id}` + * @type \Google\Cloud\Firestore\Admin\V1\Database $database + * Required. The Database to create. + * @type string $database_id + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A parent name of the form + * `projects/{project_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. A parent name of the form + * `projects/{project_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The Database to create. + * + * Generated from protobuf field .google.firestore.admin.v1.Database database = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\Admin\V1\Database|null + */ + public function getDatabase() + { + return $this->database; + } + + public function hasDatabase() + { + return isset($this->database); + } + + public function clearDatabase() + { + unset($this->database); + } + + /** + * Required. The Database to create. + * + * Generated from protobuf field .google.firestore.admin.v1.Database database = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\Admin\V1\Database $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database::class); + $this->database = $var; + + return $this; + } + + /** + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * + * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabaseId() + { + return $this->database_id; + } + + /** + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * + * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabaseId($var) + { + GPBUtil::checkString($var, True); + $this->database_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php new file mode 100644 index 000000000000..cec053239e3a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php @@ -0,0 +1,133 @@ +google.firestore.admin.v1.CreateIndexRequest + */ +class CreateIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The composite index to create. + * + * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $index = null; + + /** + * @param string $parent Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * Please see {@see FirestoreAdminClient::collectionGroupName()} for help formatting this field. + * @param \Google\Cloud\Firestore\Admin\V1\Index $index Required. The composite index to create. + * + * @return \Google\Cloud\Firestore\Admin\V1\CreateIndexRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Firestore\Admin\V1\Index $index): self + { + return (new self()) + ->setParent($parent) + ->setIndex($index); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @type \Google\Cloud\Firestore\Admin\V1\Index $index + * Required. The composite index to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The composite index to create. + * + * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\Admin\V1\Index|null + */ + public function getIndex() + { + return $this->index; + } + + public function hasIndex() + { + return isset($this->index); + } + + public function clearIndex() + { + unset($this->index); + } + + /** + * Required. The composite index to create. + * + * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\Admin\V1\Index $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index::class); + $this->index = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateUserCredsRequest.php new file mode 100644 index 000000000000..9e45f49e81ab --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateUserCredsRequest.php @@ -0,0 +1,190 @@ +google.firestore.admin.v1.CreateUserCredsRequest + */ +class CreateUserCredsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The user creds to create. + * + * Generated from protobuf field .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $user_creds = null; + /** + * Required. The ID to use for the user creds, which will become the final + * component of the user creds's resource name. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * + * Generated from protobuf field string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $user_creds_id = ''; + + /** + * @param string $parent Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}` + * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. + * @param \Google\Cloud\Firestore\Admin\V1\UserCreds $userCreds Required. The user creds to create. + * @param string $userCredsId Required. The ID to use for the user creds, which will become the final + * component of the user creds's resource name. + * + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * + * @return \Google\Cloud\Firestore\Admin\V1\CreateUserCredsRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Firestore\Admin\V1\UserCreds $userCreds, string $userCredsId): self + { + return (new self()) + ->setParent($parent) + ->setUserCreds($userCreds) + ->setUserCredsId($userCredsId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}` + * @type \Google\Cloud\Firestore\Admin\V1\UserCreds $user_creds + * Required. The user creds to create. + * @type string $user_creds_id + * Required. The ID to use for the user creds, which will become the final + * component of the user creds's resource name. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The user creds to create. + * + * Generated from protobuf field .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\Admin\V1\UserCreds|null + */ + public function getUserCreds() + { + return $this->user_creds; + } + + public function hasUserCreds() + { + return isset($this->user_creds); + } + + public function clearUserCreds() + { + unset($this->user_creds); + } + + /** + * Required. The user creds to create. + * + * Generated from protobuf field .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\Admin\V1\UserCreds $var + * @return $this + */ + public function setUserCreds($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\UserCreds::class); + $this->user_creds = $var; + + return $this; + } + + /** + * Required. The ID to use for the user creds, which will become the final + * component of the user creds's resource name. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * + * Generated from protobuf field string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getUserCredsId() + { + return $this->user_creds_id; + } + + /** + * Required. The ID to use for the user creds, which will become the final + * component of the user creds's resource name. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * + * Generated from protobuf field string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setUserCredsId($var) + { + GPBUtil::checkString($var, True); + $this->user_creds_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DailyRecurrence.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DailyRecurrence.php new file mode 100644 index 000000000000..4f94e4e67e80 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DailyRecurrence.php @@ -0,0 +1,34 @@ +google.firestore.admin.v1.DailyRecurrence + */ +class DailyRecurrence extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Schedule::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php new file mode 100644 index 000000000000..7d13814ea225 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php @@ -0,0 +1,1125 @@ +google.firestore.admin.v1.Database + */ +class Database extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the Database. + * Format: `projects/{project}/databases/{database}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The system-generated UUID4 for this Database. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + /** + * Output only. The timestamp at which this database was created. Databases + * created before 2016 do not populate create_time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The timestamp at which this database was most recently + * updated. Note this only includes updates to the database resource and not + * data contained by the database. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The timestamp at which this database was deleted. Only set if + * the database has been deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * The location of the database. Available locations are listed at + * https://cloud.google.com/firestore/docs/locations. + * + * Generated from protobuf field string location_id = 9; + */ + protected $location_id = ''; + /** + * The type of the database. + * See https://cloud.google.com/datastore/docs/firestore-or-datastore for + * information about how to choose. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; + */ + protected $type = 0; + /** + * The concurrency control mode to use for this database. + * If unspecified in a CreateDatabase request, this will default based on the + * database edition: Optimistic for Enterprise and Pessimistic for all other + * databases. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + */ + protected $concurrency_mode = 0; + /** + * Output only. The period during which past versions of data are retained in + * the database. + * Any [read][google.firestore.v1.GetDocumentRequest.read_time] + * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify + * a `read_time` within this window, and will read the state of the database + * at that time. + * If the PITR feature is enabled, the retention period is 7 days. Otherwise, + * the retention period is 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $version_retention_period = null; + /** + * Output only. The earliest timestamp at which older versions of the data can + * be read from the database. See [version_retention_period] above; this field + * is populated with `now - version_retention_period`. + * This value is continuously updated, and becomes stale the moment it is + * queried. If you are using this value to recover data, make sure to account + * for the time from the moment when the value is queried to the moment when + * you initiate the recovery. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $earliest_version_time = null; + /** + * Whether to enable the PITR feature on this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; + */ + protected $point_in_time_recovery_enablement = 0; + /** + * The App Engine integration mode to use for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + */ + protected $app_engine_integration_mode = 0; + /** + * Output only. The key_prefix for this database. This key_prefix is used, in + * combination with the project ID ("~") to construct + * the application ID that is returned from the Cloud Datastore APIs in Google + * App Engine first generation runtimes. + * This value may be empty in which case the appid to use for URL-encoded keys + * is the project_id (eg: foo instead of v~foo). + * + * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $key_prefix = ''; + /** + * State of delete protection for the database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; + */ + protected $delete_protection_state = 0; + /** + * Optional. Presence indicates CMEK is enabled for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $cmek_config = null; + /** + * Output only. The database resource's prior database ID. This field is only + * populated for deleted databases. + * + * Generated from protobuf field string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $previous_id = ''; + /** + * Output only. Information about the provenance of this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $source_info = null; + /** + * Optional. Input only. Immutable. Tag keys/values directly bound to this + * resource. For example: + * "123/environment": "production", + * "123/costCenter": "marketing" + * + * Generated from protobuf field map tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + private $tags; + /** + * Output only. Background: Free tier is the ability of a Firestore database + * to use a small amount of resources every day without being charged. Once + * usage exceeds the free tier limit further usage is charged. + * Whether this database can make use of the free tier. Only one database + * per project can be eligible for the free tier. + * The first (or next) database that is created in a project without a free + * tier database will be marked as eligible for the free tier. Databases that + * are created while there is a free tier database will not be eligible for + * the free tier. + * + * Generated from protobuf field optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $free_tier = null; + /** + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 99; + */ + protected $etag = ''; + /** + * Immutable. The edition of the database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $database_edition = 0; + /** + * Immutable. The default Realtime Updates mode to use for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.RealtimeUpdatesMode realtime_updates_mode = 31 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $realtime_updates_mode = 0; + /** + * Optional. The Firestore API data access mode to use for this database. If + * not set on write: + * - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. + * - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode firestore_data_access_mode = 33 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $firestore_data_access_mode = 0; + /** + * Optional. The MongoDB compatible API data access mode to use for this + * database. If not set on write, the default value is + * DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always + * DATA_ACCESS_MODE_DISABLED for Standard Edition. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode mongodb_compatible_data_access_mode = 34 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mongodb_compatible_data_access_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the Database. + * Format: `projects/{project}/databases/{database}` + * @type string $uid + * Output only. The system-generated UUID4 for this Database. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp at which this database was created. Databases + * created before 2016 do not populate create_time. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The timestamp at which this database was most recently + * updated. Note this only includes updates to the database resource and not + * data contained by the database. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. The timestamp at which this database was deleted. Only set if + * the database has been deleted. + * @type string $location_id + * The location of the database. Available locations are listed at + * https://cloud.google.com/firestore/docs/locations. + * @type int $type + * The type of the database. + * See https://cloud.google.com/datastore/docs/firestore-or-datastore for + * information about how to choose. + * @type int $concurrency_mode + * The concurrency control mode to use for this database. + * If unspecified in a CreateDatabase request, this will default based on the + * database edition: Optimistic for Enterprise and Pessimistic for all other + * databases. + * @type \Google\Protobuf\Duration $version_retention_period + * Output only. The period during which past versions of data are retained in + * the database. + * Any [read][google.firestore.v1.GetDocumentRequest.read_time] + * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify + * a `read_time` within this window, and will read the state of the database + * at that time. + * If the PITR feature is enabled, the retention period is 7 days. Otherwise, + * the retention period is 1 hour. + * @type \Google\Protobuf\Timestamp $earliest_version_time + * Output only. The earliest timestamp at which older versions of the data can + * be read from the database. See [version_retention_period] above; this field + * is populated with `now - version_retention_period`. + * This value is continuously updated, and becomes stale the moment it is + * queried. If you are using this value to recover data, make sure to account + * for the time from the moment when the value is queried to the moment when + * you initiate the recovery. + * @type int $point_in_time_recovery_enablement + * Whether to enable the PITR feature on this database. + * @type int $app_engine_integration_mode + * The App Engine integration mode to use for this database. + * @type string $key_prefix + * Output only. The key_prefix for this database. This key_prefix is used, in + * combination with the project ID ("~") to construct + * the application ID that is returned from the Cloud Datastore APIs in Google + * App Engine first generation runtimes. + * This value may be empty in which case the appid to use for URL-encoded keys + * is the project_id (eg: foo instead of v~foo). + * @type int $delete_protection_state + * State of delete protection for the database. + * @type \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig $cmek_config + * Optional. Presence indicates CMEK is enabled for this database. + * @type string $previous_id + * Output only. The database resource's prior database ID. This field is only + * populated for deleted databases. + * @type \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo $source_info + * Output only. Information about the provenance of this database. + * @type array|\Google\Protobuf\Internal\MapField $tags + * Optional. Input only. Immutable. Tag keys/values directly bound to this + * resource. For example: + * "123/environment": "production", + * "123/costCenter": "marketing" + * @type bool $free_tier + * Output only. Background: Free tier is the ability of a Firestore database + * to use a small amount of resources every day without being charged. Once + * usage exceeds the free tier limit further usage is charged. + * Whether this database can make use of the free tier. Only one database + * per project can be eligible for the free tier. + * The first (or next) database that is created in a project without a free + * tier database will be marked as eligible for the free tier. Databases that + * are created while there is a free tier database will not be eligible for + * the free tier. + * @type string $etag + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * @type int $database_edition + * Immutable. The edition of the database. + * @type int $realtime_updates_mode + * Immutable. The default Realtime Updates mode to use for this database. + * @type int $firestore_data_access_mode + * Optional. The Firestore API data access mode to use for this database. If + * not set on write: + * - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. + * - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition. + * @type int $mongodb_compatible_data_access_mode + * Optional. The MongoDB compatible API data access mode to use for this + * database. If not set on write, the default value is + * DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always + * DATA_ACCESS_MODE_DISABLED for Standard Edition. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the Database. + * Format: `projects/{project}/databases/{database}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the Database. + * Format: `projects/{project}/databases/{database}` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The system-generated UUID4 for this Database. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. The system-generated UUID4 for this Database. + * + * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * Output only. The timestamp at which this database was created. Databases + * created before 2016 do not populate create_time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp at which this database was created. Databases + * created before 2016 do not populate create_time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The timestamp at which this database was most recently + * updated. Note this only includes updates to the database resource and not + * data contained by the database. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The timestamp at which this database was most recently + * updated. Note this only includes updates to the database resource and not + * data contained by the database. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. The timestamp at which this database was deleted. Only set if + * the database has been deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. The timestamp at which this database was deleted. Only set if + * the database has been deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * The location of the database. Available locations are listed at + * https://cloud.google.com/firestore/docs/locations. + * + * Generated from protobuf field string location_id = 9; + * @return string + */ + public function getLocationId() + { + return $this->location_id; + } + + /** + * The location of the database. Available locations are listed at + * https://cloud.google.com/firestore/docs/locations. + * + * Generated from protobuf field string location_id = 9; + * @param string $var + * @return $this + */ + public function setLocationId($var) + { + GPBUtil::checkString($var, True); + $this->location_id = $var; + + return $this; + } + + /** + * The type of the database. + * See https://cloud.google.com/datastore/docs/firestore-or-datastore for + * information about how to choose. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the database. + * See https://cloud.google.com/datastore/docs/firestore-or-datastore for + * information about how to choose. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DatabaseType::class); + $this->type = $var; + + return $this; + } + + /** + * The concurrency control mode to use for this database. + * If unspecified in a CreateDatabase request, this will default based on the + * database edition: Optimistic for Enterprise and Pessimistic for all other + * databases. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + * @return int + */ + public function getConcurrencyMode() + { + return $this->concurrency_mode; + } + + /** + * The concurrency control mode to use for this database. + * If unspecified in a CreateDatabase request, this will default based on the + * database edition: Optimistic for Enterprise and Pessimistic for all other + * databases. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; + * @param int $var + * @return $this + */ + public function setConcurrencyMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\ConcurrencyMode::class); + $this->concurrency_mode = $var; + + return $this; + } + + /** + * Output only. The period during which past versions of data are retained in + * the database. + * Any [read][google.firestore.v1.GetDocumentRequest.read_time] + * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify + * a `read_time` within this window, and will read the state of the database + * at that time. + * If the PITR feature is enabled, the retention period is 7 days. Otherwise, + * the retention period is 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Duration|null + */ + public function getVersionRetentionPeriod() + { + return $this->version_retention_period; + } + + public function hasVersionRetentionPeriod() + { + return isset($this->version_retention_period); + } + + public function clearVersionRetentionPeriod() + { + unset($this->version_retention_period); + } + + /** + * Output only. The period during which past versions of data are retained in + * the database. + * Any [read][google.firestore.v1.GetDocumentRequest.read_time] + * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify + * a `read_time` within this window, and will read the state of the database + * at that time. + * If the PITR feature is enabled, the retention period is 7 days. Otherwise, + * the retention period is 1 hour. + * + * Generated from protobuf field .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setVersionRetentionPeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->version_retention_period = $var; + + return $this; + } + + /** + * Output only. The earliest timestamp at which older versions of the data can + * be read from the database. See [version_retention_period] above; this field + * is populated with `now - version_retention_period`. + * This value is continuously updated, and becomes stale the moment it is + * queried. If you are using this value to recover data, make sure to account + * for the time from the moment when the value is queried to the moment when + * you initiate the recovery. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEarliestVersionTime() + { + return $this->earliest_version_time; + } + + public function hasEarliestVersionTime() + { + return isset($this->earliest_version_time); + } + + public function clearEarliestVersionTime() + { + unset($this->earliest_version_time); + } + + /** + * Output only. The earliest timestamp at which older versions of the data can + * be read from the database. See [version_retention_period] above; this field + * is populated with `now - version_retention_period`. + * This value is continuously updated, and becomes stale the moment it is + * queried. If you are using this value to recover data, make sure to account + * for the time from the moment when the value is queried to the moment when + * you initiate the recovery. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEarliestVersionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->earliest_version_time = $var; + + return $this; + } + + /** + * Whether to enable the PITR feature on this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; + * @return int + */ + public function getPointInTimeRecoveryEnablement() + { + return $this->point_in_time_recovery_enablement; + } + + /** + * Whether to enable the PITR feature on this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; + * @param int $var + * @return $this + */ + public function setPointInTimeRecoveryEnablement($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\PointInTimeRecoveryEnablement::class); + $this->point_in_time_recovery_enablement = $var; + + return $this; + } + + /** + * The App Engine integration mode to use for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + * @return int + */ + public function getAppEngineIntegrationMode() + { + return $this->app_engine_integration_mode; + } + + /** + * The App Engine integration mode to use for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; + * @param int $var + * @return $this + */ + public function setAppEngineIntegrationMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\AppEngineIntegrationMode::class); + $this->app_engine_integration_mode = $var; + + return $this; + } + + /** + * Output only. The key_prefix for this database. This key_prefix is used, in + * combination with the project ID ("~") to construct + * the application ID that is returned from the Cloud Datastore APIs in Google + * App Engine first generation runtimes. + * This value may be empty in which case the appid to use for URL-encoded keys + * is the project_id (eg: foo instead of v~foo). + * + * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getKeyPrefix() + { + return $this->key_prefix; + } + + /** + * Output only. The key_prefix for this database. This key_prefix is used, in + * combination with the project ID ("~") to construct + * the application ID that is returned from the Cloud Datastore APIs in Google + * App Engine first generation runtimes. + * This value may be empty in which case the appid to use for URL-encoded keys + * is the project_id (eg: foo instead of v~foo). + * + * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setKeyPrefix($var) + { + GPBUtil::checkString($var, True); + $this->key_prefix = $var; + + return $this; + } + + /** + * State of delete protection for the database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; + * @return int + */ + public function getDeleteProtectionState() + { + return $this->delete_protection_state; + } + + /** + * State of delete protection for the database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; + * @param int $var + * @return $this + */ + public function setDeleteProtectionState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DeleteProtectionState::class); + $this->delete_protection_state = $var; + + return $this; + } + + /** + * Optional. Presence indicates CMEK is enabled for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig|null + */ + public function getCmekConfig() + { + return $this->cmek_config; + } + + public function hasCmekConfig() + { + return isset($this->cmek_config); + } + + public function clearCmekConfig() + { + unset($this->cmek_config); + } + + /** + * Optional. Presence indicates CMEK is enabled for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig $var + * @return $this + */ + public function setCmekConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig::class); + $this->cmek_config = $var; + + return $this; + } + + /** + * Output only. The database resource's prior database ID. This field is only + * populated for deleted databases. + * + * Generated from protobuf field string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPreviousId() + { + return $this->previous_id; + } + + /** + * Output only. The database resource's prior database ID. This field is only + * populated for deleted databases. + * + * Generated from protobuf field string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPreviousId($var) + { + GPBUtil::checkString($var, True); + $this->previous_id = $var; + + return $this; + } + + /** + * Output only. Information about the provenance of this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo|null + */ + public function getSourceInfo() + { + return $this->source_info; + } + + public function hasSourceInfo() + { + return isset($this->source_info); + } + + public function clearSourceInfo() + { + unset($this->source_info); + } + + /** + * Output only. Information about the provenance of this database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo $var + * @return $this + */ + public function setSourceInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo::class); + $this->source_info = $var; + + return $this; + } + + /** + * Optional. Input only. Immutable. Tag keys/values directly bound to this + * resource. For example: + * "123/environment": "production", + * "123/costCenter": "marketing" + * + * Generated from protobuf field map tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. Input only. Immutable. Tag keys/values directly bound to this + * resource. For example: + * "123/environment": "production", + * "123/costCenter": "marketing" + * + * Generated from protobuf field map tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + + /** + * Output only. Background: Free tier is the ability of a Firestore database + * to use a small amount of resources every day without being charged. Once + * usage exceeds the free tier limit further usage is charged. + * Whether this database can make use of the free tier. Only one database + * per project can be eligible for the free tier. + * The first (or next) database that is created in a project without a free + * tier database will be marked as eligible for the free tier. Databases that + * are created while there is a free tier database will not be eligible for + * the free tier. + * + * Generated from protobuf field optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getFreeTier() + { + return isset($this->free_tier) ? $this->free_tier : false; + } + + public function hasFreeTier() + { + return isset($this->free_tier); + } + + public function clearFreeTier() + { + unset($this->free_tier); + } + + /** + * Output only. Background: Free tier is the ability of a Firestore database + * to use a small amount of resources every day without being charged. Once + * usage exceeds the free tier limit further usage is charged. + * Whether this database can make use of the free tier. Only one database + * per project can be eligible for the free tier. + * The first (or next) database that is created in a project without a free + * tier database will be marked as eligible for the free tier. Databases that + * are created while there is a free tier database will not be eligible for + * the free tier. + * + * Generated from protobuf field optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setFreeTier($var) + { + GPBUtil::checkBool($var); + $this->free_tier = $var; + + return $this; + } + + /** + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 99; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * This checksum is computed by the server based on the value of other + * fields, and may be sent on update and delete requests to ensure the + * client has an up-to-date value before proceeding. + * + * Generated from protobuf field string etag = 99; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + + /** + * Immutable. The edition of the database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getDatabaseEdition() + { + return $this->database_edition; + } + + /** + * Immutable. The edition of the database. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setDatabaseEdition($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DatabaseEdition::class); + $this->database_edition = $var; + + return $this; + } + + /** + * Immutable. The default Realtime Updates mode to use for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.RealtimeUpdatesMode realtime_updates_mode = 31 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getRealtimeUpdatesMode() + { + return $this->realtime_updates_mode; + } + + /** + * Immutable. The default Realtime Updates mode to use for this database. + * + * Generated from protobuf field .google.firestore.admin.v1.RealtimeUpdatesMode realtime_updates_mode = 31 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setRealtimeUpdatesMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\RealtimeUpdatesMode::class); + $this->realtime_updates_mode = $var; + + return $this; + } + + /** + * Optional. The Firestore API data access mode to use for this database. If + * not set on write: + * - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. + * - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode firestore_data_access_mode = 33 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getFirestoreDataAccessMode() + { + return $this->firestore_data_access_mode; + } + + /** + * Optional. The Firestore API data access mode to use for this database. If + * not set on write: + * - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. + * - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode firestore_data_access_mode = 33 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setFirestoreDataAccessMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DataAccessMode::class); + $this->firestore_data_access_mode = $var; + + return $this; + } + + /** + * Optional. The MongoDB compatible API data access mode to use for this + * database. If not set on write, the default value is + * DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always + * DATA_ACCESS_MODE_DISABLED for Standard Edition. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode mongodb_compatible_data_access_mode = 34 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMongodbCompatibleDataAccessMode() + { + return $this->mongodb_compatible_data_access_mode; + } + + /** + * Optional. The MongoDB compatible API data access mode to use for this + * database. If not set on write, the default value is + * DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always + * DATA_ACCESS_MODE_DISABLED for Standard Edition. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode mongodb_compatible_data_access_mode = 34 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMongodbCompatibleDataAccessMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DataAccessMode::class); + $this->mongodb_compatible_data_access_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php new file mode 100644 index 000000000000..f81ca80beab3 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php @@ -0,0 +1,66 @@ +google.firestore.admin.v1.Database.AppEngineIntegrationMode + */ +class AppEngineIntegrationMode +{ + /** + * Not used. + * + * Generated from protobuf enum APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED = 0; + */ + const APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED = 0; + /** + * If an App Engine application exists in the same region as this database, + * App Engine configuration will impact this database. This includes + * disabling of the application & database, as well as disabling writes to + * the database. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * App Engine has no effect on the ability of this database to serve + * requests. + * This is the default setting for databases created with the Firestore API. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + + private static $valueToName = [ + self::APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED => 'APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED', + self::ENABLED => 'ENABLED', + self::DISABLED => 'DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/CmekConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/CmekConfig.php new file mode 100644 index 000000000000..2178af095d91 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/CmekConfig.php @@ -0,0 +1,151 @@ +google.firestore.admin.v1.Database.CmekConfig + */ +class CmekConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Only keys in the same location as this database are allowed to + * be used for encryption. + * For Firestore's nam5 multi-region, this corresponds to Cloud KMS + * multi-region us. For Firestore's eur3 multi-region, this corresponds to + * Cloud KMS multi-region europe. See + * https://cloud.google.com/kms/docs/locations. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * + * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $kms_key_name = ''; + /** + * Output only. Currently in-use [KMS key + * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). + * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), + * there can be multiple in-use key versions. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. + * + * Generated from protobuf field repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $active_key_version; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kms_key_name + * Required. Only keys in the same location as this database are allowed to + * be used for encryption. + * For Firestore's nam5 multi-region, this corresponds to Cloud KMS + * multi-region us. For Firestore's eur3 multi-region, this corresponds to + * Cloud KMS multi-region europe. See + * https://cloud.google.com/kms/docs/locations. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * @type string[] $active_key_version + * Output only. Currently in-use [KMS key + * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). + * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), + * there can be multiple in-use key versions. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); + parent::__construct($data); + } + + /** + * Required. Only keys in the same location as this database are allowed to + * be used for encryption. + * For Firestore's nam5 multi-region, this corresponds to Cloud KMS + * multi-region us. For Firestore's eur3 multi-region, this corresponds to + * Cloud KMS multi-region europe. See + * https://cloud.google.com/kms/docs/locations. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * + * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKmsKeyName() + { + return $this->kms_key_name; + } + + /** + * Required. Only keys in the same location as this database are allowed to + * be used for encryption. + * For Firestore's nam5 multi-region, this corresponds to Cloud KMS + * multi-region us. For Firestore's eur3 multi-region, this corresponds to + * Cloud KMS multi-region europe. See + * https://cloud.google.com/kms/docs/locations. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * + * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKmsKeyName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_name = $var; + + return $this; + } + + /** + * Output only. Currently in-use [KMS key + * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). + * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), + * there can be multiple in-use key versions. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. + * + * Generated from protobuf field repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField + */ + public function getActiveKeyVersion() + { + return $this->active_key_version; + } + + /** + * Output only. Currently in-use [KMS key + * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). + * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), + * there can be multiple in-use key versions. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. + * + * Generated from protobuf field repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string[] $var + * @return $this + */ + public function setActiveKeyVersion($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->active_key_version = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php new file mode 100644 index 000000000000..f34e9bce6751 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php @@ -0,0 +1,78 @@ +google.firestore.admin.v1.Database.ConcurrencyMode + */ +class ConcurrencyMode +{ + /** + * Not used. + * + * Generated from protobuf enum CONCURRENCY_MODE_UNSPECIFIED = 0; + */ + const CONCURRENCY_MODE_UNSPECIFIED = 0; + /** + * Use optimistic concurrency control by default. This mode is available + * for Cloud Firestore databases. + * This is the default setting for Cloud Firestore Enterprise Edition + * databases. + * + * Generated from protobuf enum OPTIMISTIC = 1; + */ + const OPTIMISTIC = 1; + /** + * Use pessimistic concurrency control by default. This mode is available + * for Cloud Firestore databases. + * This is the default setting for Cloud Firestore Standard Edition + * databases. + * + * Generated from protobuf enum PESSIMISTIC = 2; + */ + const PESSIMISTIC = 2; + /** + * Use optimistic concurrency control with entity groups by default. + * This mode is enabled for some databases that were automatically upgraded + * from Cloud Datastore to Cloud Firestore with Datastore Mode. + * It is not recommended for any new databases, and not supported for + * Firestore Native databases. + * + * Generated from protobuf enum OPTIMISTIC_WITH_ENTITY_GROUPS = 3; + */ + const OPTIMISTIC_WITH_ENTITY_GROUPS = 3; + + private static $valueToName = [ + self::CONCURRENCY_MODE_UNSPECIFIED => 'CONCURRENCY_MODE_UNSPECIFIED', + self::OPTIMISTIC => 'OPTIMISTIC', + self::PESSIMISTIC => 'PESSIMISTIC', + self::OPTIMISTIC_WITH_ENTITY_GROUPS => 'OPTIMISTIC_WITH_ENTITY_GROUPS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DataAccessMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DataAccessMode.php new file mode 100644 index 000000000000..1768bbfdf76f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DataAccessMode.php @@ -0,0 +1,61 @@ +google.firestore.admin.v1.Database.DataAccessMode + */ +class DataAccessMode +{ + /** + * Not Used. + * + * Generated from protobuf enum DATA_ACCESS_MODE_UNSPECIFIED = 0; + */ + const DATA_ACCESS_MODE_UNSPECIFIED = 0; + /** + * Accessing the database through the API is allowed. + * + * Generated from protobuf enum DATA_ACCESS_MODE_ENABLED = 1; + */ + const DATA_ACCESS_MODE_ENABLED = 1; + /** + * Accessing the database through the API is disallowed. + * + * Generated from protobuf enum DATA_ACCESS_MODE_DISABLED = 2; + */ + const DATA_ACCESS_MODE_DISABLED = 2; + + private static $valueToName = [ + self::DATA_ACCESS_MODE_UNSPECIFIED => 'DATA_ACCESS_MODE_UNSPECIFIED', + self::DATA_ACCESS_MODE_ENABLED => 'DATA_ACCESS_MODE_ENABLED', + self::DATA_ACCESS_MODE_DISABLED => 'DATA_ACCESS_MODE_DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseEdition.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseEdition.php new file mode 100644 index 000000000000..9102fcdc721b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseEdition.php @@ -0,0 +1,62 @@ +google.firestore.admin.v1.Database.DatabaseEdition + */ +class DatabaseEdition +{ + /** + * Not used. + * + * Generated from protobuf enum DATABASE_EDITION_UNSPECIFIED = 0; + */ + const DATABASE_EDITION_UNSPECIFIED = 0; + /** + * Standard edition. + * This is the default setting if not specified. + * + * Generated from protobuf enum STANDARD = 1; + */ + const STANDARD = 1; + /** + * Enterprise edition. + * + * Generated from protobuf enum ENTERPRISE = 2; + */ + const ENTERPRISE = 2; + + private static $valueToName = [ + self::DATABASE_EDITION_UNSPECIFIED => 'DATABASE_EDITION_UNSPECIFIED', + self::STANDARD => 'STANDARD', + self::ENTERPRISE => 'ENTERPRISE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php new file mode 100644 index 000000000000..930fddf71f6f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php @@ -0,0 +1,64 @@ +google.firestore.admin.v1.Database.DatabaseType + */ +class DatabaseType +{ + /** + * Not used. + * + * Generated from protobuf enum DATABASE_TYPE_UNSPECIFIED = 0; + */ + const DATABASE_TYPE_UNSPECIFIED = 0; + /** + * Firestore Native Mode + * + * Generated from protobuf enum FIRESTORE_NATIVE = 1; + */ + const FIRESTORE_NATIVE = 1; + /** + * Firestore in Datastore Mode. + * + * Generated from protobuf enum DATASTORE_MODE = 2; + */ + const DATASTORE_MODE = 2; + + private static $valueToName = [ + self::DATABASE_TYPE_UNSPECIFIED => 'DATABASE_TYPE_UNSPECIFIED', + self::FIRESTORE_NATIVE => 'FIRESTORE_NATIVE', + self::DATASTORE_MODE => 'DATASTORE_MODE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DeleteProtectionState.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DeleteProtectionState.php new file mode 100644 index 000000000000..299230749a07 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DeleteProtectionState.php @@ -0,0 +1,61 @@ +google.firestore.admin.v1.Database.DeleteProtectionState + */ +class DeleteProtectionState +{ + /** + * The default value. Delete protection type is not specified + * + * Generated from protobuf enum DELETE_PROTECTION_STATE_UNSPECIFIED = 0; + */ + const DELETE_PROTECTION_STATE_UNSPECIFIED = 0; + /** + * Delete protection is disabled + * + * Generated from protobuf enum DELETE_PROTECTION_DISABLED = 1; + */ + const DELETE_PROTECTION_DISABLED = 1; + /** + * Delete protection is enabled + * + * Generated from protobuf enum DELETE_PROTECTION_ENABLED = 2; + */ + const DELETE_PROTECTION_ENABLED = 2; + + private static $valueToName = [ + self::DELETE_PROTECTION_STATE_UNSPECIFIED => 'DELETE_PROTECTION_STATE_UNSPECIFIED', + self::DELETE_PROTECTION_DISABLED => 'DELETE_PROTECTION_DISABLED', + self::DELETE_PROTECTION_ENABLED => 'DELETE_PROTECTION_ENABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig.php new file mode 100644 index 000000000000..510f8a24fa1d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig.php @@ -0,0 +1,144 @@ +google.firestore.admin.v1.Database.EncryptionConfig + */ +class EncryptionConfig extends \Google\Protobuf\Internal\Message +{ + protected $encryption_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions $google_default_encryption + * Use Google default encryption. + * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions $use_source_encryption + * The database will use the same encryption configuration as the source. + * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions $customer_managed_encryption + * Use Customer Managed Encryption Keys (CMEK) for encryption. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); + parent::__construct($data); + } + + /** + * Use Google default encryption. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; + * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions|null + */ + public function getGoogleDefaultEncryption() + { + return $this->readOneof(1); + } + + public function hasGoogleDefaultEncryption() + { + return $this->hasOneof(1); + } + + /** + * Use Google default encryption. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; + * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions $var + * @return $this + */ + public function setGoogleDefaultEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The database will use the same encryption configuration as the source. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; + * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions|null + */ + public function getUseSourceEncryption() + { + return $this->readOneof(2); + } + + public function hasUseSourceEncryption() + { + return $this->hasOneof(2); + } + + /** + * The database will use the same encryption configuration as the source. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; + * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions $var + * @return $this + */ + public function setUseSourceEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Use Customer Managed Encryption Keys (CMEK) for encryption. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; + * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions|null + */ + public function getCustomerManagedEncryption() + { + return $this->readOneof(3); + } + + public function hasCustomerManagedEncryption() + { + return $this->hasOneof(3); + } + + /** + * Use Customer Managed Encryption Keys (CMEK) for encryption. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; + * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions $var + * @return $this + */ + public function setCustomerManagedEncryption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getEncryptionType() + { + return $this->whichOneof("encryption_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/CustomerManagedEncryptionOptions.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/CustomerManagedEncryptionOptions.php new file mode 100644 index 000000000000..17074d4754ef --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/CustomerManagedEncryptionOptions.php @@ -0,0 +1,96 @@ +google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions + */ +class CustomerManagedEncryptionOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Only keys in the same location as the database are allowed to + * be used for encryption. + * For Firestore's nam5 multi-region, this corresponds to Cloud KMS + * multi-region us. For Firestore's eur3 multi-region, this corresponds to + * Cloud KMS multi-region europe. See + * https://cloud.google.com/kms/docs/locations. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * + * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $kms_key_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $kms_key_name + * Required. Only keys in the same location as the database are allowed to + * be used for encryption. + * For Firestore's nam5 multi-region, this corresponds to Cloud KMS + * multi-region us. For Firestore's eur3 multi-region, this corresponds to + * Cloud KMS multi-region europe. See + * https://cloud.google.com/kms/docs/locations. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); + parent::__construct($data); + } + + /** + * Required. Only keys in the same location as the database are allowed to + * be used for encryption. + * For Firestore's nam5 multi-region, this corresponds to Cloud KMS + * multi-region us. For Firestore's eur3 multi-region, this corresponds to + * Cloud KMS multi-region europe. See + * https://cloud.google.com/kms/docs/locations. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * + * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKmsKeyName() + { + return $this->kms_key_name; + } + + /** + * Required. Only keys in the same location as the database are allowed to + * be used for encryption. + * For Firestore's nam5 multi-region, this corresponds to Cloud KMS + * multi-region us. For Firestore's eur3 multi-region, this corresponds to + * Cloud KMS multi-region europe. See + * https://cloud.google.com/kms/docs/locations. + * The expected format is + * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + * + * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKmsKeyName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/GoogleDefaultEncryptionOptions.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/GoogleDefaultEncryptionOptions.php new file mode 100644 index 000000000000..3c68de993d27 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/GoogleDefaultEncryptionOptions.php @@ -0,0 +1,33 @@ +google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions + */ +class GoogleDefaultEncryptionOptions extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/SourceEncryptionOptions.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/SourceEncryptionOptions.php new file mode 100644 index 000000000000..245e680690bc --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/SourceEncryptionOptions.php @@ -0,0 +1,34 @@ +google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions + */ +class SourceEncryptionOptions extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/PointInTimeRecoveryEnablement.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/PointInTimeRecoveryEnablement.php new file mode 100644 index 000000000000..fff9f69765f7 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/PointInTimeRecoveryEnablement.php @@ -0,0 +1,67 @@ +google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement + */ +class PointInTimeRecoveryEnablement +{ + /** + * Not used. + * + * Generated from protobuf enum POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED = 0; + */ + const POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED = 0; + /** + * Reads are supported on selected versions of the data from within the past + * 7 days: + * * Reads against any timestamp within the past hour + * * Reads against 1-minute snapshots beyond 1 hour and within 7 days + * `version_retention_period` and `earliest_version_time` can be + * used to determine the supported versions. + * + * Generated from protobuf enum POINT_IN_TIME_RECOVERY_ENABLED = 1; + */ + const POINT_IN_TIME_RECOVERY_ENABLED = 1; + /** + * Reads are supported on any version of the data from within the past 1 + * hour. + * + * Generated from protobuf enum POINT_IN_TIME_RECOVERY_DISABLED = 2; + */ + const POINT_IN_TIME_RECOVERY_DISABLED = 2; + + private static $valueToName = [ + self::POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED => 'POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED', + self::POINT_IN_TIME_RECOVERY_ENABLED => 'POINT_IN_TIME_RECOVERY_ENABLED', + self::POINT_IN_TIME_RECOVERY_DISABLED => 'POINT_IN_TIME_RECOVERY_DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo.php new file mode 100644 index 000000000000..4677a5d1b31b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo.php @@ -0,0 +1,120 @@ +google.firestore.admin.v1.Database.SourceInfo + */ +class SourceInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The associated long-running operation. This field may not be set after + * the operation has completed. Format: + * `projects/{project}/databases/{database}/operations/{operation}`. + * + * Generated from protobuf field string operation = 3 [(.google.api.resource_reference) = { + */ + protected $operation = ''; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource $backup + * If set, this database was restored from the specified backup (or a + * snapshot thereof). + * @type string $operation + * The associated long-running operation. This field may not be set after + * the operation has completed. Format: + * `projects/{project}/databases/{database}/operations/{operation}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); + parent::__construct($data); + } + + /** + * If set, this database was restored from the specified backup (or a + * snapshot thereof). + * + * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; + * @return \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource|null + */ + public function getBackup() + { + return $this->readOneof(1); + } + + public function hasBackup() + { + return $this->hasOneof(1); + } + + /** + * If set, this database was restored from the specified backup (or a + * snapshot thereof). + * + * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; + * @param \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The associated long-running operation. This field may not be set after + * the operation has completed. Format: + * `projects/{project}/databases/{database}/operations/{operation}`. + * + * Generated from protobuf field string operation = 3 [(.google.api.resource_reference) = { + * @return string + */ + public function getOperation() + { + return $this->operation; + } + + /** + * The associated long-running operation. This field may not be set after + * the operation has completed. Format: + * `projects/{project}/databases/{database}/operations/{operation}`. + * + * Generated from protobuf field string operation = 3 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkString($var, True); + $this->operation = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo/BackupSource.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo/BackupSource.php new file mode 100644 index 000000000000..43ccc3a5167b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo/BackupSource.php @@ -0,0 +1,75 @@ +google.firestore.admin.v1.Database.SourceInfo.BackupSource + */ +class BackupSource extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the backup that was used to restore this + * database. Format: + * `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string backup = 1 [(.google.api.resource_reference) = { + */ + protected $backup = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $backup + * The resource name of the backup that was used to restore this + * database. Format: + * `projects/{project}/locations/{location}/backups/{backup}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the backup that was used to restore this + * database. Format: + * `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string backup = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getBackup() + { + return $this->backup; + } + + /** + * The resource name of the backup that was used to restore this + * database. Format: + * `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string backup = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkString($var, True); + $this->backup = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupRequest.php new file mode 100644 index 000000000000..2495637aee5b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupRequest.php @@ -0,0 +1,88 @@ +google.firestore.admin.v1.DeleteBackupRequest + */ +class DeleteBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the backup to delete. + * format is `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the backup to delete. + * + * format is `projects/{project}/locations/{location}/backups/{backup}`. Please see + * {@see FirestoreAdminClient::backupName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\DeleteBackupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the backup to delete. + * format is `projects/{project}/locations/{location}/backups/{backup}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the backup to delete. + * format is `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the backup to delete. + * format is `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupScheduleRequest.php new file mode 100644 index 000000000000..db965ce73d76 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupScheduleRequest.php @@ -0,0 +1,92 @@ +google.firestore.admin.v1.DeleteBackupScheduleRequest + */ +class DeleteBackupScheduleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the backup schedule. + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the backup schedule. + * + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * Please see {@see FirestoreAdminClient::backupScheduleName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\DeleteBackupScheduleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the backup schedule. + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the backup schedule. + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the backup schedule. + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseMetadata.php new file mode 100644 index 000000000000..a1573dc43b4c --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseMetadata.php @@ -0,0 +1,33 @@ +google.firestore.admin.v1.DeleteDatabaseMetadata + */ +class DeleteDatabaseMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseRequest.php new file mode 100644 index 000000000000..cc25c2af8af8 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseRequest.php @@ -0,0 +1,129 @@ +google.firestore.admin.v1.DeleteDatabaseRequest + */ +class DeleteDatabaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The current etag of the Database. + * If an etag is provided and does not match the current etag of the database, + * deletion will be blocked and a FAILED_PRECONDITION error will be returned. + * + * Generated from protobuf field string etag = 3; + */ + protected $etag = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}` + * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\DeleteDatabaseRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}` + * @type string $etag + * The current etag of the Database. + * If an etag is provided and does not match the current etag of the database, + * deletion will be blocked and a FAILED_PRECONDITION error will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The current etag of the Database. + * If an etag is provided and does not match the current etag of the database, + * deletion will be blocked and a FAILED_PRECONDITION error will be returned. + * + * Generated from protobuf field string etag = 3; + * @return string + */ + public function getEtag() + { + return $this->etag; + } + + /** + * The current etag of the Database. + * If an etag is provided and does not match the current etag of the database, + * deletion will be blocked and a FAILED_PRECONDITION error will be returned. + * + * Generated from protobuf field string etag = 3; + * @param string $var + * @return $this + */ + public function setEtag($var) + { + GPBUtil::checkString($var, True); + $this->etag = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php new file mode 100644 index 000000000000..af55872cb361 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.DeleteIndexRequest + */ +class DeleteIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * Please see {@see FirestoreAdminClient::indexName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\DeleteIndexRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteUserCredsRequest.php new file mode 100644 index 000000000000..5b8386eac930 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteUserCredsRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.DeleteUserCredsRequest + */ +class DeleteUserCredsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\DeleteUserCredsRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DisableUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DisableUserCredsRequest.php new file mode 100644 index 000000000000..df8d6e29323a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DisableUserCredsRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.DisableUserCredsRequest + */ +class DisableUserCredsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\DisableUserCredsRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/EnableUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/EnableUserCredsRequest.php new file mode 100644 index 000000000000..15bfff96c98b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/EnableUserCredsRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.EnableUserCredsRequest + */ +class EnableUserCredsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\EnableUserCredsRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php new file mode 100644 index 000000000000..9af4ec049423 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php @@ -0,0 +1,403 @@ +google.firestore.admin.v1.ExportDocumentsMetadata + */ +class ExportDocumentsMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The state of the export operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + */ + protected $operation_state = 0; + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + */ + protected $progress_documents = null; + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + protected $progress_bytes = null; + /** + * Which collection IDs are being exported. + * + * Generated from protobuf field repeated string collection_ids = 6; + */ + private $collection_ids; + /** + * Where the documents are being exported to. + * + * Generated from protobuf field string output_uri_prefix = 7; + */ + protected $output_uri_prefix = ''; + /** + * Which namespace IDs are being exported. + * + * Generated from protobuf field repeated string namespace_ids = 8; + */ + private $namespace_ids; + /** + * The timestamp that corresponds to the version of the database that is being + * exported. If unspecified, there are no guarantees about the consistency of + * the documents being exported. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 9; + */ + protected $snapshot_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The time this operation started. + * @type \Google\Protobuf\Timestamp $end_time + * The time this operation completed. Will be unset if operation still in + * progress. + * @type int $operation_state + * The state of the export operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents + * The progress, in documents, of this operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes + * The progress, in bytes, of this operation. + * @type string[] $collection_ids + * Which collection IDs are being exported. + * @type string $output_uri_prefix + * Where the documents are being exported to. + * @type string[] $namespace_ids + * Which namespace IDs are being exported. + * @type \Google\Protobuf\Timestamp $snapshot_time + * The timestamp that corresponds to the version of the database that is being + * exported. If unspecified, there are no guarantees about the consistency of + * the documents being exported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The state of the export operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @return int + */ + public function getOperationState() + { + return $this->operation_state; + } + + /** + * The state of the export operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @param int $var + * @return $this + */ + public function setOperationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); + $this->operation_state = $var; + + return $this; + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressDocuments() + { + return $this->progress_documents; + } + + public function hasProgressDocuments() + { + return isset($this->progress_documents); + } + + public function clearProgressDocuments() + { + unset($this->progress_documents); + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_documents = $var; + + return $this; + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressBytes() + { + return $this->progress_bytes; + } + + public function hasProgressBytes() + { + return isset($this->progress_bytes); + } + + public function clearProgressBytes() + { + unset($this->progress_bytes); + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressBytes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_bytes = $var; + + return $this; + } + + /** + * Which collection IDs are being exported. + * + * Generated from protobuf field repeated string collection_ids = 6; + * @return RepeatedField + */ + public function getCollectionIds() + { + return $this->collection_ids; + } + + /** + * Which collection IDs are being exported. + * + * Generated from protobuf field repeated string collection_ids = 6; + * @param string[] $var + * @return $this + */ + public function setCollectionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->collection_ids = $arr; + + return $this; + } + + /** + * Where the documents are being exported to. + * + * Generated from protobuf field string output_uri_prefix = 7; + * @return string + */ + public function getOutputUriPrefix() + { + return $this->output_uri_prefix; + } + + /** + * Where the documents are being exported to. + * + * Generated from protobuf field string output_uri_prefix = 7; + * @param string $var + * @return $this + */ + public function setOutputUriPrefix($var) + { + GPBUtil::checkString($var, True); + $this->output_uri_prefix = $var; + + return $this; + } + + /** + * Which namespace IDs are being exported. + * + * Generated from protobuf field repeated string namespace_ids = 8; + * @return RepeatedField + */ + public function getNamespaceIds() + { + return $this->namespace_ids; + } + + /** + * Which namespace IDs are being exported. + * + * Generated from protobuf field repeated string namespace_ids = 8; + * @param string[] $var + * @return $this + */ + public function setNamespaceIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->namespace_ids = $arr; + + return $this; + } + + /** + * The timestamp that corresponds to the version of the database that is being + * exported. If unspecified, there are no guarantees about the consistency of + * the documents being exported. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 9; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSnapshotTime() + { + return $this->snapshot_time; + } + + public function hasSnapshotTime() + { + return isset($this->snapshot_time); + } + + public function clearSnapshotTime() + { + unset($this->snapshot_time); + } + + /** + * The timestamp that corresponds to the version of the database that is being + * exported. If unspecified, there are no guarantees about the consistency of + * the documents being exported. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 9; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSnapshotTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->snapshot_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php new file mode 100644 index 000000000000..eb91d63fb295 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php @@ -0,0 +1,305 @@ +google.firestore.admin.v1.ExportDocumentsRequest + */ +class ExportDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Database to export. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * IDs of the collection groups to export. Unspecified means all + * collection groups. Each collection group in this list must be unique. + * + * Generated from protobuf field repeated string collection_ids = 2; + */ + private $collection_ids; + /** + * The output URI. Currently only supports Google Cloud Storage URIs of the + * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + * Google Cloud Storage namespace path. When + * choosing a name, be sure to consider Google Cloud Storage naming + * guidelines: https://cloud.google.com/storage/docs/naming. + * If the URI is a bucket (without a namespace path), a prefix will be + * generated based on the start time. + * + * Generated from protobuf field string output_uri_prefix = 3; + */ + protected $output_uri_prefix = ''; + /** + * An empty list represents all namespaces. This is the preferred + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to include them. Each namespace in this list must be unique. + * + * Generated from protobuf field repeated string namespace_ids = 4; + */ + private $namespace_ids; + /** + * The timestamp that corresponds to the version of the database to be + * exported. The timestamp must be in the past, rounded to the minute and not + * older than + * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. + * If specified, then the exported documents will represent a consistent view + * of the database at the provided time. Otherwise, there are no guarantees + * about the consistency of the exported documents. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 5; + */ + protected $snapshot_time = null; + + /** + * @param string $name Required. Database to export. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. Please see + * {@see FirestoreAdminClient::databaseName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\ExportDocumentsRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Database to export. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * @type string[] $collection_ids + * IDs of the collection groups to export. Unspecified means all + * collection groups. Each collection group in this list must be unique. + * @type string $output_uri_prefix + * The output URI. Currently only supports Google Cloud Storage URIs of the + * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + * Google Cloud Storage namespace path. When + * choosing a name, be sure to consider Google Cloud Storage naming + * guidelines: https://cloud.google.com/storage/docs/naming. + * If the URI is a bucket (without a namespace path), a prefix will be + * generated based on the start time. + * @type string[] $namespace_ids + * An empty list represents all namespaces. This is the preferred + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to include them. Each namespace in this list must be unique. + * @type \Google\Protobuf\Timestamp $snapshot_time + * The timestamp that corresponds to the version of the database to be + * exported. The timestamp must be in the past, rounded to the minute and not + * older than + * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. + * If specified, then the exported documents will represent a consistent view + * of the database at the provided time. Otherwise, there are no guarantees + * about the consistency of the exported documents. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. Database to export. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Database to export. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * IDs of the collection groups to export. Unspecified means all + * collection groups. Each collection group in this list must be unique. + * + * Generated from protobuf field repeated string collection_ids = 2; + * @return RepeatedField + */ + public function getCollectionIds() + { + return $this->collection_ids; + } + + /** + * IDs of the collection groups to export. Unspecified means all + * collection groups. Each collection group in this list must be unique. + * + * Generated from protobuf field repeated string collection_ids = 2; + * @param string[] $var + * @return $this + */ + public function setCollectionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->collection_ids = $arr; + + return $this; + } + + /** + * The output URI. Currently only supports Google Cloud Storage URIs of the + * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + * Google Cloud Storage namespace path. When + * choosing a name, be sure to consider Google Cloud Storage naming + * guidelines: https://cloud.google.com/storage/docs/naming. + * If the URI is a bucket (without a namespace path), a prefix will be + * generated based on the start time. + * + * Generated from protobuf field string output_uri_prefix = 3; + * @return string + */ + public function getOutputUriPrefix() + { + return $this->output_uri_prefix; + } + + /** + * The output URI. Currently only supports Google Cloud Storage URIs of the + * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + * Google Cloud Storage namespace path. When + * choosing a name, be sure to consider Google Cloud Storage naming + * guidelines: https://cloud.google.com/storage/docs/naming. + * If the URI is a bucket (without a namespace path), a prefix will be + * generated based on the start time. + * + * Generated from protobuf field string output_uri_prefix = 3; + * @param string $var + * @return $this + */ + public function setOutputUriPrefix($var) + { + GPBUtil::checkString($var, True); + $this->output_uri_prefix = $var; + + return $this; + } + + /** + * An empty list represents all namespaces. This is the preferred + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to include them. Each namespace in this list must be unique. + * + * Generated from protobuf field repeated string namespace_ids = 4; + * @return RepeatedField + */ + public function getNamespaceIds() + { + return $this->namespace_ids; + } + + /** + * An empty list represents all namespaces. This is the preferred + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to include them. Each namespace in this list must be unique. + * + * Generated from protobuf field repeated string namespace_ids = 4; + * @param string[] $var + * @return $this + */ + public function setNamespaceIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->namespace_ids = $arr; + + return $this; + } + + /** + * The timestamp that corresponds to the version of the database to be + * exported. The timestamp must be in the past, rounded to the minute and not + * older than + * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. + * If specified, then the exported documents will represent a consistent view + * of the database at the provided time. Otherwise, there are no guarantees + * about the consistency of the exported documents. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSnapshotTime() + { + return $this->snapshot_time; + } + + public function hasSnapshotTime() + { + return isset($this->snapshot_time); + } + + public function clearSnapshotTime() + { + unset($this->snapshot_time); + } + + /** + * The timestamp that corresponds to the version of the database to be + * exported. The timestamp must be in the past, rounded to the minute and not + * older than + * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. + * If specified, then the exported documents will represent a consistent view + * of the database at the provided time. Otherwise, there are no guarantees + * about the consistency of the exported documents. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSnapshotTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->snapshot_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php new file mode 100644 index 000000000000..63aac67f8b8a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php @@ -0,0 +1,76 @@ +google.firestore.admin.v1.ExportDocumentsResponse + */ +class ExportDocumentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Location of the output files. This can be used to begin an import + * into Cloud Firestore (this project or another project) after the operation + * completes successfully. + * + * Generated from protobuf field string output_uri_prefix = 1; + */ + protected $output_uri_prefix = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $output_uri_prefix + * Location of the output files. This can be used to begin an import + * into Cloud Firestore (this project or another project) after the operation + * completes successfully. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * Location of the output files. This can be used to begin an import + * into Cloud Firestore (this project or another project) after the operation + * completes successfully. + * + * Generated from protobuf field string output_uri_prefix = 1; + * @return string + */ + public function getOutputUriPrefix() + { + return $this->output_uri_prefix; + } + + /** + * Location of the output files. This can be used to begin an import + * into Cloud Firestore (this project or another project) after the operation + * completes successfully. + * + * Generated from protobuf field string output_uri_prefix = 1; + * @param string $var + * @return $this + */ + public function setOutputUriPrefix($var) + { + GPBUtil::checkString($var, True); + $this->output_uri_prefix = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php new file mode 100644 index 000000000000..28645d2447cf --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php @@ -0,0 +1,253 @@ +google.firestore.admin.v1.Field + */ +class Field extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A field name of the form: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * A field path can be a simple field name, e.g. `address` or a path to fields + * within `map_value` , e.g. `address.city`, + * or a special field path. The only valid special field is `*`, which + * represents any field. + * Field paths can be quoted using `` ` `` (backtick). The only character that + * must be escaped within a quoted field path is the backtick character + * itself, escaped using a backslash. Special characters in field paths that + * must be quoted include: `*`, `.`, + * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. + * Examples: + * `` `address.city` `` represents a field named `address.city`, not the map + * key `city` in the field `address`. `` `*` `` represents a field named `*`, + * not any field. + * A special `Field` contains the default indexing settings for all fields. + * This field's resource name is: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` + * Indexes defined on this `Field` will be applied to all fields which do not + * have their own `Field` index configuration. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * The index configuration for this field. If unset, field indexing will + * revert to the configuration defined by the `ancestor_field`. To + * explicitly remove all indexes for this field, specify an index config + * with an empty list of indexes. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + */ + protected $index_config = null; + /** + * The TTL configuration for this `Field`. + * Setting or unsetting this will enable or disable the TTL for + * documents that have this `Field`. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; + */ + protected $ttl_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A field name of the form: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * A field path can be a simple field name, e.g. `address` or a path to fields + * within `map_value` , e.g. `address.city`, + * or a special field path. The only valid special field is `*`, which + * represents any field. + * Field paths can be quoted using `` ` `` (backtick). The only character that + * must be escaped within a quoted field path is the backtick character + * itself, escaped using a backslash. Special characters in field paths that + * must be quoted include: `*`, `.`, + * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. + * Examples: + * `` `address.city` `` represents a field named `address.city`, not the map + * key `city` in the field `address`. `` `*` `` represents a field named `*`, + * not any field. + * A special `Field` contains the default indexing settings for all fields. + * This field's resource name is: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` + * Indexes defined on this `Field` will be applied to all fields which do not + * have their own `Field` index configuration. + * @type \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig $index_config + * The index configuration for this field. If unset, field indexing will + * revert to the configuration defined by the `ancestor_field`. To + * explicitly remove all indexes for this field, specify an index config + * with an empty list of indexes. + * @type \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig $ttl_config + * The TTL configuration for this `Field`. + * Setting or unsetting this will enable or disable the TTL for + * documents that have this `Field`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); + parent::__construct($data); + } + + /** + * Required. A field name of the form: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * A field path can be a simple field name, e.g. `address` or a path to fields + * within `map_value` , e.g. `address.city`, + * or a special field path. The only valid special field is `*`, which + * represents any field. + * Field paths can be quoted using `` ` `` (backtick). The only character that + * must be escaped within a quoted field path is the backtick character + * itself, escaped using a backslash. Special characters in field paths that + * must be quoted include: `*`, `.`, + * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. + * Examples: + * `` `address.city` `` represents a field named `address.city`, not the map + * key `city` in the field `address`. `` `*` `` represents a field named `*`, + * not any field. + * A special `Field` contains the default indexing settings for all fields. + * This field's resource name is: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` + * Indexes defined on this `Field` will be applied to all fields which do not + * have their own `Field` index configuration. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A field name of the form: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * A field path can be a simple field name, e.g. `address` or a path to fields + * within `map_value` , e.g. `address.city`, + * or a special field path. The only valid special field is `*`, which + * represents any field. + * Field paths can be quoted using `` ` `` (backtick). The only character that + * must be escaped within a quoted field path is the backtick character + * itself, escaped using a backslash. Special characters in field paths that + * must be quoted include: `*`, `.`, + * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. + * Examples: + * `` `address.city` `` represents a field named `address.city`, not the map + * key `city` in the field `address`. `` `*` `` represents a field named `*`, + * not any field. + * A special `Field` contains the default indexing settings for all fields. + * This field's resource name is: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` + * Indexes defined on this `Field` will be applied to all fields which do not + * have their own `Field` index configuration. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The index configuration for this field. If unset, field indexing will + * revert to the configuration defined by the `ancestor_field`. To + * explicitly remove all indexes for this field, specify an index config + * with an empty list of indexes. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + * @return \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig|null + */ + public function getIndexConfig() + { + return $this->index_config; + } + + public function hasIndexConfig() + { + return isset($this->index_config); + } + + public function clearIndexConfig() + { + unset($this->index_config); + } + + /** + * The index configuration for this field. If unset, field indexing will + * revert to the configuration defined by the `ancestor_field`. To + * explicitly remove all indexes for this field, specify an index config + * with an empty list of indexes. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; + * @param \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig $var + * @return $this + */ + public function setIndexConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig::class); + $this->index_config = $var; + + return $this; + } + + /** + * The TTL configuration for this `Field`. + * Setting or unsetting this will enable or disable the TTL for + * documents that have this `Field`. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; + * @return \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig|null + */ + public function getTtlConfig() + { + return $this->ttl_config; + } + + public function hasTtlConfig() + { + return isset($this->ttl_config); + } + + public function clearTtlConfig() + { + unset($this->ttl_config); + } + + /** + * The TTL configuration for this `Field`. + * Setting or unsetting this will enable or disable the TTL for + * documents that have this `Field`. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; + * @param \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig $var + * @return $this + */ + public function setTtlConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig::class); + $this->ttl_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php new file mode 100644 index 000000000000..7c74b5f4b7b5 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php @@ -0,0 +1,205 @@ +google.firestore.admin.v1.Field.IndexConfig + */ +class IndexConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The indexes supported for this field. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; + */ + private $indexes; + /** + * Output only. When true, the `Field`'s index configuration is set from the + * configuration specified by the `ancestor_field`. + * When false, the `Field`'s index configuration is defined explicitly. + * + * Generated from protobuf field bool uses_ancestor_config = 2; + */ + protected $uses_ancestor_config = false; + /** + * Output only. Specifies the resource name of the `Field` from which this + * field's index configuration is set (when `uses_ancestor_config` is true), + * or from which it *would* be set if this field had no index configuration + * (when `uses_ancestor_config` is false). + * + * Generated from protobuf field string ancestor_field = 3; + */ + protected $ancestor_field = ''; + /** + * Output only + * When true, the `Field`'s index configuration is in the process of being + * reverted. Once complete, the index config will transition to the same + * state as the field specified by `ancestor_field`, at which point + * `uses_ancestor_config` will be `true` and `reverting` will be `false`. + * + * Generated from protobuf field bool reverting = 4; + */ + protected $reverting = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\Index[] $indexes + * The indexes supported for this field. + * @type bool $uses_ancestor_config + * Output only. When true, the `Field`'s index configuration is set from the + * configuration specified by the `ancestor_field`. + * When false, the `Field`'s index configuration is defined explicitly. + * @type string $ancestor_field + * Output only. Specifies the resource name of the `Field` from which this + * field's index configuration is set (when `uses_ancestor_config` is true), + * or from which it *would* be set if this field had no index configuration + * (when `uses_ancestor_config` is false). + * @type bool $reverting + * Output only + * When true, the `Field`'s index configuration is in the process of being + * reverted. Once complete, the index config will transition to the same + * state as the field specified by `ancestor_field`, at which point + * `uses_ancestor_config` will be `true` and `reverting` will be `false`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); + parent::__construct($data); + } + + /** + * The indexes supported for this field. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; + * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Index> + */ + public function getIndexes() + { + return $this->indexes; + } + + /** + * The indexes supported for this field. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; + * @param \Google\Cloud\Firestore\Admin\V1\Index[] $var + * @return $this + */ + public function setIndexes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index::class); + $this->indexes = $arr; + + return $this; + } + + /** + * Output only. When true, the `Field`'s index configuration is set from the + * configuration specified by the `ancestor_field`. + * When false, the `Field`'s index configuration is defined explicitly. + * + * Generated from protobuf field bool uses_ancestor_config = 2; + * @return bool + */ + public function getUsesAncestorConfig() + { + return $this->uses_ancestor_config; + } + + /** + * Output only. When true, the `Field`'s index configuration is set from the + * configuration specified by the `ancestor_field`. + * When false, the `Field`'s index configuration is defined explicitly. + * + * Generated from protobuf field bool uses_ancestor_config = 2; + * @param bool $var + * @return $this + */ + public function setUsesAncestorConfig($var) + { + GPBUtil::checkBool($var); + $this->uses_ancestor_config = $var; + + return $this; + } + + /** + * Output only. Specifies the resource name of the `Field` from which this + * field's index configuration is set (when `uses_ancestor_config` is true), + * or from which it *would* be set if this field had no index configuration + * (when `uses_ancestor_config` is false). + * + * Generated from protobuf field string ancestor_field = 3; + * @return string + */ + public function getAncestorField() + { + return $this->ancestor_field; + } + + /** + * Output only. Specifies the resource name of the `Field` from which this + * field's index configuration is set (when `uses_ancestor_config` is true), + * or from which it *would* be set if this field had no index configuration + * (when `uses_ancestor_config` is false). + * + * Generated from protobuf field string ancestor_field = 3; + * @param string $var + * @return $this + */ + public function setAncestorField($var) + { + GPBUtil::checkString($var, True); + $this->ancestor_field = $var; + + return $this; + } + + /** + * Output only + * When true, the `Field`'s index configuration is in the process of being + * reverted. Once complete, the index config will transition to the same + * state as the field specified by `ancestor_field`, at which point + * `uses_ancestor_config` will be `true` and `reverting` will be `false`. + * + * Generated from protobuf field bool reverting = 4; + * @return bool + */ + public function getReverting() + { + return $this->reverting; + } + + /** + * Output only + * When true, the `Field`'s index configuration is in the process of being + * reverted. Once complete, the index config will transition to the same + * state as the field specified by `ancestor_field`, at which point + * `uses_ancestor_config` will be `true` and `reverting` will be `false`. + * + * Generated from protobuf field bool reverting = 4; + * @param bool $var + * @return $this + */ + public function setReverting($var) + { + GPBUtil::checkBool($var); + $this->reverting = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php new file mode 100644 index 000000000000..664a2ae55edb --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php @@ -0,0 +1,140 @@ +google.firestore.admin.v1.Field.TtlConfig + */ +class TtlConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The state of the TTL configuration. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Optional. The offset, relative to the timestamp value from the + * TTL-enabled field, used to determine the document's expiration time. + * `expiration_offset.seconds` must be between 0 and 2,147,483,647 + * inclusive. Values more precise than seconds are rejected. + * If unset, defaults to 0, in which case the expiration time is the same + * as the timestamp value from the TTL-enabled field. + * + * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $expiration_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Output only. The state of the TTL configuration. + * @type \Google\Protobuf\Duration $expiration_offset + * Optional. The offset, relative to the timestamp value from the + * TTL-enabled field, used to determine the document's expiration time. + * `expiration_offset.seconds` must be between 0 and 2,147,483,647 + * inclusive. Values more precise than seconds are rejected. + * If unset, defaults to 0, in which case the expiration time is the same + * as the timestamp value from the TTL-enabled field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The state of the TTL configuration. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the TTL configuration. + * + * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig\State::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. The offset, relative to the timestamp value from the + * TTL-enabled field, used to determine the document's expiration time. + * `expiration_offset.seconds` must be between 0 and 2,147,483,647 + * inclusive. Values more precise than seconds are rejected. + * If unset, defaults to 0, in which case the expiration time is the same + * as the timestamp value from the TTL-enabled field. + * + * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getExpirationOffset() + { + return $this->expiration_offset; + } + + public function hasExpirationOffset() + { + return isset($this->expiration_offset); + } + + public function clearExpirationOffset() + { + unset($this->expiration_offset); + } + + /** + * Optional. The offset, relative to the timestamp value from the + * TTL-enabled field, used to determine the document's expiration time. + * `expiration_offset.seconds` must be between 0 and 2,147,483,647 + * inclusive. Values more precise than seconds are rejected. + * If unset, defaults to 0, in which case the expiration time is the same + * as the timestamp value from the TTL-enabled field. + * + * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setExpirationOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->expiration_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php new file mode 100644 index 000000000000..3f5647cd9139 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php @@ -0,0 +1,75 @@ +google.firestore.admin.v1.Field.TtlConfig.State + */ +class State +{ + /** + * The state is unspecified or unknown. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The TTL is being applied. There is an active long-running operation to + * track the change. Newly written documents will have TTLs applied as + * requested. Requested TTLs on existing documents are still being + * processed. When TTLs on all existing documents have been processed, the + * state will move to 'ACTIVE'. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The TTL is active for all documents. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * The TTL configuration could not be enabled for all existing documents. + * Newly written documents will continue to have their TTL applied. + * The LRO returned when last attempting to enable TTL for this `Field` + * has failed, and may have more details. + * + * Generated from protobuf enum NEEDS_REPAIR = 3; + */ + const NEEDS_REPAIR = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::NEEDS_REPAIR => 'NEEDS_REPAIR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php new file mode 100644 index 000000000000..8df053b4e432 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php @@ -0,0 +1,373 @@ +google.firestore.admin.v1.FieldOperationMetadata + */ +class FieldOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The field resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * + * Generated from protobuf field string field = 3; + */ + protected $field = ''; + /** + * A list of + * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], + * which describe the intent of this operation. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + */ + private $index_config_deltas; + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; + */ + protected $state = 0; + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; + */ + protected $progress_documents = null; + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; + */ + protected $progress_bytes = null; + /** + * Describes the deltas of TTL configuration. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; + */ + protected $ttl_config_delta = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The time this operation started. + * @type \Google\Protobuf\Timestamp $end_time + * The time this operation completed. Will be unset if operation still in + * progress. + * @type string $field + * The field resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * @type \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta[] $index_config_deltas + * A list of + * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], + * which describe the intent of this operation. + * @type int $state + * The state of the operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents + * The progress, in documents, of this operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes + * The progress, in bytes, of this operation. + * @type \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta $ttl_config_delta + * Describes the deltas of TTL configuration. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The field resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * + * Generated from protobuf field string field = 3; + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * The field resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + * + * Generated from protobuf field string field = 3; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->field = $var; + + return $this; + } + + /** + * A list of + * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], + * which describe the intent of this operation. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta> + */ + public function getIndexConfigDeltas() + { + return $this->index_config_deltas; + } + + /** + * A list of + * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], + * which describe the intent of this operation. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; + * @param \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta[] $var + * @return $this + */ + public function setIndexConfigDeltas($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta::class); + $this->index_config_deltas = $arr; + + return $this; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); + $this->state = $var; + + return $this; + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressDocuments() + { + return $this->progress_documents; + } + + public function hasProgressDocuments() + { + return isset($this->progress_documents); + } + + public function clearProgressDocuments() + { + unset($this->progress_documents); + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_documents = $var; + + return $this; + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressBytes() + { + return $this->progress_bytes; + } + + public function hasProgressBytes() + { + return isset($this->progress_bytes); + } + + public function clearProgressBytes() + { + unset($this->progress_bytes); + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressBytes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_bytes = $var; + + return $this; + } + + /** + * Describes the deltas of TTL configuration. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; + * @return \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta|null + */ + public function getTtlConfigDelta() + { + return $this->ttl_config_delta; + } + + public function hasTtlConfigDelta() + { + return isset($this->ttl_config_delta); + } + + public function clearTtlConfigDelta() + { + unset($this->ttl_config_delta); + } + + /** + * Describes the deltas of TTL configuration. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; + * @param \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta $var + * @return $this + */ + public function setTtlConfigDelta($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta::class); + $this->ttl_config_delta = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php new file mode 100644 index 000000000000..212f34a5b90c --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php @@ -0,0 +1,111 @@ +google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta + */ +class IndexConfigDelta extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies how the index is changing. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; + */ + protected $change_type = 0; + /** + * The index being changed. + * + * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; + */ + protected $index = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $change_type + * Specifies how the index is changing. + * @type \Google\Cloud\Firestore\Admin\V1\Index $index + * The index being changed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * Specifies how the index is changing. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; + * @return int + */ + public function getChangeType() + { + return $this->change_type; + } + + /** + * Specifies how the index is changing. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; + * @param int $var + * @return $this + */ + public function setChangeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta\ChangeType::class); + $this->change_type = $var; + + return $this; + } + + /** + * The index being changed. + * + * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; + * @return \Google\Cloud\Firestore\Admin\V1\Index|null + */ + public function getIndex() + { + return $this->index; + } + + public function hasIndex() + { + return isset($this->index); + } + + public function clearIndex() + { + unset($this->index); + } + + /** + * The index being changed. + * + * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; + * @param \Google\Cloud\Firestore\Admin\V1\Index $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index::class); + $this->index = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php new file mode 100644 index 000000000000..cf7058555cad --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php @@ -0,0 +1,61 @@ +google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType + */ +class ChangeType +{ + /** + * The type of change is not specified or known. + * + * Generated from protobuf enum CHANGE_TYPE_UNSPECIFIED = 0; + */ + const CHANGE_TYPE_UNSPECIFIED = 0; + /** + * The single field index is being added. + * + * Generated from protobuf enum ADD = 1; + */ + const ADD = 1; + /** + * The single field index is being removed. + * + * Generated from protobuf enum REMOVE = 2; + */ + const REMOVE = 2; + + private static $valueToName = [ + self::CHANGE_TYPE_UNSPECIFIED => 'CHANGE_TYPE_UNSPECIFIED', + self::ADD => 'ADD', + self::REMOVE => 'REMOVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php new file mode 100644 index 000000000000..7e4bcbf2e563 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php @@ -0,0 +1,115 @@ +google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta + */ +class TtlConfigDelta extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies how the TTL configuration is changing. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; + */ + protected $change_type = 0; + /** + * The offset, relative to the timestamp value in the TTL-enabled field, + * used determine the document's expiration time. + * + * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3; + */ + protected $expiration_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $change_type + * Specifies how the TTL configuration is changing. + * @type \Google\Protobuf\Duration $expiration_offset + * The offset, relative to the timestamp value in the TTL-enabled field, + * used determine the document's expiration time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * Specifies how the TTL configuration is changing. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; + * @return int + */ + public function getChangeType() + { + return $this->change_type; + } + + /** + * Specifies how the TTL configuration is changing. + * + * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; + * @param int $var + * @return $this + */ + public function setChangeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta\ChangeType::class); + $this->change_type = $var; + + return $this; + } + + /** + * The offset, relative to the timestamp value in the TTL-enabled field, + * used determine the document's expiration time. + * + * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getExpirationOffset() + { + return $this->expiration_offset; + } + + public function hasExpirationOffset() + { + return isset($this->expiration_offset); + } + + public function clearExpirationOffset() + { + unset($this->expiration_offset); + } + + /** + * The offset, relative to the timestamp value in the TTL-enabled field, + * used determine the document's expiration time. + * + * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setExpirationOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->expiration_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php new file mode 100644 index 000000000000..ce9d1598e609 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php @@ -0,0 +1,61 @@ +google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType + */ +class ChangeType +{ + /** + * The type of change is not specified or known. + * + * Generated from protobuf enum CHANGE_TYPE_UNSPECIFIED = 0; + */ + const CHANGE_TYPE_UNSPECIFIED = 0; + /** + * The TTL config is being added. + * + * Generated from protobuf enum ADD = 1; + */ + const ADD = 1; + /** + * The TTL config is being removed. + * + * Generated from protobuf enum REMOVE = 2; + */ + const REMOVE = 2; + + private static $valueToName = [ + self::CHANGE_TYPE_UNSPECIFIED => 'CHANGE_TYPE_UNSPECIFIED', + self::ADD => 'ADD', + self::REMOVE => 'REMOVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupRequest.php new file mode 100644 index 000000000000..509497b1c82f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupRequest.php @@ -0,0 +1,88 @@ +google.firestore.admin.v1.GetBackupRequest + */ +class GetBackupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the backup to fetch. + * Format is `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the backup to fetch. + * + * Format is `projects/{project}/locations/{location}/backups/{backup}`. Please see + * {@see FirestoreAdminClient::backupName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\GetBackupRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the backup to fetch. + * Format is `projects/{project}/locations/{location}/backups/{backup}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the backup to fetch. + * Format is `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the backup to fetch. + * Format is `projects/{project}/locations/{location}/backups/{backup}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupScheduleRequest.php new file mode 100644 index 000000000000..efb9342983af --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupScheduleRequest.php @@ -0,0 +1,93 @@ +google.firestore.admin.v1.GetBackupScheduleRequest + */ +class GetBackupScheduleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the backup schedule. + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the backup schedule. + * + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * Please see {@see FirestoreAdminClient::backupScheduleName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\GetBackupScheduleRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the backup schedule. + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the backup schedule. + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the backup schedule. + * Format + * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php new file mode 100644 index 000000000000..de4fafa9bb43 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.GetDatabaseRequest + */ +class GetDatabaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}` + * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\GetDatabaseRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php new file mode 100644 index 000000000000..98a81de0b9cc --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.GetFieldRequest + */ +class GetFieldRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` + * Please see {@see FirestoreAdminClient::fieldName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\GetFieldRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php new file mode 100644 index 000000000000..832f881b9b21 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.GetIndexRequest + */ +class GetIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * Please see {@see FirestoreAdminClient::indexName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\GetIndexRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetUserCredsRequest.php new file mode 100644 index 000000000000..4c672c6b75f3 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetUserCredsRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.GetUserCredsRequest + */ +class GetUserCredsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\GetUserCredsRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php new file mode 100644 index 000000000000..e6ce541ffbed --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php @@ -0,0 +1,351 @@ +google.firestore.admin.v1.ImportDocumentsMetadata + */ +class ImportDocumentsMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The state of the import operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + */ + protected $operation_state = 0; + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + */ + protected $progress_documents = null; + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + */ + protected $progress_bytes = null; + /** + * Which collection IDs are being imported. + * + * Generated from protobuf field repeated string collection_ids = 6; + */ + private $collection_ids; + /** + * The location of the documents being imported. + * + * Generated from protobuf field string input_uri_prefix = 7; + */ + protected $input_uri_prefix = ''; + /** + * Which namespace IDs are being imported. + * + * Generated from protobuf field repeated string namespace_ids = 8; + */ + private $namespace_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The time this operation started. + * @type \Google\Protobuf\Timestamp $end_time + * The time this operation completed. Will be unset if operation still in + * progress. + * @type int $operation_state + * The state of the import operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents + * The progress, in documents, of this operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes + * The progress, in bytes, of this operation. + * @type string[] $collection_ids + * Which collection IDs are being imported. + * @type string $input_uri_prefix + * The location of the documents being imported. + * @type string[] $namespace_ids + * Which namespace IDs are being imported. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The state of the import operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @return int + */ + public function getOperationState() + { + return $this->operation_state; + } + + /** + * The state of the import operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @param int $var + * @return $this + */ + public function setOperationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); + $this->operation_state = $var; + + return $this; + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressDocuments() + { + return $this->progress_documents; + } + + public function hasProgressDocuments() + { + return isset($this->progress_documents); + } + + public function clearProgressDocuments() + { + unset($this->progress_documents); + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_documents = $var; + + return $this; + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressBytes() + { + return $this->progress_bytes; + } + + public function hasProgressBytes() + { + return isset($this->progress_bytes); + } + + public function clearProgressBytes() + { + unset($this->progress_bytes); + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressBytes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_bytes = $var; + + return $this; + } + + /** + * Which collection IDs are being imported. + * + * Generated from protobuf field repeated string collection_ids = 6; + * @return RepeatedField + */ + public function getCollectionIds() + { + return $this->collection_ids; + } + + /** + * Which collection IDs are being imported. + * + * Generated from protobuf field repeated string collection_ids = 6; + * @param string[] $var + * @return $this + */ + public function setCollectionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->collection_ids = $arr; + + return $this; + } + + /** + * The location of the documents being imported. + * + * Generated from protobuf field string input_uri_prefix = 7; + * @return string + */ + public function getInputUriPrefix() + { + return $this->input_uri_prefix; + } + + /** + * The location of the documents being imported. + * + * Generated from protobuf field string input_uri_prefix = 7; + * @param string $var + * @return $this + */ + public function setInputUriPrefix($var) + { + GPBUtil::checkString($var, True); + $this->input_uri_prefix = $var; + + return $this; + } + + /** + * Which namespace IDs are being imported. + * + * Generated from protobuf field repeated string namespace_ids = 8; + * @return RepeatedField + */ + public function getNamespaceIds() + { + return $this->namespace_ids; + } + + /** + * Which namespace IDs are being imported. + * + * Generated from protobuf field repeated string namespace_ids = 8; + * @param string[] $var + * @return $this + */ + public function setNamespaceIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->namespace_ids = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php new file mode 100644 index 000000000000..e59bbc42fc7f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php @@ -0,0 +1,229 @@ +google.firestore.admin.v1.ImportDocumentsRequest + */ +class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Database to import into. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * IDs of the collection groups to import. Unspecified means all collection + * groups that were included in the export. Each collection group in this list + * must be unique. + * + * Generated from protobuf field repeated string collection_ids = 2; + */ + private $collection_ids; + /** + * Location of the exported files. + * This must match the output_uri_prefix of an ExportDocumentsResponse from + * an export that has completed successfully. + * See: + * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. + * + * Generated from protobuf field string input_uri_prefix = 3; + */ + protected $input_uri_prefix = ''; + /** + * An empty list represents all namespaces. This is the preferred + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to include them. Each namespace in this list must be unique. + * + * Generated from protobuf field repeated string namespace_ids = 4; + */ + private $namespace_ids; + + /** + * @param string $name Required. Database to import into. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. Please see + * {@see FirestoreAdminClient::databaseName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\ImportDocumentsRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Database to import into. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * @type string[] $collection_ids + * IDs of the collection groups to import. Unspecified means all collection + * groups that were included in the export. Each collection group in this list + * must be unique. + * @type string $input_uri_prefix + * Location of the exported files. + * This must match the output_uri_prefix of an ExportDocumentsResponse from + * an export that has completed successfully. + * See: + * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. + * @type string[] $namespace_ids + * An empty list represents all namespaces. This is the preferred + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to include them. Each namespace in this list must be unique. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. Database to import into. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Database to import into. Should be of the form: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * IDs of the collection groups to import. Unspecified means all collection + * groups that were included in the export. Each collection group in this list + * must be unique. + * + * Generated from protobuf field repeated string collection_ids = 2; + * @return RepeatedField + */ + public function getCollectionIds() + { + return $this->collection_ids; + } + + /** + * IDs of the collection groups to import. Unspecified means all collection + * groups that were included in the export. Each collection group in this list + * must be unique. + * + * Generated from protobuf field repeated string collection_ids = 2; + * @param string[] $var + * @return $this + */ + public function setCollectionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->collection_ids = $arr; + + return $this; + } + + /** + * Location of the exported files. + * This must match the output_uri_prefix of an ExportDocumentsResponse from + * an export that has completed successfully. + * See: + * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. + * + * Generated from protobuf field string input_uri_prefix = 3; + * @return string + */ + public function getInputUriPrefix() + { + return $this->input_uri_prefix; + } + + /** + * Location of the exported files. + * This must match the output_uri_prefix of an ExportDocumentsResponse from + * an export that has completed successfully. + * See: + * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. + * + * Generated from protobuf field string input_uri_prefix = 3; + * @param string $var + * @return $this + */ + public function setInputUriPrefix($var) + { + GPBUtil::checkString($var, True); + $this->input_uri_prefix = $var; + + return $this; + } + + /** + * An empty list represents all namespaces. This is the preferred + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to include them. Each namespace in this list must be unique. + * + * Generated from protobuf field repeated string namespace_ids = 4; + * @return RepeatedField + */ + public function getNamespaceIds() + { + return $this->namespace_ids; + } + + /** + * An empty list represents all namespaces. This is the preferred + * usage for databases that don't use namespaces. + * An empty string element represents the default namespace. This should be + * used if the database has data in non-default namespaces, but doesn't want + * to include them. Each namespace in this list must be unique. + * + * Generated from protobuf field repeated string namespace_ids = 4; + * @param string[] $var + * @return $this + */ + public function setNamespaceIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->namespace_ids = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php new file mode 100644 index 000000000000..ad324a132809 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php @@ -0,0 +1,432 @@ +google.firestore.admin.v1.Index + */ +class Index extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. A server defined name for this index. + * The form of this name for composite indexes will be: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` + * For single field indexes, this field will be empty. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Indexes with a collection query scope specified allow queries + * against a collection that is the child of a specific document, specified at + * query time, and that has the same collection ID. + * Indexes with a collection group query scope specified allow queries against + * all collections descended from a specific document, specified at query + * time, and that have the same collection ID as this index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; + */ + protected $query_scope = 0; + /** + * The API scope supported by this index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.ApiScope api_scope = 5; + */ + protected $api_scope = 0; + /** + * The fields supported by this index. + * For composite indexes, this requires a minimum of 2 and a maximum of 100 + * fields. The last field entry is always for the field path `__name__`. If, + * on creation, `__name__` was not specified as the last field, it will be + * added automatically with the same direction as that of the last field + * defined. If the final field in a composite index is not directional, the + * `__name__` will be ordered ASCENDING (unless explicitly specified). + * For single field indexes, this will always be exactly one entry with a + * field path equal to the field path of the associated field. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + */ + private $fields; + /** + * Output only. The serving state of the index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; + */ + protected $state = 0; + /** + * Immutable. The density configuration of the index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $density = 0; + /** + * Optional. Whether the index is multikey. By default, the index is not + * multikey. For non-multikey indexes, none of the paths in the index + * definition reach or traverse an array, except via an explicit array index. + * For multikey indexes, at most one of the paths in the index definition + * reach or traverse an array, except via an explicit array index. Violations + * will result in errors. + * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope. + * + * Generated from protobuf field bool multikey = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $multikey = false; + /** + * Optional. The number of shards for the index. + * + * Generated from protobuf field int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $shard_count = 0; + /** + * Optional. Whether it is an unique index. Unique index ensures all values + * for the indexed field(s) are unique across documents. + * + * Generated from protobuf field bool unique = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $unique = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. A server defined name for this index. + * The form of this name for composite indexes will be: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` + * For single field indexes, this field will be empty. + * @type int $query_scope + * Indexes with a collection query scope specified allow queries + * against a collection that is the child of a specific document, specified at + * query time, and that has the same collection ID. + * Indexes with a collection group query scope specified allow queries against + * all collections descended from a specific document, specified at query + * time, and that have the same collection ID as this index. + * @type int $api_scope + * The API scope supported by this index. + * @type \Google\Cloud\Firestore\Admin\V1\Index\IndexField[] $fields + * The fields supported by this index. + * For composite indexes, this requires a minimum of 2 and a maximum of 100 + * fields. The last field entry is always for the field path `__name__`. If, + * on creation, `__name__` was not specified as the last field, it will be + * added automatically with the same direction as that of the last field + * defined. If the final field in a composite index is not directional, the + * `__name__` will be ordered ASCENDING (unless explicitly specified). + * For single field indexes, this will always be exactly one entry with a + * field path equal to the field path of the associated field. + * @type int $state + * Output only. The serving state of the index. + * @type int $density + * Immutable. The density configuration of the index. + * @type bool $multikey + * Optional. Whether the index is multikey. By default, the index is not + * multikey. For non-multikey indexes, none of the paths in the index + * definition reach or traverse an array, except via an explicit array index. + * For multikey indexes, at most one of the paths in the index definition + * reach or traverse an array, except via an explicit array index. Violations + * will result in errors. + * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope. + * @type int $shard_count + * Optional. The number of shards for the index. + * @type bool $unique + * Optional. Whether it is an unique index. Unique index ensures all values + * for the indexed field(s) are unique across documents. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); + parent::__construct($data); + } + + /** + * Output only. A server defined name for this index. + * The form of this name for composite indexes will be: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` + * For single field indexes, this field will be empty. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. A server defined name for this index. + * The form of this name for composite indexes will be: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` + * For single field indexes, this field will be empty. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Indexes with a collection query scope specified allow queries + * against a collection that is the child of a specific document, specified at + * query time, and that has the same collection ID. + * Indexes with a collection group query scope specified allow queries against + * all collections descended from a specific document, specified at query + * time, and that have the same collection ID as this index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; + * @return int + */ + public function getQueryScope() + { + return $this->query_scope; + } + + /** + * Indexes with a collection query scope specified allow queries + * against a collection that is the child of a specific document, specified at + * query time, and that has the same collection ID. + * Indexes with a collection group query scope specified allow queries against + * all collections descended from a specific document, specified at query + * time, and that have the same collection ID as this index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; + * @param int $var + * @return $this + */ + public function setQueryScope($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\QueryScope::class); + $this->query_scope = $var; + + return $this; + } + + /** + * The API scope supported by this index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.ApiScope api_scope = 5; + * @return int + */ + public function getApiScope() + { + return $this->api_scope; + } + + /** + * The API scope supported by this index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.ApiScope api_scope = 5; + * @param int $var + * @return $this + */ + public function setApiScope($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\ApiScope::class); + $this->api_scope = $var; + + return $this; + } + + /** + * The fields supported by this index. + * For composite indexes, this requires a minimum of 2 and a maximum of 100 + * fields. The last field entry is always for the field path `__name__`. If, + * on creation, `__name__` was not specified as the last field, it will be + * added automatically with the same direction as that of the last field + * defined. If the final field in a composite index is not directional, the + * `__name__` will be ordered ASCENDING (unless explicitly specified). + * For single field indexes, this will always be exactly one entry with a + * field path equal to the field path of the associated field. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Index\IndexField> + */ + public function getFields() + { + return $this->fields; + } + + /** + * The fields supported by this index. + * For composite indexes, this requires a minimum of 2 and a maximum of 100 + * fields. The last field entry is always for the field path `__name__`. If, + * on creation, `__name__` was not specified as the last field, it will be + * added automatically with the same direction as that of the last field + * defined. If the final field in a composite index is not directional, the + * `__name__` will be ordered ASCENDING (unless explicitly specified). + * For single field indexes, this will always be exactly one entry with a + * field path equal to the field path of the associated field. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; + * @param \Google\Cloud\Firestore\Admin\V1\Index\IndexField[] $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index\IndexField::class); + $this->fields = $arr; + + return $this; + } + + /** + * Output only. The serving state of the index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The serving state of the index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\State::class); + $this->state = $var; + + return $this; + } + + /** + * Immutable. The density configuration of the index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getDensity() + { + return $this->density; + } + + /** + * Immutable. The density configuration of the index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setDensity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\Density::class); + $this->density = $var; + + return $this; + } + + /** + * Optional. Whether the index is multikey. By default, the index is not + * multikey. For non-multikey indexes, none of the paths in the index + * definition reach or traverse an array, except via an explicit array index. + * For multikey indexes, at most one of the paths in the index definition + * reach or traverse an array, except via an explicit array index. Violations + * will result in errors. + * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope. + * + * Generated from protobuf field bool multikey = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getMultikey() + { + return $this->multikey; + } + + /** + * Optional. Whether the index is multikey. By default, the index is not + * multikey. For non-multikey indexes, none of the paths in the index + * definition reach or traverse an array, except via an explicit array index. + * For multikey indexes, at most one of the paths in the index definition + * reach or traverse an array, except via an explicit array index. Violations + * will result in errors. + * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope. + * + * Generated from protobuf field bool multikey = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setMultikey($var) + { + GPBUtil::checkBool($var); + $this->multikey = $var; + + return $this; + } + + /** + * Optional. The number of shards for the index. + * + * Generated from protobuf field int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getShardCount() + { + return $this->shard_count; + } + + /** + * Optional. The number of shards for the index. + * + * Generated from protobuf field int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setShardCount($var) + { + GPBUtil::checkInt32($var); + $this->shard_count = $var; + + return $this; + } + + /** + * Optional. Whether it is an unique index. Unique index ensures all values + * for the indexed field(s) are unique across documents. + * + * Generated from protobuf field bool unique = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUnique() + { + return $this->unique; + } + + /** + * Optional. Whether it is an unique index. Unique index ensures all values + * for the indexed field(s) are unique across documents. + * + * Generated from protobuf field bool unique = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUnique($var) + { + GPBUtil::checkBool($var); + $this->unique = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/ApiScope.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/ApiScope.php new file mode 100644 index 000000000000..82f955ef90e9 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/ApiScope.php @@ -0,0 +1,63 @@ +google.firestore.admin.v1.Index.ApiScope + */ +class ApiScope +{ + /** + * The index can only be used by the Firestore Native query API. + * This is the default. + * + * Generated from protobuf enum ANY_API = 0; + */ + const ANY_API = 0; + /** + * The index can only be used by the Firestore in Datastore Mode query API. + * + * Generated from protobuf enum DATASTORE_MODE_API = 1; + */ + const DATASTORE_MODE_API = 1; + /** + * The index can only be used by the MONGODB_COMPATIBLE_API. + * + * Generated from protobuf enum MONGODB_COMPATIBLE_API = 2; + */ + const MONGODB_COMPATIBLE_API = 2; + + private static $valueToName = [ + self::ANY_API => 'ANY_API', + self::DATASTORE_MODE_API => 'DATASTORE_MODE_API', + self::MONGODB_COMPATIBLE_API => 'MONGODB_COMPATIBLE_API', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/Density.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/Density.php new file mode 100644 index 000000000000..1ceec9170909 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/Density.php @@ -0,0 +1,109 @@ +google.firestore.admin.v1.Index.Density + */ +class Density +{ + /** + * Unspecified. It will use database default setting. This value is input + * only. + * + * Generated from protobuf enum DENSITY_UNSPECIFIED = 0; + */ + const DENSITY_UNSPECIFIED = 0; + /** + * An index entry will only exist if ALL fields are present in the document. + * This is both the default and only allowed value for Standard Edition + * databases (for both Cloud Firestore `ANY_API` and Cloud Datastore + * `DATASTORE_MODE_API`). + * Take for example the following document: + * ``` + * { + * "__name__": "...", + * "a": 1, + * "b": 2, + * "c": 3 + * } + * ``` + * an index on `(a ASC, b ASC, c ASC, __name__ ASC)` will generate an index + * entry for this document since `a`, 'b', `c`, and `__name__` are all + * present but an index of `(a ASC, d ASC, __name__ ASC)` will not generate + * an index entry for this document since `d` is missing. + * This means that such indexes can only be used to serve a query when the + * query has either implicit or explicit requirements that all fields from + * the index are present. + * + * Generated from protobuf enum SPARSE_ALL = 1; + */ + const SPARSE_ALL = 1; + /** + * An index entry will exist if ANY field are present in the document. + * This is used as the definition of a sparse index for Enterprise Edition + * databases. + * Take for example the following document: + * ``` + * { + * "__name__": "...", + * "a": 1, + * "b": 2, + * "c": 3 + * } + * ``` + * an index on `(a ASC, d ASC)` will generate an index entry for this + * document since `a` is present, and will fill in an `unset` value for `d`. + * An index on `(d ASC, e ASC)` will not generate any index entry as neither + * `d` nor `e` are present. + * An index that contains `__name__` will generate an index entry for all + * documents since Firestore guarantees that all documents have a `__name__` + * field. + * + * Generated from protobuf enum SPARSE_ANY = 2; + */ + const SPARSE_ANY = 2; + /** + * An index entry will exist regardless of if the fields are present or not. + * This is the default density for an Enterprise Edition database. + * The index will store `unset` values for fields that are not present in + * the document. + * + * Generated from protobuf enum DENSE = 3; + */ + const DENSE = 3; + + private static $valueToName = [ + self::DENSITY_UNSPECIFIED => 'DENSITY_UNSPECIFIED', + self::SPARSE_ALL => 'SPARSE_ALL', + self::SPARSE_ANY => 'SPARSE_ANY', + self::DENSE => 'DENSE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php new file mode 100644 index 000000000000..9eb85626fcba --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php @@ -0,0 +1,191 @@ +google.firestore.admin.v1.Index.IndexField + */ +class IndexField extends \Google\Protobuf\Internal\Message +{ + /** + * Can be __name__. + * For single field indexes, this must match the name of the field or may + * be omitted. + * + * Generated from protobuf field string field_path = 1; + */ + protected $field_path = ''; + protected $value_mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field_path + * Can be __name__. + * For single field indexes, this must match the name of the field or may + * be omitted. + * @type int $order + * Indicates that this field supports ordering by the specified order or + * comparing using =, !=, <, <=, >, >=. + * @type int $array_config + * Indicates that this field supports operations on `array_value`s. + * @type \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig $vector_config + * Indicates that this field supports nearest neighbor and distance + * operations on vector. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); + parent::__construct($data); + } + + /** + * Can be __name__. + * For single field indexes, this must match the name of the field or may + * be omitted. + * + * Generated from protobuf field string field_path = 1; + * @return string + */ + public function getFieldPath() + { + return $this->field_path; + } + + /** + * Can be __name__. + * For single field indexes, this must match the name of the field or may + * be omitted. + * + * Generated from protobuf field string field_path = 1; + * @param string $var + * @return $this + */ + public function setFieldPath($var) + { + GPBUtil::checkString($var, True); + $this->field_path = $var; + + return $this; + } + + /** + * Indicates that this field supports ordering by the specified order or + * comparing using =, !=, <, <=, >, >=. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.Order order = 2; + * @return int + */ + public function getOrder() + { + return $this->readOneof(2); + } + + public function hasOrder() + { + return $this->hasOneof(2); + } + + /** + * Indicates that this field supports ordering by the specified order or + * comparing using =, !=, <, <=, >, >=. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.Order order = 2; + * @param int $var + * @return $this + */ + public function setOrder($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\Order::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Indicates that this field supports operations on `array_value`s. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; + * @return int + */ + public function getArrayConfig() + { + return $this->readOneof(3); + } + + public function hasArrayConfig() + { + return $this->hasOneof(3); + } + + /** + * Indicates that this field supports operations on `array_value`s. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; + * @param int $var + * @return $this + */ + public function setArrayConfig($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\ArrayConfig::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Indicates that this field supports nearest neighbor and distance + * operations on vector. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4; + * @return \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig|null + */ + public function getVectorConfig() + { + return $this->readOneof(4); + } + + public function hasVectorConfig() + { + return $this->hasOneof(4); + } + + /** + * Indicates that this field supports nearest neighbor and distance + * operations on vector. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4; + * @param \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig $var + * @return $this + */ + public function setVectorConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getValueMode() + { + return $this->whichOneof("value_mode"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php new file mode 100644 index 000000000000..e44e7c449bba --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php @@ -0,0 +1,54 @@ +google.firestore.admin.v1.Index.IndexField.ArrayConfig + */ +class ArrayConfig +{ + /** + * The index does not support additional array queries. + * + * Generated from protobuf enum ARRAY_CONFIG_UNSPECIFIED = 0; + */ + const ARRAY_CONFIG_UNSPECIFIED = 0; + /** + * The index supports array containment queries. + * + * Generated from protobuf enum CONTAINS = 1; + */ + const CONTAINS = 1; + + private static $valueToName = [ + self::ARRAY_CONFIG_UNSPECIFIED => 'ARRAY_CONFIG_UNSPECIFIED', + self::CONTAINS => 'CONTAINS', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php new file mode 100644 index 000000000000..6c7b3ab13bc3 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php @@ -0,0 +1,61 @@ +google.firestore.admin.v1.Index.IndexField.Order + */ +class Order +{ + /** + * The ordering is unspecified. Not a valid option. + * + * Generated from protobuf enum ORDER_UNSPECIFIED = 0; + */ + const ORDER_UNSPECIFIED = 0; + /** + * The field is ordered by ascending field value. + * + * Generated from protobuf enum ASCENDING = 1; + */ + const ASCENDING = 1; + /** + * The field is ordered by descending field value. + * + * Generated from protobuf enum DESCENDING = 2; + */ + const DESCENDING = 2; + + private static $valueToName = [ + self::ORDER_UNSPECIFIED => 'ORDER_UNSPECIFIED', + self::ASCENDING => 'ASCENDING', + self::DESCENDING => 'DESCENDING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig.php new file mode 100644 index 000000000000..f1cbd5ee0352 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig.php @@ -0,0 +1,117 @@ +google.firestore.admin.v1.Index.IndexField.VectorConfig + */ +class VectorConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The vector dimension this configuration applies to. + * The resulting index will only include vectors of this dimension, and + * can be used for vector search with the same dimension. + * + * Generated from protobuf field int32 dimension = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $dimension = 0; + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $dimension + * Required. The vector dimension this configuration applies to. + * The resulting index will only include vectors of this dimension, and + * can be used for vector search with the same dimension. + * @type \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex $flat + * Indicates the vector index is a flat index. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); + parent::__construct($data); + } + + /** + * Required. The vector dimension this configuration applies to. + * The resulting index will only include vectors of this dimension, and + * can be used for vector search with the same dimension. + * + * Generated from protobuf field int32 dimension = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getDimension() + { + return $this->dimension; + } + + /** + * Required. The vector dimension this configuration applies to. + * The resulting index will only include vectors of this dimension, and + * can be used for vector search with the same dimension. + * + * Generated from protobuf field int32 dimension = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setDimension($var) + { + GPBUtil::checkInt32($var); + $this->dimension = $var; + + return $this; + } + + /** + * Indicates the vector index is a flat index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex flat = 2; + * @return \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex|null + */ + public function getFlat() + { + return $this->readOneof(2); + } + + public function hasFlat() + { + return $this->hasOneof(2); + } + + /** + * Indicates the vector index is a flat index. + * + * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex flat = 2; + * @param \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex $var + * @return $this + */ + public function setFlat($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig/FlatIndex.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig/FlatIndex.php new file mode 100644 index 000000000000..6247e505d63a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig/FlatIndex.php @@ -0,0 +1,34 @@ +google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex + */ +class FlatIndex extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php new file mode 100644 index 000000000000..a2bee11d68a8 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php @@ -0,0 +1,74 @@ +google.firestore.admin.v1.Index.QueryScope + */ +class QueryScope +{ + /** + * The query scope is unspecified. Not a valid option. + * + * Generated from protobuf enum QUERY_SCOPE_UNSPECIFIED = 0; + */ + const QUERY_SCOPE_UNSPECIFIED = 0; + /** + * Indexes with a collection query scope specified allow queries + * against a collection that is the child of a specific document, specified + * at query time, and that has the collection ID specified by the index. + * + * Generated from protobuf enum COLLECTION = 1; + */ + const COLLECTION = 1; + /** + * Indexes with a collection group query scope specified allow queries + * against all collections that has the collection ID specified by the + * index. + * + * Generated from protobuf enum COLLECTION_GROUP = 2; + */ + const COLLECTION_GROUP = 2; + /** + * Include all the collections's ancestor in the index. Only available for + * Datastore Mode databases. + * + * Generated from protobuf enum COLLECTION_RECURSIVE = 3; + */ + const COLLECTION_RECURSIVE = 3; + + private static $valueToName = [ + self::QUERY_SCOPE_UNSPECIFIED => 'QUERY_SCOPE_UNSPECIFIED', + self::COLLECTION => 'COLLECTION', + self::COLLECTION_GROUP => 'COLLECTION_GROUP', + self::COLLECTION_RECURSIVE => 'COLLECTION_RECURSIVE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php new file mode 100644 index 000000000000..bf31eec158a0 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php @@ -0,0 +1,83 @@ +google.firestore.admin.v1.Index.State + */ +class State +{ + /** + * The state is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The index is being created. + * There is an active long-running operation for the index. + * The index is updated when writing a document. + * Some index data may exist. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * The index is ready to be used. + * The index is updated when writing a document. + * The index is fully populated from all stored documents it applies to. + * + * Generated from protobuf enum READY = 2; + */ + const READY = 2; + /** + * The index was being created, but something went wrong. + * There is no active long-running operation for the index, + * and the most recently finished long-running operation failed. + * The index is not updated when writing a document. + * Some index data may exist. + * Use the google.longrunning.Operations API to determine why the operation + * that last attempted to create this index failed, then re-create the + * index. + * + * Generated from protobuf enum NEEDS_REPAIR = 3; + */ + const NEEDS_REPAIR = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::READY => 'READY', + self::NEEDS_REPAIR => 'NEEDS_REPAIR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php new file mode 100644 index 000000000000..e9cec99074ea --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php @@ -0,0 +1,287 @@ +google.firestore.admin.v1.IndexOperationMetadata + */ +class IndexOperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The index resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * + * Generated from protobuf field string index = 3; + */ + protected $index = ''; + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; + */ + protected $state = 0; + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; + */ + protected $progress_documents = null; + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; + */ + protected $progress_bytes = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The time this operation started. + * @type \Google\Protobuf\Timestamp $end_time + * The time this operation completed. Will be unset if operation still in + * progress. + * @type string $index + * The index resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * @type int $state + * The state of the operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents + * The progress, in documents, of this operation. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes + * The progress, in bytes, of this operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The time this operation started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time this operation completed. Will be unset if operation still in + * progress. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The index resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * + * Generated from protobuf field string index = 3; + * @return string + */ + public function getIndex() + { + return $this->index; + } + + /** + * The index resource that this operation is acting on. For example: + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + * + * Generated from protobuf field string index = 3; + * @param string $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkString($var, True); + $this->index = $var; + + return $this; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the operation. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); + $this->state = $var; + + return $this; + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressDocuments() + { + return $this->progress_documents; + } + + public function hasProgressDocuments() + { + return isset($this->progress_documents); + } + + public function clearProgressDocuments() + { + unset($this->progress_documents); + } + + /** + * The progress, in documents, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_documents = $var; + + return $this; + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressBytes() + { + return $this->progress_bytes; + } + + public function hasProgressBytes() + { + return isset($this->progress_bytes); + } + + public function clearProgressBytes() + { + unset($this->progress_bytes); + } + + /** + * The progress, in bytes, of this operation. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressBytes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesRequest.php new file mode 100644 index 000000000000..d05171b63611 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesRequest.php @@ -0,0 +1,88 @@ +google.firestore.admin.v1.ListBackupSchedulesRequest + */ +class ListBackupSchedulesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent database. + * Format is `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + + /** + * @param string $parent Required. The parent database. + * + * Format is `projects/{project}/databases/{database}`. Please see + * {@see FirestoreAdminClient::databaseName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\ListBackupSchedulesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent database. + * Format is `projects/{project}/databases/{database}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent database. + * Format is `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent database. + * Format is `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesResponse.php new file mode 100644 index 000000000000..230e34ceb900 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesResponse.php @@ -0,0 +1,68 @@ +google.firestore.admin.v1.ListBackupSchedulesResponse + */ +class ListBackupSchedulesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of all backup schedules. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.BackupSchedule backup_schedules = 1; + */ + private $backup_schedules; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\BackupSchedule[] $backup_schedules + * List of all backup schedules. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * List of all backup schedules. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.BackupSchedule backup_schedules = 1; + * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\BackupSchedule> + */ + public function getBackupSchedules() + { + return $this->backup_schedules; + } + + /** + * List of all backup schedules. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.BackupSchedule backup_schedules = 1; + * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule[] $var + * @return $this + */ + public function setBackupSchedules($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\BackupSchedule::class); + $this->backup_schedules = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsRequest.php new file mode 100644 index 000000000000..6c6222670971 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsRequest.php @@ -0,0 +1,169 @@ +google.firestore.admin.v1.ListBackupsRequest + */ +class ListBackupsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The location to list backups from. + * Format is `projects/{project}/locations/{location}`. + * Use `{location} = '-'` to list backups from all locations for the given + * project. This allows listing backups from a single location or from all + * locations. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * An expression that filters the list of returned backups. + * A filter expression consists of a field name, a comparison operator, and a + * value for filtering. + * The value must be a string, a number, or a boolean. The comparison operator + * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + * Colon `:` is the contains operator. Filter rules are not case sensitive. + * The following fields in the [Backup][google.firestore.admin.v1.Backup] are + * eligible for filtering: + * * `database_uid` (supports `=` only) + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The location to list backups from. + * + * Format is `projects/{project}/locations/{location}`. + * Use `{location} = '-'` to list backups from all locations for the given + * project. This allows listing backups from a single location or from all + * locations. Please see + * {@see FirestoreAdminClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\ListBackupsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The location to list backups from. + * Format is `projects/{project}/locations/{location}`. + * Use `{location} = '-'` to list backups from all locations for the given + * project. This allows listing backups from a single location or from all + * locations. + * @type string $filter + * An expression that filters the list of returned backups. + * A filter expression consists of a field name, a comparison operator, and a + * value for filtering. + * The value must be a string, a number, or a boolean. The comparison operator + * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + * Colon `:` is the contains operator. Filter rules are not case sensitive. + * The following fields in the [Backup][google.firestore.admin.v1.Backup] are + * eligible for filtering: + * * `database_uid` (supports `=` only) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The location to list backups from. + * Format is `projects/{project}/locations/{location}`. + * Use `{location} = '-'` to list backups from all locations for the given + * project. This allows listing backups from a single location or from all + * locations. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The location to list backups from. + * Format is `projects/{project}/locations/{location}`. + * Use `{location} = '-'` to list backups from all locations for the given + * project. This allows listing backups from a single location or from all + * locations. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * An expression that filters the list of returned backups. + * A filter expression consists of a field name, a comparison operator, and a + * value for filtering. + * The value must be a string, a number, or a boolean. The comparison operator + * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + * Colon `:` is the contains operator. Filter rules are not case sensitive. + * The following fields in the [Backup][google.firestore.admin.v1.Backup] are + * eligible for filtering: + * * `database_uid` (supports `=` only) + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * An expression that filters the list of returned backups. + * A filter expression consists of a field name, a comparison operator, and a + * value for filtering. + * The value must be a string, a number, or a boolean. The comparison operator + * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + * Colon `:` is the contains operator. Filter rules are not case sensitive. + * The following fields in the [Backup][google.firestore.admin.v1.Backup] are + * eligible for filtering: + * * `database_uid` (supports `=` only) + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsResponse.php new file mode 100644 index 000000000000..8b2b6447cb77 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsResponse.php @@ -0,0 +1,118 @@ +google.firestore.admin.v1.ListBackupsResponse + */ +class ListBackupsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of all backups for the project. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Backup backups = 1; + */ + private $backups; + /** + * List of locations that existing backups were not able to be fetched from. + * Instead of failing the entire requests when a single location is + * unreachable, this response returns a partial result set and list of + * locations unable to be reached here. The request can be retried against a + * single location to get a concrete error. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\Backup[] $backups + * List of all backups for the project. + * @type string[] $unreachable + * List of locations that existing backups were not able to be fetched from. + * Instead of failing the entire requests when a single location is + * unreachable, this response returns a partial result set and list of + * locations unable to be reached here. The request can be retried against a + * single location to get a concrete error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * List of all backups for the project. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Backup backups = 1; + * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Backup> + */ + public function getBackups() + { + return $this->backups; + } + + /** + * List of all backups for the project. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Backup backups = 1; + * @param \Google\Cloud\Firestore\Admin\V1\Backup[] $var + * @return $this + */ + public function setBackups($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Backup::class); + $this->backups = $arr; + + return $this; + } + + /** + * List of locations that existing backups were not able to be fetched from. + * Instead of failing the entire requests when a single location is + * unreachable, this response returns a partial result set and list of + * locations unable to be reached here. The request can be retried against a + * single location to get a concrete error. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * List of locations that existing backups were not able to be fetched from. + * Instead of failing the entire requests when a single location is + * unreachable, this response returns a partial result set and list of + * locations unable to be reached here. The request can be retried against a + * single location to get a concrete error. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php new file mode 100644 index 000000000000..8476d8052464 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php @@ -0,0 +1,120 @@ +google.firestore.admin.v1.ListDatabasesRequest + */ +class ListDatabasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A parent name of the form + * `projects/{project_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * If true, also returns deleted resources. + * + * Generated from protobuf field bool show_deleted = 4; + */ + protected $show_deleted = false; + + /** + * @param string $parent Required. A parent name of the form + * `projects/{project_id}` + * Please see {@see FirestoreAdminClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\ListDatabasesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. A parent name of the form + * `projects/{project_id}` + * @type bool $show_deleted + * If true, also returns deleted resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A parent name of the form + * `projects/{project_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. A parent name of the form + * `projects/{project_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * If true, also returns deleted resources. + * + * Generated from protobuf field bool show_deleted = 4; + * @return bool + */ + public function getShowDeleted() + { + return $this->show_deleted; + } + + /** + * If true, also returns deleted resources. + * + * Generated from protobuf field bool show_deleted = 4; + * @param bool $var + * @return $this + */ + public function setShowDeleted($var) + { + GPBUtil::checkBool($var); + $this->show_deleted = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php new file mode 100644 index 000000000000..f3a9c42afa12 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php @@ -0,0 +1,129 @@ +google.firestore.admin.v1.ListDatabasesResponse + */ +class ListDatabasesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The databases in the project. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; + */ + private $databases; + /** + * In the event that data about individual databases cannot be listed they + * will be recorded here. + * An example entry might be: projects/some_project/locations/some_location + * This can happen if the Cloud Region that the Database resides in is + * currently unavailable. In this case we can't fetch all the details about + * the database. You may be able to get a more detailed error message + * (or possibly fetch the resource) by sending a 'Get' request for the + * resource or a 'List' request for the specific location. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\Database[] $databases + * The databases in the project. + * @type string[] $unreachable + * In the event that data about individual databases cannot be listed they + * will be recorded here. + * An example entry might be: projects/some_project/locations/some_location + * This can happen if the Cloud Region that the Database resides in is + * currently unavailable. In this case we can't fetch all the details about + * the database. You may be able to get a more detailed error message + * (or possibly fetch the resource) by sending a 'Get' request for the + * resource or a 'List' request for the specific location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The databases in the project. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; + * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Database> + */ + public function getDatabases() + { + return $this->databases; + } + + /** + * The databases in the project. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; + * @param \Google\Cloud\Firestore\Admin\V1\Database[] $var + * @return $this + */ + public function setDatabases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Database::class); + $this->databases = $arr; + + return $this; + } + + /** + * In the event that data about individual databases cannot be listed they + * will be recorded here. + * An example entry might be: projects/some_project/locations/some_location + * This can happen if the Cloud Region that the Database resides in is + * currently unavailable. In this case we can't fetch all the details about + * the database. You may be able to get a more detailed error message + * (or possibly fetch the resource) by sending a 'Get' request for the + * resource or a 'List' request for the specific location. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * In the event that data about individual databases cannot be listed they + * will be recorded here. + * An example entry might be: projects/some_project/locations/some_location + * This can happen if the Cloud Region that the Database resides in is + * currently unavailable. In this case we can't fetch all the details about + * the database. You may be able to get a more detailed error message + * (or possibly fetch the resource) by sending a 'Get' request for the + * resource or a 'List' request for the specific location. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php new file mode 100644 index 000000000000..8596394a0bb5 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php @@ -0,0 +1,221 @@ +google.firestore.admin.v1.ListFieldsRequest + */ +class ListFieldsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The filter to apply to list results. Currently, + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * only supports listing fields that have been explicitly overridden. To issue + * this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * with a filter that includes `indexConfig.usesAncestorConfig:false` or + * `ttlConfig:*`. + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * The number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * A page token, returned from a previous call to + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], + * that may be used to get the next page of results. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * Please see {@see FirestoreAdminClient::collectionGroupName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\ListFieldsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @type string $filter + * The filter to apply to list results. Currently, + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * only supports listing fields that have been explicitly overridden. To issue + * this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * with a filter that includes `indexConfig.usesAncestorConfig:false` or + * `ttlConfig:*`. + * @type int $page_size + * The number of results to return. + * @type string $page_token + * A page token, returned from a previous call to + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], + * that may be used to get the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The filter to apply to list results. Currently, + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * only supports listing fields that have been explicitly overridden. To issue + * this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * with a filter that includes `indexConfig.usesAncestorConfig:false` or + * `ttlConfig:*`. + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter to apply to list results. Currently, + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * only supports listing fields that have been explicitly overridden. To issue + * this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * with a filter that includes `indexConfig.usesAncestorConfig:false` or + * `ttlConfig:*`. + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, returned from a previous call to + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], + * that may be used to get the next page of results. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, returned from a previous call to + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], + * that may be used to get the next page of results. + * + * Generated from protobuf field string page_token = 4; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php new file mode 100644 index 000000000000..7273ec784839 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php @@ -0,0 +1,106 @@ +google.firestore.admin.v1.ListFieldsResponse + */ +class ListFieldsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The requested fields. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; + */ + private $fields; + /** + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\Field[] $fields + * The requested fields. + * @type string $next_page_token + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The requested fields. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; + * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Field> + */ + public function getFields() + { + return $this->fields; + } + + /** + * The requested fields. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; + * @param \Google\Cloud\Firestore\Admin\V1\Field[] $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Field::class); + $this->fields = $arr; + + return $this; + } + + /** + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php new file mode 100644 index 000000000000..cb2ca52982de --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php @@ -0,0 +1,197 @@ +google.firestore.admin.v1.ListIndexesRequest + */ +class ListIndexesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The filter to apply to list results. + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * The number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + */ + protected $page_size = 0; + /** + * A page token, returned from a previous call to + * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], + * that may be used to get the next page of results. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * Please see {@see FirestoreAdminClient::collectionGroupName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\ListIndexesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * @type string $filter + * The filter to apply to list results. + * @type int $page_size + * The number of results to return. + * @type string $page_token + * A page token, returned from a previous call to + * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], + * that may be used to get the next page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. A parent name of the form + * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The filter to apply to list results. + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter to apply to list results. + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The number of results to return. + * + * Generated from protobuf field int32 page_size = 3; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, returned from a previous call to + * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], + * that may be used to get the next page of results. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, returned from a previous call to + * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], + * that may be used to get the next page of results. + * + * Generated from protobuf field string page_token = 4; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php new file mode 100644 index 000000000000..2306044b0674 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php @@ -0,0 +1,106 @@ +google.firestore.admin.v1.ListIndexesResponse + */ +class ListIndexesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The requested indexes. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; + */ + private $indexes; + /** + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\Index[] $indexes + * The requested indexes. + * @type string $next_page_token + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The requested indexes. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; + * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Index> + */ + public function getIndexes() + { + return $this->indexes; + } + + /** + * The requested indexes. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; + * @param \Google\Cloud\Firestore\Admin\V1\Index[] $var + * @return $this + */ + public function setIndexes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index::class); + $this->indexes = $arr; + + return $this; + } + + /** + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A page token that may be used to request another page of results. If blank, + * this is the last page. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsRequest.php new file mode 100644 index 000000000000..c8d03d1b1d3b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.ListUserCredsRequest + */ +class ListUserCredsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A parent database name of the form + * `projects/{project_id}/databases/{database_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + + /** + * @param string $parent Required. A parent database name of the form + * `projects/{project_id}/databases/{database_id}` + * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\ListUserCredsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. A parent database name of the form + * `projects/{project_id}/databases/{database_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A parent database name of the form + * `projects/{project_id}/databases/{database_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. A parent database name of the form + * `projects/{project_id}/databases/{database_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsResponse.php new file mode 100644 index 000000000000..af839e0ebc78 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsResponse.php @@ -0,0 +1,68 @@ +google.firestore.admin.v1.ListUserCredsResponse + */ +class ListUserCredsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The user creds for the database. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + */ + private $user_creds; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\UserCreds[] $user_creds + * The user creds for the database. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * The user creds for the database. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\UserCreds> + */ + public function getUserCreds() + { + return $this->user_creds; + } + + /** + * The user creds for the database. + * + * Generated from protobuf field repeated .google.firestore.admin.v1.UserCreds user_creds = 1; + * @param \Google\Cloud\Firestore\Admin\V1\UserCreds[] $var + * @return $this + */ + public function setUserCreds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\UserCreds::class); + $this->user_creds = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php new file mode 100644 index 000000000000..995a7845b650 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php @@ -0,0 +1,34 @@ +google.firestore.admin.v1.LocationMetadata + */ +class LocationMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Location::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php new file mode 100644 index 000000000000..73244df17d28 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php @@ -0,0 +1,98 @@ +google.firestore.admin.v1.OperationState + */ +class OperationState +{ + /** + * Unspecified. + * + * Generated from protobuf enum OPERATION_STATE_UNSPECIFIED = 0; + */ + const OPERATION_STATE_UNSPECIFIED = 0; + /** + * Request is being prepared for processing. + * + * Generated from protobuf enum INITIALIZING = 1; + */ + const INITIALIZING = 1; + /** + * Request is actively being processed. + * + * Generated from protobuf enum PROCESSING = 2; + */ + const PROCESSING = 2; + /** + * Request is in the process of being cancelled after user called + * google.longrunning.Operations.CancelOperation on the operation. + * + * Generated from protobuf enum CANCELLING = 3; + */ + const CANCELLING = 3; + /** + * Request has been processed and is in its finalization stage. + * + * Generated from protobuf enum FINALIZING = 4; + */ + const FINALIZING = 4; + /** + * Request has completed successfully. + * + * Generated from protobuf enum SUCCESSFUL = 5; + */ + const SUCCESSFUL = 5; + /** + * Request has finished being processed, but encountered an error. + * + * Generated from protobuf enum FAILED = 6; + */ + const FAILED = 6; + /** + * Request has finished being cancelled after user called + * google.longrunning.Operations.CancelOperation. + * + * Generated from protobuf enum CANCELLED = 7; + */ + const CANCELLED = 7; + + private static $valueToName = [ + self::OPERATION_STATE_UNSPECIFIED => 'OPERATION_STATE_UNSPECIFIED', + self::INITIALIZING => 'INITIALIZING', + self::PROCESSING => 'PROCESSING', + self::CANCELLING => 'CANCELLING', + self::FINALIZING => 'FINALIZING', + self::SUCCESSFUL => 'SUCCESSFUL', + self::FAILED => 'FAILED', + self::CANCELLED => 'CANCELLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/PitrSnapshot.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/PitrSnapshot.php new file mode 100644 index 000000000000..1d3ed47beeef --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/PitrSnapshot.php @@ -0,0 +1,153 @@ +google.firestore.admin.v1.PitrSnapshot + */ +class PitrSnapshot extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the database that this was a snapshot of. Format: + * `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $database = ''; + /** + * Output only. Public UUID of the database the snapshot was associated with. + * + * Generated from protobuf field bytes database_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $database_uid = ''; + /** + * Required. Snapshot time of the database. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $snapshot_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The name of the database that this was a snapshot of. Format: + * `projects/{project}/databases/{database}`. + * @type string $database_uid + * Output only. Public UUID of the database the snapshot was associated with. + * @type \Google\Protobuf\Timestamp $snapshot_time + * Required. Snapshot time of the database. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Snapshot::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the database that this was a snapshot of. Format: + * `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The name of the database that this was a snapshot of. Format: + * `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Output only. Public UUID of the database the snapshot was associated with. + * + * Generated from protobuf field bytes database_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDatabaseUid() + { + return $this->database_uid; + } + + /** + * Output only. Public UUID of the database the snapshot was associated with. + * + * Generated from protobuf field bytes database_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDatabaseUid($var) + { + GPBUtil::checkString($var, False); + $this->database_uid = $var; + + return $this; + } + + /** + * Required. Snapshot time of the database. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSnapshotTime() + { + return $this->snapshot_time; + } + + public function hasSnapshotTime() + { + return isset($this->snapshot_time); + } + + public function clearSnapshotTime() + { + unset($this->snapshot_time); + } + + /** + * Required. Snapshot time of the database. + * + * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSnapshotTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->snapshot_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php new file mode 100644 index 000000000000..f7c35b1de363 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php @@ -0,0 +1,103 @@ +google.firestore.admin.v1.Progress + */ +class Progress extends \Google\Protobuf\Internal\Message +{ + /** + * The amount of work estimated. + * + * Generated from protobuf field int64 estimated_work = 1; + */ + protected $estimated_work = 0; + /** + * The amount of work completed. + * + * Generated from protobuf field int64 completed_work = 2; + */ + protected $completed_work = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $estimated_work + * The amount of work estimated. + * @type int|string $completed_work + * The amount of work completed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The amount of work estimated. + * + * Generated from protobuf field int64 estimated_work = 1; + * @return int|string + */ + public function getEstimatedWork() + { + return $this->estimated_work; + } + + /** + * The amount of work estimated. + * + * Generated from protobuf field int64 estimated_work = 1; + * @param int|string $var + * @return $this + */ + public function setEstimatedWork($var) + { + GPBUtil::checkInt64($var); + $this->estimated_work = $var; + + return $this; + } + + /** + * The amount of work completed. + * + * Generated from protobuf field int64 completed_work = 2; + * @return int|string + */ + public function getCompletedWork() + { + return $this->completed_work; + } + + /** + * The amount of work completed. + * + * Generated from protobuf field int64 completed_work = 2; + * @param int|string $var + * @return $this + */ + public function setCompletedWork($var) + { + GPBUtil::checkInt64($var); + $this->completed_work = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RealtimeUpdatesMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RealtimeUpdatesMode.php new file mode 100644 index 000000000000..a9a985996dba --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RealtimeUpdatesMode.php @@ -0,0 +1,62 @@ +google.firestore.admin.v1.RealtimeUpdatesMode + */ +class RealtimeUpdatesMode +{ + /** + * The Realtime Updates feature is not specified. + * + * Generated from protobuf enum REALTIME_UPDATES_MODE_UNSPECIFIED = 0; + */ + const REALTIME_UPDATES_MODE_UNSPECIFIED = 0; + /** + * The Realtime Updates feature is enabled by default. + * This could potentially degrade write performance for the database. + * + * Generated from protobuf enum REALTIME_UPDATES_MODE_ENABLED = 1; + */ + const REALTIME_UPDATES_MODE_ENABLED = 1; + /** + * The Realtime Updates feature is disabled by default. + * + * Generated from protobuf enum REALTIME_UPDATES_MODE_DISABLED = 2; + */ + const REALTIME_UPDATES_MODE_DISABLED = 2; + + private static $valueToName = [ + self::REALTIME_UPDATES_MODE_UNSPECIFIED => 'REALTIME_UPDATES_MODE_UNSPECIFIED', + self::REALTIME_UPDATES_MODE_ENABLED => 'REALTIME_UPDATES_MODE_ENABLED', + self::REALTIME_UPDATES_MODE_DISABLED => 'REALTIME_UPDATES_MODE_DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ResetUserPasswordRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ResetUserPasswordRequest.php new file mode 100644 index 000000000000..191470b20c2f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ResetUserPasswordRequest.php @@ -0,0 +1,87 @@ +google.firestore.admin.v1.ResetUserPasswordRequest + */ +class ResetUserPasswordRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. + * + * @return \Google\Cloud\Firestore\Admin\V1\ResetUserPasswordRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A name of the form + * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseMetadata.php new file mode 100644 index 000000000000..836cf1956dca --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseMetadata.php @@ -0,0 +1,268 @@ +google.firestore.admin.v1.RestoreDatabaseMetadata + */ +class RestoreDatabaseMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The time the restore was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The time the restore finished, unset for ongoing restores. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * The operation state of the restore. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + */ + protected $operation_state = 0; + /** + * The name of the database being restored to. + * + * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { + */ + protected $database = ''; + /** + * The name of the backup restoring from. + * + * Generated from protobuf field string backup = 5 [(.google.api.resource_reference) = { + */ + protected $backup = ''; + /** + * How far along the restore is as an estimated percentage of remaining time. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 8; + */ + protected $progress_percentage = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The time the restore was started. + * @type \Google\Protobuf\Timestamp $end_time + * The time the restore finished, unset for ongoing restores. + * @type int $operation_state + * The operation state of the restore. + * @type string $database + * The name of the database being restored to. + * @type string $backup + * The name of the backup restoring from. + * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_percentage + * How far along the restore is as an estimated percentage of remaining time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); + parent::__construct($data); + } + + /** + * The time the restore was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The time the restore was started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The time the restore finished, unset for ongoing restores. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The time the restore finished, unset for ongoing restores. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * The operation state of the restore. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @return int + */ + public function getOperationState() + { + return $this->operation_state; + } + + /** + * The operation state of the restore. + * + * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; + * @param int $var + * @return $this + */ + public function setOperationState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); + $this->operation_state = $var; + + return $this; + } + + /** + * The name of the database being restored to. + * + * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * The name of the database being restored to. + * + * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The name of the backup restoring from. + * + * Generated from protobuf field string backup = 5 [(.google.api.resource_reference) = { + * @return string + */ + public function getBackup() + { + return $this->backup; + } + + /** + * The name of the backup restoring from. + * + * Generated from protobuf field string backup = 5 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkString($var, True); + $this->backup = $var; + + return $this; + } + + /** + * How far along the restore is as an estimated percentage of remaining time. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 8; + * @return \Google\Cloud\Firestore\Admin\V1\Progress|null + */ + public function getProgressPercentage() + { + return $this->progress_percentage; + } + + public function hasProgressPercentage() + { + return isset($this->progress_percentage); + } + + public function clearProgressPercentage() + { + unset($this->progress_percentage); + } + + /** + * How far along the restore is as an estimated percentage of remaining time. + * + * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 8; + * @param \Google\Cloud\Firestore\Admin\V1\Progress $var + * @return $this + */ + public function setProgressPercentage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); + $this->progress_percentage = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseRequest.php new file mode 100644 index 000000000000..7c2236e7bd2d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseRequest.php @@ -0,0 +1,278 @@ +google.firestore.admin.v1.RestoreDatabaseRequest + */ +class RestoreDatabaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The project to restore the database in. Format is + * `projects/{project_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. This database ID must not be + * associated with an existing database. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * + * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database_id = ''; + /** + * Required. Backup to restore from. Must be from the same project as the + * parent. + * The restored database will be created in the same location as the source + * backup. + * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` + * + * Generated from protobuf field string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $backup = ''; + /** + * Optional. Encryption configuration for the restored database. + * If this field is not specified, the restored database will use + * the same encryption configuration as the backup, namely + * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $encryption_config = null; + /** + * Optional. Immutable. Tags to be bound to the restored database. + * The tags should be provided in the format of + * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + * + * Generated from protobuf field map tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + private $tags; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The project to restore the database in. Format is + * `projects/{project_id}`. + * @type string $database_id + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. This database ID must not be + * associated with an existing database. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * @type string $backup + * Required. Backup to restore from. Must be from the same project as the + * parent. + * The restored database will be created in the same location as the source + * backup. + * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` + * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig $encryption_config + * Optional. Encryption configuration for the restored database. + * If this field is not specified, the restored database will use + * the same encryption configuration as the backup, namely + * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. + * @type array|\Google\Protobuf\Internal\MapField $tags + * Optional. Immutable. Tags to be bound to the restored database. + * The tags should be provided in the format of + * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The project to restore the database in. Format is + * `projects/{project_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The project to restore the database in. Format is + * `projects/{project_id}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. This database ID must not be + * associated with an existing database. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * + * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabaseId() + { + return $this->database_id; + } + + /** + * Required. The ID to use for the database, which will become the final + * component of the database's resource name. This database ID must not be + * associated with an existing database. + * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + * with first character a letter and the last a letter or a number. Must not + * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. + * "(default)" database ID is also valid if the database is Standard edition. + * + * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabaseId($var) + { + GPBUtil::checkString($var, True); + $this->database_id = $var; + + return $this; + } + + /** + * Required. Backup to restore from. Must be from the same project as the + * parent. + * The restored database will be created in the same location as the source + * backup. + * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` + * + * Generated from protobuf field string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getBackup() + { + return $this->backup; + } + + /** + * Required. Backup to restore from. Must be from the same project as the + * parent. + * The restored database will be created in the same location as the source + * backup. + * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` + * + * Generated from protobuf field string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setBackup($var) + { + GPBUtil::checkString($var, True); + $this->backup = $var; + + return $this; + } + + /** + * Optional. Encryption configuration for the restored database. + * If this field is not specified, the restored database will use + * the same encryption configuration as the backup, namely + * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig|null + */ + public function getEncryptionConfig() + { + return $this->encryption_config; + } + + public function hasEncryptionConfig() + { + return isset($this->encryption_config); + } + + public function clearEncryptionConfig() + { + unset($this->encryption_config); + } + + /** + * Optional. Encryption configuration for the restored database. + * If this field is not specified, the restored database will use + * the same encryption configuration as the backup, namely + * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. + * + * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig $var + * @return $this + */ + public function setEncryptionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig::class); + $this->encryption_config = $var; + + return $this; + } + + /** + * Optional. Immutable. Tags to be bound to the restored database. + * The tags should be provided in the format of + * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + * + * Generated from protobuf field map tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getTags() + { + return $this->tags; + } + + /** + * Optional. Immutable. Tags to be bound to the restored database. + * The tags should be provided in the format of + * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + * + * Generated from protobuf field map tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setTags($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->tags = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateBackupScheduleRequest.php new file mode 100644 index 000000000000..9ef06f95585e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateBackupScheduleRequest.php @@ -0,0 +1,137 @@ +google.firestore.admin.v1.UpdateBackupScheduleRequest + */ +class UpdateBackupScheduleRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The backup schedule to update. + * + * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $backup_schedule = null; + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule Required. The backup schedule to update. + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. + * + * @return \Google\Cloud\Firestore\Admin\V1\UpdateBackupScheduleRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setBackupSchedule($backupSchedule) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backup_schedule + * Required. The backup schedule to update. + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The backup schedule to update. + * + * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\Admin\V1\BackupSchedule|null + */ + public function getBackupSchedule() + { + return $this->backup_schedule; + } + + public function hasBackupSchedule() + { + return isset($this->backup_schedule); + } + + public function clearBackupSchedule() + { + unset($this->backup_schedule); + } + + /** + * Required. The backup schedule to update. + * + * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $var + * @return $this + */ + public function setBackupSchedule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\BackupSchedule::class); + $this->backup_schedule = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php new file mode 100644 index 000000000000..189e1d6c5a6c --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php @@ -0,0 +1,33 @@ +google.firestore.admin.v1.UpdateDatabaseMetadata + */ +class UpdateDatabaseMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php new file mode 100644 index 000000000000..3d9cfcf3df23 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php @@ -0,0 +1,137 @@ +google.firestore.admin.v1.UpdateDatabaseRequest + */ +class UpdateDatabaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database to update. + * + * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = null; + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Firestore\Admin\V1\Database $database Required. The database to update. + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. + * + * @return \Google\Cloud\Firestore\Admin\V1\UpdateDatabaseRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Firestore\Admin\V1\Database $database, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDatabase($database) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\Database $database + * Required. The database to update. + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database to update. + * + * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\Admin\V1\Database|null + */ + public function getDatabase() + { + return $this->database; + } + + public function hasDatabase() + { + return isset($this->database); + } + + public function clearDatabase() + { + unset($this->database); + } + + /** + * Required. The database to update. + * + * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\Admin\V1\Database $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database::class); + $this->database = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php new file mode 100644 index 000000000000..4c1e8af65c10 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php @@ -0,0 +1,139 @@ +google.firestore.admin.v1.UpdateFieldRequest + */ +class UpdateFieldRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The field to be updated. + * + * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $field = null; + /** + * A mask, relative to the field. If specified, only configuration specified + * by this field_mask will be updated in the field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Firestore\Admin\V1\Field $field Required. The field to be updated. + * + * @return \Google\Cloud\Firestore\Admin\V1\UpdateFieldRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Firestore\Admin\V1\Field $field): self + { + return (new self()) + ->setField($field); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\Admin\V1\Field $field + * Required. The field to be updated. + * @type \Google\Protobuf\FieldMask $update_mask + * A mask, relative to the field. If specified, only configuration specified + * by this field_mask will be updated in the field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); + parent::__construct($data); + } + + /** + * Required. The field to be updated. + * + * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\Admin\V1\Field|null + */ + public function getField() + { + return $this->field; + } + + public function hasField() + { + return isset($this->field); + } + + public function clearField() + { + unset($this->field); + } + + /** + * Required. The field to be updated. + * + * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\Admin\V1\Field $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field::class); + $this->field = $var; + + return $this; + } + + /** + * A mask, relative to the field. If specified, only configuration specified + * by this field_mask will be updated in the field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * A mask, relative to the field. If specified, only configuration specified + * by this field_mask will be updated in the field. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds.php new file mode 100644 index 000000000000..4f57674f6424 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds.php @@ -0,0 +1,281 @@ +google.firestore.admin.v1.UserCreds + */ +class UserCreds extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the UserCreds. + * Format: + * `projects/{project}/databases/{database}/userCreds/{user_creds}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The time the user creds were created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the user creds were last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. Whether the user creds are enabled or disabled. Defaults to + * ENABLED on creation. + * + * Generated from protobuf field .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The plaintext server-generated password for the user creds. + * Only populated in responses for CreateUserCreds and ResetUserPassword. + * + * Generated from protobuf field string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $secure_password = ''; + protected $UserCredsIdentity; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the UserCreds. + * Format: + * `projects/{project}/databases/{database}/userCreds/{user_creds}` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the user creds were created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time the user creds were last updated. + * @type int $state + * Output only. Whether the user creds are enabled or disabled. Defaults to + * ENABLED on creation. + * @type string $secure_password + * Output only. The plaintext server-generated password for the user creds. + * Only populated in responses for CreateUserCreds and ResetUserPassword. + * @type \Google\Cloud\Firestore\Admin\V1\UserCreds\ResourceIdentity $resource_identity + * Resource Identity descriptor. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\UserCreds::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the UserCreds. + * Format: + * `projects/{project}/databases/{database}/userCreds/{user_creds}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the UserCreds. + * Format: + * `projects/{project}/databases/{database}/userCreds/{user_creds}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The time the user creds were created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the user creds were created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the user creds were last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time the user creds were last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. Whether the user creds are enabled or disabled. Defaults to + * ENABLED on creation. + * + * Generated from protobuf field .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Whether the user creds are enabled or disabled. Defaults to + * ENABLED on creation. + * + * Generated from protobuf field .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\UserCreds\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The plaintext server-generated password for the user creds. + * Only populated in responses for CreateUserCreds and ResetUserPassword. + * + * Generated from protobuf field string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSecurePassword() + { + return $this->secure_password; + } + + /** + * Output only. The plaintext server-generated password for the user creds. + * Only populated in responses for CreateUserCreds and ResetUserPassword. + * + * Generated from protobuf field string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSecurePassword($var) + { + GPBUtil::checkString($var, True); + $this->secure_password = $var; + + return $this; + } + + /** + * Resource Identity descriptor. + * + * Generated from protobuf field .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; + * @return \Google\Cloud\Firestore\Admin\V1\UserCreds\ResourceIdentity|null + */ + public function getResourceIdentity() + { + return $this->readOneof(6); + } + + public function hasResourceIdentity() + { + return $this->hasOneof(6); + } + + /** + * Resource Identity descriptor. + * + * Generated from protobuf field .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; + * @param \Google\Cloud\Firestore\Admin\V1\UserCreds\ResourceIdentity $var + * @return $this + */ + public function setResourceIdentity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\UserCreds\ResourceIdentity::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getUserCredsIdentity() + { + return $this->whichOneof("UserCredsIdentity"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/ResourceIdentity.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/ResourceIdentity.php new file mode 100644 index 000000000000..43aae2282b0e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/ResourceIdentity.php @@ -0,0 +1,71 @@ +google.firestore.admin.v1.UserCreds.ResourceIdentity + */ +class ResourceIdentity extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Principal identifier string. + * See: https://cloud.google.com/iam/docs/principal-identifiers + * + * Generated from protobuf field string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $principal = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $principal + * Output only. Principal identifier string. + * See: https://cloud.google.com/iam/docs/principal-identifiers + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\UserCreds::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Principal identifier string. + * See: https://cloud.google.com/iam/docs/principal-identifiers + * + * Generated from protobuf field string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPrincipal() + { + return $this->principal; + } + + /** + * Output only. Principal identifier string. + * See: https://cloud.google.com/iam/docs/principal-identifiers + * + * Generated from protobuf field string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPrincipal($var) + { + GPBUtil::checkString($var, True); + $this->principal = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/State.php new file mode 100644 index 000000000000..87e4f2a1a39b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/State.php @@ -0,0 +1,61 @@ +google.firestore.admin.v1.UserCreds.State + */ +class State +{ + /** + * The default value. Should not be used. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The user creds are enabled. + * + * Generated from protobuf enum ENABLED = 1; + */ + const ENABLED = 1; + /** + * The user creds are disabled. + * + * Generated from protobuf enum DISABLED = 2; + */ + const DISABLED = 2; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::ENABLED => 'ENABLED', + self::DISABLED => 'DISABLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/WeeklyRecurrence.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/WeeklyRecurrence.php new file mode 100644 index 000000000000..8aa07e17a56a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/WeeklyRecurrence.php @@ -0,0 +1,72 @@ +google.firestore.admin.v1.WeeklyRecurrence + */ +class WeeklyRecurrence extends \Google\Protobuf\Internal\Message +{ + /** + * The day of week to run. + * DAY_OF_WEEK_UNSPECIFIED is not allowed. + * + * Generated from protobuf field .google.type.DayOfWeek day = 2; + */ + protected $day = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $day + * The day of week to run. + * DAY_OF_WEEK_UNSPECIFIED is not allowed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\Admin\V1\Schedule::initOnce(); + parent::__construct($data); + } + + /** + * The day of week to run. + * DAY_OF_WEEK_UNSPECIFIED is not allowed. + * + * Generated from protobuf field .google.type.DayOfWeek day = 2; + * @return int + */ + public function getDay() + { + return $this->day; + } + + /** + * The day of week to run. + * DAY_OF_WEEK_UNSPECIFIED is not allowed. + * + * Generated from protobuf field .google.type.DayOfWeek day = 2; + * @param int $var + * @return $this + */ + public function setDay($var) + { + GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class); + $this->day = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/bulk_delete_documents.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/bulk_delete_documents.php new file mode 100644 index 000000000000..22e0d66b5189 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/bulk_delete_documents.php @@ -0,0 +1,91 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->bulkDeleteDocuments($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BulkDeleteDocumentsResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + bulk_delete_documents_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/clone_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/clone_database.php new file mode 100644 index 000000000000..1fb08fa56f99 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/clone_database.php @@ -0,0 +1,125 @@ +setDatabase($formattedPitrSnapshotDatabase) + ->setSnapshotTime($pitrSnapshotSnapshotTime); + $request = (new CloneDatabaseRequest()) + ->setParent($formattedParent) + ->setDatabaseId($databaseId) + ->setPitrSnapshot($pitrSnapshot); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->cloneDatabase($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Database $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FirestoreAdminClient::projectName('[PROJECT]'); + $databaseId = '[DATABASE_ID]'; + $formattedPitrSnapshotDatabase = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + clone_database_sample($formattedParent, $databaseId, $formattedPitrSnapshotDatabase); +} +// [END firestore_v1_generated_FirestoreAdmin_CloneDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_backup_schedule.php new file mode 100644 index 000000000000..977286655c7b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_backup_schedule.php @@ -0,0 +1,77 @@ +setParent($formattedParent) + ->setBackupSchedule($backupSchedule); + + // Call the API and handle any network failures. + try { + /** @var BackupSchedule $response */ + $response = $firestoreAdminClient->createBackupSchedule($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + create_backup_schedule_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_CreateBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_database.php new file mode 100644 index 000000000000..783e18078ae7 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_database.php @@ -0,0 +1,96 @@ +setParent($formattedParent) + ->setDatabase($database) + ->setDatabaseId($databaseId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->createDatabase($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Database $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FirestoreAdminClient::projectName('[PROJECT]'); + $databaseId = '[DATABASE_ID]'; + + create_database_sample($formattedParent, $databaseId); +} +// [END firestore_v1_generated_FirestoreAdmin_CreateDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php new file mode 100644 index 000000000000..698c28acb527 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php @@ -0,0 +1,94 @@ +setParent($formattedParent) + ->setIndex($index); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->createIndex($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Index $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FirestoreAdminClient::collectionGroupName( + '[PROJECT]', + '[DATABASE]', + '[COLLECTION]' + ); + + create_index_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_CreateIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_user_creds.php new file mode 100644 index 000000000000..12f15789d40a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_user_creds.php @@ -0,0 +1,82 @@ +setParent($formattedParent) + ->setUserCreds($userCreds) + ->setUserCredsId($userCredsId); + + // Call the API and handle any network failures. + try { + /** @var UserCreds $response */ + $response = $firestoreAdminClient->createUserCreds($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + $userCredsId = '[USER_CREDS_ID]'; + + create_user_creds_sample($formattedParent, $userCredsId); +} +// [END firestore_v1_generated_FirestoreAdmin_CreateUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup.php new file mode 100644 index 000000000000..d1d6ca23d9fb --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $firestoreAdminClient->deleteBackup($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + + delete_backup_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_DeleteBackup_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup_schedule.php new file mode 100644 index 000000000000..f63397852def --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup_schedule.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $firestoreAdminClient->deleteBackupSchedule($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::backupScheduleName( + '[PROJECT]', + '[DATABASE]', + '[BACKUP_SCHEDULE]' + ); + + delete_backup_schedule_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_DeleteBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_database.php new file mode 100644 index 000000000000..2c054985cc61 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_database.php @@ -0,0 +1,84 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->deleteDatabase($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Database $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + delete_database_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_DeleteDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php new file mode 100644 index 000000000000..5100d4af099d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $firestoreAdminClient->deleteIndex($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::indexName( + '[PROJECT]', + '[DATABASE]', + '[COLLECTION]', + '[INDEX]' + ); + + delete_index_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_DeleteIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_user_creds.php new file mode 100644 index 000000000000..db1dfa9a341d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_user_creds.php @@ -0,0 +1,70 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $firestoreAdminClient->deleteUserCreds($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + + delete_user_creds_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_DeleteUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/disable_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/disable_user_creds.php new file mode 100644 index 000000000000..2b7bb1a05207 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/disable_user_creds.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var UserCreds $response */ + $response = $firestoreAdminClient->disableUserCreds($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + + disable_user_creds_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_DisableUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/enable_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/enable_user_creds.php new file mode 100644 index 000000000000..fff81717a1ec --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/enable_user_creds.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var UserCreds $response */ + $response = $firestoreAdminClient->enableUserCreds($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + + enable_user_creds_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_EnableUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php new file mode 100644 index 000000000000..d74212e16a28 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php @@ -0,0 +1,94 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->exportDocuments($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ExportDocumentsResponse $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + export_documents_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_ExportDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup.php new file mode 100644 index 000000000000..fb0043c93703 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Backup $response */ + $response = $firestoreAdminClient->getBackup($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + + get_backup_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_GetBackup_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup_schedule.php new file mode 100644 index 000000000000..42aabad3b2f8 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup_schedule.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var BackupSchedule $response */ + $response = $firestoreAdminClient->getBackupSchedule($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::backupScheduleName( + '[PROJECT]', + '[DATABASE]', + '[BACKUP_SCHEDULE]' + ); + + get_backup_schedule_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_GetBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php new file mode 100644 index 000000000000..39e4f8f513b9 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Database $response */ + $response = $firestoreAdminClient->getDatabase($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + get_database_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_GetDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php new file mode 100644 index 000000000000..c85dadbe1eb5 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Field $response */ + $response = $firestoreAdminClient->getField($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::fieldName( + '[PROJECT]', + '[DATABASE]', + '[COLLECTION]', + '[FIELD]' + ); + + get_field_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_GetField_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php new file mode 100644 index 000000000000..d87b6487a86e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Index $response */ + $response = $firestoreAdminClient->getIndex($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::indexName( + '[PROJECT]', + '[DATABASE]', + '[COLLECTION]', + '[INDEX]' + ); + + get_index_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_GetIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_user_creds.php new file mode 100644 index 000000000000..0921c791681b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_user_creds.php @@ -0,0 +1,73 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var UserCreds $response */ + $response = $firestoreAdminClient->getUserCreds($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + + get_user_creds_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_GetUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php new file mode 100644 index 000000000000..3bcd34ff43ae --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->importDocuments($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + import_documents_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_ImportDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backup_schedules.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backup_schedules.php new file mode 100644 index 000000000000..e5fd7d370287 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backup_schedules.php @@ -0,0 +1,73 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var ListBackupSchedulesResponse $response */ + $response = $firestoreAdminClient->listBackupSchedules($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + list_backup_schedules_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_ListBackupSchedules_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backups.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backups.php new file mode 100644 index 000000000000..18a8633f5fa1 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backups.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var ListBackupsResponse $response */ + $response = $firestoreAdminClient->listBackups($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FirestoreAdminClient::locationName('[PROJECT]', '[LOCATION]'); + + list_backups_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_ListBackups_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php new file mode 100644 index 000000000000..dbfcf54c34a4 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php @@ -0,0 +1,72 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var ListDatabasesResponse $response */ + $response = $firestoreAdminClient->listDatabases($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FirestoreAdminClient::projectName('[PROJECT]'); + + list_databases_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_ListDatabases_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php new file mode 100644 index 000000000000..e0219706c327 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php @@ -0,0 +1,89 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $firestoreAdminClient->listFields($request); + + /** @var Field $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FirestoreAdminClient::collectionGroupName( + '[PROJECT]', + '[DATABASE]', + '[COLLECTION]' + ); + + list_fields_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_ListFields_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php new file mode 100644 index 000000000000..f3bac598fa14 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $firestoreAdminClient->listIndexes($request); + + /** @var Index $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FirestoreAdminClient::collectionGroupName( + '[PROJECT]', + '[DATABASE]', + '[COLLECTION]' + ); + + list_indexes_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_ListIndexes_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_user_creds.php new file mode 100644 index 000000000000..157d102fb508 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_user_creds.php @@ -0,0 +1,73 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var ListUserCredsResponse $response */ + $response = $firestoreAdminClient->listUserCreds($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); + + list_user_creds_sample($formattedParent); +} +// [END firestore_v1_generated_FirestoreAdmin_ListUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/reset_user_password.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/reset_user_password.php new file mode 100644 index 000000000000..cf835144108b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/reset_user_password.php @@ -0,0 +1,72 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var UserCreds $response */ + $response = $firestoreAdminClient->resetUserPassword($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + + reset_user_password_sample($formattedName); +} +// [END firestore_v1_generated_FirestoreAdmin_ResetUserPassword_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/restore_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/restore_database.php new file mode 100644 index 000000000000..98381e2f7c76 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/restore_database.php @@ -0,0 +1,124 @@ +setParent($formattedParent) + ->setDatabaseId($databaseId) + ->setBackup($formattedBackup); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->restoreDatabase($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Database $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = FirestoreAdminClient::projectName('[PROJECT]'); + $databaseId = '[DATABASE_ID]'; + $formattedBackup = FirestoreAdminClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + + restore_database_sample($formattedParent, $databaseId, $formattedBackup); +} +// [END firestore_v1_generated_FirestoreAdmin_RestoreDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_backup_schedule.php new file mode 100644 index 000000000000..a86c8f7e485f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_backup_schedule.php @@ -0,0 +1,59 @@ +setBackupSchedule($backupSchedule); + + // Call the API and handle any network failures. + try { + /** @var BackupSchedule $response */ + $response = $firestoreAdminClient->updateBackupSchedule($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END firestore_v1_generated_FirestoreAdmin_UpdateBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php new file mode 100644 index 000000000000..075e9e0b9cb2 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php @@ -0,0 +1,71 @@ +setDatabase($database); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->updateDatabase($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Database $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END firestore_v1_generated_FirestoreAdmin_UpdateDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php new file mode 100644 index 000000000000..ea5c384494ac --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php @@ -0,0 +1,122 @@ +setName($fieldName); + $request = (new UpdateFieldRequest()) + ->setField($field); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $firestoreAdminClient->updateField($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Field $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $fieldName = '[NAME]'; + + update_field_sample($fieldName); +} +// [END firestore_v1_generated_FirestoreAdmin_UpdateField_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/Client/FirestoreAdminClient.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/Client/FirestoreAdminClient.php new file mode 100644 index 000000000000..97f6dfe6af15 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/src/V1/Client/FirestoreAdminClient.php @@ -0,0 +1,1473 @@ + bulkDeleteDocumentsAsync(BulkDeleteDocumentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface cloneDatabaseAsync(CloneDatabaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface createBackupScheduleAsync(CreateBackupScheduleRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDatabaseAsync(CreateDatabaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface createIndexAsync(CreateIndexRequest $request, array $optionalArgs = []) + * @method PromiseInterface createUserCredsAsync(CreateUserCredsRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBackupScheduleAsync(DeleteBackupScheduleRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDatabaseAsync(DeleteDatabaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteIndexAsync(DeleteIndexRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteUserCredsAsync(DeleteUserCredsRequest $request, array $optionalArgs = []) + * @method PromiseInterface disableUserCredsAsync(DisableUserCredsRequest $request, array $optionalArgs = []) + * @method PromiseInterface enableUserCredsAsync(EnableUserCredsRequest $request, array $optionalArgs = []) + * @method PromiseInterface exportDocumentsAsync(ExportDocumentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBackupAsync(GetBackupRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBackupScheduleAsync(GetBackupScheduleRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDatabaseAsync(GetDatabaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface getFieldAsync(GetFieldRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIndexAsync(GetIndexRequest $request, array $optionalArgs = []) + * @method PromiseInterface getUserCredsAsync(GetUserCredsRequest $request, array $optionalArgs = []) + * @method PromiseInterface importDocumentsAsync(ImportDocumentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBackupSchedulesAsync(ListBackupSchedulesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBackupsAsync(ListBackupsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDatabasesAsync(ListDatabasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listFieldsAsync(ListFieldsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listIndexesAsync(ListIndexesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listUserCredsAsync(ListUserCredsRequest $request, array $optionalArgs = []) + * @method PromiseInterface resetUserPasswordAsync(ResetUserPasswordRequest $request, array $optionalArgs = []) + * @method PromiseInterface restoreDatabaseAsync(RestoreDatabaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBackupScheduleAsync(UpdateBackupScheduleRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDatabaseAsync(UpdateDatabaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateFieldAsync(UpdateFieldRequest $request, array $optionalArgs = []) + */ +final class FirestoreAdminClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.firestore.admin.v1.FirestoreAdmin'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'firestore.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'firestore.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/datastore', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/firestore_admin_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/firestore_admin_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/firestore_admin_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/firestore_admin_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a backup + * resource. + * + * @param string $project + * @param string $location + * @param string $backup + * + * @return string The formatted backup resource. + */ + public static function backupName(string $project, string $location, string $backup): string + { + return self::getPathTemplate('backup')->render([ + 'project' => $project, + 'location' => $location, + 'backup' => $backup, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * backup_schedule resource. + * + * @param string $project + * @param string $database + * @param string $backupSchedule + * + * @return string The formatted backup_schedule resource. + */ + public static function backupScheduleName(string $project, string $database, string $backupSchedule): string + { + return self::getPathTemplate('backupSchedule')->render([ + 'project' => $project, + 'database' => $database, + 'backup_schedule' => $backupSchedule, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * collection_group resource. + * + * @param string $project + * @param string $database + * @param string $collection + * + * @return string The formatted collection_group resource. + */ + public static function collectionGroupName(string $project, string $database, string $collection): string + { + return self::getPathTemplate('collectionGroup')->render([ + 'project' => $project, + 'database' => $database, + 'collection' => $collection, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a database + * resource. + * + * @param string $project + * @param string $database + * + * @return string The formatted database resource. + */ + public static function databaseName(string $project, string $database): string + { + return self::getPathTemplate('database')->render([ + 'project' => $project, + 'database' => $database, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a field + * resource. + * + * @param string $project + * @param string $database + * @param string $collection + * @param string $field + * + * @return string The formatted field resource. + */ + public static function fieldName(string $project, string $database, string $collection, string $field): string + { + return self::getPathTemplate('field')->render([ + 'project' => $project, + 'database' => $database, + 'collection' => $collection, + 'field' => $field, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a index + * resource. + * + * @param string $project + * @param string $database + * @param string $collection + * @param string $index + * + * @return string The formatted index resource. + */ + public static function indexName(string $project, string $database, string $collection, string $index): string + { + return self::getPathTemplate('index')->render([ + 'project' => $project, + 'database' => $database, + 'collection' => $collection, + 'index' => $index, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a location + * resource. + * + * @param string $project + * @param string $location + * + * @return string The formatted location resource. + */ + public static function locationName(string $project, string $location): string + { + return self::getPathTemplate('location')->render([ + 'project' => $project, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a operation + * resource. + * + * @param string $project + * @param string $database + * @param string $operation + * + * @return string The formatted operation resource. + */ + public static function operationName(string $project, string $database, string $operation): string + { + return self::getPathTemplate('operation')->render([ + 'project' => $project, + 'database' => $database, + 'operation' => $operation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a user_creds + * resource. + * + * @param string $project + * @param string $database + * @param string $userCreds + * + * @return string The formatted user_creds resource. + */ + public static function userCredsName(string $project, string $database, string $userCreds): string + { + return self::getPathTemplate('userCreds')->render([ + 'project' => $project, + 'database' => $database, + 'user_creds' => $userCreds, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - backup: projects/{project}/locations/{location}/backups/{backup} + * - backupSchedule: projects/{project}/databases/{database}/backupSchedules/{backup_schedule} + * - collectionGroup: projects/{project}/databases/{database}/collectionGroups/{collection} + * - database: projects/{project}/databases/{database} + * - field: projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field} + * - index: projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index} + * - location: projects/{project}/locations/{location} + * - operation: projects/{project}/databases/{database}/operations/{operation} + * - project: projects/{project} + * - userCreds: projects/{project}/databases/{database}/userCreds/{user_creds} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'firestore.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Firestore\Admin\V1\FirestoreAdminClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new FirestoreAdminClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Bulk deletes a subset of documents from Google Cloud Firestore. + * Documents created or updated after the underlying system starts to process + * the request will not be deleted. The bulk delete occurs in the background + * and its progress can be monitored and managed via the Operation resource + * that is created. + * + * For more details on bulk delete behavior, refer to: + * https://cloud.google.com/firestore/docs/manage-data/bulk-delete + * + * The async variant is {@see FirestoreAdminClient::bulkDeleteDocumentsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/bulk_delete_documents.php + * + * @param BulkDeleteDocumentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function bulkDeleteDocuments(BulkDeleteDocumentsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('BulkDeleteDocuments', $request, $callOptions)->wait(); + } + + /** + * Creates a new database by cloning an existing one. + * + * The new database must be in the same cloud region or multi-region location + * as the existing database. This behaves similar to + * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] + * except instead of creating a new empty database, a new database is created + * with the database type, index configuration, and documents from an existing + * database. + * + * The [long-running operation][google.longrunning.Operation] can be used to + * track the progress of the clone, with the Operation's + * [metadata][google.longrunning.Operation.metadata] field type being the + * [CloneDatabaseMetadata][google.firestore.admin.v1.CloneDatabaseMetadata]. + * The [response][google.longrunning.Operation.response] type is the + * [Database][google.firestore.admin.v1.Database] if the clone was + * successful. The new database is not readable or writeable until the LRO has + * completed. + * + * The async variant is {@see FirestoreAdminClient::cloneDatabaseAsync()} . + * + * @example samples/V1/FirestoreAdminClient/clone_database.php + * + * @param CloneDatabaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function cloneDatabase(CloneDatabaseRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CloneDatabase', $request, $callOptions)->wait(); + } + + /** + * Creates a backup schedule on a database. + * At most two backup schedules can be configured on a database, one daily + * backup schedule and one weekly backup schedule. + * + * The async variant is {@see FirestoreAdminClient::createBackupScheduleAsync()} . + * + * @example samples/V1/FirestoreAdminClient/create_backup_schedule.php + * + * @param CreateBackupScheduleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BackupSchedule + * + * @throws ApiException Thrown if the API call fails. + */ + public function createBackupSchedule(CreateBackupScheduleRequest $request, array $callOptions = []): BackupSchedule + { + return $this->startApiCall('CreateBackupSchedule', $request, $callOptions)->wait(); + } + + /** + * Create a database. + * + * The async variant is {@see FirestoreAdminClient::createDatabaseAsync()} . + * + * @example samples/V1/FirestoreAdminClient/create_database.php + * + * @param CreateDatabaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createDatabase(CreateDatabaseRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateDatabase', $request, $callOptions)->wait(); + } + + /** + * Creates a composite index. This returns a + * [google.longrunning.Operation][google.longrunning.Operation] which may be + * used to track the status of the creation. The metadata for the operation + * will be the type + * [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. + * + * The async variant is {@see FirestoreAdminClient::createIndexAsync()} . + * + * @example samples/V1/FirestoreAdminClient/create_index.php + * + * @param CreateIndexRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createIndex(CreateIndexRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateIndex', $request, $callOptions)->wait(); + } + + /** + * Create a user creds. + * + * The async variant is {@see FirestoreAdminClient::createUserCredsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/create_user_creds.php + * + * @param CreateUserCredsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UserCreds + * + * @throws ApiException Thrown if the API call fails. + */ + public function createUserCreds(CreateUserCredsRequest $request, array $callOptions = []): UserCreds + { + return $this->startApiCall('CreateUserCreds', $request, $callOptions)->wait(); + } + + /** + * Deletes a backup. + * + * The async variant is {@see FirestoreAdminClient::deleteBackupAsync()} . + * + * @example samples/V1/FirestoreAdminClient/delete_backup.php + * + * @param DeleteBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteBackup(DeleteBackupRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteBackup', $request, $callOptions)->wait(); + } + + /** + * Deletes a backup schedule. + * + * The async variant is {@see FirestoreAdminClient::deleteBackupScheduleAsync()} . + * + * @example samples/V1/FirestoreAdminClient/delete_backup_schedule.php + * + * @param DeleteBackupScheduleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteBackupSchedule(DeleteBackupScheduleRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteBackupSchedule', $request, $callOptions)->wait(); + } + + /** + * Deletes a database. + * + * The async variant is {@see FirestoreAdminClient::deleteDatabaseAsync()} . + * + * @example samples/V1/FirestoreAdminClient/delete_database.php + * + * @param DeleteDatabaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteDatabase(DeleteDatabaseRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteDatabase', $request, $callOptions)->wait(); + } + + /** + * Deletes a composite index. + * + * The async variant is {@see FirestoreAdminClient::deleteIndexAsync()} . + * + * @example samples/V1/FirestoreAdminClient/delete_index.php + * + * @param DeleteIndexRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteIndex(DeleteIndexRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteIndex', $request, $callOptions)->wait(); + } + + /** + * Deletes a user creds. + * + * The async variant is {@see FirestoreAdminClient::deleteUserCredsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/delete_user_creds.php + * + * @param DeleteUserCredsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteUserCreds(DeleteUserCredsRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteUserCreds', $request, $callOptions)->wait(); + } + + /** + * Disables a user creds. No-op if the user creds are already disabled. + * + * The async variant is {@see FirestoreAdminClient::disableUserCredsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/disable_user_creds.php + * + * @param DisableUserCredsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UserCreds + * + * @throws ApiException Thrown if the API call fails. + */ + public function disableUserCreds(DisableUserCredsRequest $request, array $callOptions = []): UserCreds + { + return $this->startApiCall('DisableUserCreds', $request, $callOptions)->wait(); + } + + /** + * Enables a user creds. No-op if the user creds are already enabled. + * + * The async variant is {@see FirestoreAdminClient::enableUserCredsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/enable_user_creds.php + * + * @param EnableUserCredsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UserCreds + * + * @throws ApiException Thrown if the API call fails. + */ + public function enableUserCreds(EnableUserCredsRequest $request, array $callOptions = []): UserCreds + { + return $this->startApiCall('EnableUserCreds', $request, $callOptions)->wait(); + } + + /** + * Exports a copy of all or a subset of documents from Google Cloud Firestore + * to another storage system, such as Google Cloud Storage. Recent updates to + * documents may not be reflected in the export. The export occurs in the + * background and its progress can be monitored and managed via the + * Operation resource that is created. The output of an export may only be + * used once the associated operation is done. If an export operation is + * cancelled before completion it may leave partial data behind in Google + * Cloud Storage. + * + * For more details on export behavior and output format, refer to: + * https://cloud.google.com/firestore/docs/manage-data/export-import + * + * The async variant is {@see FirestoreAdminClient::exportDocumentsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/export_documents.php + * + * @param ExportDocumentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function exportDocuments(ExportDocumentsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ExportDocuments', $request, $callOptions)->wait(); + } + + /** + * Gets information about a backup. + * + * The async variant is {@see FirestoreAdminClient::getBackupAsync()} . + * + * @example samples/V1/FirestoreAdminClient/get_backup.php + * + * @param GetBackupRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Backup + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBackup(GetBackupRequest $request, array $callOptions = []): Backup + { + return $this->startApiCall('GetBackup', $request, $callOptions)->wait(); + } + + /** + * Gets information about a backup schedule. + * + * The async variant is {@see FirestoreAdminClient::getBackupScheduleAsync()} . + * + * @example samples/V1/FirestoreAdminClient/get_backup_schedule.php + * + * @param GetBackupScheduleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BackupSchedule + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBackupSchedule(GetBackupScheduleRequest $request, array $callOptions = []): BackupSchedule + { + return $this->startApiCall('GetBackupSchedule', $request, $callOptions)->wait(); + } + + /** + * Gets information about a database. + * + * The async variant is {@see FirestoreAdminClient::getDatabaseAsync()} . + * + * @example samples/V1/FirestoreAdminClient/get_database.php + * + * @param GetDatabaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Database + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDatabase(GetDatabaseRequest $request, array $callOptions = []): Database + { + return $this->startApiCall('GetDatabase', $request, $callOptions)->wait(); + } + + /** + * Gets the metadata and configuration for a Field. + * + * The async variant is {@see FirestoreAdminClient::getFieldAsync()} . + * + * @example samples/V1/FirestoreAdminClient/get_field.php + * + * @param GetFieldRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Field + * + * @throws ApiException Thrown if the API call fails. + */ + public function getField(GetFieldRequest $request, array $callOptions = []): Field + { + return $this->startApiCall('GetField', $request, $callOptions)->wait(); + } + + /** + * Gets a composite index. + * + * The async variant is {@see FirestoreAdminClient::getIndexAsync()} . + * + * @example samples/V1/FirestoreAdminClient/get_index.php + * + * @param GetIndexRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Index + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIndex(GetIndexRequest $request, array $callOptions = []): Index + { + return $this->startApiCall('GetIndex', $request, $callOptions)->wait(); + } + + /** + * Gets a user creds resource. Note that the returned resource does not + * contain the secret value itself. + * + * The async variant is {@see FirestoreAdminClient::getUserCredsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/get_user_creds.php + * + * @param GetUserCredsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UserCreds + * + * @throws ApiException Thrown if the API call fails. + */ + public function getUserCreds(GetUserCredsRequest $request, array $callOptions = []): UserCreds + { + return $this->startApiCall('GetUserCreds', $request, $callOptions)->wait(); + } + + /** + * Imports documents into Google Cloud Firestore. Existing documents with the + * same name are overwritten. The import occurs in the background and its + * progress can be monitored and managed via the Operation resource that is + * created. If an ImportDocuments operation is cancelled, it is possible + * that a subset of the data has already been imported to Cloud Firestore. + * + * The async variant is {@see FirestoreAdminClient::importDocumentsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/import_documents.php + * + * @param ImportDocumentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function importDocuments(ImportDocumentsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportDocuments', $request, $callOptions)->wait(); + } + + /** + * List backup schedules. + * + * The async variant is {@see FirestoreAdminClient::listBackupSchedulesAsync()} . + * + * @example samples/V1/FirestoreAdminClient/list_backup_schedules.php + * + * @param ListBackupSchedulesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ListBackupSchedulesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listBackupSchedules(ListBackupSchedulesRequest $request, array $callOptions = []): ListBackupSchedulesResponse + { + return $this->startApiCall('ListBackupSchedules', $request, $callOptions)->wait(); + } + + /** + * Lists all the backups. + * + * The async variant is {@see FirestoreAdminClient::listBackupsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/list_backups.php + * + * @param ListBackupsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ListBackupsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listBackups(ListBackupsRequest $request, array $callOptions = []): ListBackupsResponse + { + return $this->startApiCall('ListBackups', $request, $callOptions)->wait(); + } + + /** + * List all the databases in the project. + * + * The async variant is {@see FirestoreAdminClient::listDatabasesAsync()} . + * + * @example samples/V1/FirestoreAdminClient/list_databases.php + * + * @param ListDatabasesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ListDatabasesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listDatabases(ListDatabasesRequest $request, array $callOptions = []): ListDatabasesResponse + { + return $this->startApiCall('ListDatabases', $request, $callOptions)->wait(); + } + + /** + * Lists the field configuration and metadata for this database. + * + * Currently, + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * only supports listing fields that have been explicitly overridden. To issue + * this query, call + * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + * with the filter set to `indexConfig.usesAncestorConfig:false` or + * `ttlConfig:*`. + * + * The async variant is {@see FirestoreAdminClient::listFieldsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/list_fields.php + * + * @param ListFieldsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listFields(ListFieldsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListFields', $request, $callOptions); + } + + /** + * Lists composite indexes. + * + * The async variant is {@see FirestoreAdminClient::listIndexesAsync()} . + * + * @example samples/V1/FirestoreAdminClient/list_indexes.php + * + * @param ListIndexesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listIndexes(ListIndexesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListIndexes', $request, $callOptions); + } + + /** + * List all user creds in the database. Note that the returned resource + * does not contain the secret value itself. + * + * The async variant is {@see FirestoreAdminClient::listUserCredsAsync()} . + * + * @example samples/V1/FirestoreAdminClient/list_user_creds.php + * + * @param ListUserCredsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ListUserCredsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listUserCreds(ListUserCredsRequest $request, array $callOptions = []): ListUserCredsResponse + { + return $this->startApiCall('ListUserCreds', $request, $callOptions)->wait(); + } + + /** + * Resets the password of a user creds. + * + * The async variant is {@see FirestoreAdminClient::resetUserPasswordAsync()} . + * + * @example samples/V1/FirestoreAdminClient/reset_user_password.php + * + * @param ResetUserPasswordRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UserCreds + * + * @throws ApiException Thrown if the API call fails. + */ + public function resetUserPassword(ResetUserPasswordRequest $request, array $callOptions = []): UserCreds + { + return $this->startApiCall('ResetUserPassword', $request, $callOptions)->wait(); + } + + /** + * Creates a new database by restoring from an existing backup. + * + * The new database must be in the same cloud region or multi-region location + * as the existing backup. This behaves similar to + * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] + * except instead of creating a new empty database, a new database is created + * with the database type, index configuration, and documents from an existing + * backup. + * + * The [long-running operation][google.longrunning.Operation] can be used to + * track the progress of the restore, with the Operation's + * [metadata][google.longrunning.Operation.metadata] field type being the + * [RestoreDatabaseMetadata][google.firestore.admin.v1.RestoreDatabaseMetadata]. + * The [response][google.longrunning.Operation.response] type is the + * [Database][google.firestore.admin.v1.Database] if the restore was + * successful. The new database is not readable or writeable until the LRO has + * completed. + * + * The async variant is {@see FirestoreAdminClient::restoreDatabaseAsync()} . + * + * @example samples/V1/FirestoreAdminClient/restore_database.php + * + * @param RestoreDatabaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function restoreDatabase(RestoreDatabaseRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RestoreDatabase', $request, $callOptions)->wait(); + } + + /** + * Updates a backup schedule. + * + * The async variant is {@see FirestoreAdminClient::updateBackupScheduleAsync()} . + * + * @example samples/V1/FirestoreAdminClient/update_backup_schedule.php + * + * @param UpdateBackupScheduleRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BackupSchedule + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateBackupSchedule(UpdateBackupScheduleRequest $request, array $callOptions = []): BackupSchedule + { + return $this->startApiCall('UpdateBackupSchedule', $request, $callOptions)->wait(); + } + + /** + * Updates a database. + * + * The async variant is {@see FirestoreAdminClient::updateDatabaseAsync()} . + * + * @example samples/V1/FirestoreAdminClient/update_database.php + * + * @param UpdateDatabaseRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateDatabase(UpdateDatabaseRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateDatabase', $request, $callOptions)->wait(); + } + + /** + * Updates a field configuration. Currently, field updates apply only to + * single field index configuration. However, calls to + * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] + * should provide a field mask to avoid changing any configuration that the + * caller isn't aware of. The field mask should be specified as: `{ paths: + * "index_config" }`. + * + * This call returns a + * [google.longrunning.Operation][google.longrunning.Operation] which may be + * used to track the status of the field update. The metadata for the + * operation will be the type + * [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. + * + * To configure the default field settings for the database, use + * the special `Field` with resource name: + * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + * + * The async variant is {@see FirestoreAdminClient::updateFieldAsync()} . + * + * @example samples/V1/FirestoreAdminClient/update_field.php + * + * @param UpdateFieldRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateField(UpdateFieldRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateField', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json b/owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..dbbc7871bacb --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json @@ -0,0 +1,178 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.firestore.admin.v1", + "libraryPackage": "Google\\Cloud\\Firestore\\Admin\\V1", + "services": { + "FirestoreAdmin": { + "clients": { + "grpc": { + "libraryClient": "FirestoreAdminGapicClient", + "rpcs": { + "BulkDeleteDocuments": { + "methods": [ + "bulkDeleteDocuments" + ] + }, + "CloneDatabase": { + "methods": [ + "cloneDatabase" + ] + }, + "CreateBackupSchedule": { + "methods": [ + "createBackupSchedule" + ] + }, + "CreateDatabase": { + "methods": [ + "createDatabase" + ] + }, + "CreateIndex": { + "methods": [ + "createIndex" + ] + }, + "CreateUserCreds": { + "methods": [ + "createUserCreds" + ] + }, + "DeleteBackup": { + "methods": [ + "deleteBackup" + ] + }, + "DeleteBackupSchedule": { + "methods": [ + "deleteBackupSchedule" + ] + }, + "DeleteDatabase": { + "methods": [ + "deleteDatabase" + ] + }, + "DeleteIndex": { + "methods": [ + "deleteIndex" + ] + }, + "DeleteUserCreds": { + "methods": [ + "deleteUserCreds" + ] + }, + "DisableUserCreds": { + "methods": [ + "disableUserCreds" + ] + }, + "EnableUserCreds": { + "methods": [ + "enableUserCreds" + ] + }, + "ExportDocuments": { + "methods": [ + "exportDocuments" + ] + }, + "GetBackup": { + "methods": [ + "getBackup" + ] + }, + "GetBackupSchedule": { + "methods": [ + "getBackupSchedule" + ] + }, + "GetDatabase": { + "methods": [ + "getDatabase" + ] + }, + "GetField": { + "methods": [ + "getField" + ] + }, + "GetIndex": { + "methods": [ + "getIndex" + ] + }, + "GetUserCreds": { + "methods": [ + "getUserCreds" + ] + }, + "ImportDocuments": { + "methods": [ + "importDocuments" + ] + }, + "ListBackupSchedules": { + "methods": [ + "listBackupSchedules" + ] + }, + "ListBackups": { + "methods": [ + "listBackups" + ] + }, + "ListDatabases": { + "methods": [ + "listDatabases" + ] + }, + "ListFields": { + "methods": [ + "listFields" + ] + }, + "ListIndexes": { + "methods": [ + "listIndexes" + ] + }, + "ListUserCreds": { + "methods": [ + "listUserCreds" + ] + }, + "ResetUserPassword": { + "methods": [ + "resetUserPassword" + ] + }, + "RestoreDatabase": { + "methods": [ + "restoreDatabase" + ] + }, + "UpdateBackupSchedule": { + "methods": [ + "updateBackupSchedule" + ] + }, + "UpdateDatabase": { + "methods": [ + "updateDatabase" + ] + }, + "UpdateField": { + "methods": [ + "updateField" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json new file mode 100644 index 000000000000..5cbb0d1c138f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json @@ -0,0 +1,226 @@ +{ + "interfaces": { + "google.firestore.admin.v1.FirestoreAdmin": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "INTERNAL", + "DEADLINE_EXCEEDED" + ], + "no_retry_1_codes": [], + "no_retry_2_codes": [], + "no_retry_3_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 120000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 120000, + "total_timeout_millis": 120000 + }, + "no_retry_3_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "BulkDeleteDocuments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CloneDatabase": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreateBackupSchedule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateDatabase": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreateIndex": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateUserCreds": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteBackup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteBackupSchedule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteDatabase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteIndex": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteUserCreds": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DisableUserCreds": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "EnableUserCreds": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ExportDocuments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetBackup": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetBackupSchedule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetDatabase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetField": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIndex": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetUserCreds": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ImportDocuments": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "ListBackupSchedules": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListBackups": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListDatabases": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListFields": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListIndexes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListUserCreds": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ResetUserPassword": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RestoreDatabase": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "UpdateBackupSchedule": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateDatabase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateField": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php new file mode 100644 index 000000000000..c3127617cb45 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php @@ -0,0 +1,523 @@ + [ + 'google.firestore.admin.v1.FirestoreAdmin' => [ + 'BulkDeleteDocuments' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\BulkDeleteDocumentsResponse', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\BulkDeleteDocumentsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CloneDatabase' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\CloneDatabaseMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'project_id', + 'fieldAccessors' => [ + 'getPitrSnapshot', + 'getDatabase', + ], + 'matchers' => [], + ], + [ + 'keyName' => 'database_id', + 'fieldAccessors' => [ + 'getPitrSnapshot', + 'getDatabase', + ], + 'matchers' => [], + ], + ], + ], + 'CreateDatabase' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\CreateDatabaseMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateIndex' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Index', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\IndexOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteDatabase' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\DeleteDatabaseMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ExportDocuments' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\ExportDocumentsResponse', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\ExportDocumentsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ImportDocuments' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\ImportDocumentsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RestoreDatabase' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\RestoreDatabaseMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDatabase' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\UpdateDatabaseMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'database.name', + 'fieldAccessors' => [ + 'getDatabase', + 'getName', + ], + ], + ], + ], + 'UpdateField' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Field', + 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'field.name', + 'fieldAccessors' => [ + 'getField', + 'getName', + ], + ], + ], + ], + 'CreateBackupSchedule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\BackupSchedule', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateUserCreds' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteBackup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackupSchedule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteIndex' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUserCreds' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DisableUserCreds' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'EnableUserCreds' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBackup' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Backup', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBackupSchedule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\BackupSchedule', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDatabase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Database', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetField' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Field', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIndex' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Index', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetUserCreds' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListBackupSchedules' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListBackupSchedulesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackups' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListBackupsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDatabases' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListDatabasesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListFields' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFields', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListFieldsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListIndexes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getIndexes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListIndexesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListUserCreds' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListUserCredsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ResetUserPassword' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateBackupSchedule' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\Admin\V1\BackupSchedule', + 'headerParams' => [ + [ + 'keyName' => 'backup_schedule.name', + 'fieldAccessors' => [ + 'getBackupSchedule', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'backup' => 'projects/{project}/locations/{location}/backups/{backup}', + 'backupSchedule' => 'projects/{project}/databases/{database}/backupSchedules/{backup_schedule}', + 'collectionGroup' => 'projects/{project}/databases/{database}/collectionGroups/{collection}', + 'database' => 'projects/{project}/databases/{database}', + 'field' => 'projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}', + 'index' => 'projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}', + 'location' => 'projects/{project}/locations/{location}', + 'operation' => 'projects/{project}/databases/{database}/operations/{operation}', + 'project' => 'projects/{project}', + 'userCreds' => 'projects/{project}/databases/{database}/userCreds/{user_creds}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php new file mode 100644 index 000000000000..a2b82a32fc0f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php @@ -0,0 +1,452 @@ + [ + 'google.firestore.admin.v1.FirestoreAdmin' => [ + 'BulkDeleteDocuments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*}:bulkDeleteDocuments', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CloneDatabase' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/databases:clone', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateBackupSchedule' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*}/backupSchedules', + 'body' => 'backup_schedule', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDatabase' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/databases', + 'body' => 'database', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'database_id', + ], + ], + 'CreateIndex' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes', + 'body' => 'index', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateUserCreds' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*}/userCreds', + 'body' => 'user_creds', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'user_creds_id', + ], + ], + 'DeleteBackup' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteBackupSchedule' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/backupSchedules/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteDatabase' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/databases/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteIndex' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteUserCreds' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DisableUserCreds' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}:disable', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'EnableUserCreds' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}:enable', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExportDocuments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*}:exportDocuments', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBackup' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/backups/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBackupSchedule' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/backupSchedules/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDatabase' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetField' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIndex' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetUserCreds' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportDocuments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*}:importDocuments', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListBackupSchedules' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*}/backupSchedules', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListBackups' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backups', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDatabases' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*}/databases', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListFields' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListIndexes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListUserCreds' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*}/userCreds', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ResetUserPassword' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}:resetPassword', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'RestoreDatabase' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*}/databases:restore', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateBackupSchedule' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{backup_schedule.name=projects/*/databases/*/backupSchedules/*}', + 'body' => 'backup_schedule', + 'placeholders' => [ + 'backup_schedule.name' => [ + 'getters' => [ + 'getBackupSchedule', + 'getName', + ], + ], + ], + ], + 'UpdateDatabase' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{database.name=projects/*/databases/*}', + 'body' => 'database', + 'placeholders' => [ + 'database.name' => [ + 'getters' => [ + 'getDatabase', + 'getName', + ], + ], + ], + ], + 'UpdateField' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}', + 'body' => 'field', + 'placeholders' => [ + 'field.name' => [ + 'getters' => [ + 'getField', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/Client/FirestoreAdminClientTest.php b/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/Client/FirestoreAdminClientTest.php new file mode 100644 index 000000000000..158d07508900 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/Client/FirestoreAdminClientTest.php @@ -0,0 +1,2977 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return FirestoreAdminClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new FirestoreAdminClient($options); + } + + /** @test */ + public function bulkDeleteDocumentsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/bulkDeleteDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BulkDeleteDocumentsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/bulkDeleteDocumentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new BulkDeleteDocumentsRequest()) + ->setName($formattedName); + $response = $gapicClient->bulkDeleteDocuments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/BulkDeleteDocuments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/bulkDeleteDocumentsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function bulkDeleteDocumentsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/bulkDeleteDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new BulkDeleteDocumentsRequest()) + ->setName($formattedName); + $response = $gapicClient->bulkDeleteDocuments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/bulkDeleteDocumentsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cloneDatabaseTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cloneDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $locationId = 'locationId552319461'; + $keyPrefix = 'keyPrefix438630514'; + $previousId = 'previousId-1005863069'; + $freeTier = false; + $etag = 'etag3123477'; + $expectedResponse = new Database(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setKeyPrefix($keyPrefix); + $expectedResponse->setPreviousId($previousId); + $expectedResponse->setFreeTier($freeTier); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/cloneDatabaseTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $databaseId = 'databaseId816491103'; + $pitrSnapshot = new PitrSnapshot(); + $pitrSnapshotDatabase = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $pitrSnapshot->setDatabase($pitrSnapshotDatabase); + $pitrSnapshotSnapshotTime = new Timestamp(); + $pitrSnapshot->setSnapshotTime($pitrSnapshotSnapshotTime); + $request = (new CloneDatabaseRequest()) + ->setParent($formattedParent) + ->setDatabaseId($databaseId) + ->setPitrSnapshot($pitrSnapshot); + $response = $gapicClient->cloneDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/CloneDatabase', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDatabaseId(); + $this->assertProtobufEquals($databaseId, $actualValue); + $actualValue = $actualApiRequestObject->getPitrSnapshot(); + $this->assertProtobufEquals($pitrSnapshot, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cloneDatabaseTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function cloneDatabaseExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/cloneDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $databaseId = 'databaseId816491103'; + $pitrSnapshot = new PitrSnapshot(); + $pitrSnapshotDatabase = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $pitrSnapshot->setDatabase($pitrSnapshotDatabase); + $pitrSnapshotSnapshotTime = new Timestamp(); + $pitrSnapshot->setSnapshotTime($pitrSnapshotSnapshotTime); + $request = (new CloneDatabaseRequest()) + ->setParent($formattedParent) + ->setDatabaseId($databaseId) + ->setPitrSnapshot($pitrSnapshot); + $response = $gapicClient->cloneDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/cloneDatabaseTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createBackupScheduleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new BackupSchedule(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $backupSchedule = new BackupSchedule(); + $request = (new CreateBackupScheduleRequest()) + ->setParent($formattedParent) + ->setBackupSchedule($backupSchedule); + $response = $gapicClient->createBackupSchedule($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/CreateBackupSchedule', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getBackupSchedule(); + $this->assertProtobufEquals($backupSchedule, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createBackupScheduleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $backupSchedule = new BackupSchedule(); + $request = (new CreateBackupScheduleRequest()) + ->setParent($formattedParent) + ->setBackupSchedule($backupSchedule); + try { + $gapicClient->createBackupSchedule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDatabaseTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $locationId = 'locationId552319461'; + $keyPrefix = 'keyPrefix438630514'; + $previousId = 'previousId-1005863069'; + $freeTier = false; + $etag = 'etag3123477'; + $expectedResponse = new Database(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setKeyPrefix($keyPrefix); + $expectedResponse->setPreviousId($previousId); + $expectedResponse->setFreeTier($freeTier); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDatabaseTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $database = new Database(); + $databaseId = 'databaseId816491103'; + $request = (new CreateDatabaseRequest()) + ->setParent($formattedParent) + ->setDatabase($database) + ->setDatabaseId($databaseId); + $response = $gapicClient->createDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/CreateDatabase', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDatabase(); + $this->assertProtobufEquals($database, $actualValue); + $actualValue = $actualApiRequestObject->getDatabaseId(); + $this->assertProtobufEquals($databaseId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDatabaseTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createDatabaseExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $database = new Database(); + $databaseId = 'databaseId816491103'; + $request = (new CreateDatabaseRequest()) + ->setParent($formattedParent) + ->setDatabase($database) + ->setDatabaseId($databaseId); + $response = $gapicClient->createDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDatabaseTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createIndexTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createIndexTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $multikey = true; + $shardCount = 495377042; + $unique = false; + $expectedResponse = new Index(); + $expectedResponse->setName($name); + $expectedResponse->setMultikey($multikey); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setUnique($unique); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createIndexTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + $index = new Index(); + $request = (new CreateIndexRequest()) + ->setParent($formattedParent) + ->setIndex($index); + $response = $gapicClient->createIndex($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/CreateIndex', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getIndex(); + $this->assertProtobufEquals($index, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIndexTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createIndexExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createIndexTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + $index = new Index(); + $request = (new CreateIndexRequest()) + ->setParent($formattedParent) + ->setIndex($index); + $response = $gapicClient->createIndex($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIndexTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createUserCredsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $securePassword = 'securePassword934119011'; + $expectedResponse = new UserCreds(); + $expectedResponse->setName($name); + $expectedResponse->setSecurePassword($securePassword); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $userCreds = new UserCreds(); + $userCredsId = 'userCredsId1873704105'; + $request = (new CreateUserCredsRequest()) + ->setParent($formattedParent) + ->setUserCreds($userCreds) + ->setUserCredsId($userCredsId); + $response = $gapicClient->createUserCreds($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/CreateUserCreds', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getUserCreds(); + $this->assertProtobufEquals($userCreds, $actualValue); + $actualValue = $actualRequestObject->getUserCredsId(); + $this->assertProtobufEquals($userCredsId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createUserCredsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $userCreds = new UserCreds(); + $userCredsId = 'userCredsId1873704105'; + $request = (new CreateUserCredsRequest()) + ->setParent($formattedParent) + ->setUserCreds($userCreds) + ->setUserCredsId($userCredsId); + try { + $gapicClient->createUserCreds($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteBackupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + $request = (new DeleteBackupRequest()) + ->setName($formattedName); + $gapicClient->deleteBackup($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteBackup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteBackupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + $request = (new DeleteBackupRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteBackup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteBackupScheduleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); + $request = (new DeleteBackupScheduleRequest()) + ->setName($formattedName); + $gapicClient->deleteBackupSchedule($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteBackupSchedule', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteBackupScheduleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); + $request = (new DeleteBackupScheduleRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteBackupSchedule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDatabaseTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $locationId = 'locationId552319461'; + $keyPrefix = 'keyPrefix438630514'; + $previousId = 'previousId-1005863069'; + $freeTier = false; + $etag2 = 'etag2-1293302904'; + $expectedResponse = new Database(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setKeyPrefix($keyPrefix); + $expectedResponse->setPreviousId($previousId); + $expectedResponse->setFreeTier($freeTier); + $expectedResponse->setEtag($etag2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDatabaseTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new DeleteDatabaseRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteDatabase', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDatabaseTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteDatabaseExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/deleteDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new DeleteDatabaseRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDatabaseTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function deleteIndexTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); + $request = (new DeleteIndexRequest()) + ->setName($formattedName); + $gapicClient->deleteIndex($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteIndex', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteIndexExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); + $request = (new DeleteIndexRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteIndex($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteUserCredsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new DeleteUserCredsRequest()) + ->setName($formattedName); + $gapicClient->deleteUserCreds($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteUserCreds', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteUserCredsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new DeleteUserCredsRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteUserCreds($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function disableUserCredsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $securePassword = 'securePassword934119011'; + $expectedResponse = new UserCreds(); + $expectedResponse->setName($name2); + $expectedResponse->setSecurePassword($securePassword); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new DisableUserCredsRequest()) + ->setName($formattedName); + $response = $gapicClient->disableUserCreds($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DisableUserCreds', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function disableUserCredsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new DisableUserCredsRequest()) + ->setName($formattedName); + try { + $gapicClient->disableUserCreds($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function enableUserCredsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $securePassword = 'securePassword934119011'; + $expectedResponse = new UserCreds(); + $expectedResponse->setName($name2); + $expectedResponse->setSecurePassword($securePassword); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new EnableUserCredsRequest()) + ->setName($formattedName); + $response = $gapicClient->enableUserCreds($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/EnableUserCreds', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function enableUserCredsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new EnableUserCredsRequest()) + ->setName($formattedName); + try { + $gapicClient->enableUserCreds($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function exportDocumentsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $outputUriPrefix2 = 'outputUriPrefix2-377757258'; + $expectedResponse = new ExportDocumentsResponse(); + $expectedResponse->setOutputUriPrefix($outputUriPrefix2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/exportDocumentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new ExportDocumentsRequest()) + ->setName($formattedName); + $response = $gapicClient->exportDocuments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ExportDocuments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDocumentsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function exportDocumentsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/exportDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new ExportDocumentsRequest()) + ->setName($formattedName); + $response = $gapicClient->exportDocuments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/exportDocumentsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function getBackupTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $database = 'database1789464955'; + $databaseUid = 'databaseUid-458567796'; + $expectedResponse = new Backup(); + $expectedResponse->setName($name2); + $expectedResponse->setDatabase($database); + $expectedResponse->setDatabaseUid($databaseUid); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + $request = (new GetBackupRequest()) + ->setName($formattedName); + $response = $gapicClient->getBackup($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetBackup', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + $request = (new GetBackupRequest()) + ->setName($formattedName); + try { + $gapicClient->getBackup($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupScheduleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new BackupSchedule(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); + $request = (new GetBackupScheduleRequest()) + ->setName($formattedName); + $response = $gapicClient->getBackupSchedule($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetBackupSchedule', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBackupScheduleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); + $request = (new GetBackupScheduleRequest()) + ->setName($formattedName); + try { + $gapicClient->getBackupSchedule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDatabaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $uid = 'uid115792'; + $locationId = 'locationId552319461'; + $keyPrefix = 'keyPrefix438630514'; + $previousId = 'previousId-1005863069'; + $freeTier = false; + $etag = 'etag3123477'; + $expectedResponse = new Database(); + $expectedResponse->setName($name2); + $expectedResponse->setUid($uid); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setKeyPrefix($keyPrefix); + $expectedResponse->setPreviousId($previousId); + $expectedResponse->setFreeTier($freeTier); + $expectedResponse->setEtag($etag); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new GetDatabaseRequest()) + ->setName($formattedName); + $response = $gapicClient->getDatabase($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetDatabase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDatabaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new GetDatabaseRequest()) + ->setName($formattedName); + try { + $gapicClient->getDatabase($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFieldTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Field(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->fieldName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[FIELD]'); + $request = (new GetFieldRequest()) + ->setName($formattedName); + $response = $gapicClient->getField($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetField', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getFieldExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->fieldName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[FIELD]'); + $request = (new GetFieldRequest()) + ->setName($formattedName); + try { + $gapicClient->getField($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIndexTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $multikey = true; + $shardCount = 495377042; + $unique = false; + $expectedResponse = new Index(); + $expectedResponse->setName($name2); + $expectedResponse->setMultikey($multikey); + $expectedResponse->setShardCount($shardCount); + $expectedResponse->setUnique($unique); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); + $request = (new GetIndexRequest()) + ->setName($formattedName); + $response = $gapicClient->getIndex($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetIndex', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIndexExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); + $request = (new GetIndexRequest()) + ->setName($formattedName); + try { + $gapicClient->getIndex($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUserCredsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $securePassword = 'securePassword934119011'; + $expectedResponse = new UserCreds(); + $expectedResponse->setName($name2); + $expectedResponse->setSecurePassword($securePassword); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new GetUserCredsRequest()) + ->setName($formattedName); + $response = $gapicClient->getUserCreds($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetUserCreds', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getUserCredsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new GetUserCredsRequest()) + ->setName($formattedName); + try { + $gapicClient->getUserCreds($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function importDocumentsTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importDocumentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new ImportDocumentsRequest()) + ->setName($formattedName); + $response = $gapicClient->importDocuments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ImportDocuments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function importDocumentsExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/importDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new ImportDocumentsRequest()) + ->setName($formattedName); + $response = $gapicClient->importDocuments($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function listBackupSchedulesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListBackupSchedulesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new ListBackupSchedulesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listBackupSchedules($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListBackupSchedules', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupSchedulesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new ListBackupSchedulesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listBackupSchedules($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListBackupsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListBackupsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listBackups($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListBackups', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBackupsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListBackupsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listBackups($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDatabasesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListDatabasesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListDatabasesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDatabases($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListDatabases', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDatabasesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListDatabasesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDatabases($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFieldsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $fieldsElement = new Field(); + $fields = [ + $fieldsElement, + ]; + $expectedResponse = new ListFieldsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFields($fields); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + $request = (new ListFieldsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listFields($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFields()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListFields', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listFieldsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + $request = (new ListFieldsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listFields($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIndexesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $indexesElement = new Index(); + $indexes = [ + $indexesElement, + ]; + $expectedResponse = new ListIndexesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setIndexes($indexes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + $request = (new ListIndexesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listIndexes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getIndexes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListIndexes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIndexesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); + $request = (new ListIndexesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listIndexes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUserCredsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListUserCredsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new ListUserCredsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listUserCreds($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListUserCreds', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listUserCredsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new ListUserCredsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listUserCreds($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetUserPasswordTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $securePassword = 'securePassword934119011'; + $expectedResponse = new UserCreds(); + $expectedResponse->setName($name2); + $expectedResponse->setSecurePassword($securePassword); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new ResetUserPasswordRequest()) + ->setName($formattedName); + $response = $gapicClient->resetUserPassword($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ResetUserPassword', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resetUserPasswordExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); + $request = (new ResetUserPasswordRequest()) + ->setName($formattedName); + try { + $gapicClient->resetUserPassword($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function restoreDatabaseTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/restoreDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $locationId = 'locationId552319461'; + $keyPrefix = 'keyPrefix438630514'; + $previousId = 'previousId-1005863069'; + $freeTier = false; + $etag = 'etag3123477'; + $expectedResponse = new Database(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setKeyPrefix($keyPrefix); + $expectedResponse->setPreviousId($previousId); + $expectedResponse->setFreeTier($freeTier); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/restoreDatabaseTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $databaseId = 'databaseId816491103'; + $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + $request = (new RestoreDatabaseRequest()) + ->setParent($formattedParent) + ->setDatabaseId($databaseId) + ->setBackup($formattedBackup); + $response = $gapicClient->restoreDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/RestoreDatabase', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDatabaseId(); + $this->assertProtobufEquals($databaseId, $actualValue); + $actualValue = $actualApiRequestObject->getBackup(); + $this->assertProtobufEquals($formattedBackup, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/restoreDatabaseTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function restoreDatabaseExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/restoreDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $databaseId = 'databaseId816491103'; + $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); + $request = (new RestoreDatabaseRequest()) + ->setParent($formattedParent) + ->setDatabaseId($databaseId) + ->setBackup($formattedBackup); + $response = $gapicClient->restoreDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/restoreDatabaseTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateBackupScheduleTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new BackupSchedule(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $backupSchedule = new BackupSchedule(); + $request = (new UpdateBackupScheduleRequest()) + ->setBackupSchedule($backupSchedule); + $response = $gapicClient->updateBackupSchedule($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/UpdateBackupSchedule', $actualFuncCall); + $actualValue = $actualRequestObject->getBackupSchedule(); + $this->assertProtobufEquals($backupSchedule, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateBackupScheduleExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $backupSchedule = new BackupSchedule(); + $request = (new UpdateBackupScheduleRequest()) + ->setBackupSchedule($backupSchedule); + try { + $gapicClient->updateBackupSchedule($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDatabaseTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $uid = 'uid115792'; + $locationId = 'locationId552319461'; + $keyPrefix = 'keyPrefix438630514'; + $previousId = 'previousId-1005863069'; + $freeTier = false; + $etag = 'etag3123477'; + $expectedResponse = new Database(); + $expectedResponse->setName($name); + $expectedResponse->setUid($uid); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setKeyPrefix($keyPrefix); + $expectedResponse->setPreviousId($previousId); + $expectedResponse->setFreeTier($freeTier); + $expectedResponse->setEtag($etag); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateDatabaseTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $database = new Database(); + $request = (new UpdateDatabaseRequest()) + ->setDatabase($database); + $response = $gapicClient->updateDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/UpdateDatabase', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getDatabase(); + $this->assertProtobufEquals($database, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDatabaseTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateDatabaseExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateDatabaseTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $database = new Database(); + $request = (new UpdateDatabaseRequest()) + ->setDatabase($database); + $response = $gapicClient->updateDatabase($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDatabaseTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateFieldTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFieldTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new Field(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateFieldTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $field = new Field(); + $fieldName = 'fieldName1265009317'; + $field->setName($fieldName); + $request = (new UpdateFieldRequest()) + ->setField($field); + $response = $gapicClient->updateField($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/UpdateField', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getField(); + $this->assertProtobufEquals($field, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFieldTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function updateFieldExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/updateFieldTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $field = new Field(); + $fieldName = 'fieldName1265009317'; + $field->setName($fieldName); + $request = (new UpdateFieldRequest()) + ->setField($field); + $response = $gapicClient->updateField($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateFieldTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function bulkDeleteDocumentsAsyncTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/bulkDeleteDocumentsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new BulkDeleteDocumentsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/bulkDeleteDocumentsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); + $request = (new BulkDeleteDocumentsRequest()) + ->setName($formattedName); + $response = $gapicClient->bulkDeleteDocumentsAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/BulkDeleteDocuments', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/bulkDeleteDocumentsTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php new file mode 100644 index 000000000000..b1b788bc4187 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xDD\x03\x0A,google/firestore/v1/aggregation_result.proto\x12\x13google.firestore.v1\"\xBE\x01\x0A\x11AggregationResult\x12U\x0A\x10aggregate_fields\x18\x02 \x03(\x0B2;.google.firestore.v1.AggregationResult.AggregateFieldsEntry\x1AR\x0A\x14AggregateFieldsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01B\xCE\x01\x0A\x17com.google.firestore.v1B\x16AggregationResultProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/BloomFilter.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/BloomFilter.php new file mode 100644 index 000000000000..a7f1ca1fe6ef --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/BloomFilter.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\x93\x03\x0A&google/firestore/v1/bloom_filter.proto\x12\x13google.firestore.v1\".\x0A\x0BBitSequence\x12\x0E\x0A\x06bitmap\x18\x01 \x01(\x0C\x12\x0F\x0A\x07padding\x18\x02 \x01(\x05\"Q\x0A\x0BBloomFilter\x12.\x0A\x04bits\x18\x01 \x01(\x0B2 .google.firestore.v1.BitSequence\x12\x12\x0A\x0Ahash_count\x18\x02 \x01(\x05B\xC8\x01\x0A\x17com.google.firestore.v1B\x10BloomFilterProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php new file mode 100644 index 000000000000..7e8aea52f92e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xBD\x05\x0A google/firestore/v1/common.proto\x12\x13google.firestore.v1\"#\x0A\x0CDocumentMask\x12\x13\x0A\x0Bfield_paths\x18\x01 \x03(\x09\"e\x0A\x0CPrecondition\x12\x10\x0A\x06exists\x18\x01 \x01(\x08H\x00\x121\x0A\x0Bupdate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x10\x0A\x0Econdition_type\"\xA9\x02\x0A\x12TransactionOptions\x12E\x0A\x09read_only\x18\x02 \x01(\x0B20.google.firestore.v1.TransactionOptions.ReadOnlyH\x00\x12G\x0A\x0Aread_write\x18\x03 \x01(\x0B21.google.firestore.v1.TransactionOptions.ReadWriteH\x00\x1A&\x0A\x09ReadWrite\x12\x19\x0A\x11retry_transaction\x18\x01 \x01(\x0C\x1AS\x0A\x08ReadOnly\x12/\x0A\x09read_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x16\x0A\x14consistency_selectorB\x06\x0A\x04modeB\xC3\x01\x0A\x17com.google.firestore.v1B\x0BCommonProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php new file mode 100644 index 000000000000..64e7b3cca1d6 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\x9E\x0F\x0A\"google/firestore/v1/document.proto\x12\x13google.firestore.v1\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x18google/type/latlng.proto\"\x80\x02\x0A\x08Document\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x129\x0A\x06fields\x18\x02 \x03(\x0B2).google.firestore.v1.Document.FieldsEntry\x12/\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x1AI\x0A\x0BFieldsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01\"\xE5\x04\x0A\x05Value\x120\x0A\x0Anull_value\x18\x0B \x01(\x0E2\x1A.google.protobuf.NullValueH\x00\x12\x17\x0A\x0Dboolean_value\x18\x01 \x01(\x08H\x00\x12\x17\x0A\x0Dinteger_value\x18\x02 \x01(\x03H\x00\x12\x16\x0A\x0Cdouble_value\x18\x03 \x01(\x01H\x00\x125\x0A\x0Ftimestamp_value\x18\x0A \x01(\x0B2\x1A.google.protobuf.TimestampH\x00\x12\x16\x0A\x0Cstring_value\x18\x11 \x01(\x09H\x00\x12\x15\x0A\x0Bbytes_value\x18\x12 \x01(\x0CH\x00\x12\x19\x0A\x0Freference_value\x18\x05 \x01(\x09H\x00\x12.\x0A\x0Fgeo_point_value\x18\x08 \x01(\x0B2\x13.google.type.LatLngH\x00\x126\x0A\x0Barray_value\x18\x09 \x01(\x0B2\x1F.google.firestore.v1.ArrayValueH\x00\x122\x0A\x09map_value\x18\x06 \x01(\x0B2\x1D.google.firestore.v1.MapValueH\x00\x12\x1F\x0A\x15field_reference_value\x18\x13 \x01(\x09H\x00\x12\"\x0A\x18variable_reference_value\x18\x16 \x01(\x09H\x00\x127\x0A\x0Efunction_value\x18\x14 \x01(\x0B2\x1D.google.firestore.v1.FunctionH\x00\x127\x0A\x0Epipeline_value\x18\x15 \x01(\x0B2\x1D.google.firestore.v1.PipelineH\x00B\x0C\x0A\x0Avalue_type\"8\x0A\x0AArrayValue\x12*\x0A\x06values\x18\x01 \x03(\x0B2\x1A.google.firestore.v1.Value\"\x90\x01\x0A\x08MapValue\x129\x0A\x06fields\x18\x01 \x03(\x0B2).google.firestore.v1.MapValue.FieldsEntry\x1AI\x0A\x0BFieldsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01\"\xDA\x01\x0A\x08Function\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12-\x0A\x04args\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.ValueB\x03\xE0A\x01\x12@\x0A\x07options\x18\x03 \x03(\x0B2*.google.firestore.v1.Function.OptionsEntryB\x03\xE0A\x01\x1AJ\x0A\x0COptionsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01\"\xA4\x02\x0A\x08Pipeline\x128\x0A\x06stages\x18\x01 \x03(\x0B2#.google.firestore.v1.Pipeline.StageB\x03\xE0A\x02\x1A\xDD\x01\x0A\x05Stage\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12-\x0A\x04args\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.ValueB\x03\xE0A\x01\x12F\x0A\x07options\x18\x03 \x03(\x0B20.google.firestore.v1.Pipeline.Stage.OptionsEntryB\x03\xE0A\x01\x1AJ\x0A\x0COptionsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01B\xC5\x01\x0A\x17com.google.firestore.v1B\x0DDocumentProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/ExplainStats.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/ExplainStats.php new file mode 100644 index 000000000000..bd54bc8f349b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/ExplainStats.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xBF\x02\x0A'google/firestore/v1/explain_stats.proto\x12\x13google.firestore.v1\"2\x0A\x0CExplainStats\x12\"\x0A\x04data\x18\x01 \x01(\x0B2\x14.google.protobuf.AnyB\xC2\x01\x0A\x17com.google.firestore.v1B\x11ExplainStatsProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php new file mode 100644 index 000000000000..d18d15619ddc --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php @@ -0,0 +1,40 @@ +internalAddGeneratedFile( + "\x0A\xCFT\x0A#google/firestore/v1/firestore.proto\x12\x13google.firestore.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x18google/api/routing.proto\x1A,google/firestore/v1/aggregation_result.proto\x1A google/firestore/v1/common.proto\x1A\"google/firestore/v1/document.proto\x1A'google/firestore/v1/explain_stats.proto\x1A\"google/firestore/v1/pipeline.proto\x1A\x1Fgoogle/firestore/v1/query.proto\x1A'google/firestore/v1/query_profile.proto\x1A\x1Fgoogle/firestore/v1/write.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Egoogle/protobuf/wrappers.proto\x1A\x17google/rpc/status.proto\"\xB8\x01\x0A\x12GetDocumentRequest\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12/\x0A\x04mask\x18\x02 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12\x15\x0A\x0Btransaction\x18\x03 \x01(\x0CH\x00\x12/\x0A\x09read_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x16\x0A\x14consistency_selector\"\xBB\x02\x0A\x14ListDocumentsRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1A\x0A\x0Dcollection_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x06 \x01(\x09B\x03\xE0A\x01\x124\x0A\x04mask\x18\x07 \x01(\x0B2!.google.firestore.v1.DocumentMaskB\x03\xE0A\x01\x12\x15\x0A\x0Btransaction\x18\x08 \x01(\x0CH\x00\x12/\x0A\x09read_time\x18\x0A \x01(\x0B2\x1A.google.protobuf.TimestampH\x00\x12\x14\x0A\x0Cshow_missing\x18\x0C \x01(\x08B\x16\x0A\x14consistency_selector\"b\x0A\x15ListDocumentsResponse\x120\x0A\x09documents\x18\x01 \x03(\x0B2\x1D.google.firestore.v1.Document\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xC4\x01\x0A\x15CreateDocumentRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1A\x0A\x0Dcollection_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x0Bdocument_id\x18\x03 \x01(\x09\x124\x0A\x08document\x18\x04 \x01(\x0B2\x1D.google.firestore.v1.DocumentB\x03\xE0A\x02\x12/\x0A\x04mask\x18\x05 \x01(\x0B2!.google.firestore.v1.DocumentMask\"\xF3\x01\x0A\x15UpdateDocumentRequest\x124\x0A\x08document\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.DocumentB\x03\xE0A\x02\x126\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12/\x0A\x04mask\x18\x03 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12;\x0A\x10current_document\x18\x04 \x01(\x0B2!.google.firestore.v1.Precondition\"g\x0A\x15DeleteDocumentRequest\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12;\x0A\x10current_document\x18\x02 \x01(\x0B2!.google.firestore.v1.Precondition\"\x99\x02\x0A\x18BatchGetDocumentsRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x11\x0A\x09documents\x18\x02 \x03(\x09\x12/\x0A\x04mask\x18\x03 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12\x15\x0A\x0Btransaction\x18\x04 \x01(\x0CH\x00\x12B\x0A\x0Fnew_transaction\x18\x05 \x01(\x0B2'.google.firestore.v1.TransactionOptionsH\x00\x12/\x0A\x09read_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x16\x0A\x14consistency_selector\"\xAC\x01\x0A\x19BatchGetDocumentsResponse\x12.\x0A\x05found\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.DocumentH\x00\x12\x11\x0A\x07missing\x18\x02 \x01(\x09H\x00\x12\x13\x0A\x0Btransaction\x18\x03 \x01(\x0C\x12-\x0A\x09read_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x08\x0A\x06result\"j\x0A\x17BeginTransactionRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x128\x0A\x07options\x18\x02 \x01(\x0B2'.google.firestore.v1.TransactionOptions\"/\x0A\x18BeginTransactionResponse\x12\x13\x0A\x0Btransaction\x18\x01 \x01(\x0C\"g\x0A\x0DCommitRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12*\x0A\x06writes\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.Write\x12\x13\x0A\x0Btransaction\x18\x03 \x01(\x0C\"z\x0A\x0ECommitResponse\x127\x0A\x0Dwrite_results\x18\x01 \x03(\x0B2 .google.firestore.v1.WriteResult\x12/\x0A\x0Bcommit_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\"B\x0A\x0FRollbackRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Btransaction\x18\x02 \x01(\x0CB\x03\xE0A\x02\"\xDD\x02\x0A\x0FRunQueryRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12@\x0A\x10structured_query\x18\x02 \x01(\x0B2\$.google.firestore.v1.StructuredQueryH\x00\x12\x15\x0A\x0Btransaction\x18\x05 \x01(\x0CH\x01\x12B\x0A\x0Fnew_transaction\x18\x06 \x01(\x0B2'.google.firestore.v1.TransactionOptionsH\x01\x12/\x0A\x09read_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampH\x01\x12A\x0A\x0Fexplain_options\x18\x0A \x01(\x0B2#.google.firestore.v1.ExplainOptionsB\x03\xE0A\x01B\x0C\x0A\x0Aquery_typeB\x16\x0A\x14consistency_selector\"\x87\x02\x0A\x10RunQueryResponse\x12\x13\x0A\x0Btransaction\x18\x02 \x01(\x0C\x12/\x0A\x08document\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.Document\x12-\x0A\x09read_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x17\x0A\x0Fskipped_results\x18\x04 \x01(\x05\x12\x0E\x0A\x04done\x18\x06 \x01(\x08H\x00\x12<\x0A\x0Fexplain_metrics\x18\x0B \x01(\x0B2#.google.firestore.v1.ExplainMetricsB\x17\x0A\x15continuation_selector\"\xAC\x02\x0A\x16ExecutePipelineRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12F\x0A\x13structured_pipeline\x18\x02 \x01(\x0B2'.google.firestore.v1.StructuredPipelineH\x00\x12\x15\x0A\x0Btransaction\x18\x05 \x01(\x0CH\x01\x12B\x0A\x0Fnew_transaction\x18\x06 \x01(\x0B2'.google.firestore.v1.TransactionOptionsH\x01\x12/\x0A\x09read_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampH\x01B\x0F\x0A\x0Dpipeline_typeB\x16\x0A\x14consistency_selector\"\xCC\x01\x0A\x17ExecutePipelineResponse\x12\x13\x0A\x0Btransaction\x18\x01 \x01(\x0C\x12.\x0A\x07results\x18\x02 \x03(\x0B2\x1D.google.firestore.v1.Document\x122\x0A\x0Eexecution_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x128\x0A\x0Dexplain_stats\x18\x04 \x01(\x0B2!.google.firestore.v1.ExplainStats\"\xFF\x02\x0A\x1ARunAggregationQueryRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12W\x0A\x1Cstructured_aggregation_query\x18\x02 \x01(\x0B2/.google.firestore.v1.StructuredAggregationQueryH\x00\x12\x15\x0A\x0Btransaction\x18\x04 \x01(\x0CH\x01\x12B\x0A\x0Fnew_transaction\x18\x05 \x01(\x0B2'.google.firestore.v1.TransactionOptionsH\x01\x12/\x0A\x09read_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampH\x01\x12A\x0A\x0Fexplain_options\x18\x08 \x01(\x0B2#.google.firestore.v1.ExplainOptionsB\x03\xE0A\x01B\x0C\x0A\x0Aquery_typeB\x16\x0A\x14consistency_selector\"\xD7\x01\x0A\x1BRunAggregationQueryResponse\x126\x0A\x06result\x18\x01 \x01(\x0B2&.google.firestore.v1.AggregationResult\x12\x13\x0A\x0Btransaction\x18\x02 \x01(\x0C\x12-\x0A\x09read_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12<\x0A\x0Fexplain_metrics\x18\x0A \x01(\x0B2#.google.firestore.v1.ExplainMetrics\"\x85\x02\x0A\x15PartitionQueryRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12@\x0A\x10structured_query\x18\x02 \x01(\x0B2\$.google.firestore.v1.StructuredQueryH\x00\x12\x17\x0A\x0Fpartition_count\x18\x03 \x01(\x03\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\x12\x11\x0A\x09page_size\x18\x05 \x01(\x05\x12/\x0A\x09read_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampH\x01B\x0C\x0A\x0Aquery_typeB\x16\x0A\x14consistency_selector\"b\x0A\x16PartitionQueryResponse\x12/\x0A\x0Apartitions\x18\x01 \x03(\x0B2\x1B.google.firestore.v1.Cursor\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xE8\x01\x0A\x0CWriteRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x11\x0A\x09stream_id\x18\x02 \x01(\x09\x12*\x0A\x06writes\x18\x03 \x03(\x0B2\x1A.google.firestore.v1.Write\x12\x14\x0A\x0Cstream_token\x18\x04 \x01(\x0C\x12=\x0A\x06labels\x18\x05 \x03(\x0B2-.google.firestore.v1.WriteRequest.LabelsEntry\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\xA2\x01\x0A\x0DWriteResponse\x12\x11\x0A\x09stream_id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cstream_token\x18\x02 \x01(\x0C\x127\x0A\x0Dwrite_results\x18\x03 \x03(\x0B2 .google.firestore.v1.WriteResult\x12/\x0A\x0Bcommit_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\xF2\x01\x0A\x0DListenRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x121\x0A\x0Aadd_target\x18\x02 \x01(\x0B2\x1B.google.firestore.v1.TargetH\x00\x12\x17\x0A\x0Dremove_target\x18\x03 \x01(\x05H\x00\x12>\x0A\x06labels\x18\x04 \x03(\x0B2..google.firestore.v1.ListenRequest.LabelsEntry\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01B\x0F\x0A\x0Dtarget_change\"\xD5\x02\x0A\x0EListenResponse\x12:\x0A\x0Dtarget_change\x18\x02 \x01(\x0B2!.google.firestore.v1.TargetChangeH\x00\x12>\x0A\x0Fdocument_change\x18\x03 \x01(\x0B2#.google.firestore.v1.DocumentChangeH\x00\x12>\x0A\x0Fdocument_delete\x18\x04 \x01(\x0B2#.google.firestore.v1.DocumentDeleteH\x00\x12>\x0A\x0Fdocument_remove\x18\x06 \x01(\x0B2#.google.firestore.v1.DocumentRemoveH\x00\x126\x0A\x06filter\x18\x05 \x01(\x0B2\$.google.firestore.v1.ExistenceFilterH\x00B\x0F\x0A\x0Dresponse_type\"\xD6\x03\x0A\x06Target\x128\x0A\x05query\x18\x02 \x01(\x0B2'.google.firestore.v1.Target.QueryTargetH\x00\x12@\x0A\x09documents\x18\x03 \x01(\x0B2+.google.firestore.v1.Target.DocumentsTargetH\x00\x12\x16\x0A\x0Cresume_token\x18\x04 \x01(\x0CH\x01\x12/\x0A\x09read_time\x18\x0B \x01(\x0B2\x1A.google.protobuf.TimestampH\x01\x12\x11\x0A\x09target_id\x18\x05 \x01(\x05\x12\x0C\x0A\x04once\x18\x06 \x01(\x08\x123\x0A\x0Eexpected_count\x18\x0C \x01(\x0B2\x1B.google.protobuf.Int32Value\x1A\$\x0A\x0FDocumentsTarget\x12\x11\x0A\x09documents\x18\x02 \x03(\x09\x1Am\x0A\x0BQueryTarget\x12\x0E\x0A\x06parent\x18\x01 \x01(\x09\x12@\x0A\x10structured_query\x18\x02 \x01(\x0B2\$.google.firestore.v1.StructuredQueryH\x00B\x0C\x0A\x0Aquery_typeB\x0D\x0A\x0Btarget_typeB\x0D\x0A\x0Bresume_type\"\xAA\x02\x0A\x0CTargetChange\x12N\x0A\x12target_change_type\x18\x01 \x01(\x0E22.google.firestore.v1.TargetChange.TargetChangeType\x12\x12\x0A\x0Atarget_ids\x18\x02 \x03(\x05\x12!\x0A\x05cause\x18\x03 \x01(\x0B2\x12.google.rpc.Status\x12\x14\x0A\x0Cresume_token\x18\x04 \x01(\x0C\x12-\x0A\x09read_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.Timestamp\"N\x0A\x10TargetChangeType\x12\x0D\x0A\x09NO_CHANGE\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\x12\x0B\x0A\x07CURRENT\x10\x03\x12\x09\x0A\x05RESET\x10\x04\"\x9F\x01\x0A\x18ListCollectionIdsRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12/\x0A\x09read_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x16\x0A\x14consistency_selector\"L\x0A\x19ListCollectionIdsResponse\x12\x16\x0A\x0Ecollection_ids\x18\x01 \x03(\x09\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xC9\x01\x0A\x11BatchWriteRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12*\x0A\x06writes\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.Write\x12B\x0A\x06labels\x18\x03 \x03(\x0B22.google.firestore.v1.BatchWriteRequest.LabelsEntry\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"q\x0A\x12BatchWriteResponse\x127\x0A\x0Dwrite_results\x18\x01 \x03(\x0B2 .google.firestore.v1.WriteResult\x12\"\x0A\x06status\x18\x02 \x03(\x0B2\x12.google.rpc.Status2\xFB\x1B\x0A\x09Firestore\x12\x8F\x01\x0A\x0BGetDocument\x12'.google.firestore.v1.GetDocumentRequest\x1A\x1D.google.firestore.v1.Document\"8\x82\xD3\xE4\x93\x022\x120/v1/{name=projects/*/databases/*/documents/*/**}\x12\xF5\x01\x0A\x0DListDocuments\x12).google.firestore.v1.ListDocumentsRequest\x1A*.google.firestore.v1.ListDocumentsResponse\"\x8C\x01\x82\xD3\xE4\x93\x02\x85\x01\x12B/v1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}Z?\x12=/v1/{parent=projects/*/databases/*/documents}/{collection_id}\x12\xBF\x01\x0A\x0EUpdateDocument\x12*.google.firestore.v1.UpdateDocumentRequest\x1A\x1D.google.firestore.v1.Document\"b\xDAA\x14document,update_mask\x82\xD3\xE4\x93\x02E29/v1/{document.name=projects/*/databases/*/documents/*/**}:\x08document\x12\x95\x01\x0A\x0EDeleteDocument\x12*.google.firestore.v1.DeleteDocumentRequest\x1A\x16.google.protobuf.Empty\"?\xDAA\x04name\x82\xD3\xE4\x93\x022*0/v1/{name=projects/*/databases/*/documents/*/**}\x12\xB9\x01\x0A\x11BatchGetDocuments\x12-.google.firestore.v1.BatchGetDocumentsRequest\x1A..google.firestore.v1.BatchGetDocumentsResponse\"C\x82\xD3\xE4\x93\x02=\"8/v1/{database=projects/*/databases/*}/documents:batchGet:\x01*0\x01\x12\xC7\x01\x0A\x10BeginTransaction\x12,.google.firestore.v1.BeginTransactionRequest\x1A-.google.firestore.v1.BeginTransactionResponse\"V\xDAA\x08database\x82\xD3\xE4\x93\x02E\"@/v1/{database=projects/*/databases/*}/documents:beginTransaction:\x01*\x12\xA6\x01\x0A\x06Commit\x12\".google.firestore.v1.CommitRequest\x1A#.google.firestore.v1.CommitResponse\"S\xDAA\x0Fdatabase,writes\x82\xD3\xE4\x93\x02;\"6/v1/{database=projects/*/databases/*}/documents:commit:\x01*\x12\xA4\x01\x0A\x08Rollback\x12\$.google.firestore.v1.RollbackRequest\x1A\x16.google.protobuf.Empty\"Z\xDAA\x14database,transaction\x82\xD3\xE4\x93\x02=\"8/v1/{database=projects/*/databases/*}/documents:rollback:\x01*\x12\xDF\x01\x0A\x08RunQuery\x12\$.google.firestore.v1.RunQueryRequest\x1A%.google.firestore.v1.RunQueryResponse\"\x83\x01\x82\xD3\xE4\x93\x02}\"6/v1/{parent=projects/*/databases/*/documents}:runQuery:\x01*Z@\";/v1/{parent=projects/*/databases/*/documents/*/**}:runQuery:\x01*0\x01\x12\x9E\x02\x0A\x0FExecutePipeline\x12+.google.firestore.v1.ExecutePipelineRequest\x1A,.google.firestore.v1.ExecutePipelineResponse\"\xAD\x01\x82\xD3\xE4\x93\x02D\"?/v1/{database=projects/*/databases/*}/documents:executePipeline:\x01*\x8A\xD3\xE4\x93\x02]\x12&\x0A\x08database\x12\x1Aprojects/{project_id=*}/**\x123\x0A\x08database\x12'projects/*/databases/{database_id=*}/**0\x01\x12\x97\x02\x0A\x13RunAggregationQuery\x12/.google.firestore.v1.RunAggregationQueryRequest\x1A0.google.firestore.v1.RunAggregationQueryResponse\"\x9A\x01\x82\xD3\xE4\x93\x02\x93\x01\"A/v1/{parent=projects/*/databases/*/documents}:runAggregationQuery:\x01*ZK\"F/v1/{parent=projects/*/databases/*/documents/*/**}:runAggregationQuery:\x01*0\x01\x12\xFC\x01\x0A\x0EPartitionQuery\x12*.google.firestore.v1.PartitionQueryRequest\x1A+.google.firestore.v1.PartitionQueryResponse\"\x90\x01\x82\xD3\xE4\x93\x02\x89\x01\"internalAddGeneratedFile( + "\x0A\x92\x04\x0A\"google/firestore/v1/pipeline.proto\x12\x13google.firestore.v1\x1A\"google/firestore/v1/document.proto\"\xE2\x01\x0A\x12StructuredPipeline\x124\x0A\x08pipeline\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.PipelineB\x03\xE0A\x02\x12J\x0A\x07options\x18\x02 \x03(\x0B24.google.firestore.v1.StructuredPipeline.OptionsEntryB\x03\xE0A\x01\x1AJ\x0A\x0COptionsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01B\xC5\x01\x0A\x17com.google.firestore.v1B\x0DPipelineProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php new file mode 100644 index 000000000000..7b9b9c57d1aa --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xC3\x1C\x0A\x1Fgoogle/firestore/v1/query.proto\x12\x13google.firestore.v1\x1A\"google/firestore/v1/document.proto\x1A\x1Egoogle/protobuf/wrappers.proto\"\xF8\x13\x0A\x0FStructuredQuery\x12?\x0A\x06select\x18\x01 \x01(\x0B2/.google.firestore.v1.StructuredQuery.Projection\x12E\x0A\x04from\x18\x02 \x03(\x0B27.google.firestore.v1.StructuredQuery.CollectionSelector\x12:\x0A\x05where\x18\x03 \x01(\x0B2+.google.firestore.v1.StructuredQuery.Filter\x12<\x0A\x08order_by\x18\x04 \x03(\x0B2*.google.firestore.v1.StructuredQuery.Order\x12-\x0A\x08start_at\x18\x07 \x01(\x0B2\x1B.google.firestore.v1.Cursor\x12+\x0A\x06end_at\x18\x08 \x01(\x0B2\x1B.google.firestore.v1.Cursor\x12\x0E\x0A\x06offset\x18\x06 \x01(\x05\x12*\x0A\x05limit\x18\x05 \x01(\x0B2\x1B.google.protobuf.Int32Value\x12K\x0A\x0Cfind_nearest\x18\x09 \x01(\x0B20.google.firestore.v1.StructuredQuery.FindNearestB\x03\xE0A\x01\x1AD\x0A\x12CollectionSelector\x12\x15\x0A\x0Dcollection_id\x18\x02 \x01(\x09\x12\x17\x0A\x0Fall_descendants\x18\x03 \x01(\x08\x1A\xFD\x01\x0A\x06Filter\x12P\x0A\x10composite_filter\x18\x01 \x01(\x0B24.google.firestore.v1.StructuredQuery.CompositeFilterH\x00\x12H\x0A\x0Cfield_filter\x18\x02 \x01(\x0B20.google.firestore.v1.StructuredQuery.FieldFilterH\x00\x12H\x0A\x0Cunary_filter\x18\x03 \x01(\x0B20.google.firestore.v1.StructuredQuery.UnaryFilterH\x00B\x0D\x0A\x0Bfilter_type\x1A\xD1\x01\x0A\x0FCompositeFilter\x12I\x0A\x02op\x18\x01 \x01(\x0E2=.google.firestore.v1.StructuredQuery.CompositeFilter.Operator\x12<\x0A\x07filters\x18\x02 \x03(\x0B2+.google.firestore.v1.StructuredQuery.Filter\"5\x0A\x08Operator\x12\x18\x0A\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x07\x0A\x03AND\x10\x01\x12\x06\x0A\x02OR\x10\x02\x1A\x98\x03\x0A\x0BFieldFilter\x12B\x0A\x05field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReference\x12E\x0A\x02op\x18\x02 \x01(\x0E29.google.firestore.v1.StructuredQuery.FieldFilter.Operator\x12)\x0A\x05value\x18\x03 \x01(\x0B2\x1A.google.firestore.v1.Value\"\xD2\x01\x0A\x08Operator\x12\x18\x0A\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09LESS_THAN\x10\x01\x12\x16\x0A\x12LESS_THAN_OR_EQUAL\x10\x02\x12\x10\x0A\x0CGREATER_THAN\x10\x03\x12\x19\x0A\x15GREATER_THAN_OR_EQUAL\x10\x04\x12\x09\x0A\x05EQUAL\x10\x05\x12\x0D\x0A\x09NOT_EQUAL\x10\x06\x12\x12\x0A\x0EARRAY_CONTAINS\x10\x07\x12\x06\x0A\x02IN\x10\x08\x12\x16\x0A\x12ARRAY_CONTAINS_ANY\x10\x09\x12\x0A\x0A\x06NOT_IN\x10\x0A\x1A\x8A\x02\x0A\x0BUnaryFilter\x12E\x0A\x02op\x18\x01 \x01(\x0E29.google.firestore.v1.StructuredQuery.UnaryFilter.Operator\x12D\x0A\x05field\x18\x02 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReferenceH\x00\"^\x0A\x08Operator\x12\x18\x0A\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06IS_NAN\x10\x02\x12\x0B\x0A\x07IS_NULL\x10\x03\x12\x0E\x0A\x0AIS_NOT_NAN\x10\x04\x12\x0F\x0A\x0BIS_NOT_NULL\x10\x05B\x0E\x0A\x0Coperand_type\x1A\x8E\x01\x0A\x05Order\x12B\x0A\x05field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReference\x12A\x0A\x09direction\x18\x02 \x01(\x0E2..google.firestore.v1.StructuredQuery.Direction\x1A\$\x0A\x0EFieldReference\x12\x12\x0A\x0Afield_path\x18\x02 \x01(\x09\x1AQ\x0A\x0AProjection\x12C\x0A\x06fields\x18\x02 \x03(\x0B23.google.firestore.v1.StructuredQuery.FieldReference\x1A\xEA\x03\x0A\x0BFindNearest\x12N\x0A\x0Cvector_field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReferenceB\x03\xE0A\x02\x125\x0A\x0Cquery_vector\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.ValueB\x03\xE0A\x02\x12_\x0A\x10distance_measure\x18\x03 \x01(\x0E2@.google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasureB\x03\xE0A\x02\x12/\x0A\x05limit\x18\x04 \x01(\x0B2\x1B.google.protobuf.Int32ValueB\x03\xE0A\x02\x12\"\x0A\x15distance_result_field\x18\x05 \x01(\x09B\x03\xE0A\x01\x12=\x0A\x12distance_threshold\x18\x06 \x01(\x0B2\x1C.google.protobuf.DoubleValueB\x03\xE0A\x01\"_\x0A\x0FDistanceMeasure\x12 \x0A\x1CDISTANCE_MEASURE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09EUCLIDEAN\x10\x01\x12\x0A\x0A\x06COSINE\x10\x02\x12\x0F\x0A\x0BDOT_PRODUCT\x10\x03\"E\x0A\x09Direction\x12\x19\x0A\x15DIRECTION_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09ASCENDING\x10\x01\x12\x0E\x0A\x0ADESCENDING\x10\x02\"\xB8\x05\x0A\x1AStructuredAggregationQuery\x12@\x0A\x10structured_query\x18\x01 \x01(\x0B2\$.google.firestore.v1.StructuredQueryH\x00\x12V\x0A\x0Caggregations\x18\x03 \x03(\x0B2;.google.firestore.v1.StructuredAggregationQuery.AggregationB\x03\xE0A\x01\x1A\xF1\x03\x0A\x0BAggregation\x12R\x0A\x05count\x18\x01 \x01(\x0B2A.google.firestore.v1.StructuredAggregationQuery.Aggregation.CountH\x00\x12N\x0A\x03sum\x18\x02 \x01(\x0B2?.google.firestore.v1.StructuredAggregationQuery.Aggregation.SumH\x00\x12N\x0A\x03avg\x18\x03 \x01(\x0B2?.google.firestore.v1.StructuredAggregationQuery.Aggregation.AvgH\x00\x12\x12\x0A\x05alias\x18\x07 \x01(\x09B\x03\xE0A\x01\x1A8\x0A\x05Count\x12/\x0A\x05up_to\x18\x01 \x01(\x0B2\x1B.google.protobuf.Int64ValueB\x03\xE0A\x01\x1AI\x0A\x03Sum\x12B\x0A\x05field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReference\x1AI\x0A\x03Avg\x12B\x0A\x05field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReferenceB\x0A\x0A\x08operatorB\x0C\x0A\x0Aquery_type\"D\x0A\x06Cursor\x12*\x0A\x06values\x18\x01 \x03(\x0B2\x1A.google.firestore.v1.Value\x12\x0E\x0A\x06before\x18\x02 \x01(\x08B\xC2\x01\x0A\x17com.google.firestore.v1B\x0AQueryProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/QueryProfile.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/QueryProfile.php new file mode 100644 index 000000000000..76b015b86594 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/QueryProfile.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xEA\x05\x0A'google/firestore/v1/query_profile.proto\x12\x13google.firestore.v1\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Cgoogle/protobuf/struct.proto\"&\x0A\x0EExplainOptions\x12\x14\x0A\x07analyze\x18\x01 \x01(\x08B\x03\xE0A\x01\"\x86\x01\x0A\x0EExplainMetrics\x126\x0A\x0Cplan_summary\x18\x01 \x01(\x0B2 .google.firestore.v1.PlanSummary\x12<\x0A\x0Fexecution_stats\x18\x02 \x01(\x0B2#.google.firestore.v1.ExecutionStats\"<\x0A\x0BPlanSummary\x12-\x0A\x0Cindexes_used\x18\x01 \x03(\x0B2\x17.google.protobuf.Struct\"\xA8\x01\x0A\x0EExecutionStats\x12\x18\x0A\x10results_returned\x18\x01 \x01(\x03\x125\x0A\x12execution_duration\x18\x03 \x01(\x0B2\x19.google.protobuf.Duration\x12\x17\x0A\x0Fread_operations\x18\x04 \x01(\x03\x12,\x0A\x0Bdebug_stats\x18\x05 \x01(\x0B2\x17.google.protobuf.StructB\xC9\x01\x0A\x17com.google.firestore.v1B\x11QueryProfileProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php new file mode 100644 index 000000000000..d8c00fd19204 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xE8\x0E\x0A\x1Fgoogle/firestore/v1/write.proto\x12\x13google.firestore.v1\x1A google/firestore/v1/common.proto\x1A\"google/firestore/v1/document.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xDB\x02\x0A\x05Write\x12/\x0A\x06update\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.DocumentH\x00\x12\x10\x0A\x06delete\x18\x02 \x01(\x09H\x00\x12;\x0A\x09transform\x18\x06 \x01(\x0B2&.google.firestore.v1.DocumentTransformH\x00\x126\x0A\x0Bupdate_mask\x18\x03 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12P\x0A\x11update_transforms\x18\x07 \x03(\x0B25.google.firestore.v1.DocumentTransform.FieldTransform\x12;\x0A\x10current_document\x18\x04 \x01(\x0B2!.google.firestore.v1.PreconditionB\x0B\x0A\x09operation\"\xE5\x04\x0A\x11DocumentTransform\x12\x10\x0A\x08document\x18\x01 \x01(\x09\x12O\x0A\x10field_transforms\x18\x02 \x03(\x0B25.google.firestore.v1.DocumentTransform.FieldTransform\x1A\xEC\x03\x0A\x0EFieldTransform\x12\x12\x0A\x0Afield_path\x18\x01 \x01(\x09\x12`\x0A\x13set_to_server_value\x18\x02 \x01(\x0E2A.google.firestore.v1.DocumentTransform.FieldTransform.ServerValueH\x00\x12/\x0A\x09increment\x18\x03 \x01(\x0B2\x1A.google.firestore.v1.ValueH\x00\x12-\x0A\x07maximum\x18\x04 \x01(\x0B2\x1A.google.firestore.v1.ValueH\x00\x12-\x0A\x07minimum\x18\x05 \x01(\x0B2\x1A.google.firestore.v1.ValueH\x00\x12B\x0A\x17append_missing_elements\x18\x06 \x01(\x0B2\x1F.google.firestore.v1.ArrayValueH\x00\x12@\x0A\x15remove_all_from_array\x18\x07 \x01(\x0B2\x1F.google.firestore.v1.ArrayValueH\x00\"=\x0A\x0BServerValue\x12\x1C\x0A\x18SERVER_VALUE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CREQUEST_TIME\x10\x01B\x10\x0A\x0Etransform_type\"u\x0A\x0BWriteResult\x12/\x0A\x0Bupdate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x125\x0A\x11transform_results\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.Value\"q\x0A\x0EDocumentChange\x12/\x0A\x08document\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.Document\x12\x12\x0A\x0Atarget_ids\x18\x05 \x03(\x05\x12\x1A\x0A\x12removed_target_ids\x18\x06 \x03(\x05\"m\x0A\x0EDocumentDelete\x12\x10\x0A\x08document\x18\x01 \x01(\x09\x12\x1A\x0A\x12removed_target_ids\x18\x06 \x03(\x05\x12-\x0A\x09read_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"m\x0A\x0EDocumentRemove\x12\x10\x0A\x08document\x18\x01 \x01(\x09\x12\x1A\x0A\x12removed_target_ids\x18\x02 \x03(\x05\x12-\x0A\x09read_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"n\x0A\x0FExistenceFilter\x12\x11\x0A\x09target_id\x18\x01 \x01(\x05\x12\x0D\x0A\x05count\x18\x02 \x01(\x05\x129\x0A\x0Funchanged_names\x18\x03 \x01(\x0B2 .google.firestore.v1.BloomFilterB\xC2\x01\x0A\x17com.google.firestore.v1B\x0AWriteProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php new file mode 100644 index 000000000000..f7296b1c7d2e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php @@ -0,0 +1,86 @@ +google.firestore.v1.AggregationResult + */ +class AggregationResult extends \Google\Protobuf\Internal\Message +{ + /** + * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. + * The key is the + * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] + * assigned to the aggregation function on input and the size of this map + * equals the number of aggregation functions in the query. + * + * Generated from protobuf field map aggregate_fields = 2; + */ + private $aggregate_fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $aggregate_fields + * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. + * The key is the + * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] + * assigned to the aggregation function on input and the size of this map + * equals the number of aggregation functions in the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\AggregationResult::initOnce(); + parent::__construct($data); + } + + /** + * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. + * The key is the + * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] + * assigned to the aggregation function on input and the size of this map + * equals the number of aggregation functions in the query. + * + * Generated from protobuf field map aggregate_fields = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAggregateFields() + { + return $this->aggregate_fields; + } + + /** + * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. + * The key is the + * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] + * assigned to the aggregation function on input and the size of this map + * equals the number of aggregation functions in the query. + * + * Generated from protobuf field map aggregate_fields = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAggregateFields($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->aggregate_fields = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php new file mode 100644 index 000000000000..8d770c6e90db --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php @@ -0,0 +1,67 @@ +google.firestore.v1.ArrayValue + */ +class ArrayValue extends \Google\Protobuf\Internal\Message +{ + /** + * Values in the array. + * + * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Value[] $values + * Values in the array. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Values in the array. + * + * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> + */ + public function getValues() + { + return $this->values; + } + + /** + * Values in the array. + * + * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; + * @param \Google\Cloud\Firestore\V1\Value[] $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->values = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php new file mode 100644 index 000000000000..0b845bb3b850 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php @@ -0,0 +1,296 @@ +google.firestore.v1.BatchGetDocumentsRequest + */ +class BatchGetDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + * + * Generated from protobuf field repeated string documents = 2; + */ + private $documents; + /** + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; + */ + protected $mask = null; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @type string[] $documents + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + * @type \Google\Cloud\Firestore\V1\DocumentMask $mask + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + * @type string $transaction + * Reads documents in a transaction. + * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * @type \Google\Protobuf\Timestamp $read_time + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + * + * Generated from protobuf field repeated string documents = 2; + * @return RepeatedField + */ + public function getDocuments() + { + return $this->documents; + } + + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of the + * given `database`. Duplicate names will be elided. + * + * Generated from protobuf field repeated string documents = 2; + * @param string[] $var + * @return $this + */ + public function setDocuments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->documents = $arr; + + return $this; + } + + /** + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getMask() + { + return $this->mask; + } + + public function hasMask() + { + return isset($this->mask); + } + + public function clearMask() + { + unset($this->mask); + } + + /** + * The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field will + * not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->mask = $var; + + return $this; + } + + /** + * Reads documents in a transaction. + * + * Generated from protobuf field bytes transaction = 4; + * @return string + */ + public function getTransaction() + { + return $this->readOneof(4); + } + + public function hasTransaction() + { + return $this->hasOneof(4); + } + + /** + * Reads documents in a transaction. + * + * Generated from protobuf field bytes transaction = 4; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; + * @return \Google\Cloud\Firestore\V1\TransactionOptions|null + */ + public function getNewTransaction() + { + return $this->readOneof(5); + } + + public function hasNewTransaction() + { + return $this->hasOneof(5); + } + + /** + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; + * @param \Google\Cloud\Firestore\V1\TransactionOptions $var + * @return $this + */ + public function setNewTransaction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(7); + } + + public function hasReadTime() + { + return $this->hasOneof(7); + } + + /** + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php new file mode 100644 index 000000000000..15ebf121f41b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php @@ -0,0 +1,214 @@ +google.firestore.v1.BatchGetDocumentsResponse + */ +class BatchGetDocumentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The transaction that was started as part of this request. + * Will only be set in the first response, and only if + * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] + * was set in the request. + * + * Generated from protobuf field bytes transaction = 3; + */ + protected $transaction = ''; + /** + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + */ + protected $read_time = null; + protected $result; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Document $found + * A document that was requested. + * @type string $missing + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @type string $transaction + * The transaction that was started as part of this request. + * Will only be set in the first response, and only if + * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] + * was set in the request. + * @type \Google\Protobuf\Timestamp $read_time + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * A document that was requested. + * + * Generated from protobuf field .google.firestore.v1.Document found = 1; + * @return \Google\Cloud\Firestore\V1\Document|null + */ + public function getFound() + { + return $this->readOneof(1); + } + + public function hasFound() + { + return $this->hasOneof(1); + } + + /** + * A document that was requested. + * + * Generated from protobuf field .google.firestore.v1.Document found = 1; + * @param \Google\Cloud\Firestore\V1\Document $var + * @return $this + */ + public function setFound($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string missing = 2; + * @return string + */ + public function getMissing() + { + return $this->readOneof(2); + } + + public function hasMissing() + { + return $this->hasOneof(2); + } + + /** + * A document name that was requested but does not exist. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string missing = 2; + * @param string $var + * @return $this + */ + public function setMissing($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The transaction that was started as part of this request. + * Will only be set in the first response, and only if + * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] + * was set in the request. + * + * Generated from protobuf field bytes transaction = 3; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * The transaction that was started as part of this request. + * Will only be set in the first response, and only if + * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] + * was set in the request. + * + * Generated from protobuf field bytes transaction = 3; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + + /** + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * The time at which the document was read. + * This may be monotically increasing, in this case the previous documents in + * the result stream are guaranteed not to have changed between their + * read_time and this one. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getResult() + { + return $this->whichOneof("result"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php new file mode 100644 index 000000000000..1e475fa0e39f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php @@ -0,0 +1,152 @@ +google.firestore.v1.BatchWriteRequest + */ +class BatchWriteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * The writes to apply. + * Method does not apply writes atomically and does not guarantee ordering. + * Each write succeeds or fails independently. You cannot write to the same + * document more than once per request. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; + */ + private $writes; + /** + * Labels associated with this batch write. + * + * Generated from protobuf field map labels = 3; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @type \Google\Cloud\Firestore\V1\Write[] $writes + * The writes to apply. + * Method does not apply writes atomically and does not guarantee ordering. + * Each write succeeds or fails independently. You cannot write to the same + * document more than once per request. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels associated with this batch write. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The writes to apply. + * Method does not apply writes atomically and does not guarantee ordering. + * Each write succeeds or fails independently. You cannot write to the same + * document more than once per request. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Write> + */ + public function getWrites() + { + return $this->writes; + } + + /** + * The writes to apply. + * Method does not apply writes atomically and does not guarantee ordering. + * Each write succeeds or fails independently. You cannot write to the same + * document more than once per request. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; + * @param \Google\Cloud\Firestore\V1\Write[] $var + * @return $this + */ + public function setWrites($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); + $this->writes = $arr; + + return $this; + } + + /** + * Labels associated with this batch write. + * + * Generated from protobuf field map labels = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels associated with this batch write. + * + * Generated from protobuf field map labels = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php new file mode 100644 index 000000000000..b2da372d7a45 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php @@ -0,0 +1,118 @@ +google.firestore.v1.BatchWriteResponse + */ +class BatchWriteResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; + */ + private $write_results; + /** + * The status of applying the writes. + * This i-th write status corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.rpc.Status status = 2; + */ + private $status; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\WriteResult[] $write_results + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * @type \Google\Rpc\Status[] $status + * The status of applying the writes. + * This i-th write status corresponds to the i-th write in the + * request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; + * @return RepeatedField<\Google\Cloud\Firestore\V1\WriteResult> + */ + public function getWriteResults() + { + return $this->write_results; + } + + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; + * @param \Google\Cloud\Firestore\V1\WriteResult[] $var + * @return $this + */ + public function setWriteResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); + $this->write_results = $arr; + + return $this; + } + + /** + * The status of applying the writes. + * This i-th write status corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.rpc.Status status = 2; + * @return RepeatedField<\Google\Rpc\Status> + */ + public function getStatus() + { + return $this->status; + } + + /** + * The status of applying the writes. + * This i-th write status corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.rpc.Status status = 2; + * @param \Google\Rpc\Status[] $var + * @return $this + */ + public function setStatus($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->status = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php new file mode 100644 index 000000000000..ff5dc33718d1 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php @@ -0,0 +1,134 @@ +google.firestore.v1.BeginTransactionRequest + */ +class BeginTransactionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * The options for the transaction. + * Defaults to a read-write transaction. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; + */ + protected $options = null; + + /** + * @param string $database Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * @return \Google\Cloud\Firestore\V1\BeginTransactionRequest + * + * @experimental + */ + public static function build(string $database): self + { + return (new self()) + ->setDatabase($database); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @type \Google\Cloud\Firestore\V1\TransactionOptions $options + * The options for the transaction. + * Defaults to a read-write transaction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The options for the transaction. + * Defaults to a read-write transaction. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; + * @return \Google\Cloud\Firestore\V1\TransactionOptions|null + */ + public function getOptions() + { + return $this->options; + } + + public function hasOptions() + { + return isset($this->options); + } + + public function clearOptions() + { + unset($this->options); + } + + /** + * The options for the transaction. + * Defaults to a read-write transaction. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; + * @param \Google\Cloud\Firestore\V1\TransactionOptions $var + * @return $this + */ + public function setOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); + $this->options = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php new file mode 100644 index 000000000000..f790bd672f01 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php @@ -0,0 +1,68 @@ +google.firestore.v1.BeginTransactionResponse + */ +class BeginTransactionResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The transaction that was started. + * + * Generated from protobuf field bytes transaction = 1; + */ + protected $transaction = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $transaction + * The transaction that was started. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The transaction that was started. + * + * Generated from protobuf field bytes transaction = 1; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * The transaction that was started. + * + * Generated from protobuf field bytes transaction = 1; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BitSequence.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BitSequence.php new file mode 100644 index 000000000000..296bfb4a577f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BitSequence.php @@ -0,0 +1,124 @@ +google.firestore.v1.BitSequence + */ +class BitSequence extends \Google\Protobuf\Internal\Message +{ + /** + * The bytes that encode the bit sequence. + * May have a length of zero. + * + * Generated from protobuf field bytes bitmap = 1; + */ + protected $bitmap = ''; + /** + * The number of bits of the last byte in `bitmap` to ignore as "padding". + * If the length of `bitmap` is zero, then this value must be `0`. + * Otherwise, this value must be between 0 and 7, inclusive. + * + * Generated from protobuf field int32 padding = 2; + */ + protected $padding = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $bitmap + * The bytes that encode the bit sequence. + * May have a length of zero. + * @type int $padding + * The number of bits of the last byte in `bitmap` to ignore as "padding". + * If the length of `bitmap` is zero, then this value must be `0`. + * Otherwise, this value must be between 0 and 7, inclusive. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\BloomFilter::initOnce(); + parent::__construct($data); + } + + /** + * The bytes that encode the bit sequence. + * May have a length of zero. + * + * Generated from protobuf field bytes bitmap = 1; + * @return string + */ + public function getBitmap() + { + return $this->bitmap; + } + + /** + * The bytes that encode the bit sequence. + * May have a length of zero. + * + * Generated from protobuf field bytes bitmap = 1; + * @param string $var + * @return $this + */ + public function setBitmap($var) + { + GPBUtil::checkString($var, False); + $this->bitmap = $var; + + return $this; + } + + /** + * The number of bits of the last byte in `bitmap` to ignore as "padding". + * If the length of `bitmap` is zero, then this value must be `0`. + * Otherwise, this value must be between 0 and 7, inclusive. + * + * Generated from protobuf field int32 padding = 2; + * @return int + */ + public function getPadding() + { + return $this->padding; + } + + /** + * The number of bits of the last byte in `bitmap` to ignore as "padding". + * If the length of `bitmap` is zero, then this value must be `0`. + * Otherwise, this value must be between 0 and 7, inclusive. + * + * Generated from protobuf field int32 padding = 2; + * @param int $var + * @return $this + */ + public function setPadding($var) + { + GPBUtil::checkInt32($var); + $this->padding = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BloomFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BloomFilter.php new file mode 100644 index 000000000000..2760f1c7e40a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BloomFilter.php @@ -0,0 +1,119 @@ +google.firestore.v1.BloomFilter + */ +class BloomFilter extends \Google\Protobuf\Internal\Message +{ + /** + * The bloom filter data. + * + * Generated from protobuf field .google.firestore.v1.BitSequence bits = 1; + */ + protected $bits = null; + /** + * The number of hashes used by the algorithm. + * + * Generated from protobuf field int32 hash_count = 2; + */ + protected $hash_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\BitSequence $bits + * The bloom filter data. + * @type int $hash_count + * The number of hashes used by the algorithm. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\BloomFilter::initOnce(); + parent::__construct($data); + } + + /** + * The bloom filter data. + * + * Generated from protobuf field .google.firestore.v1.BitSequence bits = 1; + * @return \Google\Cloud\Firestore\V1\BitSequence|null + */ + public function getBits() + { + return $this->bits; + } + + public function hasBits() + { + return isset($this->bits); + } + + public function clearBits() + { + unset($this->bits); + } + + /** + * The bloom filter data. + * + * Generated from protobuf field .google.firestore.v1.BitSequence bits = 1; + * @param \Google\Cloud\Firestore\V1\BitSequence $var + * @return $this + */ + public function setBits($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\BitSequence::class); + $this->bits = $var; + + return $this; + } + + /** + * The number of hashes used by the algorithm. + * + * Generated from protobuf field int32 hash_count = 2; + * @return int + */ + public function getHashCount() + { + return $this->hash_count; + } + + /** + * The number of hashes used by the algorithm. + * + * Generated from protobuf field int32 hash_count = 2; + * @param int $var + * @return $this + */ + public function setHashCount($var) + { + GPBUtil::checkInt32($var); + $this->hash_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php new file mode 100644 index 000000000000..28a7f5186283 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php @@ -0,0 +1,161 @@ +google.firestore.v1.CommitRequest + */ +class CommitRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * The writes to apply. + * Always executed atomically and in order. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; + */ + private $writes; + /** + * If set, applies all writes in this transaction, and commits it. + * + * Generated from protobuf field bytes transaction = 3; + */ + protected $transaction = ''; + + /** + * @param string $database Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @param \Google\Cloud\Firestore\V1\Write[] $writes The writes to apply. + * + * Always executed atomically and in order. + * + * @return \Google\Cloud\Firestore\V1\CommitRequest + * + * @experimental + */ + public static function build(string $database, array $writes): self + { + return (new self()) + ->setDatabase($database) + ->setWrites($writes); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @type \Google\Cloud\Firestore\V1\Write[] $writes + * The writes to apply. + * Always executed atomically and in order. + * @type string $transaction + * If set, applies all writes in this transaction, and commits it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The writes to apply. + * Always executed atomically and in order. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Write> + */ + public function getWrites() + { + return $this->writes; + } + + /** + * The writes to apply. + * Always executed atomically and in order. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; + * @param \Google\Cloud\Firestore\V1\Write[] $var + * @return $this + */ + public function setWrites($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); + $this->writes = $arr; + + return $this; + } + + /** + * If set, applies all writes in this transaction, and commits it. + * + * Generated from protobuf field bytes transaction = 3; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * If set, applies all writes in this transaction, and commits it. + * + * Generated from protobuf field bytes transaction = 3; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php new file mode 100644 index 000000000000..9132548afe22 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php @@ -0,0 +1,123 @@ +google.firestore.v1.CommitResponse + */ +class CommitResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; + */ + private $write_results; + /** + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the commit. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; + */ + protected $commit_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\WriteResult[] $write_results + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * @type \Google\Protobuf\Timestamp $commit_time + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the commit. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; + * @return RepeatedField<\Google\Cloud\Firestore\V1\WriteResult> + */ + public function getWriteResults() + { + return $this->write_results; + } + + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; + * @param \Google\Cloud\Firestore\V1\WriteResult[] $var + * @return $this + */ + public function setWriteResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); + $this->write_results = $arr; + + return $this; + } + + /** + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the commit. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCommitTime() + { + return $this->commit_time; + } + + public function hasCommitTime() + { + return isset($this->commit_time); + } + + public function clearCommitTime() + { + unset($this->commit_time); + } + + /** + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the commit. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCommitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->commit_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php new file mode 100644 index 000000000000..7f77953b9837 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php @@ -0,0 +1,248 @@ +google.firestore.v1.CreateDocumentRequest + */ +class CreateDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource. For example: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. The collection ID, relative to `parent`, to list. For example: + * `chatrooms`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $collection_id = ''; + /** + * The client-assigned document ID to use for this document. + * Optional. If not specified, an ID will be assigned by the service. + * + * Generated from protobuf field string document_id = 3; + */ + protected $document_id = ''; + /** + * Required. The document to create. `name` must not be set. + * + * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; + */ + protected $mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource. For example: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + * @type string $collection_id + * Required. The collection ID, relative to `parent`, to list. For example: + * `chatrooms`. + * @type string $document_id + * The client-assigned document ID to use for this document. + * Optional. If not specified, an ID will be assigned by the service. + * @type \Google\Cloud\Firestore\V1\Document $document + * Required. The document to create. `name` must not be set. + * @type \Google\Cloud\Firestore\V1\DocumentMask $mask + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource. For example: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource. For example: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The collection ID, relative to `parent`, to list. For example: + * `chatrooms`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getCollectionId() + { + return $this->collection_id; + } + + /** + * Required. The collection ID, relative to `parent`, to list. For example: + * `chatrooms`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setCollectionId($var) + { + GPBUtil::checkString($var, True); + $this->collection_id = $var; + + return $this; + } + + /** + * The client-assigned document ID to use for this document. + * Optional. If not specified, an ID will be assigned by the service. + * + * Generated from protobuf field string document_id = 3; + * @return string + */ + public function getDocumentId() + { + return $this->document_id; + } + + /** + * The client-assigned document ID to use for this document. + * Optional. If not specified, an ID will be assigned by the service. + * + * Generated from protobuf field string document_id = 3; + * @param string $var + * @return $this + */ + public function setDocumentId($var) + { + GPBUtil::checkString($var, True); + $this->document_id = $var; + + return $this; + } + + /** + * Required. The document to create. `name` must not be set. + * + * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. The document to create. `name` must not be set. + * + * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getMask() + { + return $this->mask; + } + + public function hasMask() + { + return isset($this->mask); + } + + public function clearMask() + { + unset($this->mask); + } + + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php new file mode 100644 index 000000000000..fdf744e2c0e3 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php @@ -0,0 +1,113 @@ +google.firestore.v1.Cursor + */ +class Cursor extends \Google\Protobuf\Internal\Message +{ + /** + * The values that represent a position, in the order they appear in + * the order by clause of a query. + * Can contain fewer values than specified in the order by clause. + * + * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; + */ + private $values; + /** + * If the position is just before or just after the given values, relative + * to the sort order defined by the query. + * + * Generated from protobuf field bool before = 2; + */ + protected $before = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Value[] $values + * The values that represent a position, in the order they appear in + * the order by clause of a query. + * Can contain fewer values than specified in the order by clause. + * @type bool $before + * If the position is just before or just after the given values, relative + * to the sort order defined by the query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The values that represent a position, in the order they appear in + * the order by clause of a query. + * Can contain fewer values than specified in the order by clause. + * + * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> + */ + public function getValues() + { + return $this->values; + } + + /** + * The values that represent a position, in the order they appear in + * the order by clause of a query. + * Can contain fewer values than specified in the order by clause. + * + * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; + * @param \Google\Cloud\Firestore\V1\Value[] $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->values = $arr; + + return $this; + } + + /** + * If the position is just before or just after the given values, relative + * to the sort order defined by the query. + * + * Generated from protobuf field bool before = 2; + * @return bool + */ + public function getBefore() + { + return $this->before; + } + + /** + * If the position is just before or just after the given values, relative + * to the sort order defined by the query. + * + * Generated from protobuf field bool before = 2; + * @param bool $var + * @return $this + */ + public function setBefore($var) + { + GPBUtil::checkBool($var); + $this->before = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php new file mode 100644 index 000000000000..a77ac38f9721 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php @@ -0,0 +1,134 @@ +google.firestore.v1.DeleteDocumentRequest + */ +class DeleteDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; + */ + protected $current_document = null; + + /** + * @param string $name Required. The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * @return \Google\Cloud\Firestore\V1\DeleteDocumentRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @type \Google\Cloud\Firestore\V1\Precondition $current_document + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Document to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; + * @return \Google\Cloud\Firestore\V1\Precondition|null + */ + public function getCurrentDocument() + { + return $this->current_document; + } + + public function hasCurrentDocument() + { + return isset($this->current_document); + } + + public function clearCurrentDocument() + { + unset($this->current_document); + } + + /** + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; + * @param \Google\Cloud\Firestore\V1\Precondition $var + * @return $this + */ + public function setCurrentDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); + $this->current_document = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php new file mode 100644 index 000000000000..f858f1fe4e34 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php @@ -0,0 +1,290 @@ +google.firestore.v1.Document + */ +class Document extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The document's fields. + * The map keys represent field names. + * Field names matching the regular expression `__.*__` are reserved. Reserved + * field names are forbidden except in certain documented contexts. The field + * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be + * empty. + * Field paths may be used in other contexts to refer to structured fields + * defined here. For `map_value`, the field path is represented by a + * dot-delimited (`.`) string of segments. Each segment is either a simple + * field name (defined below) or a quoted field name. For example, the + * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" + * }}}` would be represented by the field path `` foo.`x&y` ``. + * A simple field name contains only characters `a` to `z`, `A` to `Z`, + * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, + * `foo_bar_17`. + * A quoted field name starts and ends with `` ` `` and + * may contain any character. Some characters, including `` ` ``, must be + * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and + * `` `bak\`tik` `` represents `` bak`tik ``. + * + * Generated from protobuf field map fields = 2; + */ + private $fields; + /** + * Output only. The time at which the document was created. + * This value increases monotonically when a document is deleted then + * recreated. It can also be compared to values from other documents and + * the `read_time` of a query. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + */ + protected $create_time = null; + /** + * Output only. The time at which the document was last changed. + * This value is initially set to the `create_time` then increases + * monotonically with each change to the document. It can also be + * compared to values from other documents and the `read_time` of a query. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @type array|\Google\Protobuf\Internal\MapField $fields + * The document's fields. + * The map keys represent field names. + * Field names matching the regular expression `__.*__` are reserved. Reserved + * field names are forbidden except in certain documented contexts. The field + * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be + * empty. + * Field paths may be used in other contexts to refer to structured fields + * defined here. For `map_value`, the field path is represented by a + * dot-delimited (`.`) string of segments. Each segment is either a simple + * field name (defined below) or a quoted field name. For example, the + * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" + * }}}` would be represented by the field path `` foo.`x&y` ``. + * A simple field name contains only characters `a` to `z`, `A` to `Z`, + * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, + * `foo_bar_17`. + * A quoted field name starts and ends with `` ` `` and + * may contain any character. Some characters, including `` ` ``, must be + * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and + * `` `bak\`tik` `` represents `` bak`tik ``. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the document was created. + * This value increases monotonically when a document is deleted then + * recreated. It can also be compared to values from other documents and + * the `read_time` of a query. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which the document was last changed. + * This value is initially set to the `create_time` then increases + * monotonically with each change to the document. It can also be + * compared to values from other documents and the `read_time` of a query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the document, for example + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The document's fields. + * The map keys represent field names. + * Field names matching the regular expression `__.*__` are reserved. Reserved + * field names are forbidden except in certain documented contexts. The field + * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be + * empty. + * Field paths may be used in other contexts to refer to structured fields + * defined here. For `map_value`, the field path is represented by a + * dot-delimited (`.`) string of segments. Each segment is either a simple + * field name (defined below) or a quoted field name. For example, the + * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" + * }}}` would be represented by the field path `` foo.`x&y` ``. + * A simple field name contains only characters `a` to `z`, `A` to `Z`, + * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, + * `foo_bar_17`. + * A quoted field name starts and ends with `` ` `` and + * may contain any character. Some characters, including `` ` ``, must be + * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and + * `` `bak\`tik` `` represents `` bak`tik ``. + * + * Generated from protobuf field map fields = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getFields() + { + return $this->fields; + } + + /** + * The document's fields. + * The map keys represent field names. + * Field names matching the regular expression `__.*__` are reserved. Reserved + * field names are forbidden except in certain documented contexts. The field + * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be + * empty. + * Field paths may be used in other contexts to refer to structured fields + * defined here. For `map_value`, the field path is represented by a + * dot-delimited (`.`) string of segments. Each segment is either a simple + * field name (defined below) or a quoted field name. For example, the + * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" + * }}}` would be represented by the field path `` foo.`x&y` ``. + * A simple field name contains only characters `a` to `z`, `A` to `Z`, + * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, + * `foo_bar_17`. + * A quoted field name starts and ends with `` ` `` and + * may contain any character. Some characters, including `` ` ``, must be + * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and + * `` `bak\`tik` `` represents `` bak`tik ``. + * + * Generated from protobuf field map fields = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->fields = $arr; + + return $this; + } + + /** + * Output only. The time at which the document was created. + * This value increases monotonically when a document is deleted then + * recreated. It can also be compared to values from other documents and + * the `read_time` of a query. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time at which the document was created. + * This value increases monotonically when a document is deleted then + * recreated. It can also be compared to values from other documents and + * the `read_time` of a query. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time at which the document was last changed. + * This value is initially set to the `create_time` then increases + * monotonically with each change to the document. It can also be + * compared to values from other documents and the `read_time` of a query. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The time at which the document was last changed. + * This value is initially set to the `create_time` then increases + * monotonically with each change to the document. It can also be + * compared to values from other documents and the `read_time` of a query. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php new file mode 100644 index 000000000000..4d89e75f035e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php @@ -0,0 +1,154 @@ +google.firestore.v1.DocumentChange + */ +class DocumentChange extends \Google\Protobuf\Internal\Message +{ + /** + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1; + */ + protected $document = null; + /** + * A set of target IDs of targets that match this document. + * + * Generated from protobuf field repeated int32 target_ids = 5; + */ + private $target_ids; + /** + * A set of target IDs for targets that no longer match this document. + * + * Generated from protobuf field repeated int32 removed_target_ids = 6; + */ + private $removed_target_ids; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Document $document + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + * @type int[] $target_ids + * A set of target IDs of targets that match this document. + * @type int[] $removed_target_ids + * A set of target IDs for targets that no longer match this document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1; + * @return \Google\Cloud\Firestore\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * The new state of the [Document][google.firestore.v1.Document]. + * If `mask` is set, contains only fields that were updated or added. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1; + * @param \Google\Cloud\Firestore\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * A set of target IDs of targets that match this document. + * + * Generated from protobuf field repeated int32 target_ids = 5; + * @return RepeatedField + */ + public function getTargetIds() + { + return $this->target_ids; + } + + /** + * A set of target IDs of targets that match this document. + * + * Generated from protobuf field repeated int32 target_ids = 5; + * @param int[] $var + * @return $this + */ + public function setTargetIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->target_ids = $arr; + + return $this; + } + + /** + * A set of target IDs for targets that no longer match this document. + * + * Generated from protobuf field repeated int32 removed_target_ids = 6; + * @return RepeatedField + */ + public function getRemovedTargetIds() + { + return $this->removed_target_ids; + } + + /** + * A set of target IDs for targets that no longer match this document. + * + * Generated from protobuf field repeated int32 removed_target_ids = 6; + * @param int[] $var + * @return $this + */ + public function setRemovedTargetIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->removed_target_ids = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php new file mode 100644 index 000000000000..706a0f731675 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php @@ -0,0 +1,158 @@ +google.firestore.v1.DocumentDelete + */ +class DocumentDelete extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the [Document][google.firestore.v1.Document] that was + * deleted. + * + * Generated from protobuf field string document = 1; + */ + protected $document = ''; + /** + * A set of target IDs for targets that previously matched this entity. + * + * Generated from protobuf field repeated int32 removed_target_ids = 6; + */ + private $removed_target_ids; + /** + * The read timestamp at which the delete was observed. + * Greater or equal to the `commit_time` of the delete. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + */ + protected $read_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $document + * The resource name of the [Document][google.firestore.v1.Document] that was + * deleted. + * @type int[] $removed_target_ids + * A set of target IDs for targets that previously matched this entity. + * @type \Google\Protobuf\Timestamp $read_time + * The read timestamp at which the delete was observed. + * Greater or equal to the `commit_time` of the delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the [Document][google.firestore.v1.Document] that was + * deleted. + * + * Generated from protobuf field string document = 1; + * @return string + */ + public function getDocument() + { + return $this->document; + } + + /** + * The resource name of the [Document][google.firestore.v1.Document] that was + * deleted. + * + * Generated from protobuf field string document = 1; + * @param string $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkString($var, True); + $this->document = $var; + + return $this; + } + + /** + * A set of target IDs for targets that previously matched this entity. + * + * Generated from protobuf field repeated int32 removed_target_ids = 6; + * @return RepeatedField + */ + public function getRemovedTargetIds() + { + return $this->removed_target_ids; + } + + /** + * A set of target IDs for targets that previously matched this entity. + * + * Generated from protobuf field repeated int32 removed_target_ids = 6; + * @param int[] $var + * @return $this + */ + public function setRemovedTargetIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->removed_target_ids = $arr; + + return $this; + } + + /** + * The read timestamp at which the delete was observed. + * Greater or equal to the `commit_time` of the delete. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * The read timestamp at which the delete was observed. + * Greater or equal to the `commit_time` of the delete. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php new file mode 100644 index 000000000000..9f4e56639765 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php @@ -0,0 +1,80 @@ +google.firestore.v1.DocumentMask + */ +class DocumentMask extends \Google\Protobuf\Internal\Message +{ + /** + * The list of field paths in the mask. See + * [Document.fields][google.firestore.v1.Document.fields] for a field path + * syntax reference. + * + * Generated from protobuf field repeated string field_paths = 1; + */ + private $field_paths; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $field_paths + * The list of field paths in the mask. See + * [Document.fields][google.firestore.v1.Document.fields] for a field path + * syntax reference. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The list of field paths in the mask. See + * [Document.fields][google.firestore.v1.Document.fields] for a field path + * syntax reference. + * + * Generated from protobuf field repeated string field_paths = 1; + * @return RepeatedField + */ + public function getFieldPaths() + { + return $this->field_paths; + } + + /** + * The list of field paths in the mask. See + * [Document.fields][google.firestore.v1.Document.fields] for a field path + * syntax reference. + * + * Generated from protobuf field repeated string field_paths = 1; + * @param string[] $var + * @return $this + */ + public function setFieldPaths($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->field_paths = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php new file mode 100644 index 000000000000..e346028118e7 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php @@ -0,0 +1,160 @@ +google.firestore.v1.DocumentRemove + */ +class DocumentRemove extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the [Document][google.firestore.v1.Document] that has + * gone out of view. + * + * Generated from protobuf field string document = 1; + */ + protected $document = ''; + /** + * A set of target IDs for targets that previously matched this document. + * + * Generated from protobuf field repeated int32 removed_target_ids = 2; + */ + private $removed_target_ids; + /** + * The read timestamp at which the remove was observed. + * Greater or equal to the `commit_time` of the change/delete/remove. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + */ + protected $read_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $document + * The resource name of the [Document][google.firestore.v1.Document] that has + * gone out of view. + * @type int[] $removed_target_ids + * A set of target IDs for targets that previously matched this document. + * @type \Google\Protobuf\Timestamp $read_time + * The read timestamp at which the remove was observed. + * Greater or equal to the `commit_time` of the change/delete/remove. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the [Document][google.firestore.v1.Document] that has + * gone out of view. + * + * Generated from protobuf field string document = 1; + * @return string + */ + public function getDocument() + { + return $this->document; + } + + /** + * The resource name of the [Document][google.firestore.v1.Document] that has + * gone out of view. + * + * Generated from protobuf field string document = 1; + * @param string $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkString($var, True); + $this->document = $var; + + return $this; + } + + /** + * A set of target IDs for targets that previously matched this document. + * + * Generated from protobuf field repeated int32 removed_target_ids = 2; + * @return RepeatedField + */ + public function getRemovedTargetIds() + { + return $this->removed_target_ids; + } + + /** + * A set of target IDs for targets that previously matched this document. + * + * Generated from protobuf field repeated int32 removed_target_ids = 2; + * @param int[] $var + * @return $this + */ + public function setRemovedTargetIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->removed_target_ids = $arr; + + return $this; + } + + /** + * The read timestamp at which the remove was observed. + * Greater or equal to the `commit_time` of the change/delete/remove. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * The read timestamp at which the remove was observed. + * Greater or equal to the `commit_time` of the change/delete/remove. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php new file mode 100644 index 000000000000..d57bdf03c859 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php @@ -0,0 +1,109 @@ +google.firestore.v1.DocumentTransform + */ +class DocumentTransform extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the document to transform. + * + * Generated from protobuf field string document = 1; + */ + protected $document = ''; + /** + * The list of transformations to apply to the fields of the document, in + * order. + * This must not be empty. + * + * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; + */ + private $field_transforms; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $document + * The name of the document to transform. + * @type \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform[] $field_transforms + * The list of transformations to apply to the fields of the document, in + * order. + * This must not be empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The name of the document to transform. + * + * Generated from protobuf field string document = 1; + * @return string + */ + public function getDocument() + { + return $this->document; + } + + /** + * The name of the document to transform. + * + * Generated from protobuf field string document = 1; + * @param string $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkString($var, True); + $this->document = $var; + + return $this; + } + + /** + * The list of transformations to apply to the fields of the document, in + * order. + * This must not be empty. + * + * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; + * @return RepeatedField<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform> + */ + public function getFieldTransforms() + { + return $this->field_transforms; + } + + /** + * The list of transformations to apply to the fields of the document, in + * order. + * This must not be empty. + * + * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; + * @param \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform[] $var + * @return $this + */ + public function setFieldTransforms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform::class); + $this->field_transforms = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php new file mode 100644 index 000000000000..10135fb11738 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php @@ -0,0 +1,414 @@ +google.firestore.v1.DocumentTransform.FieldTransform + */ +class FieldTransform extends \Google\Protobuf\Internal\Message +{ + /** + * The path of the field. See + * [Document.fields][google.firestore.v1.Document.fields] for the field path + * syntax reference. + * + * Generated from protobuf field string field_path = 1; + */ + protected $field_path = ''; + protected $transform_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field_path + * The path of the field. See + * [Document.fields][google.firestore.v1.Document.fields] for the field path + * syntax reference. + * @type int $set_to_server_value + * Sets the field to the given server value. + * @type \Google\Cloud\Firestore\V1\Value $increment + * Adds the given value to the field's current value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the given value. + * If either of the given value or the current field value are doubles, + * both values will be interpreted as doubles. Double arithmetic and + * representation of double values follow IEEE 754 semantics. + * If there is positive/negative integer overflow, the field is resolved + * to the largest magnitude positive/negative integer. + * @type \Google\Cloud\Firestore\V1\Value $maximum + * Sets the field to the maximum of its current value and the given value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the given value. + * If a maximum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the larger operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and + * zero input value is always the stored value. + * The maximum of any numeric value x and NaN is NaN. + * @type \Google\Cloud\Firestore\V1\Value $minimum + * Sets the field to the minimum of its current value and the given value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the input value. + * If a minimum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the smaller operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and + * zero input value is always the stored value. + * The minimum of any numeric value x and NaN is NaN. + * @type \Google\Cloud\Firestore\V1\ArrayValue $append_missing_elements + * Append the given elements in order if they are not already present in + * the current field value. + * If the field is not an array, or if the field does not yet exist, it is + * first set to the empty array. + * Equivalent numbers of different types (e.g. 3L and 3.0) are + * considered equal when checking if a value is missing. + * NaN is equal to NaN, and Null is equal to Null. + * If the input contains multiple equivalent values, only the first will + * be considered. + * The corresponding transform_result will be the null value. + * @type \Google\Cloud\Firestore\V1\ArrayValue $remove_all_from_array + * Remove all of the given elements from the array in the field. + * If the field is not an array, or if the field does not yet exist, it is + * set to the empty array. + * Equivalent numbers of the different types (e.g. 3L and 3.0) are + * considered equal when deciding whether an element should be removed. + * NaN is equal to NaN, and Null is equal to Null. + * This will remove all equivalent values if there are duplicates. + * The corresponding transform_result will be the null value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The path of the field. See + * [Document.fields][google.firestore.v1.Document.fields] for the field path + * syntax reference. + * + * Generated from protobuf field string field_path = 1; + * @return string + */ + public function getFieldPath() + { + return $this->field_path; + } + + /** + * The path of the field. See + * [Document.fields][google.firestore.v1.Document.fields] for the field path + * syntax reference. + * + * Generated from protobuf field string field_path = 1; + * @param string $var + * @return $this + */ + public function setFieldPath($var) + { + GPBUtil::checkString($var, True); + $this->field_path = $var; + + return $this; + } + + /** + * Sets the field to the given server value. + * + * Generated from protobuf field .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; + * @return int + */ + public function getSetToServerValue() + { + return $this->readOneof(2); + } + + public function hasSetToServerValue() + { + return $this->hasOneof(2); + } + + /** + * Sets the field to the given server value. + * + * Generated from protobuf field .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; + * @param int $var + * @return $this + */ + public function setSetToServerValue($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform\ServerValue::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Adds the given value to the field's current value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the given value. + * If either of the given value or the current field value are doubles, + * both values will be interpreted as doubles. Double arithmetic and + * representation of double values follow IEEE 754 semantics. + * If there is positive/negative integer overflow, the field is resolved + * to the largest magnitude positive/negative integer. + * + * Generated from protobuf field .google.firestore.v1.Value increment = 3; + * @return \Google\Cloud\Firestore\V1\Value|null + */ + public function getIncrement() + { + return $this->readOneof(3); + } + + public function hasIncrement() + { + return $this->hasOneof(3); + } + + /** + * Adds the given value to the field's current value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the given value. + * If either of the given value or the current field value are doubles, + * both values will be interpreted as doubles. Double arithmetic and + * representation of double values follow IEEE 754 semantics. + * If there is positive/negative integer overflow, the field is resolved + * to the largest magnitude positive/negative integer. + * + * Generated from protobuf field .google.firestore.v1.Value increment = 3; + * @param \Google\Cloud\Firestore\V1\Value $var + * @return $this + */ + public function setIncrement($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Sets the field to the maximum of its current value and the given value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the given value. + * If a maximum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the larger operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and + * zero input value is always the stored value. + * The maximum of any numeric value x and NaN is NaN. + * + * Generated from protobuf field .google.firestore.v1.Value maximum = 4; + * @return \Google\Cloud\Firestore\V1\Value|null + */ + public function getMaximum() + { + return $this->readOneof(4); + } + + public function hasMaximum() + { + return $this->hasOneof(4); + } + + /** + * Sets the field to the maximum of its current value and the given value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the given value. + * If a maximum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the larger operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and + * zero input value is always the stored value. + * The maximum of any numeric value x and NaN is NaN. + * + * Generated from protobuf field .google.firestore.v1.Value maximum = 4; + * @param \Google\Cloud\Firestore\V1\Value $var + * @return $this + */ + public function setMaximum($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Sets the field to the minimum of its current value and the given value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the input value. + * If a minimum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the smaller operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and + * zero input value is always the stored value. + * The minimum of any numeric value x and NaN is NaN. + * + * Generated from protobuf field .google.firestore.v1.Value minimum = 5; + * @return \Google\Cloud\Firestore\V1\Value|null + */ + public function getMinimum() + { + return $this->readOneof(5); + } + + public function hasMinimum() + { + return $this->hasOneof(5); + } + + /** + * Sets the field to the minimum of its current value and the given value. + * This must be an integer or a double value. + * If the field is not an integer or double, or if the field does not yet + * exist, the transformation will set the field to the input value. + * If a minimum operation is applied where the field and the input value + * are of mixed types (that is - one is an integer and one is a double) + * the field takes on the type of the smaller operand. If the operands are + * equivalent (e.g. 3 and 3.0), the field does not change. + * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and + * zero input value is always the stored value. + * The minimum of any numeric value x and NaN is NaN. + * + * Generated from protobuf field .google.firestore.v1.Value minimum = 5; + * @param \Google\Cloud\Firestore\V1\Value $var + * @return $this + */ + public function setMinimum($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Append the given elements in order if they are not already present in + * the current field value. + * If the field is not an array, or if the field does not yet exist, it is + * first set to the empty array. + * Equivalent numbers of different types (e.g. 3L and 3.0) are + * considered equal when checking if a value is missing. + * NaN is equal to NaN, and Null is equal to Null. + * If the input contains multiple equivalent values, only the first will + * be considered. + * The corresponding transform_result will be the null value. + * + * Generated from protobuf field .google.firestore.v1.ArrayValue append_missing_elements = 6; + * @return \Google\Cloud\Firestore\V1\ArrayValue|null + */ + public function getAppendMissingElements() + { + return $this->readOneof(6); + } + + public function hasAppendMissingElements() + { + return $this->hasOneof(6); + } + + /** + * Append the given elements in order if they are not already present in + * the current field value. + * If the field is not an array, or if the field does not yet exist, it is + * first set to the empty array. + * Equivalent numbers of different types (e.g. 3L and 3.0) are + * considered equal when checking if a value is missing. + * NaN is equal to NaN, and Null is equal to Null. + * If the input contains multiple equivalent values, only the first will + * be considered. + * The corresponding transform_result will be the null value. + * + * Generated from protobuf field .google.firestore.v1.ArrayValue append_missing_elements = 6; + * @param \Google\Cloud\Firestore\V1\ArrayValue $var + * @return $this + */ + public function setAppendMissingElements($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Remove all of the given elements from the array in the field. + * If the field is not an array, or if the field does not yet exist, it is + * set to the empty array. + * Equivalent numbers of the different types (e.g. 3L and 3.0) are + * considered equal when deciding whether an element should be removed. + * NaN is equal to NaN, and Null is equal to Null. + * This will remove all equivalent values if there are duplicates. + * The corresponding transform_result will be the null value. + * + * Generated from protobuf field .google.firestore.v1.ArrayValue remove_all_from_array = 7; + * @return \Google\Cloud\Firestore\V1\ArrayValue|null + */ + public function getRemoveAllFromArray() + { + return $this->readOneof(7); + } + + public function hasRemoveAllFromArray() + { + return $this->hasOneof(7); + } + + /** + * Remove all of the given elements from the array in the field. + * If the field is not an array, or if the field does not yet exist, it is + * set to the empty array. + * Equivalent numbers of the different types (e.g. 3L and 3.0) are + * considered equal when deciding whether an element should be removed. + * NaN is equal to NaN, and Null is equal to Null. + * This will remove all equivalent values if there are duplicates. + * The corresponding transform_result will be the null value. + * + * Generated from protobuf field .google.firestore.v1.ArrayValue remove_all_from_array = 7; + * @param \Google\Cloud\Firestore\V1\ArrayValue $var + * @return $this + */ + public function setRemoveAllFromArray($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getTransformType() + { + return $this->whichOneof("transform_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php new file mode 100644 index 000000000000..32444539ac62 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php @@ -0,0 +1,56 @@ +google.firestore.v1.DocumentTransform.FieldTransform.ServerValue + */ +class ServerValue +{ + /** + * Unspecified. This value must not be used. + * + * Generated from protobuf enum SERVER_VALUE_UNSPECIFIED = 0; + */ + const SERVER_VALUE_UNSPECIFIED = 0; + /** + * The time at which the server processed the request, with millisecond + * precision. If used on multiple fields (same or different documents) in + * a transaction, all the fields will get the same server timestamp. + * + * Generated from protobuf enum REQUEST_TIME = 1; + */ + const REQUEST_TIME = 1; + + private static $valueToName = [ + self::SERVER_VALUE_UNSPECIFIED => 'SERVER_VALUE_UNSPECIFIED', + self::REQUEST_TIME => 'REQUEST_TIME', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineRequest.php new file mode 100644 index 000000000000..10221d2cba4b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineRequest.php @@ -0,0 +1,240 @@ +google.firestore.v1.ExecutePipelineRequest + */ +class ExecutePipelineRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Database identifier, in the form + * `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + protected $pipeline_type; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. Database identifier, in the form + * `projects/{project}/databases/{database}`. + * @type \Google\Cloud\Firestore\V1\StructuredPipeline $structured_pipeline + * A pipelined operation. + * @type string $transaction + * Run the query within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction + * Execute the pipeline in a new transaction. + * The identifier of the newly created transaction will be returned in the + * first response on the stream. This defaults to a read-only transaction. + * @type \Google\Protobuf\Timestamp $read_time + * Execute the pipeline in a snapshot transaction at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. Database identifier, in the form + * `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. Database identifier, in the form + * `projects/{project}/databases/{database}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * A pipelined operation. + * + * Generated from protobuf field .google.firestore.v1.StructuredPipeline structured_pipeline = 2; + * @return \Google\Cloud\Firestore\V1\StructuredPipeline|null + */ + public function getStructuredPipeline() + { + return $this->readOneof(2); + } + + public function hasStructuredPipeline() + { + return $this->hasOneof(2); + } + + /** + * A pipelined operation. + * + * Generated from protobuf field .google.firestore.v1.StructuredPipeline structured_pipeline = 2; + * @param \Google\Cloud\Firestore\V1\StructuredPipeline $var + * @return $this + */ + public function setStructuredPipeline($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredPipeline::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Run the query within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * + * Generated from protobuf field bytes transaction = 5; + * @return string + */ + public function getTransaction() + { + return $this->readOneof(5); + } + + public function hasTransaction() + { + return $this->hasOneof(5); + } + + /** + * Run the query within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * + * Generated from protobuf field bytes transaction = 5; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Execute the pipeline in a new transaction. + * The identifier of the newly created transaction will be returned in the + * first response on the stream. This defaults to a read-only transaction. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; + * @return \Google\Cloud\Firestore\V1\TransactionOptions|null + */ + public function getNewTransaction() + { + return $this->readOneof(6); + } + + public function hasNewTransaction() + { + return $this->hasOneof(6); + } + + /** + * Execute the pipeline in a new transaction. + * The identifier of the newly created transaction will be returned in the + * first response on the stream. This defaults to a read-only transaction. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; + * @param \Google\Cloud\Firestore\V1\TransactionOptions $var + * @return $this + */ + public function setNewTransaction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Execute the pipeline in a snapshot transaction at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(7); + } + + public function hasReadTime() + { + return $this->hasOneof(7); + } + + /** + * Execute the pipeline in a snapshot transaction at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getPipelineType() + { + return $this->whichOneof("pipeline_type"); + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineResponse.php new file mode 100644 index 000000000000..6ee7dc36a3e0 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineResponse.php @@ -0,0 +1,285 @@ +google.firestore.v1.ExecutePipelineResponse + */ +class ExecutePipelineResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Newly created transaction identifier. + * This field is only specified as part of the first response from the server, + * alongside the `results` field when the original request specified + * [ExecuteRequest.new_transaction][]. + * + * Generated from protobuf field bytes transaction = 1; + */ + protected $transaction = ''; + /** + * An ordered batch of results returned executing a pipeline. + * The batch size is variable, and can even be zero for when only a partial + * progress message is returned. + * The fields present in the returned documents are only those that were + * explicitly requested in the pipeline, this includes those like + * [`__name__`][google.firestore.v1.Document.name] and + * [`__update_time__`][google.firestore.v1.Document.update_time]. This is + * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument` + * RPCs which always return such fields even when they are not specified in + * the [`mask`][google.firestore.v1.DocumentMask]. + * + * Generated from protobuf field repeated .google.firestore.v1.Document results = 2; + */ + private $results; + /** + * The time at which the results are valid. + * This is a (not strictly) monotonically increasing value across multiple + * responses in the same stream. The API guarantees that all previously + * returned results are still valid at the latest `execution_time`. This + * allows the API consumer to treat the query if it ran at the latest + * `execution_time` returned. + * If the query returns no results, a response with `execution_time` and no + * `results` will be sent, and this represents the time at which the operation + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp execution_time = 3; + */ + protected $execution_time = null; + /** + * Query explain stats. + * This is present on the **last** response if the request configured explain + * to run in 'analyze' or 'explain' mode in the pipeline options. If the query + * does not return any results, a response with `explain_stats` and no + * `results` will still be sent. + * + * Generated from protobuf field .google.firestore.v1.ExplainStats explain_stats = 4; + */ + protected $explain_stats = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $transaction + * Newly created transaction identifier. + * This field is only specified as part of the first response from the server, + * alongside the `results` field when the original request specified + * [ExecuteRequest.new_transaction][]. + * @type \Google\Cloud\Firestore\V1\Document[] $results + * An ordered batch of results returned executing a pipeline. + * The batch size is variable, and can even be zero for when only a partial + * progress message is returned. + * The fields present in the returned documents are only those that were + * explicitly requested in the pipeline, this includes those like + * [`__name__`][google.firestore.v1.Document.name] and + * [`__update_time__`][google.firestore.v1.Document.update_time]. This is + * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument` + * RPCs which always return such fields even when they are not specified in + * the [`mask`][google.firestore.v1.DocumentMask]. + * @type \Google\Protobuf\Timestamp $execution_time + * The time at which the results are valid. + * This is a (not strictly) monotonically increasing value across multiple + * responses in the same stream. The API guarantees that all previously + * returned results are still valid at the latest `execution_time`. This + * allows the API consumer to treat the query if it ran at the latest + * `execution_time` returned. + * If the query returns no results, a response with `execution_time` and no + * `results` will be sent, and this represents the time at which the operation + * was run. + * @type \Google\Cloud\Firestore\V1\ExplainStats $explain_stats + * Query explain stats. + * This is present on the **last** response if the request configured explain + * to run in 'analyze' or 'explain' mode in the pipeline options. If the query + * does not return any results, a response with `explain_stats` and no + * `results` will still be sent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Newly created transaction identifier. + * This field is only specified as part of the first response from the server, + * alongside the `results` field when the original request specified + * [ExecuteRequest.new_transaction][]. + * + * Generated from protobuf field bytes transaction = 1; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * Newly created transaction identifier. + * This field is only specified as part of the first response from the server, + * alongside the `results` field when the original request specified + * [ExecuteRequest.new_transaction][]. + * + * Generated from protobuf field bytes transaction = 1; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + + /** + * An ordered batch of results returned executing a pipeline. + * The batch size is variable, and can even be zero for when only a partial + * progress message is returned. + * The fields present in the returned documents are only those that were + * explicitly requested in the pipeline, this includes those like + * [`__name__`][google.firestore.v1.Document.name] and + * [`__update_time__`][google.firestore.v1.Document.update_time]. This is + * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument` + * RPCs which always return such fields even when they are not specified in + * the [`mask`][google.firestore.v1.DocumentMask]. + * + * Generated from protobuf field repeated .google.firestore.v1.Document results = 2; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Document> + */ + public function getResults() + { + return $this->results; + } + + /** + * An ordered batch of results returned executing a pipeline. + * The batch size is variable, and can even be zero for when only a partial + * progress message is returned. + * The fields present in the returned documents are only those that were + * explicitly requested in the pipeline, this includes those like + * [`__name__`][google.firestore.v1.Document.name] and + * [`__update_time__`][google.firestore.v1.Document.update_time]. This is + * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument` + * RPCs which always return such fields even when they are not specified in + * the [`mask`][google.firestore.v1.DocumentMask]. + * + * Generated from protobuf field repeated .google.firestore.v1.Document results = 2; + * @param \Google\Cloud\Firestore\V1\Document[] $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Document::class); + $this->results = $arr; + + return $this; + } + + /** + * The time at which the results are valid. + * This is a (not strictly) monotonically increasing value across multiple + * responses in the same stream. The API guarantees that all previously + * returned results are still valid at the latest `execution_time`. This + * allows the API consumer to treat the query if it ran at the latest + * `execution_time` returned. + * If the query returns no results, a response with `execution_time` and no + * `results` will be sent, and this represents the time at which the operation + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp execution_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExecutionTime() + { + return $this->execution_time; + } + + public function hasExecutionTime() + { + return isset($this->execution_time); + } + + public function clearExecutionTime() + { + unset($this->execution_time); + } + + /** + * The time at which the results are valid. + * This is a (not strictly) monotonically increasing value across multiple + * responses in the same stream. The API guarantees that all previously + * returned results are still valid at the latest `execution_time`. This + * allows the API consumer to treat the query if it ran at the latest + * `execution_time` returned. + * If the query returns no results, a response with `execution_time` and no + * `results` will be sent, and this represents the time at which the operation + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp execution_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExecutionTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->execution_time = $var; + + return $this; + } + + /** + * Query explain stats. + * This is present on the **last** response if the request configured explain + * to run in 'analyze' or 'explain' mode in the pipeline options. If the query + * does not return any results, a response with `explain_stats` and no + * `results` will still be sent. + * + * Generated from protobuf field .google.firestore.v1.ExplainStats explain_stats = 4; + * @return \Google\Cloud\Firestore\V1\ExplainStats|null + */ + public function getExplainStats() + { + return $this->explain_stats; + } + + public function hasExplainStats() + { + return isset($this->explain_stats); + } + + public function clearExplainStats() + { + unset($this->explain_stats); + } + + /** + * Query explain stats. + * This is present on the **last** response if the request configured explain + * to run in 'analyze' or 'explain' mode in the pipeline options. If the query + * does not return any results, a response with `explain_stats` and no + * `results` will still be sent. + * + * Generated from protobuf field .google.firestore.v1.ExplainStats explain_stats = 4; + * @param \Google\Cloud\Firestore\V1\ExplainStats $var + * @return $this + */ + public function setExplainStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainStats::class); + $this->explain_stats = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutionStats.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutionStats.php new file mode 100644 index 000000000000..63cbbcf07b0c --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutionStats.php @@ -0,0 +1,237 @@ +google.firestore.v1.ExecutionStats + */ +class ExecutionStats extends \Google\Protobuf\Internal\Message +{ + /** + * Total number of results returned, including documents, projections, + * aggregation results, keys. + * + * Generated from protobuf field int64 results_returned = 1; + */ + protected $results_returned = 0; + /** + * Total time to execute the query in the backend. + * + * Generated from protobuf field .google.protobuf.Duration execution_duration = 3; + */ + protected $execution_duration = null; + /** + * Total billable read operations. + * + * Generated from protobuf field int64 read_operations = 4; + */ + protected $read_operations = 0; + /** + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + * + * Generated from protobuf field .google.protobuf.Struct debug_stats = 5; + */ + protected $debug_stats = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $results_returned + * Total number of results returned, including documents, projections, + * aggregation results, keys. + * @type \Google\Protobuf\Duration $execution_duration + * Total time to execute the query in the backend. + * @type int|string $read_operations + * Total billable read operations. + * @type \Google\Protobuf\Struct $debug_stats + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); + parent::__construct($data); + } + + /** + * Total number of results returned, including documents, projections, + * aggregation results, keys. + * + * Generated from protobuf field int64 results_returned = 1; + * @return int|string + */ + public function getResultsReturned() + { + return $this->results_returned; + } + + /** + * Total number of results returned, including documents, projections, + * aggregation results, keys. + * + * Generated from protobuf field int64 results_returned = 1; + * @param int|string $var + * @return $this + */ + public function setResultsReturned($var) + { + GPBUtil::checkInt64($var); + $this->results_returned = $var; + + return $this; + } + + /** + * Total time to execute the query in the backend. + * + * Generated from protobuf field .google.protobuf.Duration execution_duration = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getExecutionDuration() + { + return $this->execution_duration; + } + + public function hasExecutionDuration() + { + return isset($this->execution_duration); + } + + public function clearExecutionDuration() + { + unset($this->execution_duration); + } + + /** + * Total time to execute the query in the backend. + * + * Generated from protobuf field .google.protobuf.Duration execution_duration = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setExecutionDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->execution_duration = $var; + + return $this; + } + + /** + * Total billable read operations. + * + * Generated from protobuf field int64 read_operations = 4; + * @return int|string + */ + public function getReadOperations() + { + return $this->read_operations; + } + + /** + * Total billable read operations. + * + * Generated from protobuf field int64 read_operations = 4; + * @param int|string $var + * @return $this + */ + public function setReadOperations($var) + { + GPBUtil::checkInt64($var); + $this->read_operations = $var; + + return $this; + } + + /** + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + * + * Generated from protobuf field .google.protobuf.Struct debug_stats = 5; + * @return \Google\Protobuf\Struct|null + */ + public function getDebugStats() + { + return $this->debug_stats; + } + + public function hasDebugStats() + { + return isset($this->debug_stats); + } + + public function clearDebugStats() + { + unset($this->debug_stats); + } + + /** + * Debugging statistics from the execution of the query. Note that the + * debugging stats are subject to change as Firestore evolves. It could + * include: + * { + * "indexes_entries_scanned": "1000", + * "documents_scanned": "20", + * "billing_details" : { + * "documents_billable": "20", + * "index_entries_billable": "1000", + * "min_query_cost": "0" + * } + * } + * + * Generated from protobuf field .google.protobuf.Struct debug_stats = 5; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setDebugStats($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->debug_stats = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php new file mode 100644 index 000000000000..a136f19886db --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php @@ -0,0 +1,209 @@ +google.firestore.v1.ExistenceFilter + */ +class ExistenceFilter extends \Google\Protobuf\Internal\Message +{ + /** + * The target ID to which this filter applies. + * + * Generated from protobuf field int32 target_id = 1; + */ + protected $target_id = 0; + /** + * The total count of documents that match + * [target_id][google.firestore.v1.ExistenceFilter.target_id]. + * If different from the count of documents in the client that match, the + * client must manually determine which documents no longer match the target. + * The client can use the `unchanged_names` bloom filter to assist with + * this determination by testing ALL the document names against the filter; + * if the document name is NOT in the filter, it means the document no + * longer matches the target. + * + * Generated from protobuf field int32 count = 2; + */ + protected $count = 0; + /** + * A bloom filter that, despite its name, contains the UTF-8 byte encodings of + * the resource names of ALL the documents that match + * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * This bloom filter may be omitted at the server's discretion, such as if it + * is deemed that the client will not make use of it or if it is too + * computationally expensive to calculate or transmit. Clients must gracefully + * handle this field being absent by falling back to the logic used before + * this field existed; that is, re-add the target without a resume token to + * figure out which documents in the client's cache are out of sync. + * + * Generated from protobuf field .google.firestore.v1.BloomFilter unchanged_names = 3; + */ + protected $unchanged_names = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $target_id + * The target ID to which this filter applies. + * @type int $count + * The total count of documents that match + * [target_id][google.firestore.v1.ExistenceFilter.target_id]. + * If different from the count of documents in the client that match, the + * client must manually determine which documents no longer match the target. + * The client can use the `unchanged_names` bloom filter to assist with + * this determination by testing ALL the document names against the filter; + * if the document name is NOT in the filter, it means the document no + * longer matches the target. + * @type \Google\Cloud\Firestore\V1\BloomFilter $unchanged_names + * A bloom filter that, despite its name, contains the UTF-8 byte encodings of + * the resource names of ALL the documents that match + * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * This bloom filter may be omitted at the server's discretion, such as if it + * is deemed that the client will not make use of it or if it is too + * computationally expensive to calculate or transmit. Clients must gracefully + * handle this field being absent by falling back to the logic used before + * this field existed; that is, re-add the target without a resume token to + * figure out which documents in the client's cache are out of sync. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The target ID to which this filter applies. + * + * Generated from protobuf field int32 target_id = 1; + * @return int + */ + public function getTargetId() + { + return $this->target_id; + } + + /** + * The target ID to which this filter applies. + * + * Generated from protobuf field int32 target_id = 1; + * @param int $var + * @return $this + */ + public function setTargetId($var) + { + GPBUtil::checkInt32($var); + $this->target_id = $var; + + return $this; + } + + /** + * The total count of documents that match + * [target_id][google.firestore.v1.ExistenceFilter.target_id]. + * If different from the count of documents in the client that match, the + * client must manually determine which documents no longer match the target. + * The client can use the `unchanged_names` bloom filter to assist with + * this determination by testing ALL the document names against the filter; + * if the document name is NOT in the filter, it means the document no + * longer matches the target. + * + * Generated from protobuf field int32 count = 2; + * @return int + */ + public function getCount() + { + return $this->count; + } + + /** + * The total count of documents that match + * [target_id][google.firestore.v1.ExistenceFilter.target_id]. + * If different from the count of documents in the client that match, the + * client must manually determine which documents no longer match the target. + * The client can use the `unchanged_names` bloom filter to assist with + * this determination by testing ALL the document names against the filter; + * if the document name is NOT in the filter, it means the document no + * longer matches the target. + * + * Generated from protobuf field int32 count = 2; + * @param int $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt32($var); + $this->count = $var; + + return $this; + } + + /** + * A bloom filter that, despite its name, contains the UTF-8 byte encodings of + * the resource names of ALL the documents that match + * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * This bloom filter may be omitted at the server's discretion, such as if it + * is deemed that the client will not make use of it or if it is too + * computationally expensive to calculate or transmit. Clients must gracefully + * handle this field being absent by falling back to the logic used before + * this field existed; that is, re-add the target without a resume token to + * figure out which documents in the client's cache are out of sync. + * + * Generated from protobuf field .google.firestore.v1.BloomFilter unchanged_names = 3; + * @return \Google\Cloud\Firestore\V1\BloomFilter|null + */ + public function getUnchangedNames() + { + return $this->unchanged_names; + } + + public function hasUnchangedNames() + { + return isset($this->unchanged_names); + } + + public function clearUnchangedNames() + { + unset($this->unchanged_names); + } + + /** + * A bloom filter that, despite its name, contains the UTF-8 byte encodings of + * the resource names of ALL the documents that match + * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * This bloom filter may be omitted at the server's discretion, such as if it + * is deemed that the client will not make use of it or if it is too + * computationally expensive to calculate or transmit. Clients must gracefully + * handle this field being absent by falling back to the logic used before + * this field existed; that is, re-add the target without a resume token to + * figure out which documents in the client's cache are out of sync. + * + * Generated from protobuf field .google.firestore.v1.BloomFilter unchanged_names = 3; + * @param \Google\Cloud\Firestore\V1\BloomFilter $var + * @return $this + */ + public function setUnchangedNames($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\BloomFilter::class); + $this->unchanged_names = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainMetrics.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainMetrics.php new file mode 100644 index 000000000000..0e879bab9188 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainMetrics.php @@ -0,0 +1,129 @@ +google.firestore.v1.ExplainMetrics + */ +class ExplainMetrics extends \Google\Protobuf\Internal\Message +{ + /** + * Planning phase information for the query. + * + * Generated from protobuf field .google.firestore.v1.PlanSummary plan_summary = 1; + */ + protected $plan_summary = null; + /** + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set + * to true. + * + * Generated from protobuf field .google.firestore.v1.ExecutionStats execution_stats = 2; + */ + protected $execution_stats = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\PlanSummary $plan_summary + * Planning phase information for the query. + * @type \Google\Cloud\Firestore\V1\ExecutionStats $execution_stats + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set + * to true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); + parent::__construct($data); + } + + /** + * Planning phase information for the query. + * + * Generated from protobuf field .google.firestore.v1.PlanSummary plan_summary = 1; + * @return \Google\Cloud\Firestore\V1\PlanSummary|null + */ + public function getPlanSummary() + { + return $this->plan_summary; + } + + public function hasPlanSummary() + { + return isset($this->plan_summary); + } + + public function clearPlanSummary() + { + unset($this->plan_summary); + } + + /** + * Planning phase information for the query. + * + * Generated from protobuf field .google.firestore.v1.PlanSummary plan_summary = 1; + * @param \Google\Cloud\Firestore\V1\PlanSummary $var + * @return $this + */ + public function setPlanSummary($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\PlanSummary::class); + $this->plan_summary = $var; + + return $this; + } + + /** + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set + * to true. + * + * Generated from protobuf field .google.firestore.v1.ExecutionStats execution_stats = 2; + * @return \Google\Cloud\Firestore\V1\ExecutionStats|null + */ + public function getExecutionStats() + { + return $this->execution_stats; + } + + public function hasExecutionStats() + { + return isset($this->execution_stats); + } + + public function clearExecutionStats() + { + unset($this->execution_stats); + } + + /** + * Aggregated stats from the execution of the query. Only present when + * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set + * to true. + * + * Generated from protobuf field .google.firestore.v1.ExecutionStats execution_stats = 2; + * @param \Google\Cloud\Firestore\V1\ExecutionStats $var + * @return $this + */ + public function setExecutionStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExecutionStats::class); + $this->execution_stats = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainOptions.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainOptions.php new file mode 100644 index 000000000000..05b64823f7d4 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainOptions.php @@ -0,0 +1,83 @@ +google.firestore.v1.ExplainOptions + */ +class ExplainOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether to execute this query. + * When false (the default), the query will be planned, returning only + * metrics from the planning stages. + * When true, the query will be planned and executed, returning the full + * query results along with both planning and execution stage metrics. + * + * Generated from protobuf field bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $analyze = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $analyze + * Optional. Whether to execute this query. + * When false (the default), the query will be planned, returning only + * metrics from the planning stages. + * When true, the query will be planned and executed, returning the full + * query results along with both planning and execution stage metrics. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether to execute this query. + * When false (the default), the query will be planned, returning only + * metrics from the planning stages. + * When true, the query will be planned and executed, returning the full + * query results along with both planning and execution stage metrics. + * + * Generated from protobuf field bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAnalyze() + { + return $this->analyze; + } + + /** + * Optional. Whether to execute this query. + * When false (the default), the query will be planned, returning only + * metrics from the planning stages. + * When true, the query will be planned and executed, returning the full + * query results along with both planning and execution stage metrics. + * + * Generated from protobuf field bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAnalyze($var) + { + GPBUtil::checkBool($var); + $this->analyze = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainStats.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainStats.php new file mode 100644 index 000000000000..ca8d929ebf74 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainStats.php @@ -0,0 +1,87 @@ +google.firestore.v1.ExplainStats + */ +class ExplainStats extends \Google\Protobuf\Internal\Message +{ + /** + * The format depends on the `output_format` options in the request. + * Currently there are two supported options: `TEXT` and `JSON`. + * Both supply a `google.protobuf.StringValue`. + * + * Generated from protobuf field .google.protobuf.Any data = 1; + */ + protected $data = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Any $data + * The format depends on the `output_format` options in the request. + * Currently there are two supported options: `TEXT` and `JSON`. + * Both supply a `google.protobuf.StringValue`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\ExplainStats::initOnce(); + parent::__construct($data); + } + + /** + * The format depends on the `output_format` options in the request. + * Currently there are two supported options: `TEXT` and `JSON`. + * Both supply a `google.protobuf.StringValue`. + * + * Generated from protobuf field .google.protobuf.Any data = 1; + * @return \Google\Protobuf\Any|null + */ + public function getData() + { + return $this->data; + } + + public function hasData() + { + return isset($this->data); + } + + public function clearData() + { + unset($this->data); + } + + /** + * The format depends on the `output_format` options in the request. + * Currently there are two supported options: `TEXT` and `JSON`. + * Both supply a `google.protobuf.StringValue`. + * + * Generated from protobuf field .google.protobuf.Any data = 1; + * @param \Google\Protobuf\Any $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); + $this->data = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php new file mode 100644 index 000000000000..4e4caa99345d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php @@ -0,0 +1,208 @@ +google.firestore.v1.GetDocumentRequest + */ +class GetDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the Document to get. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; + */ + protected $mask = null; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the Document to get. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @type \Google\Cloud\Firestore\V1\DocumentMask $mask + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * @type string $transaction + * Reads the document in a transaction. + * @type \Google\Protobuf\Timestamp $read_time + * Reads the version of the document at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the Document to get. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the Document to get. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getMask() + { + return $this->mask; + } + + public function hasMask() + { + return isset($this->mask); + } + + public function clearMask() + { + unset($this->mask); + } + + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->mask = $var; + + return $this; + } + + /** + * Reads the document in a transaction. + * + * Generated from protobuf field bytes transaction = 3; + * @return string + */ + public function getTransaction() + { + return $this->readOneof(3); + } + + public function hasTransaction() + { + return $this->hasOneof(3); + } + + /** + * Reads the document in a transaction. + * + * Generated from protobuf field bytes transaction = 3; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Reads the version of the document at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(5); + } + + public function hasReadTime() + { + return $this->hasOneof(5); + } + + /** + * Reads the version of the document at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php new file mode 100644 index 000000000000..5ff67a8a156a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php @@ -0,0 +1,219 @@ +google.firestore.v1.ListCollectionIdsRequest + */ +class ListCollectionIdsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent document. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * The maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token. Must be a value from + * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + protected $consistency_selector; + + /** + * @param string $parent Required. The parent document. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * @return \Google\Cloud\Firestore\V1\ListCollectionIdsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent document. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @type int $page_size + * The maximum number of results to return. + * @type string $page_token + * A page token. Must be a value from + * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. + * @type \Google\Protobuf\Timestamp $read_time + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent document. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent document. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of results to return. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token. Must be a value from + * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token. Must be a value from + * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(4); + } + + public function hasReadTime() + { + return $this->hasOneof(4); + } + + /** + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php new file mode 100644 index 000000000000..9607c86c708c --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php @@ -0,0 +1,102 @@ +google.firestore.v1.ListCollectionIdsResponse + */ +class ListCollectionIdsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The collection ids. + * + * Generated from protobuf field repeated string collection_ids = 1; + */ + private $collection_ids; + /** + * A page token that may be used to continue the list. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $collection_ids + * The collection ids. + * @type string $next_page_token + * A page token that may be used to continue the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The collection ids. + * + * Generated from protobuf field repeated string collection_ids = 1; + * @return RepeatedField + */ + public function getCollectionIds() + { + return $this->collection_ids; + } + + /** + * The collection ids. + * + * Generated from protobuf field repeated string collection_ids = 1; + * @param string[] $var + * @return $this + */ + public function setCollectionIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->collection_ids = $arr; + + return $this; + } + + /** + * A page token that may be used to continue the list. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A page token that may be used to continue the list. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php new file mode 100644 index 000000000000..95df1ff70628 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php @@ -0,0 +1,462 @@ +google.firestore.v1.ListDocumentsRequest + */ +class ListDocumentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Optional. The collection ID, relative to `parent`, to list. + * For example: `chatrooms` or `messages`. + * This is optional, and when not provided, Firestore will list documents + * from all collections under the provided `parent`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $collection_id = ''; + /** + * Optional. The maximum number of documents to return in a single response. + * Firestore may return fewer than this value. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous `ListDocuments` response. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters (with the exception of `page_size`) must match the values set + * in the request that generated the page token. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. The optional ordering of the documents to return. + * For example: `priority desc, __name__ desc`. + * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] + * used in Firestore queries but in a string representation. When absent, + * documents are ordered based on `__name__ ASC`. + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $mask = null; + /** + * If the list should show missing documents. + * A document is missing if it does not exist, but there are sub-documents + * nested underneath it. When true, such missing documents will be returned + * with a key but will not have fields, + * [`create_time`][google.firestore.v1.Document.create_time], or + * [`update_time`][google.firestore.v1.Document.update_time] set. + * Requests with `show_missing` may not specify `where` or `order_by`. + * + * Generated from protobuf field bool show_missing = 12; + */ + protected $show_missing = false; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @type string $collection_id + * Optional. The collection ID, relative to `parent`, to list. + * For example: `chatrooms` or `messages`. + * This is optional, and when not provided, Firestore will list documents + * from all collections under the provided `parent`. + * @type int $page_size + * Optional. The maximum number of documents to return in a single response. + * Firestore may return fewer than this value. + * @type string $page_token + * Optional. A page token, received from a previous `ListDocuments` response. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters (with the exception of `page_size`) must match the values set + * in the request that generated the page token. + * @type string $order_by + * Optional. The optional ordering of the documents to return. + * For example: `priority desc, __name__ desc`. + * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] + * used in Firestore queries but in a string representation. When absent, + * documents are ordered based on `__name__ ASC`. + * @type \Google\Cloud\Firestore\V1\DocumentMask $mask + * Optional. The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field + * will not be returned in the response. + * @type string $transaction + * Perform the read as part of an already active transaction. + * @type \Google\Protobuf\Timestamp $read_time + * Perform the read at the provided time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * @type bool $show_missing + * If the list should show missing documents. + * A document is missing if it does not exist, but there are sub-documents + * nested underneath it. When true, such missing documents will be returned + * with a key but will not have fields, + * [`create_time`][google.firestore.v1.Document.create_time], or + * [`update_time`][google.firestore.v1.Document.update_time] set. + * Requests with `show_missing` may not specify `where` or `order_by`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The collection ID, relative to `parent`, to list. + * For example: `chatrooms` or `messages`. + * This is optional, and when not provided, Firestore will list documents + * from all collections under the provided `parent`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCollectionId() + { + return $this->collection_id; + } + + /** + * Optional. The collection ID, relative to `parent`, to list. + * For example: `chatrooms` or `messages`. + * This is optional, and when not provided, Firestore will list documents + * from all collections under the provided `parent`. + * + * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCollectionId($var) + { + GPBUtil::checkString($var, True); + $this->collection_id = $var; + + return $this; + } + + /** + * Optional. The maximum number of documents to return in a single response. + * Firestore may return fewer than this value. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of documents to return in a single response. + * Firestore may return fewer than this value. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous `ListDocuments` response. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters (with the exception of `page_size`) must match the values set + * in the request that generated the page token. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous `ListDocuments` response. + * Provide this to retrieve the subsequent page. When paginating, all other + * parameters (with the exception of `page_size`) must match the values set + * in the request that generated the page token. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The optional ordering of the documents to return. + * For example: `priority desc, __name__ desc`. + * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] + * used in Firestore queries but in a string representation. When absent, + * documents are ordered based on `__name__ ASC`. + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. The optional ordering of the documents to return. + * For example: `priority desc, __name__ desc`. + * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] + * used in Firestore queries but in a string representation. When absent, + * documents are ordered based on `__name__ ASC`. + * + * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getMask() + { + return $this->mask; + } + + public function hasMask() + { + return isset($this->mask); + } + + public function clearMask() + { + unset($this->mask); + } + + /** + * Optional. The fields to return. If not set, returns all fields. + * If a document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->mask = $var; + + return $this; + } + + /** + * Perform the read as part of an already active transaction. + * + * Generated from protobuf field bytes transaction = 8; + * @return string + */ + public function getTransaction() + { + return $this->readOneof(8); + } + + public function hasTransaction() + { + return $this->hasOneof(8); + } + + /** + * Perform the read as part of an already active transaction. + * + * Generated from protobuf field bytes transaction = 8; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Perform the read at the provided time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(10); + } + + public function hasReadTime() + { + return $this->hasOneof(10); + } + + /** + * Perform the read at the provided time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * If the list should show missing documents. + * A document is missing if it does not exist, but there are sub-documents + * nested underneath it. When true, such missing documents will be returned + * with a key but will not have fields, + * [`create_time`][google.firestore.v1.Document.create_time], or + * [`update_time`][google.firestore.v1.Document.update_time] set. + * Requests with `show_missing` may not specify `where` or `order_by`. + * + * Generated from protobuf field bool show_missing = 12; + * @return bool + */ + public function getShowMissing() + { + return $this->show_missing; + } + + /** + * If the list should show missing documents. + * A document is missing if it does not exist, but there are sub-documents + * nested underneath it. When true, such missing documents will be returned + * with a key but will not have fields, + * [`create_time`][google.firestore.v1.Document.create_time], or + * [`update_time`][google.firestore.v1.Document.update_time] set. + * Requests with `show_missing` may not specify `where` or `order_by`. + * + * Generated from protobuf field bool show_missing = 12; + * @param bool $var + * @return $this + */ + public function setShowMissing($var) + { + GPBUtil::checkBool($var); + $this->show_missing = $var; + + return $this; + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php new file mode 100644 index 000000000000..cc7b6cc12bf7 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php @@ -0,0 +1,106 @@ +google.firestore.v1.ListDocumentsResponse + */ +class ListDocumentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The Documents found. + * + * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; + */ + private $documents; + /** + * A token to retrieve the next page of documents. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Document[] $documents + * The Documents found. + * @type string $next_page_token + * A token to retrieve the next page of documents. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The Documents found. + * + * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Document> + */ + public function getDocuments() + { + return $this->documents; + } + + /** + * The Documents found. + * + * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; + * @param \Google\Cloud\Firestore\V1\Document[] $var + * @return $this + */ + public function setDocuments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Document::class); + $this->documents = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of documents. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of documents. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php new file mode 100644 index 000000000000..806288a8cb01 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php @@ -0,0 +1,180 @@ +google.firestore.v1.ListenRequest + */ +class ListenRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * Labels associated with this target change. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + protected $target_change; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @type \Google\Cloud\Firestore\V1\Target $add_target + * A target to add to this stream. + * @type int $remove_target + * The ID of a target to remove from this stream. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels associated with this target change. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * A target to add to this stream. + * + * Generated from protobuf field .google.firestore.v1.Target add_target = 2; + * @return \Google\Cloud\Firestore\V1\Target|null + */ + public function getAddTarget() + { + return $this->readOneof(2); + } + + public function hasAddTarget() + { + return $this->hasOneof(2); + } + + /** + * A target to add to this stream. + * + * Generated from protobuf field .google.firestore.v1.Target add_target = 2; + * @param \Google\Cloud\Firestore\V1\Target $var + * @return $this + */ + public function setAddTarget($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The ID of a target to remove from this stream. + * + * Generated from protobuf field int32 remove_target = 3; + * @return int + */ + public function getRemoveTarget() + { + return $this->readOneof(3); + } + + public function hasRemoveTarget() + { + return $this->hasOneof(3); + } + + /** + * The ID of a target to remove from this stream. + * + * Generated from protobuf field int32 remove_target = 3; + * @param int $var + * @return $this + */ + public function setRemoveTarget($var) + { + GPBUtil::checkInt32($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Labels associated with this target change. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels associated with this target change. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * @return string + */ + public function getTargetChange() + { + return $this->whichOneof("target_change"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php new file mode 100644 index 000000000000..1848b4a3012f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php @@ -0,0 +1,219 @@ +google.firestore.v1.ListenResponse + */ +class ListenResponse extends \Google\Protobuf\Internal\Message +{ + protected $response_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\TargetChange $target_change + * Targets have changed. + * @type \Google\Cloud\Firestore\V1\DocumentChange $document_change + * A [Document][google.firestore.v1.Document] has changed. + * @type \Google\Cloud\Firestore\V1\DocumentDelete $document_delete + * A [Document][google.firestore.v1.Document] has been deleted. + * @type \Google\Cloud\Firestore\V1\DocumentRemove $document_remove + * A [Document][google.firestore.v1.Document] has been removed from a target + * (because it is no longer relevant to that target). + * @type \Google\Cloud\Firestore\V1\ExistenceFilter $filter + * A filter to apply to the set of documents previously returned for the + * given target. + * Returned when documents may have been removed from the given target, but + * the exact documents are unknown. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Targets have changed. + * + * Generated from protobuf field .google.firestore.v1.TargetChange target_change = 2; + * @return \Google\Cloud\Firestore\V1\TargetChange|null + */ + public function getTargetChange() + { + return $this->readOneof(2); + } + + public function hasTargetChange() + { + return $this->hasOneof(2); + } + + /** + * Targets have changed. + * + * Generated from protobuf field .google.firestore.v1.TargetChange target_change = 2; + * @param \Google\Cloud\Firestore\V1\TargetChange $var + * @return $this + */ + public function setTargetChange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TargetChange::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A [Document][google.firestore.v1.Document] has changed. + * + * Generated from protobuf field .google.firestore.v1.DocumentChange document_change = 3; + * @return \Google\Cloud\Firestore\V1\DocumentChange|null + */ + public function getDocumentChange() + { + return $this->readOneof(3); + } + + public function hasDocumentChange() + { + return $this->hasOneof(3); + } + + /** + * A [Document][google.firestore.v1.Document] has changed. + * + * Generated from protobuf field .google.firestore.v1.DocumentChange document_change = 3; + * @param \Google\Cloud\Firestore\V1\DocumentChange $var + * @return $this + */ + public function setDocumentChange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentChange::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A [Document][google.firestore.v1.Document] has been deleted. + * + * Generated from protobuf field .google.firestore.v1.DocumentDelete document_delete = 4; + * @return \Google\Cloud\Firestore\V1\DocumentDelete|null + */ + public function getDocumentDelete() + { + return $this->readOneof(4); + } + + public function hasDocumentDelete() + { + return $this->hasOneof(4); + } + + /** + * A [Document][google.firestore.v1.Document] has been deleted. + * + * Generated from protobuf field .google.firestore.v1.DocumentDelete document_delete = 4; + * @param \Google\Cloud\Firestore\V1\DocumentDelete $var + * @return $this + */ + public function setDocumentDelete($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentDelete::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * A [Document][google.firestore.v1.Document] has been removed from a target + * (because it is no longer relevant to that target). + * + * Generated from protobuf field .google.firestore.v1.DocumentRemove document_remove = 6; + * @return \Google\Cloud\Firestore\V1\DocumentRemove|null + */ + public function getDocumentRemove() + { + return $this->readOneof(6); + } + + public function hasDocumentRemove() + { + return $this->hasOneof(6); + } + + /** + * A [Document][google.firestore.v1.Document] has been removed from a target + * (because it is no longer relevant to that target). + * + * Generated from protobuf field .google.firestore.v1.DocumentRemove document_remove = 6; + * @param \Google\Cloud\Firestore\V1\DocumentRemove $var + * @return $this + */ + public function setDocumentRemove($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentRemove::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * A filter to apply to the set of documents previously returned for the + * given target. + * Returned when documents may have been removed from the given target, but + * the exact documents are unknown. + * + * Generated from protobuf field .google.firestore.v1.ExistenceFilter filter = 5; + * @return \Google\Cloud\Firestore\V1\ExistenceFilter|null + */ + public function getFilter() + { + return $this->readOneof(5); + } + + public function hasFilter() + { + return $this->hasOneof(5); + } + + /** + * A filter to apply to the set of documents previously returned for the + * given target. + * Returned when documents may have been removed from the given target, but + * the exact documents are unknown. + * + * Generated from protobuf field .google.firestore.v1.ExistenceFilter filter = 5; + * @param \Google\Cloud\Firestore\V1\ExistenceFilter $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExistenceFilter::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getResponseType() + { + return $this->whichOneof("response_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php new file mode 100644 index 000000000000..23d448dfcd95 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php @@ -0,0 +1,83 @@ +google.firestore.v1.MapValue + */ +class MapValue extends \Google\Protobuf\Internal\Message +{ + /** + * The map's fields. + * The map keys represent field names. Field names matching the regular + * expression `__.*__` are reserved. Reserved field names are forbidden except + * in certain documented contexts. The map keys, represented as UTF-8, must + * not exceed 1,500 bytes and cannot be empty. + * + * Generated from protobuf field map fields = 1; + */ + private $fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $fields + * The map's fields. + * The map keys represent field names. Field names matching the regular + * expression `__.*__` are reserved. Reserved field names are forbidden except + * in certain documented contexts. The map keys, represented as UTF-8, must + * not exceed 1,500 bytes and cannot be empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * The map's fields. + * The map keys represent field names. Field names matching the regular + * expression `__.*__` are reserved. Reserved field names are forbidden except + * in certain documented contexts. The map keys, represented as UTF-8, must + * not exceed 1,500 bytes and cannot be empty. + * + * Generated from protobuf field map fields = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getFields() + { + return $this->fields; + } + + /** + * The map's fields. + * The map keys represent field names. Field names matching the regular + * expression `__.*__` are reserved. Reserved field names are forbidden except + * in certain documented contexts. The map keys, represented as UTF-8, must + * not exceed 1,500 bytes and cannot be empty. + * + * Generated from protobuf field map fields = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->fields = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PBFunction.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PBFunction.php new file mode 100644 index 000000000000..c43b051420c3 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PBFunction.php @@ -0,0 +1,149 @@ +google.firestore.v1.Function + */ +class PBFunction extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the function to evaluate. + * **Requires:** + * * must be in snake case (lower case with underscore separator). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. Ordered list of arguments the given function expects. + * + * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $args; + /** + * Optional. Optional named arguments that certain functions may support. + * + * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $options; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the function to evaluate. + * **Requires:** + * * must be in snake case (lower case with underscore separator). + * @type \Google\Cloud\Firestore\V1\Value[] $args + * Optional. Ordered list of arguments the given function expects. + * @type array|\Google\Protobuf\Internal\MapField $options + * Optional. Optional named arguments that certain functions may support. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the function to evaluate. + * **Requires:** + * * must be in snake case (lower case with underscore separator). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the function to evaluate. + * **Requires:** + * * must be in snake case (lower case with underscore separator). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Ordered list of arguments the given function expects. + * + * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> + */ + public function getArgs() + { + return $this->args; + } + + /** + * Optional. Ordered list of arguments the given function expects. + * + * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\V1\Value[] $var + * @return $this + */ + public function setArgs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->args = $arr; + + return $this; + } + + /** + * Optional. Optional named arguments that certain functions may support. + * + * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getOptions() + { + return $this->options; + } + + /** + * Optional. Optional named arguments that certain functions may support. + * + * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setOptions($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->options = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php new file mode 100644 index 000000000000..8ef18f40550b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php @@ -0,0 +1,364 @@ +google.firestore.v1.PartitionQueryRequest + */ +class PartitionQueryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents`. + * Document resource names are not supported; only database resource names + * can be specified. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * The desired maximum number of partition points. + * The partitions may be returned across multiple pages of results. + * The number must be positive. The actual number of partitions + * returned may be fewer. + * For example, this may be set to one fewer than the number of parallel + * queries to be run, or in running a data pipeline job, one fewer than the + * number of workers or compute instances available. + * + * Generated from protobuf field int64 partition_count = 3; + */ + protected $partition_count = 0; + /** + * The `next_page_token` value returned from a previous call to + * PartitionQuery that may be used to get an additional set of results. + * There are no ordering guarantees between sets of results. Thus, using + * multiple sets of results will require merging the different result sets. + * For example, two subsequent calls using a page_token may return: + * * cursor B, cursor M, cursor Q + * * cursor A, cursor U, cursor W + * To obtain a complete result set ordered with respect to the results of the + * query supplied to PartitionQuery, the results sets should be merged: + * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + /** + * The maximum number of partitions to return in this call, subject to + * `partition_count`. + * For example, if `partition_count` = 10 and `page_size` = 8, the first call + * to PartitionQuery will return up to 8 partitions and a `next_page_token` + * if more results exist. A second call to PartitionQuery will return up to + * 2 partitions, to complete the total of 10 specified in `partition_count`. + * + * Generated from protobuf field int32 page_size = 5; + */ + protected $page_size = 0; + protected $query_type; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents`. + * Document resource names are not supported; only database resource names + * can be specified. + * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query + * A structured query. + * Query must specify collection with all descendants and be ordered by name + * ascending. Other filters, order bys, limits, offsets, and start/end + * cursors are not supported. + * @type int|string $partition_count + * The desired maximum number of partition points. + * The partitions may be returned across multiple pages of results. + * The number must be positive. The actual number of partitions + * returned may be fewer. + * For example, this may be set to one fewer than the number of parallel + * queries to be run, or in running a data pipeline job, one fewer than the + * number of workers or compute instances available. + * @type string $page_token + * The `next_page_token` value returned from a previous call to + * PartitionQuery that may be used to get an additional set of results. + * There are no ordering guarantees between sets of results. Thus, using + * multiple sets of results will require merging the different result sets. + * For example, two subsequent calls using a page_token may return: + * * cursor B, cursor M, cursor Q + * * cursor A, cursor U, cursor W + * To obtain a complete result set ordered with respect to the results of the + * query supplied to PartitionQuery, the results sets should be merged: + * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W + * @type int $page_size + * The maximum number of partitions to return in this call, subject to + * `partition_count`. + * For example, if `partition_count` = 10 and `page_size` = 8, the first call + * to PartitionQuery will return up to 8 partitions and a `next_page_token` + * if more results exist. A second call to PartitionQuery will return up to + * 2 partitions, to complete the total of 10 specified in `partition_count`. + * @type \Google\Protobuf\Timestamp $read_time + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents`. + * Document resource names are not supported; only database resource names + * can be specified. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents`. + * Document resource names are not supported; only database resource names + * can be specified. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * A structured query. + * Query must specify collection with all descendants and be ordered by name + * ascending. Other filters, order bys, limits, offsets, and start/end + * cursors are not supported. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; + * @return \Google\Cloud\Firestore\V1\StructuredQuery|null + */ + public function getStructuredQuery() + { + return $this->readOneof(2); + } + + public function hasStructuredQuery() + { + return $this->hasOneof(2); + } + + /** + * A structured query. + * Query must specify collection with all descendants and be ordered by name + * ascending. Other filters, order bys, limits, offsets, and start/end + * cursors are not supported. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery $var + * @return $this + */ + public function setStructuredQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The desired maximum number of partition points. + * The partitions may be returned across multiple pages of results. + * The number must be positive. The actual number of partitions + * returned may be fewer. + * For example, this may be set to one fewer than the number of parallel + * queries to be run, or in running a data pipeline job, one fewer than the + * number of workers or compute instances available. + * + * Generated from protobuf field int64 partition_count = 3; + * @return int|string + */ + public function getPartitionCount() + { + return $this->partition_count; + } + + /** + * The desired maximum number of partition points. + * The partitions may be returned across multiple pages of results. + * The number must be positive. The actual number of partitions + * returned may be fewer. + * For example, this may be set to one fewer than the number of parallel + * queries to be run, or in running a data pipeline job, one fewer than the + * number of workers or compute instances available. + * + * Generated from protobuf field int64 partition_count = 3; + * @param int|string $var + * @return $this + */ + public function setPartitionCount($var) + { + GPBUtil::checkInt64($var); + $this->partition_count = $var; + + return $this; + } + + /** + * The `next_page_token` value returned from a previous call to + * PartitionQuery that may be used to get an additional set of results. + * There are no ordering guarantees between sets of results. Thus, using + * multiple sets of results will require merging the different result sets. + * For example, two subsequent calls using a page_token may return: + * * cursor B, cursor M, cursor Q + * * cursor A, cursor U, cursor W + * To obtain a complete result set ordered with respect to the results of the + * query supplied to PartitionQuery, the results sets should be merged: + * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The `next_page_token` value returned from a previous call to + * PartitionQuery that may be used to get an additional set of results. + * There are no ordering guarantees between sets of results. Thus, using + * multiple sets of results will require merging the different result sets. + * For example, two subsequent calls using a page_token may return: + * * cursor B, cursor M, cursor Q + * * cursor A, cursor U, cursor W + * To obtain a complete result set ordered with respect to the results of the + * query supplied to PartitionQuery, the results sets should be merged: + * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W + * + * Generated from protobuf field string page_token = 4; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The maximum number of partitions to return in this call, subject to + * `partition_count`. + * For example, if `partition_count` = 10 and `page_size` = 8, the first call + * to PartitionQuery will return up to 8 partitions and a `next_page_token` + * if more results exist. A second call to PartitionQuery will return up to + * 2 partitions, to complete the total of 10 specified in `partition_count`. + * + * Generated from protobuf field int32 page_size = 5; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of partitions to return in this call, subject to + * `partition_count`. + * For example, if `partition_count` = 10 and `page_size` = 8, the first call + * to PartitionQuery will return up to 8 partitions and a `next_page_token` + * if more results exist. A second call to PartitionQuery will return up to + * 2 partitions, to complete the total of 10 specified in `partition_count`. + * + * Generated from protobuf field int32 page_size = 5; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(6); + } + + public function hasReadTime() + { + return $this->hasOneof(6); + } + + /** + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getQueryType() + { + return $this->whichOneof("query_type"); + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php new file mode 100644 index 000000000000..4592a55de307 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php @@ -0,0 +1,162 @@ +google.firestore.v1.PartitionQueryResponse + */ +class PartitionQueryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Partition results. + * Each partition is a split point that can be used by RunQuery as a starting + * or end point for the query results. The RunQuery requests must be made with + * the same query supplied to this PartitionQuery request. The partition + * cursors will be ordered according to same ordering as the results of the + * query supplied to PartitionQuery. + * For example, if a PartitionQuery request returns partition cursors A and B, + * running the following three queries will return the entire result set of + * the original query: + * * query, end_at A + * * query, start_at A, end_at B + * * query, start_at B + * An empty result may indicate that the query has too few results to be + * partitioned, or that the query is not yet supported for partitioning. + * + * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; + */ + private $partitions; + /** + * A page token that may be used to request an additional set of results, up + * to the number specified by `partition_count` in the PartitionQuery request. + * If blank, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Cursor[] $partitions + * Partition results. + * Each partition is a split point that can be used by RunQuery as a starting + * or end point for the query results. The RunQuery requests must be made with + * the same query supplied to this PartitionQuery request. The partition + * cursors will be ordered according to same ordering as the results of the + * query supplied to PartitionQuery. + * For example, if a PartitionQuery request returns partition cursors A and B, + * running the following three queries will return the entire result set of + * the original query: + * * query, end_at A + * * query, start_at A, end_at B + * * query, start_at B + * An empty result may indicate that the query has too few results to be + * partitioned, or that the query is not yet supported for partitioning. + * @type string $next_page_token + * A page token that may be used to request an additional set of results, up + * to the number specified by `partition_count` in the PartitionQuery request. + * If blank, there are no more results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Partition results. + * Each partition is a split point that can be used by RunQuery as a starting + * or end point for the query results. The RunQuery requests must be made with + * the same query supplied to this PartitionQuery request. The partition + * cursors will be ordered according to same ordering as the results of the + * query supplied to PartitionQuery. + * For example, if a PartitionQuery request returns partition cursors A and B, + * running the following three queries will return the entire result set of + * the original query: + * * query, end_at A + * * query, start_at A, end_at B + * * query, start_at B + * An empty result may indicate that the query has too few results to be + * partitioned, or that the query is not yet supported for partitioning. + * + * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Cursor> + */ + public function getPartitions() + { + return $this->partitions; + } + + /** + * Partition results. + * Each partition is a split point that can be used by RunQuery as a starting + * or end point for the query results. The RunQuery requests must be made with + * the same query supplied to this PartitionQuery request. The partition + * cursors will be ordered according to same ordering as the results of the + * query supplied to PartitionQuery. + * For example, if a PartitionQuery request returns partition cursors A and B, + * running the following three queries will return the entire result set of + * the original query: + * * query, end_at A + * * query, start_at A, end_at B + * * query, start_at B + * An empty result may indicate that the query has too few results to be + * partitioned, or that the query is not yet supported for partitioning. + * + * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; + * @param \Google\Cloud\Firestore\V1\Cursor[] $var + * @return $this + */ + public function setPartitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Cursor::class); + $this->partitions = $arr; + + return $this; + } + + /** + * A page token that may be used to request an additional set of results, up + * to the number specified by `partition_count` in the PartitionQuery request. + * If blank, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A page token that may be used to request an additional set of results, up + * to the number specified by `partition_count` in the PartitionQuery request. + * If blank, there are no more results. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline.php new file mode 100644 index 000000000000..8d5c8afc6abc --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline.php @@ -0,0 +1,67 @@ +google.firestore.v1.Pipeline + */ +class Pipeline extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Ordered list of stages to evaluate. + * + * Generated from protobuf field repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $stages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Pipeline\Stage[] $stages + * Required. Ordered list of stages to evaluate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Required. Ordered list of stages to evaluate. + * + * Generated from protobuf field repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Pipeline\Stage> + */ + public function getStages() + { + return $this->stages; + } + + /** + * Required. Ordered list of stages to evaluate. + * + * Generated from protobuf field repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\V1\Pipeline\Stage[] $var + * @return $this + */ + public function setStages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Pipeline\Stage::class); + $this->stages = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline/Stage.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline/Stage.php new file mode 100644 index 000000000000..47a7f1e726f9 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline/Stage.php @@ -0,0 +1,157 @@ +google.firestore.v1.Pipeline.Stage + */ +class Stage extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the stage to evaluate. + * **Requires:** + * * must be in snake case (lower case with underscore separator). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. Ordered list of arguments the given stage expects. + * + * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $args; + /** + * Optional. Optional named arguments that certain functions may support. + * + * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $options; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the stage to evaluate. + * **Requires:** + * * must be in snake case (lower case with underscore separator). + * @type \Google\Cloud\Firestore\V1\Value[] $args + * Optional. Ordered list of arguments the given stage expects. + * @type array|\Google\Protobuf\Internal\MapField $options + * Optional. Optional named arguments that certain functions may support. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the stage to evaluate. + * **Requires:** + * * must be in snake case (lower case with underscore separator). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the stage to evaluate. + * **Requires:** + * * must be in snake case (lower case with underscore separator). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Ordered list of arguments the given stage expects. + * + * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> + */ + public function getArgs() + { + return $this->args; + } + + /** + * Optional. Ordered list of arguments the given stage expects. + * + * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\V1\Value[] $var + * @return $this + */ + public function setArgs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->args = $arr; + + return $this; + } + + /** + * Optional. Optional named arguments that certain functions may support. + * + * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getOptions() + { + return $this->options; + } + + /** + * Optional. Optional named arguments that certain functions may support. + * + * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setOptions($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->options = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PlanSummary.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PlanSummary.php new file mode 100644 index 000000000000..517cd29d648f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PlanSummary.php @@ -0,0 +1,83 @@ +google.firestore.v1.PlanSummary + */ +class PlanSummary extends \Google\Protobuf\Internal\Message +{ + /** + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + * + * Generated from protobuf field repeated .google.protobuf.Struct indexes_used = 1; + */ + private $indexes_used; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Struct[] $indexes_used + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); + parent::__construct($data); + } + + /** + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + * + * Generated from protobuf field repeated .google.protobuf.Struct indexes_used = 1; + * @return RepeatedField<\Google\Protobuf\Struct> + */ + public function getIndexesUsed() + { + return $this->indexes_used; + } + + /** + * The indexes selected for the query. For example: + * [ + * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + * ] + * + * Generated from protobuf field repeated .google.protobuf.Struct indexes_used = 1; + * @param \Google\Protobuf\Struct[] $var + * @return $this + */ + public function setIndexesUsed($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Struct::class); + $this->indexes_used = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php new file mode 100644 index 000000000000..a78e481b7ad5 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php @@ -0,0 +1,114 @@ +google.firestore.v1.Precondition + */ +class Precondition extends \Google\Protobuf\Internal\Message +{ + protected $condition_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $exists + * When set to `true`, the target document must exist. + * When set to `false`, the target document must not exist. + * @type \Google\Protobuf\Timestamp $update_time + * When set, the target document must exist and have been last updated at + * that time. Timestamp must be microsecond aligned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * When set to `true`, the target document must exist. + * When set to `false`, the target document must not exist. + * + * Generated from protobuf field bool exists = 1; + * @return bool + */ + public function getExists() + { + return $this->readOneof(1); + } + + public function hasExists() + { + return $this->hasOneof(1); + } + + /** + * When set to `true`, the target document must exist. + * When set to `false`, the target document must not exist. + * + * Generated from protobuf field bool exists = 1; + * @param bool $var + * @return $this + */ + public function setExists($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * When set, the target document must exist and have been last updated at + * that time. Timestamp must be microsecond aligned. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->readOneof(2); + } + + public function hasUpdateTime() + { + return $this->hasOneof(2); + } + + /** + * When set, the target document must exist and have been last updated at + * that time. Timestamp must be microsecond aligned. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getConditionType() + { + return $this->whichOneof("condition_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php new file mode 100644 index 000000000000..ab42c1a2a4c9 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php @@ -0,0 +1,121 @@ +google.firestore.v1.RollbackRequest + */ +class RollbackRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * Required. The transaction to roll back. + * + * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $transaction = ''; + + /** + * @param string $database Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @param string $transaction Required. The transaction to roll back. + * + * @return \Google\Cloud\Firestore\V1\RollbackRequest + * + * @experimental + */ + public static function build(string $database, string $transaction): self + { + return (new self()) + ->setDatabase($database) + ->setTransaction($transaction); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * @type string $transaction + * Required. The transaction to roll back. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * Required. The transaction to roll back. + * + * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * Required. The transaction to roll back. + * + * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php new file mode 100644 index 000000000000..723a1d0962f1 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php @@ -0,0 +1,304 @@ +google.firestore.v1.RunAggregationQueryRequest + */ +class RunAggregationQueryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + * + * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $explain_options = null; + protected $query_type; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery $structured_aggregation_query + * An aggregation query. + * @type string $transaction + * Run the aggregation within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction + * Starts a new transaction as part of the query, defaulting to read-only. + * The new transaction ID will be returned as the first response in the + * stream. + * @type \Google\Protobuf\Timestamp $read_time + * Executes the query at the given timestamp. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * @type \Google\Cloud\Firestore\V1\ExplainOptions $explain_options + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * An aggregation query. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery structured_aggregation_query = 2; + * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery|null + */ + public function getStructuredAggregationQuery() + { + return $this->readOneof(2); + } + + public function hasStructuredAggregationQuery() + { + return $this->hasOneof(2); + } + + /** + * An aggregation query. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery structured_aggregation_query = 2; + * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery $var + * @return $this + */ + public function setStructuredAggregationQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Run the aggregation within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * + * Generated from protobuf field bytes transaction = 4; + * @return string + */ + public function getTransaction() + { + return $this->readOneof(4); + } + + public function hasTransaction() + { + return $this->hasOneof(4); + } + + /** + * Run the aggregation within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * + * Generated from protobuf field bytes transaction = 4; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Starts a new transaction as part of the query, defaulting to read-only. + * The new transaction ID will be returned as the first response in the + * stream. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; + * @return \Google\Cloud\Firestore\V1\TransactionOptions|null + */ + public function getNewTransaction() + { + return $this->readOneof(5); + } + + public function hasNewTransaction() + { + return $this->hasOneof(5); + } + + /** + * Starts a new transaction as part of the query, defaulting to read-only. + * The new transaction ID will be returned as the first response in the + * stream. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; + * @param \Google\Cloud\Firestore\V1\TransactionOptions $var + * @return $this + */ + public function setNewTransaction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Executes the query at the given timestamp. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(6); + } + + public function hasReadTime() + { + return $this->hasOneof(6); + } + + /** + * Executes the query at the given timestamp. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + * + * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Firestore\V1\ExplainOptions|null + */ + public function getExplainOptions() + { + return $this->explain_options; + } + + public function hasExplainOptions() + { + return isset($this->explain_options); + } + + public function clearExplainOptions() + { + unset($this->explain_options); + } + + /** + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + * + * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\V1\ExplainOptions $var + * @return $this + */ + public function setExplainOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainOptions::class); + $this->explain_options = $var; + + return $this; + } + + /** + * @return string + */ + public function getQueryType() + { + return $this->whichOneof("query_type"); + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php new file mode 100644 index 000000000000..ace604bf5ecf --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php @@ -0,0 +1,244 @@ +google.firestore.v1.RunAggregationQueryResponse + */ +class RunAggregationQueryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A single aggregation result. + * Not present when reporting partial progress. + * + * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; + */ + protected $result = null; + /** + * The transaction that was started as part of this request. + * Only present on the first response when the request requested to start + * a new transaction. + * + * Generated from protobuf field bytes transaction = 2; + */ + protected $transaction = ''; + /** + * The time at which the aggregate result was computed. This is always + * monotonically increasing; in this case, the previous AggregationResult in + * the result stream are guaranteed not to have changed between their + * `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `result` will be sent, and this represents the time at which the query + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; + */ + protected $read_time = null; + /** + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + * + * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 10; + */ + protected $explain_metrics = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\AggregationResult $result + * A single aggregation result. + * Not present when reporting partial progress. + * @type string $transaction + * The transaction that was started as part of this request. + * Only present on the first response when the request requested to start + * a new transaction. + * @type \Google\Protobuf\Timestamp $read_time + * The time at which the aggregate result was computed. This is always + * monotonically increasing; in this case, the previous AggregationResult in + * the result stream are guaranteed not to have changed between their + * `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `result` will be sent, and this represents the time at which the query + * was run. + * @type \Google\Cloud\Firestore\V1\ExplainMetrics $explain_metrics + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * A single aggregation result. + * Not present when reporting partial progress. + * + * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; + * @return \Google\Cloud\Firestore\V1\AggregationResult|null + */ + public function getResult() + { + return $this->result; + } + + public function hasResult() + { + return isset($this->result); + } + + public function clearResult() + { + unset($this->result); + } + + /** + * A single aggregation result. + * Not present when reporting partial progress. + * + * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; + * @param \Google\Cloud\Firestore\V1\AggregationResult $var + * @return $this + */ + public function setResult($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\AggregationResult::class); + $this->result = $var; + + return $this; + } + + /** + * The transaction that was started as part of this request. + * Only present on the first response when the request requested to start + * a new transaction. + * + * Generated from protobuf field bytes transaction = 2; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * The transaction that was started as part of this request. + * Only present on the first response when the request requested to start + * a new transaction. + * + * Generated from protobuf field bytes transaction = 2; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + + /** + * The time at which the aggregate result was computed. This is always + * monotonically increasing; in this case, the previous AggregationResult in + * the result stream are guaranteed not to have changed between their + * `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `result` will be sent, and this represents the time at which the query + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * The time at which the aggregate result was computed. This is always + * monotonically increasing; in this case, the previous AggregationResult in + * the result stream are guaranteed not to have changed between their + * `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `result` will be sent, and this represents the time at which the query + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + * + * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 10; + * @return \Google\Cloud\Firestore\V1\ExplainMetrics|null + */ + public function getExplainMetrics() + { + return $this->explain_metrics; + } + + public function hasExplainMetrics() + { + return isset($this->explain_metrics); + } + + public function clearExplainMetrics() + { + unset($this->explain_metrics); + } + + /** + * Query explain metrics. This is only present when the + * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + * + * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 10; + * @param \Google\Cloud\Firestore\V1\ExplainMetrics $var + * @return $this + */ + public function setExplainMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainMetrics::class); + $this->explain_metrics = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php new file mode 100644 index 000000000000..91a9b297f86a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php @@ -0,0 +1,306 @@ +google.firestore.v1.RunQueryRequest + */ +class RunQueryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + * + * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $explain_options = null; + protected $query_type; + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query + * A structured query. + * @type string $transaction + * Run the query within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * @type \Google\Protobuf\Timestamp $read_time + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * @type \Google\Cloud\Firestore\V1\ExplainOptions $explain_options + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * A structured query. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; + * @return \Google\Cloud\Firestore\V1\StructuredQuery|null + */ + public function getStructuredQuery() + { + return $this->readOneof(2); + } + + public function hasStructuredQuery() + { + return $this->hasOneof(2); + } + + /** + * A structured query. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery $var + * @return $this + */ + public function setStructuredQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Run the query within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * + * Generated from protobuf field bytes transaction = 5; + * @return string + */ + public function getTransaction() + { + return $this->readOneof(5); + } + + public function hasTransaction() + { + return $this->hasOneof(5); + } + + /** + * Run the query within an already active transaction. + * The value here is the opaque transaction ID to execute the query in. + * + * Generated from protobuf field bytes transaction = 5; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; + * @return \Google\Cloud\Firestore\V1\TransactionOptions|null + */ + public function getNewTransaction() + { + return $this->readOneof(6); + } + + public function hasNewTransaction() + { + return $this->hasOneof(6); + } + + /** + * Starts a new transaction and reads the documents. + * Defaults to a read-only transaction. + * The new transaction ID will be returned as the first response in the + * stream. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; + * @param \Google\Cloud\Firestore\V1\TransactionOptions $var + * @return $this + */ + public function setNewTransaction($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(7); + } + + public function hasReadTime() + { + return $this->hasOneof(7); + } + + /** + * Reads documents as they were at the given time. + * This must be a microsecond precision timestamp within the past one hour, + * or if Point-in-Time Recovery is enabled, can additionally be a whole + * minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + * + * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Firestore\V1\ExplainOptions|null + */ + public function getExplainOptions() + { + return $this->explain_options; + } + + public function hasExplainOptions() + { + return isset($this->explain_options); + } + + public function clearExplainOptions() + { + unset($this->explain_options); + } + + /** + * Optional. Explain options for the query. If set, additional query + * statistics will be returned. If not, only query results will be returned. + * + * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\V1\ExplainOptions $var + * @return $this + */ + public function setExplainOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainOptions::class); + $this->explain_options = $var; + + return $this; + } + + /** + * @return string + */ + public function getQueryType() + { + return $this->whichOneof("query_type"); + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php new file mode 100644 index 000000000000..0ee820b70e32 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php @@ -0,0 +1,327 @@ +google.firestore.v1.RunQueryResponse + */ +class RunQueryResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The transaction that was started as part of this request. + * Can only be set in the first response, and only if + * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] + * was set in the request. If set, no other fields will be set in this + * response. + * + * Generated from protobuf field bytes transaction = 2; + */ + protected $transaction = ''; + /** + * A query result, not set when reporting partial progress. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1; + */ + protected $document = null; + /** + * The time at which the document was read. This may be monotonically + * increasing; in this case, the previous documents in the result stream are + * guaranteed not to have changed between their `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `document` will be sent, and this represents the time at which the query + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; + */ + protected $read_time = null; + /** + * The number of results that have been skipped due to an offset between + * the last response and the current response. + * + * Generated from protobuf field int32 skipped_results = 4; + */ + protected $skipped_results = 0; + /** + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + * + * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 11; + */ + protected $explain_metrics = null; + protected $continuation_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $transaction + * The transaction that was started as part of this request. + * Can only be set in the first response, and only if + * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] + * was set in the request. If set, no other fields will be set in this + * response. + * @type \Google\Cloud\Firestore\V1\Document $document + * A query result, not set when reporting partial progress. + * @type \Google\Protobuf\Timestamp $read_time + * The time at which the document was read. This may be monotonically + * increasing; in this case, the previous documents in the result stream are + * guaranteed not to have changed between their `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `document` will be sent, and this represents the time at which the query + * was run. + * @type int $skipped_results + * The number of results that have been skipped due to an offset between + * the last response and the current response. + * @type bool $done + * If present, Firestore has completely finished the request and no more + * documents will be returned. + * @type \Google\Cloud\Firestore\V1\ExplainMetrics $explain_metrics + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The transaction that was started as part of this request. + * Can only be set in the first response, and only if + * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] + * was set in the request. If set, no other fields will be set in this + * response. + * + * Generated from protobuf field bytes transaction = 2; + * @return string + */ + public function getTransaction() + { + return $this->transaction; + } + + /** + * The transaction that was started as part of this request. + * Can only be set in the first response, and only if + * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] + * was set in the request. If set, no other fields will be set in this + * response. + * + * Generated from protobuf field bytes transaction = 2; + * @param string $var + * @return $this + */ + public function setTransaction($var) + { + GPBUtil::checkString($var, False); + $this->transaction = $var; + + return $this; + } + + /** + * A query result, not set when reporting partial progress. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1; + * @return \Google\Cloud\Firestore\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * A query result, not set when reporting partial progress. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1; + * @param \Google\Cloud\Firestore\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * The time at which the document was read. This may be monotonically + * increasing; in this case, the previous documents in the result stream are + * guaranteed not to have changed between their `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `document` will be sent, and this represents the time at which the query + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * The time at which the document was read. This may be monotonically + * increasing; in this case, the previous documents in the result stream are + * guaranteed not to have changed between their `read_time` and this one. + * If the query returns no results, a response with `read_time` and no + * `document` will be sent, and this represents the time at which the query + * was run. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + + /** + * The number of results that have been skipped due to an offset between + * the last response and the current response. + * + * Generated from protobuf field int32 skipped_results = 4; + * @return int + */ + public function getSkippedResults() + { + return $this->skipped_results; + } + + /** + * The number of results that have been skipped due to an offset between + * the last response and the current response. + * + * Generated from protobuf field int32 skipped_results = 4; + * @param int $var + * @return $this + */ + public function setSkippedResults($var) + { + GPBUtil::checkInt32($var); + $this->skipped_results = $var; + + return $this; + } + + /** + * If present, Firestore has completely finished the request and no more + * documents will be returned. + * + * Generated from protobuf field bool done = 6; + * @return bool + */ + public function getDone() + { + return $this->readOneof(6); + } + + public function hasDone() + { + return $this->hasOneof(6); + } + + /** + * If present, Firestore has completely finished the request and no more + * documents will be returned. + * + * Generated from protobuf field bool done = 6; + * @param bool $var + * @return $this + */ + public function setDone($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + * + * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 11; + * @return \Google\Cloud\Firestore\V1\ExplainMetrics|null + */ + public function getExplainMetrics() + { + return $this->explain_metrics; + } + + public function hasExplainMetrics() + { + return isset($this->explain_metrics); + } + + public function clearExplainMetrics() + { + unset($this->explain_metrics); + } + + /** + * Query explain metrics. This is only present when the + * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] + * is provided, and it is sent only once with the last response in the stream. + * + * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 11; + * @param \Google\Cloud\Firestore\V1\ExplainMetrics $var + * @return $this + */ + public function setExplainMetrics($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainMetrics::class); + $this->explain_metrics = $var; + + return $this; + } + + /** + * @return string + */ + public function getContinuationSelector() + { + return $this->whichOneof("continuation_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php new file mode 100644 index 000000000000..38f437249c88 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php @@ -0,0 +1,122 @@ +google.firestore.v1.StructuredAggregationQuery + */ +class StructuredAggregationQuery extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Series of aggregations to apply over the results of the + * `structured_query`. + * Requires: + * * A minimum of one and maximum of five aggregations per query. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $aggregations; + protected $query_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query + * Nested structured query. + * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation[] $aggregations + * Optional. Series of aggregations to apply over the results of the + * `structured_query`. + * Requires: + * * A minimum of one and maximum of five aggregations per query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * Nested structured query. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 1; + * @return \Google\Cloud\Firestore\V1\StructuredQuery|null + */ + public function getStructuredQuery() + { + return $this->readOneof(1); + } + + public function hasStructuredQuery() + { + return $this->hasOneof(1); + } + + /** + * Nested structured query. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 1; + * @param \Google\Cloud\Firestore\V1\StructuredQuery $var + * @return $this + */ + public function setStructuredQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Optional. Series of aggregations to apply over the results of the + * `structured_query`. + * Requires: + * * A minimum of one and maximum of five aggregations per query. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation> + */ + public function getAggregations() + { + return $this->aggregations; + } + + /** + * Optional. Series of aggregations to apply over the results of the + * `structured_query`. + * Requires: + * * A minimum of one and maximum of five aggregations per query. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation[] $var + * @return $this + */ + public function setAggregations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation::class); + $this->aggregations = $arr; + + return $this; + } + + /** + * @return string + */ + public function getQueryType() + { + return $this->whichOneof("query_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php new file mode 100644 index 000000000000..04b2898c8e33 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php @@ -0,0 +1,287 @@ +google.firestore.v1.StructuredAggregationQuery.Aggregation + */ +class Aggregation extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Optional name of the field to store the result of the + * aggregation into. + * If not provided, Firestore will pick a default name following the format + * `field_`. For example: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2), + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT(*) + * OVER ( + * ... + * ); + * ``` + * becomes: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2) AS field_1, + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT(*) AS field_2 + * OVER ( + * ... + * ); + * ``` + * Requires: + * * Must be unique across all aggregation aliases. + * * Conform to [document field name][google.firestore.v1.Document.fields] + * limitations. + * + * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $alias = ''; + protected $operator; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count $count + * Count aggregator. + * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum $sum + * Sum aggregator. + * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg $avg + * Average aggregator. + * @type string $alias + * Optional. Optional name of the field to store the result of the + * aggregation into. + * If not provided, Firestore will pick a default name following the format + * `field_`. For example: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2), + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT(*) + * OVER ( + * ... + * ); + * ``` + * becomes: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2) AS field_1, + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT(*) AS field_2 + * OVER ( + * ... + * ); + * ``` + * Requires: + * * Must be unique across all aggregation aliases. + * * Conform to [document field name][google.firestore.v1.Document.fields] + * limitations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * Count aggregator. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1; + * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count|null + */ + public function getCount() + { + return $this->readOneof(1); + } + + public function hasCount() + { + return $this->hasOneof(1); + } + + /** + * Count aggregator. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1; + * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Sum aggregator. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2; + * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum|null + */ + public function getSum() + { + return $this->readOneof(2); + } + + public function hasSum() + { + return $this->hasOneof(2); + } + + /** + * Sum aggregator. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2; + * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum $var + * @return $this + */ + public function setSum($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Average aggregator. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3; + * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg|null + */ + public function getAvg() + { + return $this->readOneof(3); + } + + public function hasAvg() + { + return $this->hasOneof(3); + } + + /** + * Average aggregator. + * + * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3; + * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg $var + * @return $this + */ + public function setAvg($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Optional. Optional name of the field to store the result of the + * aggregation into. + * If not provided, Firestore will pick a default name following the format + * `field_`. For example: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2), + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT(*) + * OVER ( + * ... + * ); + * ``` + * becomes: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2) AS field_1, + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT(*) AS field_2 + * OVER ( + * ... + * ); + * ``` + * Requires: + * * Must be unique across all aggregation aliases. + * * Conform to [document field name][google.firestore.v1.Document.fields] + * limitations. + * + * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAlias() + { + return $this->alias; + } + + /** + * Optional. Optional name of the field to store the result of the + * aggregation into. + * If not provided, Firestore will pick a default name following the format + * `field_`. For example: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2), + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT(*) + * OVER ( + * ... + * ); + * ``` + * becomes: + * ``` + * AGGREGATE + * COUNT_UP_TO(1) AS count_up_to_1, + * COUNT_UP_TO(2) AS field_1, + * COUNT_UP_TO(3) AS count_up_to_3, + * COUNT(*) AS field_2 + * OVER ( + * ... + * ); + * ``` + * Requires: + * * Must be unique across all aggregation aliases. + * * Conform to [document field name][google.firestore.v1.Document.fields] + * limitations. + * + * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAlias($var) + { + GPBUtil::checkString($var, True); + $this->alias = $var; + + return $this; + } + + /** + * @return string + */ + public function getOperator() + { + return $this->whichOneof("operator"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Avg.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Avg.php new file mode 100644 index 000000000000..7c58f19ceb45 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Avg.php @@ -0,0 +1,83 @@ +google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg + */ +class Avg extends \Google\Protobuf\Internal\Message +{ + /** + * The field to aggregate on. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + protected $field = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field + * The field to aggregate on. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The field to aggregate on. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null + */ + public function getField() + { + return $this->field; + } + + public function hasField() + { + return isset($this->field); + } + + public function clearField() + { + unset($this->field); + } + + /** + * The field to aggregate on. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); + $this->field = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php new file mode 100644 index 000000000000..5202b92cc409 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php @@ -0,0 +1,166 @@ +google.firestore.v1.StructuredAggregationQuery.Aggregation.Count + */ +class Count extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Optional constraint on the maximum number of documents to + * count. + * This provides a way to set an upper bound on the number of documents + * to scan, limiting latency, and cost. + * Unspecified is interpreted as no bound. + * High-Level Example: + * ``` + * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + * ``` + * Requires: + * * Must be greater than zero when present. + * + * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $up_to = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Int64Value $up_to + * Optional. Optional constraint on the maximum number of documents to + * count. + * This provides a way to set an upper bound on the number of documents + * to scan, limiting latency, and cost. + * Unspecified is interpreted as no bound. + * High-Level Example: + * ``` + * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + * ``` + * Requires: + * * Must be greater than zero when present. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Optional constraint on the maximum number of documents to + * count. + * This provides a way to set an upper bound on the number of documents + * to scan, limiting latency, and cost. + * Unspecified is interpreted as no bound. + * High-Level Example: + * ``` + * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + * ``` + * Requires: + * * Must be greater than zero when present. + * + * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int64Value|null + */ + public function getUpTo() + { + return $this->up_to; + } + + public function hasUpTo() + { + return isset($this->up_to); + } + + public function clearUpTo() + { + unset($this->up_to); + } + + /** + * Returns the unboxed value from getUpTo() + + * Optional. Optional constraint on the maximum number of documents to + * count. + * This provides a way to set an upper bound on the number of documents + * to scan, limiting latency, and cost. + * Unspecified is interpreted as no bound. + * High-Level Example: + * ``` + * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + * ``` + * Requires: + * * Must be greater than zero when present. + * + * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string|null + */ + public function getUpToUnwrapped() + { + return $this->readWrapperValue("up_to"); + } + + /** + * Optional. Optional constraint on the maximum number of documents to + * count. + * This provides a way to set an upper bound on the number of documents + * to scan, limiting latency, and cost. + * Unspecified is interpreted as no bound. + * High-Level Example: + * ``` + * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + * ``` + * Requires: + * * Must be greater than zero when present. + * + * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int64Value $var + * @return $this + */ + public function setUpTo($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); + $this->up_to = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. + + * Optional. Optional constraint on the maximum number of documents to + * count. + * This provides a way to set an upper bound on the number of documents + * to scan, limiting latency, and cost. + * Unspecified is interpreted as no bound. + * High-Level Example: + * ``` + * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + * ``` + * Requires: + * * Must be greater than zero when present. + * + * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string|null $var + * @return $this + */ + public function setUpToUnwrapped($var) + { + $this->writeWrapperValue("up_to", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Sum.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Sum.php new file mode 100644 index 000000000000..5e6f0ef1b0ce --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Sum.php @@ -0,0 +1,92 @@ +google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum + */ +class Sum extends \Google\Protobuf\Internal\Message +{ + /** + * The field to aggregate on. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + protected $field = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field + * The field to aggregate on. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The field to aggregate on. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null + */ + public function getField() + { + return $this->field; + } + + public function hasField() + { + return isset($this->field); + } + + public function clearField() + { + unset($this->field); + } + + /** + * The field to aggregate on. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); + $this->field = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredPipeline.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredPipeline.php new file mode 100644 index 000000000000..91fb0cfa1f68 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredPipeline.php @@ -0,0 +1,114 @@ +google.firestore.v1.StructuredPipeline + */ +class StructuredPipeline extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The pipeline query to execute. + * + * Generated from protobuf field .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $pipeline = null; + /** + * Optional. Optional query-level arguments. + * + * Generated from protobuf field map options = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $options; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Pipeline $pipeline + * Required. The pipeline query to execute. + * @type array|\Google\Protobuf\Internal\MapField $options + * Optional. Optional query-level arguments. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Pipeline::initOnce(); + parent::__construct($data); + } + + /** + * Required. The pipeline query to execute. + * + * Generated from protobuf field .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\V1\Pipeline|null + */ + public function getPipeline() + { + return $this->pipeline; + } + + public function hasPipeline() + { + return isset($this->pipeline); + } + + public function clearPipeline() + { + unset($this->pipeline); + } + + /** + * Required. The pipeline query to execute. + * + * Generated from protobuf field .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\V1\Pipeline $var + * @return $this + */ + public function setPipeline($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Pipeline::class); + $this->pipeline = $var; + + return $this; + } + + /** + * Optional. Optional query-level arguments. + * + * Generated from protobuf field map options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getOptions() + { + return $this->options; + } + + /** + * Optional. Optional query-level arguments. + * + * Generated from protobuf field map options = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setOptions($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->options = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php new file mode 100644 index 000000000000..7ec21ccd6c9d --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php @@ -0,0 +1,652 @@ +google.firestore.v1.StructuredQuery + */ +class StructuredQuery extends \Google\Protobuf\Internal\Message +{ + /** + * Optional sub-set of the fields to return. + * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the + * documents returned from a query. When not set, assumes that the caller + * wants all fields returned. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; + */ + protected $select = null; + /** + * The collections to query. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; + */ + private $from; + /** + * The filter to apply. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; + */ + protected $where = null; + /** + * The order to apply to the query results. + * Firestore allows callers to provide a full ordering, a partial ordering, or + * no ordering at all. In all cases, Firestore guarantees a stable ordering + * through the following rules: + * * The `order_by` is required to reference all fields used with an + * inequality filter. + * * All fields that are required to be in the `order_by` but are not already + * present are appended in lexicographical ordering of the field name. + * * If an order on `__name__` is not specified, it is appended by default. + * Fields are appended with the same sort direction as the last order + * specified, or 'ASCENDING' if no order was specified. For example: + * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` + * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` + * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` + * * `WHERE __name__ > ... AND a > 1` becomes + * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; + */ + private $order_by; + /** + * A potential prefix of a position in the result set to start the query at. + * The ordering of the result set is based on the `ORDER BY` clause of the + * original query. + * ``` + * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; + * ``` + * This query's results are ordered by `(b ASC, __name__ ASC)`. + * Cursors can reference either the full ordering or a prefix of the location, + * though it cannot reference more fields than what are in the provided + * `ORDER BY`. + * Continuing off the example above, attaching the following start cursors + * will have varying impact: + * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND + * b > 2 AND __name__ > /k/123`. + * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. + * Unlike `OFFSET` which requires scanning over the first N results to skip, + * a start cursor allows the query to begin at a logical position. This + * position is not required to match an actual result, it will scan forward + * from this position to find the next document. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * + * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; + */ + protected $start_at = null; + /** + * A potential prefix of a position in the result set to end the query at. + * This is similar to `START_AT` but with it controlling the end position + * rather than the start position. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * + * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; + */ + protected $end_at = null; + /** + * The number of documents to skip before returning the first result. + * This applies after the constraints specified by the `WHERE`, `START AT`, & + * `END AT` but before the `LIMIT` clause. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field int32 offset = 6; + */ + protected $offset = 0; + /** + * The maximum number of results to return. + * Applies after all other constraints. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 5; + */ + protected $limit = null; + /** + * Optional. A potential nearest neighbors search. + * Applies after all other filters and ordering. + * Finds the closest vector embeddings to the given query vector. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest find_nearest = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $find_nearest = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\Projection $select + * Optional sub-set of the fields to return. + * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the + * documents returned from a query. When not set, assumes that the caller + * wants all fields returned. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector[] $from + * The collections to query. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\Filter $where + * The filter to apply. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\Order[] $order_by + * The order to apply to the query results. + * Firestore allows callers to provide a full ordering, a partial ordering, or + * no ordering at all. In all cases, Firestore guarantees a stable ordering + * through the following rules: + * * The `order_by` is required to reference all fields used with an + * inequality filter. + * * All fields that are required to be in the `order_by` but are not already + * present are appended in lexicographical ordering of the field name. + * * If an order on `__name__` is not specified, it is appended by default. + * Fields are appended with the same sort direction as the last order + * specified, or 'ASCENDING' if no order was specified. For example: + * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` + * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` + * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` + * * `WHERE __name__ > ... AND a > 1` becomes + * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` + * @type \Google\Cloud\Firestore\V1\Cursor $start_at + * A potential prefix of a position in the result set to start the query at. + * The ordering of the result set is based on the `ORDER BY` clause of the + * original query. + * ``` + * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; + * ``` + * This query's results are ordered by `(b ASC, __name__ ASC)`. + * Cursors can reference either the full ordering or a prefix of the location, + * though it cannot reference more fields than what are in the provided + * `ORDER BY`. + * Continuing off the example above, attaching the following start cursors + * will have varying impact: + * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND + * b > 2 AND __name__ > /k/123`. + * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. + * Unlike `OFFSET` which requires scanning over the first N results to skip, + * a start cursor allows the query to begin at a logical position. This + * position is not required to match an actual result, it will scan forward + * from this position to find the next document. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * @type \Google\Cloud\Firestore\V1\Cursor $end_at + * A potential prefix of a position in the result set to end the query at. + * This is similar to `START_AT` but with it controlling the end position + * rather than the start position. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * @type int $offset + * The number of documents to skip before returning the first result. + * This applies after the constraints specified by the `WHERE`, `START AT`, & + * `END AT` but before the `LIMIT` clause. + * Requires: + * * The value must be greater than or equal to zero if specified. + * @type \Google\Protobuf\Int32Value $limit + * The maximum number of results to return. + * Applies after all other constraints. + * Requires: + * * The value must be greater than or equal to zero if specified. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest $find_nearest + * Optional. A potential nearest neighbors search. + * Applies after all other filters and ordering. + * Finds the closest vector embeddings to the given query vector. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * Optional sub-set of the fields to return. + * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the + * documents returned from a query. When not set, assumes that the caller + * wants all fields returned. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\Projection|null + */ + public function getSelect() + { + return $this->select; + } + + public function hasSelect() + { + return isset($this->select); + } + + public function clearSelect() + { + unset($this->select); + } + + /** + * Optional sub-set of the fields to return. + * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the + * documents returned from a query. When not set, assumes that the caller + * wants all fields returned. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\Projection $var + * @return $this + */ + public function setSelect($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\Projection::class); + $this->select = $var; + + return $this; + } + + /** + * The collections to query. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; + * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector> + */ + public function getFrom() + { + return $this->from; + } + + /** + * The collections to query. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector[] $var + * @return $this + */ + public function setFrom($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector::class); + $this->from = $arr; + + return $this; + } + + /** + * The filter to apply. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\Filter|null + */ + public function getWhere() + { + return $this->where; + } + + public function hasWhere() + { + return isset($this->where); + } + + public function clearWhere() + { + unset($this->where); + } + + /** + * The filter to apply. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\Filter $var + * @return $this + */ + public function setWhere($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\Filter::class); + $this->where = $var; + + return $this; + } + + /** + * The order to apply to the query results. + * Firestore allows callers to provide a full ordering, a partial ordering, or + * no ordering at all. In all cases, Firestore guarantees a stable ordering + * through the following rules: + * * The `order_by` is required to reference all fields used with an + * inequality filter. + * * All fields that are required to be in the `order_by` but are not already + * present are appended in lexicographical ordering of the field name. + * * If an order on `__name__` is not specified, it is appended by default. + * Fields are appended with the same sort direction as the last order + * specified, or 'ASCENDING' if no order was specified. For example: + * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` + * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` + * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` + * * `WHERE __name__ > ... AND a > 1` becomes + * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; + * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredQuery\Order> + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * The order to apply to the query results. + * Firestore allows callers to provide a full ordering, a partial ordering, or + * no ordering at all. In all cases, Firestore guarantees a stable ordering + * through the following rules: + * * The `order_by` is required to reference all fields used with an + * inequality filter. + * * All fields that are required to be in the `order_by` but are not already + * present are appended in lexicographical ordering of the field name. + * * If an order on `__name__` is not specified, it is appended by default. + * Fields are appended with the same sort direction as the last order + * specified, or 'ASCENDING' if no order was specified. For example: + * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` + * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` + * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` + * * `WHERE __name__ > ... AND a > 1` becomes + * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\Order[] $var + * @return $this + */ + public function setOrderBy($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\Order::class); + $this->order_by = $arr; + + return $this; + } + + /** + * A potential prefix of a position in the result set to start the query at. + * The ordering of the result set is based on the `ORDER BY` clause of the + * original query. + * ``` + * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; + * ``` + * This query's results are ordered by `(b ASC, __name__ ASC)`. + * Cursors can reference either the full ordering or a prefix of the location, + * though it cannot reference more fields than what are in the provided + * `ORDER BY`. + * Continuing off the example above, attaching the following start cursors + * will have varying impact: + * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND + * b > 2 AND __name__ > /k/123`. + * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. + * Unlike `OFFSET` which requires scanning over the first N results to skip, + * a start cursor allows the query to begin at a logical position. This + * position is not required to match an actual result, it will scan forward + * from this position to find the next document. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * + * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; + * @return \Google\Cloud\Firestore\V1\Cursor|null + */ + public function getStartAt() + { + return $this->start_at; + } + + public function hasStartAt() + { + return isset($this->start_at); + } + + public function clearStartAt() + { + unset($this->start_at); + } + + /** + * A potential prefix of a position in the result set to start the query at. + * The ordering of the result set is based on the `ORDER BY` clause of the + * original query. + * ``` + * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; + * ``` + * This query's results are ordered by `(b ASC, __name__ ASC)`. + * Cursors can reference either the full ordering or a prefix of the location, + * though it cannot reference more fields than what are in the provided + * `ORDER BY`. + * Continuing off the example above, attaching the following start cursors + * will have varying impact: + * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND + * b > 2 AND __name__ > /k/123`. + * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. + * Unlike `OFFSET` which requires scanning over the first N results to skip, + * a start cursor allows the query to begin at a logical position. This + * position is not required to match an actual result, it will scan forward + * from this position to find the next document. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * + * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; + * @param \Google\Cloud\Firestore\V1\Cursor $var + * @return $this + */ + public function setStartAt($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Cursor::class); + $this->start_at = $var; + + return $this; + } + + /** + * A potential prefix of a position in the result set to end the query at. + * This is similar to `START_AT` but with it controlling the end position + * rather than the start position. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * + * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; + * @return \Google\Cloud\Firestore\V1\Cursor|null + */ + public function getEndAt() + { + return $this->end_at; + } + + public function hasEndAt() + { + return isset($this->end_at); + } + + public function clearEndAt() + { + unset($this->end_at); + } + + /** + * A potential prefix of a position in the result set to end the query at. + * This is similar to `START_AT` but with it controlling the end position + * rather than the start position. + * Requires: + * * The number of values cannot be greater than the number of fields + * specified in the `ORDER BY` clause. + * + * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; + * @param \Google\Cloud\Firestore\V1\Cursor $var + * @return $this + */ + public function setEndAt($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Cursor::class); + $this->end_at = $var; + + return $this; + } + + /** + * The number of documents to skip before returning the first result. + * This applies after the constraints specified by the `WHERE`, `START AT`, & + * `END AT` but before the `LIMIT` clause. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field int32 offset = 6; + * @return int + */ + public function getOffset() + { + return $this->offset; + } + + /** + * The number of documents to skip before returning the first result. + * This applies after the constraints specified by the `WHERE`, `START AT`, & + * `END AT` but before the `LIMIT` clause. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field int32 offset = 6; + * @param int $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkInt32($var); + $this->offset = $var; + + return $this; + } + + /** + * The maximum number of results to return. + * Applies after all other constraints. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 5; + * @return \Google\Protobuf\Int32Value|null + */ + public function getLimit() + { + return $this->limit; + } + + public function hasLimit() + { + return isset($this->limit); + } + + public function clearLimit() + { + unset($this->limit); + } + + /** + * Returns the unboxed value from getLimit() + + * The maximum number of results to return. + * Applies after all other constraints. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 5; + * @return int|null + */ + public function getLimitUnwrapped() + { + return $this->readWrapperValue("limit"); + } + + /** + * The maximum number of results to return. + * Applies after all other constraints. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 5; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setLimit($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->limit = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * The maximum number of results to return. + * Applies after all other constraints. + * Requires: + * * The value must be greater than or equal to zero if specified. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 5; + * @param int|null $var + * @return $this + */ + public function setLimitUnwrapped($var) + { + $this->writeWrapperValue("limit", $var); + return $this;} + + /** + * Optional. A potential nearest neighbors search. + * Applies after all other filters and ordering. + * Finds the closest vector embeddings to the given query vector. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest find_nearest = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest|null + */ + public function getFindNearest() + { + return $this->find_nearest; + } + + public function hasFindNearest() + { + return isset($this->find_nearest); + } + + public function clearFindNearest() + { + unset($this->find_nearest); + } + + /** + * Optional. A potential nearest neighbors search. + * Applies after all other filters and ordering. + * Finds the closest vector embeddings to the given query vector. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest find_nearest = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest $var + * @return $this + */ + public function setFindNearest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest::class); + $this->find_nearest = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php new file mode 100644 index 000000000000..cf990906266f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php @@ -0,0 +1,113 @@ +google.firestore.v1.StructuredQuery.CollectionSelector + */ +class CollectionSelector extends \Google\Protobuf\Internal\Message +{ + /** + * The collection ID. + * When set, selects only collections with this ID. + * + * Generated from protobuf field string collection_id = 2; + */ + protected $collection_id = ''; + /** + * When false, selects only collections that are immediate children of + * the `parent` specified in the containing `RunQueryRequest`. + * When true, selects all descendant collections. + * + * Generated from protobuf field bool all_descendants = 3; + */ + protected $all_descendants = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $collection_id + * The collection ID. + * When set, selects only collections with this ID. + * @type bool $all_descendants + * When false, selects only collections that are immediate children of + * the `parent` specified in the containing `RunQueryRequest`. + * When true, selects all descendant collections. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The collection ID. + * When set, selects only collections with this ID. + * + * Generated from protobuf field string collection_id = 2; + * @return string + */ + public function getCollectionId() + { + return $this->collection_id; + } + + /** + * The collection ID. + * When set, selects only collections with this ID. + * + * Generated from protobuf field string collection_id = 2; + * @param string $var + * @return $this + */ + public function setCollectionId($var) + { + GPBUtil::checkString($var, True); + $this->collection_id = $var; + + return $this; + } + + /** + * When false, selects only collections that are immediate children of + * the `parent` specified in the containing `RunQueryRequest`. + * When true, selects all descendant collections. + * + * Generated from protobuf field bool all_descendants = 3; + * @return bool + */ + public function getAllDescendants() + { + return $this->all_descendants; + } + + /** + * When false, selects only collections that are immediate children of + * the `parent` specified in the containing `RunQueryRequest`. + * When true, selects all descendant collections. + * + * Generated from protobuf field bool all_descendants = 3; + * @param bool $var + * @return $this + */ + public function setAllDescendants($var) + { + GPBUtil::checkBool($var); + $this->all_descendants = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php new file mode 100644 index 000000000000..5a006c7a4ddd --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php @@ -0,0 +1,109 @@ +google.firestore.v1.StructuredQuery.CompositeFilter + */ +class CompositeFilter extends \Google\Protobuf\Internal\Message +{ + /** + * The operator for combining multiple filters. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; + */ + protected $op = 0; + /** + * The list of filters to combine. + * Requires: + * * At least one filter is present. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; + */ + private $filters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $op + * The operator for combining multiple filters. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\Filter[] $filters + * The list of filters to combine. + * Requires: + * * At least one filter is present. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The operator for combining multiple filters. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; + * @return int + */ + public function getOp() + { + return $this->op; + } + + /** + * The operator for combining multiple filters. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; + * @param int $var + * @return $this + */ + public function setOp($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter\Operator::class); + $this->op = $var; + + return $this; + } + + /** + * The list of filters to combine. + * Requires: + * * At least one filter is present. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; + * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredQuery\Filter> + */ + public function getFilters() + { + return $this->filters; + } + + /** + * The list of filters to combine. + * Requires: + * * At least one filter is present. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\Filter[] $var + * @return $this + */ + public function setFilters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\Filter::class); + $this->filters = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php new file mode 100644 index 000000000000..ae6554be217b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php @@ -0,0 +1,65 @@ +google.firestore.v1.StructuredQuery.CompositeFilter.Operator + */ +class Operator +{ + /** + * Unspecified. This value must not be used. + * + * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; + */ + const OPERATOR_UNSPECIFIED = 0; + /** + * Documents are required to satisfy all of the combined filters. + * + * Generated from protobuf enum AND = 1; + */ + const PBAND = 1; + /** + * Documents are required to satisfy at least one of the combined filters. + * + * Generated from protobuf enum OR = 2; + */ + const PBOR = 2; + + private static $valueToName = [ + self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', + self::PBAND => 'AND', + self::PBOR => 'OR', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php new file mode 100644 index 000000000000..0c598d813733 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php @@ -0,0 +1,61 @@ +google.firestore.v1.StructuredQuery.Direction + */ +class Direction +{ + /** + * Unspecified. + * + * Generated from protobuf enum DIRECTION_UNSPECIFIED = 0; + */ + const DIRECTION_UNSPECIFIED = 0; + /** + * Ascending. + * + * Generated from protobuf enum ASCENDING = 1; + */ + const ASCENDING = 1; + /** + * Descending. + * + * Generated from protobuf enum DESCENDING = 2; + */ + const DESCENDING = 2; + + private static $valueToName = [ + self::DIRECTION_UNSPECIFIED => 'DIRECTION_UNSPECIFIED', + self::ASCENDING => 'ASCENDING', + self::DESCENDING => 'DESCENDING', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php new file mode 100644 index 000000000000..07005156b426 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php @@ -0,0 +1,155 @@ +google.firestore.v1.StructuredQuery.FieldFilter + */ +class FieldFilter extends \Google\Protobuf\Internal\Message +{ + /** + * The field to filter by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + protected $field = null; + /** + * The operator to filter by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; + */ + protected $op = 0; + /** + * The value to compare to. + * + * Generated from protobuf field .google.firestore.v1.Value value = 3; + */ + protected $value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field + * The field to filter by. + * @type int $op + * The operator to filter by. + * @type \Google\Cloud\Firestore\V1\Value $value + * The value to compare to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The field to filter by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null + */ + public function getField() + { + return $this->field; + } + + public function hasField() + { + return isset($this->field); + } + + public function clearField() + { + unset($this->field); + } + + /** + * The field to filter by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); + $this->field = $var; + + return $this; + } + + /** + * The operator to filter by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; + * @return int + */ + public function getOp() + { + return $this->op; + } + + /** + * The operator to filter by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; + * @param int $var + * @return $this + */ + public function setOp($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter\Operator::class); + $this->op = $var; + + return $this; + } + + /** + * The value to compare to. + * + * Generated from protobuf field .google.firestore.v1.Value value = 3; + * @return \Google\Cloud\Firestore\V1\Value|null + */ + public function getValue() + { + return $this->value; + } + + public function hasValue() + { + return isset($this->value); + } + + public function clearValue() + { + unset($this->value); + } + + /** + * The value to compare to. + * + * Generated from protobuf field .google.firestore.v1.Value value = 3; + * @param \Google\Cloud\Firestore\V1\Value $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php new file mode 100644 index 000000000000..23eae118d8f1 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php @@ -0,0 +1,143 @@ +google.firestore.v1.StructuredQuery.FieldFilter.Operator + */ +class Operator +{ + /** + * Unspecified. This value must not be used. + * + * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; + */ + const OPERATOR_UNSPECIFIED = 0; + /** + * The given `field` is less than the given `value`. + * Requires: + * * That `field` come first in `order_by`. + * + * Generated from protobuf enum LESS_THAN = 1; + */ + const LESS_THAN = 1; + /** + * The given `field` is less than or equal to the given `value`. + * Requires: + * * That `field` come first in `order_by`. + * + * Generated from protobuf enum LESS_THAN_OR_EQUAL = 2; + */ + const LESS_THAN_OR_EQUAL = 2; + /** + * The given `field` is greater than the given `value`. + * Requires: + * * That `field` come first in `order_by`. + * + * Generated from protobuf enum GREATER_THAN = 3; + */ + const GREATER_THAN = 3; + /** + * The given `field` is greater than or equal to the given `value`. + * Requires: + * * That `field` come first in `order_by`. + * + * Generated from protobuf enum GREATER_THAN_OR_EQUAL = 4; + */ + const GREATER_THAN_OR_EQUAL = 4; + /** + * The given `field` is equal to the given `value`. + * + * Generated from protobuf enum EQUAL = 5; + */ + const EQUAL = 5; + /** + * The given `field` is not equal to the given `value`. + * Requires: + * * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. + * * That `field` comes first in the `order_by`. + * + * Generated from protobuf enum NOT_EQUAL = 6; + */ + const NOT_EQUAL = 6; + /** + * The given `field` is an array that contains the given `value`. + * + * Generated from protobuf enum ARRAY_CONTAINS = 7; + */ + const ARRAY_CONTAINS = 7; + /** + * The given `field` is equal to at least one value in the given array. + * Requires: + * * That `value` is a non-empty `ArrayValue`, subject to disjunction + * limits. + * * No `NOT_IN` filters in the same query. + * + * Generated from protobuf enum IN = 8; + */ + const IN = 8; + /** + * The given `field` is an array that contains any of the values in the + * given array. + * Requires: + * * That `value` is a non-empty `ArrayValue`, subject to disjunction + * limits. + * * No other `ARRAY_CONTAINS_ANY` filters within the same disjunction. + * * No `NOT_IN` filters in the same query. + * + * Generated from protobuf enum ARRAY_CONTAINS_ANY = 9; + */ + const ARRAY_CONTAINS_ANY = 9; + /** + * The value of the `field` is not in the given array. + * Requires: + * * That `value` is a non-empty `ArrayValue` with at most 10 values. + * * No other `OR`, `IN`, `ARRAY_CONTAINS_ANY`, `NOT_IN`, `NOT_EQUAL`, + * `IS_NOT_NULL`, or `IS_NOT_NAN`. + * * That `field` comes first in the `order_by`. + * + * Generated from protobuf enum NOT_IN = 10; + */ + const NOT_IN = 10; + + private static $valueToName = [ + self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', + self::LESS_THAN => 'LESS_THAN', + self::LESS_THAN_OR_EQUAL => 'LESS_THAN_OR_EQUAL', + self::GREATER_THAN => 'GREATER_THAN', + self::GREATER_THAN_OR_EQUAL => 'GREATER_THAN_OR_EQUAL', + self::EQUAL => 'EQUAL', + self::NOT_EQUAL => 'NOT_EQUAL', + self::ARRAY_CONTAINS => 'ARRAY_CONTAINS', + self::IN => 'IN', + self::ARRAY_CONTAINS_ANY => 'ARRAY_CONTAINS_ANY', + self::NOT_IN => 'NOT_IN', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php new file mode 100644 index 000000000000..0b53587c59b6 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php @@ -0,0 +1,83 @@ +google.firestore.v1.StructuredQuery.FieldReference + */ +class FieldReference extends \Google\Protobuf\Internal\Message +{ + /** + * A reference to a field in a document. + * Requires: + * * MUST be a dot-delimited (`.`) string of segments, where each segment + * conforms to [document field name][google.firestore.v1.Document.fields] + * limitations. + * + * Generated from protobuf field string field_path = 2; + */ + protected $field_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field_path + * A reference to a field in a document. + * Requires: + * * MUST be a dot-delimited (`.`) string of segments, where each segment + * conforms to [document field name][google.firestore.v1.Document.fields] + * limitations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * A reference to a field in a document. + * Requires: + * * MUST be a dot-delimited (`.`) string of segments, where each segment + * conforms to [document field name][google.firestore.v1.Document.fields] + * limitations. + * + * Generated from protobuf field string field_path = 2; + * @return string + */ + public function getFieldPath() + { + return $this->field_path; + } + + /** + * A reference to a field in a document. + * Requires: + * * MUST be a dot-delimited (`.`) string of segments, where each segment + * conforms to [document field name][google.firestore.v1.Document.fields] + * limitations. + * + * Generated from protobuf field string field_path = 2; + * @param string $var + * @return $this + */ + public function setFieldPath($var) + { + GPBUtil::checkString($var, True); + $this->field_path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php new file mode 100644 index 000000000000..3a0beed1562c --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php @@ -0,0 +1,141 @@ +google.firestore.v1.StructuredQuery.Filter + */ +class Filter extends \Google\Protobuf\Internal\Message +{ + protected $filter_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter $composite_filter + * A composite filter. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter $field_filter + * A filter on a document field. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter $unary_filter + * A filter that takes exactly one argument. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * A composite filter. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter|null + */ + public function getCompositeFilter() + { + return $this->readOneof(1); + } + + public function hasCompositeFilter() + { + return $this->hasOneof(1); + } + + /** + * A composite filter. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter $var + * @return $this + */ + public function setCompositeFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A filter on a document field. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter|null + */ + public function getFieldFilter() + { + return $this->readOneof(2); + } + + public function hasFieldFilter() + { + return $this->hasOneof(2); + } + + /** + * A filter on a document field. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter $var + * @return $this + */ + public function setFieldFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A filter that takes exactly one argument. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter|null + */ + public function getUnaryFilter() + { + return $this->readOneof(3); + } + + public function hasUnaryFilter() + { + return $this->hasOneof(3); + } + + /** + * A filter that takes exactly one argument. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter $var + * @return $this + */ + public function setUnaryFilter($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getFilterType() + { + return $this->whichOneof("filter_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest.php new file mode 100644 index 000000000000..b9f2d3f526a9 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest.php @@ -0,0 +1,396 @@ +google.firestore.v1.StructuredQuery.FindNearest + */ +class FindNearest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. An indexed vector field to search upon. Only documents which + * contain vectors whose dimensionality match the query_vector can be + * returned. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference vector_field = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $vector_field = null; + /** + * Required. The query vector that we are searching on. Must be a vector of + * no more than 2048 dimensions. + * + * Generated from protobuf field .google.firestore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query_vector = null; + /** + * Required. The distance measure to use, required. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $distance_measure = 0; + /** + * Required. The number of nearest neighbors to return. Must be a positive + * integer of no more than 1000. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $limit = null; + /** + * Optional. Optional name of the field to output the result of the vector + * distance calculation. Must conform to [document field + * name][google.firestore.v1.Document.fields] limitations. + * + * Generated from protobuf field string distance_result_field = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $distance_result_field = ''; + /** + * Optional. Option to specify a threshold for which no less similar + * documents will be returned. The behavior of the specified + * `distance_measure` will affect the meaning of the distance threshold. + * Since DOT_PRODUCT distances increase when the vectors are more similar, + * the comparison is inverted. + * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` + * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` + * + * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $distance_threshold = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $vector_field + * Required. An indexed vector field to search upon. Only documents which + * contain vectors whose dimensionality match the query_vector can be + * returned. + * @type \Google\Cloud\Firestore\V1\Value $query_vector + * Required. The query vector that we are searching on. Must be a vector of + * no more than 2048 dimensions. + * @type int $distance_measure + * Required. The distance measure to use, required. + * @type \Google\Protobuf\Int32Value $limit + * Required. The number of nearest neighbors to return. Must be a positive + * integer of no more than 1000. + * @type string $distance_result_field + * Optional. Optional name of the field to output the result of the vector + * distance calculation. Must conform to [document field + * name][google.firestore.v1.Document.fields] limitations. + * @type \Google\Protobuf\DoubleValue $distance_threshold + * Optional. Option to specify a threshold for which no less similar + * documents will be returned. The behavior of the specified + * `distance_measure` will affect the meaning of the distance threshold. + * Since DOT_PRODUCT distances increase when the vectors are more similar, + * the comparison is inverted. + * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` + * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * Required. An indexed vector field to search upon. Only documents which + * contain vectors whose dimensionality match the query_vector can be + * returned. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference vector_field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null + */ + public function getVectorField() + { + return $this->vector_field; + } + + public function hasVectorField() + { + return isset($this->vector_field); + } + + public function clearVectorField() + { + unset($this->vector_field); + } + + /** + * Required. An indexed vector field to search upon. Only documents which + * contain vectors whose dimensionality match the query_vector can be + * returned. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference vector_field = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var + * @return $this + */ + public function setVectorField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); + $this->vector_field = $var; + + return $this; + } + + /** + * Required. The query vector that we are searching on. Must be a vector of + * no more than 2048 dimensions. + * + * Generated from protobuf field .google.firestore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\V1\Value|null + */ + public function getQueryVector() + { + return $this->query_vector; + } + + public function hasQueryVector() + { + return isset($this->query_vector); + } + + public function clearQueryVector() + { + unset($this->query_vector); + } + + /** + * Required. The query vector that we are searching on. Must be a vector of + * no more than 2048 dimensions. + * + * Generated from protobuf field .google.firestore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\V1\Value $var + * @return $this + */ + public function setQueryVector($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); + $this->query_vector = $var; + + return $this; + } + + /** + * Required. The distance measure to use, required. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getDistanceMeasure() + { + return $this->distance_measure; + } + + /** + * Required. The distance measure to use, required. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setDistanceMeasure($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest\DistanceMeasure::class); + $this->distance_measure = $var; + + return $this; + } + + /** + * Required. The number of nearest neighbors to return. Must be a positive + * integer of no more than 1000. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Protobuf\Int32Value|null + */ + public function getLimit() + { + return $this->limit; + } + + public function hasLimit() + { + return isset($this->limit); + } + + public function clearLimit() + { + unset($this->limit); + } + + /** + * Returns the unboxed value from getLimit() + + * Required. The number of nearest neighbors to return. Must be a positive + * integer of no more than 1000. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int|null + */ + public function getLimitUnwrapped() + { + return $this->readWrapperValue("limit"); + } + + /** + * Required. The number of nearest neighbors to return. Must be a positive + * integer of no more than 1000. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setLimit($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->limit = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Required. The number of nearest neighbors to return. Must be a positive + * integer of no more than 1000. + * + * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int|null $var + * @return $this + */ + public function setLimitUnwrapped($var) + { + $this->writeWrapperValue("limit", $var); + return $this;} + + /** + * Optional. Optional name of the field to output the result of the vector + * distance calculation. Must conform to [document field + * name][google.firestore.v1.Document.fields] limitations. + * + * Generated from protobuf field string distance_result_field = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDistanceResultField() + { + return $this->distance_result_field; + } + + /** + * Optional. Optional name of the field to output the result of the vector + * distance calculation. Must conform to [document field + * name][google.firestore.v1.Document.fields] limitations. + * + * Generated from protobuf field string distance_result_field = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDistanceResultField($var) + { + GPBUtil::checkString($var, True); + $this->distance_result_field = $var; + + return $this; + } + + /** + * Optional. Option to specify a threshold for which no less similar + * documents will be returned. The behavior of the specified + * `distance_measure` will affect the meaning of the distance threshold. + * Since DOT_PRODUCT distances increase when the vectors are more similar, + * the comparison is inverted. + * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` + * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` + * + * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\DoubleValue|null + */ + public function getDistanceThreshold() + { + return $this->distance_threshold; + } + + public function hasDistanceThreshold() + { + return isset($this->distance_threshold); + } + + public function clearDistanceThreshold() + { + unset($this->distance_threshold); + } + + /** + * Returns the unboxed value from getDistanceThreshold() + + * Optional. Option to specify a threshold for which no less similar + * documents will be returned. The behavior of the specified + * `distance_measure` will affect the meaning of the distance threshold. + * Since DOT_PRODUCT distances increase when the vectors are more similar, + * the comparison is inverted. + * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` + * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` + * + * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return float|null + */ + public function getDistanceThresholdUnwrapped() + { + return $this->readWrapperValue("distance_threshold"); + } + + /** + * Optional. Option to specify a threshold for which no less similar + * documents will be returned. The behavior of the specified + * `distance_measure` will affect the meaning of the distance threshold. + * Since DOT_PRODUCT distances increase when the vectors are more similar, + * the comparison is inverted. + * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` + * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` + * + * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\DoubleValue $var + * @return $this + */ + public function setDistanceThreshold($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); + $this->distance_threshold = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. + + * Optional. Option to specify a threshold for which no less similar + * documents will be returned. The behavior of the specified + * `distance_measure` will affect the meaning of the distance threshold. + * Since DOT_PRODUCT distances increase when the vectors are more similar, + * the comparison is inverted. + * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` + * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` + * + * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param float|null $var + * @return $this + */ + public function setDistanceThresholdUnwrapped($var) + { + $this->writeWrapperValue("distance_threshold", $var); + return $this;} + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest/DistanceMeasure.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest/DistanceMeasure.php new file mode 100644 index 000000000000..27f0c9d19df1 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest/DistanceMeasure.php @@ -0,0 +1,80 @@ +google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure + */ +class DistanceMeasure +{ + /** + * Should not be set. + * + * Generated from protobuf enum DISTANCE_MEASURE_UNSPECIFIED = 0; + */ + const DISTANCE_MEASURE_UNSPECIFIED = 0; + /** + * Measures the EUCLIDEAN distance between the vectors. See + * [Euclidean](https://en.wikipedia.org/wiki/Euclidean_distance) to learn + * more. The resulting distance decreases the more similar two vectors + * are. + * + * Generated from protobuf enum EUCLIDEAN = 1; + */ + const EUCLIDEAN = 1; + /** + * COSINE distance compares vectors based on the angle between them, which + * allows you to measure similarity that isn't based on the vectors + * magnitude. We recommend using DOT_PRODUCT with unit normalized vectors + * instead of COSINE distance, which is mathematically equivalent with + * better performance. See [Cosine + * Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to learn + * more about COSINE similarity and COSINE distance. The resulting + * COSINE distance decreases the more similar two vectors are. + * + * Generated from protobuf enum COSINE = 2; + */ + const COSINE = 2; + /** + * Similar to cosine but is affected by the magnitude of the vectors. See + * [Dot Product](https://en.wikipedia.org/wiki/Dot_product) to learn more. + * The resulting distance increases the more similar two vectors are. + * + * Generated from protobuf enum DOT_PRODUCT = 3; + */ + const DOT_PRODUCT = 3; + + private static $valueToName = [ + self::DISTANCE_MEASURE_UNSPECIFIED => 'DISTANCE_MEASURE_UNSPECIFIED', + self::EUCLIDEAN => 'EUCLIDEAN', + self::COSINE => 'COSINE', + self::DOT_PRODUCT => 'DOT_PRODUCT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php new file mode 100644 index 000000000000..398914ff2a88 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php @@ -0,0 +1,111 @@ +google.firestore.v1.StructuredQuery.Order + */ +class Order extends \Google\Protobuf\Internal\Message +{ + /** + * The field to order by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + */ + protected $field = null; + /** + * The direction to order by. Defaults to `ASCENDING`. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; + */ + protected $direction = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field + * The field to order by. + * @type int $direction + * The direction to order by. Defaults to `ASCENDING`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The field to order by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null + */ + public function getField() + { + return $this->field; + } + + public function hasField() + { + return isset($this->field); + } + + public function clearField() + { + unset($this->field); + } + + /** + * The field to order by. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); + $this->field = $var; + + return $this; + } + + /** + * The direction to order by. Defaults to `ASCENDING`. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; + * @return int + */ + public function getDirection() + { + return $this->direction; + } + + /** + * The direction to order by. Defaults to `ASCENDING`. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; + * @param int $var + * @return $this + */ + public function setDirection($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\Direction::class); + $this->direction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php new file mode 100644 index 000000000000..07788a015d64 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php @@ -0,0 +1,75 @@ +google.firestore.v1.StructuredQuery.Projection + */ +class Projection extends \Google\Protobuf\Internal\Message +{ + /** + * The fields to return. + * If empty, all fields are returned. To only return the name + * of the document, use `['__name__']`. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + */ + private $fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference[] $fields + * The fields to return. + * If empty, all fields are returned. To only return the name + * of the document, use `['__name__']`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The fields to return. + * If empty, all fields are returned. To only return the name + * of the document, use `['__name__']`. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredQuery\FieldReference> + */ + public function getFields() + { + return $this->fields; + } + + /** + * The fields to return. + * If empty, all fields are returned. To only return the name + * of the document, use `['__name__']`. + * + * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference[] $var + * @return $this + */ + public function setFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); + $this->fields = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php new file mode 100644 index 000000000000..e7cffcd5e3c6 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php @@ -0,0 +1,109 @@ +google.firestore.v1.StructuredQuery.UnaryFilter + */ +class UnaryFilter extends \Google\Protobuf\Internal\Message +{ + /** + * The unary operator to apply. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; + */ + protected $op = 0; + protected $operand_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $op + * The unary operator to apply. + * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field + * The field to which to apply the operator. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Query::initOnce(); + parent::__construct($data); + } + + /** + * The unary operator to apply. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; + * @return int + */ + public function getOp() + { + return $this->op; + } + + /** + * The unary operator to apply. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; + * @param int $var + * @return $this + */ + public function setOp($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter\Operator::class); + $this->op = $var; + + return $this; + } + + /** + * The field to which to apply the operator. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 2; + * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null + */ + public function getField() + { + return $this->readOneof(2); + } + + public function hasField() + { + return $this->hasOneof(2); + } + + /** + * The field to which to apply the operator. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getOperandType() + { + return $this->whichOneof("operand_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php new file mode 100644 index 000000000000..4c991e2fd636 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php @@ -0,0 +1,81 @@ +google.firestore.v1.StructuredQuery.UnaryFilter.Operator + */ +class Operator +{ + /** + * Unspecified. This value must not be used. + * + * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; + */ + const OPERATOR_UNSPECIFIED = 0; + /** + * The given `field` is equal to `NaN`. + * + * Generated from protobuf enum IS_NAN = 2; + */ + const IS_NAN = 2; + /** + * The given `field` is equal to `NULL`. + * + * Generated from protobuf enum IS_NULL = 3; + */ + const IS_NULL = 3; + /** + * The given `field` is not equal to `NaN`. + * Requires: + * * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. + * * That `field` comes first in the `order_by`. + * + * Generated from protobuf enum IS_NOT_NAN = 4; + */ + const IS_NOT_NAN = 4; + /** + * The given `field` is not equal to `NULL`. + * Requires: + * * A single `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. + * * That `field` comes first in the `order_by`. + * + * Generated from protobuf enum IS_NOT_NULL = 5; + */ + const IS_NOT_NULL = 5; + + private static $valueToName = [ + self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', + self::IS_NAN => 'IS_NAN', + self::IS_NULL => 'IS_NULL', + self::IS_NOT_NAN => 'IS_NOT_NAN', + self::IS_NOT_NULL => 'IS_NOT_NULL', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php new file mode 100644 index 000000000000..187794cd9a71 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php @@ -0,0 +1,407 @@ +google.firestore.v1.Target + */ +class Target extends \Google\Protobuf\Internal\Message +{ + /** + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. + * If `target_id` is 0 (or unspecified), the server will assign an ID for this + * target and return that in a `TargetChange::ADD` event. Once a target with + * `target_id=0` is added, all subsequent targets must also have + * `target_id=0`. If an `AddTarget` request with `target_id != 0` is + * sent to the server after a target with `target_id=0` is added, the server + * will immediately send a response with a `TargetChange::Remove` event. + * Note that if the client sends multiple `AddTarget` requests + * without an ID, the order of IDs returned in `TargetChange.target_ids` are + * undefined. Therefore, clients should provide a target ID instead of relying + * on the server to assign one. + * If `target_id` is non-zero, there must not be an existing active target on + * this stream with the same ID. + * + * Generated from protobuf field int32 target_id = 5; + */ + protected $target_id = 0; + /** + * If the target should be removed once it is current and consistent. + * + * Generated from protobuf field bool once = 6; + */ + protected $once = false; + /** + * The number of documents that last matched the query at the resume token or + * read time. + * This value is only relevant when a `resume_type` is provided. This value + * being present and greater than zero signals that the client wants + * `ExistenceFilter.unchanged_names` to be included in the response. + * + * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; + */ + protected $expected_count = null; + protected $target_type; + protected $resume_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Target\QueryTarget $query + * A target specified by a query. + * @type \Google\Cloud\Firestore\V1\Target\DocumentsTarget $documents + * A target specified by a set of document names. + * @type string $resume_token + * A resume token from a prior + * [TargetChange][google.firestore.v1.TargetChange] for an identical target. + * Using a resume token with a different target is unsupported and may fail. + * @type \Google\Protobuf\Timestamp $read_time + * Start listening after a specific `read_time`. + * The client must know the state of matching documents at this time. + * @type int $target_id + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. + * If `target_id` is 0 (or unspecified), the server will assign an ID for this + * target and return that in a `TargetChange::ADD` event. Once a target with + * `target_id=0` is added, all subsequent targets must also have + * `target_id=0`. If an `AddTarget` request with `target_id != 0` is + * sent to the server after a target with `target_id=0` is added, the server + * will immediately send a response with a `TargetChange::Remove` event. + * Note that if the client sends multiple `AddTarget` requests + * without an ID, the order of IDs returned in `TargetChange.target_ids` are + * undefined. Therefore, clients should provide a target ID instead of relying + * on the server to assign one. + * If `target_id` is non-zero, there must not be an existing active target on + * this stream with the same ID. + * @type bool $once + * If the target should be removed once it is current and consistent. + * @type \Google\Protobuf\Int32Value $expected_count + * The number of documents that last matched the query at the resume token or + * read time. + * This value is only relevant when a `resume_type` is provided. This value + * being present and greater than zero signals that the client wants + * `ExistenceFilter.unchanged_names` to be included in the response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * A target specified by a query. + * + * Generated from protobuf field .google.firestore.v1.Target.QueryTarget query = 2; + * @return \Google\Cloud\Firestore\V1\Target\QueryTarget|null + */ + public function getQuery() + { + return $this->readOneof(2); + } + + public function hasQuery() + { + return $this->hasOneof(2); + } + + /** + * A target specified by a query. + * + * Generated from protobuf field .google.firestore.v1.Target.QueryTarget query = 2; + * @param \Google\Cloud\Firestore\V1\Target\QueryTarget $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target\QueryTarget::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A target specified by a set of document names. + * + * Generated from protobuf field .google.firestore.v1.Target.DocumentsTarget documents = 3; + * @return \Google\Cloud\Firestore\V1\Target\DocumentsTarget|null + */ + public function getDocuments() + { + return $this->readOneof(3); + } + + public function hasDocuments() + { + return $this->hasOneof(3); + } + + /** + * A target specified by a set of document names. + * + * Generated from protobuf field .google.firestore.v1.Target.DocumentsTarget documents = 3; + * @param \Google\Cloud\Firestore\V1\Target\DocumentsTarget $var + * @return $this + */ + public function setDocuments($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target\DocumentsTarget::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A resume token from a prior + * [TargetChange][google.firestore.v1.TargetChange] for an identical target. + * Using a resume token with a different target is unsupported and may fail. + * + * Generated from protobuf field bytes resume_token = 4; + * @return string + */ + public function getResumeToken() + { + return $this->readOneof(4); + } + + public function hasResumeToken() + { + return $this->hasOneof(4); + } + + /** + * A resume token from a prior + * [TargetChange][google.firestore.v1.TargetChange] for an identical target. + * Using a resume token with a different target is unsupported and may fail. + * + * Generated from protobuf field bytes resume_token = 4; + * @param string $var + * @return $this + */ + public function setResumeToken($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Start listening after a specific `read_time`. + * The client must know the state of matching documents at this time. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 11; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(11); + } + + public function hasReadTime() + { + return $this->hasOneof(11); + } + + /** + * Start listening after a specific `read_time`. + * The client must know the state of matching documents at this time. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 11; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. + * If `target_id` is 0 (or unspecified), the server will assign an ID for this + * target and return that in a `TargetChange::ADD` event. Once a target with + * `target_id=0` is added, all subsequent targets must also have + * `target_id=0`. If an `AddTarget` request with `target_id != 0` is + * sent to the server after a target with `target_id=0` is added, the server + * will immediately send a response with a `TargetChange::Remove` event. + * Note that if the client sends multiple `AddTarget` requests + * without an ID, the order of IDs returned in `TargetChange.target_ids` are + * undefined. Therefore, clients should provide a target ID instead of relying + * on the server to assign one. + * If `target_id` is non-zero, there must not be an existing active target on + * this stream with the same ID. + * + * Generated from protobuf field int32 target_id = 5; + * @return int + */ + public function getTargetId() + { + return $this->target_id; + } + + /** + * The target ID that identifies the target on the stream. Must be a positive + * number and non-zero. + * If `target_id` is 0 (or unspecified), the server will assign an ID for this + * target and return that in a `TargetChange::ADD` event. Once a target with + * `target_id=0` is added, all subsequent targets must also have + * `target_id=0`. If an `AddTarget` request with `target_id != 0` is + * sent to the server after a target with `target_id=0` is added, the server + * will immediately send a response with a `TargetChange::Remove` event. + * Note that if the client sends multiple `AddTarget` requests + * without an ID, the order of IDs returned in `TargetChange.target_ids` are + * undefined. Therefore, clients should provide a target ID instead of relying + * on the server to assign one. + * If `target_id` is non-zero, there must not be an existing active target on + * this stream with the same ID. + * + * Generated from protobuf field int32 target_id = 5; + * @param int $var + * @return $this + */ + public function setTargetId($var) + { + GPBUtil::checkInt32($var); + $this->target_id = $var; + + return $this; + } + + /** + * If the target should be removed once it is current and consistent. + * + * Generated from protobuf field bool once = 6; + * @return bool + */ + public function getOnce() + { + return $this->once; + } + + /** + * If the target should be removed once it is current and consistent. + * + * Generated from protobuf field bool once = 6; + * @param bool $var + * @return $this + */ + public function setOnce($var) + { + GPBUtil::checkBool($var); + $this->once = $var; + + return $this; + } + + /** + * The number of documents that last matched the query at the resume token or + * read time. + * This value is only relevant when a `resume_type` is provided. This value + * being present and greater than zero signals that the client wants + * `ExistenceFilter.unchanged_names` to be included in the response. + * + * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; + * @return \Google\Protobuf\Int32Value|null + */ + public function getExpectedCount() + { + return $this->expected_count; + } + + public function hasExpectedCount() + { + return isset($this->expected_count); + } + + public function clearExpectedCount() + { + unset($this->expected_count); + } + + /** + * Returns the unboxed value from getExpectedCount() + + * The number of documents that last matched the query at the resume token or + * read time. + * This value is only relevant when a `resume_type` is provided. This value + * being present and greater than zero signals that the client wants + * `ExistenceFilter.unchanged_names` to be included in the response. + * + * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; + * @return int|null + */ + public function getExpectedCountUnwrapped() + { + return $this->readWrapperValue("expected_count"); + } + + /** + * The number of documents that last matched the query at the resume token or + * read time. + * This value is only relevant when a `resume_type` is provided. This value + * being present and greater than zero signals that the client wants + * `ExistenceFilter.unchanged_names` to be included in the response. + * + * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setExpectedCount($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->expected_count = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * The number of documents that last matched the query at the resume token or + * read time. + * This value is only relevant when a `resume_type` is provided. This value + * being present and greater than zero signals that the client wants + * `ExistenceFilter.unchanged_names` to be included in the response. + * + * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; + * @param int|null $var + * @return $this + */ + public function setExpectedCountUnwrapped($var) + { + $this->writeWrapperValue("expected_count", $var); + return $this;} + + /** + * @return string + */ + public function getTargetType() + { + return $this->whichOneof("target_type"); + } + + /** + * @return string + */ + public function getResumeType() + { + return $this->whichOneof("resume_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php new file mode 100644 index 000000000000..b4cab2dfd941 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php @@ -0,0 +1,79 @@ +google.firestore.v1.Target.DocumentsTarget + */ +class DocumentsTarget extends \Google\Protobuf\Internal\Message +{ + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of + * the given `database`. Duplicate names will be elided. + * + * Generated from protobuf field repeated string documents = 2; + */ + private $documents; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $documents + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of + * the given `database`. Duplicate names will be elided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of + * the given `database`. Duplicate names will be elided. + * + * Generated from protobuf field repeated string documents = 2; + * @return RepeatedField + */ + public function getDocuments() + { + return $this->documents; + } + + /** + * The names of the documents to retrieve. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * The request will fail if any of the document is not a child resource of + * the given `database`. Duplicate names will be elided. + * + * Generated from protobuf field repeated string documents = 2; + * @param string[] $var + * @return $this + */ + public function setDocuments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->documents = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php new file mode 100644 index 000000000000..94ccd8393aa9 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php @@ -0,0 +1,129 @@ +google.firestore.v1.Target.QueryTarget + */ +class QueryTarget extends \Google\Protobuf\Internal\Message +{ + /** + * The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1; + */ + protected $parent = ''; + protected $query_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query + * A structured query. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The parent resource name. In the format: + * `projects/{project_id}/databases/{database_id}/documents` or + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * For example: + * `projects/my-project/databases/my-database/documents` or + * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + * + * Generated from protobuf field string parent = 1; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * A structured query. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; + * @return \Google\Cloud\Firestore\V1\StructuredQuery|null + */ + public function getStructuredQuery() + { + return $this->readOneof(2); + } + + public function hasStructuredQuery() + { + return $this->hasOneof(2); + } + + /** + * A structured query. + * + * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; + * @param \Google\Cloud\Firestore\V1\StructuredQuery $var + * @return $this + */ + public function setStructuredQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getQueryType() + { + return $this->whichOneof("query_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php new file mode 100644 index 000000000000..a47a27e138bd --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php @@ -0,0 +1,267 @@ +google.firestore.v1.TargetChange + */ +class TargetChange extends \Google\Protobuf\Internal\Message +{ + /** + * The type of change that occurred. + * + * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; + */ + protected $target_change_type = 0; + /** + * The target IDs of targets that have changed. + * If empty, the change applies to all targets. + * The order of the target IDs is not defined. + * + * Generated from protobuf field repeated int32 target_ids = 2; + */ + private $target_ids; + /** + * The error that resulted in this change, if applicable. + * + * Generated from protobuf field .google.rpc.Status cause = 3; + */ + protected $cause = null; + /** + * A token that can be used to resume the stream for the given `target_ids`, + * or all targets if `target_ids` is empty. + * Not set on every target change. + * + * Generated from protobuf field bytes resume_token = 4; + */ + protected $resume_token = ''; + /** + * The consistent `read_time` for the given `target_ids` (omitted when the + * target_ids are not at a consistent snapshot). + * The stream is guaranteed to send a `read_time` with `target_ids` empty + * whenever the entire stream reaches a new consistent snapshot. ADD, + * CURRENT, and RESET messages are guaranteed to (eventually) result in a + * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). + * For a given stream, `read_time` is guaranteed to be monotonically + * increasing. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + */ + protected $read_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $target_change_type + * The type of change that occurred. + * @type int[] $target_ids + * The target IDs of targets that have changed. + * If empty, the change applies to all targets. + * The order of the target IDs is not defined. + * @type \Google\Rpc\Status $cause + * The error that resulted in this change, if applicable. + * @type string $resume_token + * A token that can be used to resume the stream for the given `target_ids`, + * or all targets if `target_ids` is empty. + * Not set on every target change. + * @type \Google\Protobuf\Timestamp $read_time + * The consistent `read_time` for the given `target_ids` (omitted when the + * target_ids are not at a consistent snapshot). + * The stream is guaranteed to send a `read_time` with `target_ids` empty + * whenever the entire stream reaches a new consistent snapshot. ADD, + * CURRENT, and RESET messages are guaranteed to (eventually) result in a + * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). + * For a given stream, `read_time` is guaranteed to be monotonically + * increasing. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The type of change that occurred. + * + * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; + * @return int + */ + public function getTargetChangeType() + { + return $this->target_change_type; + } + + /** + * The type of change that occurred. + * + * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; + * @param int $var + * @return $this + */ + public function setTargetChangeType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\TargetChange\TargetChangeType::class); + $this->target_change_type = $var; + + return $this; + } + + /** + * The target IDs of targets that have changed. + * If empty, the change applies to all targets. + * The order of the target IDs is not defined. + * + * Generated from protobuf field repeated int32 target_ids = 2; + * @return RepeatedField + */ + public function getTargetIds() + { + return $this->target_ids; + } + + /** + * The target IDs of targets that have changed. + * If empty, the change applies to all targets. + * The order of the target IDs is not defined. + * + * Generated from protobuf field repeated int32 target_ids = 2; + * @param int[] $var + * @return $this + */ + public function setTargetIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); + $this->target_ids = $arr; + + return $this; + } + + /** + * The error that resulted in this change, if applicable. + * + * Generated from protobuf field .google.rpc.Status cause = 3; + * @return \Google\Rpc\Status|null + */ + public function getCause() + { + return $this->cause; + } + + public function hasCause() + { + return isset($this->cause); + } + + public function clearCause() + { + unset($this->cause); + } + + /** + * The error that resulted in this change, if applicable. + * + * Generated from protobuf field .google.rpc.Status cause = 3; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setCause($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->cause = $var; + + return $this; + } + + /** + * A token that can be used to resume the stream for the given `target_ids`, + * or all targets if `target_ids` is empty. + * Not set on every target change. + * + * Generated from protobuf field bytes resume_token = 4; + * @return string + */ + public function getResumeToken() + { + return $this->resume_token; + } + + /** + * A token that can be used to resume the stream for the given `target_ids`, + * or all targets if `target_ids` is empty. + * Not set on every target change. + * + * Generated from protobuf field bytes resume_token = 4; + * @param string $var + * @return $this + */ + public function setResumeToken($var) + { + GPBUtil::checkString($var, False); + $this->resume_token = $var; + + return $this; + } + + /** + * The consistent `read_time` for the given `target_ids` (omitted when the + * target_ids are not at a consistent snapshot). + * The stream is guaranteed to send a `read_time` with `target_ids` empty + * whenever the entire stream reaches a new consistent snapshot. ADD, + * CURRENT, and RESET messages are guaranteed to (eventually) result in a + * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). + * For a given stream, `read_time` is guaranteed to be monotonically + * increasing. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->read_time; + } + + public function hasReadTime() + { + return isset($this->read_time); + } + + public function clearReadTime() + { + unset($this->read_time); + } + + /** + * The consistent `read_time` for the given `target_ids` (omitted when the + * target_ids are not at a consistent snapshot). + * The stream is guaranteed to send a `read_time` with `target_ids` empty + * whenever the entire stream reaches a new consistent snapshot. ADD, + * CURRENT, and RESET messages are guaranteed to (eventually) result in a + * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). + * For a given stream, `read_time` is guaranteed to be monotonically + * increasing. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->read_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php new file mode 100644 index 000000000000..0971283f5a47 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php @@ -0,0 +1,83 @@ +google.firestore.v1.TargetChange.TargetChangeType + */ +class TargetChangeType +{ + /** + * No change has occurred. Used only to send an updated `resume_token`. + * + * Generated from protobuf enum NO_CHANGE = 0; + */ + const NO_CHANGE = 0; + /** + * The targets have been added. + * + * Generated from protobuf enum ADD = 1; + */ + const ADD = 1; + /** + * The targets have been removed. + * + * Generated from protobuf enum REMOVE = 2; + */ + const REMOVE = 2; + /** + * The targets reflect all changes committed before the targets were added + * to the stream. + * This will be sent after or with a `read_time` that is greater than or + * equal to the time at which the targets were added. + * Listeners can wait for this change if read-after-write semantics + * are desired. + * + * Generated from protobuf enum CURRENT = 3; + */ + const CURRENT = 3; + /** + * The targets have been reset, and a new initial state for the targets + * will be returned in subsequent changes. + * After the initial state is complete, `CURRENT` will be returned even + * if the target was previously indicated to be `CURRENT`. + * + * Generated from protobuf enum RESET = 4; + */ + const RESET = 4; + + private static $valueToName = [ + self::NO_CHANGE => 'NO_CHANGE', + self::ADD => 'ADD', + self::REMOVE => 'REMOVE', + self::CURRENT => 'CURRENT', + self::RESET => 'RESET', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php new file mode 100644 index 000000000000..d35fb47e9cdb --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php @@ -0,0 +1,108 @@ +google.firestore.v1.TransactionOptions + */ +class TransactionOptions extends \Google\Protobuf\Internal\Message +{ + protected $mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly $read_only + * The transaction can only be used for read operations. + * @type \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite $read_write + * The transaction can be used for both read and write operations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * The transaction can only be used for read operations. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; + * @return \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly|null + */ + public function getReadOnly() + { + return $this->readOneof(2); + } + + public function hasReadOnly() + { + return $this->hasOneof(2); + } + + /** + * The transaction can only be used for read operations. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; + * @param \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly $var + * @return $this + */ + public function setReadOnly($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The transaction can be used for both read and write operations. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; + * @return \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite|null + */ + public function getReadWrite() + { + return $this->readOneof(3); + } + + public function hasReadWrite() + { + return $this->hasOneof(3); + } + + /** + * The transaction can be used for both read and write operations. + * + * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; + * @param \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite $var + * @return $this + */ + public function setReadWrite($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getMode() + { + return $this->whichOneof("mode"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php new file mode 100644 index 000000000000..dde09490ca47 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php @@ -0,0 +1,84 @@ +google.firestore.v1.TransactionOptions.ReadOnly + */ +class PBReadOnly extends \Google\Protobuf\Internal\Message +{ + protected $consistency_selector; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $read_time + * Reads documents at the given time. + * This must be a microsecond precision timestamp within the past one + * hour, or if Point-in-Time Recovery is enabled, can additionally be a + * whole minute timestamp within the past 7 days. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Reads documents at the given time. + * This must be a microsecond precision timestamp within the past one + * hour, or if Point-in-Time Recovery is enabled, can additionally be a + * whole minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReadTime() + { + return $this->readOneof(2); + } + + public function hasReadTime() + { + return $this->hasOneof(2); + } + + /** + * Reads documents at the given time. + * This must be a microsecond precision timestamp within the past one + * hour, or if Point-in-Time Recovery is enabled, can additionally be a + * whole minute timestamp within the past 7 days. + * + * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getConsistencySelector() + { + return $this->whichOneof("consistency_selector"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadWrite.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadWrite.php new file mode 100644 index 000000000000..abf223a2244e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadWrite.php @@ -0,0 +1,69 @@ +google.firestore.v1.TransactionOptions.ReadWrite + */ +class ReadWrite extends \Google\Protobuf\Internal\Message +{ + /** + * An optional transaction to retry. + * + * Generated from protobuf field bytes retry_transaction = 1; + */ + protected $retry_transaction = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $retry_transaction + * An optional transaction to retry. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * An optional transaction to retry. + * + * Generated from protobuf field bytes retry_transaction = 1; + * @return string + */ + public function getRetryTransaction() + { + return $this->retry_transaction; + } + + /** + * An optional transaction to retry. + * + * Generated from protobuf field bytes retry_transaction = 1; + * @param string $var + * @return $this + */ + public function setRetryTransaction($var) + { + GPBUtil::checkString($var, False); + $this->retry_transaction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php new file mode 100644 index 000000000000..96c7684e0800 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php @@ -0,0 +1,268 @@ +google.firestore.v1.UpdateDocumentRequest + */ +class UpdateDocumentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The updated document. + * Creates the document if it does not already exist. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $document = null; + /** + * The fields to update. + * None of the field paths in the mask may contain a reserved name. + * If the document exists on the server and has fields not referenced in the + * mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; + */ + protected $update_mask = null; + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; + */ + protected $mask = null; + /** + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; + */ + protected $current_document = null; + + /** + * @param \Google\Cloud\Firestore\V1\Document $document Required. The updated document. + * Creates the document if it does not already exist. + * @param \Google\Cloud\Firestore\V1\DocumentMask $updateMask The fields to update. + * None of the field paths in the mask may contain a reserved name. + * + * If the document exists on the server and has fields not referenced in the + * mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * + * @return \Google\Cloud\Firestore\V1\UpdateDocumentRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Firestore\V1\Document $document, \Google\Cloud\Firestore\V1\DocumentMask $updateMask): self + { + return (new self()) + ->setDocument($document) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Document $document + * Required. The updated document. + * Creates the document if it does not already exist. + * @type \Google\Cloud\Firestore\V1\DocumentMask $update_mask + * The fields to update. + * None of the field paths in the mask may contain a reserved name. + * If the document exists on the server and has fields not referenced in the + * mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * @type \Google\Cloud\Firestore\V1\DocumentMask $mask + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * @type \Google\Cloud\Firestore\V1\Precondition $current_document + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The updated document. + * Creates the document if it does not already exist. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Firestore\V1\Document|null + */ + public function getDocument() + { + return $this->document; + } + + public function hasDocument() + { + return isset($this->document); + } + + public function clearDocument() + { + unset($this->document); + } + + /** + * Required. The updated document. + * Creates the document if it does not already exist. + * + * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Firestore\V1\Document $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); + $this->document = $var; + + return $this; + } + + /** + * The fields to update. + * None of the field paths in the mask may contain a reserved name. + * If the document exists on the server and has fields not referenced in the + * mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The fields to update. + * None of the field paths in the mask may contain a reserved name. + * If the document exists on the server and has fields not referenced in the + * mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getMask() + { + return $this->mask; + } + + public function hasMask() + { + return isset($this->mask); + } + + public function clearMask() + { + unset($this->mask); + } + + /** + * The fields to return. If not set, returns all fields. + * If the document has a field that is not present in this mask, that field + * will not be returned in the response. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->mask = $var; + + return $this; + } + + /** + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; + * @return \Google\Cloud\Firestore\V1\Precondition|null + */ + public function getCurrentDocument() + { + return $this->current_document; + } + + public function hasCurrentDocument() + { + return isset($this->current_document); + } + + public function clearCurrentDocument() + { + unset($this->current_document); + } + + /** + * An optional precondition on the document. + * The request will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; + * @param \Google\Cloud\Firestore\V1\Precondition $var + * @return $this + */ + public function setCurrentDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); + $this->current_document = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php new file mode 100644 index 000000000000..db0784d64e76 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php @@ -0,0 +1,603 @@ +google.firestore.v1.Value + */ +class Value extends \Google\Protobuf\Internal\Message +{ + protected $value_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $null_value + * A null value. + * @type bool $boolean_value + * A boolean value. + * @type int|string $integer_value + * An integer value. + * @type float $double_value + * A double value. + * @type \Google\Protobuf\Timestamp $timestamp_value + * A timestamp value. + * Precise only to microseconds. When stored, any additional precision is + * rounded down. + * @type string $string_value + * A string value. + * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes of the UTF-8 representation are considered by + * queries. + * @type string $bytes_value + * A bytes value. + * Must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes are considered by queries. + * @type string $reference_value + * A reference to a document. For example: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @type \Google\Type\LatLng $geo_point_value + * A geo point value representing a point on the surface of Earth. + * @type \Google\Cloud\Firestore\V1\ArrayValue $array_value + * An array value. + * Cannot directly contain another array value, though can contain a + * map which contains another array. + * @type \Google\Cloud\Firestore\V1\MapValue $map_value + * A map value. + * @type string $field_reference_value + * Value which references a field. + * This is considered relative (vs absolute) since it only refers to a field + * and not a field within a particular document. + * **Requires:** + * * Must follow [field reference][FieldReference.field_path] limitations. + * * Not allowed to be used when writing documents. + * @type string $variable_reference_value + * Pointer to a variable defined elsewhere in a pipeline. + * Unlike `field_reference_value` which references a field within a + * document, this refers to a variable, defined in a separate namespace than + * the fields of a document. + * @type \Google\Cloud\Firestore\V1\PBFunction $function_value + * A value that represents an unevaluated expression. + * **Requires:** + * * Not allowed to be used when writing documents. + * @type \Google\Cloud\Firestore\V1\Pipeline $pipeline_value + * A value that represents an unevaluated pipeline. + * **Requires:** + * * Not allowed to be used when writing documents. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Document::initOnce(); + parent::__construct($data); + } + + /** + * A null value. + * + * Generated from protobuf field .google.protobuf.NullValue null_value = 11; + * @return int + */ + public function getNullValue() + { + return $this->readOneof(11); + } + + public function hasNullValue() + { + return $this->hasOneof(11); + } + + /** + * A null value. + * + * Generated from protobuf field .google.protobuf.NullValue null_value = 11; + * @param int $var + * @return $this + */ + public function setNullValue($var) + { + GPBUtil::checkEnum($var, \Google\Protobuf\NullValue::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * A boolean value. + * + * Generated from protobuf field bool boolean_value = 1; + * @return bool + */ + public function getBooleanValue() + { + return $this->readOneof(1); + } + + public function hasBooleanValue() + { + return $this->hasOneof(1); + } + + /** + * A boolean value. + * + * Generated from protobuf field bool boolean_value = 1; + * @param bool $var + * @return $this + */ + public function setBooleanValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * An integer value. + * + * Generated from protobuf field int64 integer_value = 2; + * @return int|string + */ + public function getIntegerValue() + { + return $this->readOneof(2); + } + + public function hasIntegerValue() + { + return $this->hasOneof(2); + } + + /** + * An integer value. + * + * Generated from protobuf field int64 integer_value = 2; + * @param int|string $var + * @return $this + */ + public function setIntegerValue($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A double value. + * + * Generated from protobuf field double double_value = 3; + * @return float + */ + public function getDoubleValue() + { + return $this->readOneof(3); + } + + public function hasDoubleValue() + { + return $this->hasOneof(3); + } + + /** + * A double value. + * + * Generated from protobuf field double double_value = 3; + * @param float $var + * @return $this + */ + public function setDoubleValue($var) + { + GPBUtil::checkDouble($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A timestamp value. + * Precise only to microseconds. When stored, any additional precision is + * rounded down. + * + * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 10; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTimestampValue() + { + return $this->readOneof(10); + } + + public function hasTimestampValue() + { + return $this->hasOneof(10); + } + + /** + * A timestamp value. + * Precise only to microseconds. When stored, any additional precision is + * rounded down. + * + * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 10; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTimestampValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * A string value. + * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes of the UTF-8 representation are considered by + * queries. + * + * Generated from protobuf field string string_value = 17; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(17); + } + + public function hasStringValue() + { + return $this->hasOneof(17); + } + + /** + * A string value. + * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes of the UTF-8 representation are considered by + * queries. + * + * Generated from protobuf field string string_value = 17; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * A bytes value. + * Must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes are considered by queries. + * + * Generated from protobuf field bytes bytes_value = 18; + * @return string + */ + public function getBytesValue() + { + return $this->readOneof(18); + } + + public function hasBytesValue() + { + return $this->hasOneof(18); + } + + /** + * A bytes value. + * Must not exceed 1 MiB - 89 bytes. + * Only the first 1,500 bytes are considered by queries. + * + * Generated from protobuf field bytes bytes_value = 18; + * @param string $var + * @return $this + */ + public function setBytesValue($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(18, $var); + + return $this; + } + + /** + * A reference to a document. For example: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string reference_value = 5; + * @return string + */ + public function getReferenceValue() + { + return $this->readOneof(5); + } + + public function hasReferenceValue() + { + return $this->hasOneof(5); + } + + /** + * A reference to a document. For example: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string reference_value = 5; + * @param string $var + * @return $this + */ + public function setReferenceValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * A geo point value representing a point on the surface of Earth. + * + * Generated from protobuf field .google.type.LatLng geo_point_value = 8; + * @return \Google\Type\LatLng|null + */ + public function getGeoPointValue() + { + return $this->readOneof(8); + } + + public function hasGeoPointValue() + { + return $this->hasOneof(8); + } + + /** + * A geo point value representing a point on the surface of Earth. + * + * Generated from protobuf field .google.type.LatLng geo_point_value = 8; + * @param \Google\Type\LatLng $var + * @return $this + */ + public function setGeoPointValue($var) + { + GPBUtil::checkMessage($var, \Google\Type\LatLng::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * An array value. + * Cannot directly contain another array value, though can contain a + * map which contains another array. + * + * Generated from protobuf field .google.firestore.v1.ArrayValue array_value = 9; + * @return \Google\Cloud\Firestore\V1\ArrayValue|null + */ + public function getArrayValue() + { + return $this->readOneof(9); + } + + public function hasArrayValue() + { + return $this->hasOneof(9); + } + + /** + * An array value. + * Cannot directly contain another array value, though can contain a + * map which contains another array. + * + * Generated from protobuf field .google.firestore.v1.ArrayValue array_value = 9; + * @param \Google\Cloud\Firestore\V1\ArrayValue $var + * @return $this + */ + public function setArrayValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * A map value. + * + * Generated from protobuf field .google.firestore.v1.MapValue map_value = 6; + * @return \Google\Cloud\Firestore\V1\MapValue|null + */ + public function getMapValue() + { + return $this->readOneof(6); + } + + public function hasMapValue() + { + return $this->hasOneof(6); + } + + /** + * A map value. + * + * Generated from protobuf field .google.firestore.v1.MapValue map_value = 6; + * @param \Google\Cloud\Firestore\V1\MapValue $var + * @return $this + */ + public function setMapValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\MapValue::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Value which references a field. + * This is considered relative (vs absolute) since it only refers to a field + * and not a field within a particular document. + * **Requires:** + * * Must follow [field reference][FieldReference.field_path] limitations. + * * Not allowed to be used when writing documents. + * + * Generated from protobuf field string field_reference_value = 19; + * @return string + */ + public function getFieldReferenceValue() + { + return $this->readOneof(19); + } + + public function hasFieldReferenceValue() + { + return $this->hasOneof(19); + } + + /** + * Value which references a field. + * This is considered relative (vs absolute) since it only refers to a field + * and not a field within a particular document. + * **Requires:** + * * Must follow [field reference][FieldReference.field_path] limitations. + * * Not allowed to be used when writing documents. + * + * Generated from protobuf field string field_reference_value = 19; + * @param string $var + * @return $this + */ + public function setFieldReferenceValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(19, $var); + + return $this; + } + + /** + * Pointer to a variable defined elsewhere in a pipeline. + * Unlike `field_reference_value` which references a field within a + * document, this refers to a variable, defined in a separate namespace than + * the fields of a document. + * + * Generated from protobuf field string variable_reference_value = 22; + * @return string + */ + public function getVariableReferenceValue() + { + return $this->readOneof(22); + } + + public function hasVariableReferenceValue() + { + return $this->hasOneof(22); + } + + /** + * Pointer to a variable defined elsewhere in a pipeline. + * Unlike `field_reference_value` which references a field within a + * document, this refers to a variable, defined in a separate namespace than + * the fields of a document. + * + * Generated from protobuf field string variable_reference_value = 22; + * @param string $var + * @return $this + */ + public function setVariableReferenceValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(22, $var); + + return $this; + } + + /** + * A value that represents an unevaluated expression. + * **Requires:** + * * Not allowed to be used when writing documents. + * + * Generated from protobuf field .google.firestore.v1.Function function_value = 20; + * @return \Google\Cloud\Firestore\V1\PBFunction|null + */ + public function getFunctionValue() + { + return $this->readOneof(20); + } + + public function hasFunctionValue() + { + return $this->hasOneof(20); + } + + /** + * A value that represents an unevaluated expression. + * **Requires:** + * * Not allowed to be used when writing documents. + * + * Generated from protobuf field .google.firestore.v1.Function function_value = 20; + * @param \Google\Cloud\Firestore\V1\PBFunction $var + * @return $this + */ + public function setFunctionValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\PBFunction::class); + $this->writeOneof(20, $var); + + return $this; + } + + /** + * A value that represents an unevaluated pipeline. + * **Requires:** + * * Not allowed to be used when writing documents. + * + * Generated from protobuf field .google.firestore.v1.Pipeline pipeline_value = 21; + * @return \Google\Cloud\Firestore\V1\Pipeline|null + */ + public function getPipelineValue() + { + return $this->readOneof(21); + } + + public function hasPipelineValue() + { + return $this->hasOneof(21); + } + + /** + * A value that represents an unevaluated pipeline. + * **Requires:** + * * Not allowed to be used when writing documents. + * + * Generated from protobuf field .google.firestore.v1.Pipeline pipeline_value = 21; + * @param \Google\Cloud\Firestore\V1\Pipeline $var + * @return $this + */ + public function setPipelineValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Pipeline::class); + $this->writeOneof(21, $var); + + return $this; + } + + /** + * @return string + */ + public function getValueType() + { + return $this->whichOneof("value_type"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php new file mode 100644 index 000000000000..ed59c89434d1 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php @@ -0,0 +1,314 @@ +google.firestore.v1.Write + */ +class Write extends \Google\Protobuf\Internal\Message +{ + /** + * The fields to update in this write. + * This field can be set only when the operation is `update`. + * If the mask is not set for an `update` and the document exists, any + * existing data will be overwritten. + * If the mask is set and the document on the server has fields not covered by + * the mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * The field paths in this mask must not contain a reserved field name. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; + */ + protected $update_mask = null; + /** + * The transforms to perform after update. + * This field can be set only when the operation is `update`. If present, this + * write is equivalent to performing `update` and `transform` to the same + * document atomically and in order. + * + * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; + */ + private $update_transforms; + /** + * An optional precondition on the document. + * The write will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; + */ + protected $current_document = null; + protected $operation; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Firestore\V1\Document $update + * A document to write. + * @type string $delete + * A document name to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * @type \Google\Cloud\Firestore\V1\DocumentTransform $transform + * Applies a transformation to a document. + * @type \Google\Cloud\Firestore\V1\DocumentMask $update_mask + * The fields to update in this write. + * This field can be set only when the operation is `update`. + * If the mask is not set for an `update` and the document exists, any + * existing data will be overwritten. + * If the mask is set and the document on the server has fields not covered by + * the mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * The field paths in this mask must not contain a reserved field name. + * @type \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform[] $update_transforms + * The transforms to perform after update. + * This field can be set only when the operation is `update`. If present, this + * write is equivalent to performing `update` and `transform` to the same + * document atomically and in order. + * @type \Google\Cloud\Firestore\V1\Precondition $current_document + * An optional precondition on the document. + * The write will fail if this is set and not met by the target document. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * A document to write. + * + * Generated from protobuf field .google.firestore.v1.Document update = 1; + * @return \Google\Cloud\Firestore\V1\Document|null + */ + public function getUpdate() + { + return $this->readOneof(1); + } + + public function hasUpdate() + { + return $this->hasOneof(1); + } + + /** + * A document to write. + * + * Generated from protobuf field .google.firestore.v1.Document update = 1; + * @param \Google\Cloud\Firestore\V1\Document $var + * @return $this + */ + public function setUpdate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A document name to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string delete = 2; + * @return string + */ + public function getDelete() + { + return $this->readOneof(2); + } + + public function hasDelete() + { + return $this->hasOneof(2); + } + + /** + * A document name to delete. In the format: + * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + * + * Generated from protobuf field string delete = 2; + * @param string $var + * @return $this + */ + public function setDelete($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Applies a transformation to a document. + * + * Generated from protobuf field .google.firestore.v1.DocumentTransform transform = 6; + * @return \Google\Cloud\Firestore\V1\DocumentTransform|null + */ + public function getTransform() + { + return $this->readOneof(6); + } + + public function hasTransform() + { + return $this->hasOneof(6); + } + + /** + * Applies a transformation to a document. + * + * Generated from protobuf field .google.firestore.v1.DocumentTransform transform = 6; + * @param \Google\Cloud\Firestore\V1\DocumentTransform $var + * @return $this + */ + public function setTransform($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentTransform::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * The fields to update in this write. + * This field can be set only when the operation is `update`. + * If the mask is not set for an `update` and the document exists, any + * existing data will be overwritten. + * If the mask is set and the document on the server has fields not covered by + * the mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * The field paths in this mask must not contain a reserved field name. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; + * @return \Google\Cloud\Firestore\V1\DocumentMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The fields to update in this write. + * This field can be set only when the operation is `update`. + * If the mask is not set for an `update` and the document exists, any + * existing data will be overwritten. + * If the mask is set and the document on the server has fields not covered by + * the mask, they are left unchanged. + * Fields referenced in the mask, but not present in the input document, are + * deleted from the document on the server. + * The field paths in this mask must not contain a reserved field name. + * + * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; + * @param \Google\Cloud\Firestore\V1\DocumentMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * The transforms to perform after update. + * This field can be set only when the operation is `update`. If present, this + * write is equivalent to performing `update` and `transform` to the same + * document atomically and in order. + * + * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; + * @return RepeatedField<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform> + */ + public function getUpdateTransforms() + { + return $this->update_transforms; + } + + /** + * The transforms to perform after update. + * This field can be set only when the operation is `update`. If present, this + * write is equivalent to performing `update` and `transform` to the same + * document atomically and in order. + * + * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; + * @param \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform[] $var + * @return $this + */ + public function setUpdateTransforms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform::class); + $this->update_transforms = $arr; + + return $this; + } + + /** + * An optional precondition on the document. + * The write will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; + * @return \Google\Cloud\Firestore\V1\Precondition|null + */ + public function getCurrentDocument() + { + return $this->current_document; + } + + public function hasCurrentDocument() + { + return isset($this->current_document); + } + + public function clearCurrentDocument() + { + unset($this->current_document); + } + + /** + * An optional precondition on the document. + * The write will fail if this is set and not met by the target document. + * + * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; + * @param \Google\Cloud\Firestore\V1\Precondition $var + * @return $this + */ + public function setCurrentDocument($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); + $this->current_document = $var; + + return $this; + } + + /** + * @return string + */ + public function getOperation() + { + return $this->whichOneof("operation"); + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php new file mode 100644 index 000000000000..cd8eef8c5f35 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php @@ -0,0 +1,277 @@ +google.firestore.v1.WriteRequest + */ +class WriteRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * This is only required in the first message. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $database = ''; + /** + * The ID of the write stream to resume. + * This may only be set in the first message. When left empty, a new write + * stream will be created. + * + * Generated from protobuf field string stream_id = 2; + */ + protected $stream_id = ''; + /** + * The writes to apply. + * Always executed atomically and in order. + * This must be empty on the first request. + * This may be empty on the last request. + * This must not be empty on all other requests. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; + */ + private $writes; + /** + * A stream token that was previously sent by the server. + * The client should set this field to the token from the most recent + * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This + * acknowledges that the client has received responses up to this token. After + * sending this token, earlier tokens may not be used anymore. + * The server may close the stream if there are too many unacknowledged + * responses. + * Leave this field unset when creating a new stream. To resume a stream at + * a specific point, set this field and the `stream_id` field. + * Leave this field unset when creating a new stream. + * + * Generated from protobuf field bytes stream_token = 4; + */ + protected $stream_token = ''; + /** + * Labels associated with this write request. + * + * Generated from protobuf field map labels = 5; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $database + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * This is only required in the first message. + * @type string $stream_id + * The ID of the write stream to resume. + * This may only be set in the first message. When left empty, a new write + * stream will be created. + * @type \Google\Cloud\Firestore\V1\Write[] $writes + * The writes to apply. + * Always executed atomically and in order. + * This must be empty on the first request. + * This may be empty on the last request. + * This must not be empty on all other requests. + * @type string $stream_token + * A stream token that was previously sent by the server. + * The client should set this field to the token from the most recent + * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This + * acknowledges that the client has received responses up to this token. After + * sending this token, earlier tokens may not be used anymore. + * The server may close the stream if there are too many unacknowledged + * responses. + * Leave this field unset when creating a new stream. To resume a stream at + * a specific point, set this field and the `stream_id` field. + * Leave this field unset when creating a new stream. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels associated with this write request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * This is only required in the first message. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Required. The database name. In the format: + * `projects/{project_id}/databases/{database_id}`. + * This is only required in the first message. + * + * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDatabase($var) + { + GPBUtil::checkString($var, True); + $this->database = $var; + + return $this; + } + + /** + * The ID of the write stream to resume. + * This may only be set in the first message. When left empty, a new write + * stream will be created. + * + * Generated from protobuf field string stream_id = 2; + * @return string + */ + public function getStreamId() + { + return $this->stream_id; + } + + /** + * The ID of the write stream to resume. + * This may only be set in the first message. When left empty, a new write + * stream will be created. + * + * Generated from protobuf field string stream_id = 2; + * @param string $var + * @return $this + */ + public function setStreamId($var) + { + GPBUtil::checkString($var, True); + $this->stream_id = $var; + + return $this; + } + + /** + * The writes to apply. + * Always executed atomically and in order. + * This must be empty on the first request. + * This may be empty on the last request. + * This must not be empty on all other requests. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Write> + */ + public function getWrites() + { + return $this->writes; + } + + /** + * The writes to apply. + * Always executed atomically and in order. + * This must be empty on the first request. + * This may be empty on the last request. + * This must not be empty on all other requests. + * + * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; + * @param \Google\Cloud\Firestore\V1\Write[] $var + * @return $this + */ + public function setWrites($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); + $this->writes = $arr; + + return $this; + } + + /** + * A stream token that was previously sent by the server. + * The client should set this field to the token from the most recent + * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This + * acknowledges that the client has received responses up to this token. After + * sending this token, earlier tokens may not be used anymore. + * The server may close the stream if there are too many unacknowledged + * responses. + * Leave this field unset when creating a new stream. To resume a stream at + * a specific point, set this field and the `stream_id` field. + * Leave this field unset when creating a new stream. + * + * Generated from protobuf field bytes stream_token = 4; + * @return string + */ + public function getStreamToken() + { + return $this->stream_token; + } + + /** + * A stream token that was previously sent by the server. + * The client should set this field to the token from the most recent + * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This + * acknowledges that the client has received responses up to this token. After + * sending this token, earlier tokens may not be used anymore. + * The server may close the stream if there are too many unacknowledged + * responses. + * Leave this field unset when creating a new stream. To resume a stream at + * a specific point, set this field and the `stream_id` field. + * Leave this field unset when creating a new stream. + * + * Generated from protobuf field bytes stream_token = 4; + * @param string $var + * @return $this + */ + public function setStreamToken($var) + { + GPBUtil::checkString($var, False); + $this->stream_token = $var; + + return $this; + } + + /** + * Labels associated with this write request. + * + * Generated from protobuf field map labels = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels associated with this write request. + * + * Generated from protobuf field map labels = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php new file mode 100644 index 000000000000..7413907f1e2b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php @@ -0,0 +1,203 @@ +google.firestore.v1.WriteResponse + */ +class WriteResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the stream. + * Only set on the first message, when a new stream was created. + * + * Generated from protobuf field string stream_id = 1; + */ + protected $stream_id = ''; + /** + * A token that represents the position of this response in the stream. + * This can be used by a client to resume the stream at this point. + * This field is always set. + * + * Generated from protobuf field bytes stream_token = 2; + */ + protected $stream_token = ''; + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; + */ + private $write_results; + /** + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the write. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; + */ + protected $commit_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $stream_id + * The ID of the stream. + * Only set on the first message, when a new stream was created. + * @type string $stream_token + * A token that represents the position of this response in the stream. + * This can be used by a client to resume the stream at this point. + * This field is always set. + * @type \Google\Cloud\Firestore\V1\WriteResult[] $write_results + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * @type \Google\Protobuf\Timestamp $commit_time + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the write. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the stream. + * Only set on the first message, when a new stream was created. + * + * Generated from protobuf field string stream_id = 1; + * @return string + */ + public function getStreamId() + { + return $this->stream_id; + } + + /** + * The ID of the stream. + * Only set on the first message, when a new stream was created. + * + * Generated from protobuf field string stream_id = 1; + * @param string $var + * @return $this + */ + public function setStreamId($var) + { + GPBUtil::checkString($var, True); + $this->stream_id = $var; + + return $this; + } + + /** + * A token that represents the position of this response in the stream. + * This can be used by a client to resume the stream at this point. + * This field is always set. + * + * Generated from protobuf field bytes stream_token = 2; + * @return string + */ + public function getStreamToken() + { + return $this->stream_token; + } + + /** + * A token that represents the position of this response in the stream. + * This can be used by a client to resume the stream at this point. + * This field is always set. + * + * Generated from protobuf field bytes stream_token = 2; + * @param string $var + * @return $this + */ + public function setStreamToken($var) + { + GPBUtil::checkString($var, False); + $this->stream_token = $var; + + return $this; + } + + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; + * @return RepeatedField<\Google\Cloud\Firestore\V1\WriteResult> + */ + public function getWriteResults() + { + return $this->write_results; + } + + /** + * The result of applying the writes. + * This i-th write result corresponds to the i-th write in the + * request. + * + * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; + * @param \Google\Cloud\Firestore\V1\WriteResult[] $var + * @return $this + */ + public function setWriteResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); + $this->write_results = $arr; + + return $this; + } + + /** + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the write. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCommitTime() + { + return $this->commit_time; + } + + public function hasCommitTime() + { + return isset($this->commit_time); + } + + public function clearCommitTime() + { + unset($this->commit_time); + } + + /** + * The time at which the commit occurred. Any read with an equal or greater + * `read_time` is guaranteed to see the effects of the write. + * + * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCommitTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->commit_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php new file mode 100644 index 000000000000..3684d662245a --- /dev/null +++ b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php @@ -0,0 +1,131 @@ +google.firestore.v1.WriteResult + */ +class WriteResult extends \Google\Protobuf\Internal\Message +{ + /** + * The last update time of the document after applying the write. Not set + * after a `delete`. + * If the write did not actually change the document, this will be the + * previous update_time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; + */ + protected $update_time = null; + /** + * The results of applying each + * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], + * in the same order. + * + * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; + */ + private $transform_results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $update_time + * The last update time of the document after applying the write. Not set + * after a `delete`. + * If the write did not actually change the document, this will be the + * previous update_time. + * @type \Google\Cloud\Firestore\V1\Value[] $transform_results + * The results of applying each + * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], + * in the same order. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Firestore\V1\Write::initOnce(); + parent::__construct($data); + } + + /** + * The last update time of the document after applying the write. Not set + * after a `delete`. + * If the write did not actually change the document, this will be the + * previous update_time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * The last update time of the document after applying the write. Not set + * after a `delete`. + * If the write did not actually change the document, this will be the + * previous update_time. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * The results of applying each + * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], + * in the same order. + * + * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; + * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> + */ + public function getTransformResults() + { + return $this->transform_results; + } + + /** + * The results of applying each + * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], + * in the same order. + * + * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; + * @param \Google\Cloud\Firestore\V1\Value[] $var + * @return $this + */ + public function setTransformResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); + $this->transform_results = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php new file mode 100644 index 000000000000..f16bc62003d6 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php @@ -0,0 +1,86 @@ +setDatabase($database) + ->setDocuments($documents); + + // Call the API and handle any network failures. + try { + /** @var ServerStream $stream */ + $stream = $firestoreClient->batchGetDocuments($request); + + /** @var BatchGetDocumentsResponse $element */ + foreach ($stream->readAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $database = '[DATABASE]'; + $documentsElement = '[DOCUMENTS]'; + + batch_get_documents_sample($database, $documentsElement); +} +// [END firestore_v1_generated_Firestore_BatchGetDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php new file mode 100644 index 000000000000..102aa7be0006 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php @@ -0,0 +1,66 @@ +batchWrite($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END firestore_v1_generated_Firestore_BatchWrite_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php new file mode 100644 index 000000000000..2349a880038e --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php @@ -0,0 +1,71 @@ +setDatabase($database); + + // Call the API and handle any network failures. + try { + /** @var BeginTransactionResponse $response */ + $response = $firestoreClient->beginTransaction($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $database = '[DATABASE]'; + + begin_transaction_sample($database); +} +// [END firestore_v1_generated_Firestore_BeginTransaction_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php new file mode 100644 index 000000000000..5cdc59666df0 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php @@ -0,0 +1,74 @@ +setDatabase($database) + ->setWrites($writes); + + // Call the API and handle any network failures. + try { + /** @var CommitResponse $response */ + $response = $firestoreClient->commit($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $database = '[DATABASE]'; + + commit_sample($database); +} +// [END firestore_v1_generated_Firestore_Commit_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php new file mode 100644 index 000000000000..9f9f17993eba --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php @@ -0,0 +1,83 @@ +setParent($parent) + ->setCollectionId($collectionId) + ->setDocumentId($documentId) + ->setDocument($document); + + // Call the API and handle any network failures. + try { + /** @var Document $response */ + $response = $firestoreClient->createDocument($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + $collectionId = '[COLLECTION_ID]'; + $documentId = '[DOCUMENT_ID]'; + + create_document_sample($parent, $collectionId, $documentId); +} +// [END firestore_v1_generated_Firestore_CreateDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php new file mode 100644 index 000000000000..4aaab650c29b --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php @@ -0,0 +1,69 @@ +setName($name); + + // Call the API and handle any network failures. + try { + $firestoreClient->deleteDocument($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + delete_document_sample($name); +} +// [END firestore_v1_generated_Firestore_DeleteDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/execute_pipeline.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/execute_pipeline.php new file mode 100644 index 000000000000..362c1d1510e0 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/execute_pipeline.php @@ -0,0 +1,76 @@ +setDatabase($database); + + // Call the API and handle any network failures. + try { + /** @var ServerStream $stream */ + $stream = $firestoreClient->executePipeline($request); + + /** @var ExecutePipelineResponse $element */ + foreach ($stream->readAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $database = '[DATABASE]'; + + execute_pipeline_sample($database); +} +// [END firestore_v1_generated_Firestore_ExecutePipeline_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php new file mode 100644 index 000000000000..ed51bc93ad05 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php @@ -0,0 +1,71 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var Document $response */ + $response = $firestoreClient->getDocument($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + get_document_sample($name); +} +// [END firestore_v1_generated_Firestore_GetDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php new file mode 100644 index 000000000000..7dc6a65473ab --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php @@ -0,0 +1,77 @@ +setParent($parent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $firestoreClient->listCollectionIds($request); + + /** @var string $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + + list_collection_ids_sample($parent); +} +// [END firestore_v1_generated_Firestore_ListCollectionIds_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php new file mode 100644 index 000000000000..f26d245154b1 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php @@ -0,0 +1,89 @@ +setParent($parent) + ->setCollectionId($collectionId); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $firestoreClient->listDocuments($request); + + /** @var Document $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + $collectionId = '[COLLECTION_ID]'; + + list_documents_sample($parent, $collectionId); +} +// [END firestore_v1_generated_Firestore_ListDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php new file mode 100644 index 000000000000..f1c21fa3a7d6 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php @@ -0,0 +1,78 @@ +setDatabase($database); + + // Call the API and handle any network failures. + try { + /** @var BidiStream $stream */ + $stream = $firestoreClient->listen(); + $stream->writeAll([$request,]); + + /** @var ListenResponse $element */ + foreach ($stream->closeWriteAndReadAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $database = '[DATABASE]'; + + listen_sample($database); +} +// [END firestore_v1_generated_Firestore_Listen_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php new file mode 100644 index 000000000000..e0baf617c0de --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php @@ -0,0 +1,64 @@ +partitionQuery($request); + + /** @var Cursor $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END firestore_v1_generated_Firestore_PartitionQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php new file mode 100644 index 000000000000..2708c09c4b40 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php @@ -0,0 +1,72 @@ +setDatabase($database) + ->setTransaction($transaction); + + // Call the API and handle any network failures. + try { + $firestoreClient->rollback($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $database = '[DATABASE]'; + $transaction = '...'; + + rollback_sample($database, $transaction); +} +// [END firestore_v1_generated_Firestore_Rollback_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php new file mode 100644 index 000000000000..adf0798bfd4f --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php @@ -0,0 +1,92 @@ +setParent($parent); + + // Call the API and handle any network failures. + try { + /** @var ServerStream $stream */ + $stream = $firestoreClient->runAggregationQuery($request); + + /** @var RunAggregationQueryResponse $element */ + foreach ($stream->readAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + + run_aggregation_query_sample($parent); +} +// [END firestore_v1_generated_Firestore_RunAggregationQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php new file mode 100644 index 000000000000..0678620382ff --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php @@ -0,0 +1,80 @@ +setParent($parent); + + // Call the API and handle any network failures. + try { + /** @var ServerStream $stream */ + $stream = $firestoreClient->runQuery($request); + + /** @var RunQueryResponse $element */ + foreach ($stream->readAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + + run_query_sample($parent); +} +// [END firestore_v1_generated_Firestore_RunQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php new file mode 100644 index 000000000000..efd6e77a8341 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php @@ -0,0 +1,62 @@ +setDocument($document) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Document $response */ + $response = $firestoreClient->updateDocument($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END firestore_v1_generated_Firestore_UpdateDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php new file mode 100644 index 000000000000..635baa2a69d7 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php @@ -0,0 +1,79 @@ +setDatabase($database); + + // Call the API and handle any network failures. + try { + /** @var BidiStream $stream */ + $stream = $firestoreClient->write(); + $stream->writeAll([$request,]); + + /** @var WriteResponse $element */ + foreach ($stream->closeWriteAndReadAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $database = '[DATABASE]'; + + write_sample($database); +} +// [END firestore_v1_generated_Firestore_Write_sync] diff --git a/owl-bot-staging/Firestore/v1/src/V1/Client/FirestoreClient.php b/owl-bot-staging/Firestore/v1/src/V1/Client/FirestoreClient.php new file mode 100644 index 000000000000..3ffd4513dbd8 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/src/V1/Client/FirestoreClient.php @@ -0,0 +1,662 @@ + batchWriteAsync(BatchWriteRequest $request, array $optionalArgs = []) + * @method PromiseInterface beginTransactionAsync(BeginTransactionRequest $request, array $optionalArgs = []) + * @method PromiseInterface commitAsync(CommitRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDocumentAsync(CreateDocumentRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDocumentAsync(DeleteDocumentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDocumentAsync(GetDocumentRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCollectionIdsAsync(ListCollectionIdsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDocumentsAsync(ListDocumentsRequest $request, array $optionalArgs = []) + * @method PromiseInterface partitionQueryAsync(PartitionQueryRequest $request, array $optionalArgs = []) + * @method PromiseInterface rollbackAsync(RollbackRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDocumentAsync(UpdateDocumentRequest $request, array $optionalArgs = []) + */ +final class FirestoreClient +{ + use GapicClientTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.firestore.v1.Firestore'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'firestore.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'firestore.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/datastore', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/firestore_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/firestore_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/firestore_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/firestore_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'firestore.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Firestore\V1\FirestoreClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new FirestoreClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Gets multiple documents. + * + * Documents returned by this method are not guaranteed to be returned in the + * same order that they were requested. + * + * @example samples/V1/FirestoreClient/batch_get_documents.php + * + * @param BatchGetDocumentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return ServerStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchGetDocuments(BatchGetDocumentsRequest $request, array $callOptions = []): ServerStream + { + return $this->startApiCall('BatchGetDocuments', $request, $callOptions); + } + + /** + * Applies a batch of write operations. + * + * The BatchWrite method does not apply the write operations atomically + * and can apply them out of order. Method does not allow more than one write + * per document. Each write succeeds or fails independently. See the + * [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the + * success status of each write. + * + * If you require an atomically applied set of writes, use + * [Commit][google.firestore.v1.Firestore.Commit] instead. + * + * The async variant is {@see FirestoreClient::batchWriteAsync()} . + * + * @example samples/V1/FirestoreClient/batch_write.php + * + * @param BatchWriteRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BatchWriteResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function batchWrite(BatchWriteRequest $request, array $callOptions = []): BatchWriteResponse + { + return $this->startApiCall('BatchWrite', $request, $callOptions)->wait(); + } + + /** + * Starts a new transaction. + * + * The async variant is {@see FirestoreClient::beginTransactionAsync()} . + * + * @example samples/V1/FirestoreClient/begin_transaction.php + * + * @param BeginTransactionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return BeginTransactionResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function beginTransaction(BeginTransactionRequest $request, array $callOptions = []): BeginTransactionResponse + { + return $this->startApiCall('BeginTransaction', $request, $callOptions)->wait(); + } + + /** + * Commits a transaction, while optionally updating documents. + * + * The async variant is {@see FirestoreClient::commitAsync()} . + * + * @example samples/V1/FirestoreClient/commit.php + * + * @param CommitRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CommitResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function commit(CommitRequest $request, array $callOptions = []): CommitResponse + { + return $this->startApiCall('Commit', $request, $callOptions)->wait(); + } + + /** + * Creates a new document. + * + * The async variant is {@see FirestoreClient::createDocumentAsync()} . + * + * @example samples/V1/FirestoreClient/create_document.php + * + * @param CreateDocumentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Document + * + * @throws ApiException Thrown if the API call fails. + */ + public function createDocument(CreateDocumentRequest $request, array $callOptions = []): Document + { + return $this->startApiCall('CreateDocument', $request, $callOptions)->wait(); + } + + /** + * Deletes a document. + * + * The async variant is {@see FirestoreClient::deleteDocumentAsync()} . + * + * @example samples/V1/FirestoreClient/delete_document.php + * + * @param DeleteDocumentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteDocument(DeleteDocumentRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteDocument', $request, $callOptions)->wait(); + } + + /** + * Executes a pipeline query. + * + * @example samples/V1/FirestoreClient/execute_pipeline.php + * + * @param ExecutePipelineRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return ServerStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function executePipeline(ExecutePipelineRequest $request, array $callOptions = []): ServerStream + { + return $this->startApiCall('ExecutePipeline', $request, $callOptions); + } + + /** + * Gets a single document. + * + * The async variant is {@see FirestoreClient::getDocumentAsync()} . + * + * @example samples/V1/FirestoreClient/get_document.php + * + * @param GetDocumentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Document + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDocument(GetDocumentRequest $request, array $callOptions = []): Document + { + return $this->startApiCall('GetDocument', $request, $callOptions)->wait(); + } + + /** + * Lists all the collection IDs underneath a document. + * + * The async variant is {@see FirestoreClient::listCollectionIdsAsync()} . + * + * @example samples/V1/FirestoreClient/list_collection_ids.php + * + * @param ListCollectionIdsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listCollectionIds(ListCollectionIdsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCollectionIds', $request, $callOptions); + } + + /** + * Lists documents. + * + * The async variant is {@see FirestoreClient::listDocumentsAsync()} . + * + * @example samples/V1/FirestoreClient/list_documents.php + * + * @param ListDocumentsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listDocuments(ListDocumentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDocuments', $request, $callOptions); + } + + /** + * Listens to changes. This method is only available via gRPC or WebChannel + * (not REST). + * + * @example samples/V1/FirestoreClient/listen.php + * + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return BidiStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function listen(array $callOptions = []): BidiStream + { + return $this->startApiCall('Listen', null, $callOptions); + } + + /** + * Partitions a query by returning partition cursors that can be used to run + * the query in parallel. The returned partition cursors are split points that + * can be used by RunQuery as starting/end points for the query results. + * + * The async variant is {@see FirestoreClient::partitionQueryAsync()} . + * + * @example samples/V1/FirestoreClient/partition_query.php + * + * @param PartitionQueryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function partitionQuery(PartitionQueryRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('PartitionQuery', $request, $callOptions); + } + + /** + * Rolls back a transaction. + * + * The async variant is {@see FirestoreClient::rollbackAsync()} . + * + * @example samples/V1/FirestoreClient/rollback.php + * + * @param RollbackRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function rollback(RollbackRequest $request, array $callOptions = []): void + { + $this->startApiCall('Rollback', $request, $callOptions)->wait(); + } + + /** + * Runs an aggregation query. + * + * Rather than producing [Document][google.firestore.v1.Document] results like + * [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery], this API + * allows running an aggregation to produce a series of + * [AggregationResult][google.firestore.v1.AggregationResult] server-side. + * + * High-Level Example: + * + * ``` + * -- Return the number of documents in table given a filter. + * SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); + * ``` + * + * @example samples/V1/FirestoreClient/run_aggregation_query.php + * + * @param RunAggregationQueryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return ServerStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function runAggregationQuery(RunAggregationQueryRequest $request, array $callOptions = []): ServerStream + { + return $this->startApiCall('RunAggregationQuery', $request, $callOptions); + } + + /** + * Runs a query. + * + * @example samples/V1/FirestoreClient/run_query.php + * + * @param RunQueryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return ServerStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function runQuery(RunQueryRequest $request, array $callOptions = []): ServerStream + { + return $this->startApiCall('RunQuery', $request, $callOptions); + } + + /** + * Updates or inserts a document. + * + * The async variant is {@see FirestoreClient::updateDocumentAsync()} . + * + * @example samples/V1/FirestoreClient/update_document.php + * + * @param UpdateDocumentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Document + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateDocument(UpdateDocumentRequest $request, array $callOptions = []): Document + { + return $this->startApiCall('UpdateDocument', $request, $callOptions)->wait(); + } + + /** + * Streams batches of document updates and deletes, in order. This method is + * only available via gRPC or WebChannel (not REST). + * + * @example samples/V1/FirestoreClient/write.php + * + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return BidiStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function write(array $callOptions = []): BidiStream + { + return $this->startApiCall('Write', null, $callOptions); + } +} diff --git a/owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..8793f858e7f3 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json @@ -0,0 +1,103 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.firestore.v1", + "libraryPackage": "Google\\Cloud\\Firestore\\V1", + "services": { + "Firestore": { + "clients": { + "grpc": { + "libraryClient": "FirestoreGapicClient", + "rpcs": { + "BatchGetDocuments": { + "methods": [ + "batchGetDocuments" + ] + }, + "BatchWrite": { + "methods": [ + "batchWrite" + ] + }, + "BeginTransaction": { + "methods": [ + "beginTransaction" + ] + }, + "Commit": { + "methods": [ + "commit" + ] + }, + "CreateDocument": { + "methods": [ + "createDocument" + ] + }, + "DeleteDocument": { + "methods": [ + "deleteDocument" + ] + }, + "ExecutePipeline": { + "methods": [ + "executePipeline" + ] + }, + "GetDocument": { + "methods": [ + "getDocument" + ] + }, + "ListCollectionIds": { + "methods": [ + "listCollectionIds" + ] + }, + "ListDocuments": { + "methods": [ + "listDocuments" + ] + }, + "Listen": { + "methods": [ + "listen" + ] + }, + "PartitionQuery": { + "methods": [ + "partitionQuery" + ] + }, + "Rollback": { + "methods": [ + "rollback" + ] + }, + "RunAggregationQuery": { + "methods": [ + "runAggregationQuery" + ] + }, + "RunQuery": { + "methods": [ + "runQuery" + ] + }, + "UpdateDocument": { + "methods": [ + "updateDocument" + ] + }, + "Write": { + "methods": [ + "write" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json new file mode 100644 index 000000000000..3f189e07e6a3 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json @@ -0,0 +1,176 @@ +{ + "interfaces": { + "google.firestore.v1.Firestore": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "RESOURCE_EXHAUSTED", + "UNAVAILABLE" + ], + "retry_policy_2_codes": [ + "UNAVAILABLE", + "INTERNAL", + "DEADLINE_EXCEEDED" + ], + "retry_policy_3_codes": [ + "RESOURCE_EXHAUSTED", + "UNAVAILABLE", + "INTERNAL", + "DEADLINE_EXCEEDED" + ], + "no_retry_1_codes": [], + "retry_policy_4_codes": [ + "RESOURCE_EXHAUSTED", + "UNAVAILABLE", + "INTERNAL", + "DEADLINE_EXCEEDED" + ], + "retry_policy_5_codes": [ + "RESOURCE_EXHAUSTED", + "UNAVAILABLE", + "ABORTED" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 300000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 300000, + "total_timeout_millis": 300000 + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 86400000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 86400000, + "total_timeout_millis": 86400000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 86400000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 86400000, + "total_timeout_millis": 86400000 + }, + "retry_policy_4_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_5_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "BatchGetDocuments": { + "timeout_millis": 300000 + }, + "BatchWrite": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_5_codes", + "retry_params_name": "retry_policy_5_params" + }, + "BeginTransaction": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "Commit": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateDocument": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteDocument": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "ExecutePipeline": { + "timeout_millis": 300000 + }, + "GetDocument": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "ListCollectionIds": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "ListDocuments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "Listen": { + "timeout_millis": 86400000 + }, + "PartitionQuery": { + "timeout_millis": 300000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "Rollback": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "RunAggregationQuery": { + "timeout_millis": 300000 + }, + "RunQuery": { + "timeout_millis": 300000 + }, + "UpdateDocument": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "Write": { + "timeout_millis": 86400000 + } + } + } + } +} diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php new file mode 100644 index 000000000000..d1232247d0ae --- /dev/null +++ b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php @@ -0,0 +1,295 @@ + [ + 'google.firestore.v1.Firestore' => [ + 'BatchGetDocuments' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\BatchGetDocumentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + 'BatchWrite' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\BatchWriteResponse', + 'headerParams' => [ + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + 'BeginTransaction' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\BeginTransactionResponse', + 'headerParams' => [ + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + 'Commit' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\CommitResponse', + 'headerParams' => [ + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + 'CreateDocument' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\Document', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + [ + 'keyName' => 'collection_id', + 'fieldAccessors' => [ + 'getCollectionId', + ], + ], + ], + ], + 'DeleteDocument' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ExecutePipeline' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\ExecutePipelineResponse', + 'headerParams' => [ + [ + 'keyName' => 'project_id', + 'fieldAccessors' => [ + 'getDatabase', + ], + 'matchers' => [], + ], + [ + 'keyName' => 'database_id', + 'fieldAccessors' => [ + 'getDatabase', + ], + 'matchers' => [], + ], + ], + ], + 'GetDocument' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\Document', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCollectionIds' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCollectionIds', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\ListCollectionIdsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDocuments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDocuments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\ListDocumentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + [ + 'keyName' => 'collection_id', + 'fieldAccessors' => [ + 'getCollectionId', + ], + ], + ], + ], + 'Listen' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'BidiStreaming', + ], + 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\ListenResponse', + 'headerParams' => [ + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + 'PartitionQuery' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getPartitions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\PartitionQueryResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'Rollback' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + 'RunAggregationQuery' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\RunAggregationQueryResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RunQuery' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'ServerStreaming', + ], + 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\RunQueryResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDocument' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\Document', + 'headerParams' => [ + [ + 'keyName' => 'document.name', + 'fieldAccessors' => [ + 'getDocument', + 'getName', + ], + ], + ], + ], + 'Write' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'BidiStreaming', + ], + 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Firestore\V1\WriteResponse', + 'headerParams' => [ + [ + 'keyName' => 'database', + 'fieldAccessors' => [ + 'getDatabase', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php new file mode 100644 index 000000000000..421c7325a999 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php @@ -0,0 +1,304 @@ + [ + 'google.firestore.v1.Firestore' => [ + 'BatchGetDocuments' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:batchGet', + 'body' => '*', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + ], + ], + 'BatchWrite' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:batchWrite', + 'body' => '*', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + ], + ], + 'BeginTransaction' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:beginTransaction', + 'body' => '*', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + ], + ], + 'Commit' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:commit', + 'body' => '*', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + ], + ], + 'CreateDocument' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/**}/{collection_id}', + 'body' => 'document', + 'placeholders' => [ + 'collection_id' => [ + 'getters' => [ + 'getCollectionId', + ], + ], + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'document_id', + ], + ], + 'DeleteDocument' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/documents/*/**}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExecutePipeline' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:executePipeline', + 'body' => '*', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + ], + ], + 'GetDocument' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/documents/*/**}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCollectionIds' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:listCollectionIds', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:listCollectionIds', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDocuments' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}/{collection_id}', + ], + ], + 'placeholders' => [ + 'collection_id' => [ + 'getters' => [ + 'getCollectionId', + ], + ], + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'PartitionQuery' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:partitionQuery', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:partitionQuery', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'Rollback' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:rollback', + 'body' => '*', + 'placeholders' => [ + 'database' => [ + 'getters' => [ + 'getDatabase', + ], + ], + ], + ], + 'RunAggregationQuery' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:runAggregationQuery', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:runAggregationQuery', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RunQuery' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:runQuery', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:runQuery', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateDocument' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{document.name=projects/*/databases/*/documents/*/**}', + 'body' => 'document', + 'placeholders' => [ + 'document.name' => [ + 'getters' => [ + 'getDocument', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/databases/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Firestore/v1/tests/Unit/V1/Client/FirestoreClientTest.php b/owl-bot-staging/Firestore/v1/tests/Unit/V1/Client/FirestoreClientTest.php new file mode 100644 index 000000000000..992ccc934a93 --- /dev/null +++ b/owl-bot-staging/Firestore/v1/tests/Unit/V1/Client/FirestoreClientTest.php @@ -0,0 +1,1405 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return FirestoreClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new FirestoreClient($options); + } + + /** @test */ + public function batchGetDocumentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $missing = 'missing1069449574'; + $transaction2 = '17'; + $expectedResponse = new BatchGetDocumentsResponse(); + $expectedResponse->setMissing($missing); + $expectedResponse->setTransaction($transaction2); + $transport->addResponse($expectedResponse); + $missing2 = 'missing21243859865'; + $transaction3 = '18'; + $expectedResponse2 = new BatchGetDocumentsResponse(); + $expectedResponse2->setMissing($missing2); + $expectedResponse2->setTransaction($transaction3); + $transport->addResponse($expectedResponse2); + $missing3 = 'missing31243859866'; + $transaction4 = '19'; + $expectedResponse3 = new BatchGetDocumentsResponse(); + $expectedResponse3->setMissing($missing3); + $expectedResponse3->setTransaction($transaction4); + $transport->addResponse($expectedResponse3); + // Mock request + $database = 'database1789464955'; + $documents = []; + $request = (new BatchGetDocumentsRequest()) + ->setDatabase($database) + ->setDocuments($documents); + $serverStream = $gapicClient->batchGetDocuments($request); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/BatchGetDocuments', $actualFuncCall); + $actualValue = $actualRequestObject->getDatabase(); + $this->assertProtobufEquals($database, $actualValue); + $actualValue = $actualRequestObject->getDocuments(); + $this->assertProtobufEquals($documents, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchGetDocumentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + // Mock request + $database = 'database1789464955'; + $documents = []; + $request = (new BatchGetDocumentsRequest()) + ->setDatabase($database) + ->setDocuments($documents); + $serverStream = $gapicClient->batchGetDocuments($request); + $results = $serverStream->readAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchWriteTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchWriteResponse(); + $transport->addResponse($expectedResponse); + $request = new BatchWriteRequest(); + $response = $gapicClient->batchWrite($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/BatchWrite', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchWriteExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new BatchWriteRequest(); + try { + $gapicClient->batchWrite($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function beginTransactionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $transaction = '-34'; + $expectedResponse = new BeginTransactionResponse(); + $expectedResponse->setTransaction($transaction); + $transport->addResponse($expectedResponse); + // Mock request + $database = 'database1789464955'; + $request = (new BeginTransactionRequest()) + ->setDatabase($database); + $response = $gapicClient->beginTransaction($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/BeginTransaction', $actualFuncCall); + $actualValue = $actualRequestObject->getDatabase(); + $this->assertProtobufEquals($database, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function beginTransactionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $database = 'database1789464955'; + $request = (new BeginTransactionRequest()) + ->setDatabase($database); + try { + $gapicClient->beginTransaction($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function commitTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new CommitResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $database = 'database1789464955'; + $writes = []; + $request = (new CommitRequest()) + ->setDatabase($database) + ->setWrites($writes); + $response = $gapicClient->commit($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/Commit', $actualFuncCall); + $actualValue = $actualRequestObject->getDatabase(); + $this->assertProtobufEquals($database, $actualValue); + $actualValue = $actualRequestObject->getWrites(); + $this->assertProtobufEquals($writes, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function commitExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $database = 'database1789464955'; + $writes = []; + $request = (new CommitRequest()) + ->setDatabase($database) + ->setWrites($writes); + try { + $gapicClient->commit($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Document(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $collectionId = 'collectionId-821242276'; + $documentId = 'documentId506676927'; + $document = new Document(); + $request = (new CreateDocumentRequest()) + ->setParent($parent) + ->setCollectionId($collectionId) + ->setDocumentId($documentId) + ->setDocument($document); + $response = $gapicClient->createDocument($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/CreateDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getCollectionId(); + $this->assertProtobufEquals($collectionId, $actualValue); + $actualValue = $actualRequestObject->getDocumentId(); + $this->assertProtobufEquals($documentId, $actualValue); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDocumentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $collectionId = 'collectionId-821242276'; + $documentId = 'documentId506676927'; + $document = new Document(); + $request = (new CreateDocumentRequest()) + ->setParent($parent) + ->setCollectionId($collectionId) + ->setDocumentId($documentId) + ->setDocument($document); + try { + $gapicClient->createDocument($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new DeleteDocumentRequest()) + ->setName($name); + $gapicClient->deleteDocument($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/DeleteDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDocumentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new DeleteDocumentRequest()) + ->setName($name); + try { + $gapicClient->deleteDocument($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function executePipelineTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $transaction2 = '17'; + $expectedResponse = new ExecutePipelineResponse(); + $expectedResponse->setTransaction($transaction2); + $transport->addResponse($expectedResponse); + $transaction3 = '18'; + $expectedResponse2 = new ExecutePipelineResponse(); + $expectedResponse2->setTransaction($transaction3); + $transport->addResponse($expectedResponse2); + $transaction4 = '19'; + $expectedResponse3 = new ExecutePipelineResponse(); + $expectedResponse3->setTransaction($transaction4); + $transport->addResponse($expectedResponse3); + // Mock request + $database = 'database1789464955'; + $request = (new ExecutePipelineRequest()) + ->setDatabase($database); + $serverStream = $gapicClient->executePipeline($request); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/ExecutePipeline', $actualFuncCall); + $actualValue = $actualRequestObject->getDatabase(); + $this->assertProtobufEquals($database, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function executePipelineExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + // Mock request + $database = 'database1789464955'; + $request = (new ExecutePipelineRequest()) + ->setDatabase($database); + $serverStream = $gapicClient->executePipeline($request); + $results = $serverStream->readAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Document(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new GetDocumentRequest()) + ->setName($name); + $response = $gapicClient->getDocument($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/GetDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDocumentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new GetDocumentRequest()) + ->setName($name); + try { + $gapicClient->getDocument($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCollectionIdsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $collectionIdsElement = 'collectionIdsElement1368994900'; + $collectionIds = [ + $collectionIdsElement, + ]; + $expectedResponse = new ListCollectionIdsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCollectionIds($collectionIds); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $request = (new ListCollectionIdsRequest()) + ->setParent($parent); + $response = $gapicClient->listCollectionIds($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCollectionIds()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/ListCollectionIds', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCollectionIdsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $request = (new ListCollectionIdsRequest()) + ->setParent($parent); + try { + $gapicClient->listCollectionIds($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDocumentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $documentsElement = new Document(); + $documents = [ + $documentsElement, + ]; + $expectedResponse = new ListDocumentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDocuments($documents); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $collectionId = 'collectionId-821242276'; + $request = (new ListDocumentsRequest()) + ->setParent($parent) + ->setCollectionId($collectionId); + $response = $gapicClient->listDocuments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDocuments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/ListDocuments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getCollectionId(); + $this->assertProtobufEquals($collectionId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDocumentsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $collectionId = 'collectionId-821242276'; + $request = (new ListDocumentsRequest()) + ->setParent($parent) + ->setCollectionId($collectionId); + try { + $gapicClient->listDocuments($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListenResponse(); + $transport->addResponse($expectedResponse); + $expectedResponse2 = new ListenResponse(); + $transport->addResponse($expectedResponse2); + $expectedResponse3 = new ListenResponse(); + $transport->addResponse($expectedResponse3); + // Mock request + $database = 'database1789464955'; + $request = new ListenRequest(); + $request->setDatabase($database); + $database2 = 'database21688906350'; + $request2 = new ListenRequest(); + $request2->setDatabase($database2); + $database3 = 'database31688906351'; + $request3 = new ListenRequest(); + $request3->setDatabase($database3); + $bidi = $gapicClient->listen(); + $this->assertInstanceOf(BidiStream::class, $bidi); + $bidi->write($request); + $responses = []; + $responses[] = $bidi->read(); + $bidi->writeAll([ + $request2, + $request3, + ]); + foreach ($bidi->closeWriteAndReadAll() as $response) { + $responses[] = $response; + } + + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $createStreamRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($createStreamRequests)); + $streamFuncCall = $createStreamRequests[0]->getFuncCall(); + $streamRequestObject = $createStreamRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/Listen', $streamFuncCall); + $this->assertNull($streamRequestObject); + $callObjects = $transport->popCallObjects(); + $this->assertSame(1, count($callObjects)); + $bidiCall = $callObjects[0]; + $writeRequests = $bidiCall->popReceivedCalls(); + $expectedRequests = []; + $expectedRequests[] = $request; + $expectedRequests[] = $request2; + $expectedRequests[] = $request3; + $this->assertEquals($expectedRequests, $writeRequests); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listenExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + $bidi = $gapicClient->listen(); + $results = $bidi->closeWriteAndReadAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function partitionQueryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $partitionsElement = new Cursor(); + $partitions = [ + $partitionsElement, + ]; + $expectedResponse = new PartitionQueryResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setPartitions($partitions); + $transport->addResponse($expectedResponse); + $request = new PartitionQueryRequest(); + $response = $gapicClient->partitionQuery($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getPartitions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/PartitionQuery', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function partitionQueryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new PartitionQueryRequest(); + try { + $gapicClient->partitionQuery($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rollbackTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $database = 'database1789464955'; + $transaction = '-34'; + $request = (new RollbackRequest()) + ->setDatabase($database) + ->setTransaction($transaction); + $gapicClient->rollback($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/Rollback', $actualFuncCall); + $actualValue = $actualRequestObject->getDatabase(); + $this->assertProtobufEquals($database, $actualValue); + $actualValue = $actualRequestObject->getTransaction(); + $this->assertProtobufEquals($transaction, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function rollbackExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $database = 'database1789464955'; + $transaction = '-34'; + $request = (new RollbackRequest()) + ->setDatabase($database) + ->setTransaction($transaction); + try { + $gapicClient->rollback($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runAggregationQueryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $transaction2 = '17'; + $expectedResponse = new RunAggregationQueryResponse(); + $expectedResponse->setTransaction($transaction2); + $transport->addResponse($expectedResponse); + $transaction3 = '18'; + $expectedResponse2 = new RunAggregationQueryResponse(); + $expectedResponse2->setTransaction($transaction3); + $transport->addResponse($expectedResponse2); + $transaction4 = '19'; + $expectedResponse3 = new RunAggregationQueryResponse(); + $expectedResponse3->setTransaction($transaction4); + $transport->addResponse($expectedResponse3); + // Mock request + $parent = 'parent-995424086'; + $request = (new RunAggregationQueryRequest()) + ->setParent($parent); + $serverStream = $gapicClient->runAggregationQuery($request); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/RunAggregationQuery', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runAggregationQueryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + // Mock request + $parent = 'parent-995424086'; + $request = (new RunAggregationQueryRequest()) + ->setParent($parent); + $serverStream = $gapicClient->runAggregationQuery($request); + $results = $serverStream->readAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runQueryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $transaction2 = '17'; + $skippedResults = 880286183; + $done = true; + $expectedResponse = new RunQueryResponse(); + $expectedResponse->setTransaction($transaction2); + $expectedResponse->setSkippedResults($skippedResults); + $expectedResponse->setDone($done); + $transport->addResponse($expectedResponse); + $transaction3 = '18'; + $skippedResults2 = 153532454; + $done2 = false; + $expectedResponse2 = new RunQueryResponse(); + $expectedResponse2->setTransaction($transaction3); + $expectedResponse2->setSkippedResults($skippedResults2); + $expectedResponse2->setDone($done2); + $transport->addResponse($expectedResponse2); + $transaction4 = '19'; + $skippedResults3 = 153532453; + $done3 = true; + $expectedResponse3 = new RunQueryResponse(); + $expectedResponse3->setTransaction($transaction4); + $expectedResponse3->setSkippedResults($skippedResults3); + $expectedResponse3->setDone($done3); + $transport->addResponse($expectedResponse3); + // Mock request + $parent = 'parent-995424086'; + $request = (new RunQueryRequest()) + ->setParent($parent); + $serverStream = $gapicClient->runQuery($request); + $this->assertInstanceOf(ServerStream::class, $serverStream); + $responses = iterator_to_array($serverStream->readAll()); + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/RunQuery', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function runQueryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + // Mock request + $parent = 'parent-995424086'; + $request = (new RunQueryRequest()) + ->setParent($parent); + $serverStream = $gapicClient->runQuery($request); + $results = $serverStream->readAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDocumentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Document(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $document = new Document(); + $updateMask = new DocumentMask(); + $request = (new UpdateDocumentRequest()) + ->setDocument($document) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateDocument($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/UpdateDocument', $actualFuncCall); + $actualValue = $actualRequestObject->getDocument(); + $this->assertProtobufEquals($document, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDocumentExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $document = new Document(); + $updateMask = new DocumentMask(); + $request = (new UpdateDocumentRequest()) + ->setDocument($document) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateDocument($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function writeTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $streamId = 'streamId-315624902'; + $streamToken = '122'; + $expectedResponse = new WriteResponse(); + $expectedResponse->setStreamId($streamId); + $expectedResponse->setStreamToken($streamToken); + $transport->addResponse($expectedResponse); + $streamId2 = 'streamId21627150189'; + $streamToken2 = '-83'; + $expectedResponse2 = new WriteResponse(); + $expectedResponse2->setStreamId($streamId2); + $expectedResponse2->setStreamToken($streamToken2); + $transport->addResponse($expectedResponse2); + $streamId3 = 'streamId31627150190'; + $streamToken3 = '-82'; + $expectedResponse3 = new WriteResponse(); + $expectedResponse3->setStreamId($streamId3); + $expectedResponse3->setStreamToken($streamToken3); + $transport->addResponse($expectedResponse3); + // Mock request + $database = 'database1789464955'; + $request = new WriteRequest(); + $request->setDatabase($database); + $database2 = 'database21688906350'; + $request2 = new WriteRequest(); + $request2->setDatabase($database2); + $database3 = 'database31688906351'; + $request3 = new WriteRequest(); + $request3->setDatabase($database3); + $bidi = $gapicClient->write(); + $this->assertInstanceOf(BidiStream::class, $bidi); + $bidi->write($request); + $responses = []; + $responses[] = $bidi->read(); + $bidi->writeAll([ + $request2, + $request3, + ]); + foreach ($bidi->closeWriteAndReadAll() as $response) { + $responses[] = $response; + } + + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $createStreamRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($createStreamRequests)); + $streamFuncCall = $createStreamRequests[0]->getFuncCall(); + $streamRequestObject = $createStreamRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/Write', $streamFuncCall); + $this->assertNull($streamRequestObject); + $callObjects = $transport->popCallObjects(); + $this->assertSame(1, count($callObjects)); + $bidiCall = $callObjects[0]; + $writeRequests = $bidiCall->popReceivedCalls(); + $expectedRequests = []; + $expectedRequests[] = $request; + $expectedRequests[] = $request2; + $expectedRequests[] = $request3; + $this->assertEquals($expectedRequests, $writeRequests); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function writeExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + $bidi = $gapicClient->write(); + $results = $bidi->closeWriteAndReadAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchWriteAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new BatchWriteResponse(); + $transport->addResponse($expectedResponse); + $request = new BatchWriteRequest(); + $response = $gapicClient->batchWriteAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.firestore.v1.Firestore/BatchWrite', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LogEntry.php b/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LogEntry.php new file mode 100644 index 000000000000..3b78a5a19eb4 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LogEntry.php @@ -0,0 +1,32 @@ +internalAddGeneratedFile( + "\x0A\xDD\x0D\x0A!google/logging/v2/log_entry.proto\x12\x11google.logging.v2\x1A#google/api/monitored_resource.proto\x1A\x19google/api/resource.proto\x1A&google/logging/type/http_request.proto\x1A&google/logging/type/log_severity.proto\x1A\x19google/protobuf/any.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x83\x08\x0A\x08LogEntry\x12\x15\x0A\x08log_name\x18\x0C \x01(\x09B\x03\xE0A\x02\x124\x0A\x08resource\x18\x08 \x01(\x0B2\x1D.google.api.MonitoredResourceB\x03\xE0A\x02\x12-\x0A\x0Dproto_payload\x18\x02 \x01(\x0B2\x14.google.protobuf.AnyH\x00\x12\x16\x0A\x0Ctext_payload\x18\x03 \x01(\x09H\x00\x12/\x0A\x0Cjson_payload\x18\x06 \x01(\x0B2\x17.google.protobuf.StructH\x00\x122\x0A\x09timestamp\x18\x09 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x01\x12:\x0A\x11receive_timestamp\x18\x18 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x127\x0A\x08severity\x18\x0A \x01(\x0E2 .google.logging.type.LogSeverityB\x03\xE0A\x01\x12\x16\x0A\x09insert_id\x18\x04 \x01(\x09B\x03\xE0A\x01\x12;\x0A\x0Chttp_request\x18\x07 \x01(\x0B2 .google.logging.type.HttpRequestB\x03\xE0A\x01\x12<\x0A\x06labels\x18\x0B \x03(\x0B2'.google.logging.v2.LogEntry.LabelsEntryB\x03\xE0A\x01\x12<\x0A\x09operation\x18\x0F \x01(\x0B2\$.google.logging.v2.LogEntryOperationB\x03\xE0A\x01\x12\x12\x0A\x05trace\x18\x16 \x01(\x09B\x03\xE0A\x01\x12\x14\x0A\x07span_id\x18\x1B \x01(\x09B\x03\xE0A\x01\x12\x1A\x0A\x0Dtrace_sampled\x18\x1E \x01(\x08B\x03\xE0A\x01\x12G\x0A\x0Fsource_location\x18\x17 \x01(\x0B2).google.logging.v2.LogEntrySourceLocationB\x03\xE0A\x01\x12/\x0A\x05split\x18# \x01(\x0B2\x1B.google.logging.v2.LogSplitB\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\xBD\x01\xEAA\xB9\x01\x0A\x1Alogging.googleapis.com/Log\x12\x1Dprojects/{project}/logs/{log}\x12'organizations/{organization}/logs/{log}\x12\x1Bfolders/{folder}/logs/{log}\x12,billingAccounts/{billing_account}/logs/{log}\x1A\x08log_nameB\x09\x0A\x07payload\"b\x0A\x11LogEntryOperation\x12\x0F\x0A\x02id\x18\x01 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08producer\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x12\x0A\x05first\x18\x03 \x01(\x08B\x03\xE0A\x01\x12\x11\x0A\x04last\x18\x04 \x01(\x08B\x03\xE0A\x01\"U\x0A\x16LogEntrySourceLocation\x12\x11\x0A\x04file\x18\x01 \x01(\x09B\x03\xE0A\x01\x12\x11\x0A\x04line\x18\x02 \x01(\x03B\x03\xE0A\x01\x12\x15\x0A\x08function\x18\x03 \x01(\x09B\x03\xE0A\x01\"<\x0A\x08LogSplit\x12\x0B\x0A\x03uid\x18\x01 \x01(\x09\x12\x0D\x0A\x05index\x18\x02 \x01(\x05\x12\x14\x0A\x0Ctotal_splits\x18\x03 \x01(\x05B\xB3\x01\x0A\x15com.google.logging.v2B\x0DLogEntryProtoP\x01Z5cloud.google.com/go/logging/apiv2/loggingpb;loggingpb\xF8\x01\x01\xAA\x02\x17Google.Cloud.Logging.V2\xCA\x02\x17Google\\Cloud\\Logging\\V2\xEA\x02\x1AGoogle::Cloud::Logging::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/Logging.php b/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/Logging.php new file mode 100644 index 000000000000..532169e93dda --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/Logging.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + "\x0A\xC0 \x0A\x1Fgoogle/logging/v2/logging.proto\x12\x11google.logging.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A#google/api/monitored_resource.proto\x1A\x19google/api/resource.proto\x1A!google/logging/v2/log_entry.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A\x17google/rpc/status.proto\"H\x0A\x10DeleteLogRequest\x124\x0A\x08log_name\x18\x01 \x01(\x09B\"\xE0A\x02\xFAA\x1C\x0A\x1Alogging.googleapis.com/Log\"\xE6\x02\x0A\x16WriteLogEntriesRequest\x124\x0A\x08log_name\x18\x01 \x01(\x09B\"\xE0A\x01\xFAA\x1C\x0A\x1Alogging.googleapis.com/Log\x124\x0A\x08resource\x18\x02 \x01(\x0B2\x1D.google.api.MonitoredResourceB\x03\xE0A\x01\x12J\x0A\x06labels\x18\x03 \x03(\x0B25.google.logging.v2.WriteLogEntriesRequest.LabelsEntryB\x03\xE0A\x01\x121\x0A\x07entries\x18\x04 \x03(\x0B2\x1B.google.logging.v2.LogEntryB\x03\xE0A\x02\x12\x1C\x0A\x0Fpartial_success\x18\x05 \x01(\x08B\x03\xE0A\x01\x12\x14\x0A\x07dry_run\x18\x06 \x01(\x08B\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x19\x0A\x17WriteLogEntriesResponse\"\xC8\x01\x0A\x1CWriteLogEntriesPartialErrors\x12]\x0A\x10log_entry_errors\x18\x01 \x03(\x0B2C.google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry\x1AI\x0A\x13LogEntryErrorsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x05\x12!\x0A\x05value\x18\x02 \x01(\x0B2\x12.google.rpc.Status:\x028\x01\"\xB0\x01\x0A\x15ListLogEntriesRequest\x12:\x0A\x0Eresource_names\x18\x08 \x03(\x09B\"\xE0A\x02\xFAA\x1C\x12\x1Alogging.googleapis.com/Log\x12\x13\x0A\x06filter\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x04 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x05 \x01(\x09B\x03\xE0A\x01\"_\x0A\x16ListLogEntriesResponse\x12,\x0A\x07entries\x18\x01 \x03(\x0B2\x1B.google.logging.v2.LogEntry\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"Z\x0A'ListMonitoredResourceDescriptorsRequest\x12\x16\x0A\x09page_size\x18\x01 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x02 \x01(\x09B\x03\xE0A\x01\"\x8A\x01\x0A(ListMonitoredResourceDescriptorsResponse\x12E\x0A\x14resource_descriptors\x18\x01 \x03(\x0B2'.google.api.MonitoredResourceDescriptor\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xB2\x01\x0A\x0FListLogsRequest\x122\x0A\x06parent\x18\x01 \x01(\x09B\"\xE0A\x02\xFAA\x1C\x12\x1Alogging.googleapis.com/Log\x12:\x0A\x0Eresource_names\x18\x08 \x03(\x09B\"\xE0A\x01\xFAA\x1C\x12\x1Alogging.googleapis.com/Log\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\">\x0A\x10ListLogsResponse\x12\x11\x0A\x09log_names\x18\x03 \x03(\x09\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x80\x01\x0A\x15TailLogEntriesRequest\x12\x1B\x0A\x0Eresource_names\x18\x01 \x03(\x09B\x03\xE0A\x02\x12\x13\x0A\x06filter\x18\x02 \x01(\x09B\x03\xE0A\x01\x125\x0A\x0Dbuffer_window\x18\x03 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01\"\xDF\x02\x0A\x16TailLogEntriesResponse\x12,\x0A\x07entries\x18\x01 \x03(\x0B2\x1B.google.logging.v2.LogEntry\x12S\x0A\x10suppression_info\x18\x02 \x03(\x0B29.google.logging.v2.TailLogEntriesResponse.SuppressionInfo\x1A\xC1\x01\x0A\x0FSuppressionInfo\x12P\x0A\x06reason\x18\x01 \x01(\x0E2@.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason\x12\x18\x0A\x10suppressed_count\x18\x02 \x01(\x05\"B\x0A\x06Reason\x12\x16\x0A\x12REASON_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ARATE_LIMIT\x10\x01\x12\x10\x0A\x0CNOT_CONSUMED\x10\x022\xE9\x0D\x0A\x10LoggingServiceV2\x12\x93\x02\x0A\x09DeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1A\x16.google.protobuf.Empty\"\xC8\x01\xDAA\x08log_name\x82\xD3\xE4\x93\x02\xB6\x01* /v2/{log_name=projects/*/logs/*}Z\x1B*\x19/v2/{log_name=*/*/logs/*}Z'*%/v2/{log_name=organizations/*/logs/*}Z!*\x1F/v2/{log_name=folders/*/logs/*}Z)*'/v2/{log_name=billingAccounts/*/logs/*}\x12\xA9\x01\x0A\x0FWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1A*.google.logging.v2.WriteLogEntriesResponse\"?\xDAA log_name,resource,labels,entries\x82\xD3\xE4\x93\x02\x16\"\x11/v2/entries:write:\x01*\x12\xA3\x01\x0A\x0EListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1A).google.logging.v2.ListLogEntriesResponse\"<\xDAA\x1Eresource_names,filter,order_by\x82\xD3\xE4\x93\x02\x15\"\x10/v2/entries:list:\x01*\x12\xC5\x01\x0A ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1A;.google.logging.v2.ListMonitoredResourceDescriptorsResponse\"(\x82\xD3\xE4\x93\x02\"\x12 /v2/monitoredResourceDescriptors\x12\x8B\x04\x0A\x08ListLogs\x12\".google.logging.v2.ListLogsRequest\x1A#.google.logging.v2.ListLogsResponse\"\xB5\x03\xDAA\x06parent\x82\xD3\xE4\x93\x02\xA5\x03\x12\x15/v2/{parent=*/*}/logsZ\x1E\x12\x1C/v2/{parent=projects/*}/logsZ#\x12!/v2/{parent=organizations/*}/logsZ\x1D\x12\x1B/v2/{parent=folders/*}/logsZ%\x12#/v2/{parent=billingAccounts/*}/logsZ<\x12:/v2/{parent=projects/*/locations/*/buckets/*/views/*}/logsZA\x12?/v2/{parent=organizations/*/locations/*/buckets/*/views/*}/logsZ;\x129/v2/{parent=folders/*/locations/*/buckets/*/views/*}/logsZC\x12A/v2/{parent=billingAccounts/*/locations/*/buckets/*/views/*}/logs\x12\x86\x01\x0A\x0ETailLogEntries\x12(.google.logging.v2.TailLogEntriesRequest\x1A).google.logging.v2.TailLogEntriesResponse\"\x1B\x82\xD3\xE4\x93\x02\x15\"\x10/v2/entries:tail:\x01*(\x010\x01\x1A\x8D\x02\xCAA\x16logging.googleapis.com\xD2A\xF0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xB2\x01\x0A\x15com.google.logging.v2B\x0CLoggingProtoP\x01Z5cloud.google.com/go/logging/apiv2/loggingpb;loggingpb\xF8\x01\x01\xAA\x02\x17Google.Cloud.Logging.V2\xCA\x02\x17Google\\Cloud\\Logging\\V2\xEA\x02\x1AGoogle::Cloud::Logging::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingConfig.php b/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingConfig.php new file mode 100644 index 000000000000..682637236b8b --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingConfig.php @@ -0,0 +1,32 @@ +internalAddGeneratedFile( + "\x0A\xFA\xA8\x01\x0A&google/logging/v2/logging_config.proto\x12\x11google.logging.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x8D\x01\x0A\x0BIndexConfig\x12\x17\x0A\x0Afield_path\x18\x01 \x01(\x09B\x03\xE0A\x02\x12/\x0A\x04type\x18\x02 \x01(\x0E2\x1C.google.logging.v2.IndexTypeB\x03\xE0A\x02\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"\xD5\x05\x0A\x09LogBucket\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x13\x0A\x0Bdescription\x18\x03 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x16\x0A\x0Eretention_days\x18\x0B \x01(\x05\x12\x0E\x0A\x06locked\x18\x09 \x01(\x08\x12?\x0A\x0Flifecycle_state\x18\x0C \x01(\x0E2!.google.logging.v2.LifecycleStateB\x03\xE0A\x03\x12\x19\x0A\x11analytics_enabled\x18\x0E \x01(\x08\x12\x19\x0A\x11restricted_fields\x18\x0F \x03(\x09\x125\x0A\x0Dindex_configs\x18\x11 \x03(\x0B2\x1E.google.logging.v2.IndexConfig\x126\x0A\x0Dcmek_settings\x18\x13 \x01(\x0B2\x1F.google.logging.v2.CmekSettings:\xA5\x02\xEAA\xA1\x02\x0A logging.googleapis.com/LogBucket\x128projects/{project}/locations/{location}/buckets/{bucket}\x12Borganizations/{organization}/locations/{location}/buckets/{bucket}\x126folders/{folder}/locations/{location}/buckets/{bucket}\x12GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}\"\x82\x04\x0A\x07LogView\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x03 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x0E\x0A\x06filter\x18\x07 \x01(\x09:\xD7\x02\xEAA\xD3\x02\x0A\x1Elogging.googleapis.com/LogView\x12Eprojects/{project}/locations/{location}/buckets/{bucket}/views/{view}\x12Oorganizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}\x12Cfolders/{folder}/locations/{location}/buckets/{bucket}/views/{view}\x12TbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}\"\x85\x06\x0A\x07LogSink\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1E\x0A\x0Bdestination\x18\x03 \x01(\x09B\x09\xE0A\x02\xFAA\x03\x0A\x01*\x12\x13\x0A\x06filter\x18\x05 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bdescription\x18\x12 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08disabled\x18\x13 \x01(\x08B\x03\xE0A\x01\x128\x0A\x0Aexclusions\x18\x10 \x03(\x0B2\x1F.google.logging.v2.LogExclusionB\x03\xE0A\x01\x12K\x0A\x15output_version_format\x18\x06 \x01(\x0E2(.google.logging.v2.LogSink.VersionFormatB\x02\x18\x01\x12\x1C\x0A\x0Fwriter_identity\x18\x08 \x01(\x09B\x03\xE0A\x03\x12\x1D\x0A\x10include_children\x18\x09 \x01(\x08B\x03\xE0A\x01\x12C\x0A\x10bigquery_options\x18\x0C \x01(\x0B2\".google.logging.v2.BigQueryOptionsB\x03\xE0A\x01H\x00\x124\x0A\x0Bcreate_time\x18\x0D \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x0E \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"?\x0A\x0DVersionFormat\x12\x1E\x0A\x1AVERSION_FORMAT_UNSPECIFIED\x10\x00\x12\x06\x0A\x02V2\x10\x01\x12\x06\x0A\x02V1\x10\x02:\xBF\x01\xEAA\xBB\x01\x0A\x1Elogging.googleapis.com/LogSink\x12\x1Fprojects/{project}/sinks/{sink}\x12)organizations/{organization}/sinks/{sink}\x12\x1Dfolders/{folder}/sinks/{sink}\x12.billingAccounts/{billing_account}/sinks/{sink}B\x09\x0A\x07options\"*\x0A\x0FBigQueryDataset\x12\x17\x0A\x0Adataset_id\x18\x01 \x01(\x09B\x03\xE0A\x03\"\xB5\x04\x0A\x04Link\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x02 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12?\x0A\x0Flifecycle_state\x18\x04 \x01(\x0E2!.google.logging.v2.LifecycleStateB\x03\xE0A\x03\x12<\x0A\x10bigquery_dataset\x18\x05 \x01(\x0B2\".google.logging.v2.BigQueryDataset:\xD4\x02\xEAA\xD0\x02\x0A\x1Blogging.googleapis.com/Link\x12Eprojects/{project}/locations/{location}/buckets/{bucket}/links/{link}\x12Oorganizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}\x12Cfolders/{folder}/locations/{location}/buckets/{bucket}/links/{link}\x12TbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link}\"g\x0A\x0FBigQueryOptions\x12#\x0A\x16use_partitioned_tables\x18\x01 \x01(\x08B\x03\xE0A\x01\x12/\x0A\"uses_timestamp_column_partitioning\x18\x03 \x01(\x08B\x03\xE0A\x03\"\x7F\x0A\x12ListBucketsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 logging.googleapis.com/LogBucket\x12\x17\x0A\x0Apage_token\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\"]\x0A\x13ListBucketsResponse\x12-\x0A\x07buckets\x18\x01 \x03(\x0B2\x1C.google.logging.v2.LogBucket\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x9A\x01\x0A\x13CreateBucketRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 logging.googleapis.com/LogBucket\x12\x16\x0A\x09bucket_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x121\x0A\x06bucket\x18\x03 \x01(\x0B2\x1C.google.logging.v2.LogBucketB\x03\xE0A\x02\"\xB6\x01\x0A\x13UpdateBucketRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A logging.googleapis.com/LogBucket\x121\x0A\x06bucket\x18\x02 \x01(\x0B2\x1C.google.logging.v2.LogBucketB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x04 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\"J\x0A\x10GetBucketRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A logging.googleapis.com/LogBucket\"M\x0A\x13DeleteBucketRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A logging.googleapis.com/LogBucket\"O\x0A\x15UndeleteBucketRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A logging.googleapis.com/LogBucket\"X\x0A\x10ListViewsRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x17\x0A\x0Apage_token\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\"W\x0A\x11ListViewsResponse\x12)\x0A\x05views\x18\x01 \x03(\x0B2\x1A.google.logging.v2.LogView\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"m\x0A\x11CreateViewRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x14\x0A\x07view_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12-\x0A\x04view\x18\x03 \x01(\x0B2\x1A.google.logging.v2.LogViewB\x03\xE0A\x02\"\x8B\x01\x0A\x11UpdateViewRequest\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12-\x0A\x04view\x18\x02 \x01(\x0B2\x1A.google.logging.v2.LogViewB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x04 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"F\x0A\x0EGetViewRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Elogging.googleapis.com/LogView\"I\x0A\x11DeleteViewRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Elogging.googleapis.com/LogView\"{\x0A\x10ListSinksRequest\x126\x0A\x06parent\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x12\x1Elogging.googleapis.com/LogSink\x12\x17\x0A\x0Apage_token\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\"W\x0A\x11ListSinksResponse\x12)\x0A\x05sinks\x18\x01 \x03(\x0B2\x1A.google.logging.v2.LogSink\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"K\x0A\x0EGetSinkRequest\x129\x0A\x09sink_name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Elogging.googleapis.com/LogSink\"\x9F\x01\x0A\x11CreateSinkRequest\x126\x0A\x06parent\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x12\x1Elogging.googleapis.com/LogSink\x12-\x0A\x04sink\x18\x02 \x01(\x0B2\x1A.google.logging.v2.LogSinkB\x03\xE0A\x02\x12#\x0A\x16unique_writer_identity\x18\x03 \x01(\x08B\x03\xE0A\x01\"\xD8\x01\x0A\x11UpdateSinkRequest\x129\x0A\x09sink_name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Elogging.googleapis.com/LogSink\x12-\x0A\x04sink\x18\x02 \x01(\x0B2\x1A.google.logging.v2.LogSinkB\x03\xE0A\x02\x12#\x0A\x16unique_writer_identity\x18\x03 \x01(\x08B\x03\xE0A\x01\x124\x0A\x0Bupdate_mask\x18\x04 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"N\x0A\x11DeleteSinkRequest\x129\x0A\x09sink_name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Elogging.googleapis.com/LogSink\"\x8A\x01\x0A\x11CreateLinkRequest\x123\x0A\x06parent\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x12\x1Blogging.googleapis.com/Link\x12*\x0A\x04link\x18\x02 \x01(\x0B2\x17.google.logging.v2.LinkB\x03\xE0A\x02\x12\x14\x0A\x07link_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"F\x0A\x11DeleteLinkRequest\x121\x0A\x04name\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x0A\x1Blogging.googleapis.com/Link\"x\x0A\x10ListLinksRequest\x123\x0A\x06parent\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x12\x1Blogging.googleapis.com/Link\x12\x17\x0A\x0Apage_token\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\"T\x0A\x11ListLinksResponse\x12&\x0A\x05links\x18\x01 \x03(\x0B2\x17.google.logging.v2.Link\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"C\x0A\x0EGetLinkRequest\x121\x0A\x04name\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x0A\x1Blogging.googleapis.com/Link\"\xC2\x03\x0A\x0CLogExclusion\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x03 \x01(\x09B\x03\xE0A\x02\x12\x15\x0A\x08disabled\x18\x04 \x01(\x08B\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03:\xEC\x01\xEAA\xE8\x01\x0A#logging.googleapis.com/LogExclusion\x12)projects/{project}/exclusions/{exclusion}\x123organizations/{organization}/exclusions/{exclusion}\x12'folders/{folder}/exclusions/{exclusion}\x128billingAccounts/{billing_account}/exclusions/{exclusion}\"\x85\x01\x0A\x15ListExclusionsRequest\x12;\x0A\x06parent\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x12#logging.googleapis.com/LogExclusion\x12\x17\x0A\x0Apage_token\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\"f\x0A\x16ListExclusionsResponse\x123\x0A\x0Aexclusions\x18\x01 \x03(\x0B2\x1F.google.logging.v2.LogExclusion\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"P\x0A\x13GetExclusionRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#logging.googleapis.com/LogExclusion\"\x8E\x01\x0A\x16CreateExclusionRequest\x12;\x0A\x06parent\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x12#logging.googleapis.com/LogExclusion\x127\x0A\x09exclusion\x18\x02 \x01(\x0B2\x1F.google.logging.v2.LogExclusionB\x03\xE0A\x02\"\xC2\x01\x0A\x16UpdateExclusionRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#logging.googleapis.com/LogExclusion\x127\x0A\x09exclusion\x18\x02 \x01(\x0B2\x1F.google.logging.v2.LogExclusionB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x03 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\"S\x0A\x16DeleteExclusionRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#logging.googleapis.com/LogExclusion\"S\x0A\x16GetCmekSettingsRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#logging.googleapis.com/CmekSettings\"\xA1\x01\x0A\x19UpdateCmekSettingsRequest\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12;\x0A\x0Dcmek_settings\x18\x02 \x01(\x0B2\x1F.google.logging.v2.CmekSettingsB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x03 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"\xBD\x02\x0A\x0CCmekSettings\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x14\x0A\x0Ckms_key_name\x18\x02 \x01(\x09\x12\x1C\x0A\x14kms_key_version_name\x18\x04 \x01(\x09\x12\x1F\x0A\x12service_account_id\x18\x03 \x01(\x09B\x03\xE0A\x03:\xC4\x01\xEAA\xC0\x01\x0A#logging.googleapis.com/CmekSettings\x12\x1Fprojects/{project}/cmekSettings\x12)organizations/{organization}/cmekSettings\x12\x1Dfolders/{folder}/cmekSettings\x12.billingAccounts/{billing_account}/cmekSettings\"K\x0A\x12GetSettingsRequest\x125\x0A\x04name\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Flogging.googleapis.com/Settings\"\x94\x01\x0A\x15UpdateSettingsRequest\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x122\x0A\x08settings\x18\x02 \x01(\x0B2\x1B.google.logging.v2.SettingsB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x03 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"\xD2\x02\x0A\x08Settings\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x19\x0A\x0Ckms_key_name\x18\x02 \x01(\x09B\x03\xE0A\x01\x12#\x0A\x16kms_service_account_id\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x1D\x0A\x10storage_location\x18\x04 \x01(\x09B\x03\xE0A\x01\x12!\x0A\x14disable_default_sink\x18\x05 \x01(\x08B\x03\xE0A\x01:\xB0\x01\xEAA\xAC\x01\x0A\x1Flogging.googleapis.com/Settings\x12\x1Bprojects/{project}/settings\x12%organizations/{organization}/settings\x12\x19folders/{folder}/settings\x12*billingAccounts/{billing_account}/settings\"Y\x0A\x15CopyLogEntriesRequest\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x06filter\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bdestination\x18\x04 \x01(\x09B\x03\xE0A\x02\"\xAE\x02\x0A\x16CopyLogEntriesMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x120\x0A\x05state\x18\x03 \x01(\x0E2!.google.logging.v2.OperationState\x12\x1E\x0A\x16cancellation_requested\x18\x04 \x01(\x08\x129\x0A\x07request\x18\x05 \x01(\x0B2(.google.logging.v2.CopyLogEntriesRequest\x12\x10\x0A\x08progress\x18\x06 \x01(\x05\x12\x17\x0A\x0Fwriter_identity\x18\x07 \x01(\x09\":\x0A\x16CopyLogEntriesResponse\x12 \x0A\x18log_entries_copied_count\x18\x01 \x01(\x03\"\xBD\x02\x0A\x0EBucketMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x120\x0A\x05state\x18\x03 \x01(\x0E2!.google.logging.v2.OperationState\x12G\x0A\x15create_bucket_request\x18\x04 \x01(\x0B2&.google.logging.v2.CreateBucketRequestH\x00\x12G\x0A\x15update_bucket_request\x18\x05 \x01(\x0B2&.google.logging.v2.UpdateBucketRequestH\x00B\x09\x0A\x07request\"\xB3\x02\x0A\x0CLinkMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x120\x0A\x05state\x18\x03 \x01(\x0E2!.google.logging.v2.OperationState\x12C\x0A\x13create_link_request\x18\x04 \x01(\x0B2\$.google.logging.v2.CreateLinkRequestH\x00\x12C\x0A\x13delete_link_request\x18\x05 \x01(\x0B2\$.google.logging.v2.DeleteLinkRequestH\x00B\x09\x0A\x07request\"1\x0A\x10LocationMetadata\x12\x1D\x0A\x15log_analytics_enabled\x18\x01 \x01(\x08*\xF4\x01\x0A\x0EOperationState\x12\x1F\x0A\x1BOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x1D\x0A\x19OPERATION_STATE_SCHEDULED\x10\x01\x12+\x0A'OPERATION_STATE_WAITING_FOR_PERMISSIONS\x10\x02\x12\x1B\x0A\x17OPERATION_STATE_RUNNING\x10\x03\x12\x1D\x0A\x19OPERATION_STATE_SUCCEEDED\x10\x04\x12\x1A\x0A\x16OPERATION_STATE_FAILED\x10\x05\x12\x1D\x0A\x19OPERATION_STATE_CANCELLED\x10\x06*{\x0A\x0ELifecycleState\x12\x1F\x0A\x1BLIFECYCLE_STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x14\x0A\x10DELETE_REQUESTED\x10\x02\x12\x0C\x0A\x08UPDATING\x10\x03\x12\x0C\x0A\x08CREATING\x10\x04\x12\x0A\x0A\x06FAILED\x10\x05*V\x0A\x09IndexType\x12\x1A\x0A\x16INDEX_TYPE_UNSPECIFIED\x10\x00\x12\x15\x0A\x11INDEX_TYPE_STRING\x10\x01\x12\x16\x0A\x12INDEX_TYPE_INTEGER\x10\x022\x9FY\x0A\x0FConfigServiceV2\x12\xDC\x02\x0A\x0BListBuckets\x12%.google.logging.v2.ListBucketsRequest\x1A&.google.logging.v2.ListBucketsResponse\"\xFD\x01\xDAA\x06parent\x82\xD3\xE4\x93\x02\xED\x01\x12\$/v2/{parent=*/*/locations/*}/bucketsZ-\x12+/v2/{parent=projects/*/locations/*}/bucketsZ2\x120/v2/{parent=organizations/*/locations/*}/bucketsZ,\x12*/v2/{parent=folders/*/locations/*}/bucketsZ4\x122/v2/{parent=billingAccounts/*/locations/*}/buckets\x12\xC5\x02\x0A\x09GetBucket\x12#.google.logging.v2.GetBucketRequest\x1A\x1C.google.logging.v2.LogBucket\"\xF4\x01\x82\xD3\xE4\x93\x02\xED\x01\x12\$/v2/{name=*/*/locations/*/buckets/*}Z-\x12+/v2/{name=projects/*/locations/*/buckets/*}Z2\x120/v2/{name=organizations/*/locations/*/buckets/*}Z,\x12*/v2/{name=folders/*/locations/*/buckets/*}Z4\x122/v2/{name=billingAccounts/*/locations/*/buckets/*}\x12\xD3\x03\x0A\x11CreateBucketAsync\x12&.google.logging.v2.CreateBucketRequest\x1A\x1D.google.longrunning.Operation\"\xF6\x02\xCAA\x1B\x0A\x09LogBucket\x12\x0EBucketMetadata\x82\xD3\xE4\x93\x02\xD1\x02\"0/v2/{parent=*/*/locations/*}/buckets:createAsync:\x06bucketZA\"7/v2/{parent=projects/*/locations/*}/buckets:createAsync:\x06bucketZF\"/v2/{parent=billingAccounts/*/locations/*}/buckets:createAsync:\x06bucket\x12\xD3\x03\x0A\x11UpdateBucketAsync\x12&.google.logging.v2.UpdateBucketRequest\x1A\x1D.google.longrunning.Operation\"\xF6\x02\xCAA\x1B\x0A\x09LogBucket\x12\x0EBucketMetadata\x82\xD3\xE4\x93\x02\xD1\x02\"0/v2/{name=*/*/locations/*/buckets/*}:updateAsync:\x06bucketZA\"7/v2/{name=projects/*/locations/*/buckets/*}:updateAsync:\x06bucketZF\"/v2/{name=billingAccounts/*/locations/*/buckets/*}:updateAsync:\x06bucket\x12\xF3\x02\x0A\x0CCreateBucket\x12&.google.logging.v2.CreateBucketRequest\x1A\x1C.google.logging.v2.LogBucket\"\x9C\x02\x82\xD3\xE4\x93\x02\x95\x02\"\$/v2/{parent=*/*/locations/*}/buckets:\x06bucketZ5\"+/v2/{parent=projects/*/locations/*}/buckets:\x06bucketZ:\"0/v2/{parent=organizations/*/locations/*}/buckets:\x06bucketZ4\"*/v2/{parent=folders/*/locations/*}/buckets:\x06bucketZ<\"2/v2/{parent=billingAccounts/*/locations/*}/buckets:\x06bucket\x12\xF3\x02\x0A\x0CUpdateBucket\x12&.google.logging.v2.UpdateBucketRequest\x1A\x1C.google.logging.v2.LogBucket\"\x9C\x02\x82\xD3\xE4\x93\x02\x95\x022\$/v2/{name=*/*/locations/*/buckets/*}:\x06bucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\x06bucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\x06bucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\x06bucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\x06bucket\x12\xC5\x02\x0A\x0CDeleteBucket\x12&.google.logging.v2.DeleteBucketRequest\x1A\x16.google.protobuf.Empty\"\xF4\x01\x82\xD3\xE4\x93\x02\xED\x01*\$/v2/{name=*/*/locations/*/buckets/*}Z-*+/v2/{name=projects/*/locations/*/buckets/*}Z2*0/v2/{name=organizations/*/locations/*/buckets/*}Z,**/v2/{name=folders/*/locations/*/buckets/*}Z4*2/v2/{name=billingAccounts/*/locations/*/buckets/*}\x12\x85\x03\x0A\x0EUndeleteBucket\x12(.google.logging.v2.UndeleteBucketRequest\x1A\x16.google.protobuf.Empty\"\xB0\x02\x82\xD3\xE4\x93\x02\xA9\x02\"-/v2/{name=*/*/locations/*/buckets/*}:undelete:\x01*Z9\"4/v2/{name=projects/*/locations/*/buckets/*}:undelete:\x01*Z>\"9/v2/{name=organizations/*/locations/*/buckets/*}:undelete:\x01*Z8\"3/v2/{name=folders/*/locations/*/buckets/*}:undelete:\x01*Z@\";/v2/{name=billingAccounts/*/locations/*/buckets/*}:undelete:\x01*\x12\xFE\x02\x0A\x09ListViews\x12#.google.logging.v2.ListViewsRequest\x1A\$.google.logging.v2.ListViewsResponse\"\xA5\x02\xDAA\x06parent\x82\xD3\xE4\x93\x02\x95\x02\x12,/v2/{parent=*/*/locations/*/buckets/*}/viewsZ5\x123/v2/{parent=projects/*/locations/*/buckets/*}/viewsZ:\x128/v2/{parent=organizations/*/locations/*/buckets/*}/viewsZ4\x122/v2/{parent=folders/*/locations/*/buckets/*}/viewsZ<\x12:/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views\x12\xE7\x02\x0A\x07GetView\x12!.google.logging.v2.GetViewRequest\x1A\x1A.google.logging.v2.LogView\"\x9C\x02\x82\xD3\xE4\x93\x02\x95\x02\x12,/v2/{name=*/*/locations/*/buckets/*/views/*}Z5\x123/v2/{name=projects/*/locations/*/buckets/*/views/*}Z:\x128/v2/{name=organizations/*/locations/*/buckets/*/views/*}Z4\x122/v2/{name=folders/*/locations/*/buckets/*/views/*}Z<\x12:/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}\x12\x8B\x03\x0A\x0ACreateView\x12\$.google.logging.v2.CreateViewRequest\x1A\x1A.google.logging.v2.LogView\"\xBA\x02\x82\xD3\xE4\x93\x02\xB3\x02\",/v2/{parent=*/*/locations/*/buckets/*}/views:\x04viewZ;\"3/v2/{parent=projects/*/locations/*/buckets/*}/views:\x04viewZ@\"8/v2/{parent=organizations/*/locations/*/buckets/*}/views:\x04viewZ:\"2/v2/{parent=folders/*/locations/*/buckets/*}/views:\x04viewZB\":/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views:\x04view\x12\x8B\x03\x0A\x0AUpdateView\x12\$.google.logging.v2.UpdateViewRequest\x1A\x1A.google.logging.v2.LogView\"\xBA\x02\x82\xD3\xE4\x93\x02\xB3\x022,/v2/{name=*/*/locations/*/buckets/*/views/*}:\x04viewZ;23/v2/{name=projects/*/locations/*/buckets/*/views/*}:\x04viewZ@28/v2/{name=organizations/*/locations/*/buckets/*/views/*}:\x04viewZ:22/v2/{name=folders/*/locations/*/buckets/*/views/*}:\x04viewZB2:/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}:\x04view\x12\xE9\x02\x0A\x0ADeleteView\x12\$.google.logging.v2.DeleteViewRequest\x1A\x16.google.protobuf.Empty\"\x9C\x02\x82\xD3\xE4\x93\x02\x95\x02*,/v2/{name=*/*/locations/*/buckets/*/views/*}Z5*3/v2/{name=projects/*/locations/*/buckets/*/views/*}Z:*8/v2/{name=organizations/*/locations/*/buckets/*/views/*}Z4*2/v2/{name=folders/*/locations/*/buckets/*/views/*}Z<*:/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}\x12\x90\x02\x0A\x09ListSinks\x12#.google.logging.v2.ListSinksRequest\x1A\$.google.logging.v2.ListSinksResponse\"\xB7\x01\xDAA\x06parent\x82\xD3\xE4\x93\x02\xA7\x01\x12\x16/v2/{parent=*/*}/sinksZ\x1F\x12\x1D/v2/{parent=projects/*}/sinksZ\$\x12\"/v2/{parent=organizations/*}/sinksZ\x1E\x12\x1C/v2/{parent=folders/*}/sinksZ&\x12\$/v2/{parent=billingAccounts/*}/sinks\x12\x9E\x02\x0A\x07GetSink\x12!.google.logging.v2.GetSinkRequest\x1A\x1A.google.logging.v2.LogSink\"\xD3\x01\xDAA\x09sink_name\x82\xD3\xE4\x93\x02\xC0\x01\x12\x1B/v2/{sink_name=*/*/sinks/*}Z\$\x12\"/v2/{sink_name=projects/*/sinks/*}Z)\x12'/v2/{sink_name=organizations/*/sinks/*}Z#\x12!/v2/{sink_name=folders/*/sinks/*}Z+\x12)/v2/{sink_name=billingAccounts/*/sinks/*}\x12\xAB\x02\x0A\x0ACreateSink\x12\$.google.logging.v2.CreateSinkRequest\x1A\x1A.google.logging.v2.LogSink\"\xDA\x01\xDAA\x0Bparent,sink\x82\xD3\xE4\x93\x02\xC5\x01\"\x16/v2/{parent=*/*}/sinks:\x04sinkZ%\"\x1D/v2/{parent=projects/*}/sinks:\x04sinkZ*\"\"/v2/{parent=organizations/*}/sinks:\x04sinkZ\$\"\x1C/v2/{parent=folders/*}/sinks:\x04sinkZ,\"\$/v2/{parent=billingAccounts/*}/sinks:\x04sink\x12\x9F\x04\x0A\x0AUpdateSink\x12\$.google.logging.v2.UpdateSinkRequest\x1A\x1A.google.logging.v2.LogSink\"\xCE\x03\xDAA\x1Asink_name,sink,update_mask\xDAA\x0Esink_name,sink\x82\xD3\xE4\x93\x02\x99\x03\x1A\x1B/v2/{sink_name=*/*/sinks/*}:\x04sinkZ*\x1A\"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/\x1A'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)\x1A!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ1\x1A)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sinkZ*2\"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/2'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sink\x12\xA0\x02\x0A\x0ADeleteSink\x12\$.google.logging.v2.DeleteSinkRequest\x1A\x16.google.protobuf.Empty\"\xD3\x01\xDAA\x09sink_name\x82\xD3\xE4\x93\x02\xC0\x01*\x1B/v2/{sink_name=*/*/sinks/*}Z\$*\"/v2/{sink_name=projects/*/sinks/*}Z)*'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\x12\xBB\x03\x0A\x0ACreateLink\x12\$.google.logging.v2.CreateLinkRequest\x1A\x1D.google.longrunning.Operation\"\xE7\x02\xCAA\x14\x0A\x04Link\x12\x0CLinkMetadata\xDAA\x13parent,link,link_id\x82\xD3\xE4\x93\x02\xB3\x02\",/v2/{parent=*/*/locations/*/buckets/*}/links:\x04linkZ;\"3/v2/{parent=projects/*/locations/*/buckets/*}/links:\x04linkZ@\"8/v2/{parent=organizations/*/locations/*/buckets/*}/links:\x04linkZ:\"2/v2/{parent=folders/*/locations/*/buckets/*}/links:\x04linkZB\":/v2/{parent=billingAccounts/*/locations/*/buckets/*}/links:\x04link\x12\x9F\x03\x0A\x0ADeleteLink\x12\$.google.logging.v2.DeleteLinkRequest\x1A\x1D.google.longrunning.Operation\"\xCB\x02\xCAA%\x0A\x15google.protobuf.Empty\x12\x0CLinkMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02\x95\x02*,/v2/{name=*/*/locations/*/buckets/*/links/*}Z5*3/v2/{name=projects/*/locations/*/buckets/*/links/*}Z:*8/v2/{name=organizations/*/locations/*/buckets/*/links/*}Z4*2/v2/{name=folders/*/locations/*/buckets/*/links/*}Z<*:/v2/{name=billingAccounts/*/locations/*/buckets/*/links/*}\x12\xFE\x02\x0A\x09ListLinks\x12#.google.logging.v2.ListLinksRequest\x1A\$.google.logging.v2.ListLinksResponse\"\xA5\x02\xDAA\x06parent\x82\xD3\xE4\x93\x02\x95\x02\x12,/v2/{parent=*/*/locations/*/buckets/*}/linksZ5\x123/v2/{parent=projects/*/locations/*/buckets/*}/linksZ:\x128/v2/{parent=organizations/*/locations/*/buckets/*}/linksZ4\x122/v2/{parent=folders/*/locations/*/buckets/*}/linksZ<\x12:/v2/{parent=billingAccounts/*/locations/*/buckets/*}/links\x12\xEB\x02\x0A\x07GetLink\x12!.google.logging.v2.GetLinkRequest\x1A\x17.google.logging.v2.Link\"\xA3\x02\xDAA\x04name\x82\xD3\xE4\x93\x02\x95\x02\x12,/v2/{name=*/*/locations/*/buckets/*/links/*}Z5\x123/v2/{name=projects/*/locations/*/buckets/*/links/*}Z:\x128/v2/{name=organizations/*/locations/*/buckets/*/links/*}Z4\x122/v2/{name=folders/*/locations/*/buckets/*/links/*}Z<\x12:/v2/{name=billingAccounts/*/locations/*/buckets/*/links/*}\x12\xB8\x02\x0A\x0EListExclusions\x12(.google.logging.v2.ListExclusionsRequest\x1A).google.logging.v2.ListExclusionsResponse\"\xD0\x01\xDAA\x06parent\x82\xD3\xE4\x93\x02\xC0\x01\x12\x1B/v2/{parent=*/*}/exclusionsZ\$\x12\"/v2/{parent=projects/*}/exclusionsZ)\x12'/v2/{parent=organizations/*}/exclusionsZ#\x12!/v2/{parent=folders/*}/exclusionsZ+\x12)/v2/{parent=billingAccounts/*}/exclusions\x12\xA8\x02\x0A\x0CGetExclusion\x12&.google.logging.v2.GetExclusionRequest\x1A\x1F.google.logging.v2.LogExclusion\"\xCE\x01\xDAA\x04name\x82\xD3\xE4\x93\x02\xC0\x01\x12\x1B/v2/{name=*/*/exclusions/*}Z\$\x12\"/v2/{name=projects/*/exclusions/*}Z)\x12'/v2/{name=organizations/*/exclusions/*}Z#\x12!/v2/{name=folders/*/exclusions/*}Z+\x12)/v2/{name=billingAccounts/*/exclusions/*}\x12\xF1\x02\x0A\x0FCreateExclusion\x12).google.logging.v2.CreateExclusionRequest\x1A\x1F.google.logging.v2.LogExclusion\"\x91\x02\xDAA\x10parent,exclusion\x82\xD3\xE4\x93\x02\xF7\x01\"\x1B/v2/{parent=*/*}/exclusions:\x09exclusionZ/\"\"/v2/{parent=projects/*}/exclusions:\x09exclusionZ4\"'/v2/{parent=organizations/*}/exclusions:\x09exclusionZ.\"!/v2/{parent=folders/*}/exclusions:\x09exclusionZ6\")/v2/{parent=billingAccounts/*}/exclusions:\x09exclusion\x12\xFB\x02\x0A\x0FUpdateExclusion\x12).google.logging.v2.UpdateExclusionRequest\x1A\x1F.google.logging.v2.LogExclusion\"\x9B\x02\xDAA\x1Aname,exclusion,update_mask\x82\xD3\xE4\x93\x02\xF7\x012\x1B/v2/{name=*/*/exclusions/*}:\x09exclusionZ/2\"/v2/{name=projects/*/exclusions/*}:\x09exclusionZ42'/v2/{name=organizations/*/exclusions/*}:\x09exclusionZ.2!/v2/{name=folders/*/exclusions/*}:\x09exclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\x09exclusion\x12\xA5\x02\x0A\x0FDeleteExclusion\x12).google.logging.v2.DeleteExclusionRequest\x1A\x16.google.protobuf.Empty\"\xCE\x01\xDAA\x04name\x82\xD3\xE4\x93\x02\xC0\x01*\x1B/v2/{name=*/*/exclusions/*}Z\$*\"/v2/{name=projects/*/exclusions/*}Z)*'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\x12\xA7\x02\x0A\x0FGetCmekSettings\x12).google.logging.v2.GetCmekSettingsRequest\x1A\x1F.google.logging.v2.CmekSettings\"\xC7\x01\x82\xD3\xE4\x93\x02\xC0\x01\x12\x1B/v2/{name=*/*}/cmekSettingsZ\$\x12\"/v2/{name=projects/*}/cmekSettingsZ)\x12'/v2/{name=organizations/*}/cmekSettingsZ#\x12!/v2/{name=folders/*}/cmekSettingsZ+\x12)/v2/{name=billingAccounts/*}/cmekSettings\x12\xD1\x01\x0A\x12UpdateCmekSettings\x12,.google.logging.v2.UpdateCmekSettingsRequest\x1A\x1F.google.logging.v2.CmekSettings\"l\x82\xD3\xE4\x93\x02f2\x1B/v2/{name=*/*}/cmekSettings:\x0Dcmek_settingsZ82'/v2/{name=organizations/*}/cmekSettings:\x0Dcmek_settings\x12\x8E\x02\x0A\x0BGetSettings\x12%.google.logging.v2.GetSettingsRequest\x1A\x1B.google.logging.v2.Settings\"\xBA\x01\xDAA\x04name\x82\xD3\xE4\x93\x02\xAC\x01\x12\x17/v2/{name=*/*}/settingsZ \x12\x1E/v2/{name=projects/*}/settingsZ%\x12#/v2/{name=organizations/*}/settingsZ\x1F\x12\x1D/v2/{name=folders/*}/settingsZ'\x12%/v2/{name=billingAccounts/*}/settings\x12\xF6\x01\x0A\x0EUpdateSettings\x12(.google.logging.v2.UpdateSettingsRequest\x1A\x1B.google.logging.v2.Settings\"\x9C\x01\xDAA\x14settings,update_mask\x82\xD3\xE4\x93\x02\x7F2\x17/v2/{name=*/*}/settings:\x08settingsZ/2#/v2/{name=organizations/*}/settings:\x08settingsZ)2\x1D/v2/{name=folders/*}/settings:\x08settings\x12\xA9\x01\x0A\x0ECopyLogEntries\x12(.google.logging.v2.CopyLogEntriesRequest\x1A\x1D.google.longrunning.Operation\"N\xCAA0\x0A\x16CopyLogEntriesResponse\x12\x16CopyLogEntriesMetadata\x82\xD3\xE4\x93\x02\x15\"\x10/v2/entries:copy:\x01*\x1A\xDF\x01\xCAA\x16logging.googleapis.com\xD2A\xC2\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.readB\xD6\x03\x0A\x15com.google.logging.v2B\x12LoggingConfigProtoP\x01Z5cloud.google.com/go/logging/apiv2/loggingpb;loggingpb\xF8\x01\x01\xAA\x02\x17Google.Cloud.Logging.V2\xCA\x02\x17Google\\Cloud\\Logging\\V2\xEA\x02\x1AGoogle::Cloud::Logging::V2\xEAA`\x0A+logging.googleapis.com/OrganizationLocation\x121organizations/{organization}/locations/{location}\xEAAN\x0A%logging.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xEAAg\x0A-logging.googleapis.com/BillingAccountLocation\x126billingAccounts/{billing_account}/locations/{location}b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingMetrics.php b/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingMetrics.php new file mode 100644 index 000000000000..c655d08fd1cb --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingMetrics.php @@ -0,0 +1,32 @@ +internalAddGeneratedFile( + "\x0A\xF2\x16\x0A'google/logging/v2/logging_metrics.proto\x12\x11google.logging.v2\x1A\x17google/api/client.proto\x1A\x1Dgoogle/api/distribution.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x17google/api/metric.proto\x1A\x19google/api/resource.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xBD\x05\x0A\x09LogMetric\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x03 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bbucket_name\x18\x0D \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08disabled\x18\x0C \x01(\x08B\x03\xE0A\x01\x12<\x0A\x11metric_descriptor\x18\x05 \x01(\x0B2\x1C.google.api.MetricDescriptorB\x03\xE0A\x01\x12\x1C\x0A\x0Fvalue_extractor\x18\x06 \x01(\x09B\x03\xE0A\x01\x12P\x0A\x10label_extractors\x18\x07 \x03(\x0B21.google.logging.v2.LogMetric.LabelExtractorsEntryB\x03\xE0A\x01\x12C\x0A\x0Ebucket_options\x18\x08 \x01(\x0B2&.google.api.Distribution.BucketOptionsB\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x0A \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12<\x0A\x07version\x18\x04 \x01(\x0E2'.google.logging.v2.LogMetric.ApiVersionB\x02\x18\x01\x1A6\x0A\x14LabelExtractorsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x1C\x0A\x0AApiVersion\x12\x06\x0A\x02V2\x10\x00\x12\x06\x0A\x02V1\x10\x01:J\xEAAG\x0A logging.googleapis.com/LogMetric\x12#projects/{project}/metrics/{metric}\"\x8D\x01\x0A\x15ListLogMetricsRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+cloudresourcemanager.googleapis.com/Project\x12\x17\x0A\x0Apage_token\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\"`\x0A\x16ListLogMetricsResponse\x12-\x0A\x07metrics\x18\x01 \x03(\x0B2\x1C.google.logging.v2.LogMetric\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"T\x0A\x13GetLogMetricRequest\x12=\x0A\x0Bmetric_name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A logging.googleapis.com/LogMetric\"\x85\x01\x0A\x16CreateLogMetricRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 logging.googleapis.com/LogMetric\x121\x0A\x06metric\x18\x02 \x01(\x0B2\x1C.google.logging.v2.LogMetricB\x03\xE0A\x02\"\x8A\x01\x0A\x16UpdateLogMetricRequest\x12=\x0A\x0Bmetric_name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A logging.googleapis.com/LogMetric\x121\x0A\x06metric\x18\x02 \x01(\x0B2\x1C.google.logging.v2.LogMetricB\x03\xE0A\x02\"W\x0A\x16DeleteLogMetricRequest\x12=\x0A\x0Bmetric_name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A logging.googleapis.com/LogMetric2\xAE\x08\x0A\x10MetricsServiceV2\x12\x97\x01\x0A\x0EListLogMetrics\x12(.google.logging.v2.ListLogMetricsRequest\x1A).google.logging.v2.ListLogMetricsResponse\"0\xDAA\x06parent\x82\xD3\xE4\x93\x02!\x12\x1F/v2/{parent=projects/*}/metrics\x12\x92\x01\x0A\x0CGetLogMetric\x12&.google.logging.v2.GetLogMetricRequest\x1A\x1C.google.logging.v2.LogMetric\"<\xDAA\x0Bmetric_name\x82\xD3\xE4\x93\x02(\x12&/v2/{metric_name=projects/*/metrics/*}\x12\x9B\x01\x0A\x0FCreateLogMetric\x12).google.logging.v2.CreateLogMetricRequest\x1A\x1C.google.logging.v2.LogMetric\"?\xDAA\x0Dparent,metric\x82\xD3\xE4\x93\x02)\"\x1F/v2/{parent=projects/*}/metrics:\x06metric\x12\xA7\x01\x0A\x0FUpdateLogMetric\x12).google.logging.v2.UpdateLogMetricRequest\x1A\x1C.google.logging.v2.LogMetric\"K\xDAA\x12metric_name,metric\x82\xD3\xE4\x93\x020\x1A&/v2/{metric_name=projects/*/metrics/*}:\x06metric\x12\x92\x01\x0A\x0FDeleteLogMetric\x12).google.logging.v2.DeleteLogMetricRequest\x1A\x16.google.protobuf.Empty\"<\xDAA\x0Bmetric_name\x82\xD3\xE4\x93\x02(*&/v2/{metric_name=projects/*/metrics/*}\x1A\x8D\x02\xCAA\x16logging.googleapis.com\xD2A\xF0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xB9\x01\x0A\x15com.google.logging.v2B\x13LoggingMetricsProtoP\x01Z5cloud.google.com/go/logging/apiv2/loggingpb;loggingpb\xF8\x01\x01\xAA\x02\x17Google.Cloud.Logging.V2\xCA\x02\x17Google\\Cloud\\Logging\\V2\xEA\x02\x1AGoogle::Cloud::Logging::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryDataset.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryDataset.php new file mode 100644 index 000000000000..58ce65ad5a03 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryDataset.php @@ -0,0 +1,87 @@ +google.logging.v2.BigQueryDataset + */ +class BigQueryDataset extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The full resource name of the BigQuery dataset. The DATASET_ID + * will match the ID of the link, so the link must match the naming + * restrictions of BigQuery datasets (alphanumeric characters and underscores + * only). + * The dataset will have a resource path of + * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET_ID]" + * + * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $dataset_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $dataset_id + * Output only. The full resource name of the BigQuery dataset. The DATASET_ID + * will match the ID of the link, so the link must match the naming + * restrictions of BigQuery datasets (alphanumeric characters and underscores + * only). + * The dataset will have a resource path of + * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET_ID]" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The full resource name of the BigQuery dataset. The DATASET_ID + * will match the ID of the link, so the link must match the naming + * restrictions of BigQuery datasets (alphanumeric characters and underscores + * only). + * The dataset will have a resource path of + * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET_ID]" + * + * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDatasetId() + { + return $this->dataset_id; + } + + /** + * Output only. The full resource name of the BigQuery dataset. The DATASET_ID + * will match the ID of the link, so the link must match the naming + * restrictions of BigQuery datasets (alphanumeric characters and underscores + * only). + * The dataset will have a resource path of + * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET_ID]" + * + * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDatasetId($var) + { + GPBUtil::checkString($var, True); + $this->dataset_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryOptions.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryOptions.php new file mode 100644 index 000000000000..b1abb2c802b6 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryOptions.php @@ -0,0 +1,149 @@ +google.logging.v2.BigQueryOptions + */ +class BigQueryOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Whether to use [BigQuery's partition + * tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By + * default, Cloud Logging creates dated tables based on the log entries' + * timestamps, e.g. syslog_20170523. With partitioned tables the date suffix + * is no longer present and [special query + * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) + * has to be used instead. In both cases, tables are sharded based on UTC + * timezone. + * + * Generated from protobuf field bool use_partitioned_tables = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $use_partitioned_tables = false; + /** + * Output only. True if new timestamp column based partitioning is in use, + * false if legacy ingestion-time partitioning is in use. + * All new sinks will have this field set true and will use timestamp column + * based partitioning. If use_partitioned_tables is false, this value has no + * meaning and will be false. Legacy sinks using partitioned tables will have + * this field set to false. + * + * Generated from protobuf field bool uses_timestamp_column_partitioning = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uses_timestamp_column_partitioning = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $use_partitioned_tables + * Optional. Whether to use [BigQuery's partition + * tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By + * default, Cloud Logging creates dated tables based on the log entries' + * timestamps, e.g. syslog_20170523. With partitioned tables the date suffix + * is no longer present and [special query + * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) + * has to be used instead. In both cases, tables are sharded based on UTC + * timezone. + * @type bool $uses_timestamp_column_partitioning + * Output only. True if new timestamp column based partitioning is in use, + * false if legacy ingestion-time partitioning is in use. + * All new sinks will have this field set true and will use timestamp column + * based partitioning. If use_partitioned_tables is false, this value has no + * meaning and will be false. Legacy sinks using partitioned tables will have + * this field set to false. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Whether to use [BigQuery's partition + * tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By + * default, Cloud Logging creates dated tables based on the log entries' + * timestamps, e.g. syslog_20170523. With partitioned tables the date suffix + * is no longer present and [special query + * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) + * has to be used instead. In both cases, tables are sharded based on UTC + * timezone. + * + * Generated from protobuf field bool use_partitioned_tables = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUsePartitionedTables() + { + return $this->use_partitioned_tables; + } + + /** + * Optional. Whether to use [BigQuery's partition + * tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By + * default, Cloud Logging creates dated tables based on the log entries' + * timestamps, e.g. syslog_20170523. With partitioned tables the date suffix + * is no longer present and [special query + * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) + * has to be used instead. In both cases, tables are sharded based on UTC + * timezone. + * + * Generated from protobuf field bool use_partitioned_tables = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUsePartitionedTables($var) + { + GPBUtil::checkBool($var); + $this->use_partitioned_tables = $var; + + return $this; + } + + /** + * Output only. True if new timestamp column based partitioning is in use, + * false if legacy ingestion-time partitioning is in use. + * All new sinks will have this field set true and will use timestamp column + * based partitioning. If use_partitioned_tables is false, this value has no + * meaning and will be false. Legacy sinks using partitioned tables will have + * this field set to false. + * + * Generated from protobuf field bool uses_timestamp_column_partitioning = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getUsesTimestampColumnPartitioning() + { + return $this->uses_timestamp_column_partitioning; + } + + /** + * Output only. True if new timestamp column based partitioning is in use, + * false if legacy ingestion-time partitioning is in use. + * All new sinks will have this field set true and will use timestamp column + * based partitioning. If use_partitioned_tables is false, this value has no + * meaning and will be false. Legacy sinks using partitioned tables will have + * this field set to false. + * + * Generated from protobuf field bool uses_timestamp_column_partitioning = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setUsesTimestampColumnPartitioning($var) + { + GPBUtil::checkBool($var); + $this->uses_timestamp_column_partitioning = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BucketMetadata.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BucketMetadata.php new file mode 100644 index 000000000000..2c689587cea9 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BucketMetadata.php @@ -0,0 +1,230 @@ +google.logging.v2.BucketMetadata + */ +class BucketMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The create time of an operation. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The end time of an operation. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * State of an operation. + * + * Generated from protobuf field .google.logging.v2.OperationState state = 3; + */ + protected $state = 0; + protected $request; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The create time of an operation. + * @type \Google\Protobuf\Timestamp $end_time + * The end time of an operation. + * @type int $state + * State of an operation. + * @type \Google\Cloud\Logging\V2\CreateBucketRequest $create_bucket_request + * LongRunningCreateBucket RPC request. + * @type \Google\Cloud\Logging\V2\UpdateBucketRequest $update_bucket_request + * LongRunningUpdateBucket RPC request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * The create time of an operation. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The create time of an operation. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The end time of an operation. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The end time of an operation. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * State of an operation. + * + * Generated from protobuf field .google.logging.v2.OperationState state = 3; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * State of an operation. + * + * Generated from protobuf field .google.logging.v2.OperationState state = 3; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\OperationState::class); + $this->state = $var; + + return $this; + } + + /** + * LongRunningCreateBucket RPC request. + * + * Generated from protobuf field .google.logging.v2.CreateBucketRequest create_bucket_request = 4; + * @return \Google\Cloud\Logging\V2\CreateBucketRequest|null + */ + public function getCreateBucketRequest() + { + return $this->readOneof(4); + } + + public function hasCreateBucketRequest() + { + return $this->hasOneof(4); + } + + /** + * LongRunningCreateBucket RPC request. + * + * Generated from protobuf field .google.logging.v2.CreateBucketRequest create_bucket_request = 4; + * @param \Google\Cloud\Logging\V2\CreateBucketRequest $var + * @return $this + */ + public function setCreateBucketRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\CreateBucketRequest::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * LongRunningUpdateBucket RPC request. + * + * Generated from protobuf field .google.logging.v2.UpdateBucketRequest update_bucket_request = 5; + * @return \Google\Cloud\Logging\V2\UpdateBucketRequest|null + */ + public function getUpdateBucketRequest() + { + return $this->readOneof(5); + } + + public function hasUpdateBucketRequest() + { + return $this->hasOneof(5); + } + + /** + * LongRunningUpdateBucket RPC request. + * + * Generated from protobuf field .google.logging.v2.UpdateBucketRequest update_bucket_request = 5; + * @param \Google\Cloud\Logging\V2\UpdateBucketRequest $var + * @return $this + */ + public function setUpdateBucketRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\UpdateBucketRequest::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getRequest() + { + return $this->whichOneof("request"); + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CmekSettings.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CmekSettings.php new file mode 100644 index 000000000000..77f5f44951ad --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CmekSettings.php @@ -0,0 +1,320 @@ +google.logging.v2.CmekSettings + */ +class CmekSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the CMEK settings. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * The resource name for the configured Cloud KMS key. + * KMS key name format: + * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" + * For example: + * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` + * To enable CMEK for the Log Router, set this field to a valid + * `kms_key_name` for which the associated service account has the required + * cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. + * The Cloud KMS key used by the Log Router can be updated by changing the + * `kms_key_name` to a new valid key name or disabled by setting the key name + * to an empty string. Encryption operations that are in progress will be + * completed with the key that was in use when they started. Decryption + * operations will be completed using the key that was used at the time of + * encryption unless access to that key has been revoked. + * To disable CMEK for the Log Router, set this field to an empty string. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * Generated from protobuf field string kms_key_name = 2; + */ + protected $kms_key_name = ''; + /** + * The CryptoKeyVersion resource name for the configured Cloud KMS key. + * KMS key name format: + * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]" + * For example: + * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"` + * This is a read-only field used to convey the specific configured + * CryptoKeyVersion of `kms_key` that has been configured. It will be + * populated in cases where the CMEK settings are bound to a single key + * version. + * If this field is populated, the `kms_key` is tied to a specific + * CryptoKeyVersion. + * + * Generated from protobuf field string kms_key_version_name = 4; + */ + protected $kms_key_version_name = ''; + /** + * Output only. The service account that will be used by the Log Router to + * access your Cloud KMS key. + * Before enabling CMEK for Log Router, you must first assign the + * cloudkms.cryptoKeyEncrypterDecrypter role to the service account that + * the Log Router will use to access your Cloud KMS key. Use + * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to + * obtain the service account ID. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * Generated from protobuf field string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $service_account_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the CMEK settings. + * @type string $kms_key_name + * The resource name for the configured Cloud KMS key. + * KMS key name format: + * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" + * For example: + * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` + * To enable CMEK for the Log Router, set this field to a valid + * `kms_key_name` for which the associated service account has the required + * cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. + * The Cloud KMS key used by the Log Router can be updated by changing the + * `kms_key_name` to a new valid key name or disabled by setting the key name + * to an empty string. Encryption operations that are in progress will be + * completed with the key that was in use when they started. Decryption + * operations will be completed using the key that was used at the time of + * encryption unless access to that key has been revoked. + * To disable CMEK for the Log Router, set this field to an empty string. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * @type string $kms_key_version_name + * The CryptoKeyVersion resource name for the configured Cloud KMS key. + * KMS key name format: + * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]" + * For example: + * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"` + * This is a read-only field used to convey the specific configured + * CryptoKeyVersion of `kms_key` that has been configured. It will be + * populated in cases where the CMEK settings are bound to a single key + * version. + * If this field is populated, the `kms_key` is tied to a specific + * CryptoKeyVersion. + * @type string $service_account_id + * Output only. The service account that will be used by the Log Router to + * access your Cloud KMS key. + * Before enabling CMEK for Log Router, you must first assign the + * cloudkms.cryptoKeyEncrypterDecrypter role to the service account that + * the Log Router will use to access your Cloud KMS key. Use + * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to + * obtain the service account ID. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the CMEK settings. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the CMEK settings. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The resource name for the configured Cloud KMS key. + * KMS key name format: + * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" + * For example: + * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` + * To enable CMEK for the Log Router, set this field to a valid + * `kms_key_name` for which the associated service account has the required + * cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. + * The Cloud KMS key used by the Log Router can be updated by changing the + * `kms_key_name` to a new valid key name or disabled by setting the key name + * to an empty string. Encryption operations that are in progress will be + * completed with the key that was in use when they started. Decryption + * operations will be completed using the key that was used at the time of + * encryption unless access to that key has been revoked. + * To disable CMEK for the Log Router, set this field to an empty string. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * Generated from protobuf field string kms_key_name = 2; + * @return string + */ + public function getKmsKeyName() + { + return $this->kms_key_name; + } + + /** + * The resource name for the configured Cloud KMS key. + * KMS key name format: + * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" + * For example: + * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` + * To enable CMEK for the Log Router, set this field to a valid + * `kms_key_name` for which the associated service account has the required + * cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. + * The Cloud KMS key used by the Log Router can be updated by changing the + * `kms_key_name` to a new valid key name or disabled by setting the key name + * to an empty string. Encryption operations that are in progress will be + * completed with the key that was in use when they started. Decryption + * operations will be completed using the key that was used at the time of + * encryption unless access to that key has been revoked. + * To disable CMEK for the Log Router, set this field to an empty string. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * Generated from protobuf field string kms_key_name = 2; + * @param string $var + * @return $this + */ + public function setKmsKeyName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_name = $var; + + return $this; + } + + /** + * The CryptoKeyVersion resource name for the configured Cloud KMS key. + * KMS key name format: + * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]" + * For example: + * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"` + * This is a read-only field used to convey the specific configured + * CryptoKeyVersion of `kms_key` that has been configured. It will be + * populated in cases where the CMEK settings are bound to a single key + * version. + * If this field is populated, the `kms_key` is tied to a specific + * CryptoKeyVersion. + * + * Generated from protobuf field string kms_key_version_name = 4; + * @return string + */ + public function getKmsKeyVersionName() + { + return $this->kms_key_version_name; + } + + /** + * The CryptoKeyVersion resource name for the configured Cloud KMS key. + * KMS key name format: + * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]" + * For example: + * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"` + * This is a read-only field used to convey the specific configured + * CryptoKeyVersion of `kms_key` that has been configured. It will be + * populated in cases where the CMEK settings are bound to a single key + * version. + * If this field is populated, the `kms_key` is tied to a specific + * CryptoKeyVersion. + * + * Generated from protobuf field string kms_key_version_name = 4; + * @param string $var + * @return $this + */ + public function setKmsKeyVersionName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_version_name = $var; + + return $this; + } + + /** + * Output only. The service account that will be used by the Log Router to + * access your Cloud KMS key. + * Before enabling CMEK for Log Router, you must first assign the + * cloudkms.cryptoKeyEncrypterDecrypter role to the service account that + * the Log Router will use to access your Cloud KMS key. Use + * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to + * obtain the service account ID. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * Generated from protobuf field string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getServiceAccountId() + { + return $this->service_account_id; + } + + /** + * Output only. The service account that will be used by the Log Router to + * access your Cloud KMS key. + * Before enabling CMEK for Log Router, you must first assign the + * cloudkms.cryptoKeyEncrypterDecrypter role to the service account that + * the Log Router will use to access your Cloud KMS key. Use + * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to + * obtain the service account ID. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * Generated from protobuf field string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setServiceAccountId($var) + { + GPBUtil::checkString($var, True); + $this->service_account_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesMetadata.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesMetadata.php new file mode 100644 index 000000000000..3cbc7be428a6 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesMetadata.php @@ -0,0 +1,317 @@ +google.logging.v2.CopyLogEntriesMetadata + */ +class CopyLogEntriesMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The create time of an operation. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The end time of an operation. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * State of an operation. + * + * Generated from protobuf field .google.logging.v2.OperationState state = 3; + */ + protected $state = 0; + /** + * Identifies whether the user has requested cancellation of the operation. + * + * Generated from protobuf field bool cancellation_requested = 4; + */ + protected $cancellation_requested = false; + /** + * CopyLogEntries RPC request. + * + * Generated from protobuf field .google.logging.v2.CopyLogEntriesRequest request = 5; + */ + protected $request = null; + /** + * Estimated progress of the operation (0 - 100%). + * + * Generated from protobuf field int32 progress = 6; + */ + protected $progress = 0; + /** + * The IAM identity of a service account that must be granted access to the + * destination. + * If the service account is not granted permission to the destination within + * an hour, the operation will be cancelled. + * For example: `"serviceAccount:foo\@bar.com"` + * + * Generated from protobuf field string writer_identity = 7; + */ + protected $writer_identity = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The create time of an operation. + * @type \Google\Protobuf\Timestamp $end_time + * The end time of an operation. + * @type int $state + * State of an operation. + * @type bool $cancellation_requested + * Identifies whether the user has requested cancellation of the operation. + * @type \Google\Cloud\Logging\V2\CopyLogEntriesRequest $request + * CopyLogEntries RPC request. + * @type int $progress + * Estimated progress of the operation (0 - 100%). + * @type string $writer_identity + * The IAM identity of a service account that must be granted access to the + * destination. + * If the service account is not granted permission to the destination within + * an hour, the operation will be cancelled. + * For example: `"serviceAccount:foo\@bar.com"` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * The create time of an operation. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The create time of an operation. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The end time of an operation. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The end time of an operation. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * State of an operation. + * + * Generated from protobuf field .google.logging.v2.OperationState state = 3; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * State of an operation. + * + * Generated from protobuf field .google.logging.v2.OperationState state = 3; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\OperationState::class); + $this->state = $var; + + return $this; + } + + /** + * Identifies whether the user has requested cancellation of the operation. + * + * Generated from protobuf field bool cancellation_requested = 4; + * @return bool + */ + public function getCancellationRequested() + { + return $this->cancellation_requested; + } + + /** + * Identifies whether the user has requested cancellation of the operation. + * + * Generated from protobuf field bool cancellation_requested = 4; + * @param bool $var + * @return $this + */ + public function setCancellationRequested($var) + { + GPBUtil::checkBool($var); + $this->cancellation_requested = $var; + + return $this; + } + + /** + * CopyLogEntries RPC request. + * + * Generated from protobuf field .google.logging.v2.CopyLogEntriesRequest request = 5; + * @return \Google\Cloud\Logging\V2\CopyLogEntriesRequest|null + */ + public function getRequest() + { + return $this->request; + } + + public function hasRequest() + { + return isset($this->request); + } + + public function clearRequest() + { + unset($this->request); + } + + /** + * CopyLogEntries RPC request. + * + * Generated from protobuf field .google.logging.v2.CopyLogEntriesRequest request = 5; + * @param \Google\Cloud\Logging\V2\CopyLogEntriesRequest $var + * @return $this + */ + public function setRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\CopyLogEntriesRequest::class); + $this->request = $var; + + return $this; + } + + /** + * Estimated progress of the operation (0 - 100%). + * + * Generated from protobuf field int32 progress = 6; + * @return int + */ + public function getProgress() + { + return $this->progress; + } + + /** + * Estimated progress of the operation (0 - 100%). + * + * Generated from protobuf field int32 progress = 6; + * @param int $var + * @return $this + */ + public function setProgress($var) + { + GPBUtil::checkInt32($var); + $this->progress = $var; + + return $this; + } + + /** + * The IAM identity of a service account that must be granted access to the + * destination. + * If the service account is not granted permission to the destination within + * an hour, the operation will be cancelled. + * For example: `"serviceAccount:foo\@bar.com"` + * + * Generated from protobuf field string writer_identity = 7; + * @return string + */ + public function getWriterIdentity() + { + return $this->writer_identity; + } + + /** + * The IAM identity of a service account that must be granted access to the + * destination. + * If the service account is not granted permission to the destination within + * an hour, the operation will be cancelled. + * For example: `"serviceAccount:foo\@bar.com"` + * + * Generated from protobuf field string writer_identity = 7; + * @param string $var + * @return $this + */ + public function setWriterIdentity($var) + { + GPBUtil::checkString($var, True); + $this->writer_identity = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesRequest.php new file mode 100644 index 000000000000..613c80228067 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesRequest.php @@ -0,0 +1,147 @@ +google.logging.v2.CopyLogEntriesRequest + */ +class CopyLogEntriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Log bucket from which to copy log entries. + * For example: + * `"projects/my-project/locations/global/buckets/my-source-bucket"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. A filter specifying which log entries to copy. The filter must be + * no more than 20k characters. An empty filter matches all log entries. + * + * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Required. Destination to which to copy log entries. + * + * Generated from protobuf field string destination = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $destination = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Log bucket from which to copy log entries. + * For example: + * `"projects/my-project/locations/global/buckets/my-source-bucket"` + * @type string $filter + * Optional. A filter specifying which log entries to copy. The filter must be + * no more than 20k characters. An empty filter matches all log entries. + * @type string $destination + * Required. Destination to which to copy log entries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. Log bucket from which to copy log entries. + * For example: + * `"projects/my-project/locations/global/buckets/my-source-bucket"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Log bucket from which to copy log entries. + * For example: + * `"projects/my-project/locations/global/buckets/my-source-bucket"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A filter specifying which log entries to copy. The filter must be + * no more than 20k characters. An empty filter matches all log entries. + * + * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. A filter specifying which log entries to copy. The filter must be + * no more than 20k characters. An empty filter matches all log entries. + * + * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Required. Destination to which to copy log entries. + * + * Generated from protobuf field string destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDestination() + { + return $this->destination; + } + + /** + * Required. Destination to which to copy log entries. + * + * Generated from protobuf field string destination = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDestination($var) + { + GPBUtil::checkString($var, True); + $this->destination = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesResponse.php new file mode 100644 index 000000000000..ae22ce9d52d6 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesResponse.php @@ -0,0 +1,67 @@ +google.logging.v2.CopyLogEntriesResponse + */ +class CopyLogEntriesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Number of log entries copied. + * + * Generated from protobuf field int64 log_entries_copied_count = 1; + */ + protected $log_entries_copied_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $log_entries_copied_count + * Number of log entries copied. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Number of log entries copied. + * + * Generated from protobuf field int64 log_entries_copied_count = 1; + * @return int|string + */ + public function getLogEntriesCopiedCount() + { + return $this->log_entries_copied_count; + } + + /** + * Number of log entries copied. + * + * Generated from protobuf field int64 log_entries_copied_count = 1; + * @param int|string $var + * @return $this + */ + public function setLogEntriesCopiedCount($var) + { + GPBUtil::checkInt64($var); + $this->log_entries_copied_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateBucketRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateBucketRequest.php new file mode 100644 index 000000000000..f9fe4976cfed --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateBucketRequest.php @@ -0,0 +1,173 @@ +google.logging.v2.CreateBucketRequest + */ +class CreateBucketRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource in which to create the log bucket: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * For example: + * `"projects/my-project/locations/global"` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers + * are limited to 100 characters and can include only letters, digits, + * underscores, hyphens, and periods. + * + * Generated from protobuf field string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bucket_id = ''; + /** + * Required. The new bucket. The region specified in the new bucket must be + * compliant with any Location Restriction Org Policy. The name field in the + * bucket is ignored. + * + * Generated from protobuf field .google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bucket = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource in which to create the log bucket: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * For example: + * `"projects/my-project/locations/global"` + * @type string $bucket_id + * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers + * are limited to 100 characters and can include only letters, digits, + * underscores, hyphens, and periods. + * @type \Google\Cloud\Logging\V2\LogBucket $bucket + * Required. The new bucket. The region specified in the new bucket must be + * compliant with any Location Restriction Org Policy. The name field in the + * bucket is ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource in which to create the log bucket: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * For example: + * `"projects/my-project/locations/global"` + * + * 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 resource in which to create the log bucket: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * For example: + * `"projects/my-project/locations/global"` + * + * 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. A client-assigned identifier such as `"my-bucket"`. Identifiers + * are limited to 100 characters and can include only letters, digits, + * underscores, hyphens, and periods. + * + * Generated from protobuf field string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getBucketId() + { + return $this->bucket_id; + } + + /** + * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers + * are limited to 100 characters and can include only letters, digits, + * underscores, hyphens, and periods. + * + * Generated from protobuf field string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setBucketId($var) + { + GPBUtil::checkString($var, True); + $this->bucket_id = $var; + + return $this; + } + + /** + * Required. The new bucket. The region specified in the new bucket must be + * compliant with any Location Restriction Org Policy. The name field in the + * bucket is ignored. + * + * Generated from protobuf field .google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Logging\V2\LogBucket|null + */ + public function getBucket() + { + return $this->bucket; + } + + public function hasBucket() + { + return isset($this->bucket); + } + + public function clearBucket() + { + unset($this->bucket); + } + + /** + * Required. The new bucket. The region specified in the new bucket must be + * compliant with any Location Restriction Org Policy. The name field in the + * bucket is ignored. + * + * Generated from protobuf field .google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Logging\V2\LogBucket $var + * @return $this + */ + public function setBucket($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogBucket::class); + $this->bucket = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateExclusionRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateExclusionRequest.php new file mode 100644 index 000000000000..cbc9e79a3b79 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateExclusionRequest.php @@ -0,0 +1,170 @@ +google.logging.v2.CreateExclusionRequest + */ +class CreateExclusionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource in which to create the exclusion: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * For examples: + * `"projects/my-logging-project"` + * `"organizations/123456789"` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The new exclusion, whose `name` parameter is an exclusion name + * that is not already used in the parent resource. + * + * Generated from protobuf field .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $exclusion = null; + + /** + * @param string $parent Required. The parent resource in which to create the exclusion: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * For examples: + * + * `"projects/my-logging-project"` + * `"organizations/123456789"` + * Please see {@see ConfigServiceV2Client::projectName()} for help formatting this field. + * @param \Google\Cloud\Logging\V2\LogExclusion $exclusion Required. The new exclusion, whose `name` parameter is an exclusion name + * that is not already used in the parent resource. + * + * @return \Google\Cloud\Logging\V2\CreateExclusionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Logging\V2\LogExclusion $exclusion): self + { + return (new self()) + ->setParent($parent) + ->setExclusion($exclusion); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource in which to create the exclusion: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * For examples: + * `"projects/my-logging-project"` + * `"organizations/123456789"` + * @type \Google\Cloud\Logging\V2\LogExclusion $exclusion + * Required. The new exclusion, whose `name` parameter is an exclusion name + * that is not already used in the parent resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource in which to create the exclusion: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * For examples: + * `"projects/my-logging-project"` + * `"organizations/123456789"` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource in which to create the exclusion: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * For examples: + * `"projects/my-logging-project"` + * `"organizations/123456789"` + * + * 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 new exclusion, whose `name` parameter is an exclusion name + * that is not already used in the parent resource. + * + * Generated from protobuf field .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Logging\V2\LogExclusion|null + */ + public function getExclusion() + { + return $this->exclusion; + } + + public function hasExclusion() + { + return isset($this->exclusion); + } + + public function clearExclusion() + { + unset($this->exclusion); + } + + /** + * Required. The new exclusion, whose `name` parameter is an exclusion name + * that is not already used in the parent resource. + * + * Generated from protobuf field .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Logging\V2\LogExclusion $var + * @return $this + */ + public function setExclusion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogExclusion::class); + $this->exclusion = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLinkRequest.php new file mode 100644 index 000000000000..788ce2837100 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLinkRequest.php @@ -0,0 +1,194 @@ +google.logging.v2.CreateLinkRequest + */ +class CreateLinkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the bucket to create a link for. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The new link. + * + * Generated from protobuf field .google.logging.v2.Link link = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $link = null; + /** + * Required. The ID to use for the link. The link_id can have up to 100 + * characters. A valid link_id must only have alphanumeric characters and + * underscores within it. + * + * Generated from protobuf field string link_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $link_id = ''; + + /** + * @param string $parent Required. The full resource name of the bucket to create a link for. + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * Please see {@see ConfigServiceV2Client::logBucketName()} for help formatting this field. + * @param \Google\Cloud\Logging\V2\Link $link Required. The new link. + * @param string $linkId Required. The ID to use for the link. The link_id can have up to 100 + * characters. A valid link_id must only have alphanumeric characters and + * underscores within it. + * + * @return \Google\Cloud\Logging\V2\CreateLinkRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Logging\V2\Link $link, string $linkId): self + { + return (new self()) + ->setParent($parent) + ->setLink($link) + ->setLinkId($linkId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The full resource name of the bucket to create a link for. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * @type \Google\Cloud\Logging\V2\Link $link + * Required. The new link. + * @type string $link_id + * Required. The ID to use for the link. The link_id can have up to 100 + * characters. A valid link_id must only have alphanumeric characters and + * underscores within it. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the bucket to create a link for. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The full resource name of the bucket to create a link for. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The new link. + * + * Generated from protobuf field .google.logging.v2.Link link = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Logging\V2\Link|null + */ + public function getLink() + { + return $this->link; + } + + public function hasLink() + { + return isset($this->link); + } + + public function clearLink() + { + unset($this->link); + } + + /** + * Required. The new link. + * + * Generated from protobuf field .google.logging.v2.Link link = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Logging\V2\Link $var + * @return $this + */ + public function setLink($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\Link::class); + $this->link = $var; + + return $this; + } + + /** + * Required. The ID to use for the link. The link_id can have up to 100 + * characters. A valid link_id must only have alphanumeric characters and + * underscores within it. + * + * Generated from protobuf field string link_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLinkId() + { + return $this->link_id; + } + + /** + * Required. The ID to use for the link. The link_id can have up to 100 + * characters. A valid link_id must only have alphanumeric characters and + * underscores within it. + * + * Generated from protobuf field string link_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLinkId($var) + { + GPBUtil::checkString($var, True); + $this->link_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLogMetricRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLogMetricRequest.php new file mode 100644 index 000000000000..85cceae25314 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLogMetricRequest.php @@ -0,0 +1,144 @@ +google.logging.v2.CreateLogMetricRequest + */ +class CreateLogMetricRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the project in which to create the metric: + * "projects/[PROJECT_ID]" + * The new metric must be provided in the request. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The new logs-based metric, which must not have an identifier that + * already exists. + * + * Generated from protobuf field .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric = null; + + /** + * @param string $parent Required. The resource name of the project in which to create the metric: + * + * "projects/[PROJECT_ID]" + * + * The new metric must be provided in the request. Please see + * {@see MetricsServiceV2Client::projectName()} for help formatting this field. + * @param \Google\Cloud\Logging\V2\LogMetric $metric Required. The new logs-based metric, which must not have an identifier that + * already exists. + * + * @return \Google\Cloud\Logging\V2\CreateLogMetricRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Logging\V2\LogMetric $metric): self + { + return (new self()) + ->setParent($parent) + ->setMetric($metric); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the project in which to create the metric: + * "projects/[PROJECT_ID]" + * The new metric must be provided in the request. + * @type \Google\Cloud\Logging\V2\LogMetric $metric + * Required. The new logs-based metric, which must not have an identifier that + * already exists. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the project in which to create the metric: + * "projects/[PROJECT_ID]" + * The new metric must be provided in the request. + * + * 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 resource name of the project in which to create the metric: + * "projects/[PROJECT_ID]" + * The new metric must be provided in the request. + * + * 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 new logs-based metric, which must not have an identifier that + * already exists. + * + * Generated from protobuf field .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Logging\V2\LogMetric|null + */ + public function getMetric() + { + return $this->metric; + } + + public function hasMetric() + { + return isset($this->metric); + } + + public function clearMetric() + { + unset($this->metric); + } + + /** + * Required. The new logs-based metric, which must not have an identifier that + * already exists. + * + * Generated from protobuf field .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Logging\V2\LogMetric $var + * @return $this + */ + public function setMetric($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogMetric::class); + $this->metric = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateSinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateSinkRequest.php new file mode 100644 index 000000000000..42bdfbadbfb7 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateSinkRequest.php @@ -0,0 +1,244 @@ +google.logging.v2.CreateSinkRequest + */ +class CreateSinkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource in which to create the sink: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * For examples: + * `"projects/my-project"` + * `"organizations/123456789"` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The new sink, whose `name` parameter is a sink identifier that + * is not already in use. + * + * Generated from protobuf field .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $sink = null; + /** + * Optional. Determines the kind of IAM identity returned as `writer_identity` + * in the new sink. If this value is omitted or set to false, and if the + * sink's parent is a project, then the value returned as `writer_identity` is + * the same group or service account used by Cloud Logging before the addition + * of writer identities to this API. The sink's destination must be in the + * same project as the sink itself. + * If this field is set to true, or if the sink is owned by a non-project + * resource such as an organization, then the value of `writer_identity` will + * be a unique service account used only for exports from the new sink. For + * more information, see `writer_identity` in + * [LogSink][google.logging.v2.LogSink]. + * + * Generated from protobuf field bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $unique_writer_identity = false; + + /** + * @param string $parent Required. The resource in which to create the sink: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * For examples: + * + * `"projects/my-project"` + * `"organizations/123456789"` + * Please see {@see ConfigServiceV2Client::projectName()} for help formatting this field. + * @param \Google\Cloud\Logging\V2\LogSink $sink Required. The new sink, whose `name` parameter is a sink identifier that + * is not already in use. + * + * @return \Google\Cloud\Logging\V2\CreateSinkRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Logging\V2\LogSink $sink): self + { + return (new self()) + ->setParent($parent) + ->setSink($sink); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource in which to create the sink: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * For examples: + * `"projects/my-project"` + * `"organizations/123456789"` + * @type \Google\Cloud\Logging\V2\LogSink $sink + * Required. The new sink, whose `name` parameter is a sink identifier that + * is not already in use. + * @type bool $unique_writer_identity + * Optional. Determines the kind of IAM identity returned as `writer_identity` + * in the new sink. If this value is omitted or set to false, and if the + * sink's parent is a project, then the value returned as `writer_identity` is + * the same group or service account used by Cloud Logging before the addition + * of writer identities to this API. The sink's destination must be in the + * same project as the sink itself. + * If this field is set to true, or if the sink is owned by a non-project + * resource such as an organization, then the value of `writer_identity` will + * be a unique service account used only for exports from the new sink. For + * more information, see `writer_identity` in + * [LogSink][google.logging.v2.LogSink]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource in which to create the sink: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * For examples: + * `"projects/my-project"` + * `"organizations/123456789"` + * + * 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 resource in which to create the sink: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * For examples: + * `"projects/my-project"` + * `"organizations/123456789"` + * + * 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 new sink, whose `name` parameter is a sink identifier that + * is not already in use. + * + * Generated from protobuf field .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Logging\V2\LogSink|null + */ + public function getSink() + { + return $this->sink; + } + + public function hasSink() + { + return isset($this->sink); + } + + public function clearSink() + { + unset($this->sink); + } + + /** + * Required. The new sink, whose `name` parameter is a sink identifier that + * is not already in use. + * + * Generated from protobuf field .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Logging\V2\LogSink $var + * @return $this + */ + public function setSink($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogSink::class); + $this->sink = $var; + + return $this; + } + + /** + * Optional. Determines the kind of IAM identity returned as `writer_identity` + * in the new sink. If this value is omitted or set to false, and if the + * sink's parent is a project, then the value returned as `writer_identity` is + * the same group or service account used by Cloud Logging before the addition + * of writer identities to this API. The sink's destination must be in the + * same project as the sink itself. + * If this field is set to true, or if the sink is owned by a non-project + * resource such as an organization, then the value of `writer_identity` will + * be a unique service account used only for exports from the new sink. For + * more information, see `writer_identity` in + * [LogSink][google.logging.v2.LogSink]. + * + * Generated from protobuf field bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUniqueWriterIdentity() + { + return $this->unique_writer_identity; + } + + /** + * Optional. Determines the kind of IAM identity returned as `writer_identity` + * in the new sink. If this value is omitted or set to false, and if the + * sink's parent is a project, then the value returned as `writer_identity` is + * the same group or service account used by Cloud Logging before the addition + * of writer identities to this API. The sink's destination must be in the + * same project as the sink itself. + * If this field is set to true, or if the sink is owned by a non-project + * resource such as an organization, then the value of `writer_identity` will + * be a unique service account used only for exports from the new sink. For + * more information, see `writer_identity` in + * [LogSink][google.logging.v2.LogSink]. + * + * Generated from protobuf field bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUniqueWriterIdentity($var) + { + GPBUtil::checkBool($var); + $this->unique_writer_identity = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateViewRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateViewRequest.php new file mode 100644 index 000000000000..44f6888bfdaf --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateViewRequest.php @@ -0,0 +1,165 @@ +google.logging.v2.CreateViewRequest + */ +class CreateViewRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The bucket in which to create the view + * `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. A client-assigned identifier such as `"my-view"`. Identifiers are + * limited to 100 characters and can include only letters, digits, + * underscores, hyphens, and periods. + * + * Generated from protobuf field string view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $view_id = ''; + /** + * Required. The new view. + * + * Generated from protobuf field .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $view = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The bucket in which to create the view + * `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * @type string $view_id + * Required. A client-assigned identifier such as `"my-view"`. Identifiers are + * limited to 100 characters and can include only letters, digits, + * underscores, hyphens, and periods. + * @type \Google\Cloud\Logging\V2\LogView $view + * Required. The new view. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The bucket in which to create the view + * `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The bucket in which to create the view + * `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. A client-assigned identifier such as `"my-view"`. Identifiers are + * limited to 100 characters and can include only letters, digits, + * underscores, hyphens, and periods. + * + * Generated from protobuf field string view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getViewId() + { + return $this->view_id; + } + + /** + * Required. A client-assigned identifier such as `"my-view"`. Identifiers are + * limited to 100 characters and can include only letters, digits, + * underscores, hyphens, and periods. + * + * Generated from protobuf field string view_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setViewId($var) + { + GPBUtil::checkString($var, True); + $this->view_id = $var; + + return $this; + } + + /** + * Required. The new view. + * + * Generated from protobuf field .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Logging\V2\LogView|null + */ + public function getView() + { + return $this->view; + } + + public function hasView() + { + return isset($this->view); + } + + public function clearView() + { + unset($this->view); + } + + /** + * Required. The new view. + * + * Generated from protobuf field .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Logging\V2\LogView $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogView::class); + $this->view = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteBucketRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteBucketRequest.php new file mode 100644 index 000000000000..b02efe43c7b9 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteBucketRequest.php @@ -0,0 +1,91 @@ +google.logging.v2.DeleteBucketRequest + */ +class DeleteBucketRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the bucket to delete. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full resource name of the bucket to delete. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the bucket to delete. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full resource name of the bucket to delete. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * + * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteExclusionRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteExclusionRequest.php new file mode 100644 index 000000000000..6775e406ee07 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteExclusionRequest.php @@ -0,0 +1,114 @@ +google.logging.v2.DeleteExclusionRequest + */ +class DeleteExclusionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of an existing exclusion to delete: + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * For example: + * `"projects/my-project/exclusions/my-exclusion"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of an existing exclusion to delete: + * + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * + * For example: + * + * `"projects/my-project/exclusions/my-exclusion"` + * Please see {@see ConfigServiceV2Client::logExclusionName()} for help formatting this field. + * + * @return \Google\Cloud\Logging\V2\DeleteExclusionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of an existing exclusion to delete: + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * For example: + * `"projects/my-project/exclusions/my-exclusion"` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of an existing exclusion to delete: + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * For example: + * `"projects/my-project/exclusions/my-exclusion"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of an existing exclusion to delete: + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * For example: + * `"projects/my-project/exclusions/my-exclusion"` + * + * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLinkRequest.php new file mode 100644 index 000000000000..e1061ffd4100 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLinkRequest.php @@ -0,0 +1,102 @@ +google.logging.v2.DeleteLinkRequest + */ +class DeleteLinkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the link to delete. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The full resource name of the link to delete. + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * Please see {@see ConfigServiceV2Client::linkName()} for help formatting this field. + * + * @return \Google\Cloud\Logging\V2\DeleteLinkRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full resource name of the link to delete. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the link to delete. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full resource name of the link to delete. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogMetricRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogMetricRequest.php new file mode 100644 index 000000000000..910740651628 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogMetricRequest.php @@ -0,0 +1,87 @@ +google.logging.v2.DeleteLogMetricRequest + */ +class DeleteLogMetricRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the metric to delete: + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * + * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $metric_name = ''; + + /** + * @param string $metricName Required. The resource name of the metric to delete: + * + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * Please see {@see MetricsServiceV2Client::logMetricName()} for help formatting this field. + * + * @return \Google\Cloud\Logging\V2\DeleteLogMetricRequest + * + * @experimental + */ + public static function build(string $metricName): self + { + return (new self()) + ->setMetricName($metricName); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $metric_name + * Required. The resource name of the metric to delete: + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the metric to delete: + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * + * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getMetricName() + { + return $this->metric_name; + } + + /** + * Required. The resource name of the metric to delete: + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * + * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMetricName($var) + { + GPBUtil::checkString($var, True); + $this->metric_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogRequest.php new file mode 100644 index 000000000000..29a9a8d3f7d8 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogRequest.php @@ -0,0 +1,129 @@ +google.logging.v2.DeleteLogRequest + */ +class DeleteLogRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the log to delete: + * * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * * `folders/[FOLDER_ID]/logs/[LOG_ID]` + * `[LOG_ID]` must be URL-encoded. For example, + * `"projects/my-project-id/logs/syslog"`, + * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. + * For more information about log names, see + * [LogEntry][google.logging.v2.LogEntry]. + * + * Generated from protobuf field string log_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $log_name = ''; + + /** + * @param string $logName Required. The resource name of the log to delete: + * + * * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * * `folders/[FOLDER_ID]/logs/[LOG_ID]` + * + * `[LOG_ID]` must be URL-encoded. For example, + * `"projects/my-project-id/logs/syslog"`, + * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. + * + * For more information about log names, see + * [LogEntry][google.logging.v2.LogEntry]. Please see + * {@see LoggingServiceV2Client::logName()} for help formatting this field. + * + * @return \Google\Cloud\Logging\V2\DeleteLogRequest + * + * @experimental + */ + public static function build(string $logName): self + { + return (new self()) + ->setLogName($logName); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $log_name + * Required. The resource name of the log to delete: + * * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * * `folders/[FOLDER_ID]/logs/[LOG_ID]` + * `[LOG_ID]` must be URL-encoded. For example, + * `"projects/my-project-id/logs/syslog"`, + * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. + * For more information about log names, see + * [LogEntry][google.logging.v2.LogEntry]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\Logging::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the log to delete: + * * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * * `folders/[FOLDER_ID]/logs/[LOG_ID]` + * `[LOG_ID]` must be URL-encoded. For example, + * `"projects/my-project-id/logs/syslog"`, + * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. + * For more information about log names, see + * [LogEntry][google.logging.v2.LogEntry]. + * + * Generated from protobuf field string log_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getLogName() + { + return $this->log_name; + } + + /** + * Required. The resource name of the log to delete: + * * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * * `folders/[FOLDER_ID]/logs/[LOG_ID]` + * `[LOG_ID]` must be URL-encoded. For example, + * `"projects/my-project-id/logs/syslog"`, + * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. + * For more information about log names, see + * [LogEntry][google.logging.v2.LogEntry]. + * + * Generated from protobuf field string log_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLogName($var) + { + GPBUtil::checkString($var, True); + $this->log_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteSinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteSinkRequest.php new file mode 100644 index 000000000000..763b0ae90a70 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteSinkRequest.php @@ -0,0 +1,119 @@ +google.logging.v2.DeleteSinkRequest + */ +class DeleteSinkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the sink to delete, including the + * parent resource and the sink identifier: + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * For example: + * `"projects/my-project/sinks/my-sink"` + * + * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $sink_name = ''; + + /** + * @param string $sinkName Required. The full resource name of the sink to delete, including the + * parent resource and the sink identifier: + * + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * + * For example: + * + * `"projects/my-project/sinks/my-sink"` + * Please see {@see ConfigServiceV2Client::logSinkName()} for help formatting this field. + * + * @return \Google\Cloud\Logging\V2\DeleteSinkRequest + * + * @experimental + */ + public static function build(string $sinkName): self + { + return (new self()) + ->setSinkName($sinkName); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $sink_name + * Required. The full resource name of the sink to delete, including the + * parent resource and the sink identifier: + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * For example: + * `"projects/my-project/sinks/my-sink"` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the sink to delete, including the + * parent resource and the sink identifier: + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * For example: + * `"projects/my-project/sinks/my-sink"` + * + * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSinkName() + { + return $this->sink_name; + } + + /** + * Required. The full resource name of the sink to delete, including the + * parent resource and the sink identifier: + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * For example: + * `"projects/my-project/sinks/my-sink"` + * + * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSinkName($var) + { + GPBUtil::checkString($var, True); + $this->sink_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteViewRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteViewRequest.php new file mode 100644 index 000000000000..3dd14ad7de35 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteViewRequest.php @@ -0,0 +1,79 @@ +google.logging.v2.DeleteViewRequest + */ +class DeleteViewRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the view to delete: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full resource name of the view to delete: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the view to delete: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full resource name of the view to delete: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` + * + * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetBucketRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetBucketRequest.php new file mode 100644 index 000000000000..909e48de6de2 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetBucketRequest.php @@ -0,0 +1,91 @@ +google.logging.v2.GetBucketRequest + */ +class GetBucketRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the bucket: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the bucket: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the bucket: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the bucket: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * + * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetCmekSettingsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetCmekSettingsRequest.php new file mode 100644 index 000000000000..692af357343f --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetCmekSettingsRequest.php @@ -0,0 +1,111 @@ +google.logging.v2.GetCmekSettingsRequest + */ +class GetCmekSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource for which to retrieve CMEK settings. + * "projects/[PROJECT_ID]/cmekSettings" + * "organizations/[ORGANIZATION_ID]/cmekSettings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + * "folders/[FOLDER_ID]/cmekSettings" + * For example: + * `"organizations/12345/cmekSettings"` + * Note: CMEK for the Log Router can be configured for Google Cloud projects, + * folders, organizations and billing accounts. Once configured for an + * organization, it applies to all projects and folders in the Google Cloud + * organization. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource for which to retrieve CMEK settings. + * "projects/[PROJECT_ID]/cmekSettings" + * "organizations/[ORGANIZATION_ID]/cmekSettings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + * "folders/[FOLDER_ID]/cmekSettings" + * For example: + * `"organizations/12345/cmekSettings"` + * Note: CMEK for the Log Router can be configured for Google Cloud projects, + * folders, organizations and billing accounts. Once configured for an + * organization, it applies to all projects and folders in the Google Cloud + * organization. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource for which to retrieve CMEK settings. + * "projects/[PROJECT_ID]/cmekSettings" + * "organizations/[ORGANIZATION_ID]/cmekSettings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + * "folders/[FOLDER_ID]/cmekSettings" + * For example: + * `"organizations/12345/cmekSettings"` + * Note: CMEK for the Log Router can be configured for Google Cloud projects, + * folders, organizations and billing accounts. Once configured for an + * organization, it applies to all projects and folders in the Google Cloud + * organization. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource for which to retrieve CMEK settings. + * "projects/[PROJECT_ID]/cmekSettings" + * "organizations/[ORGANIZATION_ID]/cmekSettings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + * "folders/[FOLDER_ID]/cmekSettings" + * For example: + * `"organizations/12345/cmekSettings"` + * Note: CMEK for the Log Router can be configured for Google Cloud projects, + * folders, organizations and billing accounts. Once configured for an + * organization, it applies to all projects and folders in the Google Cloud + * organization. + * + * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetExclusionRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetExclusionRequest.php new file mode 100644 index 000000000000..9eecf1e4cb05 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetExclusionRequest.php @@ -0,0 +1,114 @@ +google.logging.v2.GetExclusionRequest + */ +class GetExclusionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of an existing exclusion: + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * For example: + * `"projects/my-project/exclusions/my-exclusion"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of an existing exclusion: + * + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * + * For example: + * + * `"projects/my-project/exclusions/my-exclusion"` + * Please see {@see ConfigServiceV2Client::logExclusionName()} for help formatting this field. + * + * @return \Google\Cloud\Logging\V2\GetExclusionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of an existing exclusion: + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * For example: + * `"projects/my-project/exclusions/my-exclusion"` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of an existing exclusion: + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * For example: + * `"projects/my-project/exclusions/my-exclusion"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of an existing exclusion: + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * For example: + * `"projects/my-project/exclusions/my-exclusion"` + * + * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLinkRequest.php new file mode 100644 index 000000000000..c527dd1edff4 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLinkRequest.php @@ -0,0 +1,102 @@ +google.logging.v2.GetLinkRequest + */ +class GetLinkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the link: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the link: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID] + * Please see {@see ConfigServiceV2Client::linkName()} for help formatting this field. + * + * @return \Google\Cloud\Logging\V2\GetLinkRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the link: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the link: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the link: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID] + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLogMetricRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLogMetricRequest.php new file mode 100644 index 000000000000..1bcc54610c1d --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLogMetricRequest.php @@ -0,0 +1,87 @@ +google.logging.v2.GetLogMetricRequest + */ +class GetLogMetricRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the desired metric: + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * + * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $metric_name = ''; + + /** + * @param string $metricName Required. The resource name of the desired metric: + * + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * Please see {@see MetricsServiceV2Client::logMetricName()} for help formatting this field. + * + * @return \Google\Cloud\Logging\V2\GetLogMetricRequest + * + * @experimental + */ + public static function build(string $metricName): self + { + return (new self()) + ->setMetricName($metricName); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $metric_name + * Required. The resource name of the desired metric: + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the desired metric: + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * + * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getMetricName() + { + return $this->metric_name; + } + + /** + * Required. The resource name of the desired metric: + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * + * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMetricName($var) + { + GPBUtil::checkString($var, True); + $this->metric_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSettingsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSettingsRequest.php new file mode 100644 index 000000000000..61320af4d0e5 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSettingsRequest.php @@ -0,0 +1,139 @@ +google.logging.v2.GetSettingsRequest + */ +class GetSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource for which to retrieve settings. + * "projects/[PROJECT_ID]/settings" + * "organizations/[ORGANIZATION_ID]/settings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/settings" + * "folders/[FOLDER_ID]/settings" + * For example: + * `"organizations/12345/settings"` + * Note: Settings for the Log Router can be get for Google Cloud projects, + * folders, organizations and billing accounts. Currently it can only be + * configured for organizations. Once configured for an organization, it + * applies to all projects and folders in the Google Cloud organization. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource for which to retrieve settings. + * + * "projects/[PROJECT_ID]/settings" + * "organizations/[ORGANIZATION_ID]/settings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/settings" + * "folders/[FOLDER_ID]/settings" + * + * For example: + * + * `"organizations/12345/settings"` + * + * Note: Settings for the Log Router can be get for Google Cloud projects, + * folders, organizations and billing accounts. Currently it can only be + * configured for organizations. Once configured for an organization, it + * applies to all projects and folders in the Google Cloud organization. Please see + * {@see ConfigServiceV2Client::settingsName()} for help formatting this field. + * + * @return \Google\Cloud\Logging\V2\GetSettingsRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource for which to retrieve settings. + * "projects/[PROJECT_ID]/settings" + * "organizations/[ORGANIZATION_ID]/settings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/settings" + * "folders/[FOLDER_ID]/settings" + * For example: + * `"organizations/12345/settings"` + * Note: Settings for the Log Router can be get for Google Cloud projects, + * folders, organizations and billing accounts. Currently it can only be + * configured for organizations. Once configured for an organization, it + * applies to all projects and folders in the Google Cloud organization. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource for which to retrieve settings. + * "projects/[PROJECT_ID]/settings" + * "organizations/[ORGANIZATION_ID]/settings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/settings" + * "folders/[FOLDER_ID]/settings" + * For example: + * `"organizations/12345/settings"` + * Note: Settings for the Log Router can be get for Google Cloud projects, + * folders, organizations and billing accounts. Currently it can only be + * configured for organizations. Once configured for an organization, it + * applies to all projects and folders in the Google Cloud organization. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource for which to retrieve settings. + * "projects/[PROJECT_ID]/settings" + * "organizations/[ORGANIZATION_ID]/settings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/settings" + * "folders/[FOLDER_ID]/settings" + * For example: + * `"organizations/12345/settings"` + * Note: Settings for the Log Router can be get for Google Cloud projects, + * folders, organizations and billing accounts. Currently it can only be + * configured for organizations. Once configured for an organization, it + * applies to all projects and folders in the Google Cloud organization. + * + * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSinkRequest.php new file mode 100644 index 000000000000..b93d8feafde2 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSinkRequest.php @@ -0,0 +1,114 @@ +google.logging.v2.GetSinkRequest + */ +class GetSinkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the sink: + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * For example: + * `"projects/my-project/sinks/my-sink"` + * + * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $sink_name = ''; + + /** + * @param string $sinkName Required. The resource name of the sink: + * + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * + * For example: + * + * `"projects/my-project/sinks/my-sink"` + * Please see {@see ConfigServiceV2Client::logSinkName()} for help formatting this field. + * + * @return \Google\Cloud\Logging\V2\GetSinkRequest + * + * @experimental + */ + public static function build(string $sinkName): self + { + return (new self()) + ->setSinkName($sinkName); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $sink_name + * Required. The resource name of the sink: + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * For example: + * `"projects/my-project/sinks/my-sink"` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the sink: + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * For example: + * `"projects/my-project/sinks/my-sink"` + * + * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSinkName() + { + return $this->sink_name; + } + + /** + * Required. The resource name of the sink: + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * For example: + * `"projects/my-project/sinks/my-sink"` + * + * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSinkName($var) + { + GPBUtil::checkString($var, True); + $this->sink_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetViewRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetViewRequest.php new file mode 100644 index 000000000000..952bdc133356 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetViewRequest.php @@ -0,0 +1,79 @@ +google.logging.v2.GetViewRequest + */ +class GetViewRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the policy: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the policy: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the policy: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the policy: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` + * + * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexConfig.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexConfig.php new file mode 100644 index 000000000000..19803fd1d9d0 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexConfig.php @@ -0,0 +1,173 @@ +google.logging.v2.IndexConfig + */ +class IndexConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The LogEntry field path to index. + * Note that some paths are automatically indexed, and other paths are not + * eligible for indexing. See [indexing documentation]( + * https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields) + * for details. + * For example: `jsonPayload.request.status` + * + * Generated from protobuf field string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $field_path = ''; + /** + * Required. The type of data in this index. + * + * Generated from protobuf field .google.logging.v2.IndexType type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Output only. The timestamp when the index was last modified. + * This is used to return the timestamp, and will be ignored if supplied + * during update. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field_path + * Required. The LogEntry field path to index. + * Note that some paths are automatically indexed, and other paths are not + * eligible for indexing. See [indexing documentation]( + * https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields) + * for details. + * For example: `jsonPayload.request.status` + * @type int $type + * Required. The type of data in this index. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The timestamp when the index was last modified. + * This is used to return the timestamp, and will be ignored if supplied + * during update. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The LogEntry field path to index. + * Note that some paths are automatically indexed, and other paths are not + * eligible for indexing. See [indexing documentation]( + * https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields) + * for details. + * For example: `jsonPayload.request.status` + * + * Generated from protobuf field string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFieldPath() + { + return $this->field_path; + } + + /** + * Required. The LogEntry field path to index. + * Note that some paths are automatically indexed, and other paths are not + * eligible for indexing. See [indexing documentation]( + * https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields) + * for details. + * For example: `jsonPayload.request.status` + * + * Generated from protobuf field string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFieldPath($var) + { + GPBUtil::checkString($var, True); + $this->field_path = $var; + + return $this; + } + + /** + * Required. The type of data in this index. + * + * Generated from protobuf field .google.logging.v2.IndexType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The type of data in this index. + * + * Generated from protobuf field .google.logging.v2.IndexType type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\IndexType::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. The timestamp when the index was last modified. + * This is used to return the timestamp, and will be ignored if supplied + * during update. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The timestamp when the index was last modified. + * This is used to return the timestamp, and will be ignored if supplied + * during update. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexType.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexType.php new file mode 100644 index 000000000000..bbda5df5852a --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexType.php @@ -0,0 +1,62 @@ +google.logging.v2.IndexType + */ +class IndexType +{ + /** + * The index's type is unspecified. + * + * Generated from protobuf enum INDEX_TYPE_UNSPECIFIED = 0; + */ + const INDEX_TYPE_UNSPECIFIED = 0; + /** + * The index is a string-type index. + * + * Generated from protobuf enum INDEX_TYPE_STRING = 1; + */ + const INDEX_TYPE_STRING = 1; + /** + * The index is a integer-type index. + * + * Generated from protobuf enum INDEX_TYPE_INTEGER = 2; + */ + const INDEX_TYPE_INTEGER = 2; + + private static $valueToName = [ + self::INDEX_TYPE_UNSPECIFIED => 'INDEX_TYPE_UNSPECIFIED', + self::INDEX_TYPE_STRING => 'INDEX_TYPE_STRING', + self::INDEX_TYPE_INTEGER => 'INDEX_TYPE_INTEGER', + ]; + + 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/LifecycleState.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LifecycleState.php new file mode 100644 index 000000000000..0fe746cebd4d --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LifecycleState.php @@ -0,0 +1,86 @@ +google.logging.v2.LifecycleState + */ +class LifecycleState +{ + /** + * Unspecified state. This is only used/useful for distinguishing unset + * values. + * + * Generated from protobuf enum LIFECYCLE_STATE_UNSPECIFIED = 0; + */ + const LIFECYCLE_STATE_UNSPECIFIED = 0; + /** + * The normal and active state. + * + * Generated from protobuf enum ACTIVE = 1; + */ + const ACTIVE = 1; + /** + * The resource has been marked for deletion by the user. For some resources + * (e.g. buckets), this can be reversed by an un-delete operation. + * + * Generated from protobuf enum DELETE_REQUESTED = 2; + */ + const DELETE_REQUESTED = 2; + /** + * The resource has been marked for an update by the user. It will remain in + * this state until the update is complete. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * The resource has been marked for creation by the user. It will remain in + * this state until the creation is complete. + * + * Generated from protobuf enum CREATING = 4; + */ + const CREATING = 4; + /** + * The resource is in an INTERNAL error state. + * + * Generated from protobuf enum FAILED = 5; + */ + const FAILED = 5; + + private static $valueToName = [ + self::LIFECYCLE_STATE_UNSPECIFIED => 'LIFECYCLE_STATE_UNSPECIFIED', + self::ACTIVE => 'ACTIVE', + self::DELETE_REQUESTED => 'DELETE_REQUESTED', + self::UPDATING => 'UPDATING', + self::CREATING => 'CREATING', + self::FAILED => 'FAILED', + ]; + + 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/Link.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/Link.php new file mode 100644 index 000000000000..bea2795e9708 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/Link.php @@ -0,0 +1,271 @@ +google.logging.v2.Link + */ +class Link extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the link. The name can have up to 100 characters. + * A valid link id (at the end of the link name) must only have alphanumeric + * characters and underscores within it. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * For example: + * `projects/my-project/locations/global/buckets/my-bucket/links/my_link + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Describes this link. + * The maximum length of the description is 8000 characters. + * + * Generated from protobuf field string description = 2; + */ + protected $description = ''; + /** + * Output only. The creation timestamp of the link. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The resource lifecycle state. + * + * Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $lifecycle_state = 0; + /** + * The information of a BigQuery Dataset. When a link is created, a BigQuery + * dataset is created along with it, in the same project as the LogBucket it's + * linked to. This dataset will also have BigQuery Views corresponding to the + * LogViews in the bucket. + * + * Generated from protobuf field .google.logging.v2.BigQueryDataset bigquery_dataset = 5; + */ + protected $bigquery_dataset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the link. The name can have up to 100 characters. + * A valid link id (at the end of the link name) must only have alphanumeric + * characters and underscores within it. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * For example: + * `projects/my-project/locations/global/buckets/my-bucket/links/my_link + * @type string $description + * Describes this link. + * The maximum length of the description is 8000 characters. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation timestamp of the link. + * @type int $lifecycle_state + * Output only. The resource lifecycle state. + * @type \Google\Cloud\Logging\V2\BigQueryDataset $bigquery_dataset + * The information of a BigQuery Dataset. When a link is created, a BigQuery + * dataset is created along with it, in the same project as the LogBucket it's + * linked to. This dataset will also have BigQuery Views corresponding to the + * LogViews in the bucket. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the link. The name can have up to 100 characters. + * A valid link id (at the end of the link name) must only have alphanumeric + * characters and underscores within it. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * For example: + * `projects/my-project/locations/global/buckets/my-bucket/links/my_link + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the link. The name can have up to 100 characters. + * A valid link id (at the end of the link name) must only have alphanumeric + * characters and underscores within it. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" + * For example: + * `projects/my-project/locations/global/buckets/my-bucket/links/my_link + * + * 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; + } + + /** + * Describes this link. + * The maximum length of the description is 8000 characters. + * + * Generated from protobuf field string description = 2; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Describes this link. + * The maximum length of the description is 8000 characters. + * + * Generated from protobuf field string description = 2; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The creation timestamp of the link. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The creation timestamp of the link. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The resource lifecycle state. + * + * Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getLifecycleState() + { + return $this->lifecycle_state; + } + + /** + * Output only. The resource lifecycle state. + * + * Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setLifecycleState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\LifecycleState::class); + $this->lifecycle_state = $var; + + return $this; + } + + /** + * The information of a BigQuery Dataset. When a link is created, a BigQuery + * dataset is created along with it, in the same project as the LogBucket it's + * linked to. This dataset will also have BigQuery Views corresponding to the + * LogViews in the bucket. + * + * Generated from protobuf field .google.logging.v2.BigQueryDataset bigquery_dataset = 5; + * @return \Google\Cloud\Logging\V2\BigQueryDataset|null + */ + public function getBigqueryDataset() + { + return $this->bigquery_dataset; + } + + public function hasBigqueryDataset() + { + return isset($this->bigquery_dataset); + } + + public function clearBigqueryDataset() + { + unset($this->bigquery_dataset); + } + + /** + * The information of a BigQuery Dataset. When a link is created, a BigQuery + * dataset is created along with it, in the same project as the LogBucket it's + * linked to. This dataset will also have BigQuery Views corresponding to the + * LogViews in the bucket. + * + * Generated from protobuf field .google.logging.v2.BigQueryDataset bigquery_dataset = 5; + * @param \Google\Cloud\Logging\V2\BigQueryDataset $var + * @return $this + */ + public function setBigqueryDataset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\BigQueryDataset::class); + $this->bigquery_dataset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LinkMetadata.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LinkMetadata.php new file mode 100644 index 000000000000..4a6bb20a6e2d --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LinkMetadata.php @@ -0,0 +1,230 @@ +google.logging.v2.LinkMetadata + */ +class LinkMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The start time of an operation. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The end time of an operation. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + /** + * State of an operation. + * + * Generated from protobuf field .google.logging.v2.OperationState state = 3; + */ + protected $state = 0; + protected $request; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The start time of an operation. + * @type \Google\Protobuf\Timestamp $end_time + * The end time of an operation. + * @type int $state + * State of an operation. + * @type \Google\Cloud\Logging\V2\CreateLinkRequest $create_link_request + * CreateLink RPC request. + * @type \Google\Cloud\Logging\V2\DeleteLinkRequest $delete_link_request + * DeleteLink RPC request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * The start time of an operation. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The start time of an operation. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The end time of an operation. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * The end time of an operation. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * State of an operation. + * + * Generated from protobuf field .google.logging.v2.OperationState state = 3; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * State of an operation. + * + * Generated from protobuf field .google.logging.v2.OperationState state = 3; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\OperationState::class); + $this->state = $var; + + return $this; + } + + /** + * CreateLink RPC request. + * + * Generated from protobuf field .google.logging.v2.CreateLinkRequest create_link_request = 4; + * @return \Google\Cloud\Logging\V2\CreateLinkRequest|null + */ + public function getCreateLinkRequest() + { + return $this->readOneof(4); + } + + public function hasCreateLinkRequest() + { + return $this->hasOneof(4); + } + + /** + * CreateLink RPC request. + * + * Generated from protobuf field .google.logging.v2.CreateLinkRequest create_link_request = 4; + * @param \Google\Cloud\Logging\V2\CreateLinkRequest $var + * @return $this + */ + public function setCreateLinkRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\CreateLinkRequest::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * DeleteLink RPC request. + * + * Generated from protobuf field .google.logging.v2.DeleteLinkRequest delete_link_request = 5; + * @return \Google\Cloud\Logging\V2\DeleteLinkRequest|null + */ + public function getDeleteLinkRequest() + { + return $this->readOneof(5); + } + + public function hasDeleteLinkRequest() + { + return $this->hasOneof(5); + } + + /** + * DeleteLink RPC request. + * + * Generated from protobuf field .google.logging.v2.DeleteLinkRequest delete_link_request = 5; + * @param \Google\Cloud\Logging\V2\DeleteLinkRequest $var + * @return $this + */ + public function setDeleteLinkRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\DeleteLinkRequest::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getRequest() + { + return $this->whichOneof("request"); + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsRequest.php new file mode 100644 index 000000000000..224cc5337ea2 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsRequest.php @@ -0,0 +1,206 @@ +google.logging.v2.ListBucketsRequest + */ +class ListBucketsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource whose buckets are to be listed: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * Note: The locations portion of the resource must be specified, but + * supplying the character `-` in place of [LOCATION_ID] will return all + * buckets. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + + /** + * @param string $parent Required. The parent resource whose buckets are to be listed: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * + * Note: The locations portion of the resource must be specified, but + * supplying the character `-` in place of [LOCATION_ID] will return all + * buckets. Please see + * {@see ConfigServiceV2Client::organizationLocationName()} for help formatting this field. + * + * @return \Google\Cloud\Logging\V2\ListBucketsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource whose buckets are to be listed: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * Note: The locations portion of the resource must be specified, but + * supplying the character `-` in place of [LOCATION_ID] will return all + * buckets. + * @type string $page_token + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * @type int $page_size + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource whose buckets are to be listed: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * Note: The locations portion of the resource must be specified, but + * supplying the character `-` in place of [LOCATION_ID] will return all + * buckets. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource whose buckets are to be listed: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" + * Note: The locations portion of the resource must be specified, but + * supplying the character `-` in place of [LOCATION_ID] will return all + * buckets. + * + * 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; + } + + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsResponse.php new file mode 100644 index 000000000000..35db3372403b --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsResponse.php @@ -0,0 +1,109 @@ +google.logging.v2.ListBucketsResponse + */ +class ListBucketsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of buckets. + * + * Generated from protobuf field repeated .google.logging.v2.LogBucket buckets = 1; + */ + private $buckets; + /** + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Logging\V2\LogBucket[] $buckets + * A list of buckets. + * @type string $next_page_token + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * A list of buckets. + * + * Generated from protobuf field repeated .google.logging.v2.LogBucket buckets = 1; + * @return RepeatedField<\Google\Cloud\Logging\V2\LogBucket> + */ + public function getBuckets() + { + return $this->buckets; + } + + /** + * A list of buckets. + * + * Generated from protobuf field repeated .google.logging.v2.LogBucket buckets = 1; + * @param \Google\Cloud\Logging\V2\LogBucket[] $var + * @return $this + */ + public function setBuckets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogBucket::class); + $this->buckets = $arr; + + return $this; + } + + /** + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * + * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsRequest.php new file mode 100644 index 000000000000..31a8f81d98be --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsRequest.php @@ -0,0 +1,190 @@ +google.logging.v2.ListExclusionsRequest + */ +class ListExclusionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource whose exclusions are to be listed. + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + + /** + * @param string $parent Required. The parent resource whose exclusions are to be listed. + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * Please see {@see ConfigServiceV2Client::projectName()} for help formatting this field. + * + * @return \Google\Cloud\Logging\V2\ListExclusionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource whose exclusions are to be listed. + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * @type string $page_token + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * @type int $page_size + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource whose exclusions are to be listed. + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource whose exclusions are to be listed. + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsResponse.php new file mode 100644 index 000000000000..513a7eff6ac8 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsResponse.php @@ -0,0 +1,109 @@ +google.logging.v2.ListExclusionsResponse + */ +class ListExclusionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of exclusions. + * + * Generated from protobuf field repeated .google.logging.v2.LogExclusion exclusions = 1; + */ + private $exclusions; + /** + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Logging\V2\LogExclusion[] $exclusions + * A list of exclusions. + * @type string $next_page_token + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * A list of exclusions. + * + * Generated from protobuf field repeated .google.logging.v2.LogExclusion exclusions = 1; + * @return RepeatedField<\Google\Cloud\Logging\V2\LogExclusion> + */ + public function getExclusions() + { + return $this->exclusions; + } + + /** + * A list of exclusions. + * + * Generated from protobuf field repeated .google.logging.v2.LogExclusion exclusions = 1; + * @param \Google\Cloud\Logging\V2\LogExclusion[] $var + * @return $this + */ + public function setExclusions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogExclusion::class); + $this->exclusions = $arr; + + return $this; + } + + /** + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * + * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksRequest.php new file mode 100644 index 000000000000..43679c5bc760 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksRequest.php @@ -0,0 +1,178 @@ +google.logging.v2.ListLinksRequest + */ +class ListLinksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource whose links are to be listed: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. The maximum number of results to return from this request. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + + /** + * @param string $parent Required. The parent resource whose links are to be listed: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ + * Please see {@see ConfigServiceV2Client::logBucketName()} for help formatting this field. + * + * @return \Google\Cloud\Logging\V2\ListLinksRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource whose links are to be listed: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ + * @type string $page_token + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. + * @type int $page_size + * Optional. The maximum number of results to return from this request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource whose links are to be listed: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource whose links are to be listed: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The maximum number of results to return from this request. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return from this request. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksResponse.php new file mode 100644 index 000000000000..48d7ba8da57c --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksResponse.php @@ -0,0 +1,109 @@ +google.logging.v2.ListLinksResponse + */ +class ListLinksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of links. + * + * Generated from protobuf field repeated .google.logging.v2.Link links = 1; + */ + private $links; + /** + * If there might be more results than those appearing in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Logging\V2\Link[] $links + * A list of links. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * A list of links. + * + * Generated from protobuf field repeated .google.logging.v2.Link links = 1; + * @return RepeatedField<\Google\Cloud\Logging\V2\Link> + */ + public function getLinks() + { + return $this->links; + } + + /** + * A list of links. + * + * Generated from protobuf field repeated .google.logging.v2.Link links = 1; + * @param \Google\Cloud\Logging\V2\Link[] $var + * @return $this + */ + public function setLinks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\Link::class); + $this->links = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * + * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesRequest.php new file mode 100644 index 000000000000..881df27fc348 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesRequest.php @@ -0,0 +1,354 @@ +google.logging.v2.ListLogEntriesRequest + */ +class ListLogEntriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Names of one or more parent resources from which to + * retrieve log entries: + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * May alternatively be one or more views: + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * Projects listed in the `project_ids` field are added to this list. + * A maximum of 100 resources may be specified in a single request. + * + * Generated from protobuf field repeated string resource_names = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $resource_names; + /** + * Optional. Only log entries that match the filter are returned. An empty + * filter matches all log entries in the resources listed in `resource_names`. + * Referencing a parent resource that is not listed in `resource_names` will + * cause the filter to return no results. The maximum length of a filter is + * 20,000 characters. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. How the results should be sorted. Presently, the only permitted + * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first + * option returns entries in order of increasing values of + * `LogEntry.timestamp` (oldest first), and the second option returns entries + * in order of decreasing timestamps (newest first). Entries with equal + * timestamps are returned in order of their `insert_id` values. + * + * Generated from protobuf field string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. The maximum number of results to return from this request. + * Default is 50. If the value is negative or exceeds 1000, the request is + * rejected. The presence of `next_page_token` in the response indicates that + * more results might be available. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string[] $resourceNames Required. Names of one or more parent resources from which to + * retrieve log entries: + * + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * + * May alternatively be one or more views: + * + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + * Projects listed in the `project_ids` field are added to this list. + * A maximum of 100 resources may be specified in a single request. Please see + * {@see LoggingServiceV2Client::projectName()} for help formatting this field. + * @param string $filter Optional. Only log entries that match the filter are returned. An empty + * filter matches all log entries in the resources listed in `resource_names`. + * Referencing a parent resource that is not listed in `resource_names` will + * cause the filter to return no results. The maximum length of a filter is + * 20,000 characters. + * @param string $orderBy Optional. How the results should be sorted. Presently, the only permitted + * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first + * option returns entries in order of increasing values of + * `LogEntry.timestamp` (oldest first), and the second option returns entries + * in order of decreasing timestamps (newest first). Entries with equal + * timestamps are returned in order of their `insert_id` values. + * + * @return \Google\Cloud\Logging\V2\ListLogEntriesRequest + * + * @experimental + */ + public static function build(array $resourceNames, string $filter, string $orderBy): self + { + return (new self()) + ->setResourceNames($resourceNames) + ->setFilter($filter) + ->setOrderBy($orderBy); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $resource_names + * Required. Names of one or more parent resources from which to + * retrieve log entries: + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * May alternatively be one or more views: + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * Projects listed in the `project_ids` field are added to this list. + * A maximum of 100 resources may be specified in a single request. + * @type string $filter + * Optional. Only log entries that match the filter are returned. An empty + * filter matches all log entries in the resources listed in `resource_names`. + * Referencing a parent resource that is not listed in `resource_names` will + * cause the filter to return no results. The maximum length of a filter is + * 20,000 characters. + * @type string $order_by + * Optional. How the results should be sorted. Presently, the only permitted + * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first + * option returns entries in order of increasing values of + * `LogEntry.timestamp` (oldest first), and the second option returns entries + * in order of decreasing timestamps (newest first). Entries with equal + * timestamps are returned in order of their `insert_id` values. + * @type int $page_size + * Optional. The maximum number of results to return from this request. + * Default is 50. If the value is negative or exceeds 1000, the request is + * rejected. The presence of `next_page_token` in the response indicates that + * more results might be available. + * @type string $page_token + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\Logging::initOnce(); + parent::__construct($data); + } + + /** + * Required. Names of one or more parent resources from which to + * retrieve log entries: + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * May alternatively be one or more views: + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * Projects listed in the `project_ids` field are added to this list. + * A maximum of 100 resources may be specified in a single request. + * + * Generated from protobuf field repeated string resource_names = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getResourceNames() + { + return $this->resource_names; + } + + /** + * Required. Names of one or more parent resources from which to + * retrieve log entries: + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * May alternatively be one or more views: + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * Projects listed in the `project_ids` field are added to this list. + * A maximum of 100 resources may be specified in a single request. + * + * Generated from protobuf field repeated string resource_names = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setResourceNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->resource_names = $arr; + + return $this; + } + + /** + * Optional. Only log entries that match the filter are returned. An empty + * filter matches all log entries in the resources listed in `resource_names`. + * Referencing a parent resource that is not listed in `resource_names` will + * cause the filter to return no results. The maximum length of a filter is + * 20,000 characters. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Only log entries that match the filter are returned. An empty + * filter matches all log entries in the resources listed in `resource_names`. + * Referencing a parent resource that is not listed in `resource_names` will + * cause the filter to return no results. The maximum length of a filter is + * 20,000 characters. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. How the results should be sorted. Presently, the only permitted + * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first + * option returns entries in order of increasing values of + * `LogEntry.timestamp` (oldest first), and the second option returns entries + * in order of decreasing timestamps (newest first). Entries with equal + * timestamps are returned in order of their `insert_id` values. + * + * Generated from protobuf field string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. How the results should be sorted. Presently, the only permitted + * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first + * option returns entries in order of increasing values of + * `LogEntry.timestamp` (oldest first), and the second option returns entries + * in order of decreasing timestamps (newest first). Entries with equal + * timestamps are returned in order of their `insert_id` values. + * + * Generated from protobuf field string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. The maximum number of results to return from this request. + * Default is 50. If the value is negative or exceeds 1000, the request is + * rejected. The presence of `next_page_token` in the response indicates that + * more results might be available. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return from this request. + * Default is 50. If the value is negative or exceeds 1000, the request is + * rejected. The presence of `next_page_token` in the response indicates that + * more results might be available. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `page_token` must be the value of + * `next_page_token` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesResponse.php new file mode 100644 index 000000000000..10436906f93d --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesResponse.php @@ -0,0 +1,141 @@ +google.logging.v2.ListLogEntriesResponse + */ +class ListLogEntriesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of log entries. If `entries` is empty, `nextPageToken` may still be + * returned, indicating that more entries may exist. See `nextPageToken` for + * more information. + * + * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 1; + */ + private $entries; + /** + * If there might be more results than those appearing in this response, then + * `nextPageToken` is included. To get the next set of results, call this + * method again using the value of `nextPageToken` as `pageToken`. + * If a value for `next_page_token` appears and the `entries` field is empty, + * it means that the search found no log entries so far but it did not have + * time to search all the possible log entries. Retry the method with this + * value for `page_token` to continue the search. Alternatively, consider + * speeding up the search by changing your filter to specify a single log name + * or resource type, or to narrow the time range of the search. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Logging\V2\LogEntry[] $entries + * A list of log entries. If `entries` is empty, `nextPageToken` may still be + * returned, indicating that more entries may exist. See `nextPageToken` for + * more information. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `nextPageToken` is included. To get the next set of results, call this + * method again using the value of `nextPageToken` as `pageToken`. + * If a value for `next_page_token` appears and the `entries` field is empty, + * it means that the search found no log entries so far but it did not have + * time to search all the possible log entries. Retry the method with this + * value for `page_token` to continue the search. Alternatively, consider + * speeding up the search by changing your filter to specify a single log name + * or resource type, or to narrow the time range of the search. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\Logging::initOnce(); + parent::__construct($data); + } + + /** + * A list of log entries. If `entries` is empty, `nextPageToken` may still be + * returned, indicating that more entries may exist. See `nextPageToken` for + * more information. + * + * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 1; + * @return RepeatedField<\Google\Cloud\Logging\V2\LogEntry> + */ + public function getEntries() + { + return $this->entries; + } + + /** + * A list of log entries. If `entries` is empty, `nextPageToken` may still be + * returned, indicating that more entries may exist. See `nextPageToken` for + * more information. + * + * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 1; + * @param \Google\Cloud\Logging\V2\LogEntry[] $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogEntry::class); + $this->entries = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `nextPageToken` is included. To get the next set of results, call this + * method again using the value of `nextPageToken` as `pageToken`. + * If a value for `next_page_token` appears and the `entries` field is empty, + * it means that the search found no log entries so far but it did not have + * time to search all the possible log entries. Retry the method with this + * value for `page_token` to continue the search. Alternatively, consider + * speeding up the search by changing your filter to specify a single log name + * or resource type, or to narrow the time range of the search. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `nextPageToken` is included. To get the next set of results, call this + * method again using the value of `nextPageToken` as `pageToken`. + * If a value for `next_page_token` appears and the `entries` field is empty, + * it means that the search found no log entries so far but it did not have + * time to search all the possible log entries. Retry the method with this + * value for `page_token` to continue the search. Alternatively, consider + * speeding up the search by changing your filter to specify a single log name + * or resource type, or to narrow the time range of the search. + * + * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsRequest.php new file mode 100644 index 000000000000..5c6a1b627d1c --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsRequest.php @@ -0,0 +1,175 @@ +google.logging.v2.ListLogMetricsRequest + */ +class ListLogMetricsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the project containing the metrics: + * "projects/[PROJECT_ID]" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + + /** + * @param string $parent Required. The name of the project containing the metrics: + * + * "projects/[PROJECT_ID]" + * Please see {@see MetricsServiceV2Client::projectName()} for help formatting this field. + * + * @return \Google\Cloud\Logging\V2\ListLogMetricsRequest + * + * @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 name of the project containing the metrics: + * "projects/[PROJECT_ID]" + * @type string $page_token + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * @type int $page_size + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the project containing the metrics: + * "projects/[PROJECT_ID]" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The name of the project containing the metrics: + * "projects/[PROJECT_ID]" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsResponse.php new file mode 100644 index 000000000000..df66f17a1f24 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsResponse.php @@ -0,0 +1,109 @@ +google.logging.v2.ListLogMetricsResponse + */ +class ListLogMetricsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of logs-based metrics. + * + * Generated from protobuf field repeated .google.logging.v2.LogMetric metrics = 1; + */ + private $metrics; + /** + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call this + * method again using the value of `nextPageToken` as `pageToken`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Logging\V2\LogMetric[] $metrics + * A list of logs-based metrics. + * @type string $next_page_token + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call this + * method again using the value of `nextPageToken` as `pageToken`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); + parent::__construct($data); + } + + /** + * A list of logs-based metrics. + * + * Generated from protobuf field repeated .google.logging.v2.LogMetric metrics = 1; + * @return RepeatedField<\Google\Cloud\Logging\V2\LogMetric> + */ + public function getMetrics() + { + return $this->metrics; + } + + /** + * A list of logs-based metrics. + * + * Generated from protobuf field repeated .google.logging.v2.LogMetric metrics = 1; + * @param \Google\Cloud\Logging\V2\LogMetric[] $var + * @return $this + */ + public function setMetrics($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogMetric::class); + $this->metrics = $arr; + + return $this; + } + + /** + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call this + * method again using the value of `nextPageToken` as `pageToken`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call this + * method again using the value of `nextPageToken` as `pageToken`. + * + * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsRequest.php new file mode 100644 index 000000000000..27f5a2a1b1f7 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsRequest.php @@ -0,0 +1,264 @@ +google.logging.v2.ListLogsRequest + */ +class ListLogsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name to list logs for: + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. List of resource names to list logs for: + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * To support legacy queries, it could also be: + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * The resource name in the `parent` field is added to this list. + * + * Generated from protobuf field repeated string resource_names = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + private $resource_names; + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name to list logs for: + * + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * Please see {@see LoggingServiceV2Client::projectName()} for help formatting this field. + * + * @return \Google\Cloud\Logging\V2\ListLogsRequest + * + * @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 resource name to list logs for: + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * @type string[] $resource_names + * Optional. List of resource names to list logs for: + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * To support legacy queries, it could also be: + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * The resource name in the `parent` field is added to this list. + * @type int $page_size + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * @type string $page_token + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\Logging::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name to list logs for: + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name to list logs for: + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. List of resource names to list logs for: + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * To support legacy queries, it could also be: + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * The resource name in the `parent` field is added to this list. + * + * Generated from protobuf field repeated string resource_names = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getResourceNames() + { + return $this->resource_names; + } + + /** + * Optional. List of resource names to list logs for: + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * To support legacy queries, it could also be: + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * The resource name in the `parent` field is added to this list. + * + * Generated from protobuf field repeated string resource_names = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setResourceNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->resource_names = $arr; + + return $this; + } + + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsResponse.php new file mode 100644 index 000000000000..7e958521adea --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsResponse.php @@ -0,0 +1,117 @@ +google.logging.v2.ListLogsResponse + */ +class ListLogsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of log names. For example, + * `"projects/my-project/logs/syslog"` or + * `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * + * Generated from protobuf field repeated string log_names = 3; + */ + private $log_names; + /** + * If there might be more results than those appearing in this response, then + * `nextPageToken` is included. To get the next set of results, call this + * method again using the value of `nextPageToken` as `pageToken`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $log_names + * A list of log names. For example, + * `"projects/my-project/logs/syslog"` or + * `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `nextPageToken` is included. To get the next set of results, call this + * method again using the value of `nextPageToken` as `pageToken`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\Logging::initOnce(); + parent::__construct($data); + } + + /** + * A list of log names. For example, + * `"projects/my-project/logs/syslog"` or + * `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * + * Generated from protobuf field repeated string log_names = 3; + * @return RepeatedField + */ + public function getLogNames() + { + return $this->log_names; + } + + /** + * A list of log names. For example, + * `"projects/my-project/logs/syslog"` or + * `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * + * Generated from protobuf field repeated string log_names = 3; + * @param string[] $var + * @return $this + */ + public function setLogNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->log_names = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `nextPageToken` is included. To get the next set of results, call this + * method again using the value of `nextPageToken` as `pageToken`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `nextPageToken` is included. To get the next set of results, call this + * method again using the value of `nextPageToken` as `pageToken`. + * + * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsRequest.php new file mode 100644 index 000000000000..c0111d37642c --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsRequest.php @@ -0,0 +1,121 @@ +google.logging.v2.ListMonitoredResourceDescriptorsRequest + */ +class ListMonitoredResourceDescriptorsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $page_size + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * @type string $page_token + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\Logging::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsResponse.php new file mode 100644 index 000000000000..594fad76590a --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsResponse.php @@ -0,0 +1,109 @@ +google.logging.v2.ListMonitoredResourceDescriptorsResponse + */ +class ListMonitoredResourceDescriptorsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of resource descriptors. + * + * Generated from protobuf field repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; + */ + private $resource_descriptors; + /** + * If there might be more results than those appearing in this response, then + * `nextPageToken` is included. To get the next set of results, call this + * method again using the value of `nextPageToken` as `pageToken`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Api\MonitoredResourceDescriptor[] $resource_descriptors + * A list of resource descriptors. + * @type string $next_page_token + * If there might be more results than those appearing in this response, then + * `nextPageToken` is included. To get the next set of results, call this + * method again using the value of `nextPageToken` as `pageToken`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\Logging::initOnce(); + parent::__construct($data); + } + + /** + * A list of resource descriptors. + * + * Generated from protobuf field repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; + * @return RepeatedField<\Google\Api\MonitoredResourceDescriptor> + */ + public function getResourceDescriptors() + { + return $this->resource_descriptors; + } + + /** + * A list of resource descriptors. + * + * Generated from protobuf field repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; + * @param \Google\Api\MonitoredResourceDescriptor[] $var + * @return $this + */ + public function setResourceDescriptors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\MonitoredResourceDescriptor::class); + $this->resource_descriptors = $arr; + + return $this; + } + + /** + * If there might be more results than those appearing in this response, then + * `nextPageToken` is included. To get the next set of results, call this + * method again using the value of `nextPageToken` as `pageToken`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than those appearing in this response, then + * `nextPageToken` is included. To get the next set of results, call this + * method again using the value of `nextPageToken` as `pageToken`. + * + * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksRequest.php new file mode 100644 index 000000000000..f9555cf2ac3b --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksRequest.php @@ -0,0 +1,190 @@ +google.logging.v2.ListSinksRequest + */ +class ListSinksRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource whose sinks are to be listed: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + + /** + * @param string $parent Required. The parent resource whose sinks are to be listed: + * + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * Please see {@see ConfigServiceV2Client::projectName()} for help formatting this field. + * + * @return \Google\Cloud\Logging\V2\ListSinksRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource whose sinks are to be listed: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * @type string $page_token + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * @type int $page_size + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource whose sinks are to be listed: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource whose sinks are to be listed: + * "projects/[PROJECT_ID]" + * "organizations/[ORGANIZATION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]" + * "folders/[FOLDER_ID]" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksResponse.php new file mode 100644 index 000000000000..513450b4ee05 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksResponse.php @@ -0,0 +1,109 @@ +google.logging.v2.ListSinksResponse + */ +class ListSinksResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of sinks. + * + * Generated from protobuf field repeated .google.logging.v2.LogSink sinks = 1; + */ + private $sinks; + /** + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Logging\V2\LogSink[] $sinks + * A list of sinks. + * @type string $next_page_token + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * A list of sinks. + * + * Generated from protobuf field repeated .google.logging.v2.LogSink sinks = 1; + * @return RepeatedField<\Google\Cloud\Logging\V2\LogSink> + */ + public function getSinks() + { + return $this->sinks; + } + + /** + * A list of sinks. + * + * Generated from protobuf field repeated .google.logging.v2.LogSink sinks = 1; + * @param \Google\Cloud\Logging\V2\LogSink[] $var + * @return $this + */ + public function setSinks($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogSink::class); + $this->sinks = $arr; + + return $this; + } + + /** + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * + * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsRequest.php new file mode 100644 index 000000000000..1631b3f0f592 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsRequest.php @@ -0,0 +1,174 @@ +google.logging.v2.ListViewsRequest + */ +class ListViewsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The bucket whose views are to be listed: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + + /** + * @param string $parent Required. The bucket whose views are to be listed: + * + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * @return \Google\Cloud\Logging\V2\ListViewsRequest + * + * @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 bucket whose views are to be listed: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * @type string $page_token + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * @type int $page_size + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The bucket whose views are to be listed: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The bucket whose views are to be listed: + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. If present, then retrieve the next batch of results from the + * preceding call to this method. `pageToken` must be the value of + * `nextPageToken` from the previous response. The values of other method + * parameters should be identical to those in the previous call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of results to return from this request. + * Non-positive values are ignored. The presence of `nextPageToken` in the + * response indicates that more results might be available. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsResponse.php new file mode 100644 index 000000000000..ecc28441482c --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsResponse.php @@ -0,0 +1,109 @@ +google.logging.v2.ListViewsResponse + */ +class ListViewsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of views. + * + * Generated from protobuf field repeated .google.logging.v2.LogView views = 1; + */ + private $views; + /** + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Logging\V2\LogView[] $views + * A list of views. + * @type string $next_page_token + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * A list of views. + * + * Generated from protobuf field repeated .google.logging.v2.LogView views = 1; + * @return RepeatedField<\Google\Cloud\Logging\V2\LogView> + */ + public function getViews() + { + return $this->views; + } + + /** + * A list of views. + * + * Generated from protobuf field repeated .google.logging.v2.LogView views = 1; + * @param \Google\Cloud\Logging\V2\LogView[] $var + * @return $this + */ + public function setViews($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogView::class); + $this->views = $arr; + + return $this; + } + + /** + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If there might be more results than appear in this response, then + * `nextPageToken` is included. To get the next set of results, call the same + * method again using the value of `nextPageToken` as `pageToken`. + * + * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/LocationMetadata.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LocationMetadata.php new file mode 100644 index 000000000000..a101ab0e4e41 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LocationMetadata.php @@ -0,0 +1,71 @@ +google.logging.v2.LocationMetadata + */ +class LocationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Indicates whether or not Log Analytics features are supported in the given + * location. + * + * Generated from protobuf field bool log_analytics_enabled = 1; + */ + protected $log_analytics_enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $log_analytics_enabled + * Indicates whether or not Log Analytics features are supported in the given + * location. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Indicates whether or not Log Analytics features are supported in the given + * location. + * + * Generated from protobuf field bool log_analytics_enabled = 1; + * @return bool + */ + public function getLogAnalyticsEnabled() + { + return $this->log_analytics_enabled; + } + + /** + * Indicates whether or not Log Analytics features are supported in the given + * location. + * + * Generated from protobuf field bool log_analytics_enabled = 1; + * @param bool $var + * @return $this + */ + public function setLogAnalyticsEnabled($var) + { + GPBUtil::checkBool($var); + $this->log_analytics_enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogBucket.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogBucket.php new file mode 100644 index 000000000000..b1314fed0837 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogBucket.php @@ -0,0 +1,525 @@ +google.logging.v2.LogBucket + */ +class LogBucket extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the bucket. + * For example: + * `projects/my-project/locations/global/buckets/my-bucket` + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support) + * For the location of `global` it is unspecified where log entries are + * actually stored. + * After a bucket has been created, the location cannot be changed. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Describes this bucket. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Output only. The creation timestamp of the bucket. This is not set for any + * of the default buckets. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last update timestamp of the bucket. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Logs will be retained by default for this amount of time, after which they + * will automatically be deleted. The minimum retention period is 1 day. If + * this value is set to zero at bucket creation time, the default time of 30 + * days will be used. + * + * Generated from protobuf field int32 retention_days = 11; + */ + protected $retention_days = 0; + /** + * Whether the bucket is locked. + * The retention period on a locked bucket cannot be changed. Locked buckets + * may only be deleted if they are empty. + * + * Generated from protobuf field bool locked = 9; + */ + protected $locked = false; + /** + * Output only. The bucket lifecycle state. + * + * Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $lifecycle_state = 0; + /** + * Whether log analytics is enabled for this bucket. + * Once enabled, log analytics features cannot be disabled. + * + * Generated from protobuf field bool analytics_enabled = 14; + */ + protected $analytics_enabled = false; + /** + * Log entry field paths that are denied access in this bucket. + * The following fields and their children are eligible: `textPayload`, + * `jsonPayload`, `protoPayload`, `httpRequest`, `labels`, `sourceLocation`. + * Restricting a repeated field will restrict all values. Adding a parent will + * block all child fields. (e.g. `foo.bar` will block `foo.bar.baz`) + * + * Generated from protobuf field repeated string restricted_fields = 15; + */ + private $restricted_fields; + /** + * A list of indexed fields and related configuration data. + * + * Generated from protobuf field repeated .google.logging.v2.IndexConfig index_configs = 17; + */ + private $index_configs; + /** + * The CMEK settings of the log bucket. If present, new log entries written to + * this log bucket are encrypted using the CMEK key provided in this + * configuration. If a log bucket has CMEK settings, the CMEK settings cannot + * be disabled later by updating the log bucket. Changing the KMS key is + * allowed. + * + * Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 19; + */ + protected $cmek_settings = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the bucket. + * For example: + * `projects/my-project/locations/global/buckets/my-bucket` + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support) + * For the location of `global` it is unspecified where log entries are + * actually stored. + * After a bucket has been created, the location cannot be changed. + * @type string $description + * Describes this bucket. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation timestamp of the bucket. This is not set for any + * of the default buckets. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last update timestamp of the bucket. + * @type int $retention_days + * Logs will be retained by default for this amount of time, after which they + * will automatically be deleted. The minimum retention period is 1 day. If + * this value is set to zero at bucket creation time, the default time of 30 + * days will be used. + * @type bool $locked + * Whether the bucket is locked. + * The retention period on a locked bucket cannot be changed. Locked buckets + * may only be deleted if they are empty. + * @type int $lifecycle_state + * Output only. The bucket lifecycle state. + * @type bool $analytics_enabled + * Whether log analytics is enabled for this bucket. + * Once enabled, log analytics features cannot be disabled. + * @type string[] $restricted_fields + * Log entry field paths that are denied access in this bucket. + * The following fields and their children are eligible: `textPayload`, + * `jsonPayload`, `protoPayload`, `httpRequest`, `labels`, `sourceLocation`. + * Restricting a repeated field will restrict all values. Adding a parent will + * block all child fields. (e.g. `foo.bar` will block `foo.bar.baz`) + * @type \Google\Cloud\Logging\V2\IndexConfig[] $index_configs + * A list of indexed fields and related configuration data. + * @type \Google\Cloud\Logging\V2\CmekSettings $cmek_settings + * The CMEK settings of the log bucket. If present, new log entries written to + * this log bucket are encrypted using the CMEK key provided in this + * configuration. If a log bucket has CMEK settings, the CMEK settings cannot + * be disabled later by updating the log bucket. Changing the KMS key is + * allowed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the bucket. + * For example: + * `projects/my-project/locations/global/buckets/my-bucket` + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support) + * For the location of `global` it is unspecified where log entries are + * actually stored. + * After a bucket has been created, the location cannot be changed. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the bucket. + * For example: + * `projects/my-project/locations/global/buckets/my-bucket` + * For a list of supported locations, see [Supported + * Regions](https://cloud.google.com/logging/docs/region-support) + * For the location of `global` it is unspecified where log entries are + * actually stored. + * After a bucket has been created, the location cannot be changed. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Describes this bucket. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Describes this bucket. + * + * 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; + } + + /** + * Output only. The creation timestamp of the bucket. This is not set for any + * of the default buckets. + * + * 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 creation timestamp of the bucket. This is not set for any + * of the default buckets. + * + * 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; + } + + /** + * Output only. The last update timestamp of the bucket. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last update timestamp of the bucket. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Logs will be retained by default for this amount of time, after which they + * will automatically be deleted. The minimum retention period is 1 day. If + * this value is set to zero at bucket creation time, the default time of 30 + * days will be used. + * + * Generated from protobuf field int32 retention_days = 11; + * @return int + */ + public function getRetentionDays() + { + return $this->retention_days; + } + + /** + * Logs will be retained by default for this amount of time, after which they + * will automatically be deleted. The minimum retention period is 1 day. If + * this value is set to zero at bucket creation time, the default time of 30 + * days will be used. + * + * Generated from protobuf field int32 retention_days = 11; + * @param int $var + * @return $this + */ + public function setRetentionDays($var) + { + GPBUtil::checkInt32($var); + $this->retention_days = $var; + + return $this; + } + + /** + * Whether the bucket is locked. + * The retention period on a locked bucket cannot be changed. Locked buckets + * may only be deleted if they are empty. + * + * Generated from protobuf field bool locked = 9; + * @return bool + */ + public function getLocked() + { + return $this->locked; + } + + /** + * Whether the bucket is locked. + * The retention period on a locked bucket cannot be changed. Locked buckets + * may only be deleted if they are empty. + * + * Generated from protobuf field bool locked = 9; + * @param bool $var + * @return $this + */ + public function setLocked($var) + { + GPBUtil::checkBool($var); + $this->locked = $var; + + return $this; + } + + /** + * Output only. The bucket lifecycle state. + * + * Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getLifecycleState() + { + return $this->lifecycle_state; + } + + /** + * Output only. The bucket lifecycle state. + * + * Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setLifecycleState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\LifecycleState::class); + $this->lifecycle_state = $var; + + return $this; + } + + /** + * Whether log analytics is enabled for this bucket. + * Once enabled, log analytics features cannot be disabled. + * + * Generated from protobuf field bool analytics_enabled = 14; + * @return bool + */ + public function getAnalyticsEnabled() + { + return $this->analytics_enabled; + } + + /** + * Whether log analytics is enabled for this bucket. + * Once enabled, log analytics features cannot be disabled. + * + * Generated from protobuf field bool analytics_enabled = 14; + * @param bool $var + * @return $this + */ + public function setAnalyticsEnabled($var) + { + GPBUtil::checkBool($var); + $this->analytics_enabled = $var; + + return $this; + } + + /** + * Log entry field paths that are denied access in this bucket. + * The following fields and their children are eligible: `textPayload`, + * `jsonPayload`, `protoPayload`, `httpRequest`, `labels`, `sourceLocation`. + * Restricting a repeated field will restrict all values. Adding a parent will + * block all child fields. (e.g. `foo.bar` will block `foo.bar.baz`) + * + * Generated from protobuf field repeated string restricted_fields = 15; + * @return RepeatedField + */ + public function getRestrictedFields() + { + return $this->restricted_fields; + } + + /** + * Log entry field paths that are denied access in this bucket. + * The following fields and their children are eligible: `textPayload`, + * `jsonPayload`, `protoPayload`, `httpRequest`, `labels`, `sourceLocation`. + * Restricting a repeated field will restrict all values. Adding a parent will + * block all child fields. (e.g. `foo.bar` will block `foo.bar.baz`) + * + * Generated from protobuf field repeated string restricted_fields = 15; + * @param string[] $var + * @return $this + */ + public function setRestrictedFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->restricted_fields = $arr; + + return $this; + } + + /** + * A list of indexed fields and related configuration data. + * + * Generated from protobuf field repeated .google.logging.v2.IndexConfig index_configs = 17; + * @return RepeatedField<\Google\Cloud\Logging\V2\IndexConfig> + */ + public function getIndexConfigs() + { + return $this->index_configs; + } + + /** + * A list of indexed fields and related configuration data. + * + * Generated from protobuf field repeated .google.logging.v2.IndexConfig index_configs = 17; + * @param \Google\Cloud\Logging\V2\IndexConfig[] $var + * @return $this + */ + public function setIndexConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\IndexConfig::class); + $this->index_configs = $arr; + + return $this; + } + + /** + * The CMEK settings of the log bucket. If present, new log entries written to + * this log bucket are encrypted using the CMEK key provided in this + * configuration. If a log bucket has CMEK settings, the CMEK settings cannot + * be disabled later by updating the log bucket. Changing the KMS key is + * allowed. + * + * Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 19; + * @return \Google\Cloud\Logging\V2\CmekSettings|null + */ + public function getCmekSettings() + { + return $this->cmek_settings; + } + + public function hasCmekSettings() + { + return isset($this->cmek_settings); + } + + public function clearCmekSettings() + { + unset($this->cmek_settings); + } + + /** + * The CMEK settings of the log bucket. If present, new log entries written to + * this log bucket are encrypted using the CMEK key provided in this + * configuration. If a log bucket has CMEK settings, the CMEK settings cannot + * be disabled later by updating the log bucket. Changing the KMS key is + * allowed. + * + * Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 19; + * @param \Google\Cloud\Logging\V2\CmekSettings $var + * @return $this + */ + public function setCmekSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\CmekSettings::class); + $this->cmek_settings = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntry.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntry.php new file mode 100644 index 000000000000..8592900f4140 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntry.php @@ -0,0 +1,1061 @@ +google.logging.v2.LogEntry + */ +class LogEntry extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the log to which this log entry belongs: + * "projects/[PROJECT_ID]/logs/[LOG_ID]" + * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + * "folders/[FOLDER_ID]/logs/[LOG_ID]" + * A project number may be used in place of PROJECT_ID. The project number is + * translated to its corresponding PROJECT_ID internally and the `log_name` + * field will contain PROJECT_ID in queries and exports. + * `[LOG_ID]` must be URL-encoded within `log_name`. Example: + * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * `[LOG_ID]` must be less than 512 characters long and can only include the + * following characters: upper and lower case alphanumeric characters, + * forward-slash, underscore, hyphen, and period. + * For backward compatibility, if `log_name` begins with a forward-slash, such + * as `/projects/...`, then the log entry is ingested as usual, but the + * forward-slash is removed. Listing the log entry will not show the leading + * slash and filtering for a log name with a leading slash will never return + * any results. + * + * Generated from protobuf field string log_name = 12 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $log_name = ''; + /** + * Required. The monitored resource that produced this log entry. + * Example: a log entry that reports a database error would be associated with + * the monitored resource designating the particular database that reported + * the error. + * + * Generated from protobuf field .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $resource = null; + /** + * Optional. The time the event described by the log entry occurred. This time + * is used to compute the log entry's age and to enforce the logs retention + * period. If this field is omitted in a new log entry, then Logging assigns + * it the current time. Timestamps have nanosecond accuracy, but trailing + * zeros in the fractional seconds might be omitted when the timestamp is + * displayed. + * Incoming log entries must have timestamps that don't exceed the + * [logs retention + * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in + * the past, and that don't exceed 24 hours in the future. Log entries outside + * those time boundaries aren't ingested by Logging. + * + * Generated from protobuf field .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $timestamp = null; + /** + * Output only. The time the log entry was received by Logging. + * + * Generated from protobuf field .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $receive_timestamp = null; + /** + * Optional. The severity of the log entry. The default value is + * `LogSeverity.DEFAULT`. + * + * Generated from protobuf field .google.logging.type.LogSeverity severity = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $severity = 0; + /** + * Optional. A unique identifier for the log entry. If you provide a value, + * then Logging considers other log entries in the same project, with the same + * `timestamp`, and with the same `insert_id` to be duplicates which are + * removed in a single query result. However, there are no guarantees of + * de-duplication in the export of logs. + * If the `insert_id` is omitted when writing a log entry, the Logging API + * assigns its own unique identifier in this field. + * In queries, the `insert_id` is also used to order log entries that have + * the same `log_name` and `timestamp` values. + * + * Generated from protobuf field string insert_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $insert_id = ''; + /** + * Optional. Information about the HTTP request associated with this log + * entry, if applicable. + * + * Generated from protobuf field .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $http_request = null; + /** + * Optional. A map of key, value pairs that provides additional information + * about the log entry. The labels can be user-defined or system-defined. + * User-defined labels are arbitrary key, value pairs that you can use to + * classify logs. + * System-defined labels are defined by GCP services for platform logs. + * They have two components - a service namespace component and the + * attribute name. For example: `compute.googleapis.com/resource_name`. + * Cloud Logging truncates label keys that exceed 512 B and label + * values that exceed 64 KB upon their associated log entry being + * written. The truncation is indicated by an ellipsis at the + * end of the character string. + * + * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Optional. Information about an operation associated with the log entry, if + * applicable. + * + * Generated from protobuf field .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $operation = null; + /** + * Optional. The REST resource name of the trace being written to + * [Cloud Trace](https://cloud.google.com/trace) in + * association with this log entry. For example, if your trace data is stored + * in the Cloud project "my-trace-project" and if the service that is creating + * the log entry receives a trace header that includes the trace ID "12345", + * then the service should use "projects/my-tracing-project/traces/12345". + * The `trace` field provides the link between logs and traces. By using + * this field, you can navigate from a log entry to a trace. + * + * Generated from protobuf field string trace = 22 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $trace = ''; + /** + * Optional. The ID of the [Cloud Trace](https://cloud.google.com/trace) span + * associated with the current operation in which the log is being written. + * For example, if a span has the REST resource name of + * "projects/some-project/traces/some-trace/spans/some-span-id", then the + * `span_id` field is "some-span-id". + * A + * [Span](https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) + * represents a single operation within a trace. Whereas a trace may involve + * multiple different microservices running on multiple different machines, + * a span generally corresponds to a single logical operation being performed + * in a single instance of a microservice on one specific machine. Spans + * are the nodes within the tree that is a trace. + * Applications that are [instrumented for + * tracing](https://cloud.google.com/trace/docs/setup) will generally assign a + * new, unique span ID on each incoming request. It is also common to create + * and record additional spans corresponding to internal processing elements + * as well as issuing requests to dependencies. + * The span ID is expected to be a 16-character, hexadecimal encoding of an + * 8-byte array and should not be zero. It should be unique within the trace + * and should, ideally, be generated in a manner that is uniformly random. + * Example values: + * - `000000000000004a` + * - `7a2190356c3fc94b` + * - `0000f00300090021` + * - `d39223e101960076` + * + * Generated from protobuf field string span_id = 27 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $span_id = ''; + /** + * Optional. The sampling decision of the trace associated with the log entry. + * True means that the trace resource name in the `trace` field was sampled + * for storage in a trace backend. False means that the trace was not sampled + * for storage when this log entry was written, or the sampling decision was + * unknown at the time. A non-sampled `trace` value is still useful as a + * request correlation identifier. The default is False. + * + * Generated from protobuf field bool trace_sampled = 30 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $trace_sampled = false; + /** + * Optional. Source code location information associated with the log entry, + * if any. + * + * Generated from protobuf field .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $source_location = null; + /** + * Optional. Information indicating this LogEntry is part of a sequence of + * multiple log entries split from a single LogEntry. + * + * Generated from protobuf field .google.logging.v2.LogSplit split = 35 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $split = null; + protected $payload; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $log_name + * Required. The resource name of the log to which this log entry belongs: + * "projects/[PROJECT_ID]/logs/[LOG_ID]" + * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + * "folders/[FOLDER_ID]/logs/[LOG_ID]" + * A project number may be used in place of PROJECT_ID. The project number is + * translated to its corresponding PROJECT_ID internally and the `log_name` + * field will contain PROJECT_ID in queries and exports. + * `[LOG_ID]` must be URL-encoded within `log_name`. Example: + * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * `[LOG_ID]` must be less than 512 characters long and can only include the + * following characters: upper and lower case alphanumeric characters, + * forward-slash, underscore, hyphen, and period. + * For backward compatibility, if `log_name` begins with a forward-slash, such + * as `/projects/...`, then the log entry is ingested as usual, but the + * forward-slash is removed. Listing the log entry will not show the leading + * slash and filtering for a log name with a leading slash will never return + * any results. + * @type \Google\Api\MonitoredResource $resource + * Required. The monitored resource that produced this log entry. + * Example: a log entry that reports a database error would be associated with + * the monitored resource designating the particular database that reported + * the error. + * @type \Google\Protobuf\Any $proto_payload + * The log entry payload, represented as a protocol buffer. Some Google + * Cloud Platform services use this field for their log entry payloads. + * The following protocol buffer types are supported; user-defined types + * are not supported: + * "type.googleapis.com/google.cloud.audit.AuditLog" + * "type.googleapis.com/google.appengine.logging.v1.RequestLog" + * @type string $text_payload + * The log entry payload, represented as a Unicode string (UTF-8). + * @type \Google\Protobuf\Struct $json_payload + * The log entry payload, represented as a structure that is + * expressed as a JSON object. + * @type \Google\Protobuf\Timestamp $timestamp + * Optional. The time the event described by the log entry occurred. This time + * is used to compute the log entry's age and to enforce the logs retention + * period. If this field is omitted in a new log entry, then Logging assigns + * it the current time. Timestamps have nanosecond accuracy, but trailing + * zeros in the fractional seconds might be omitted when the timestamp is + * displayed. + * Incoming log entries must have timestamps that don't exceed the + * [logs retention + * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in + * the past, and that don't exceed 24 hours in the future. Log entries outside + * those time boundaries aren't ingested by Logging. + * @type \Google\Protobuf\Timestamp $receive_timestamp + * Output only. The time the log entry was received by Logging. + * @type int $severity + * Optional. The severity of the log entry. The default value is + * `LogSeverity.DEFAULT`. + * @type string $insert_id + * Optional. A unique identifier for the log entry. If you provide a value, + * then Logging considers other log entries in the same project, with the same + * `timestamp`, and with the same `insert_id` to be duplicates which are + * removed in a single query result. However, there are no guarantees of + * de-duplication in the export of logs. + * If the `insert_id` is omitted when writing a log entry, the Logging API + * assigns its own unique identifier in this field. + * In queries, the `insert_id` is also used to order log entries that have + * the same `log_name` and `timestamp` values. + * @type \Google\Cloud\Logging\Type\HttpRequest $http_request + * Optional. Information about the HTTP request associated with this log + * entry, if applicable. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. A map of key, value pairs that provides additional information + * about the log entry. The labels can be user-defined or system-defined. + * User-defined labels are arbitrary key, value pairs that you can use to + * classify logs. + * System-defined labels are defined by GCP services for platform logs. + * They have two components - a service namespace component and the + * attribute name. For example: `compute.googleapis.com/resource_name`. + * Cloud Logging truncates label keys that exceed 512 B and label + * values that exceed 64 KB upon their associated log entry being + * written. The truncation is indicated by an ellipsis at the + * end of the character string. + * @type \Google\Cloud\Logging\V2\LogEntryOperation $operation + * Optional. Information about an operation associated with the log entry, if + * applicable. + * @type string $trace + * Optional. The REST resource name of the trace being written to + * [Cloud Trace](https://cloud.google.com/trace) in + * association with this log entry. For example, if your trace data is stored + * in the Cloud project "my-trace-project" and if the service that is creating + * the log entry receives a trace header that includes the trace ID "12345", + * then the service should use "projects/my-tracing-project/traces/12345". + * The `trace` field provides the link between logs and traces. By using + * this field, you can navigate from a log entry to a trace. + * @type string $span_id + * Optional. The ID of the [Cloud Trace](https://cloud.google.com/trace) span + * associated with the current operation in which the log is being written. + * For example, if a span has the REST resource name of + * "projects/some-project/traces/some-trace/spans/some-span-id", then the + * `span_id` field is "some-span-id". + * A + * [Span](https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) + * represents a single operation within a trace. Whereas a trace may involve + * multiple different microservices running on multiple different machines, + * a span generally corresponds to a single logical operation being performed + * in a single instance of a microservice on one specific machine. Spans + * are the nodes within the tree that is a trace. + * Applications that are [instrumented for + * tracing](https://cloud.google.com/trace/docs/setup) will generally assign a + * new, unique span ID on each incoming request. It is also common to create + * and record additional spans corresponding to internal processing elements + * as well as issuing requests to dependencies. + * The span ID is expected to be a 16-character, hexadecimal encoding of an + * 8-byte array and should not be zero. It should be unique within the trace + * and should, ideally, be generated in a manner that is uniformly random. + * Example values: + * - `000000000000004a` + * - `7a2190356c3fc94b` + * - `0000f00300090021` + * - `d39223e101960076` + * @type bool $trace_sampled + * Optional. The sampling decision of the trace associated with the log entry. + * True means that the trace resource name in the `trace` field was sampled + * for storage in a trace backend. False means that the trace was not sampled + * for storage when this log entry was written, or the sampling decision was + * unknown at the time. A non-sampled `trace` value is still useful as a + * request correlation identifier. The default is False. + * @type \Google\Cloud\Logging\V2\LogEntrySourceLocation $source_location + * Optional. Source code location information associated with the log entry, + * if any. + * @type \Google\Cloud\Logging\V2\LogSplit $split + * Optional. Information indicating this LogEntry is part of a sequence of + * multiple log entries split from a single LogEntry. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LogEntry::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the log to which this log entry belongs: + * "projects/[PROJECT_ID]/logs/[LOG_ID]" + * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + * "folders/[FOLDER_ID]/logs/[LOG_ID]" + * A project number may be used in place of PROJECT_ID. The project number is + * translated to its corresponding PROJECT_ID internally and the `log_name` + * field will contain PROJECT_ID in queries and exports. + * `[LOG_ID]` must be URL-encoded within `log_name`. Example: + * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * `[LOG_ID]` must be less than 512 characters long and can only include the + * following characters: upper and lower case alphanumeric characters, + * forward-slash, underscore, hyphen, and period. + * For backward compatibility, if `log_name` begins with a forward-slash, such + * as `/projects/...`, then the log entry is ingested as usual, but the + * forward-slash is removed. Listing the log entry will not show the leading + * slash and filtering for a log name with a leading slash will never return + * any results. + * + * Generated from protobuf field string log_name = 12 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getLogName() + { + return $this->log_name; + } + + /** + * Required. The resource name of the log to which this log entry belongs: + * "projects/[PROJECT_ID]/logs/[LOG_ID]" + * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" + * "folders/[FOLDER_ID]/logs/[LOG_ID]" + * A project number may be used in place of PROJECT_ID. The project number is + * translated to its corresponding PROJECT_ID internally and the `log_name` + * field will contain PROJECT_ID in queries and exports. + * `[LOG_ID]` must be URL-encoded within `log_name`. Example: + * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. + * `[LOG_ID]` must be less than 512 characters long and can only include the + * following characters: upper and lower case alphanumeric characters, + * forward-slash, underscore, hyphen, and period. + * For backward compatibility, if `log_name` begins with a forward-slash, such + * as `/projects/...`, then the log entry is ingested as usual, but the + * forward-slash is removed. Listing the log entry will not show the leading + * slash and filtering for a log name with a leading slash will never return + * any results. + * + * Generated from protobuf field string log_name = 12 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setLogName($var) + { + GPBUtil::checkString($var, True); + $this->log_name = $var; + + return $this; + } + + /** + * Required. The monitored resource that produced this log entry. + * Example: a log entry that reports a database error would be associated with + * the monitored resource designating the particular database that reported + * the error. + * + * Generated from protobuf field .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Api\MonitoredResource|null + */ + public function getResource() + { + return $this->resource; + } + + public function hasResource() + { + return isset($this->resource); + } + + public function clearResource() + { + unset($this->resource); + } + + /** + * Required. The monitored resource that produced this log entry. + * Example: a log entry that reports a database error would be associated with + * the monitored resource designating the particular database that reported + * the error. + * + * Generated from protobuf field .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Api\MonitoredResource $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkMessage($var, \Google\Api\MonitoredResource::class); + $this->resource = $var; + + return $this; + } + + /** + * The log entry payload, represented as a protocol buffer. Some Google + * Cloud Platform services use this field for their log entry payloads. + * The following protocol buffer types are supported; user-defined types + * are not supported: + * "type.googleapis.com/google.cloud.audit.AuditLog" + * "type.googleapis.com/google.appengine.logging.v1.RequestLog" + * + * Generated from protobuf field .google.protobuf.Any proto_payload = 2; + * @return \Google\Protobuf\Any|null + */ + public function getProtoPayload() + { + return $this->readOneof(2); + } + + public function hasProtoPayload() + { + return $this->hasOneof(2); + } + + /** + * The log entry payload, represented as a protocol buffer. Some Google + * Cloud Platform services use this field for their log entry payloads. + * The following protocol buffer types are supported; user-defined types + * are not supported: + * "type.googleapis.com/google.cloud.audit.AuditLog" + * "type.googleapis.com/google.appengine.logging.v1.RequestLog" + * + * Generated from protobuf field .google.protobuf.Any proto_payload = 2; + * @param \Google\Protobuf\Any $var + * @return $this + */ + public function setProtoPayload($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The log entry payload, represented as a Unicode string (UTF-8). + * + * Generated from protobuf field string text_payload = 3; + * @return string + */ + public function getTextPayload() + { + return $this->readOneof(3); + } + + public function hasTextPayload() + { + return $this->hasOneof(3); + } + + /** + * The log entry payload, represented as a Unicode string (UTF-8). + * + * Generated from protobuf field string text_payload = 3; + * @param string $var + * @return $this + */ + public function setTextPayload($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The log entry payload, represented as a structure that is + * expressed as a JSON object. + * + * Generated from protobuf field .google.protobuf.Struct json_payload = 6; + * @return \Google\Protobuf\Struct|null + */ + public function getJsonPayload() + { + return $this->readOneof(6); + } + + public function hasJsonPayload() + { + return $this->hasOneof(6); + } + + /** + * The log entry payload, represented as a structure that is + * expressed as a JSON object. + * + * Generated from protobuf field .google.protobuf.Struct json_payload = 6; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setJsonPayload($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Optional. The time the event described by the log entry occurred. This time + * is used to compute the log entry's age and to enforce the logs retention + * period. If this field is omitted in a new log entry, then Logging assigns + * it the current time. Timestamps have nanosecond accuracy, but trailing + * zeros in the fractional seconds might be omitted when the timestamp is + * displayed. + * Incoming log entries must have timestamps that don't exceed the + * [logs retention + * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in + * the past, and that don't exceed 24 hours in the future. Log entries outside + * those time boundaries aren't ingested by Logging. + * + * Generated from protobuf field .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTimestamp() + { + return $this->timestamp; + } + + public function hasTimestamp() + { + return isset($this->timestamp); + } + + public function clearTimestamp() + { + unset($this->timestamp); + } + + /** + * Optional. The time the event described by the log entry occurred. This time + * is used to compute the log entry's age and to enforce the logs retention + * period. If this field is omitted in a new log entry, then Logging assigns + * it the current time. Timestamps have nanosecond accuracy, but trailing + * zeros in the fractional seconds might be omitted when the timestamp is + * displayed. + * Incoming log entries must have timestamps that don't exceed the + * [logs retention + * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in + * the past, and that don't exceed 24 hours in the future. Log entries outside + * those time boundaries aren't ingested by Logging. + * + * Generated from protobuf field .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTimestamp($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->timestamp = $var; + + return $this; + } + + /** + * Output only. The time the log entry was received by Logging. + * + * Generated from protobuf field .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getReceiveTimestamp() + { + return $this->receive_timestamp; + } + + public function hasReceiveTimestamp() + { + return isset($this->receive_timestamp); + } + + public function clearReceiveTimestamp() + { + unset($this->receive_timestamp); + } + + /** + * Output only. The time the log entry was received by Logging. + * + * Generated from protobuf field .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setReceiveTimestamp($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->receive_timestamp = $var; + + return $this; + } + + /** + * Optional. The severity of the log entry. The default value is + * `LogSeverity.DEFAULT`. + * + * Generated from protobuf field .google.logging.type.LogSeverity severity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSeverity() + { + return $this->severity; + } + + /** + * Optional. The severity of the log entry. The default value is + * `LogSeverity.DEFAULT`. + * + * Generated from protobuf field .google.logging.type.LogSeverity severity = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSeverity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Logging\Type\LogSeverity::class); + $this->severity = $var; + + return $this; + } + + /** + * Optional. A unique identifier for the log entry. If you provide a value, + * then Logging considers other log entries in the same project, with the same + * `timestamp`, and with the same `insert_id` to be duplicates which are + * removed in a single query result. However, there are no guarantees of + * de-duplication in the export of logs. + * If the `insert_id` is omitted when writing a log entry, the Logging API + * assigns its own unique identifier in this field. + * In queries, the `insert_id` is also used to order log entries that have + * the same `log_name` and `timestamp` values. + * + * Generated from protobuf field string insert_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getInsertId() + { + return $this->insert_id; + } + + /** + * Optional. A unique identifier for the log entry. If you provide a value, + * then Logging considers other log entries in the same project, with the same + * `timestamp`, and with the same `insert_id` to be duplicates which are + * removed in a single query result. However, there are no guarantees of + * de-duplication in the export of logs. + * If the `insert_id` is omitted when writing a log entry, the Logging API + * assigns its own unique identifier in this field. + * In queries, the `insert_id` is also used to order log entries that have + * the same `log_name` and `timestamp` values. + * + * Generated from protobuf field string insert_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setInsertId($var) + { + GPBUtil::checkString($var, True); + $this->insert_id = $var; + + return $this; + } + + /** + * Optional. Information about the HTTP request associated with this log + * entry, if applicable. + * + * Generated from protobuf field .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Logging\Type\HttpRequest|null + */ + public function getHttpRequest() + { + return $this->http_request; + } + + public function hasHttpRequest() + { + return isset($this->http_request); + } + + public function clearHttpRequest() + { + unset($this->http_request); + } + + /** + * Optional. Information about the HTTP request associated with this log + * entry, if applicable. + * + * Generated from protobuf field .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Logging\Type\HttpRequest $var + * @return $this + */ + public function setHttpRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\Type\HttpRequest::class); + $this->http_request = $var; + + return $this; + } + + /** + * Optional. A map of key, value pairs that provides additional information + * about the log entry. The labels can be user-defined or system-defined. + * User-defined labels are arbitrary key, value pairs that you can use to + * classify logs. + * System-defined labels are defined by GCP services for platform logs. + * They have two components - a service namespace component and the + * attribute name. For example: `compute.googleapis.com/resource_name`. + * Cloud Logging truncates label keys that exceed 512 B and label + * values that exceed 64 KB upon their associated log entry being + * written. The truncation is indicated by an ellipsis at the + * end of the character string. + * + * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. A map of key, value pairs that provides additional information + * about the log entry. The labels can be user-defined or system-defined. + * User-defined labels are arbitrary key, value pairs that you can use to + * classify logs. + * System-defined labels are defined by GCP services for platform logs. + * They have two components - a service namespace component and the + * attribute name. For example: `compute.googleapis.com/resource_name`. + * Cloud Logging truncates label keys that exceed 512 B and label + * values that exceed 64 KB upon their associated log entry being + * written. The truncation is indicated by an ellipsis at the + * end of the character string. + * + * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @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; + } + + /** + * Optional. Information about an operation associated with the log entry, if + * applicable. + * + * Generated from protobuf field .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Logging\V2\LogEntryOperation|null + */ + public function getOperation() + { + return $this->operation; + } + + public function hasOperation() + { + return isset($this->operation); + } + + public function clearOperation() + { + unset($this->operation); + } + + /** + * Optional. Information about an operation associated with the log entry, if + * applicable. + * + * Generated from protobuf field .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Logging\V2\LogEntryOperation $var + * @return $this + */ + public function setOperation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogEntryOperation::class); + $this->operation = $var; + + return $this; + } + + /** + * Optional. The REST resource name of the trace being written to + * [Cloud Trace](https://cloud.google.com/trace) in + * association with this log entry. For example, if your trace data is stored + * in the Cloud project "my-trace-project" and if the service that is creating + * the log entry receives a trace header that includes the trace ID "12345", + * then the service should use "projects/my-tracing-project/traces/12345". + * The `trace` field provides the link between logs and traces. By using + * this field, you can navigate from a log entry to a trace. + * + * Generated from protobuf field string trace = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTrace() + { + return $this->trace; + } + + /** + * Optional. The REST resource name of the trace being written to + * [Cloud Trace](https://cloud.google.com/trace) in + * association with this log entry. For example, if your trace data is stored + * in the Cloud project "my-trace-project" and if the service that is creating + * the log entry receives a trace header that includes the trace ID "12345", + * then the service should use "projects/my-tracing-project/traces/12345". + * The `trace` field provides the link between logs and traces. By using + * this field, you can navigate from a log entry to a trace. + * + * Generated from protobuf field string trace = 22 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTrace($var) + { + GPBUtil::checkString($var, True); + $this->trace = $var; + + return $this; + } + + /** + * Optional. The ID of the [Cloud Trace](https://cloud.google.com/trace) span + * associated with the current operation in which the log is being written. + * For example, if a span has the REST resource name of + * "projects/some-project/traces/some-trace/spans/some-span-id", then the + * `span_id` field is "some-span-id". + * A + * [Span](https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) + * represents a single operation within a trace. Whereas a trace may involve + * multiple different microservices running on multiple different machines, + * a span generally corresponds to a single logical operation being performed + * in a single instance of a microservice on one specific machine. Spans + * are the nodes within the tree that is a trace. + * Applications that are [instrumented for + * tracing](https://cloud.google.com/trace/docs/setup) will generally assign a + * new, unique span ID on each incoming request. It is also common to create + * and record additional spans corresponding to internal processing elements + * as well as issuing requests to dependencies. + * The span ID is expected to be a 16-character, hexadecimal encoding of an + * 8-byte array and should not be zero. It should be unique within the trace + * and should, ideally, be generated in a manner that is uniformly random. + * Example values: + * - `000000000000004a` + * - `7a2190356c3fc94b` + * - `0000f00300090021` + * - `d39223e101960076` + * + * Generated from protobuf field string span_id = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSpanId() + { + return $this->span_id; + } + + /** + * Optional. The ID of the [Cloud Trace](https://cloud.google.com/trace) span + * associated with the current operation in which the log is being written. + * For example, if a span has the REST resource name of + * "projects/some-project/traces/some-trace/spans/some-span-id", then the + * `span_id` field is "some-span-id". + * A + * [Span](https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) + * represents a single operation within a trace. Whereas a trace may involve + * multiple different microservices running on multiple different machines, + * a span generally corresponds to a single logical operation being performed + * in a single instance of a microservice on one specific machine. Spans + * are the nodes within the tree that is a trace. + * Applications that are [instrumented for + * tracing](https://cloud.google.com/trace/docs/setup) will generally assign a + * new, unique span ID on each incoming request. It is also common to create + * and record additional spans corresponding to internal processing elements + * as well as issuing requests to dependencies. + * The span ID is expected to be a 16-character, hexadecimal encoding of an + * 8-byte array and should not be zero. It should be unique within the trace + * and should, ideally, be generated in a manner that is uniformly random. + * Example values: + * - `000000000000004a` + * - `7a2190356c3fc94b` + * - `0000f00300090021` + * - `d39223e101960076` + * + * Generated from protobuf field string span_id = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSpanId($var) + { + GPBUtil::checkString($var, True); + $this->span_id = $var; + + return $this; + } + + /** + * Optional. The sampling decision of the trace associated with the log entry. + * True means that the trace resource name in the `trace` field was sampled + * for storage in a trace backend. False means that the trace was not sampled + * for storage when this log entry was written, or the sampling decision was + * unknown at the time. A non-sampled `trace` value is still useful as a + * request correlation identifier. The default is False. + * + * Generated from protobuf field bool trace_sampled = 30 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getTraceSampled() + { + return $this->trace_sampled; + } + + /** + * Optional. The sampling decision of the trace associated with the log entry. + * True means that the trace resource name in the `trace` field was sampled + * for storage in a trace backend. False means that the trace was not sampled + * for storage when this log entry was written, or the sampling decision was + * unknown at the time. A non-sampled `trace` value is still useful as a + * request correlation identifier. The default is False. + * + * Generated from protobuf field bool trace_sampled = 30 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setTraceSampled($var) + { + GPBUtil::checkBool($var); + $this->trace_sampled = $var; + + return $this; + } + + /** + * Optional. Source code location information associated with the log entry, + * if any. + * + * Generated from protobuf field .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Logging\V2\LogEntrySourceLocation|null + */ + public function getSourceLocation() + { + return $this->source_location; + } + + public function hasSourceLocation() + { + return isset($this->source_location); + } + + public function clearSourceLocation() + { + unset($this->source_location); + } + + /** + * Optional. Source code location information associated with the log entry, + * if any. + * + * Generated from protobuf field .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Logging\V2\LogEntrySourceLocation $var + * @return $this + */ + public function setSourceLocation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogEntrySourceLocation::class); + $this->source_location = $var; + + return $this; + } + + /** + * Optional. Information indicating this LogEntry is part of a sequence of + * multiple log entries split from a single LogEntry. + * + * Generated from protobuf field .google.logging.v2.LogSplit split = 35 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Logging\V2\LogSplit|null + */ + public function getSplit() + { + return $this->split; + } + + public function hasSplit() + { + return isset($this->split); + } + + public function clearSplit() + { + unset($this->split); + } + + /** + * Optional. Information indicating this LogEntry is part of a sequence of + * multiple log entries split from a single LogEntry. + * + * Generated from protobuf field .google.logging.v2.LogSplit split = 35 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Logging\V2\LogSplit $var + * @return $this + */ + public function setSplit($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogSplit::class); + $this->split = $var; + + return $this; + } + + /** + * @return string + */ + public function getPayload() + { + return $this->whichOneof("payload"); + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntryOperation.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntryOperation.php new file mode 100644 index 000000000000..8cbc98233916 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntryOperation.php @@ -0,0 +1,182 @@ +google.logging.v2.LogEntryOperation + */ +class LogEntryOperation extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. An arbitrary operation identifier. Log entries with the same + * identifier are assumed to be part of the same operation. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $id = ''; + /** + * Optional. An arbitrary producer identifier. The combination of `id` and + * `producer` must be globally unique. Examples for `producer`: + * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. + * + * Generated from protobuf field string producer = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $producer = ''; + /** + * Optional. Set this to True if this is the first log entry in the operation. + * + * Generated from protobuf field bool first = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $first = false; + /** + * Optional. Set this to True if this is the last log entry in the operation. + * + * Generated from protobuf field bool last = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $last = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Optional. An arbitrary operation identifier. Log entries with the same + * identifier are assumed to be part of the same operation. + * @type string $producer + * Optional. An arbitrary producer identifier. The combination of `id` and + * `producer` must be globally unique. Examples for `producer`: + * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. + * @type bool $first + * Optional. Set this to True if this is the first log entry in the operation. + * @type bool $last + * Optional. Set this to True if this is the last log entry in the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LogEntry::initOnce(); + parent::__construct($data); + } + + /** + * Optional. An arbitrary operation identifier. Log entries with the same + * identifier are assumed to be part of the same operation. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Optional. An arbitrary operation identifier. Log entries with the same + * identifier are assumed to be part of the same operation. + * + * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * Optional. An arbitrary producer identifier. The combination of `id` and + * `producer` must be globally unique. Examples for `producer`: + * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. + * + * Generated from protobuf field string producer = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getProducer() + { + return $this->producer; + } + + /** + * Optional. An arbitrary producer identifier. The combination of `id` and + * `producer` must be globally unique. Examples for `producer`: + * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. + * + * Generated from protobuf field string producer = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setProducer($var) + { + GPBUtil::checkString($var, True); + $this->producer = $var; + + return $this; + } + + /** + * Optional. Set this to True if this is the first log entry in the operation. + * + * Generated from protobuf field bool first = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getFirst() + { + return $this->first; + } + + /** + * Optional. Set this to True if this is the first log entry in the operation. + * + * Generated from protobuf field bool first = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setFirst($var) + { + GPBUtil::checkBool($var); + $this->first = $var; + + return $this; + } + + /** + * Optional. Set this to True if this is the last log entry in the operation. + * + * Generated from protobuf field bool last = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getLast() + { + return $this->last; + } + + /** + * Optional. Set this to True if this is the last log entry in the operation. + * + * Generated from protobuf field bool last = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setLast($var) + { + GPBUtil::checkBool($var); + $this->last = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntrySourceLocation.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntrySourceLocation.php new file mode 100644 index 000000000000..32a557bacd22 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntrySourceLocation.php @@ -0,0 +1,164 @@ +google.logging.v2.LogEntrySourceLocation + */ +class LogEntrySourceLocation extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Source file name. Depending on the runtime environment, this + * might be a simple name or a fully-qualified name. + * + * Generated from protobuf field string file = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $file = ''; + /** + * Optional. Line within the source file. 1-based; 0 indicates no line number + * available. + * + * Generated from protobuf field int64 line = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $line = 0; + /** + * Optional. Human-readable name of the function or method being invoked, with + * optional context such as the class or package name. This information may be + * used in contexts such as the logs viewer, where a file and line number are + * less meaningful. The format can vary by language. For example: + * `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` + * (Python). + * + * Generated from protobuf field string function = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $function = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $file + * Optional. Source file name. Depending on the runtime environment, this + * might be a simple name or a fully-qualified name. + * @type int|string $line + * Optional. Line within the source file. 1-based; 0 indicates no line number + * available. + * @type string $function + * Optional. Human-readable name of the function or method being invoked, with + * optional context such as the class or package name. This information may be + * used in contexts such as the logs viewer, where a file and line number are + * less meaningful. The format can vary by language. For example: + * `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` + * (Python). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LogEntry::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Source file name. Depending on the runtime environment, this + * might be a simple name or a fully-qualified name. + * + * Generated from protobuf field string file = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFile() + { + return $this->file; + } + + /** + * Optional. Source file name. Depending on the runtime environment, this + * might be a simple name or a fully-qualified name. + * + * Generated from protobuf field string file = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFile($var) + { + GPBUtil::checkString($var, True); + $this->file = $var; + + return $this; + } + + /** + * Optional. Line within the source file. 1-based; 0 indicates no line number + * available. + * + * Generated from protobuf field int64 line = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getLine() + { + return $this->line; + } + + /** + * Optional. Line within the source file. 1-based; 0 indicates no line number + * available. + * + * Generated from protobuf field int64 line = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setLine($var) + { + GPBUtil::checkInt64($var); + $this->line = $var; + + return $this; + } + + /** + * Optional. Human-readable name of the function or method being invoked, with + * optional context such as the class or package name. This information may be + * used in contexts such as the logs viewer, where a file and line number are + * less meaningful. The format can vary by language. For example: + * `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` + * (Python). + * + * Generated from protobuf field string function = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFunction() + { + return $this->function; + } + + /** + * Optional. Human-readable name of the function or method being invoked, with + * optional context such as the class or package name. This information may be + * used in contexts such as the logs viewer, where a file and line number are + * less meaningful. The format can vary by language. For example: + * `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` + * (Python). + * + * Generated from protobuf field string function = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFunction($var) + { + GPBUtil::checkString($var, True); + $this->function = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogExclusion.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogExclusion.php new file mode 100644 index 000000000000..f68481385cca --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogExclusion.php @@ -0,0 +1,321 @@ +google.logging.v2.LogExclusion + */ +class LogExclusion extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A client-assigned identifier, such as + * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and + * can include only letters, digits, underscores, hyphens, and periods. First + * character has to be alphanumeric. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. A description of this exclusion. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Required. An [advanced logs + * filter](https://cloud.google.com/logging/docs/view/advanced-queries) that + * matches the log entries to be excluded. By using the [sample + * function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), + * you can exclude less than 100% of the matching log entries. + * For example, the following query matches 99% of low-severity log entries + * from Google Cloud Storage buckets: + * `resource.type=gcs_bucket severitystring filter = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $filter = ''; + /** + * Optional. If set to True, then this exclusion is disabled and it does not + * exclude any log entries. You can [update an + * exclusion][google.logging.v2.ConfigServiceV2.UpdateExclusion] to change the + * value of this field. + * + * Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disabled = false; + /** + * Output only. The creation timestamp of the exclusion. + * This field may not be present for older exclusions. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last update timestamp of the exclusion. + * This field may not be present for older exclusions. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. A client-assigned identifier, such as + * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and + * can include only letters, digits, underscores, hyphens, and periods. First + * character has to be alphanumeric. + * @type string $description + * Optional. A description of this exclusion. + * @type string $filter + * Required. An [advanced logs + * filter](https://cloud.google.com/logging/docs/view/advanced-queries) that + * matches the log entries to be excluded. By using the [sample + * function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), + * you can exclude less than 100% of the matching log entries. + * For example, the following query matches 99% of low-severity log entries + * from Google Cloud Storage buckets: + * `resource.type=gcs_bucket severitystring name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A client-assigned identifier, such as + * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and + * can include only letters, digits, underscores, hyphens, and periods. First + * character has to be alphanumeric. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A description of this exclusion. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A description of this exclusion. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. An [advanced logs + * filter](https://cloud.google.com/logging/docs/view/advanced-queries) that + * matches the log entries to be excluded. By using the [sample + * function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), + * you can exclude less than 100% of the matching log entries. + * For example, the following query matches 99% of low-severity log entries + * from Google Cloud Storage buckets: + * `resource.type=gcs_bucket severitystring filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Required. An [advanced logs + * filter](https://cloud.google.com/logging/docs/view/advanced-queries) that + * matches the log entries to be excluded. By using the [sample + * function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), + * you can exclude less than 100% of the matching log entries. + * For example, the following query matches 99% of low-severity log entries + * from Google Cloud Storage buckets: + * `resource.type=gcs_bucket severitystring filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. If set to True, then this exclusion is disabled and it does not + * exclude any log entries. You can [update an + * exclusion][google.logging.v2.ConfigServiceV2.UpdateExclusion] to change the + * value of this field. + * + * Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDisabled() + { + return $this->disabled; + } + + /** + * Optional. If set to True, then this exclusion is disabled and it does not + * exclude any log entries. You can [update an + * exclusion][google.logging.v2.ConfigServiceV2.UpdateExclusion] to change the + * value of this field. + * + * Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDisabled($var) + { + GPBUtil::checkBool($var); + $this->disabled = $var; + + return $this; + } + + /** + * Output only. The creation timestamp of the exclusion. + * This field may not be present for older exclusions. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The creation timestamp of the exclusion. + * This field may not be present for older exclusions. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The last update timestamp of the exclusion. + * This field may not be present for older exclusions. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last update timestamp of the exclusion. + * This field may not be present for older exclusions. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric.php new file mode 100644 index 000000000000..4b6d791db1a9 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric.php @@ -0,0 +1,769 @@ +google.logging.v2.LogMetric + */ +class LogMetric extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The client-assigned metric identifier. + * Examples: `"error_count"`, `"nginx/requests"`. + * Metric identifiers are limited to 100 characters and can include only the + * following characters: `A-Z`, `a-z`, `0-9`, and the special characters + * `_-.,+!*',()%/`. The forward-slash character (`/`) denotes a hierarchy of + * name pieces, and it cannot be the first character of the name. + * This field is the `[METRIC_ID]` part of a metric resource name in the + * format "projects/[PROJECT_ID]/metrics/[METRIC_ID]". Example: If the + * resource name of a metric is + * `"projects/my-project/metrics/nginx%2Frequests"`, this field's value is + * `"nginx/requests"`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Optional. A description of this metric, which is used in documentation. + * The maximum length of the description is 8000 characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Required. An [advanced logs + * filter](https://cloud.google.com/logging/docs/view/advanced_filters) which + * is used to match log entries. Example: + * "resource.type=gae_app AND severity>=ERROR" + * The maximum length of the filter is 20000 characters. + * + * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $filter = ''; + /** + * Optional. The resource name of the Log Bucket that owns the Log Metric. + * Only Log Buckets in projects are supported. The bucket has to be in the + * same project as the metric. + * For example: + * `projects/my-project/locations/global/buckets/my-bucket` + * If empty, then the Log Metric is considered a non-Bucket Log Metric. + * + * Generated from protobuf field string bucket_name = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $bucket_name = ''; + /** + * Optional. If set to True, then this metric is disabled and it does not + * generate any points. + * + * Generated from protobuf field bool disabled = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disabled = false; + /** + * Optional. The metric descriptor associated with the logs-based metric. + * If unspecified, it uses a default metric descriptor with a DELTA metric + * kind, INT64 value type, with no labels and a unit of "1". Such a metric + * counts the number of log entries matching the `filter` expression. + * The `name`, `type`, and `description` fields in the `metric_descriptor` + * are output only, and is constructed using the `name` and `description` + * field in the LogMetric. + * To create a logs-based metric that records a distribution of log values, a + * DELTA metric kind with a DISTRIBUTION value type must be used along with + * a `value_extractor` expression in the LogMetric. + * Each label in the metric descriptor must have a matching label + * name as the key and an extractor expression as the value in the + * `label_extractors` map. + * The `metric_kind` and `value_type` fields in the `metric_descriptor` cannot + * be updated once initially configured. New labels can be added in the + * `metric_descriptor`, but existing labels cannot be modified except for + * their description. + * + * Generated from protobuf field .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $metric_descriptor = null; + /** + * Optional. A `value_extractor` is required when using a distribution + * logs-based metric to extract the values to record from a log entry. + * Two functions are supported for value extraction: `EXTRACT(field)` or + * `REGEXP_EXTRACT(field, regex)`. The arguments are: + * 1. field: The name of the log entry field from which the value is to be + * extracted. + * 2. regex: A regular expression using the Google RE2 syntax + * (https://github.com/google/re2/wiki/Syntax) with a single capture + * group to extract data from the specified log entry field. The value + * of the field is converted to a string before applying the regex. + * It is an error to specify a regex that does not include exactly one + * capture group. + * The result of the extraction must be convertible to a double type, as the + * distribution always records double values. If either the extraction or + * the conversion to double fails, then those values are not recorded in the + * distribution. + * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` + * + * Generated from protobuf field string value_extractor = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $value_extractor = ''; + /** + * Optional. A map from a label key string to an extractor expression which is + * used to extract data from a log entry field and assign as the label value. + * Each label key specified in the LabelDescriptor must have an associated + * extractor expression in this map. The syntax of the extractor expression + * is the same as for the `value_extractor` field. + * The extracted value is converted to the type defined in the label + * descriptor. If either the extraction or the type conversion fails, + * the label will have a default value. The default value for a string + * label is an empty string, for an integer label its 0, and for a boolean + * label its `false`. + * Note that there are upper bounds on the maximum number of labels and the + * number of active time series that are allowed in a project. + * + * Generated from protobuf field map label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $label_extractors; + /** + * Optional. The `bucket_options` are required when the logs-based metric is + * using a DISTRIBUTION value type and it describes the bucket boundaries + * used to create a histogram of the extracted values. + * + * Generated from protobuf field .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $bucket_options = null; + /** + * Output only. The creation timestamp of the metric. + * This field may not be present for older metrics. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last update timestamp of the metric. + * This field may not be present for older metrics. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Deprecated. The API version that created or updated this metric. + * The v2 format is used by default and cannot be changed. + * + * Generated from protobuf field .google.logging.v2.LogMetric.ApiVersion version = 4 [deprecated = true]; + * @deprecated + */ + protected $version = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The client-assigned metric identifier. + * Examples: `"error_count"`, `"nginx/requests"`. + * Metric identifiers are limited to 100 characters and can include only the + * following characters: `A-Z`, `a-z`, `0-9`, and the special characters + * `_-.,+!*',()%/`. The forward-slash character (`/`) denotes a hierarchy of + * name pieces, and it cannot be the first character of the name. + * This field is the `[METRIC_ID]` part of a metric resource name in the + * format "projects/[PROJECT_ID]/metrics/[METRIC_ID]". Example: If the + * resource name of a metric is + * `"projects/my-project/metrics/nginx%2Frequests"`, this field's value is + * `"nginx/requests"`. + * @type string $description + * Optional. A description of this metric, which is used in documentation. + * The maximum length of the description is 8000 characters. + * @type string $filter + * Required. An [advanced logs + * filter](https://cloud.google.com/logging/docs/view/advanced_filters) which + * is used to match log entries. Example: + * "resource.type=gae_app AND severity>=ERROR" + * The maximum length of the filter is 20000 characters. + * @type string $bucket_name + * Optional. The resource name of the Log Bucket that owns the Log Metric. + * Only Log Buckets in projects are supported. The bucket has to be in the + * same project as the metric. + * For example: + * `projects/my-project/locations/global/buckets/my-bucket` + * If empty, then the Log Metric is considered a non-Bucket Log Metric. + * @type bool $disabled + * Optional. If set to True, then this metric is disabled and it does not + * generate any points. + * @type \Google\Api\MetricDescriptor $metric_descriptor + * Optional. The metric descriptor associated with the logs-based metric. + * If unspecified, it uses a default metric descriptor with a DELTA metric + * kind, INT64 value type, with no labels and a unit of "1". Such a metric + * counts the number of log entries matching the `filter` expression. + * The `name`, `type`, and `description` fields in the `metric_descriptor` + * are output only, and is constructed using the `name` and `description` + * field in the LogMetric. + * To create a logs-based metric that records a distribution of log values, a + * DELTA metric kind with a DISTRIBUTION value type must be used along with + * a `value_extractor` expression in the LogMetric. + * Each label in the metric descriptor must have a matching label + * name as the key and an extractor expression as the value in the + * `label_extractors` map. + * The `metric_kind` and `value_type` fields in the `metric_descriptor` cannot + * be updated once initially configured. New labels can be added in the + * `metric_descriptor`, but existing labels cannot be modified except for + * their description. + * @type string $value_extractor + * Optional. A `value_extractor` is required when using a distribution + * logs-based metric to extract the values to record from a log entry. + * Two functions are supported for value extraction: `EXTRACT(field)` or + * `REGEXP_EXTRACT(field, regex)`. The arguments are: + * 1. field: The name of the log entry field from which the value is to be + * extracted. + * 2. regex: A regular expression using the Google RE2 syntax + * (https://github.com/google/re2/wiki/Syntax) with a single capture + * group to extract data from the specified log entry field. The value + * of the field is converted to a string before applying the regex. + * It is an error to specify a regex that does not include exactly one + * capture group. + * The result of the extraction must be convertible to a double type, as the + * distribution always records double values. If either the extraction or + * the conversion to double fails, then those values are not recorded in the + * distribution. + * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` + * @type array|\Google\Protobuf\Internal\MapField $label_extractors + * Optional. A map from a label key string to an extractor expression which is + * used to extract data from a log entry field and assign as the label value. + * Each label key specified in the LabelDescriptor must have an associated + * extractor expression in this map. The syntax of the extractor expression + * is the same as for the `value_extractor` field. + * The extracted value is converted to the type defined in the label + * descriptor. If either the extraction or the type conversion fails, + * the label will have a default value. The default value for a string + * label is an empty string, for an integer label its 0, and for a boolean + * label its `false`. + * Note that there are upper bounds on the maximum number of labels and the + * number of active time series that are allowed in a project. + * @type \Google\Api\Distribution\BucketOptions $bucket_options + * Optional. The `bucket_options` are required when the logs-based metric is + * using a DISTRIBUTION value type and it describes the bucket boundaries + * used to create a histogram of the extracted values. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation timestamp of the metric. + * This field may not be present for older metrics. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last update timestamp of the metric. + * This field may not be present for older metrics. + * @type int $version + * Deprecated. The API version that created or updated this metric. + * The v2 format is used by default and cannot be changed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); + parent::__construct($data); + } + + /** + * Required. The client-assigned metric identifier. + * Examples: `"error_count"`, `"nginx/requests"`. + * Metric identifiers are limited to 100 characters and can include only the + * following characters: `A-Z`, `a-z`, `0-9`, and the special characters + * `_-.,+!*',()%/`. The forward-slash character (`/`) denotes a hierarchy of + * name pieces, and it cannot be the first character of the name. + * This field is the `[METRIC_ID]` part of a metric resource name in the + * format "projects/[PROJECT_ID]/metrics/[METRIC_ID]". Example: If the + * resource name of a metric is + * `"projects/my-project/metrics/nginx%2Frequests"`, this field's value is + * `"nginx/requests"`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The client-assigned metric identifier. + * Examples: `"error_count"`, `"nginx/requests"`. + * Metric identifiers are limited to 100 characters and can include only the + * following characters: `A-Z`, `a-z`, `0-9`, and the special characters + * `_-.,+!*',()%/`. The forward-slash character (`/`) denotes a hierarchy of + * name pieces, and it cannot be the first character of the name. + * This field is the `[METRIC_ID]` part of a metric resource name in the + * format "projects/[PROJECT_ID]/metrics/[METRIC_ID]". Example: If the + * resource name of a metric is + * `"projects/my-project/metrics/nginx%2Frequests"`, this field's value is + * `"nginx/requests"`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. A description of this metric, which is used in documentation. + * The maximum length of the description is 8000 characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A description of this metric, which is used in documentation. + * The maximum length of the description is 8000 characters. + * + * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Required. An [advanced logs + * filter](https://cloud.google.com/logging/docs/view/advanced_filters) which + * is used to match log entries. Example: + * "resource.type=gae_app AND severity>=ERROR" + * The maximum length of the filter is 20000 characters. + * + * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Required. An [advanced logs + * filter](https://cloud.google.com/logging/docs/view/advanced_filters) which + * is used to match log entries. Example: + * "resource.type=gae_app AND severity>=ERROR" + * The maximum length of the filter is 20000 characters. + * + * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. The resource name of the Log Bucket that owns the Log Metric. + * Only Log Buckets in projects are supported. The bucket has to be in the + * same project as the metric. + * For example: + * `projects/my-project/locations/global/buckets/my-bucket` + * If empty, then the Log Metric is considered a non-Bucket Log Metric. + * + * Generated from protobuf field string bucket_name = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBucketName() + { + return $this->bucket_name; + } + + /** + * Optional. The resource name of the Log Bucket that owns the Log Metric. + * Only Log Buckets in projects are supported. The bucket has to be in the + * same project as the metric. + * For example: + * `projects/my-project/locations/global/buckets/my-bucket` + * If empty, then the Log Metric is considered a non-Bucket Log Metric. + * + * Generated from protobuf field string bucket_name = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBucketName($var) + { + GPBUtil::checkString($var, True); + $this->bucket_name = $var; + + return $this; + } + + /** + * Optional. If set to True, then this metric is disabled and it does not + * generate any points. + * + * Generated from protobuf field bool disabled = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDisabled() + { + return $this->disabled; + } + + /** + * Optional. If set to True, then this metric is disabled and it does not + * generate any points. + * + * Generated from protobuf field bool disabled = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDisabled($var) + { + GPBUtil::checkBool($var); + $this->disabled = $var; + + return $this; + } + + /** + * Optional. The metric descriptor associated with the logs-based metric. + * If unspecified, it uses a default metric descriptor with a DELTA metric + * kind, INT64 value type, with no labels and a unit of "1". Such a metric + * counts the number of log entries matching the `filter` expression. + * The `name`, `type`, and `description` fields in the `metric_descriptor` + * are output only, and is constructed using the `name` and `description` + * field in the LogMetric. + * To create a logs-based metric that records a distribution of log values, a + * DELTA metric kind with a DISTRIBUTION value type must be used along with + * a `value_extractor` expression in the LogMetric. + * Each label in the metric descriptor must have a matching label + * name as the key and an extractor expression as the value in the + * `label_extractors` map. + * The `metric_kind` and `value_type` fields in the `metric_descriptor` cannot + * be updated once initially configured. New labels can be added in the + * `metric_descriptor`, but existing labels cannot be modified except for + * their description. + * + * Generated from protobuf field .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Api\MetricDescriptor|null + */ + public function getMetricDescriptor() + { + return $this->metric_descriptor; + } + + public function hasMetricDescriptor() + { + return isset($this->metric_descriptor); + } + + public function clearMetricDescriptor() + { + unset($this->metric_descriptor); + } + + /** + * Optional. The metric descriptor associated with the logs-based metric. + * If unspecified, it uses a default metric descriptor with a DELTA metric + * kind, INT64 value type, with no labels and a unit of "1". Such a metric + * counts the number of log entries matching the `filter` expression. + * The `name`, `type`, and `description` fields in the `metric_descriptor` + * are output only, and is constructed using the `name` and `description` + * field in the LogMetric. + * To create a logs-based metric that records a distribution of log values, a + * DELTA metric kind with a DISTRIBUTION value type must be used along with + * a `value_extractor` expression in the LogMetric. + * Each label in the metric descriptor must have a matching label + * name as the key and an extractor expression as the value in the + * `label_extractors` map. + * The `metric_kind` and `value_type` fields in the `metric_descriptor` cannot + * be updated once initially configured. New labels can be added in the + * `metric_descriptor`, but existing labels cannot be modified except for + * their description. + * + * Generated from protobuf field .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Api\MetricDescriptor $var + * @return $this + */ + public function setMetricDescriptor($var) + { + GPBUtil::checkMessage($var, \Google\Api\MetricDescriptor::class); + $this->metric_descriptor = $var; + + return $this; + } + + /** + * Optional. A `value_extractor` is required when using a distribution + * logs-based metric to extract the values to record from a log entry. + * Two functions are supported for value extraction: `EXTRACT(field)` or + * `REGEXP_EXTRACT(field, regex)`. The arguments are: + * 1. field: The name of the log entry field from which the value is to be + * extracted. + * 2. regex: A regular expression using the Google RE2 syntax + * (https://github.com/google/re2/wiki/Syntax) with a single capture + * group to extract data from the specified log entry field. The value + * of the field is converted to a string before applying the regex. + * It is an error to specify a regex that does not include exactly one + * capture group. + * The result of the extraction must be convertible to a double type, as the + * distribution always records double values. If either the extraction or + * the conversion to double fails, then those values are not recorded in the + * distribution. + * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` + * + * Generated from protobuf field string value_extractor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getValueExtractor() + { + return $this->value_extractor; + } + + /** + * Optional. A `value_extractor` is required when using a distribution + * logs-based metric to extract the values to record from a log entry. + * Two functions are supported for value extraction: `EXTRACT(field)` or + * `REGEXP_EXTRACT(field, regex)`. The arguments are: + * 1. field: The name of the log entry field from which the value is to be + * extracted. + * 2. regex: A regular expression using the Google RE2 syntax + * (https://github.com/google/re2/wiki/Syntax) with a single capture + * group to extract data from the specified log entry field. The value + * of the field is converted to a string before applying the regex. + * It is an error to specify a regex that does not include exactly one + * capture group. + * The result of the extraction must be convertible to a double type, as the + * distribution always records double values. If either the extraction or + * the conversion to double fails, then those values are not recorded in the + * distribution. + * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` + * + * Generated from protobuf field string value_extractor = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setValueExtractor($var) + { + GPBUtil::checkString($var, True); + $this->value_extractor = $var; + + return $this; + } + + /** + * Optional. A map from a label key string to an extractor expression which is + * used to extract data from a log entry field and assign as the label value. + * Each label key specified in the LabelDescriptor must have an associated + * extractor expression in this map. The syntax of the extractor expression + * is the same as for the `value_extractor` field. + * The extracted value is converted to the type defined in the label + * descriptor. If either the extraction or the type conversion fails, + * the label will have a default value. The default value for a string + * label is an empty string, for an integer label its 0, and for a boolean + * label its `false`. + * Note that there are upper bounds on the maximum number of labels and the + * number of active time series that are allowed in a project. + * + * Generated from protobuf field map label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabelExtractors() + { + return $this->label_extractors; + } + + /** + * Optional. A map from a label key string to an extractor expression which is + * used to extract data from a log entry field and assign as the label value. + * Each label key specified in the LabelDescriptor must have an associated + * extractor expression in this map. The syntax of the extractor expression + * is the same as for the `value_extractor` field. + * The extracted value is converted to the type defined in the label + * descriptor. If either the extraction or the type conversion fails, + * the label will have a default value. The default value for a string + * label is an empty string, for an integer label its 0, and for a boolean + * label its `false`. + * Note that there are upper bounds on the maximum number of labels and the + * number of active time series that are allowed in a project. + * + * Generated from protobuf field map label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabelExtractors($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->label_extractors = $arr; + + return $this; + } + + /** + * Optional. The `bucket_options` are required when the logs-based metric is + * using a DISTRIBUTION value type and it describes the bucket boundaries + * used to create a histogram of the extracted values. + * + * Generated from protobuf field .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Api\Distribution\BucketOptions|null + */ + public function getBucketOptions() + { + return $this->bucket_options; + } + + public function hasBucketOptions() + { + return isset($this->bucket_options); + } + + public function clearBucketOptions() + { + unset($this->bucket_options); + } + + /** + * Optional. The `bucket_options` are required when the logs-based metric is + * using a DISTRIBUTION value type and it describes the bucket boundaries + * used to create a histogram of the extracted values. + * + * Generated from protobuf field .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Api\Distribution\BucketOptions $var + * @return $this + */ + public function setBucketOptions($var) + { + GPBUtil::checkMessage($var, \Google\Api\Distribution\BucketOptions::class); + $this->bucket_options = $var; + + return $this; + } + + /** + * Output only. The creation timestamp of the metric. + * This field may not be present for older metrics. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.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 creation timestamp of the metric. + * This field may not be present for older metrics. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The last update timestamp of the metric. + * This field may not be present for older metrics. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last update timestamp of the metric. + * This field may not be present for older metrics. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Deprecated. The API version that created or updated this metric. + * The v2 format is used by default and cannot be changed. + * + * Generated from protobuf field .google.logging.v2.LogMetric.ApiVersion version = 4 [deprecated = true]; + * @return int + * @deprecated + */ + public function getVersion() + { + if ($this->version !== 0) { + @trigger_error('version is deprecated.', E_USER_DEPRECATED); + } + return $this->version; + } + + /** + * Deprecated. The API version that created or updated this metric. + * The v2 format is used by default and cannot be changed. + * + * Generated from protobuf field .google.logging.v2.LogMetric.ApiVersion version = 4 [deprecated = true]; + * @param int $var + * @return $this + * @deprecated + */ + public function setVersion($var) + { + @trigger_error('version is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\LogMetric\ApiVersion::class); + $this->version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric/ApiVersion.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric/ApiVersion.php new file mode 100644 index 000000000000..ec8c6b760e98 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric/ApiVersion.php @@ -0,0 +1,54 @@ +google.logging.v2.LogMetric.ApiVersion + */ +class ApiVersion +{ + /** + * Logging API v2. + * + * Generated from protobuf enum V2 = 0; + */ + const V2 = 0; + /** + * Logging API v1. + * + * Generated from protobuf enum V1 = 1; + */ + const V1 = 1; + + private static $valueToName = [ + self::V2 => 'V2', + self::V1 => 'V1', + ]; + + 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink.php new file mode 100644 index 000000000000..fcfc2ddd1aa5 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink.php @@ -0,0 +1,688 @@ +google.logging.v2.LogSink + */ +class LogSink extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The client-assigned sink identifier, unique within the project. + * For example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited + * to 100 characters and can include only the following characters: upper and + * lower-case alphanumeric characters, underscores, hyphens, and periods. + * First character has to be alphanumeric. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. The export destination: + * "storage.googleapis.com/[GCS_BUCKET]" + * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" + * "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" + * The sink's `writer_identity`, set when the sink is created, must have + * permission to write to the destination or else the log entries are not + * exported. For more information, see + * [Exporting Logs with + * Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + * + * Generated from protobuf field string destination = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $destination = ''; + /** + * Optional. An [advanced logs + * filter](https://cloud.google.com/logging/docs/view/advanced-queries). The + * only exported log entries are those that are in the resource owning the + * sink and that match the filter. + * For example: + * `logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR` + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. A description of this sink. + * The maximum length of the description is 8000 characters. + * + * Generated from protobuf field string description = 18 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. If set to true, then this sink is disabled and it does not export + * any log entries. + * + * Generated from protobuf field bool disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disabled = false; + /** + * Optional. Log entries that match any of these exclusion filters will not be + * exported. + * If a log entry is matched by both `filter` and one of `exclusion_filters` + * it will not be exported. + * + * Generated from protobuf field repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $exclusions; + /** + * Deprecated. This field is unused. + * + * Generated from protobuf field .google.logging.v2.LogSink.VersionFormat output_version_format = 6 [deprecated = true]; + * @deprecated + */ + protected $output_version_format = 0; + /** + * Output only. An IAM identity—a service account or group—under + * which Cloud Logging writes the exported log entries to the sink's + * destination. This field is either set by specifying + * `custom_writer_identity` or set automatically by + * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and + * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the + * value of `unique_writer_identity` in those methods. + * Until you grant this identity write-access to the destination, log entry + * exports from this sink will fail. For more information, see [Granting + * Access for a + * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). + * Consult the destination service's documentation to determine the + * appropriate IAM roles to assign to the identity. + * Sinks that have a destination that is a log bucket in the same project as + * the sink cannot have a writer_identity and no additional permissions are + * required. + * + * Generated from protobuf field string writer_identity = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $writer_identity = ''; + /** + * Optional. This field applies only to sinks owned by organizations and + * folders. If the field is false, the default, only the logs owned by the + * sink's parent resource are available for export. If the field is true, then + * log entries from all the projects, folders, and billing accounts contained + * in the sink's parent resource are also available for export. Whether a + * particular log entry from the children is exported depends on the sink's + * filter expression. + * For example, if this field is true, then the filter + * `resource.type=gce_instance` would export all Compute Engine VM instance + * log entries from all projects in the sink's parent. + * To only export entries from certain child projects, filter on the project + * part of the log name: + * logName:("projects/test-project1/" OR "projects/test-project2/") AND + * resource.type=gce_instance + * + * Generated from protobuf field bool include_children = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $include_children = false; + /** + * Output only. The creation timestamp of the sink. + * This field may not be present for older sinks. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last update timestamp of the sink. + * This field may not be present for older sinks. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + protected $options; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The client-assigned sink identifier, unique within the project. + * For example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited + * to 100 characters and can include only the following characters: upper and + * lower-case alphanumeric characters, underscores, hyphens, and periods. + * First character has to be alphanumeric. + * @type string $destination + * Required. The export destination: + * "storage.googleapis.com/[GCS_BUCKET]" + * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" + * "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" + * The sink's `writer_identity`, set when the sink is created, must have + * permission to write to the destination or else the log entries are not + * exported. For more information, see + * [Exporting Logs with + * Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + * @type string $filter + * Optional. An [advanced logs + * filter](https://cloud.google.com/logging/docs/view/advanced-queries). The + * only exported log entries are those that are in the resource owning the + * sink and that match the filter. + * For example: + * `logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR` + * @type string $description + * Optional. A description of this sink. + * The maximum length of the description is 8000 characters. + * @type bool $disabled + * Optional. If set to true, then this sink is disabled and it does not export + * any log entries. + * @type \Google\Cloud\Logging\V2\LogExclusion[] $exclusions + * Optional. Log entries that match any of these exclusion filters will not be + * exported. + * If a log entry is matched by both `filter` and one of `exclusion_filters` + * it will not be exported. + * @type int $output_version_format + * Deprecated. This field is unused. + * @type string $writer_identity + * Output only. An IAM identity—a service account or group—under + * which Cloud Logging writes the exported log entries to the sink's + * destination. This field is either set by specifying + * `custom_writer_identity` or set automatically by + * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and + * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the + * value of `unique_writer_identity` in those methods. + * Until you grant this identity write-access to the destination, log entry + * exports from this sink will fail. For more information, see [Granting + * Access for a + * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). + * Consult the destination service's documentation to determine the + * appropriate IAM roles to assign to the identity. + * Sinks that have a destination that is a log bucket in the same project as + * the sink cannot have a writer_identity and no additional permissions are + * required. + * @type bool $include_children + * Optional. This field applies only to sinks owned by organizations and + * folders. If the field is false, the default, only the logs owned by the + * sink's parent resource are available for export. If the field is true, then + * log entries from all the projects, folders, and billing accounts contained + * in the sink's parent resource are also available for export. Whether a + * particular log entry from the children is exported depends on the sink's + * filter expression. + * For example, if this field is true, then the filter + * `resource.type=gce_instance` would export all Compute Engine VM instance + * log entries from all projects in the sink's parent. + * To only export entries from certain child projects, filter on the project + * part of the log name: + * logName:("projects/test-project1/" OR "projects/test-project2/") AND + * resource.type=gce_instance + * @type \Google\Cloud\Logging\V2\BigQueryOptions $bigquery_options + * Optional. Options that affect sinks exporting data to BigQuery. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation timestamp of the sink. + * This field may not be present for older sinks. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last update timestamp of the sink. + * This field may not be present for older sinks. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The client-assigned sink identifier, unique within the project. + * For example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited + * to 100 characters and can include only the following characters: upper and + * lower-case alphanumeric characters, underscores, hyphens, and periods. + * First character has to be alphanumeric. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The client-assigned sink identifier, unique within the project. + * For example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited + * to 100 characters and can include only the following characters: upper and + * lower-case alphanumeric characters, underscores, hyphens, and periods. + * First character has to be alphanumeric. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The export destination: + * "storage.googleapis.com/[GCS_BUCKET]" + * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" + * "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" + * The sink's `writer_identity`, set when the sink is created, must have + * permission to write to the destination or else the log entries are not + * exported. For more information, see + * [Exporting Logs with + * Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + * + * Generated from protobuf field string destination = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getDestination() + { + return $this->destination; + } + + /** + * Required. The export destination: + * "storage.googleapis.com/[GCS_BUCKET]" + * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" + * "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" + * The sink's `writer_identity`, set when the sink is created, must have + * permission to write to the destination or else the log entries are not + * exported. For more information, see + * [Exporting Logs with + * Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + * + * Generated from protobuf field string destination = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDestination($var) + { + GPBUtil::checkString($var, True); + $this->destination = $var; + + return $this; + } + + /** + * Optional. An [advanced logs + * filter](https://cloud.google.com/logging/docs/view/advanced-queries). The + * only exported log entries are those that are in the resource owning the + * sink and that match the filter. + * For example: + * `logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR` + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. An [advanced logs + * filter](https://cloud.google.com/logging/docs/view/advanced-queries). The + * only exported log entries are those that are in the resource owning the + * sink and that match the filter. + * For example: + * `logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR` + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. A description of this sink. + * The maximum length of the description is 8000 characters. + * + * Generated from protobuf field string description = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A description of this sink. + * The maximum length of the description is 8000 characters. + * + * Generated from protobuf field string description = 18 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. If set to true, then this sink is disabled and it does not export + * any log entries. + * + * Generated from protobuf field bool disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDisabled() + { + return $this->disabled; + } + + /** + * Optional. If set to true, then this sink is disabled and it does not export + * any log entries. + * + * Generated from protobuf field bool disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDisabled($var) + { + GPBUtil::checkBool($var); + $this->disabled = $var; + + return $this; + } + + /** + * Optional. Log entries that match any of these exclusion filters will not be + * exported. + * If a log entry is matched by both `filter` and one of `exclusion_filters` + * it will not be exported. + * + * Generated from protobuf field repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField<\Google\Cloud\Logging\V2\LogExclusion> + */ + public function getExclusions() + { + return $this->exclusions; + } + + /** + * Optional. Log entries that match any of these exclusion filters will not be + * exported. + * If a log entry is matched by both `filter` and one of `exclusion_filters` + * it will not be exported. + * + * Generated from protobuf field repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Logging\V2\LogExclusion[] $var + * @return $this + */ + public function setExclusions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogExclusion::class); + $this->exclusions = $arr; + + return $this; + } + + /** + * Deprecated. This field is unused. + * + * Generated from protobuf field .google.logging.v2.LogSink.VersionFormat output_version_format = 6 [deprecated = true]; + * @return int + * @deprecated + */ + public function getOutputVersionFormat() + { + if ($this->output_version_format !== 0) { + @trigger_error('output_version_format is deprecated.', E_USER_DEPRECATED); + } + return $this->output_version_format; + } + + /** + * Deprecated. This field is unused. + * + * Generated from protobuf field .google.logging.v2.LogSink.VersionFormat output_version_format = 6 [deprecated = true]; + * @param int $var + * @return $this + * @deprecated + */ + public function setOutputVersionFormat($var) + { + @trigger_error('output_version_format is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\LogSink\VersionFormat::class); + $this->output_version_format = $var; + + return $this; + } + + /** + * Output only. An IAM identity—a service account or group—under + * which Cloud Logging writes the exported log entries to the sink's + * destination. This field is either set by specifying + * `custom_writer_identity` or set automatically by + * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and + * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the + * value of `unique_writer_identity` in those methods. + * Until you grant this identity write-access to the destination, log entry + * exports from this sink will fail. For more information, see [Granting + * Access for a + * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). + * Consult the destination service's documentation to determine the + * appropriate IAM roles to assign to the identity. + * Sinks that have a destination that is a log bucket in the same project as + * the sink cannot have a writer_identity and no additional permissions are + * required. + * + * Generated from protobuf field string writer_identity = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getWriterIdentity() + { + return $this->writer_identity; + } + + /** + * Output only. An IAM identity—a service account or group—under + * which Cloud Logging writes the exported log entries to the sink's + * destination. This field is either set by specifying + * `custom_writer_identity` or set automatically by + * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and + * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the + * value of `unique_writer_identity` in those methods. + * Until you grant this identity write-access to the destination, log entry + * exports from this sink will fail. For more information, see [Granting + * Access for a + * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). + * Consult the destination service's documentation to determine the + * appropriate IAM roles to assign to the identity. + * Sinks that have a destination that is a log bucket in the same project as + * the sink cannot have a writer_identity and no additional permissions are + * required. + * + * Generated from protobuf field string writer_identity = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setWriterIdentity($var) + { + GPBUtil::checkString($var, True); + $this->writer_identity = $var; + + return $this; + } + + /** + * Optional. This field applies only to sinks owned by organizations and + * folders. If the field is false, the default, only the logs owned by the + * sink's parent resource are available for export. If the field is true, then + * log entries from all the projects, folders, and billing accounts contained + * in the sink's parent resource are also available for export. Whether a + * particular log entry from the children is exported depends on the sink's + * filter expression. + * For example, if this field is true, then the filter + * `resource.type=gce_instance` would export all Compute Engine VM instance + * log entries from all projects in the sink's parent. + * To only export entries from certain child projects, filter on the project + * part of the log name: + * logName:("projects/test-project1/" OR "projects/test-project2/") AND + * resource.type=gce_instance + * + * Generated from protobuf field bool include_children = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getIncludeChildren() + { + return $this->include_children; + } + + /** + * Optional. This field applies only to sinks owned by organizations and + * folders. If the field is false, the default, only the logs owned by the + * sink's parent resource are available for export. If the field is true, then + * log entries from all the projects, folders, and billing accounts contained + * in the sink's parent resource are also available for export. Whether a + * particular log entry from the children is exported depends on the sink's + * filter expression. + * For example, if this field is true, then the filter + * `resource.type=gce_instance` would export all Compute Engine VM instance + * log entries from all projects in the sink's parent. + * To only export entries from certain child projects, filter on the project + * part of the log name: + * logName:("projects/test-project1/" OR "projects/test-project2/") AND + * resource.type=gce_instance + * + * Generated from protobuf field bool include_children = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setIncludeChildren($var) + { + GPBUtil::checkBool($var); + $this->include_children = $var; + + return $this; + } + + /** + * Optional. Options that affect sinks exporting data to BigQuery. + * + * Generated from protobuf field .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Logging\V2\BigQueryOptions|null + */ + public function getBigqueryOptions() + { + return $this->readOneof(12); + } + + public function hasBigqueryOptions() + { + return $this->hasOneof(12); + } + + /** + * Optional. Options that affect sinks exporting data to BigQuery. + * + * Generated from protobuf field .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Logging\V2\BigQueryOptions $var + * @return $this + */ + public function setBigqueryOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\BigQueryOptions::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Output only. The creation timestamp of the sink. + * This field may not be present for older sinks. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 creation timestamp of the sink. + * This field may not be present for older sinks. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The last update timestamp of the sink. + * This field may not be present for older sinks. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last update timestamp of the sink. + * This field may not be present for older sinks. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getOptions() + { + return $this->whichOneof("options"); + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink/VersionFormat.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink/VersionFormat.php new file mode 100644 index 000000000000..8a232415f6f5 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink/VersionFormat.php @@ -0,0 +1,61 @@ +google.logging.v2.LogSink.VersionFormat + */ +class VersionFormat +{ + /** + * An unspecified format version that will default to V2. + * + * Generated from protobuf enum VERSION_FORMAT_UNSPECIFIED = 0; + */ + const VERSION_FORMAT_UNSPECIFIED = 0; + /** + * `LogEntry` version 2 format. + * + * Generated from protobuf enum V2 = 1; + */ + const V2 = 1; + /** + * `LogEntry` version 1 format. + * + * Generated from protobuf enum V1 = 2; + */ + const V1 = 2; + + private static $valueToName = [ + self::VERSION_FORMAT_UNSPECIFIED => 'VERSION_FORMAT_UNSPECIFIED', + self::V2 => 'V2', + self::V1 => 'V1', + ]; + + 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSplit.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSplit.php new file mode 100644 index 000000000000..3211d45b03b2 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSplit.php @@ -0,0 +1,153 @@ +google.logging.v2.LogSplit + */ +class LogSplit extends \Google\Protobuf\Internal\Message +{ + /** + * A globally unique identifier for all log entries in a sequence of split log + * entries. All log entries with the same |LogSplit.uid| are assumed to be + * part of the same sequence of split log entries. + * + * Generated from protobuf field string uid = 1; + */ + protected $uid = ''; + /** + * The index of this LogEntry in the sequence of split log entries. Log + * entries are given |index| values 0, 1, ..., n-1 for a sequence of n log + * entries. + * + * Generated from protobuf field int32 index = 2; + */ + protected $index = 0; + /** + * The total number of log entries that the original LogEntry was split into. + * + * Generated from protobuf field int32 total_splits = 3; + */ + protected $total_splits = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uid + * A globally unique identifier for all log entries in a sequence of split log + * entries. All log entries with the same |LogSplit.uid| are assumed to be + * part of the same sequence of split log entries. + * @type int $index + * The index of this LogEntry in the sequence of split log entries. Log + * entries are given |index| values 0, 1, ..., n-1 for a sequence of n log + * entries. + * @type int $total_splits + * The total number of log entries that the original LogEntry was split into. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LogEntry::initOnce(); + parent::__construct($data); + } + + /** + * A globally unique identifier for all log entries in a sequence of split log + * entries. All log entries with the same |LogSplit.uid| are assumed to be + * part of the same sequence of split log entries. + * + * Generated from protobuf field string uid = 1; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * A globally unique identifier for all log entries in a sequence of split log + * entries. All log entries with the same |LogSplit.uid| are assumed to be + * part of the same sequence of split log entries. + * + * Generated from protobuf field string uid = 1; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + + /** + * The index of this LogEntry in the sequence of split log entries. Log + * entries are given |index| values 0, 1, ..., n-1 for a sequence of n log + * entries. + * + * Generated from protobuf field int32 index = 2; + * @return int + */ + public function getIndex() + { + return $this->index; + } + + /** + * The index of this LogEntry in the sequence of split log entries. Log + * entries are given |index| values 0, 1, ..., n-1 for a sequence of n log + * entries. + * + * Generated from protobuf field int32 index = 2; + * @param int $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkInt32($var); + $this->index = $var; + + return $this; + } + + /** + * The total number of log entries that the original LogEntry was split into. + * + * Generated from protobuf field int32 total_splits = 3; + * @return int + */ + public function getTotalSplits() + { + return $this->total_splits; + } + + /** + * The total number of log entries that the original LogEntry was split into. + * + * Generated from protobuf field int32 total_splits = 3; + * @param int $var + * @return $this + */ + public function setTotalSplits($var) + { + GPBUtil::checkInt32($var); + $this->total_splits = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogView.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogView.php new file mode 100644 index 000000000000..1ee5cf2c8912 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogView.php @@ -0,0 +1,267 @@ +google.logging.v2.LogView + */ +class LogView extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the view. + * For example: + * `projects/my-project/locations/global/buckets/my-bucket/views/my-view` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Describes this view. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * Output only. The creation timestamp of the view. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The last update timestamp of the view. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Filter that restricts which log entries in a bucket are visible in this + * view. + * Filters are restricted to be a logical AND of ==/!= of any of the + * following: + * - originating project/folder/organization/billing account. + * - resource type + * - log id + * For example: + * SOURCE("projects/myproject") AND resource.type = "gce_instance" + * AND LOG_ID("stdout") + * + * Generated from protobuf field string filter = 7; + */ + protected $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the view. + * For example: + * `projects/my-project/locations/global/buckets/my-bucket/views/my-view` + * @type string $description + * Describes this view. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The creation timestamp of the view. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The last update timestamp of the view. + * @type string $filter + * Filter that restricts which log entries in a bucket are visible in this + * view. + * Filters are restricted to be a logical AND of ==/!= of any of the + * following: + * - originating project/folder/organization/billing account. + * - resource type + * - log id + * For example: + * SOURCE("projects/myproject") AND resource.type = "gce_instance" + * AND LOG_ID("stdout") + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the view. + * For example: + * `projects/my-project/locations/global/buckets/my-bucket/views/my-view` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the view. + * For example: + * `projects/my-project/locations/global/buckets/my-bucket/views/my-view` + * + * 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; + } + + /** + * Describes this view. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Describes this view. + * + * 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; + } + + /** + * Output only. The creation timestamp of the view. + * + * 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 creation timestamp of the view. + * + * 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; + } + + /** + * Output only. The last update timestamp of the view. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The last update timestamp of the view. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Filter that restricts which log entries in a bucket are visible in this + * view. + * Filters are restricted to be a logical AND of ==/!= of any of the + * following: + * - originating project/folder/organization/billing account. + * - resource type + * - log id + * For example: + * SOURCE("projects/myproject") AND resource.type = "gce_instance" + * AND LOG_ID("stdout") + * + * Generated from protobuf field string filter = 7; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filter that restricts which log entries in a bucket are visible in this + * view. + * Filters are restricted to be a logical AND of ==/!= of any of the + * following: + * - originating project/folder/organization/billing account. + * - resource type + * - log id + * For example: + * SOURCE("projects/myproject") AND resource.type = "gce_instance" + * AND LOG_ID("stdout") + * + * Generated from protobuf field string filter = 7; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/OperationState.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/OperationState.php new file mode 100644 index 000000000000..32d50436ce86 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/OperationState.php @@ -0,0 +1,93 @@ +google.logging.v2.OperationState + */ +class OperationState +{ + /** + * Should not be used. + * + * Generated from protobuf enum OPERATION_STATE_UNSPECIFIED = 0; + */ + const OPERATION_STATE_UNSPECIFIED = 0; + /** + * The operation is scheduled. + * + * Generated from protobuf enum OPERATION_STATE_SCHEDULED = 1; + */ + const OPERATION_STATE_SCHEDULED = 1; + /** + * Waiting for necessary permissions. + * + * Generated from protobuf enum OPERATION_STATE_WAITING_FOR_PERMISSIONS = 2; + */ + const OPERATION_STATE_WAITING_FOR_PERMISSIONS = 2; + /** + * The operation is running. + * + * Generated from protobuf enum OPERATION_STATE_RUNNING = 3; + */ + const OPERATION_STATE_RUNNING = 3; + /** + * The operation was completed successfully. + * + * Generated from protobuf enum OPERATION_STATE_SUCCEEDED = 4; + */ + const OPERATION_STATE_SUCCEEDED = 4; + /** + * The operation failed. + * + * Generated from protobuf enum OPERATION_STATE_FAILED = 5; + */ + const OPERATION_STATE_FAILED = 5; + /** + * The operation was cancelled by the user. + * + * Generated from protobuf enum OPERATION_STATE_CANCELLED = 6; + */ + const OPERATION_STATE_CANCELLED = 6; + + private static $valueToName = [ + self::OPERATION_STATE_UNSPECIFIED => 'OPERATION_STATE_UNSPECIFIED', + self::OPERATION_STATE_SCHEDULED => 'OPERATION_STATE_SCHEDULED', + self::OPERATION_STATE_WAITING_FOR_PERMISSIONS => 'OPERATION_STATE_WAITING_FOR_PERMISSIONS', + self::OPERATION_STATE_RUNNING => 'OPERATION_STATE_RUNNING', + self::OPERATION_STATE_SUCCEEDED => 'OPERATION_STATE_SUCCEEDED', + self::OPERATION_STATE_FAILED => 'OPERATION_STATE_FAILED', + self::OPERATION_STATE_CANCELLED => 'OPERATION_STATE_CANCELLED', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/Settings.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/Settings.php new file mode 100644 index 000000000000..0f5d208d9c82 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/Settings.php @@ -0,0 +1,324 @@ +google.logging.v2.Settings + */ +class Settings extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The resource name of the settings. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Optional. The resource name for the configured Cloud KMS key. + * KMS key name format: + * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" + * For example: + * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` + * To enable CMEK for the Log Router, set this field to a valid + * `kms_key_name` for which the associated service account has the required + * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key. + * The Cloud KMS key used by the Log Router can be updated by changing the + * `kms_key_name` to a new valid key name. Encryption operations that are in + * progress will be completed with the key that was in use when they started. + * Decryption operations will be completed using the key that was used at the + * time of encryption unless access to that key has been revoked. + * To disable CMEK for the Log Router, set this field to an empty string. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * Generated from protobuf field string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $kms_key_name = ''; + /** + * Output only. The service account that will be used by the Log Router to + * access your Cloud KMS key. + * Before enabling CMEK for Log Router, you must first assign the role + * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that + * the Log Router will use to access your Cloud KMS key. Use + * [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to + * obtain the service account ID. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * Generated from protobuf field string kms_service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $kms_service_account_id = ''; + /** + * Optional. The Cloud region that will be used for _Default and _Required log + * buckets for newly created projects and folders. For example `europe-west1`. + * This setting does not affect the location of custom log buckets. + * + * Generated from protobuf field string storage_location = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $storage_location = ''; + /** + * Optional. If set to true, the _Default sink in newly created projects and + * folders will created in a disabled state. This can be used to automatically + * disable log ingestion if there is already an aggregated sink configured in + * the hierarchy. The _Default sink can be re-enabled manually if needed. + * + * Generated from protobuf field bool disable_default_sink = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $disable_default_sink = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. The resource name of the settings. + * @type string $kms_key_name + * Optional. The resource name for the configured Cloud KMS key. + * KMS key name format: + * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" + * For example: + * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` + * To enable CMEK for the Log Router, set this field to a valid + * `kms_key_name` for which the associated service account has the required + * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key. + * The Cloud KMS key used by the Log Router can be updated by changing the + * `kms_key_name` to a new valid key name. Encryption operations that are in + * progress will be completed with the key that was in use when they started. + * Decryption operations will be completed using the key that was used at the + * time of encryption unless access to that key has been revoked. + * To disable CMEK for the Log Router, set this field to an empty string. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * @type string $kms_service_account_id + * Output only. The service account that will be used by the Log Router to + * access your Cloud KMS key. + * Before enabling CMEK for Log Router, you must first assign the role + * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that + * the Log Router will use to access your Cloud KMS key. Use + * [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to + * obtain the service account ID. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * @type string $storage_location + * Optional. The Cloud region that will be used for _Default and _Required log + * buckets for newly created projects and folders. For example `europe-west1`. + * This setting does not affect the location of custom log buckets. + * @type bool $disable_default_sink + * Optional. If set to true, the _Default sink in newly created projects and + * folders will created in a disabled state. This can be used to automatically + * disable log ingestion if there is already an aggregated sink configured in + * the hierarchy. The _Default sink can be re-enabled manually if needed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The resource name of the settings. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. The resource name of the settings. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The resource name for the configured Cloud KMS key. + * KMS key name format: + * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" + * For example: + * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` + * To enable CMEK for the Log Router, set this field to a valid + * `kms_key_name` for which the associated service account has the required + * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key. + * The Cloud KMS key used by the Log Router can be updated by changing the + * `kms_key_name` to a new valid key name. Encryption operations that are in + * progress will be completed with the key that was in use when they started. + * Decryption operations will be completed using the key that was used at the + * time of encryption unless access to that key has been revoked. + * To disable CMEK for the Log Router, set this field to an empty string. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * Generated from protobuf field string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getKmsKeyName() + { + return $this->kms_key_name; + } + + /** + * Optional. The resource name for the configured Cloud KMS key. + * KMS key name format: + * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" + * For example: + * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` + * To enable CMEK for the Log Router, set this field to a valid + * `kms_key_name` for which the associated service account has the required + * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key. + * The Cloud KMS key used by the Log Router can be updated by changing the + * `kms_key_name` to a new valid key name. Encryption operations that are in + * progress will be completed with the key that was in use when they started. + * Decryption operations will be completed using the key that was used at the + * time of encryption unless access to that key has been revoked. + * To disable CMEK for the Log Router, set this field to an empty string. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * Generated from protobuf field string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setKmsKeyName($var) + { + GPBUtil::checkString($var, True); + $this->kms_key_name = $var; + + return $this; + } + + /** + * Output only. The service account that will be used by the Log Router to + * access your Cloud KMS key. + * Before enabling CMEK for Log Router, you must first assign the role + * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that + * the Log Router will use to access your Cloud KMS key. Use + * [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to + * obtain the service account ID. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * Generated from protobuf field string kms_service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getKmsServiceAccountId() + { + return $this->kms_service_account_id; + } + + /** + * Output only. The service account that will be used by the Log Router to + * access your Cloud KMS key. + * Before enabling CMEK for Log Router, you must first assign the role + * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that + * the Log Router will use to access your Cloud KMS key. Use + * [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to + * obtain the service account ID. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * Generated from protobuf field string kms_service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setKmsServiceAccountId($var) + { + GPBUtil::checkString($var, True); + $this->kms_service_account_id = $var; + + return $this; + } + + /** + * Optional. The Cloud region that will be used for _Default and _Required log + * buckets for newly created projects and folders. For example `europe-west1`. + * This setting does not affect the location of custom log buckets. + * + * Generated from protobuf field string storage_location = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getStorageLocation() + { + return $this->storage_location; + } + + /** + * Optional. The Cloud region that will be used for _Default and _Required log + * buckets for newly created projects and folders. For example `europe-west1`. + * This setting does not affect the location of custom log buckets. + * + * Generated from protobuf field string storage_location = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setStorageLocation($var) + { + GPBUtil::checkString($var, True); + $this->storage_location = $var; + + return $this; + } + + /** + * Optional. If set to true, the _Default sink in newly created projects and + * folders will created in a disabled state. This can be used to automatically + * disable log ingestion if there is already an aggregated sink configured in + * the hierarchy. The _Default sink can be re-enabled manually if needed. + * + * Generated from protobuf field bool disable_default_sink = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDisableDefaultSink() + { + return $this->disable_default_sink; + } + + /** + * Optional. If set to true, the _Default sink in newly created projects and + * folders will created in a disabled state. This can be used to automatically + * disable log ingestion if there is already an aggregated sink configured in + * the hierarchy. The _Default sink can be re-enabled manually if needed. + * + * Generated from protobuf field bool disable_default_sink = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDisableDefaultSink($var) + { + GPBUtil::checkBool($var); + $this->disable_default_sink = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesRequest.php new file mode 100644 index 000000000000..c50511a9936d --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesRequest.php @@ -0,0 +1,209 @@ +google.logging.v2.TailLogEntriesRequest + */ +class TailLogEntriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of a parent resource from which to retrieve log entries: + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * May alternatively be one or more views: + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + * Generated from protobuf field repeated string resource_names = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $resource_names; + /** + * Optional. Only log entries that match the filter are returned. An empty + * filter matches all log entries in the resources listed in `resource_names`. + * Referencing a parent resource that is not listed in `resource_names` will + * cause the filter to return no results. The maximum length of a filter is + * 20,000 characters. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. The amount of time to buffer log entries at the server before + * being returned to prevent out of order results due to late arriving log + * entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 + * milliseconds. + * + * Generated from protobuf field .google.protobuf.Duration buffer_window = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $buffer_window = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $resource_names + * Required. Name of a parent resource from which to retrieve log entries: + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * May alternatively be one or more views: + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * @type string $filter + * Optional. Only log entries that match the filter are returned. An empty + * filter matches all log entries in the resources listed in `resource_names`. + * Referencing a parent resource that is not listed in `resource_names` will + * cause the filter to return no results. The maximum length of a filter is + * 20,000 characters. + * @type \Google\Protobuf\Duration $buffer_window + * Optional. The amount of time to buffer log entries at the server before + * being returned to prevent out of order results due to late arriving log + * entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 + * milliseconds. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\Logging::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of a parent resource from which to retrieve log entries: + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * May alternatively be one or more views: + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + * Generated from protobuf field repeated string resource_names = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField + */ + public function getResourceNames() + { + return $this->resource_names; + } + + /** + * Required. Name of a parent resource from which to retrieve log entries: + * * `projects/[PROJECT_ID]` + * * `organizations/[ORGANIZATION_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]` + * * `folders/[FOLDER_ID]` + * May alternatively be one or more views: + * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` + * + * Generated from protobuf field repeated string resource_names = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string[] $var + * @return $this + */ + public function setResourceNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->resource_names = $arr; + + return $this; + } + + /** + * Optional. Only log entries that match the filter are returned. An empty + * filter matches all log entries in the resources listed in `resource_names`. + * Referencing a parent resource that is not listed in `resource_names` will + * cause the filter to return no results. The maximum length of a filter is + * 20,000 characters. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Only log entries that match the filter are returned. An empty + * filter matches all log entries in the resources listed in `resource_names`. + * Referencing a parent resource that is not listed in `resource_names` will + * cause the filter to return no results. The maximum length of a filter is + * 20,000 characters. + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. The amount of time to buffer log entries at the server before + * being returned to prevent out of order results due to late arriving log + * entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 + * milliseconds. + * + * Generated from protobuf field .google.protobuf.Duration buffer_window = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getBufferWindow() + { + return $this->buffer_window; + } + + public function hasBufferWindow() + { + return isset($this->buffer_window); + } + + public function clearBufferWindow() + { + unset($this->buffer_window); + } + + /** + * Optional. The amount of time to buffer log entries at the server before + * being returned to prevent out of order results due to late arriving log + * entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 + * milliseconds. + * + * Generated from protobuf field .google.protobuf.Duration buffer_window = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setBufferWindow($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->buffer_window = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse.php new file mode 100644 index 000000000000..42c83a2d3bad --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse.php @@ -0,0 +1,125 @@ +google.logging.v2.TailLogEntriesResponse + */ +class TailLogEntriesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of log entries. Each response in the stream will order entries with + * increasing values of `LogEntry.timestamp`. Ordering is not guaranteed + * between separate responses. + * + * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 1; + */ + private $entries; + /** + * If entries that otherwise would have been included in the session were not + * sent back to the client, counts of relevant entries omitted from the + * session with the reason that they were not included. There will be at most + * one of each reason per response. The counts represent the number of + * suppressed entries since the last streamed response. + * + * Generated from protobuf field repeated .google.logging.v2.TailLogEntriesResponse.SuppressionInfo suppression_info = 2; + */ + private $suppression_info; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Logging\V2\LogEntry[] $entries + * A list of log entries. Each response in the stream will order entries with + * increasing values of `LogEntry.timestamp`. Ordering is not guaranteed + * between separate responses. + * @type \Google\Cloud\Logging\V2\TailLogEntriesResponse\SuppressionInfo[] $suppression_info + * If entries that otherwise would have been included in the session were not + * sent back to the client, counts of relevant entries omitted from the + * session with the reason that they were not included. There will be at most + * one of each reason per response. The counts represent the number of + * suppressed entries since the last streamed response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\Logging::initOnce(); + parent::__construct($data); + } + + /** + * A list of log entries. Each response in the stream will order entries with + * increasing values of `LogEntry.timestamp`. Ordering is not guaranteed + * between separate responses. + * + * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 1; + * @return RepeatedField<\Google\Cloud\Logging\V2\LogEntry> + */ + public function getEntries() + { + return $this->entries; + } + + /** + * A list of log entries. Each response in the stream will order entries with + * increasing values of `LogEntry.timestamp`. Ordering is not guaranteed + * between separate responses. + * + * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 1; + * @param \Google\Cloud\Logging\V2\LogEntry[] $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogEntry::class); + $this->entries = $arr; + + return $this; + } + + /** + * If entries that otherwise would have been included in the session were not + * sent back to the client, counts of relevant entries omitted from the + * session with the reason that they were not included. There will be at most + * one of each reason per response. The counts represent the number of + * suppressed entries since the last streamed response. + * + * Generated from protobuf field repeated .google.logging.v2.TailLogEntriesResponse.SuppressionInfo suppression_info = 2; + * @return RepeatedField<\Google\Cloud\Logging\V2\TailLogEntriesResponse\SuppressionInfo> + */ + public function getSuppressionInfo() + { + return $this->suppression_info; + } + + /** + * If entries that otherwise would have been included in the session were not + * sent back to the client, counts of relevant entries omitted from the + * session with the reason that they were not included. There will be at most + * one of each reason per response. The counts represent the number of + * suppressed entries since the last streamed response. + * + * Generated from protobuf field repeated .google.logging.v2.TailLogEntriesResponse.SuppressionInfo suppression_info = 2; + * @param \Google\Cloud\Logging\V2\TailLogEntriesResponse\SuppressionInfo[] $var + * @return $this + */ + public function setSuppressionInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\TailLogEntriesResponse\SuppressionInfo::class); + $this->suppression_info = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo.php new file mode 100644 index 000000000000..dd12a4842950 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo.php @@ -0,0 +1,101 @@ +google.logging.v2.TailLogEntriesResponse.SuppressionInfo + */ +class SuppressionInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The reason that entries were omitted from the session. + * + * Generated from protobuf field .google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason reason = 1; + */ + protected $reason = 0; + /** + * A lower bound on the count of entries omitted due to `reason`. + * + * Generated from protobuf field int32 suppressed_count = 2; + */ + protected $suppressed_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $reason + * The reason that entries were omitted from the session. + * @type int $suppressed_count + * A lower bound on the count of entries omitted due to `reason`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\Logging::initOnce(); + parent::__construct($data); + } + + /** + * The reason that entries were omitted from the session. + * + * Generated from protobuf field .google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason reason = 1; + * @return int + */ + public function getReason() + { + return $this->reason; + } + + /** + * The reason that entries were omitted from the session. + * + * Generated from protobuf field .google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason reason = 1; + * @param int $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\TailLogEntriesResponse\SuppressionInfo\Reason::class); + $this->reason = $var; + + return $this; + } + + /** + * A lower bound on the count of entries omitted due to `reason`. + * + * Generated from protobuf field int32 suppressed_count = 2; + * @return int + */ + public function getSuppressedCount() + { + return $this->suppressed_count; + } + + /** + * A lower bound on the count of entries omitted due to `reason`. + * + * Generated from protobuf field int32 suppressed_count = 2; + * @param int $var + * @return $this + */ + public function setSuppressedCount($var) + { + GPBUtil::checkInt32($var); + $this->suppressed_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo/Reason.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo/Reason.php new file mode 100644 index 000000000000..3715139fa7b6 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo/Reason.php @@ -0,0 +1,65 @@ +google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason + */ +class Reason +{ + /** + * Unexpected default. + * + * Generated from protobuf enum REASON_UNSPECIFIED = 0; + */ + const REASON_UNSPECIFIED = 0; + /** + * Indicates suppression occurred due to relevant entries being + * received in excess of rate limits. For quotas and limits, see + * [Logging API quotas and + * limits](https://cloud.google.com/logging/quotas#api-limits). + * + * Generated from protobuf enum RATE_LIMIT = 1; + */ + const RATE_LIMIT = 1; + /** + * Indicates suppression occurred due to the client not consuming + * responses quickly enough. + * + * Generated from protobuf enum NOT_CONSUMED = 2; + */ + const NOT_CONSUMED = 2; + + private static $valueToName = [ + self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED', + self::RATE_LIMIT => 'RATE_LIMIT', + self::NOT_CONSUMED => 'NOT_CONSUMED', + ]; + + 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UndeleteBucketRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UndeleteBucketRequest.php new file mode 100644 index 000000000000..426d100d7ea7 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UndeleteBucketRequest.php @@ -0,0 +1,91 @@ +google.logging.v2.UndeleteBucketRequest + */ +class UndeleteBucketRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the bucket to undelete. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full resource name of the bucket to undelete. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the bucket to undelete. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full resource name of the bucket to undelete. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * + * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateBucketRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateBucketRequest.php new file mode 100644 index 000000000000..96e2fcd53961 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateBucketRequest.php @@ -0,0 +1,199 @@ +google.logging.v2.UpdateBucketRequest + */ +class UpdateBucketRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the bucket to update. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The updated bucket. + * + * Generated from protobuf field .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $bucket = null; + /** + * Required. Field mask that specifies the fields in `bucket` that need an + * update. A bucket field will be overwritten if, and only if, it is in the + * update mask. `name` and output only fields cannot be updated. + * For a detailed `FieldMask` definition, see: + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * For example: `updateMask=retention_days` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full resource name of the bucket to update. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * @type \Google\Cloud\Logging\V2\LogBucket $bucket + * Required. The updated bucket. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask that specifies the fields in `bucket` that need an + * update. A bucket field will be overwritten if, and only if, it is in the + * update mask. `name` and output only fields cannot be updated. + * For a detailed `FieldMask` definition, see: + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * For example: `updateMask=retention_days` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the bucket to update. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full resource name of the bucket to update. + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket"` + * + * 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 updated bucket. + * + * Generated from protobuf field .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Logging\V2\LogBucket|null + */ + public function getBucket() + { + return $this->bucket; + } + + public function hasBucket() + { + return isset($this->bucket); + } + + public function clearBucket() + { + unset($this->bucket); + } + + /** + * Required. The updated bucket. + * + * Generated from protobuf field .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Logging\V2\LogBucket $var + * @return $this + */ + public function setBucket($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogBucket::class); + $this->bucket = $var; + + return $this; + } + + /** + * Required. Field mask that specifies the fields in `bucket` that need an + * update. A bucket field will be overwritten if, and only if, it is in the + * update mask. `name` and output only fields cannot be updated. + * For a detailed `FieldMask` definition, see: + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * For example: `updateMask=retention_days` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.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. Field mask that specifies the fields in `bucket` that need an + * update. A bucket field will be overwritten if, and only if, it is in the + * update mask. `name` and output only fields cannot be updated. + * For a detailed `FieldMask` definition, see: + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * For example: `updateMask=retention_days` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateCmekSettingsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateCmekSettingsRequest.php new file mode 100644 index 000000000000..5c14437eecab --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateCmekSettingsRequest.php @@ -0,0 +1,223 @@ +google.logging.v2.UpdateCmekSettingsRequest + */ +class UpdateCmekSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name for the CMEK settings to update. + * "projects/[PROJECT_ID]/cmekSettings" + * "organizations/[ORGANIZATION_ID]/cmekSettings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + * "folders/[FOLDER_ID]/cmekSettings" + * For example: + * `"organizations/12345/cmekSettings"` + * Note: CMEK for the Log Router can currently only be configured for Google + * Cloud organizations. Once configured, it applies to all projects and + * folders in the Google Cloud organization. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. The CMEK settings to update. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cmek_settings = null; + /** + * Optional. Field mask identifying which fields from `cmek_settings` should + * be updated. A field will be overwritten if and only if it is in the update + * mask. Output only fields cannot be updated. + * See [FieldMask][google.protobuf.FieldMask] for more information. + * For example: `"updateMask=kmsKeyName"` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name for the CMEK settings to update. + * "projects/[PROJECT_ID]/cmekSettings" + * "organizations/[ORGANIZATION_ID]/cmekSettings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + * "folders/[FOLDER_ID]/cmekSettings" + * For example: + * `"organizations/12345/cmekSettings"` + * Note: CMEK for the Log Router can currently only be configured for Google + * Cloud organizations. Once configured, it applies to all projects and + * folders in the Google Cloud organization. + * @type \Google\Cloud\Logging\V2\CmekSettings $cmek_settings + * Required. The CMEK settings to update. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask identifying which fields from `cmek_settings` should + * be updated. A field will be overwritten if and only if it is in the update + * mask. Output only fields cannot be updated. + * See [FieldMask][google.protobuf.FieldMask] for more information. + * For example: `"updateMask=kmsKeyName"` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name for the CMEK settings to update. + * "projects/[PROJECT_ID]/cmekSettings" + * "organizations/[ORGANIZATION_ID]/cmekSettings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + * "folders/[FOLDER_ID]/cmekSettings" + * For example: + * `"organizations/12345/cmekSettings"` + * Note: CMEK for the Log Router can currently only be configured for Google + * Cloud organizations. Once configured, it applies to all projects and + * folders in the Google Cloud organization. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name for the CMEK settings to update. + * "projects/[PROJECT_ID]/cmekSettings" + * "organizations/[ORGANIZATION_ID]/cmekSettings" + * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" + * "folders/[FOLDER_ID]/cmekSettings" + * For example: + * `"organizations/12345/cmekSettings"` + * Note: CMEK for the Log Router can currently only be configured for Google + * Cloud organizations. Once configured, it applies to all projects and + * folders in the Google Cloud organization. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The CMEK settings to update. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Logging\V2\CmekSettings|null + */ + public function getCmekSettings() + { + return $this->cmek_settings; + } + + public function hasCmekSettings() + { + return isset($this->cmek_settings); + } + + public function clearCmekSettings() + { + unset($this->cmek_settings); + } + + /** + * Required. The CMEK settings to update. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Logging\V2\CmekSettings $var + * @return $this + */ + public function setCmekSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\CmekSettings::class); + $this->cmek_settings = $var; + + return $this; + } + + /** + * Optional. Field mask identifying which fields from `cmek_settings` should + * be updated. A field will be overwritten if and only if it is in the update + * mask. Output only fields cannot be updated. + * See [FieldMask][google.protobuf.FieldMask] for more information. + * For example: `"updateMask=kmsKeyName"` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Field mask identifying which fields from `cmek_settings` should + * be updated. A field will be overwritten if and only if it is in the update + * mask. Output only fields cannot be updated. + * See [FieldMask][google.protobuf.FieldMask] for more information. + * For example: `"updateMask=kmsKeyName"` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateExclusionRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateExclusionRequest.php new file mode 100644 index 000000000000..5f179cbabc8a --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateExclusionRequest.php @@ -0,0 +1,242 @@ +google.logging.v2.UpdateExclusionRequest + */ +class UpdateExclusionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the exclusion to update: + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * For example: + * `"projects/my-project/exclusions/my-exclusion"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. New values for the existing exclusion. Only the fields specified + * in `update_mask` are relevant. + * + * Generated from protobuf field .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $exclusion = null; + /** + * Required. A non-empty list of fields to change in the existing exclusion. + * New values for the fields are taken from the corresponding fields in the + * [LogExclusion][google.logging.v2.LogExclusion] included in this request. + * Fields not mentioned in `update_mask` are not changed and are ignored in + * the request. + * For example, to change the filter and description of an exclusion, + * specify an `update_mask` of `"filter,description"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param string $name Required. The resource name of the exclusion to update: + * + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * + * For example: + * + * `"projects/my-project/exclusions/my-exclusion"` + * Please see {@see ConfigServiceV2Client::logExclusionName()} for help formatting this field. + * @param \Google\Cloud\Logging\V2\LogExclusion $exclusion Required. New values for the existing exclusion. Only the fields specified + * in `update_mask` are relevant. + * @param \Google\Protobuf\FieldMask $updateMask Required. A non-empty list of fields to change in the existing exclusion. + * New values for the fields are taken from the corresponding fields in the + * [LogExclusion][google.logging.v2.LogExclusion] included in this request. + * Fields not mentioned in `update_mask` are not changed and are ignored in + * the request. + * + * For example, to change the filter and description of an exclusion, + * specify an `update_mask` of `"filter,description"`. + * + * @return \Google\Cloud\Logging\V2\UpdateExclusionRequest + * + * @experimental + */ + public static function build(string $name, \Google\Cloud\Logging\V2\LogExclusion $exclusion, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setName($name) + ->setExclusion($exclusion) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the exclusion to update: + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * For example: + * `"projects/my-project/exclusions/my-exclusion"` + * @type \Google\Cloud\Logging\V2\LogExclusion $exclusion + * Required. New values for the existing exclusion. Only the fields specified + * in `update_mask` are relevant. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. A non-empty list of fields to change in the existing exclusion. + * New values for the fields are taken from the corresponding fields in the + * [LogExclusion][google.logging.v2.LogExclusion] included in this request. + * Fields not mentioned in `update_mask` are not changed and are ignored in + * the request. + * For example, to change the filter and description of an exclusion, + * specify an `update_mask` of `"filter,description"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the exclusion to update: + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * For example: + * `"projects/my-project/exclusions/my-exclusion"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the exclusion to update: + * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" + * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" + * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" + * For example: + * `"projects/my-project/exclusions/my-exclusion"` + * + * 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. New values for the existing exclusion. Only the fields specified + * in `update_mask` are relevant. + * + * Generated from protobuf field .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Logging\V2\LogExclusion|null + */ + public function getExclusion() + { + return $this->exclusion; + } + + public function hasExclusion() + { + return isset($this->exclusion); + } + + public function clearExclusion() + { + unset($this->exclusion); + } + + /** + * Required. New values for the existing exclusion. Only the fields specified + * in `update_mask` are relevant. + * + * Generated from protobuf field .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Logging\V2\LogExclusion $var + * @return $this + */ + public function setExclusion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogExclusion::class); + $this->exclusion = $var; + + return $this; + } + + /** + * Required. A non-empty list of fields to change in the existing exclusion. + * New values for the fields are taken from the corresponding fields in the + * [LogExclusion][google.logging.v2.LogExclusion] included in this request. + * Fields not mentioned in `update_mask` are not changed and are ignored in + * the request. + * For example, to change the filter and description of an exclusion, + * specify an `update_mask` of `"filter,description"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 non-empty list of fields to change in the existing exclusion. + * New values for the fields are taken from the corresponding fields in the + * [LogExclusion][google.logging.v2.LogExclusion] included in this request. + * Fields not mentioned in `update_mask` are not changed and are ignored in + * the request. + * For example, to change the filter and description of an exclusion, + * specify an `update_mask` of `"filter,description"`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateLogMetricRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateLogMetricRequest.php new file mode 100644 index 000000000000..bae29fc5966d --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateLogMetricRequest.php @@ -0,0 +1,149 @@ +google.logging.v2.UpdateLogMetricRequest + */ +class UpdateLogMetricRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the metric to update: + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * The updated metric must be provided in the request and it's + * `name` field must be the same as `[METRIC_ID]` If the metric + * does not exist in `[PROJECT_ID]`, then a new metric is created. + * + * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $metric_name = ''; + /** + * Required. The updated metric. + * + * Generated from protobuf field .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric = null; + + /** + * @param string $metricName Required. The resource name of the metric to update: + * + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * + * The updated metric must be provided in the request and it's + * `name` field must be the same as `[METRIC_ID]` If the metric + * does not exist in `[PROJECT_ID]`, then a new metric is created. Please see + * {@see MetricsServiceV2Client::logMetricName()} for help formatting this field. + * @param \Google\Cloud\Logging\V2\LogMetric $metric Required. The updated metric. + * + * @return \Google\Cloud\Logging\V2\UpdateLogMetricRequest + * + * @experimental + */ + public static function build(string $metricName, \Google\Cloud\Logging\V2\LogMetric $metric): self + { + return (new self()) + ->setMetricName($metricName) + ->setMetric($metric); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $metric_name + * Required. The resource name of the metric to update: + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * The updated metric must be provided in the request and it's + * `name` field must be the same as `[METRIC_ID]` If the metric + * does not exist in `[PROJECT_ID]`, then a new metric is created. + * @type \Google\Cloud\Logging\V2\LogMetric $metric + * Required. The updated metric. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the metric to update: + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * The updated metric must be provided in the request and it's + * `name` field must be the same as `[METRIC_ID]` If the metric + * does not exist in `[PROJECT_ID]`, then a new metric is created. + * + * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getMetricName() + { + return $this->metric_name; + } + + /** + * Required. The resource name of the metric to update: + * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" + * The updated metric must be provided in the request and it's + * `name` field must be the same as `[METRIC_ID]` If the metric + * does not exist in `[PROJECT_ID]`, then a new metric is created. + * + * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMetricName($var) + { + GPBUtil::checkString($var, True); + $this->metric_name = $var; + + return $this; + } + + /** + * Required. The updated metric. + * + * Generated from protobuf field .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Logging\V2\LogMetric|null + */ + public function getMetric() + { + return $this->metric; + } + + public function hasMetric() + { + return isset($this->metric); + } + + public function clearMetric() + { + unset($this->metric); + } + + /** + * Required. The updated metric. + * + * Generated from protobuf field .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Logging\V2\LogMetric $var + * @return $this + */ + public function setMetric($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogMetric::class); + $this->metric = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSettingsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSettingsRequest.php new file mode 100644 index 000000000000..32a73be8bcd0 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSettingsRequest.php @@ -0,0 +1,236 @@ +google.logging.v2.UpdateSettingsRequest + */ +class UpdateSettingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name for the settings to update. + * "organizations/[ORGANIZATION_ID]/settings" + * For example: + * `"organizations/12345/settings"` + * Note: Settings for the Log Router can currently only be configured for + * Google Cloud organizations. Once configured, it applies to all projects and + * folders in the Google Cloud organization. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. The settings to update. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * Generated from protobuf field .google.logging.v2.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $settings = null; + /** + * Optional. Field mask identifying which fields from `settings` should + * be updated. A field will be overwritten if and only if it is in the update + * mask. Output only fields cannot be updated. + * See [FieldMask][google.protobuf.FieldMask] for more information. + * For example: `"updateMask=kmsKeyName"` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Logging\V2\Settings $settings Required. The settings to update. + * + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask identifying which fields from `settings` should + * be updated. A field will be overwritten if and only if it is in the update + * mask. Output only fields cannot be updated. + * + * See [FieldMask][google.protobuf.FieldMask] for more information. + * + * For example: `"updateMask=kmsKeyName"` + * + * @return \Google\Cloud\Logging\V2\UpdateSettingsRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Logging\V2\Settings $settings, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSettings($settings) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name for the settings to update. + * "organizations/[ORGANIZATION_ID]/settings" + * For example: + * `"organizations/12345/settings"` + * Note: Settings for the Log Router can currently only be configured for + * Google Cloud organizations. Once configured, it applies to all projects and + * folders in the Google Cloud organization. + * @type \Google\Cloud\Logging\V2\Settings $settings + * Required. The settings to update. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask identifying which fields from `settings` should + * be updated. A field will be overwritten if and only if it is in the update + * mask. Output only fields cannot be updated. + * See [FieldMask][google.protobuf.FieldMask] for more information. + * For example: `"updateMask=kmsKeyName"` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name for the settings to update. + * "organizations/[ORGANIZATION_ID]/settings" + * For example: + * `"organizations/12345/settings"` + * Note: Settings for the Log Router can currently only be configured for + * Google Cloud organizations. Once configured, it applies to all projects and + * folders in the Google Cloud organization. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name for the settings to update. + * "organizations/[ORGANIZATION_ID]/settings" + * For example: + * `"organizations/12345/settings"` + * Note: Settings for the Log Router can currently only be configured for + * Google Cloud organizations. Once configured, it applies to all projects and + * folders in the Google Cloud organization. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The settings to update. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * Generated from protobuf field .google.logging.v2.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Logging\V2\Settings|null + */ + public function getSettings() + { + return $this->settings; + } + + public function hasSettings() + { + return isset($this->settings); + } + + public function clearSettings() + { + unset($this->settings); + } + + /** + * Required. The settings to update. + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * Generated from protobuf field .google.logging.v2.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Logging\V2\Settings $var + * @return $this + */ + public function setSettings($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\Settings::class); + $this->settings = $var; + + return $this; + } + + /** + * Optional. Field mask identifying which fields from `settings` should + * be updated. A field will be overwritten if and only if it is in the update + * mask. Output only fields cannot be updated. + * See [FieldMask][google.protobuf.FieldMask] for more information. + * For example: `"updateMask=kmsKeyName"` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Field mask identifying which fields from `settings` should + * be updated. A field will be overwritten if and only if it is in the update + * mask. Output only fields cannot be updated. + * See [FieldMask][google.protobuf.FieldMask] for more information. + * For example: `"updateMask=kmsKeyName"` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSinkRequest.php new file mode 100644 index 000000000000..204cd0aa88a7 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSinkRequest.php @@ -0,0 +1,368 @@ +google.logging.v2.UpdateSinkRequest + */ +class UpdateSinkRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the sink to update, including the + * parent resource and the sink identifier: + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * For example: + * `"projects/my-project/sinks/my-sink"` + * + * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $sink_name = ''; + /** + * Required. The updated sink, whose name is the same identifier that appears + * as part of `sink_name`. + * + * Generated from protobuf field .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $sink = null; + /** + * Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] + * for a description of this field. When updating a sink, the effect of this + * field on the value of `writer_identity` in the updated sink depends on both + * the old and new values of this field: + * + If the old and new values of this field are both false or both true, + * then there is no change to the sink's `writer_identity`. + * + If the old value is false and the new value is true, then + * `writer_identity` is changed to a unique service account. + * + It is an error if the old value is true and the new value is + * set to false or defaulted to false. + * + * Generated from protobuf field bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $unique_writer_identity = false; + /** + * Optional. Field mask that specifies the fields in `sink` that need + * an update. A sink field will be overwritten if, and only if, it is + * in the update mask. `name` and output only fields cannot be updated. + * An empty `updateMask` is temporarily treated as using the following mask + * for backwards compatibility purposes: + * `destination,filter,includeChildren` + * At some point in the future, behavior will be removed and specifying an + * empty `updateMask` will be an error. + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * For example: `updateMask=filter` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param string $sinkName Required. The full resource name of the sink to update, including the + * parent resource and the sink identifier: + * + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * + * For example: + * + * `"projects/my-project/sinks/my-sink"` + * Please see {@see ConfigServiceV2Client::logSinkName()} for help formatting this field. + * @param \Google\Cloud\Logging\V2\LogSink $sink Required. The updated sink, whose name is the same identifier that appears + * as part of `sink_name`. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask that specifies the fields in `sink` that need + * an update. A sink field will be overwritten if, and only if, it is + * in the update mask. `name` and output only fields cannot be updated. + * + * An empty `updateMask` is temporarily treated as using the following mask + * for backwards compatibility purposes: + * + * `destination,filter,includeChildren` + * + * At some point in the future, behavior will be removed and specifying an + * empty `updateMask` will be an error. + * + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * + * For example: `updateMask=filter` + * + * @return \Google\Cloud\Logging\V2\UpdateSinkRequest + * + * @experimental + */ + public static function build(string $sinkName, \Google\Cloud\Logging\V2\LogSink $sink, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSinkName($sinkName) + ->setSink($sink) + ->setUpdateMask($updateMask); + } + + /** + * @param string $sinkName Required. The full resource name of the sink to update, including the + * parent resource and the sink identifier: + * + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * + * For example: + * + * `"projects/my-project/sinks/my-sink"` + * Please see {@see ConfigServiceV2Client::logSinkName()} for help formatting this field. + * @param \Google\Cloud\Logging\V2\LogSink $sink Required. The updated sink, whose name is the same identifier that appears + * as part of `sink_name`. + * + * @return \Google\Cloud\Logging\V2\UpdateSinkRequest + * + * @experimental + */ + public static function buildFromSinkNameSink(string $sinkName, \Google\Cloud\Logging\V2\LogSink $sink): self + { + return (new self()) + ->setSinkName($sinkName) + ->setSink($sink); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $sink_name + * Required. The full resource name of the sink to update, including the + * parent resource and the sink identifier: + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * For example: + * `"projects/my-project/sinks/my-sink"` + * @type \Google\Cloud\Logging\V2\LogSink $sink + * Required. The updated sink, whose name is the same identifier that appears + * as part of `sink_name`. + * @type bool $unique_writer_identity + * Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] + * for a description of this field. When updating a sink, the effect of this + * field on the value of `writer_identity` in the updated sink depends on both + * the old and new values of this field: + * + If the old and new values of this field are both false or both true, + * then there is no change to the sink's `writer_identity`. + * + If the old value is false and the new value is true, then + * `writer_identity` is changed to a unique service account. + * + It is an error if the old value is true and the new value is + * set to false or defaulted to false. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask that specifies the fields in `sink` that need + * an update. A sink field will be overwritten if, and only if, it is + * in the update mask. `name` and output only fields cannot be updated. + * An empty `updateMask` is temporarily treated as using the following mask + * for backwards compatibility purposes: + * `destination,filter,includeChildren` + * At some point in the future, behavior will be removed and specifying an + * empty `updateMask` will be an error. + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * For example: `updateMask=filter` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the sink to update, including the + * parent resource and the sink identifier: + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * For example: + * `"projects/my-project/sinks/my-sink"` + * + * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getSinkName() + { + return $this->sink_name; + } + + /** + * Required. The full resource name of the sink to update, including the + * parent resource and the sink identifier: + * "projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + * For example: + * `"projects/my-project/sinks/my-sink"` + * + * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSinkName($var) + { + GPBUtil::checkString($var, True); + $this->sink_name = $var; + + return $this; + } + + /** + * Required. The updated sink, whose name is the same identifier that appears + * as part of `sink_name`. + * + * Generated from protobuf field .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Logging\V2\LogSink|null + */ + public function getSink() + { + return $this->sink; + } + + public function hasSink() + { + return isset($this->sink); + } + + public function clearSink() + { + unset($this->sink); + } + + /** + * Required. The updated sink, whose name is the same identifier that appears + * as part of `sink_name`. + * + * Generated from protobuf field .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Logging\V2\LogSink $var + * @return $this + */ + public function setSink($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogSink::class); + $this->sink = $var; + + return $this; + } + + /** + * Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] + * for a description of this field. When updating a sink, the effect of this + * field on the value of `writer_identity` in the updated sink depends on both + * the old and new values of this field: + * + If the old and new values of this field are both false or both true, + * then there is no change to the sink's `writer_identity`. + * + If the old value is false and the new value is true, then + * `writer_identity` is changed to a unique service account. + * + It is an error if the old value is true and the new value is + * set to false or defaulted to false. + * + * Generated from protobuf field bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getUniqueWriterIdentity() + { + return $this->unique_writer_identity; + } + + /** + * Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] + * for a description of this field. When updating a sink, the effect of this + * field on the value of `writer_identity` in the updated sink depends on both + * the old and new values of this field: + * + If the old and new values of this field are both false or both true, + * then there is no change to the sink's `writer_identity`. + * + If the old value is false and the new value is true, then + * `writer_identity` is changed to a unique service account. + * + It is an error if the old value is true and the new value is + * set to false or defaulted to false. + * + * Generated from protobuf field bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setUniqueWriterIdentity($var) + { + GPBUtil::checkBool($var); + $this->unique_writer_identity = $var; + + return $this; + } + + /** + * Optional. Field mask that specifies the fields in `sink` that need + * an update. A sink field will be overwritten if, and only if, it is + * in the update mask. `name` and output only fields cannot be updated. + * An empty `updateMask` is temporarily treated as using the following mask + * for backwards compatibility purposes: + * `destination,filter,includeChildren` + * At some point in the future, behavior will be removed and specifying an + * empty `updateMask` will be an error. + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * For example: `updateMask=filter` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Field mask that specifies the fields in `sink` that need + * an update. A sink field will be overwritten if, and only if, it is + * in the update mask. `name` and output only fields cannot be updated. + * An empty `updateMask` is temporarily treated as using the following mask + * for backwards compatibility purposes: + * `destination,filter,includeChildren` + * At some point in the future, behavior will be removed and specifying an + * empty `updateMask` will be an error. + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * For example: `updateMask=filter` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateViewRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateViewRequest.php new file mode 100644 index 000000000000..8d2690cb2503 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateViewRequest.php @@ -0,0 +1,187 @@ +google.logging.v2.UpdateViewRequest + */ +class UpdateViewRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full resource name of the view to update + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. The updated view. + * + * Generated from protobuf field .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $view = null; + /** + * Optional. Field mask that specifies the fields in `view` that need + * an update. A field will be overwritten if, and only if, it is + * in the update mask. `name` and output only fields cannot be updated. + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * For example: `updateMask=filter` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The full resource name of the view to update + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` + * @type \Google\Cloud\Logging\V2\LogView $view + * Required. The updated view. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask that specifies the fields in `view` that need + * an update. A field will be overwritten if, and only if, it is + * in the update mask. `name` and output only fields cannot be updated. + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * For example: `updateMask=filter` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full resource name of the view to update + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The full resource name of the view to update + * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" + * For example: + * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The updated view. + * + * Generated from protobuf field .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Logging\V2\LogView|null + */ + public function getView() + { + return $this->view; + } + + public function hasView() + { + return isset($this->view); + } + + public function clearView() + { + unset($this->view); + } + + /** + * Required. The updated view. + * + * Generated from protobuf field .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Logging\V2\LogView $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogView::class); + $this->view = $var; + + return $this; + } + + /** + * Optional. Field mask that specifies the fields in `view` that need + * an update. A field will be overwritten if, and only if, it is + * in the update mask. `name` and output only fields cannot be updated. + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * For example: `updateMask=filter` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Field mask that specifies the fields in `view` that need + * an update. A field will be overwritten if, and only if, it is + * in the update mask. `name` and output only fields cannot be updated. + * For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask + * For example: `updateMask=filter` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @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/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesPartialErrors.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesPartialErrors.php new file mode 100644 index 000000000000..b95e6669d6d9 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesPartialErrors.php @@ -0,0 +1,83 @@ +google.logging.v2.WriteLogEntriesPartialErrors + */ +class WriteLogEntriesPartialErrors extends \Google\Protobuf\Internal\Message +{ + /** + * When `WriteLogEntriesRequest.partial_success` is true, records the error + * status for entries that were not written due to a permanent error, keyed + * by the entry's zero-based index in `WriteLogEntriesRequest.entries`. + * Failed requests for which no entries are written will not include + * per-entry errors. + * + * Generated from protobuf field map log_entry_errors = 1; + */ + private $log_entry_errors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $log_entry_errors + * When `WriteLogEntriesRequest.partial_success` is true, records the error + * status for entries that were not written due to a permanent error, keyed + * by the entry's zero-based index in `WriteLogEntriesRequest.entries`. + * Failed requests for which no entries are written will not include + * per-entry errors. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\Logging::initOnce(); + parent::__construct($data); + } + + /** + * When `WriteLogEntriesRequest.partial_success` is true, records the error + * status for entries that were not written due to a permanent error, keyed + * by the entry's zero-based index in `WriteLogEntriesRequest.entries`. + * Failed requests for which no entries are written will not include + * per-entry errors. + * + * Generated from protobuf field map log_entry_errors = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLogEntryErrors() + { + return $this->log_entry_errors; + } + + /** + * When `WriteLogEntriesRequest.partial_success` is true, records the error + * status for entries that were not written due to a permanent error, keyed + * by the entry's zero-based index in `WriteLogEntriesRequest.entries`. + * Failed requests for which no entries are written will not include + * per-entry errors. + * + * Generated from protobuf field map log_entry_errors = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLogEntryErrors($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT32, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); + $this->log_entry_errors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesRequest.php new file mode 100644 index 000000000000..7da34f362e65 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesRequest.php @@ -0,0 +1,507 @@ +google.logging.v2.WriteLogEntriesRequest + */ +class WriteLogEntriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A default log resource name that is assigned to all log entries + * in `entries` that do not specify a value for `log_name`: + * * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * * `folders/[FOLDER_ID]/logs/[LOG_ID]` + * `[LOG_ID]` must be URL-encoded. For example: + * "projects/my-project-id/logs/syslog" + * "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" + * The permission `logging.logEntries.create` is needed on each project, + * organization, billing account, or folder that is receiving new log + * entries, whether the resource is specified in `logName` or in an + * individual log entry. + * + * Generated from protobuf field string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $log_name = ''; + /** + * Optional. A default monitored resource object that is assigned to all log + * entries in `entries` that do not specify a value for `resource`. Example: + * { "type": "gce_instance", + * "labels": { + * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} + * See [LogEntry][google.logging.v2.LogEntry]. + * + * Generated from protobuf field .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $resource = null; + /** + * Optional. Default labels that are added to the `labels` field of all log + * entries in `entries`. If a log entry already has a label with the same key + * as a label in this parameter, then the log entry's label is not changed. + * See [LogEntry][google.logging.v2.LogEntry]. + * + * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Required. The log entries to send to Logging. The order of log + * entries in this list does not matter. Values supplied in this method's + * `log_name`, `resource`, and `labels` fields are copied into those log + * entries in this list that do not include values for their corresponding + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. + * If the `timestamp` or `insert_id` fields are missing in log entries, then + * this method supplies the current time or a unique identifier, respectively. + * The supplied values are chosen so that, among the log entries that did not + * supply their own values, the entries earlier in the list will sort before + * the entries later in the list. See the `entries.list` method. + * Log entries with timestamps that are more than the + * [logs retention period](https://cloud.google.com/logging/quotas) in + * the past or more than 24 hours in the future will not be available when + * calling `entries.list`. However, those log entries can still be [exported + * with + * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + * To improve throughput and to avoid exceeding the + * [quota limit](https://cloud.google.com/logging/quotas) for calls to + * `entries.write`, you should try to include several log entries in this + * list, rather than calling this method for each individual log entry. + * + * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + private $entries; + /** + * Optional. Whether a batch's valid entries should be written even if some + * other entry failed due to a permanent error such as INVALID_ARGUMENT or + * PERMISSION_DENIED. If any entry failed, then the response status is the + * response status of one of the failed entries. The response will include + * error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by + * the entries' zero-based index in the `entries`. Failed requests for which + * no entries are written will not include per-entry errors. + * + * Generated from protobuf field bool partial_success = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $partial_success = false; + /** + * Optional. If true, the request should expect normal response, but the + * entries won't be persisted nor exported. Useful for checking whether the + * logging API endpoints are working properly before sending valuable data. + * + * Generated from protobuf field bool dry_run = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $dry_run = false; + + /** + * @param string $logName Optional. A default log resource name that is assigned to all log entries + * in `entries` that do not specify a value for `log_name`: + * + * * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * * `folders/[FOLDER_ID]/logs/[LOG_ID]` + * + * `[LOG_ID]` must be URL-encoded. For example: + * + * "projects/my-project-id/logs/syslog" + * "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" + * + * The permission `logging.logEntries.create` is needed on each project, + * organization, billing account, or folder that is receiving new log + * entries, whether the resource is specified in `logName` or in an + * individual log entry. + * @param \Google\Api\MonitoredResource $resource Optional. A default monitored resource object that is assigned to all log + * entries in `entries` that do not specify a value for `resource`. Example: + * + * { "type": "gce_instance", + * "labels": { + * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} + * + * See [LogEntry][google.logging.v2.LogEntry]. + * @param array $labels Optional. Default labels that are added to the `labels` field of all log + * entries in `entries`. If a log entry already has a label with the same key + * as a label in this parameter, then the log entry's label is not changed. + * See [LogEntry][google.logging.v2.LogEntry]. + * @param \Google\Cloud\Logging\V2\LogEntry[] $entries Required. The log entries to send to Logging. The order of log + * entries in this list does not matter. Values supplied in this method's + * `log_name`, `resource`, and `labels` fields are copied into those log + * entries in this list that do not include values for their corresponding + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. + * + * If the `timestamp` or `insert_id` fields are missing in log entries, then + * this method supplies the current time or a unique identifier, respectively. + * The supplied values are chosen so that, among the log entries that did not + * supply their own values, the entries earlier in the list will sort before + * the entries later in the list. See the `entries.list` method. + * + * Log entries with timestamps that are more than the + * [logs retention period](https://cloud.google.com/logging/quotas) in + * the past or more than 24 hours in the future will not be available when + * calling `entries.list`. However, those log entries can still be [exported + * with + * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + * + * To improve throughput and to avoid exceeding the + * [quota limit](https://cloud.google.com/logging/quotas) for calls to + * `entries.write`, you should try to include several log entries in this + * list, rather than calling this method for each individual log entry. + * + * @return \Google\Cloud\Logging\V2\WriteLogEntriesRequest + * + * @experimental + */ + public static function build(string $logName, \Google\Api\MonitoredResource $resource, array $labels, array $entries): self + { + return (new self()) + ->setLogName($logName) + ->setResource($resource) + ->setLabels($labels) + ->setEntries($entries); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $log_name + * Optional. A default log resource name that is assigned to all log entries + * in `entries` that do not specify a value for `log_name`: + * * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * * `folders/[FOLDER_ID]/logs/[LOG_ID]` + * `[LOG_ID]` must be URL-encoded. For example: + * "projects/my-project-id/logs/syslog" + * "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" + * The permission `logging.logEntries.create` is needed on each project, + * organization, billing account, or folder that is receiving new log + * entries, whether the resource is specified in `logName` or in an + * individual log entry. + * @type \Google\Api\MonitoredResource $resource + * Optional. A default monitored resource object that is assigned to all log + * entries in `entries` that do not specify a value for `resource`. Example: + * { "type": "gce_instance", + * "labels": { + * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} + * See [LogEntry][google.logging.v2.LogEntry]. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. Default labels that are added to the `labels` field of all log + * entries in `entries`. If a log entry already has a label with the same key + * as a label in this parameter, then the log entry's label is not changed. + * See [LogEntry][google.logging.v2.LogEntry]. + * @type \Google\Cloud\Logging\V2\LogEntry[] $entries + * Required. The log entries to send to Logging. The order of log + * entries in this list does not matter. Values supplied in this method's + * `log_name`, `resource`, and `labels` fields are copied into those log + * entries in this list that do not include values for their corresponding + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. + * If the `timestamp` or `insert_id` fields are missing in log entries, then + * this method supplies the current time or a unique identifier, respectively. + * The supplied values are chosen so that, among the log entries that did not + * supply their own values, the entries earlier in the list will sort before + * the entries later in the list. See the `entries.list` method. + * Log entries with timestamps that are more than the + * [logs retention period](https://cloud.google.com/logging/quotas) in + * the past or more than 24 hours in the future will not be available when + * calling `entries.list`. However, those log entries can still be [exported + * with + * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + * To improve throughput and to avoid exceeding the + * [quota limit](https://cloud.google.com/logging/quotas) for calls to + * `entries.write`, you should try to include several log entries in this + * list, rather than calling this method for each individual log entry. + * @type bool $partial_success + * Optional. Whether a batch's valid entries should be written even if some + * other entry failed due to a permanent error such as INVALID_ARGUMENT or + * PERMISSION_DENIED. If any entry failed, then the response status is the + * response status of one of the failed entries. The response will include + * error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by + * the entries' zero-based index in the `entries`. Failed requests for which + * no entries are written will not include per-entry errors. + * @type bool $dry_run + * Optional. If true, the request should expect normal response, but the + * entries won't be persisted nor exported. Useful for checking whether the + * logging API endpoints are working properly before sending valuable data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\Logging::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A default log resource name that is assigned to all log entries + * in `entries` that do not specify a value for `log_name`: + * * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * * `folders/[FOLDER_ID]/logs/[LOG_ID]` + * `[LOG_ID]` must be URL-encoded. For example: + * "projects/my-project-id/logs/syslog" + * "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" + * The permission `logging.logEntries.create` is needed on each project, + * organization, billing account, or folder that is receiving new log + * entries, whether the resource is specified in `logName` or in an + * individual log entry. + * + * Generated from protobuf field string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getLogName() + { + return $this->log_name; + } + + /** + * Optional. A default log resource name that is assigned to all log entries + * in `entries` that do not specify a value for `log_name`: + * * `projects/[PROJECT_ID]/logs/[LOG_ID]` + * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` + * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` + * * `folders/[FOLDER_ID]/logs/[LOG_ID]` + * `[LOG_ID]` must be URL-encoded. For example: + * "projects/my-project-id/logs/syslog" + * "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" + * The permission `logging.logEntries.create` is needed on each project, + * organization, billing account, or folder that is receiving new log + * entries, whether the resource is specified in `logName` or in an + * individual log entry. + * + * Generated from protobuf field string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setLogName($var) + { + GPBUtil::checkString($var, True); + $this->log_name = $var; + + return $this; + } + + /** + * Optional. A default monitored resource object that is assigned to all log + * entries in `entries` that do not specify a value for `resource`. Example: + * { "type": "gce_instance", + * "labels": { + * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} + * See [LogEntry][google.logging.v2.LogEntry]. + * + * Generated from protobuf field .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Api\MonitoredResource|null + */ + public function getResource() + { + return $this->resource; + } + + public function hasResource() + { + return isset($this->resource); + } + + public function clearResource() + { + unset($this->resource); + } + + /** + * Optional. A default monitored resource object that is assigned to all log + * entries in `entries` that do not specify a value for `resource`. Example: + * { "type": "gce_instance", + * "labels": { + * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} + * See [LogEntry][google.logging.v2.LogEntry]. + * + * Generated from protobuf field .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Api\MonitoredResource $var + * @return $this + */ + public function setResource($var) + { + GPBUtil::checkMessage($var, \Google\Api\MonitoredResource::class); + $this->resource = $var; + + return $this; + } + + /** + * Optional. Default labels that are added to the `labels` field of all log + * entries in `entries`. If a log entry already has a label with the same key + * as a label in this parameter, then the log entry's label is not changed. + * See [LogEntry][google.logging.v2.LogEntry]. + * + * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. Default labels that are added to the `labels` field of all log + * entries in `entries`. If a log entry already has a label with the same key + * as a label in this parameter, then the log entry's label is not changed. + * See [LogEntry][google.logging.v2.LogEntry]. + * + * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @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; + } + + /** + * Required. The log entries to send to Logging. The order of log + * entries in this list does not matter. Values supplied in this method's + * `log_name`, `resource`, and `labels` fields are copied into those log + * entries in this list that do not include values for their corresponding + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. + * If the `timestamp` or `insert_id` fields are missing in log entries, then + * this method supplies the current time or a unique identifier, respectively. + * The supplied values are chosen so that, among the log entries that did not + * supply their own values, the entries earlier in the list will sort before + * the entries later in the list. See the `entries.list` method. + * Log entries with timestamps that are more than the + * [logs retention period](https://cloud.google.com/logging/quotas) in + * the past or more than 24 hours in the future will not be available when + * calling `entries.list`. However, those log entries can still be [exported + * with + * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + * To improve throughput and to avoid exceeding the + * [quota limit](https://cloud.google.com/logging/quotas) for calls to + * `entries.write`, you should try to include several log entries in this + * list, rather than calling this method for each individual log entry. + * + * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\Logging\V2\LogEntry> + */ + public function getEntries() + { + return $this->entries; + } + + /** + * Required. The log entries to send to Logging. The order of log + * entries in this list does not matter. Values supplied in this method's + * `log_name`, `resource`, and `labels` fields are copied into those log + * entries in this list that do not include values for their corresponding + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. + * If the `timestamp` or `insert_id` fields are missing in log entries, then + * this method supplies the current time or a unique identifier, respectively. + * The supplied values are chosen so that, among the log entries that did not + * supply their own values, the entries earlier in the list will sort before + * the entries later in the list. See the `entries.list` method. + * Log entries with timestamps that are more than the + * [logs retention period](https://cloud.google.com/logging/quotas) in + * the past or more than 24 hours in the future will not be available when + * calling `entries.list`. However, those log entries can still be [exported + * with + * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). + * To improve throughput and to avoid exceeding the + * [quota limit](https://cloud.google.com/logging/quotas) for calls to + * `entries.write`, you should try to include several log entries in this + * list, rather than calling this method for each individual log entry. + * + * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Logging\V2\LogEntry[] $var + * @return $this + */ + public function setEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogEntry::class); + $this->entries = $arr; + + return $this; + } + + /** + * Optional. Whether a batch's valid entries should be written even if some + * other entry failed due to a permanent error such as INVALID_ARGUMENT or + * PERMISSION_DENIED. If any entry failed, then the response status is the + * response status of one of the failed entries. The response will include + * error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by + * the entries' zero-based index in the `entries`. Failed requests for which + * no entries are written will not include per-entry errors. + * + * Generated from protobuf field bool partial_success = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getPartialSuccess() + { + return $this->partial_success; + } + + /** + * Optional. Whether a batch's valid entries should be written even if some + * other entry failed due to a permanent error such as INVALID_ARGUMENT or + * PERMISSION_DENIED. If any entry failed, then the response status is the + * response status of one of the failed entries. The response will include + * error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by + * the entries' zero-based index in the `entries`. Failed requests for which + * no entries are written will not include per-entry errors. + * + * Generated from protobuf field bool partial_success = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setPartialSuccess($var) + { + GPBUtil::checkBool($var); + $this->partial_success = $var; + + return $this; + } + + /** + * Optional. If true, the request should expect normal response, but the + * entries won't be persisted nor exported. Useful for checking whether the + * logging API endpoints are working properly before sending valuable data. + * + * Generated from protobuf field bool dry_run = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getDryRun() + { + return $this->dry_run; + } + + /** + * Optional. If true, the request should expect normal response, but the + * entries won't be persisted nor exported. Useful for checking whether the + * logging API endpoints are working properly before sending valuable data. + * + * Generated from protobuf field bool dry_run = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setDryRun($var) + { + GPBUtil::checkBool($var); + $this->dry_run = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesResponse.php new file mode 100644 index 000000000000..b1a8c8f915b5 --- /dev/null +++ b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesResponse.php @@ -0,0 +1,33 @@ +google.logging.v2.WriteLogEntriesResponse + */ +class WriteLogEntriesResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Logging\V2\Logging::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/copy_log_entries.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/copy_log_entries.php new file mode 100644 index 000000000000..9c3f034e864d --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/copy_log_entries.php @@ -0,0 +1,89 @@ +setName($name) + ->setDestination($destination); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $configServiceV2Client->copyLogEntries($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CopyLogEntriesResponse $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]'; + $destination = '[DESTINATION]'; + + copy_log_entries_sample($name, $destination); +} +// [END logging_v2_generated_ConfigServiceV2_CopyLogEntries_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket.php new file mode 100644 index 000000000000..458dcff8b55b --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket.php @@ -0,0 +1,85 @@ +setParent($formattedParent) + ->setBucketId($bucketId) + ->setBucket($bucket); + + // Call the API and handle any network failures. + try { + /** @var LogBucket $response */ + $response = $configServiceV2Client->createBucket($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ConfigServiceV2Client::organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $bucketId = '[BUCKET_ID]'; + + create_bucket_sample($formattedParent, $bucketId); +} +// [END logging_v2_generated_ConfigServiceV2_CreateBucket_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket_async.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket_async.php new file mode 100644 index 000000000000..d30360bc4259 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket_async.php @@ -0,0 +1,98 @@ +setParent($formattedParent) + ->setBucketId($bucketId) + ->setBucket($bucket); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $configServiceV2Client->createBucketAsync($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var LogBucket $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 = ConfigServiceV2Client::organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $bucketId = '[BUCKET_ID]'; + + create_bucket_async_sample($formattedParent, $bucketId); +} +// [END logging_v2_generated_ConfigServiceV2_CreateBucketAsync_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_exclusion.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_exclusion.php new file mode 100644 index 000000000000..4e93aeba45d1 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_exclusion.php @@ -0,0 +1,106 @@ +setName($exclusionName) + ->setFilter($exclusionFilter); + $request = (new CreateExclusionRequest()) + ->setParent($formattedParent) + ->setExclusion($exclusion); + + // Call the API and handle any network failures. + try { + /** @var LogExclusion $response */ + $response = $configServiceV2Client->createExclusion($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ConfigServiceV2Client::projectName('[PROJECT]'); + $exclusionName = '[NAME]'; + $exclusionFilter = '[FILTER]'; + + create_exclusion_sample($formattedParent, $exclusionName, $exclusionFilter); +} +// [END logging_v2_generated_ConfigServiceV2_CreateExclusion_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_link.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_link.php new file mode 100644 index 000000000000..0239a2cf8083 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_link.php @@ -0,0 +1,97 @@ +setParent($formattedParent) + ->setLink($link) + ->setLinkId($linkId); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $configServiceV2Client->createLink($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Link $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 = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + $linkId = '[LINK_ID]'; + + create_link_sample($formattedParent, $linkId); +} +// [END logging_v2_generated_ConfigServiceV2_CreateLink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_sink.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_sink.php new file mode 100644 index 000000000000..56561a9d94a2 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_sink.php @@ -0,0 +1,110 @@ +setName($sinkName) + ->setDestination($sinkDestination); + $request = (new CreateSinkRequest()) + ->setParent($formattedParent) + ->setSink($sink); + + // Call the API and handle any network failures. + try { + /** @var LogSink $response */ + $response = $configServiceV2Client->createSink($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = ConfigServiceV2Client::projectName('[PROJECT]'); + $sinkName = '[NAME]'; + $sinkDestination = '[DESTINATION]'; + + create_sink_sample($formattedParent, $sinkName, $sinkDestination); +} +// [END logging_v2_generated_ConfigServiceV2_CreateSink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_view.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_view.php new file mode 100644 index 000000000000..2bef426b760e --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_view.php @@ -0,0 +1,84 @@ +setParent($parent) + ->setViewId($viewId) + ->setView($view); + + // Call the API and handle any network failures. + try { + /** @var LogView $response */ + $response = $configServiceV2Client->createView($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + $viewId = '[VIEW_ID]'; + + create_view_sample($parent, $viewId); +} +// [END logging_v2_generated_ConfigServiceV2_CreateView_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_bucket.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_bucket.php new file mode 100644 index 000000000000..e9509f9682a7 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_bucket.php @@ -0,0 +1,82 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $configServiceV2Client->deleteBucket($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + + delete_bucket_sample($formattedName); +} +// [END logging_v2_generated_ConfigServiceV2_DeleteBucket_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_exclusion.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_exclusion.php new file mode 100644 index 000000000000..b078c5539218 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_exclusion.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $configServiceV2Client->deleteExclusion($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ConfigServiceV2Client::logExclusionName('[PROJECT]', '[EXCLUSION]'); + + delete_exclusion_sample($formattedName); +} +// [END logging_v2_generated_ConfigServiceV2_DeleteExclusion_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_link.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_link.php new file mode 100644 index 000000000000..45da6115548a --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_link.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $configServiceV2Client->deleteLink($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ConfigServiceV2Client::linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); + + delete_link_sample($formattedName); +} +// [END logging_v2_generated_ConfigServiceV2_DeleteLink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_sink.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_sink.php new file mode 100644 index 000000000000..2ffdc424ccff --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_sink.php @@ -0,0 +1,80 @@ +setSinkName($formattedSinkName); + + // Call the API and handle any network failures. + try { + $configServiceV2Client->deleteSink($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedSinkName = ConfigServiceV2Client::logSinkName('[PROJECT]', '[SINK]'); + + delete_sink_sample($formattedSinkName); +} +// [END logging_v2_generated_ConfigServiceV2_DeleteSink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_view.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_view.php new file mode 100644 index 000000000000..e433b1f16e42 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_view.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $configServiceV2Client->deleteView($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ConfigServiceV2Client::logViewName( + '[PROJECT]', + '[LOCATION]', + '[BUCKET]', + '[VIEW]' + ); + + delete_view_sample($formattedName); +} +// [END logging_v2_generated_ConfigServiceV2_DeleteView_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_bucket.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_bucket.php new file mode 100644 index 000000000000..0fd146716d4f --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_bucket.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var LogBucket $response */ + $response = $configServiceV2Client->getBucket($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + + get_bucket_sample($formattedName); +} +// [END logging_v2_generated_ConfigServiceV2_GetBucket_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_cmek_settings.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_cmek_settings.php new file mode 100644 index 000000000000..20c1b6738262 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_cmek_settings.php @@ -0,0 +1,66 @@ +getCmekSettings($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END logging_v2_generated_ConfigServiceV2_GetCmekSettings_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_exclusion.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_exclusion.php new file mode 100644 index 000000000000..841601051f96 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_exclusion.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var LogExclusion $response */ + $response = $configServiceV2Client->getExclusion($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ConfigServiceV2Client::logExclusionName('[PROJECT]', '[EXCLUSION]'); + + get_exclusion_sample($formattedName); +} +// [END logging_v2_generated_ConfigServiceV2_GetExclusion_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_link.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_link.php new file mode 100644 index 000000000000..031c456969b8 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_link.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Link $response */ + $response = $configServiceV2Client->getLink($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ConfigServiceV2Client::linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); + + get_link_sample($formattedName); +} +// [END logging_v2_generated_ConfigServiceV2_GetLink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_settings.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_settings.php new file mode 100644 index 000000000000..a9b8aa1e5bb7 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_settings.php @@ -0,0 +1,94 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Settings $response */ + $response = $configServiceV2Client->getSettings($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ConfigServiceV2Client::settingsName('[PROJECT]'); + + get_settings_sample($formattedName); +} +// [END logging_v2_generated_ConfigServiceV2_GetSettings_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_sink.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_sink.php new file mode 100644 index 000000000000..f78809abf90e --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_sink.php @@ -0,0 +1,80 @@ +setSinkName($formattedSinkName); + + // Call the API and handle any network failures. + try { + /** @var LogSink $response */ + $response = $configServiceV2Client->getSink($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedSinkName = ConfigServiceV2Client::logSinkName('[PROJECT]', '[SINK]'); + + get_sink_sample($formattedSinkName); +} +// [END logging_v2_generated_ConfigServiceV2_GetSink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_view.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_view.php new file mode 100644 index 000000000000..fe94019225f6 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_view.php @@ -0,0 +1,82 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var LogView $response */ + $response = $configServiceV2Client->getView($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ConfigServiceV2Client::logViewName( + '[PROJECT]', + '[LOCATION]', + '[BUCKET]', + '[VIEW]' + ); + + get_view_sample($formattedName); +} +// [END logging_v2_generated_ConfigServiceV2_GetView_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_buckets.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_buckets.php new file mode 100644 index 000000000000..8eb8418d16ed --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_buckets.php @@ -0,0 +1,85 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $configServiceV2Client->listBuckets($request); + + /** @var LogBucket $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 = ConfigServiceV2Client::organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + + list_buckets_sample($formattedParent); +} +// [END logging_v2_generated_ConfigServiceV2_ListBuckets_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_exclusions.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_exclusions.php new file mode 100644 index 000000000000..653f3659dca6 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_exclusions.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $configServiceV2Client->listExclusions($request); + + /** @var LogExclusion $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 = ConfigServiceV2Client::projectName('[PROJECT]'); + + list_exclusions_sample($formattedParent); +} +// [END logging_v2_generated_ConfigServiceV2_ListExclusions_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_links.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_links.php new file mode 100644 index 000000000000..32ebd931043f --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_links.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $configServiceV2Client->listLinks($request); + + /** @var Link $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 = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + + list_links_sample($formattedParent); +} +// [END logging_v2_generated_ConfigServiceV2_ListLinks_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_sinks.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_sinks.php new file mode 100644 index 000000000000..f049f6ec0f5c --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_sinks.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $configServiceV2Client->listSinks($request); + + /** @var LogSink $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 = ConfigServiceV2Client::projectName('[PROJECT]'); + + list_sinks_sample($formattedParent); +} +// [END logging_v2_generated_ConfigServiceV2_ListSinks_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_views.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_views.php new file mode 100644 index 000000000000..edf4e775501e --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_views.php @@ -0,0 +1,77 @@ +setParent($parent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $configServiceV2Client->listViews($request); + + /** @var LogView $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + + list_views_sample($parent); +} +// [END logging_v2_generated_ConfigServiceV2_ListViews_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/undelete_bucket.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/undelete_bucket.php new file mode 100644 index 000000000000..3f0fb01d7ff6 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/undelete_bucket.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $configServiceV2Client->undeleteBucket($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + + undelete_bucket_sample($formattedName); +} +// [END logging_v2_generated_ConfigServiceV2_UndeleteBucket_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket.php new file mode 100644 index 000000000000..394d07a6beaf --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket.php @@ -0,0 +1,90 @@ +setName($formattedName) + ->setBucket($bucket) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var LogBucket $response */ + $response = $configServiceV2Client->updateBucket($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + + update_bucket_sample($formattedName); +} +// [END logging_v2_generated_ConfigServiceV2_UpdateBucket_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket_async.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket_async.php new file mode 100644 index 000000000000..d18d0836ff38 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket_async.php @@ -0,0 +1,102 @@ +setName($formattedName) + ->setBucket($bucket) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $configServiceV2Client->updateBucketAsync($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var LogBucket $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 = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + + update_bucket_async_sample($formattedName); +} +// [END logging_v2_generated_ConfigServiceV2_UpdateBucketAsync_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_cmek_settings.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_cmek_settings.php new file mode 100644 index 000000000000..3fd6125cc6e4 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_cmek_settings.php @@ -0,0 +1,71 @@ +updateCmekSettings($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END logging_v2_generated_ConfigServiceV2_UpdateCmekSettings_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_exclusion.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_exclusion.php new file mode 100644 index 000000000000..81ac5e077bc2 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_exclusion.php @@ -0,0 +1,107 @@ +setName($exclusionName) + ->setFilter($exclusionFilter); + $updateMask = new FieldMask(); + $request = (new UpdateExclusionRequest()) + ->setName($formattedName) + ->setExclusion($exclusion) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var LogExclusion $response */ + $response = $configServiceV2Client->updateExclusion($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = ConfigServiceV2Client::logExclusionName('[PROJECT]', '[EXCLUSION]'); + $exclusionName = '[NAME]'; + $exclusionFilter = '[FILTER]'; + + update_exclusion_sample($formattedName, $exclusionName, $exclusionFilter); +} +// [END logging_v2_generated_ConfigServiceV2_UpdateExclusion_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_settings.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_settings.php new file mode 100644 index 000000000000..eb2f8f1261fd --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_settings.php @@ -0,0 +1,97 @@ +setName($name) + ->setSettings($settings); + + // Call the API and handle any network failures. + try { + /** @var Settings $response */ + $response = $configServiceV2Client->updateSettings($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + update_settings_sample($name); +} +// [END logging_v2_generated_ConfigServiceV2_UpdateSettings_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_sink.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_sink.php new file mode 100644 index 000000000000..031a022e8909 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_sink.php @@ -0,0 +1,111 @@ +setName($sinkName) + ->setDestination($sinkDestination); + $request = (new UpdateSinkRequest()) + ->setSinkName($formattedSinkName) + ->setSink($sink); + + // Call the API and handle any network failures. + try { + /** @var LogSink $response */ + $response = $configServiceV2Client->updateSink($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedSinkName = ConfigServiceV2Client::logSinkName('[PROJECT]', '[SINK]'); + $sinkName = '[NAME]'; + $sinkDestination = '[DESTINATION]'; + + update_sink_sample($formattedSinkName, $sinkName, $sinkDestination); +} +// [END logging_v2_generated_ConfigServiceV2_UpdateSink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_view.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_view.php new file mode 100644 index 000000000000..60ba67ab4462 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_view.php @@ -0,0 +1,82 @@ +setName($name) + ->setView($view); + + // Call the API and handle any network failures. + try { + /** @var LogView $response */ + $response = $configServiceV2Client->updateView($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + + update_view_sample($name); +} +// [END logging_v2_generated_ConfigServiceV2_UpdateView_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/delete_log.php b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/delete_log.php new file mode 100644 index 000000000000..adb822ffb030 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/delete_log.php @@ -0,0 +1,84 @@ +setLogName($formattedLogName); + + // Call the API and handle any network failures. + try { + $loggingServiceV2Client->deleteLog($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedLogName = LoggingServiceV2Client::logName('[PROJECT]', '[LOG]'); + + delete_log_sample($formattedLogName); +} +// [END logging_v2_generated_LoggingServiceV2_DeleteLog_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_log_entries.php b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_log_entries.php new file mode 100644 index 000000000000..cbcc825da832 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_log_entries.php @@ -0,0 +1,96 @@ +setResourceNames($formattedResourceNames); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $loggingServiceV2Client->listLogEntries($request); + + /** @var LogEntry $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 +{ + $formattedResourceNamesElement = LoggingServiceV2Client::projectName('[PROJECT]'); + + list_log_entries_sample($formattedResourceNamesElement); +} +// [END logging_v2_generated_LoggingServiceV2_ListLogEntries_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_logs.php b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_logs.php new file mode 100644 index 000000000000..624a78e3c253 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_logs.php @@ -0,0 +1,81 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $loggingServiceV2Client->listLogs($request); + + /** @var string $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = LoggingServiceV2Client::projectName('[PROJECT]'); + + list_logs_sample($formattedParent); +} +// [END logging_v2_generated_LoggingServiceV2_ListLogs_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_monitored_resource_descriptors.php b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_monitored_resource_descriptors.php new file mode 100644 index 000000000000..0ab5a81f9535 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_monitored_resource_descriptors.php @@ -0,0 +1,62 @@ +listMonitoredResourceDescriptors($request); + + /** @var MonitoredResourceDescriptor $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END logging_v2_generated_LoggingServiceV2_ListMonitoredResourceDescriptors_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/tail_log_entries.php b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/tail_log_entries.php new file mode 100644 index 000000000000..9731b69f8ccd --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/tail_log_entries.php @@ -0,0 +1,90 @@ +setResourceNames($resourceNames); + + // Call the API and handle any network failures. + try { + /** @var BidiStream $stream */ + $stream = $loggingServiceV2Client->tailLogEntries(); + $stream->writeAll([$request,]); + + /** @var TailLogEntriesResponse $element */ + foreach ($stream->closeWriteAndReadAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $resourceNamesElement = '[RESOURCE_NAMES]'; + + tail_log_entries_sample($resourceNamesElement); +} +// [END logging_v2_generated_LoggingServiceV2_TailLogEntries_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/write_log_entries.php b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/write_log_entries.php new file mode 100644 index 000000000000..67ce8d49a46e --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/write_log_entries.php @@ -0,0 +1,105 @@ +setLogName($entriesLogName) + ->setResource($entriesResource); + $entries = [$logEntry,]; + $request = (new WriteLogEntriesRequest()) + ->setEntries($entries); + + // Call the API and handle any network failures. + try { + /** @var WriteLogEntriesResponse $response */ + $response = $loggingServiceV2Client->writeLogEntries($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $entriesLogName = '[LOG_NAME]'; + + write_log_entries_sample($entriesLogName); +} +// [END logging_v2_generated_LoggingServiceV2_WriteLogEntries_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/create_log_metric.php b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/create_log_metric.php new file mode 100644 index 000000000000..9c9f45a3cad4 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/create_log_metric.php @@ -0,0 +1,104 @@ +=ERROR" + * + * The maximum length of the filter is 20000 characters. + */ +function create_log_metric_sample( + string $formattedParent, + string $metricName, + string $metricFilter +): void { + // Create a client. + $metricsServiceV2Client = new MetricsServiceV2Client(); + + // Prepare the request message. + $metric = (new LogMetric()) + ->setName($metricName) + ->setFilter($metricFilter); + $request = (new CreateLogMetricRequest()) + ->setParent($formattedParent) + ->setMetric($metric); + + // Call the API and handle any network failures. + try { + /** @var LogMetric $response */ + $response = $metricsServiceV2Client->createLogMetric($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = MetricsServiceV2Client::projectName('[PROJECT]'); + $metricName = '[NAME]'; + $metricFilter = '[FILTER]'; + + create_log_metric_sample($formattedParent, $metricName, $metricFilter); +} +// [END logging_v2_generated_MetricsServiceV2_CreateLogMetric_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/delete_log_metric.php b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/delete_log_metric.php new file mode 100644 index 000000000000..482ff52e7117 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/delete_log_metric.php @@ -0,0 +1,71 @@ +setMetricName($formattedMetricName); + + // Call the API and handle any network failures. + try { + $metricsServiceV2Client->deleteLogMetric($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedMetricName = MetricsServiceV2Client::logMetricName('[PROJECT]', '[METRIC]'); + + delete_log_metric_sample($formattedMetricName); +} +// [END logging_v2_generated_MetricsServiceV2_DeleteLogMetric_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/get_log_metric.php b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/get_log_metric.php new file mode 100644 index 000000000000..f765dab60d1f --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/get_log_metric.php @@ -0,0 +1,73 @@ +setMetricName($formattedMetricName); + + // Call the API and handle any network failures. + try { + /** @var LogMetric $response */ + $response = $metricsServiceV2Client->getLogMetric($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedMetricName = MetricsServiceV2Client::logMetricName('[PROJECT]', '[METRIC]'); + + get_log_metric_sample($formattedMetricName); +} +// [END logging_v2_generated_MetricsServiceV2_GetLogMetric_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/list_log_metrics.php b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/list_log_metrics.php new file mode 100644 index 000000000000..cdff7285ac76 --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/list_log_metrics.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $metricsServiceV2Client->listLogMetrics($request); + + /** @var LogMetric $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 = MetricsServiceV2Client::projectName('[PROJECT]'); + + list_log_metrics_sample($formattedParent); +} +// [END logging_v2_generated_MetricsServiceV2_ListLogMetrics_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/update_log_metric.php b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/update_log_metric.php new file mode 100644 index 000000000000..a5456d044afb --- /dev/null +++ b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/update_log_metric.php @@ -0,0 +1,106 @@ +=ERROR" + * + * The maximum length of the filter is 20000 characters. + */ +function update_log_metric_sample( + string $formattedMetricName, + string $metricName, + string $metricFilter +): void { + // Create a client. + $metricsServiceV2Client = new MetricsServiceV2Client(); + + // Prepare the request message. + $metric = (new LogMetric()) + ->setName($metricName) + ->setFilter($metricFilter); + $request = (new UpdateLogMetricRequest()) + ->setMetricName($formattedMetricName) + ->setMetric($metric); + + // Call the API and handle any network failures. + try { + /** @var LogMetric $response */ + $response = $metricsServiceV2Client->updateLogMetric($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedMetricName = MetricsServiceV2Client::logMetricName('[PROJECT]', '[METRIC]'); + $metricName = '[NAME]'; + $metricFilter = '[FILTER]'; + + update_log_metric_sample($formattedMetricName, $metricName, $metricFilter); +} +// [END logging_v2_generated_MetricsServiceV2_UpdateLogMetric_sync] diff --git a/owl-bot-staging/Logging/v2/src/V2/Client/ConfigServiceV2Client.php b/owl-bot-staging/Logging/v2/src/V2/Client/ConfigServiceV2Client.php new file mode 100644 index 000000000000..9d0cb291521b --- /dev/null +++ b/owl-bot-staging/Logging/v2/src/V2/Client/ConfigServiceV2Client.php @@ -0,0 +1,2039 @@ + copyLogEntriesAsync(CopyLogEntriesRequest $request, array $optionalArgs = []) + * @method PromiseInterface createBucketAsync(CreateBucketRequest $request, array $optionalArgs = []) + * @method PromiseInterface createBucketAsyncAsync(CreateBucketRequest $request, array $optionalArgs = []) + * @method PromiseInterface createExclusionAsync(CreateExclusionRequest $request, array $optionalArgs = []) + * @method PromiseInterface createLinkAsync(CreateLinkRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSinkAsync(CreateSinkRequest $request, array $optionalArgs = []) + * @method PromiseInterface createViewAsync(CreateViewRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteBucketAsync(DeleteBucketRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteExclusionAsync(DeleteExclusionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteLinkAsync(DeleteLinkRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSinkAsync(DeleteSinkRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteViewAsync(DeleteViewRequest $request, array $optionalArgs = []) + * @method PromiseInterface getBucketAsync(GetBucketRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCmekSettingsAsync(GetCmekSettingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getExclusionAsync(GetExclusionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLinkAsync(GetLinkRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSettingsAsync(GetSettingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSinkAsync(GetSinkRequest $request, array $optionalArgs = []) + * @method PromiseInterface getViewAsync(GetViewRequest $request, array $optionalArgs = []) + * @method PromiseInterface listBucketsAsync(ListBucketsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listExclusionsAsync(ListExclusionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLinksAsync(ListLinksRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSinksAsync(ListSinksRequest $request, array $optionalArgs = []) + * @method PromiseInterface listViewsAsync(ListViewsRequest $request, array $optionalArgs = []) + * @method PromiseInterface undeleteBucketAsync(UndeleteBucketRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBucketAsync(UpdateBucketRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateBucketAsyncAsync(UpdateBucketRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCmekSettingsAsync(UpdateCmekSettingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateExclusionAsync(UpdateExclusionRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSettingsAsync(UpdateSettingsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSinkAsync(UpdateSinkRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateViewAsync(UpdateViewRequest $request, array $optionalArgs = []) + */ +final class ConfigServiceV2Client +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.logging.v2.ConfigServiceV2'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'logging.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'logging.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/logging.admin', + 'https://www.googleapis.com/auth/logging.read', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/config_service_v2_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/config_service_v2_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/config_service_v2_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/config_service_v2_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * billing_account resource. + * + * @param string $billingAccount + * + * @return string The formatted billing_account resource. + */ + public static function billingAccountName(string $billingAccount): string + { + return self::getPathTemplate('billingAccount')->render([ + 'billing_account' => $billingAccount, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * billing_account_cmekSettings resource. + * + * @param string $billingAccount + * + * @return string The formatted billing_account_cmekSettings resource. + */ + public static function billingAccountCmekSettingsName(string $billingAccount): string + { + return self::getPathTemplate('billingAccountCmekSettings')->render([ + 'billing_account' => $billingAccount, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * billing_account_exclusion resource. + * + * @param string $billingAccount + * @param string $exclusion + * + * @return string The formatted billing_account_exclusion resource. + */ + public static function billingAccountExclusionName(string $billingAccount, string $exclusion): string + { + return self::getPathTemplate('billingAccountExclusion')->render([ + 'billing_account' => $billingAccount, + 'exclusion' => $exclusion, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * billing_account_location resource. + * + * @param string $billingAccount + * @param string $location + * + * @return string The formatted billing_account_location resource. + */ + public static function billingAccountLocationName(string $billingAccount, string $location): string + { + return self::getPathTemplate('billingAccountLocation')->render([ + 'billing_account' => $billingAccount, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * billing_account_location_bucket resource. + * + * @param string $billingAccount + * @param string $location + * @param string $bucket + * + * @return string The formatted billing_account_location_bucket resource. + */ + public static function billingAccountLocationBucketName(string $billingAccount, string $location, string $bucket): string + { + return self::getPathTemplate('billingAccountLocationBucket')->render([ + 'billing_account' => $billingAccount, + 'location' => $location, + 'bucket' => $bucket, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * billing_account_location_bucket_link resource. + * + * @param string $billingAccount + * @param string $location + * @param string $bucket + * @param string $link + * + * @return string The formatted billing_account_location_bucket_link resource. + */ + public static function billingAccountLocationBucketLinkName(string $billingAccount, string $location, string $bucket, string $link): string + { + return self::getPathTemplate('billingAccountLocationBucketLink')->render([ + 'billing_account' => $billingAccount, + 'location' => $location, + 'bucket' => $bucket, + 'link' => $link, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * billing_account_location_bucket_view resource. + * + * @param string $billingAccount + * @param string $location + * @param string $bucket + * @param string $view + * + * @return string The formatted billing_account_location_bucket_view resource. + */ + public static function billingAccountLocationBucketViewName(string $billingAccount, string $location, string $bucket, string $view): string + { + return self::getPathTemplate('billingAccountLocationBucketView')->render([ + 'billing_account' => $billingAccount, + 'location' => $location, + 'bucket' => $bucket, + 'view' => $view, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * billing_account_settings resource. + * + * @param string $billingAccount + * + * @return string The formatted billing_account_settings resource. + */ + public static function billingAccountSettingsName(string $billingAccount): string + { + return self::getPathTemplate('billingAccountSettings')->render([ + 'billing_account' => $billingAccount, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * billing_account_sink resource. + * + * @param string $billingAccount + * @param string $sink + * + * @return string The formatted billing_account_sink resource. + */ + public static function billingAccountSinkName(string $billingAccount, string $sink): string + { + return self::getPathTemplate('billingAccountSink')->render([ + 'billing_account' => $billingAccount, + 'sink' => $sink, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * cmek_settings resource. + * + * @param string $project + * + * @return string The formatted cmek_settings resource. + */ + public static function cmekSettingsName(string $project): string + { + return self::getPathTemplate('cmekSettings')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a folder + * resource. + * + * @param string $folder + * + * @return string The formatted folder resource. + */ + public static function folderName(string $folder): string + { + return self::getPathTemplate('folder')->render([ + 'folder' => $folder, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_cmekSettings resource. + * + * @param string $folder + * + * @return string The formatted folder_cmekSettings resource. + */ + public static function folderCmekSettingsName(string $folder): string + { + return self::getPathTemplate('folderCmekSettings')->render([ + 'folder' => $folder, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_exclusion resource. + * + * @param string $folder + * @param string $exclusion + * + * @return string The formatted folder_exclusion resource. + */ + public static function folderExclusionName(string $folder, string $exclusion): string + { + return self::getPathTemplate('folderExclusion')->render([ + 'folder' => $folder, + 'exclusion' => $exclusion, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location resource. + * + * @param string $folder + * @param string $location + * + * @return string The formatted folder_location resource. + */ + public static function folderLocationName(string $folder, string $location): string + { + return self::getPathTemplate('folderLocation')->render([ + 'folder' => $folder, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_bucket resource. + * + * @param string $folder + * @param string $location + * @param string $bucket + * + * @return string The formatted folder_location_bucket resource. + */ + public static function folderLocationBucketName(string $folder, string $location, string $bucket): string + { + return self::getPathTemplate('folderLocationBucket')->render([ + 'folder' => $folder, + 'location' => $location, + 'bucket' => $bucket, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_bucket_link resource. + * + * @param string $folder + * @param string $location + * @param string $bucket + * @param string $link + * + * @return string The formatted folder_location_bucket_link resource. + */ + public static function folderLocationBucketLinkName(string $folder, string $location, string $bucket, string $link): string + { + return self::getPathTemplate('folderLocationBucketLink')->render([ + 'folder' => $folder, + 'location' => $location, + 'bucket' => $bucket, + 'link' => $link, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_location_bucket_view resource. + * + * @param string $folder + * @param string $location + * @param string $bucket + * @param string $view + * + * @return string The formatted folder_location_bucket_view resource. + */ + public static function folderLocationBucketViewName(string $folder, string $location, string $bucket, string $view): string + { + return self::getPathTemplate('folderLocationBucketView')->render([ + 'folder' => $folder, + 'location' => $location, + 'bucket' => $bucket, + 'view' => $view, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * folder_settings resource. + * + * @param string $folder + * + * @return string The formatted folder_settings resource. + */ + public static function folderSettingsName(string $folder): string + { + return self::getPathTemplate('folderSettings')->render([ + 'folder' => $folder, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a folder_sink + * resource. + * + * @param string $folder + * @param string $sink + * + * @return string The formatted folder_sink resource. + */ + public static function folderSinkName(string $folder, string $sink): string + { + return self::getPathTemplate('folderSink')->render([ + 'folder' => $folder, + 'sink' => $sink, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a link + * resource. + * + * @param string $project + * @param string $location + * @param string $bucket + * @param string $link + * + * @return string The formatted link resource. + */ + public static function linkName(string $project, string $location, string $bucket, string $link): string + { + return self::getPathTemplate('link')->render([ + 'project' => $project, + 'location' => $location, + 'bucket' => $bucket, + 'link' => $link, + ]); + } + + /** + * 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 log_bucket + * resource. + * + * @param string $project + * @param string $location + * @param string $bucket + * + * @return string The formatted log_bucket resource. + */ + public static function logBucketName(string $project, string $location, string $bucket): string + { + return self::getPathTemplate('logBucket')->render([ + 'project' => $project, + 'location' => $location, + 'bucket' => $bucket, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * log_exclusion resource. + * + * @param string $project + * @param string $exclusion + * + * @return string The formatted log_exclusion resource. + */ + public static function logExclusionName(string $project, string $exclusion): string + { + return self::getPathTemplate('logExclusion')->render([ + 'project' => $project, + 'exclusion' => $exclusion, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a log_sink + * resource. + * + * @param string $project + * @param string $sink + * + * @return string The formatted log_sink resource. + */ + public static function logSinkName(string $project, string $sink): string + { + return self::getPathTemplate('logSink')->render([ + 'project' => $project, + 'sink' => $sink, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a log_view + * resource. + * + * @param string $project + * @param string $location + * @param string $bucket + * @param string $view + * + * @return string The formatted log_view resource. + */ + public static function logViewName(string $project, string $location, string $bucket, string $view): string + { + return self::getPathTemplate('logView')->render([ + 'project' => $project, + 'location' => $location, + 'bucket' => $bucket, + 'view' => $view, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a organization + * resource. + * + * @param string $organization + * + * @return string The formatted organization resource. + */ + public static function organizationName(string $organization): string + { + return self::getPathTemplate('organization')->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_cmekSettings resource. + * + * @param string $organization + * + * @return string The formatted organization_cmekSettings resource. + */ + public static function organizationCmekSettingsName(string $organization): string + { + return self::getPathTemplate('organizationCmekSettings')->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_exclusion resource. + * + * @param string $organization + * @param string $exclusion + * + * @return string The formatted organization_exclusion resource. + */ + public static function organizationExclusionName(string $organization, string $exclusion): string + { + return self::getPathTemplate('organizationExclusion')->render([ + 'organization' => $organization, + 'exclusion' => $exclusion, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location resource. + * + * @param string $organization + * @param string $location + * + * @return string The formatted organization_location resource. + */ + public static function organizationLocationName(string $organization, string $location): string + { + return self::getPathTemplate('organizationLocation')->render([ + 'organization' => $organization, + 'location' => $location, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_bucket resource. + * + * @param string $organization + * @param string $location + * @param string $bucket + * + * @return string The formatted organization_location_bucket resource. + */ + public static function organizationLocationBucketName(string $organization, string $location, string $bucket): string + { + return self::getPathTemplate('organizationLocationBucket')->render([ + 'organization' => $organization, + 'location' => $location, + 'bucket' => $bucket, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_bucket_link resource. + * + * @param string $organization + * @param string $location + * @param string $bucket + * @param string $link + * + * @return string The formatted organization_location_bucket_link resource. + */ + public static function organizationLocationBucketLinkName(string $organization, string $location, string $bucket, string $link): string + { + return self::getPathTemplate('organizationLocationBucketLink')->render([ + 'organization' => $organization, + 'location' => $location, + 'bucket' => $bucket, + 'link' => $link, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_location_bucket_view resource. + * + * @param string $organization + * @param string $location + * @param string $bucket + * @param string $view + * + * @return string The formatted organization_location_bucket_view resource. + */ + public static function organizationLocationBucketViewName(string $organization, string $location, string $bucket, string $view): string + { + return self::getPathTemplate('organizationLocationBucketView')->render([ + 'organization' => $organization, + 'location' => $location, + 'bucket' => $bucket, + 'view' => $view, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_settings resource. + * + * @param string $organization + * + * @return string The formatted organization_settings resource. + */ + public static function organizationSettingsName(string $organization): string + { + return self::getPathTemplate('organizationSettings')->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_sink resource. + * + * @param string $organization + * @param string $sink + * + * @return string The formatted organization_sink resource. + */ + public static function organizationSinkName(string $organization, string $sink): string + { + return self::getPathTemplate('organizationSink')->render([ + 'organization' => $organization, + 'sink' => $sink, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_cmekSettings resource. + * + * @param string $project + * + * @return string The formatted project_cmekSettings resource. + */ + public static function projectCmekSettingsName(string $project): string + { + return self::getPathTemplate('projectCmekSettings')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_exclusion resource. + * + * @param string $project + * @param string $exclusion + * + * @return string The formatted project_exclusion resource. + */ + public static function projectExclusionName(string $project, string $exclusion): string + { + return self::getPathTemplate('projectExclusion')->render([ + 'project' => $project, + 'exclusion' => $exclusion, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_bucket resource. + * + * @param string $project + * @param string $location + * @param string $bucket + * + * @return string The formatted project_location_bucket resource. + */ + public static function projectLocationBucketName(string $project, string $location, string $bucket): string + { + return self::getPathTemplate('projectLocationBucket')->render([ + 'project' => $project, + 'location' => $location, + 'bucket' => $bucket, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_bucket_link resource. + * + * @param string $project + * @param string $location + * @param string $bucket + * @param string $link + * + * @return string The formatted project_location_bucket_link resource. + */ + public static function projectLocationBucketLinkName(string $project, string $location, string $bucket, string $link): string + { + return self::getPathTemplate('projectLocationBucketLink')->render([ + 'project' => $project, + 'location' => $location, + 'bucket' => $bucket, + 'link' => $link, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_location_bucket_view resource. + * + * @param string $project + * @param string $location + * @param string $bucket + * @param string $view + * + * @return string The formatted project_location_bucket_view resource. + */ + public static function projectLocationBucketViewName(string $project, string $location, string $bucket, string $view): string + { + return self::getPathTemplate('projectLocationBucketView')->render([ + 'project' => $project, + 'location' => $location, + 'bucket' => $bucket, + 'view' => $view, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_settings resource. + * + * @param string $project + * + * @return string The formatted project_settings resource. + */ + public static function projectSettingsName(string $project): string + { + return self::getPathTemplate('projectSettings')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project_sink + * resource. + * + * @param string $project + * @param string $sink + * + * @return string The formatted project_sink resource. + */ + public static function projectSinkName(string $project, string $sink): string + { + return self::getPathTemplate('projectSink')->render([ + 'project' => $project, + 'sink' => $sink, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a settings + * resource. + * + * @param string $project + * + * @return string The formatted settings resource. + */ + public static function settingsName(string $project): string + { + return self::getPathTemplate('settings')->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 + * - billingAccount: billingAccounts/{billing_account} + * - billingAccountCmekSettings: billingAccounts/{billing_account}/cmekSettings + * - billingAccountExclusion: billingAccounts/{billing_account}/exclusions/{exclusion} + * - billingAccountLocation: billingAccounts/{billing_account}/locations/{location} + * - billingAccountLocationBucket: billingAccounts/{billing_account}/locations/{location}/buckets/{bucket} + * - billingAccountLocationBucketLink: billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link} + * - billingAccountLocationBucketView: billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view} + * - billingAccountSettings: billingAccounts/{billing_account}/settings + * - billingAccountSink: billingAccounts/{billing_account}/sinks/{sink} + * - cmekSettings: projects/{project}/cmekSettings + * - folder: folders/{folder} + * - folderCmekSettings: folders/{folder}/cmekSettings + * - folderExclusion: folders/{folder}/exclusions/{exclusion} + * - folderLocation: folders/{folder}/locations/{location} + * - folderLocationBucket: folders/{folder}/locations/{location}/buckets/{bucket} + * - folderLocationBucketLink: folders/{folder}/locations/{location}/buckets/{bucket}/links/{link} + * - folderLocationBucketView: folders/{folder}/locations/{location}/buckets/{bucket}/views/{view} + * - folderSettings: folders/{folder}/settings + * - folderSink: folders/{folder}/sinks/{sink} + * - link: projects/{project}/locations/{location}/buckets/{bucket}/links/{link} + * - location: projects/{project}/locations/{location} + * - logBucket: projects/{project}/locations/{location}/buckets/{bucket} + * - logExclusion: projects/{project}/exclusions/{exclusion} + * - logSink: projects/{project}/sinks/{sink} + * - logView: projects/{project}/locations/{location}/buckets/{bucket}/views/{view} + * - organization: organizations/{organization} + * - organizationCmekSettings: organizations/{organization}/cmekSettings + * - organizationExclusion: organizations/{organization}/exclusions/{exclusion} + * - organizationLocation: organizations/{organization}/locations/{location} + * - organizationLocationBucket: organizations/{organization}/locations/{location}/buckets/{bucket} + * - organizationLocationBucketLink: organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link} + * - organizationLocationBucketView: organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view} + * - organizationSettings: organizations/{organization}/settings + * - organizationSink: organizations/{organization}/sinks/{sink} + * - project: projects/{project} + * - projectCmekSettings: projects/{project}/cmekSettings + * - projectExclusion: projects/{project}/exclusions/{exclusion} + * - projectLocationBucket: projects/{project}/locations/{location}/buckets/{bucket} + * - projectLocationBucketLink: projects/{project}/locations/{location}/buckets/{bucket}/links/{link} + * - projectLocationBucketView: projects/{project}/locations/{location}/buckets/{bucket}/views/{view} + * - projectSettings: projects/{project}/settings + * - projectSink: projects/{project}/sinks/{sink} + * - settings: projects/{project}/settings + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'logging.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Logging\V2\ConfigServiceV2Client; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new ConfigServiceV2Client(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Copies a set of log entries from a log bucket to a Cloud Storage bucket. + * + * The async variant is {@see ConfigServiceV2Client::copyLogEntriesAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/copy_log_entries.php + * + * @param CopyLogEntriesRequest $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 copyLogEntries(CopyLogEntriesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CopyLogEntries', $request, $callOptions)->wait(); + } + + /** + * Creates a log bucket that can be used to store log entries. After a bucket + * has been created, the bucket's location cannot be changed. + * + * The async variant is {@see ConfigServiceV2Client::createBucketAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/create_bucket.php + * + * @param CreateBucketRequest $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 LogBucket + * + * @throws ApiException Thrown if the API call fails. + */ + public function createBucket(CreateBucketRequest $request, array $callOptions = []): LogBucket + { + return $this->startApiCall('CreateBucket', $request, $callOptions)->wait(); + } + + /** + * Creates a log bucket asynchronously that can be used to store log entries. + * + * After a bucket has been created, the bucket's location cannot be changed. + * + * The async variant is {@see ConfigServiceV2Client::createBucketAsyncAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/create_bucket_async.php + * + * @param CreateBucketRequest $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 createBucketAsync(CreateBucketRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateBucketAsync', $request, $callOptions)->wait(); + } + + /** + * Creates a new exclusion in the _Default sink in a specified parent + * resource. Only log entries belonging to that resource can be excluded. You + * can have up to 10 exclusions in a resource. + * + * The async variant is {@see ConfigServiceV2Client::createExclusionAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/create_exclusion.php + * + * @param CreateExclusionRequest $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 LogExclusion + * + * @throws ApiException Thrown if the API call fails. + */ + public function createExclusion(CreateExclusionRequest $request, array $callOptions = []): LogExclusion + { + return $this->startApiCall('CreateExclusion', $request, $callOptions)->wait(); + } + + /** + * Asynchronously creates a linked dataset in BigQuery which makes it possible + * to use BigQuery to read the logs stored in the log bucket. A log bucket may + * currently only contain one link. + * + * The async variant is {@see ConfigServiceV2Client::createLinkAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/create_link.php + * + * @param CreateLinkRequest $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 createLink(CreateLinkRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateLink', $request, $callOptions)->wait(); + } + + /** + * Creates a sink that exports specified log entries to a destination. The + * export of newly-ingested log entries begins immediately, unless the sink's + * `writer_identity` is not permitted to write to the destination. A sink can + * export log entries only from the resource owning the sink. + * + * The async variant is {@see ConfigServiceV2Client::createSinkAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/create_sink.php + * + * @param CreateSinkRequest $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 LogSink + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSink(CreateSinkRequest $request, array $callOptions = []): LogSink + { + return $this->startApiCall('CreateSink', $request, $callOptions)->wait(); + } + + /** + * Creates a view over log entries in a log bucket. A bucket may contain a + * maximum of 30 views. + * + * The async variant is {@see ConfigServiceV2Client::createViewAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/create_view.php + * + * @param CreateViewRequest $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 LogView + * + * @throws ApiException Thrown if the API call fails. + */ + public function createView(CreateViewRequest $request, array $callOptions = []): LogView + { + return $this->startApiCall('CreateView', $request, $callOptions)->wait(); + } + + /** + * Deletes a log bucket. + * + * Changes the bucket's `lifecycle_state` to the `DELETE_REQUESTED` state. + * After 7 days, the bucket will be purged and all log entries in the bucket + * will be permanently deleted. + * + * The async variant is {@see ConfigServiceV2Client::deleteBucketAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/delete_bucket.php + * + * @param DeleteBucketRequest $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 deleteBucket(DeleteBucketRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteBucket', $request, $callOptions)->wait(); + } + + /** + * Deletes an exclusion in the _Default sink. + * + * The async variant is {@see ConfigServiceV2Client::deleteExclusionAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/delete_exclusion.php + * + * @param DeleteExclusionRequest $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 deleteExclusion(DeleteExclusionRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteExclusion', $request, $callOptions)->wait(); + } + + /** + * Deletes a link. This will also delete the corresponding BigQuery linked + * dataset. + * + * The async variant is {@see ConfigServiceV2Client::deleteLinkAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/delete_link.php + * + * @param DeleteLinkRequest $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 deleteLink(DeleteLinkRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteLink', $request, $callOptions)->wait(); + } + + /** + * Deletes a sink. If the sink has a unique `writer_identity`, then that + * service account is also deleted. + * + * The async variant is {@see ConfigServiceV2Client::deleteSinkAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/delete_sink.php + * + * @param DeleteSinkRequest $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 deleteSink(DeleteSinkRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteSink', $request, $callOptions)->wait(); + } + + /** + * Deletes a view on a log bucket. + * If an `UNAVAILABLE` error is returned, this indicates that system is not in + * a state where it can delete the view. If this occurs, please try again in a + * few minutes. + * + * The async variant is {@see ConfigServiceV2Client::deleteViewAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/delete_view.php + * + * @param DeleteViewRequest $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 deleteView(DeleteViewRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteView', $request, $callOptions)->wait(); + } + + /** + * Gets a log bucket. + * + * The async variant is {@see ConfigServiceV2Client::getBucketAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/get_bucket.php + * + * @param GetBucketRequest $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 LogBucket + * + * @throws ApiException Thrown if the API call fails. + */ + public function getBucket(GetBucketRequest $request, array $callOptions = []): LogBucket + { + return $this->startApiCall('GetBucket', $request, $callOptions)->wait(); + } + + /** + * Gets the Logging CMEK settings for the given resource. + * + * Note: CMEK for the Log Router can be configured for Google Cloud projects, + * folders, organizations and billing accounts. Once configured for an + * organization, it applies to all projects and folders in the Google Cloud + * organization. + * + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * The async variant is {@see ConfigServiceV2Client::getCmekSettingsAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/get_cmek_settings.php + * + * @param GetCmekSettingsRequest $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 CmekSettings + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCmekSettings(GetCmekSettingsRequest $request, array $callOptions = []): CmekSettings + { + return $this->startApiCall('GetCmekSettings', $request, $callOptions)->wait(); + } + + /** + * Gets the description of an exclusion in the _Default sink. + * + * The async variant is {@see ConfigServiceV2Client::getExclusionAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/get_exclusion.php + * + * @param GetExclusionRequest $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 LogExclusion + * + * @throws ApiException Thrown if the API call fails. + */ + public function getExclusion(GetExclusionRequest $request, array $callOptions = []): LogExclusion + { + return $this->startApiCall('GetExclusion', $request, $callOptions)->wait(); + } + + /** + * Gets a link. + * + * The async variant is {@see ConfigServiceV2Client::getLinkAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/get_link.php + * + * @param GetLinkRequest $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 Link + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLink(GetLinkRequest $request, array $callOptions = []): Link + { + return $this->startApiCall('GetLink', $request, $callOptions)->wait(); + } + + /** + * Gets the Log Router settings for the given resource. + * + * Note: Settings for the Log Router can be get for Google Cloud projects, + * folders, organizations and billing accounts. Currently it can only be + * configured for organizations. Once configured for an organization, it + * applies to all projects and folders in the Google Cloud organization. + * + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * The async variant is {@see ConfigServiceV2Client::getSettingsAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/get_settings.php + * + * @param GetSettingsRequest $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 Settings + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSettings(GetSettingsRequest $request, array $callOptions = []): Settings + { + return $this->startApiCall('GetSettings', $request, $callOptions)->wait(); + } + + /** + * Gets a sink. + * + * The async variant is {@see ConfigServiceV2Client::getSinkAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/get_sink.php + * + * @param GetSinkRequest $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 LogSink + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSink(GetSinkRequest $request, array $callOptions = []): LogSink + { + return $this->startApiCall('GetSink', $request, $callOptions)->wait(); + } + + /** + * Gets a view on a log bucket.. + * + * The async variant is {@see ConfigServiceV2Client::getViewAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/get_view.php + * + * @param GetViewRequest $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 LogView + * + * @throws ApiException Thrown if the API call fails. + */ + public function getView(GetViewRequest $request, array $callOptions = []): LogView + { + return $this->startApiCall('GetView', $request, $callOptions)->wait(); + } + + /** + * Lists log buckets. + * + * The async variant is {@see ConfigServiceV2Client::listBucketsAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/list_buckets.php + * + * @param ListBucketsRequest $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 listBuckets(ListBucketsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListBuckets', $request, $callOptions); + } + + /** + * Lists all the exclusions on the _Default sink in a parent resource. + * + * The async variant is {@see ConfigServiceV2Client::listExclusionsAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/list_exclusions.php + * + * @param ListExclusionsRequest $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 listExclusions(ListExclusionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListExclusions', $request, $callOptions); + } + + /** + * Lists links. + * + * The async variant is {@see ConfigServiceV2Client::listLinksAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/list_links.php + * + * @param ListLinksRequest $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 listLinks(ListLinksRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLinks', $request, $callOptions); + } + + /** + * Lists sinks. + * + * The async variant is {@see ConfigServiceV2Client::listSinksAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/list_sinks.php + * + * @param ListSinksRequest $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 listSinks(ListSinksRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSinks', $request, $callOptions); + } + + /** + * Lists views on a log bucket. + * + * The async variant is {@see ConfigServiceV2Client::listViewsAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/list_views.php + * + * @param ListViewsRequest $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 listViews(ListViewsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListViews', $request, $callOptions); + } + + /** + * Undeletes a log bucket. A bucket that has been deleted can be undeleted + * within the grace period of 7 days. + * + * The async variant is {@see ConfigServiceV2Client::undeleteBucketAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/undelete_bucket.php + * + * @param UndeleteBucketRequest $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 undeleteBucket(UndeleteBucketRequest $request, array $callOptions = []): void + { + $this->startApiCall('UndeleteBucket', $request, $callOptions)->wait(); + } + + /** + * Updates a log bucket. + * + * If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then + * `FAILED_PRECONDITION` will be returned. + * + * After a bucket has been created, the bucket's location cannot be changed. + * + * The async variant is {@see ConfigServiceV2Client::updateBucketAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/update_bucket.php + * + * @param UpdateBucketRequest $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 LogBucket + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateBucket(UpdateBucketRequest $request, array $callOptions = []): LogBucket + { + return $this->startApiCall('UpdateBucket', $request, $callOptions)->wait(); + } + + /** + * Updates a log bucket asynchronously. + * + * If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then + * `FAILED_PRECONDITION` will be returned. + * + * After a bucket has been created, the bucket's location cannot be changed. + * + * The async variant is {@see ConfigServiceV2Client::updateBucketAsyncAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/update_bucket_async.php + * + * @param UpdateBucketRequest $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 updateBucketAsync(UpdateBucketRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateBucketAsync', $request, $callOptions)->wait(); + } + + /** + * Updates the Log Router CMEK settings for the given resource. + * + * Note: CMEK for the Log Router can currently only be configured for Google + * Cloud organizations. Once configured, it applies to all projects and + * folders in the Google Cloud organization. + * + * [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] + * will fail if 1) `kms_key_name` is invalid, or 2) the associated service + * account does not have the required + * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or + * 3) access to the key is disabled. + * + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * The async variant is {@see ConfigServiceV2Client::updateCmekSettingsAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/update_cmek_settings.php + * + * @param UpdateCmekSettingsRequest $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 CmekSettings + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateCmekSettings(UpdateCmekSettingsRequest $request, array $callOptions = []): CmekSettings + { + return $this->startApiCall('UpdateCmekSettings', $request, $callOptions)->wait(); + } + + /** + * Changes one or more properties of an existing exclusion in the _Default + * sink. + * + * The async variant is {@see ConfigServiceV2Client::updateExclusionAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/update_exclusion.php + * + * @param UpdateExclusionRequest $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 LogExclusion + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateExclusion(UpdateExclusionRequest $request, array $callOptions = []): LogExclusion + { + return $this->startApiCall('UpdateExclusion', $request, $callOptions)->wait(); + } + + /** + * Updates the Log Router settings for the given resource. + * + * Note: Settings for the Log Router can currently only be configured for + * Google Cloud organizations. Once configured, it applies to all projects and + * folders in the Google Cloud organization. + * + * [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] + * will fail if 1) `kms_key_name` is invalid, or 2) the associated service + * account does not have the required + * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or + * 3) access to the key is disabled. 4) `location_id` is not supported by + * Logging. 5) `location_id` violate OrgPolicy. + * + * See [Enabling CMEK for Log + * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) + * for more information. + * + * The async variant is {@see ConfigServiceV2Client::updateSettingsAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/update_settings.php + * + * @param UpdateSettingsRequest $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 Settings + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSettings(UpdateSettingsRequest $request, array $callOptions = []): Settings + { + return $this->startApiCall('UpdateSettings', $request, $callOptions)->wait(); + } + + /** + * Updates a sink. This method replaces the following fields in the existing + * sink with values from the new sink: `destination`, and `filter`. + * + * The updated sink might also have a new `writer_identity`; see the + * `unique_writer_identity` field. + * + * The async variant is {@see ConfigServiceV2Client::updateSinkAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/update_sink.php + * + * @param UpdateSinkRequest $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 LogSink + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSink(UpdateSinkRequest $request, array $callOptions = []): LogSink + { + return $this->startApiCall('UpdateSink', $request, $callOptions)->wait(); + } + + /** + * Updates a view on a log bucket. This method replaces the following fields + * in the existing view with values from the new view: `filter`. + * If an `UNAVAILABLE` error is returned, this indicates that system is not in + * a state where it can update the view. If this occurs, please try again in a + * few minutes. + * + * The async variant is {@see ConfigServiceV2Client::updateViewAsync()} . + * + * @example samples/V2/ConfigServiceV2Client/update_view.php + * + * @param UpdateViewRequest $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 LogView + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateView(UpdateViewRequest $request, array $callOptions = []): LogView + { + return $this->startApiCall('UpdateView', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Logging/v2/src/V2/Client/LoggingServiceV2Client.php b/owl-bot-staging/Logging/v2/src/V2/Client/LoggingServiceV2Client.php new file mode 100644 index 000000000000..c00f63c64088 --- /dev/null +++ b/owl-bot-staging/Logging/v2/src/V2/Client/LoggingServiceV2Client.php @@ -0,0 +1,541 @@ + deleteLogAsync(DeleteLogRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLogEntriesAsync(ListLogEntriesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLogsAsync(ListLogsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMonitoredResourceDescriptorsAsync(ListMonitoredResourceDescriptorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface writeLogEntriesAsync(WriteLogEntriesRequest $request, array $optionalArgs = []) + */ +final class LoggingServiceV2Client +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.logging.v2.LoggingServiceV2'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'logging.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'logging.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/logging.admin', + 'https://www.googleapis.com/auth/logging.read', + 'https://www.googleapis.com/auth/logging.write', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/logging_service_v2_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/logging_service_v2_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/logging_service_v2_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/logging_service_v2_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * billing_account resource. + * + * @param string $billingAccount + * + * @return string The formatted billing_account resource. + */ + public static function billingAccountName(string $billingAccount): string + { + return self::getPathTemplate('billingAccount')->render([ + 'billing_account' => $billingAccount, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * billing_account_log resource. + * + * @param string $billingAccount + * @param string $log + * + * @return string The formatted billing_account_log resource. + */ + public static function billingAccountLogName(string $billingAccount, string $log): string + { + return self::getPathTemplate('billingAccountLog')->render([ + 'billing_account' => $billingAccount, + 'log' => $log, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a folder + * resource. + * + * @param string $folder + * + * @return string The formatted folder resource. + */ + public static function folderName(string $folder): string + { + return self::getPathTemplate('folder')->render([ + 'folder' => $folder, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a folder_log + * resource. + * + * @param string $folder + * @param string $log + * + * @return string The formatted folder_log resource. + */ + public static function folderLogName(string $folder, string $log): string + { + return self::getPathTemplate('folderLog')->render([ + 'folder' => $folder, + 'log' => $log, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a log + * resource. + * + * @param string $project + * @param string $log + * + * @return string The formatted log resource. + */ + public static function logName(string $project, string $log): string + { + return self::getPathTemplate('log')->render([ + 'project' => $project, + 'log' => $log, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a organization + * resource. + * + * @param string $organization + * + * @return string The formatted organization resource. + */ + public static function organizationName(string $organization): string + { + return self::getPathTemplate('organization')->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_log resource. + * + * @param string $organization + * @param string $log + * + * @return string The formatted organization_log resource. + */ + public static function organizationLogName(string $organization, string $log): string + { + return self::getPathTemplate('organizationLog')->render([ + 'organization' => $organization, + 'log' => $log, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project_log + * resource. + * + * @param string $project + * @param string $log + * + * @return string The formatted project_log resource. + */ + public static function projectLogName(string $project, string $log): string + { + return self::getPathTemplate('projectLog')->render([ + 'project' => $project, + 'log' => $log, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - billingAccount: billingAccounts/{billing_account} + * - billingAccountLog: billingAccounts/{billing_account}/logs/{log} + * - folder: folders/{folder} + * - folderLog: folders/{folder}/logs/{log} + * - log: projects/{project}/logs/{log} + * - organization: organizations/{organization} + * - organizationLog: organizations/{organization}/logs/{log} + * - project: projects/{project} + * - projectLog: projects/{project}/logs/{log} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'logging.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Logging\V2\LoggingServiceV2Client; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new LoggingServiceV2Client(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Deletes all the log entries in a log for the _Default Log Bucket. The log + * reappears if it receives new entries. Log entries written shortly before + * the delete operation might not be deleted. Entries received after the + * delete operation with a timestamp before the operation will be deleted. + * + * The async variant is {@see LoggingServiceV2Client::deleteLogAsync()} . + * + * @example samples/V2/LoggingServiceV2Client/delete_log.php + * + * @param DeleteLogRequest $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 deleteLog(DeleteLogRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteLog', $request, $callOptions)->wait(); + } + + /** + * Lists log entries. Use this method to retrieve log entries that originated + * from a project/folder/organization/billing account. For ways to export log + * entries, see [Exporting + * Logs](https://cloud.google.com/logging/docs/export). + * + * The async variant is {@see LoggingServiceV2Client::listLogEntriesAsync()} . + * + * @example samples/V2/LoggingServiceV2Client/list_log_entries.php + * + * @param ListLogEntriesRequest $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 listLogEntries(ListLogEntriesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLogEntries', $request, $callOptions); + } + + /** + * Lists the logs in projects, organizations, folders, or billing accounts. + * Only logs that have entries are listed. + * + * The async variant is {@see LoggingServiceV2Client::listLogsAsync()} . + * + * @example samples/V2/LoggingServiceV2Client/list_logs.php + * + * @param ListLogsRequest $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 listLogs(ListLogsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLogs', $request, $callOptions); + } + + /** + * Lists the descriptors for monitored resource types used by Logging. + * + * The async variant is + * {@see LoggingServiceV2Client::listMonitoredResourceDescriptorsAsync()} . + * + * @example samples/V2/LoggingServiceV2Client/list_monitored_resource_descriptors.php + * + * @param ListMonitoredResourceDescriptorsRequest $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 listMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMonitoredResourceDescriptors', $request, $callOptions); + } + + /** + * Streaming read of log entries as they are ingested. Until the stream is + * terminated, it will continue reading logs. + * + * @example samples/V2/LoggingServiceV2Client/tail_log_entries.php + * + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return BidiStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function tailLogEntries(array $callOptions = []): BidiStream + { + return $this->startApiCall('TailLogEntries', null, $callOptions); + } + + /** + * Writes log entries to Logging. This API method is the + * only way to send log entries to Logging. This method + * is used, directly or indirectly, by the Logging agent + * (fluentd) and all logging libraries configured to use Logging. + * A single request may contain log entries for a maximum of 1000 + * different resources (projects, organizations, billing accounts or + * folders) + * + * The async variant is {@see LoggingServiceV2Client::writeLogEntriesAsync()} . + * + * @example samples/V2/LoggingServiceV2Client/write_log_entries.php + * + * @param WriteLogEntriesRequest $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 WriteLogEntriesResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function writeLogEntries(WriteLogEntriesRequest $request, array $callOptions = []): WriteLogEntriesResponse + { + return $this->startApiCall('WriteLogEntries', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Logging/v2/src/V2/Client/MetricsServiceV2Client.php b/owl-bot-staging/Logging/v2/src/V2/Client/MetricsServiceV2Client.php new file mode 100644 index 000000000000..e5c778579939 --- /dev/null +++ b/owl-bot-staging/Logging/v2/src/V2/Client/MetricsServiceV2Client.php @@ -0,0 +1,384 @@ + createLogMetricAsync(CreateLogMetricRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteLogMetricAsync(DeleteLogMetricRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLogMetricAsync(GetLogMetricRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLogMetricsAsync(ListLogMetricsRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateLogMetricAsync(UpdateLogMetricRequest $request, array $optionalArgs = []) + */ +final class MetricsServiceV2Client +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.logging.v2.MetricsServiceV2'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'logging.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'logging.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/cloud-platform.read-only', + 'https://www.googleapis.com/auth/logging.admin', + 'https://www.googleapis.com/auth/logging.read', + 'https://www.googleapis.com/auth/logging.write', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/metrics_service_v2_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/metrics_service_v2_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/metrics_service_v2_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/metrics_service_v2_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a log_metric + * resource. + * + * @param string $project + * @param string $metric + * + * @return string The formatted log_metric resource. + */ + public static function logMetricName(string $project, string $metric): string + { + return self::getPathTemplate('logMetric')->render([ + 'project' => $project, + 'metric' => $metric, + ]); + } + + /** + * 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 + * - logMetric: projects/{project}/metrics/{metric} + * - 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|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'logging.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Logging\V2\MetricsServiceV2Client; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new MetricsServiceV2Client(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a logs-based metric. + * + * The async variant is {@see MetricsServiceV2Client::createLogMetricAsync()} . + * + * @example samples/V2/MetricsServiceV2Client/create_log_metric.php + * + * @param CreateLogMetricRequest $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 LogMetric + * + * @throws ApiException Thrown if the API call fails. + */ + public function createLogMetric(CreateLogMetricRequest $request, array $callOptions = []): LogMetric + { + return $this->startApiCall('CreateLogMetric', $request, $callOptions)->wait(); + } + + /** + * Deletes a logs-based metric. + * + * The async variant is {@see MetricsServiceV2Client::deleteLogMetricAsync()} . + * + * @example samples/V2/MetricsServiceV2Client/delete_log_metric.php + * + * @param DeleteLogMetricRequest $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 deleteLogMetric(DeleteLogMetricRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteLogMetric', $request, $callOptions)->wait(); + } + + /** + * Gets a logs-based metric. + * + * The async variant is {@see MetricsServiceV2Client::getLogMetricAsync()} . + * + * @example samples/V2/MetricsServiceV2Client/get_log_metric.php + * + * @param GetLogMetricRequest $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 LogMetric + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLogMetric(GetLogMetricRequest $request, array $callOptions = []): LogMetric + { + return $this->startApiCall('GetLogMetric', $request, $callOptions)->wait(); + } + + /** + * Lists logs-based metrics. + * + * The async variant is {@see MetricsServiceV2Client::listLogMetricsAsync()} . + * + * @example samples/V2/MetricsServiceV2Client/list_log_metrics.php + * + * @param ListLogMetricsRequest $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 listLogMetrics(ListLogMetricsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLogMetrics', $request, $callOptions); + } + + /** + * Creates or updates a logs-based metric. + * + * The async variant is {@see MetricsServiceV2Client::updateLogMetricAsync()} . + * + * @example samples/V2/MetricsServiceV2Client/update_log_metric.php + * + * @param UpdateLogMetricRequest $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 LogMetric + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateLogMetric(UpdateLogMetricRequest $request, array $callOptions = []): LogMetric + { + return $this->startApiCall('UpdateLogMetric', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Logging/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Logging/v2/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..30328b652386 --- /dev/null +++ b/owl-bot-staging/Logging/v2/src/V2/gapic_metadata.json @@ -0,0 +1,251 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.logging.v2", + "libraryPackage": "Google\\Cloud\\Logging\\V2", + "services": { + "LoggingServiceV2": { + "clients": { + "grpc": { + "libraryClient": "LoggingServiceV2GapicClient", + "rpcs": { + "DeleteLog": { + "methods": [ + "deleteLog" + ] + }, + "ListLogEntries": { + "methods": [ + "listLogEntries" + ] + }, + "ListLogs": { + "methods": [ + "listLogs" + ] + }, + "ListMonitoredResourceDescriptors": { + "methods": [ + "listMonitoredResourceDescriptors" + ] + }, + "TailLogEntries": { + "methods": [ + "tailLogEntries" + ] + }, + "WriteLogEntries": { + "methods": [ + "writeLogEntries" + ] + } + } + } + } + }, + "ConfigServiceV2": { + "clients": { + "grpc": { + "libraryClient": "ConfigServiceV2GapicClient", + "rpcs": { + "CopyLogEntries": { + "methods": [ + "copyLogEntries" + ] + }, + "CreateBucket": { + "methods": [ + "createBucket" + ] + }, + "CreateBucketAsync": { + "methods": [ + "createBucketAsync" + ] + }, + "CreateExclusion": { + "methods": [ + "createExclusion" + ] + }, + "CreateLink": { + "methods": [ + "createLink" + ] + }, + "CreateSink": { + "methods": [ + "createSink" + ] + }, + "CreateView": { + "methods": [ + "createView" + ] + }, + "DeleteBucket": { + "methods": [ + "deleteBucket" + ] + }, + "DeleteExclusion": { + "methods": [ + "deleteExclusion" + ] + }, + "DeleteLink": { + "methods": [ + "deleteLink" + ] + }, + "DeleteSink": { + "methods": [ + "deleteSink" + ] + }, + "DeleteView": { + "methods": [ + "deleteView" + ] + }, + "GetBucket": { + "methods": [ + "getBucket" + ] + }, + "GetCmekSettings": { + "methods": [ + "getCmekSettings" + ] + }, + "GetExclusion": { + "methods": [ + "getExclusion" + ] + }, + "GetLink": { + "methods": [ + "getLink" + ] + }, + "GetSettings": { + "methods": [ + "getSettings" + ] + }, + "GetSink": { + "methods": [ + "getSink" + ] + }, + "GetView": { + "methods": [ + "getView" + ] + }, + "ListBuckets": { + "methods": [ + "listBuckets" + ] + }, + "ListExclusions": { + "methods": [ + "listExclusions" + ] + }, + "ListLinks": { + "methods": [ + "listLinks" + ] + }, + "ListSinks": { + "methods": [ + "listSinks" + ] + }, + "ListViews": { + "methods": [ + "listViews" + ] + }, + "UndeleteBucket": { + "methods": [ + "undeleteBucket" + ] + }, + "UpdateBucket": { + "methods": [ + "updateBucket" + ] + }, + "UpdateBucketAsync": { + "methods": [ + "updateBucketAsync" + ] + }, + "UpdateCmekSettings": { + "methods": [ + "updateCmekSettings" + ] + }, + "UpdateExclusion": { + "methods": [ + "updateExclusion" + ] + }, + "UpdateSettings": { + "methods": [ + "updateSettings" + ] + }, + "UpdateSink": { + "methods": [ + "updateSink" + ] + }, + "UpdateView": { + "methods": [ + "updateView" + ] + } + } + } + } + }, + "MetricsServiceV2": { + "clients": { + "grpc": { + "libraryClient": "MetricsServiceV2GapicClient", + "rpcs": { + "CreateLogMetric": { + "methods": [ + "createLogMetric" + ] + }, + "DeleteLogMetric": { + "methods": [ + "deleteLogMetric" + ] + }, + "GetLogMetric": { + "methods": [ + "getLogMetric" + ] + }, + "ListLogMetrics": { + "methods": [ + "listLogMetrics" + ] + }, + "UpdateLogMetric": { + "methods": [ + "updateLogMetric" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_client_config.json b/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_client_config.json new file mode 100644 index 000000000000..02c54aca2baf --- /dev/null +++ b/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_client_config.json @@ -0,0 +1,206 @@ +{ + "interfaces": { + "google.logging.v2.ConfigServiceV2": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_3_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE" + ], + "no_retry_2_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_3_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_2_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 120000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 120000, + "total_timeout_millis": 120000 + } + }, + "methods": { + "CopyLogEntries": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateBucket": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateBucketAsync": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateExclusion": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreateLink": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateSink": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "CreateView": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteBucket": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteExclusion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "DeleteLink": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteSink": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "DeleteView": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetBucket": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetCmekSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetExclusion": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "GetLink": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetSink": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "GetView": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListBuckets": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListExclusions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListLinks": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListSinks": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "ListViews": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UndeleteBucket": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateBucket": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateBucketAsync": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateCmekSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateExclusion": { + "timeout_millis": 120000, + "retry_codes_name": "no_retry_2_codes", + "retry_params_name": "no_retry_2_params" + }, + "UpdateSettings": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateSink": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_3_codes", + "retry_params_name": "retry_policy_3_params" + }, + "UpdateView": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_descriptor_config.php b/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_descriptor_config.php new file mode 100644 index 000000000000..b7ee554eb744 --- /dev/null +++ b/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_descriptor_config.php @@ -0,0 +1,524 @@ + [ + 'google.logging.v2.ConfigServiceV2' => [ + 'CopyLogEntries' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Logging\V2\CopyLogEntriesResponse', + 'metadataReturnType' => '\Google\Cloud\Logging\V2\CopyLogEntriesMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + ], + 'CreateBucketAsync' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Logging\V2\LogBucket', + 'metadataReturnType' => '\Google\Cloud\Logging\V2\BucketMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateLink' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Logging\V2\Link', + 'metadataReturnType' => '\Google\Cloud\Logging\V2\LinkMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteLink' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\Logging\V2\LinkMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateBucketAsync' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\Logging\V2\LogBucket', + 'metadataReturnType' => '\Google\Cloud\Logging\V2\BucketMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateBucket' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\LogBucket', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateExclusion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\LogExclusion', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSink' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\LogSink', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateView' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\LogView', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteBucket' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteExclusion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSink' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'sink_name', + 'fieldAccessors' => [ + 'getSinkName', + ], + ], + ], + ], + 'DeleteView' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetBucket' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\LogBucket', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCmekSettings' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\CmekSettings', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetExclusion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\LogExclusion', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetLink' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\Link', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSettings' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\Settings', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSink' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\LogSink', + 'headerParams' => [ + [ + 'keyName' => 'sink_name', + 'fieldAccessors' => [ + 'getSinkName', + ], + ], + ], + ], + 'GetView' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\LogView', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListBuckets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getBuckets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\ListBucketsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListExclusions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getExclusions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\ListExclusionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListLinks' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLinks', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\ListLinksResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSinks' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSinks', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\ListSinksResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListViews' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getViews', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\ListViewsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UndeleteBucket' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateBucket' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\LogBucket', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateCmekSettings' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\CmekSettings', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateExclusion' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\LogExclusion', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateSettings' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\Settings', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateSink' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\LogSink', + 'headerParams' => [ + [ + 'keyName' => 'sink_name', + 'fieldAccessors' => [ + 'getSinkName', + ], + ], + ], + ], + 'UpdateView' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\LogView', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'billingAccount' => 'billingAccounts/{billing_account}', + 'billingAccountCmekSettings' => 'billingAccounts/{billing_account}/cmekSettings', + 'billingAccountExclusion' => 'billingAccounts/{billing_account}/exclusions/{exclusion}', + 'billingAccountLocation' => 'billingAccounts/{billing_account}/locations/{location}', + 'billingAccountLocationBucket' => 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}', + 'billingAccountLocationBucketLink' => 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link}', + 'billingAccountLocationBucketView' => 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}', + 'billingAccountSettings' => 'billingAccounts/{billing_account}/settings', + 'billingAccountSink' => 'billingAccounts/{billing_account}/sinks/{sink}', + 'cmekSettings' => 'projects/{project}/cmekSettings', + 'folder' => 'folders/{folder}', + 'folderCmekSettings' => 'folders/{folder}/cmekSettings', + 'folderExclusion' => 'folders/{folder}/exclusions/{exclusion}', + 'folderLocation' => 'folders/{folder}/locations/{location}', + 'folderLocationBucket' => 'folders/{folder}/locations/{location}/buckets/{bucket}', + 'folderLocationBucketLink' => 'folders/{folder}/locations/{location}/buckets/{bucket}/links/{link}', + 'folderLocationBucketView' => 'folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}', + 'folderSettings' => 'folders/{folder}/settings', + 'folderSink' => 'folders/{folder}/sinks/{sink}', + 'link' => 'projects/{project}/locations/{location}/buckets/{bucket}/links/{link}', + 'location' => 'projects/{project}/locations/{location}', + 'logBucket' => 'projects/{project}/locations/{location}/buckets/{bucket}', + 'logExclusion' => 'projects/{project}/exclusions/{exclusion}', + 'logSink' => 'projects/{project}/sinks/{sink}', + 'logView' => 'projects/{project}/locations/{location}/buckets/{bucket}/views/{view}', + 'organization' => 'organizations/{organization}', + 'organizationCmekSettings' => 'organizations/{organization}/cmekSettings', + 'organizationExclusion' => 'organizations/{organization}/exclusions/{exclusion}', + 'organizationLocation' => 'organizations/{organization}/locations/{location}', + 'organizationLocationBucket' => 'organizations/{organization}/locations/{location}/buckets/{bucket}', + 'organizationLocationBucketLink' => 'organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}', + 'organizationLocationBucketView' => 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}', + 'organizationSettings' => 'organizations/{organization}/settings', + 'organizationSink' => 'organizations/{organization}/sinks/{sink}', + 'project' => 'projects/{project}', + 'projectCmekSettings' => 'projects/{project}/cmekSettings', + 'projectExclusion' => 'projects/{project}/exclusions/{exclusion}', + 'projectLocationBucket' => 'projects/{project}/locations/{location}/buckets/{bucket}', + 'projectLocationBucketLink' => 'projects/{project}/locations/{location}/buckets/{bucket}/links/{link}', + 'projectLocationBucketView' => 'projects/{project}/locations/{location}/buckets/{bucket}/views/{view}', + 'projectSettings' => 'projects/{project}/settings', + 'projectSink' => 'projects/{project}/sinks/{sink}', + 'settings' => 'projects/{project}/settings', + ], + ], + ], +]; diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_rest_client_config.php b/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_rest_client_config.php new file mode 100644 index 000000000000..41d00fa56dae --- /dev/null +++ b/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_rest_client_config.php @@ -0,0 +1,1167 @@ + [ + 'google.logging.v2.ConfigServiceV2' => [ + 'CopyLogEntries' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/entries:copy', + 'body' => '*', + ], + 'CreateBucket' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=*/*/locations/*}/buckets', + 'body' => 'bucket', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/buckets', + 'body' => 'bucket', + 'queryParams' => [ + 'bucket_id', + ], + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=organizations/*/locations/*}/buckets', + 'body' => 'bucket', + 'queryParams' => [ + 'bucket_id', + ], + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=folders/*/locations/*}/buckets', + 'body' => 'bucket', + 'queryParams' => [ + 'bucket_id', + ], + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*}/buckets', + 'body' => 'bucket', + 'queryParams' => [ + 'bucket_id', + ], + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'bucket_id', + ], + ], + 'CreateBucketAsync' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=*/*/locations/*}/buckets:createAsync', + 'body' => 'bucket', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/buckets:createAsync', + 'body' => 'bucket', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=organizations/*/locations/*}/buckets:createAsync', + 'body' => 'bucket', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=folders/*/locations/*}/buckets:createAsync', + 'body' => 'bucket', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*}/buckets:createAsync', + 'body' => 'bucket', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateExclusion' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=*/*}/exclusions', + 'body' => 'exclusion', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*}/exclusions', + 'body' => 'exclusion', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=organizations/*}/exclusions', + 'body' => 'exclusion', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=folders/*}/exclusions', + 'body' => 'exclusion', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=billingAccounts/*}/exclusions', + 'body' => 'exclusion', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateLink' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=*/*/locations/*/buckets/*}/links', + 'body' => 'link', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/buckets/*}/links', + 'body' => 'link', + 'queryParams' => [ + 'link_id', + ], + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=organizations/*/locations/*/buckets/*}/links', + 'body' => 'link', + 'queryParams' => [ + 'link_id', + ], + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=folders/*/locations/*/buckets/*}/links', + 'body' => 'link', + 'queryParams' => [ + 'link_id', + ], + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*/buckets/*}/links', + 'body' => 'link', + 'queryParams' => [ + 'link_id', + ], + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'link_id', + ], + ], + 'CreateSink' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=*/*}/sinks', + 'body' => 'sink', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*}/sinks', + 'body' => 'sink', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=organizations/*}/sinks', + 'body' => 'sink', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=folders/*}/sinks', + 'body' => 'sink', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=billingAccounts/*}/sinks', + 'body' => 'sink', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateView' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=*/*/locations/*/buckets/*}/views', + 'body' => 'view', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/buckets/*}/views', + 'body' => 'view', + 'queryParams' => [ + 'view_id', + ], + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=organizations/*/locations/*/buckets/*}/views', + 'body' => 'view', + 'queryParams' => [ + 'view_id', + ], + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=folders/*/locations/*/buckets/*}/views', + 'body' => 'view', + 'queryParams' => [ + 'view_id', + ], + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views', + 'body' => 'view', + 'queryParams' => [ + 'view_id', + ], + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'view_id', + ], + ], + 'DeleteBucket' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteExclusion' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=*/*/exclusions/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/exclusions/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=organizations/*/exclusions/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=folders/*/exclusions/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=billingAccounts/*/exclusions/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteLink' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*/links/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*/links/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*/links/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*/links/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*/links/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSink' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{sink_name=*/*/sinks/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{sink_name=projects/*/sinks/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{sink_name=organizations/*/sinks/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{sink_name=folders/*/sinks/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{sink_name=billingAccounts/*/sinks/*}', + ], + ], + 'placeholders' => [ + 'sink_name' => [ + 'getters' => [ + 'getSinkName', + ], + ], + ], + ], + 'DeleteView' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*/views/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*/views/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*/views/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*/views/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetBucket' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCmekSettings' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=*/*}/cmekSettings', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/cmekSettings', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*}/cmekSettings', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=folders/*}/cmekSettings', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=billingAccounts/*}/cmekSettings', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetExclusion' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=*/*/exclusions/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/exclusions/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*/exclusions/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=folders/*/exclusions/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=billingAccounts/*/exclusions/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetLink' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*/links/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*/links/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*/links/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*/links/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*/links/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSettings' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=*/*}/settings', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*}/settings', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*}/settings', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=folders/*}/settings', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=billingAccounts/*}/settings', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSink' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{sink_name=*/*/sinks/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{sink_name=projects/*/sinks/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{sink_name=organizations/*/sinks/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{sink_name=folders/*/sinks/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{sink_name=billingAccounts/*/sinks/*}', + ], + ], + 'placeholders' => [ + 'sink_name' => [ + 'getters' => [ + 'getSinkName', + ], + ], + ], + ], + 'GetView' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*/views/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*/views/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*/views/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*/views/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListBuckets' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=*/*/locations/*}/buckets', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/buckets', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*/locations/*}/buckets', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=folders/*/locations/*}/buckets', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*}/buckets', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListExclusions' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=*/*}/exclusions', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/exclusions', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*}/exclusions', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=folders/*}/exclusions', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=billingAccounts/*}/exclusions', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListLinks' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=*/*/locations/*/buckets/*}/links', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/buckets/*}/links', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*/locations/*/buckets/*}/links', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=folders/*/locations/*/buckets/*}/links', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*/buckets/*}/links', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSinks' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=*/*}/sinks', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/sinks', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*}/sinks', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=folders/*}/sinks', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=billingAccounts/*}/sinks', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListViews' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=*/*/locations/*/buckets/*}/views', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/buckets/*}/views', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*/locations/*/buckets/*}/views', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=folders/*/locations/*/buckets/*}/views', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UndeleteBucket' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*}:undelete', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*}:undelete', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*}:undelete', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*}:undelete', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*}:undelete', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateBucket' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*}', + 'body' => 'bucket', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*}', + 'body' => 'bucket', + 'queryParams' => [ + 'update_mask', + ], + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*}', + 'body' => 'bucket', + 'queryParams' => [ + 'update_mask', + ], + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*}', + 'body' => 'bucket', + 'queryParams' => [ + 'update_mask', + ], + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*}', + 'body' => 'bucket', + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateBucketAsync' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*}:updateAsync', + 'body' => 'bucket', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*}:updateAsync', + 'body' => 'bucket', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*}:updateAsync', + 'body' => 'bucket', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*}:updateAsync', + 'body' => 'bucket', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*}:updateAsync', + 'body' => 'bucket', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateCmekSettings' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=*/*}/cmekSettings', + 'body' => 'cmek_settings', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=organizations/*}/cmekSettings', + 'body' => 'cmek_settings', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateExclusion' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=*/*/exclusions/*}', + 'body' => 'exclusion', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=projects/*/exclusions/*}', + 'body' => 'exclusion', + 'queryParams' => [ + 'update_mask', + ], + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=organizations/*/exclusions/*}', + 'body' => 'exclusion', + 'queryParams' => [ + 'update_mask', + ], + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=folders/*/exclusions/*}', + 'body' => 'exclusion', + 'queryParams' => [ + 'update_mask', + ], + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=billingAccounts/*/exclusions/*}', + 'body' => 'exclusion', + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateSettings' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=*/*}/settings', + 'body' => 'settings', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=organizations/*}/settings', + 'body' => 'settings', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=folders/*}/settings', + 'body' => 'settings', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateSink' => [ + 'method' => 'put', + 'uriTemplate' => '/v2/{sink_name=*/*/sinks/*}', + 'body' => 'sink', + 'additionalBindings' => [ + [ + 'method' => 'put', + 'uriTemplate' => '/v2/{sink_name=projects/*/sinks/*}', + 'body' => 'sink', + ], + [ + 'method' => 'put', + 'uriTemplate' => '/v2/{sink_name=organizations/*/sinks/*}', + 'body' => 'sink', + ], + [ + 'method' => 'put', + 'uriTemplate' => '/v2/{sink_name=folders/*/sinks/*}', + 'body' => 'sink', + ], + [ + 'method' => 'put', + 'uriTemplate' => '/v2/{sink_name=billingAccounts/*/sinks/*}', + 'body' => 'sink', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{sink_name=projects/*/sinks/*}', + 'body' => 'sink', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{sink_name=organizations/*/sinks/*}', + 'body' => 'sink', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{sink_name=folders/*/sinks/*}', + 'body' => 'sink', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{sink_name=billingAccounts/*/sinks/*}', + 'body' => 'sink', + ], + ], + 'placeholders' => [ + 'sink_name' => [ + 'getters' => [ + 'getSinkName', + ], + ], + ], + ], + 'UpdateView' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*/views/*}', + 'body' => 'view', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*/views/*}', + 'body' => 'view', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*/views/*}', + 'body' => 'view', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*/views/*}', + 'body' => 'view', + ], + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}', + 'body' => 'view', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=*/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=folders/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=*/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=folders/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=*/*/locations/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=folders/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_client_config.json b/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_client_config.json new file mode 100644 index 000000000000..f5ac1a4d058e --- /dev/null +++ b/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_client_config.json @@ -0,0 +1,83 @@ +{ + "interfaces": { + "google.logging.v2.LoggingServiceV2": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE" + ], + "retry_policy_2_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 3600000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 3600000, + "total_timeout_millis": 3600000 + } + }, + "methods": { + "DeleteLog": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLogEntries": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLogs": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListMonitoredResourceDescriptors": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "TailLogEntries": { + "timeout_millis": 3600000 + }, + "WriteLogEntries": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params", + "bundling": { + "delay_threshold_millis": 50, + "element_count_threshold": 1000, + "request_byte_threshold": 1048576 + } + } + } + } + } +} diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_descriptor_config.php b/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_descriptor_config.php new file mode 100644 index 000000000000..3485fda7ca1d --- /dev/null +++ b/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_descriptor_config.php @@ -0,0 +1,106 @@ + [ + 'google.logging.v2.LoggingServiceV2' => [ + 'DeleteLog' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'log_name', + 'fieldAccessors' => [ + 'getLogName', + ], + ], + ], + ], + 'ListLogEntries' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEntries', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\ListLogEntriesResponse', + ], + 'ListLogs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLogNames', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\ListLogsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListMonitoredResourceDescriptors' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getResourceDescriptors', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\ListMonitoredResourceDescriptorsResponse', + ], + 'TailLogEntries' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'BidiStreaming', + ], + 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\TailLogEntriesResponse', + ], + 'WriteLogEntries' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\WriteLogEntriesResponse', + ], + 'templateMap' => [ + 'billingAccount' => 'billingAccounts/{billing_account}', + 'billingAccountLog' => 'billingAccounts/{billing_account}/logs/{log}', + 'folder' => 'folders/{folder}', + 'folderLog' => 'folders/{folder}/logs/{log}', + 'log' => 'projects/{project}/logs/{log}', + 'organization' => 'organizations/{organization}', + 'organizationLog' => 'organizations/{organization}/logs/{log}', + 'project' => 'projects/{project}', + 'projectLog' => 'projects/{project}/logs/{log}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_rest_client_config.php b/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_rest_client_config.php new file mode 100644 index 000000000000..49f3db704496 --- /dev/null +++ b/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_rest_client_config.php @@ -0,0 +1,211 @@ + [ + 'google.logging.v2.LoggingServiceV2' => [ + 'DeleteLog' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{log_name=projects/*/logs/*}', + 'additionalBindings' => [ + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{log_name=*/*/logs/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{log_name=organizations/*/logs/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{log_name=folders/*/logs/*}', + ], + [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{log_name=billingAccounts/*/logs/*}', + ], + ], + 'placeholders' => [ + 'log_name' => [ + 'getters' => [ + 'getLogName', + ], + ], + ], + ], + 'ListLogEntries' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/entries:list', + 'body' => '*', + ], + 'ListLogs' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=*/*}/logs', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/logs', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*}/logs', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=folders/*}/logs', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=billingAccounts/*}/logs', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/locations/*/buckets/*/views/*}/logs', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*/locations/*/buckets/*/views/*}/logs', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=folders/*/locations/*/buckets/*/views/*}/logs', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*/buckets/*/views/*}/logs', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListMonitoredResourceDescriptors' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/monitoredResourceDescriptors', + ], + 'WriteLogEntries' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/entries:write', + 'body' => '*', + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=*/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=folders/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=*/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=folders/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=*/*/locations/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=folders/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_client_config.json b/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_client_config.json new file mode 100644 index 000000000000..8d1153764e81 --- /dev/null +++ b/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_client_config.json @@ -0,0 +1,71 @@ +{ + "interfaces": { + "google.logging.v2.MetricsServiceV2": { + "retry_codes": { + "no_retry_codes": [], + "no_retry_1_codes": [], + "retry_policy_4_codes": [ + "DEADLINE_EXCEEDED", + "INTERNAL", + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_4_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateLogMetric": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "DeleteLogMetric": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "GetLogMetric": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "ListLogMetrics": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + }, + "UpdateLogMetric": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_4_codes", + "retry_params_name": "retry_policy_4_params" + } + } + } + } +} diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_descriptor_config.php b/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_descriptor_config.php new file mode 100644 index 000000000000..2c1bf2125fca --- /dev/null +++ b/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_descriptor_config.php @@ -0,0 +1,100 @@ + [ + 'google.logging.v2.MetricsServiceV2' => [ + 'CreateLogMetric' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\LogMetric', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteLogMetric' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'metric_name', + 'fieldAccessors' => [ + 'getMetricName', + ], + ], + ], + ], + 'GetLogMetric' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\LogMetric', + 'headerParams' => [ + [ + 'keyName' => 'metric_name', + 'fieldAccessors' => [ + 'getMetricName', + ], + ], + ], + ], + 'ListLogMetrics' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMetrics', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\ListLogMetricsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateLogMetric' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Logging\V2\LogMetric', + 'headerParams' => [ + [ + 'keyName' => 'metric_name', + 'fieldAccessors' => [ + 'getMetricName', + ], + ], + ], + ], + 'templateMap' => [ + 'logMetric' => 'projects/{project}/metrics/{metric}', + 'project' => 'projects/{project}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_rest_client_config.php b/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_rest_client_config.php new file mode 100644 index 000000000000..195a52fc6a8d --- /dev/null +++ b/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_rest_client_config.php @@ -0,0 +1,180 @@ + [ + 'google.logging.v2.MetricsServiceV2' => [ + 'CreateLogMetric' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*}/metrics', + 'body' => 'metric', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteLogMetric' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{metric_name=projects/*/metrics/*}', + 'placeholders' => [ + 'metric_name' => [ + 'getters' => [ + 'getMetricName', + ], + ], + ], + ], + 'GetLogMetric' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{metric_name=projects/*/metrics/*}', + 'placeholders' => [ + 'metric_name' => [ + 'getters' => [ + 'getMetricName', + ], + ], + ], + ], + 'ListLogMetrics' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/metrics', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateLogMetric' => [ + 'method' => 'put', + 'uriTemplate' => '/v2/{metric_name=projects/*/metrics/*}', + 'body' => 'metric', + 'placeholders' => [ + 'metric_name' => [ + 'getters' => [ + 'getMetricName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=*/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=folders/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/operations/*}:cancel', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=*/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=folders/*/locations/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=*/*/locations/*}/operations', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=folders/*/locations/*}/operations', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*}/operations', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/ConfigServiceV2ClientTest.php b/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/ConfigServiceV2ClientTest.php new file mode 100644 index 000000000000..a4e0a05ccf7b --- /dev/null +++ b/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/ConfigServiceV2ClientTest.php @@ -0,0 +1,2819 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ConfigServiceV2Client */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ConfigServiceV2Client($options); + } + + /** @test */ + public function copyLogEntriesTest() + { + $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/copyLogEntriesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $logEntriesCopiedCount = 2134326978; + $expectedResponse = new CopyLogEntriesResponse(); + $expectedResponse->setLogEntriesCopiedCount($logEntriesCopiedCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/copyLogEntriesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $destination = 'destination-1429847026'; + $request = (new CopyLogEntriesRequest()) + ->setName($name) + ->setDestination($destination); + $response = $gapicClient->copyLogEntries($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.logging.v2.ConfigServiceV2/CopyLogEntries', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualApiRequestObject->getDestination(); + $this->assertProtobufEquals($destination, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/copyLogEntriesTest'); + $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 copyLogEntriesExceptionTest() + { + $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/copyLogEntriesTest'); + $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'; + $destination = 'destination-1429847026'; + $request = (new CopyLogEntriesRequest()) + ->setName($name) + ->setDestination($destination); + $response = $gapicClient->copyLogEntries($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/copyLogEntriesTest'); + 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 createBucketTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $retentionDays = 1544391896; + $locked = true; + $analyticsEnabled = true; + $expectedResponse = new LogBucket(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setRetentionDays($retentionDays); + $expectedResponse->setLocked($locked); + $expectedResponse->setAnalyticsEnabled($analyticsEnabled); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $bucketId = 'bucketId1837164432'; + $bucket = new LogBucket(); + $request = (new CreateBucketRequest()) + ->setParent($formattedParent) + ->setBucketId($bucketId) + ->setBucket($bucket); + $response = $gapicClient->createBucket($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/CreateBucket', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getBucketId(); + $this->assertProtobufEquals($bucketId, $actualValue); + $actualValue = $actualRequestObject->getBucket(); + $this->assertProtobufEquals($bucket, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createBucketExceptionTest() + { + $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $bucketId = 'bucketId1837164432'; + $bucket = new LogBucket(); + $request = (new CreateBucketRequest()) + ->setParent($formattedParent) + ->setBucketId($bucketId) + ->setBucket($bucket); + try { + $gapicClient->createBucket($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 createBucketAsyncTest() + { + $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/createBucketAsyncTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $retentionDays = 1544391896; + $locked = true; + $analyticsEnabled = true; + $expectedResponse = new LogBucket(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setRetentionDays($retentionDays); + $expectedResponse->setLocked($locked); + $expectedResponse->setAnalyticsEnabled($analyticsEnabled); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createBucketAsyncTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $bucketId = 'bucketId1837164432'; + $bucket = new LogBucket(); + $request = (new CreateBucketRequest()) + ->setParent($formattedParent) + ->setBucketId($bucketId) + ->setBucket($bucket); + $response = $gapicClient->createBucketAsync($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.logging.v2.ConfigServiceV2/CreateBucketAsync', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getBucketId(); + $this->assertProtobufEquals($bucketId, $actualValue); + $actualValue = $actualApiRequestObject->getBucket(); + $this->assertProtobufEquals($bucket, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBucketAsyncTest'); + $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 createBucketAsyncExceptionTest() + { + $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/createBucketAsyncTest'); + $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $bucketId = 'bucketId1837164432'; + $bucket = new LogBucket(); + $request = (new CreateBucketRequest()) + ->setParent($formattedParent) + ->setBucketId($bucketId) + ->setBucket($bucket); + $response = $gapicClient->createBucketAsync($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createBucketAsyncTest'); + 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 createExclusionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $filter = 'filter-1274492040'; + $disabled = true; + $expectedResponse = new LogExclusion(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setFilter($filter); + $expectedResponse->setDisabled($disabled); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $exclusion = new LogExclusion(); + $exclusionName = 'exclusionName1004344697'; + $exclusion->setName($exclusionName); + $exclusionFilter = 'exclusionFilter-1414044954'; + $exclusion->setFilter($exclusionFilter); + $request = (new CreateExclusionRequest()) + ->setParent($formattedParent) + ->setExclusion($exclusion); + $response = $gapicClient->createExclusion($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/CreateExclusion', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getExclusion(); + $this->assertProtobufEquals($exclusion, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createExclusionExceptionTest() + { + $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]'); + $exclusion = new LogExclusion(); + $exclusionName = 'exclusionName1004344697'; + $exclusion->setName($exclusionName); + $exclusionFilter = 'exclusionFilter-1414044954'; + $exclusion->setFilter($exclusionFilter); + $request = (new CreateExclusionRequest()) + ->setParent($formattedParent) + ->setExclusion($exclusion); + try { + $gapicClient->createExclusion($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 createLinkTest() + { + $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/createLinkTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $description = 'description-1724546052'; + $expectedResponse = new Link(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createLinkTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + $link = new Link(); + $linkId = 'linkId177080192'; + $request = (new CreateLinkRequest()) + ->setParent($formattedParent) + ->setLink($link) + ->setLinkId($linkId); + $response = $gapicClient->createLink($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.logging.v2.ConfigServiceV2/CreateLink', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getLink(); + $this->assertProtobufEquals($link, $actualValue); + $actualValue = $actualApiRequestObject->getLinkId(); + $this->assertProtobufEquals($linkId, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createLinkTest'); + $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 createLinkExceptionTest() + { + $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/createLinkTest'); + $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + $link = new Link(); + $linkId = 'linkId177080192'; + $request = (new CreateLinkRequest()) + ->setParent($formattedParent) + ->setLink($link) + ->setLinkId($linkId); + $response = $gapicClient->createLink($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createLinkTest'); + 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 createSinkTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $destination = 'destination-1429847026'; + $filter = 'filter-1274492040'; + $description = 'description-1724546052'; + $disabled = true; + $writerIdentity = 'writerIdentity775638794'; + $includeChildren = true; + $expectedResponse = new LogSink(); + $expectedResponse->setName($name); + $expectedResponse->setDestination($destination); + $expectedResponse->setFilter($filter); + $expectedResponse->setDescription($description); + $expectedResponse->setDisabled($disabled); + $expectedResponse->setWriterIdentity($writerIdentity); + $expectedResponse->setIncludeChildren($includeChildren); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $sink = new LogSink(); + $sinkName = 'sinkName508775358'; + $sink->setName($sinkName); + $sinkDestination = 'sinkDestination-1018870917'; + $sink->setDestination($sinkDestination); + $request = (new CreateSinkRequest()) + ->setParent($formattedParent) + ->setSink($sink); + $response = $gapicClient->createSink($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/CreateSink', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSink(); + $this->assertProtobufEquals($sink, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSinkExceptionTest() + { + $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]'); + $sink = new LogSink(); + $sinkName = 'sinkName508775358'; + $sink->setName($sinkName); + $sinkDestination = 'sinkDestination-1018870917'; + $sink->setDestination($sinkDestination); + $request = (new CreateSinkRequest()) + ->setParent($formattedParent) + ->setSink($sink); + try { + $gapicClient->createSink($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 createViewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $filter = 'filter-1274492040'; + $expectedResponse = new LogView(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setFilter($filter); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $viewId = 'viewId454228213'; + $view = new LogView(); + $request = (new CreateViewRequest()) + ->setParent($parent) + ->setViewId($viewId) + ->setView($view); + $response = $gapicClient->createView($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/CreateView', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualRequestObject->getViewId(); + $this->assertProtobufEquals($viewId, $actualValue); + $actualValue = $actualRequestObject->getView(); + $this->assertProtobufEquals($view, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createViewExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $viewId = 'viewId454228213'; + $view = new LogView(); + $request = (new CreateViewRequest()) + ->setParent($parent) + ->setViewId($viewId) + ->setView($view); + try { + $gapicClient->createView($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 deleteBucketTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + $request = (new DeleteBucketRequest()) + ->setName($formattedName); + $gapicClient->deleteBucket($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/DeleteBucket', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteBucketExceptionTest() + { + $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + $request = (new DeleteBucketRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteBucket($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 deleteExclusionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->logExclusionName('[PROJECT]', '[EXCLUSION]'); + $request = (new DeleteExclusionRequest()) + ->setName($formattedName); + $gapicClient->deleteExclusion($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/DeleteExclusion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteExclusionExceptionTest() + { + $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->logExclusionName('[PROJECT]', '[EXCLUSION]'); + $request = (new DeleteExclusionRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteExclusion($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 deleteLinkTest() + { + $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/deleteLinkTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteLinkTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); + $request = (new DeleteLinkRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteLink($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.logging.v2.ConfigServiceV2/DeleteLink', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteLinkTest'); + $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 deleteLinkExceptionTest() + { + $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/deleteLinkTest'); + $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->linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); + $request = (new DeleteLinkRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteLink($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteLinkTest'); + 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 deleteSinkTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); + $request = (new DeleteSinkRequest()) + ->setSinkName($formattedSinkName); + $gapicClient->deleteSink($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/DeleteSink', $actualFuncCall); + $actualValue = $actualRequestObject->getSinkName(); + $this->assertProtobufEquals($formattedSinkName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSinkExceptionTest() + { + $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 + $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); + $request = (new DeleteSinkRequest()) + ->setSinkName($formattedSinkName); + try { + $gapicClient->deleteSink($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 deleteViewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->logViewName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[VIEW]'); + $request = (new DeleteViewRequest()) + ->setName($formattedName); + $gapicClient->deleteView($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/DeleteView', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteViewExceptionTest() + { + $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->logViewName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[VIEW]'); + $request = (new DeleteViewRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteView($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 getBucketTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $retentionDays = 1544391896; + $locked = true; + $analyticsEnabled = true; + $expectedResponse = new LogBucket(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setRetentionDays($retentionDays); + $expectedResponse->setLocked($locked); + $expectedResponse->setAnalyticsEnabled($analyticsEnabled); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + $request = (new GetBucketRequest()) + ->setName($formattedName); + $response = $gapicClient->getBucket($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/GetBucket', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getBucketExceptionTest() + { + $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + $request = (new GetBucketRequest()) + ->setName($formattedName); + try { + $gapicClient->getBucket($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 getCmekSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $kmsKeyName = 'kmsKeyName2094986649'; + $kmsKeyVersionName = 'kmsKeyVersionName-1734350176'; + $serviceAccountId = 'serviceAccountId-111486921'; + $expectedResponse = new CmekSettings(); + $expectedResponse->setName($name2); + $expectedResponse->setKmsKeyName($kmsKeyName); + $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName); + $expectedResponse->setServiceAccountId($serviceAccountId); + $transport->addResponse($expectedResponse); + $request = new GetCmekSettingsRequest(); + $response = $gapicClient->getCmekSettings($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/GetCmekSettings', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCmekSettingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetCmekSettingsRequest(); + try { + $gapicClient->getCmekSettings($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 getExclusionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $filter = 'filter-1274492040'; + $disabled = true; + $expectedResponse = new LogExclusion(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setFilter($filter); + $expectedResponse->setDisabled($disabled); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->logExclusionName('[PROJECT]', '[EXCLUSION]'); + $request = (new GetExclusionRequest()) + ->setName($formattedName); + $response = $gapicClient->getExclusion($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/GetExclusion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getExclusionExceptionTest() + { + $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->logExclusionName('[PROJECT]', '[EXCLUSION]'); + $request = (new GetExclusionRequest()) + ->setName($formattedName); + try { + $gapicClient->getExclusion($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 getLinkTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $expectedResponse = new Link(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); + $request = (new GetLinkRequest()) + ->setName($formattedName); + $response = $gapicClient->getLink($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/GetLink', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLinkExceptionTest() + { + $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->linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); + $request = (new GetLinkRequest()) + ->setName($formattedName); + try { + $gapicClient->getLink($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 getSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $kmsKeyName = 'kmsKeyName2094986649'; + $kmsServiceAccountId = 'kmsServiceAccountId-263326747'; + $storageLocation = 'storageLocation-612882183'; + $disableDefaultSink = true; + $expectedResponse = new Settings(); + $expectedResponse->setName($name2); + $expectedResponse->setKmsKeyName($kmsKeyName); + $expectedResponse->setKmsServiceAccountId($kmsServiceAccountId); + $expectedResponse->setStorageLocation($storageLocation); + $expectedResponse->setDisableDefaultSink($disableDefaultSink); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->settingsName('[PROJECT]'); + $request = (new GetSettingsRequest()) + ->setName($formattedName); + $response = $gapicClient->getSettings($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/GetSettings', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSettingsExceptionTest() + { + $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->settingsName('[PROJECT]'); + $request = (new GetSettingsRequest()) + ->setName($formattedName); + try { + $gapicClient->getSettings($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 getSinkTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $destination = 'destination-1429847026'; + $filter = 'filter-1274492040'; + $description = 'description-1724546052'; + $disabled = true; + $writerIdentity = 'writerIdentity775638794'; + $includeChildren = true; + $expectedResponse = new LogSink(); + $expectedResponse->setName($name); + $expectedResponse->setDestination($destination); + $expectedResponse->setFilter($filter); + $expectedResponse->setDescription($description); + $expectedResponse->setDisabled($disabled); + $expectedResponse->setWriterIdentity($writerIdentity); + $expectedResponse->setIncludeChildren($includeChildren); + $transport->addResponse($expectedResponse); + // Mock request + $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); + $request = (new GetSinkRequest()) + ->setSinkName($formattedSinkName); + $response = $gapicClient->getSink($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/GetSink', $actualFuncCall); + $actualValue = $actualRequestObject->getSinkName(); + $this->assertProtobufEquals($formattedSinkName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSinkExceptionTest() + { + $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 + $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); + $request = (new GetSinkRequest()) + ->setSinkName($formattedSinkName); + try { + $gapicClient->getSink($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 getViewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $filter = 'filter-1274492040'; + $expectedResponse = new LogView(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setFilter($filter); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->logViewName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[VIEW]'); + $request = (new GetViewRequest()) + ->setName($formattedName); + $response = $gapicClient->getView($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/GetView', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getViewExceptionTest() + { + $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->logViewName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[VIEW]'); + $request = (new GetViewRequest()) + ->setName($formattedName); + try { + $gapicClient->getView($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 listBucketsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $bucketsElement = new LogBucket(); + $buckets = [ + $bucketsElement, + ]; + $expectedResponse = new ListBucketsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setBuckets($buckets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListBucketsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listBuckets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getBuckets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/ListBuckets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listBucketsExceptionTest() + { + $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); + $request = (new ListBucketsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listBuckets($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 listExclusionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $exclusionsElement = new LogExclusion(); + $exclusions = [ + $exclusionsElement, + ]; + $expectedResponse = new ListExclusionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setExclusions($exclusions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListExclusionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listExclusions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getExclusions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/ListExclusions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listExclusionsExceptionTest() + { + $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 ListExclusionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listExclusions($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 listLinksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $linksElement = new Link(); + $links = [ + $linksElement, + ]; + $expectedResponse = new ListLinksResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLinks($links); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + $request = (new ListLinksRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listLinks($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLinks()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/ListLinks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLinksExceptionTest() + { + $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + $request = (new ListLinksRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listLinks($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 listSinksTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $sinksElement = new LogSink(); + $sinks = [ + $sinksElement, + ]; + $expectedResponse = new ListSinksResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSinks($sinks); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListSinksRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSinks($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSinks()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/ListSinks', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSinksExceptionTest() + { + $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 ListSinksRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSinks($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 listViewsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $viewsElement = new LogView(); + $views = [ + $viewsElement, + ]; + $expectedResponse = new ListViewsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setViews($views); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $request = (new ListViewsRequest()) + ->setParent($parent); + $response = $gapicClient->listViews($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getViews()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/ListViews', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listViewsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $request = (new ListViewsRequest()) + ->setParent($parent); + try { + $gapicClient->listViews($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 undeleteBucketTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + $request = (new UndeleteBucketRequest()) + ->setName($formattedName); + $gapicClient->undeleteBucket($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/UndeleteBucket', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function undeleteBucketExceptionTest() + { + $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + $request = (new UndeleteBucketRequest()) + ->setName($formattedName); + try { + $gapicClient->undeleteBucket($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 updateBucketTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $retentionDays = 1544391896; + $locked = true; + $analyticsEnabled = true; + $expectedResponse = new LogBucket(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setRetentionDays($retentionDays); + $expectedResponse->setLocked($locked); + $expectedResponse->setAnalyticsEnabled($analyticsEnabled); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + $bucket = new LogBucket(); + $updateMask = new FieldMask(); + $request = (new UpdateBucketRequest()) + ->setName($formattedName) + ->setBucket($bucket) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateBucket($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateBucket', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getBucket(); + $this->assertProtobufEquals($bucket, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateBucketExceptionTest() + { + $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + $bucket = new LogBucket(); + $updateMask = new FieldMask(); + $request = (new UpdateBucketRequest()) + ->setName($formattedName) + ->setBucket($bucket) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateBucket($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 updateBucketAsyncTest() + { + $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/updateBucketAsyncTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $retentionDays = 1544391896; + $locked = true; + $analyticsEnabled = true; + $expectedResponse = new LogBucket(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setRetentionDays($retentionDays); + $expectedResponse->setLocked($locked); + $expectedResponse->setAnalyticsEnabled($analyticsEnabled); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateBucketAsyncTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + $bucket = new LogBucket(); + $updateMask = new FieldMask(); + $request = (new UpdateBucketRequest()) + ->setName($formattedName) + ->setBucket($bucket) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateBucketAsync($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.logging.v2.ConfigServiceV2/UpdateBucketAsync', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getBucket(); + $this->assertProtobufEquals($bucket, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBucketAsyncTest'); + $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 updateBucketAsyncExceptionTest() + { + $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/updateBucketAsyncTest'); + $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); + $bucket = new LogBucket(); + $updateMask = new FieldMask(); + $request = (new UpdateBucketRequest()) + ->setName($formattedName) + ->setBucket($bucket) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateBucketAsync($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateBucketAsyncTest'); + 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 updateCmekSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $kmsKeyName = 'kmsKeyName2094986649'; + $kmsKeyVersionName = 'kmsKeyVersionName-1734350176'; + $serviceAccountId = 'serviceAccountId-111486921'; + $expectedResponse = new CmekSettings(); + $expectedResponse->setName($name2); + $expectedResponse->setKmsKeyName($kmsKeyName); + $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName); + $expectedResponse->setServiceAccountId($serviceAccountId); + $transport->addResponse($expectedResponse); + $request = new UpdateCmekSettingsRequest(); + $response = $gapicClient->updateCmekSettings($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateCmekSettings', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCmekSettingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new UpdateCmekSettingsRequest(); + try { + $gapicClient->updateCmekSettings($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 updateExclusionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $filter = 'filter-1274492040'; + $disabled = true; + $expectedResponse = new LogExclusion(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setFilter($filter); + $expectedResponse->setDisabled($disabled); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->logExclusionName('[PROJECT]', '[EXCLUSION]'); + $exclusion = new LogExclusion(); + $exclusionName = 'exclusionName1004344697'; + $exclusion->setName($exclusionName); + $exclusionFilter = 'exclusionFilter-1414044954'; + $exclusion->setFilter($exclusionFilter); + $updateMask = new FieldMask(); + $request = (new UpdateExclusionRequest()) + ->setName($formattedName) + ->setExclusion($exclusion) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateExclusion($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateExclusion', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getExclusion(); + $this->assertProtobufEquals($exclusion, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateExclusionExceptionTest() + { + $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->logExclusionName('[PROJECT]', '[EXCLUSION]'); + $exclusion = new LogExclusion(); + $exclusionName = 'exclusionName1004344697'; + $exclusion->setName($exclusionName); + $exclusionFilter = 'exclusionFilter-1414044954'; + $exclusion->setFilter($exclusionFilter); + $updateMask = new FieldMask(); + $request = (new UpdateExclusionRequest()) + ->setName($formattedName) + ->setExclusion($exclusion) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateExclusion($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 updateSettingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $kmsKeyName = 'kmsKeyName2094986649'; + $kmsServiceAccountId = 'kmsServiceAccountId-263326747'; + $storageLocation = 'storageLocation-612882183'; + $disableDefaultSink = true; + $expectedResponse = new Settings(); + $expectedResponse->setName($name2); + $expectedResponse->setKmsKeyName($kmsKeyName); + $expectedResponse->setKmsServiceAccountId($kmsServiceAccountId); + $expectedResponse->setStorageLocation($storageLocation); + $expectedResponse->setDisableDefaultSink($disableDefaultSink); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $settings = new Settings(); + $request = (new UpdateSettingsRequest()) + ->setName($name) + ->setSettings($settings); + $response = $gapicClient->updateSettings($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateSettings', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getSettings(); + $this->assertProtobufEquals($settings, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSettingsExceptionTest() + { + $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'; + $settings = new Settings(); + $request = (new UpdateSettingsRequest()) + ->setName($name) + ->setSettings($settings); + try { + $gapicClient->updateSettings($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 updateSinkTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $destination = 'destination-1429847026'; + $filter = 'filter-1274492040'; + $description = 'description-1724546052'; + $disabled = true; + $writerIdentity = 'writerIdentity775638794'; + $includeChildren = true; + $expectedResponse = new LogSink(); + $expectedResponse->setName($name); + $expectedResponse->setDestination($destination); + $expectedResponse->setFilter($filter); + $expectedResponse->setDescription($description); + $expectedResponse->setDisabled($disabled); + $expectedResponse->setWriterIdentity($writerIdentity); + $expectedResponse->setIncludeChildren($includeChildren); + $transport->addResponse($expectedResponse); + // Mock request + $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); + $sink = new LogSink(); + $sinkName = 'sinkName508775358'; + $sink->setName($sinkName); + $sinkDestination = 'sinkDestination-1018870917'; + $sink->setDestination($sinkDestination); + $request = (new UpdateSinkRequest()) + ->setSinkName($formattedSinkName) + ->setSink($sink); + $response = $gapicClient->updateSink($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateSink', $actualFuncCall); + $actualValue = $actualRequestObject->getSinkName(); + $this->assertProtobufEquals($formattedSinkName, $actualValue); + $actualValue = $actualRequestObject->getSink(); + $this->assertProtobufEquals($sink, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSinkExceptionTest() + { + $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 + $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); + $sink = new LogSink(); + $sinkName = 'sinkName508775358'; + $sink->setName($sinkName); + $sinkDestination = 'sinkDestination-1018870917'; + $sink->setDestination($sinkDestination); + $request = (new UpdateSinkRequest()) + ->setSinkName($formattedSinkName) + ->setSink($sink); + try { + $gapicClient->updateSink($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 updateViewTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $description = 'description-1724546052'; + $filter = 'filter-1274492040'; + $expectedResponse = new LogView(); + $expectedResponse->setName($name2); + $expectedResponse->setDescription($description); + $expectedResponse->setFilter($filter); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $view = new LogView(); + $request = (new UpdateViewRequest()) + ->setName($name) + ->setView($view); + $response = $gapicClient->updateView($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateView', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getView(); + $this->assertProtobufEquals($view, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateViewExceptionTest() + { + $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'; + $view = new LogView(); + $request = (new UpdateViewRequest()) + ->setName($name) + ->setView($view); + try { + $gapicClient->updateView($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 copyLogEntriesAsyncTest() + { + $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/copyLogEntriesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $logEntriesCopiedCount = 2134326978; + $expectedResponse = new CopyLogEntriesResponse(); + $expectedResponse->setLogEntriesCopiedCount($logEntriesCopiedCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/copyLogEntriesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $name = 'name3373707'; + $destination = 'destination-1429847026'; + $request = (new CopyLogEntriesRequest()) + ->setName($name) + ->setDestination($destination); + $response = $gapicClient->copyLogEntriesAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.ConfigServiceV2/CopyLogEntries', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualApiRequestObject->getDestination(); + $this->assertProtobufEquals($destination, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/copyLogEntriesTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/LoggingServiceV2ClientTest.php b/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/LoggingServiceV2ClientTest.php new file mode 100644 index 000000000000..a1e709afd967 --- /dev/null +++ b/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/LoggingServiceV2ClientTest.php @@ -0,0 +1,530 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return LoggingServiceV2Client */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new LoggingServiceV2Client($options); + } + + /** @test */ + public function deleteLogTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedLogName = $gapicClient->logName('[PROJECT]', '[LOG]'); + $request = (new DeleteLogRequest()) + ->setLogName($formattedLogName); + $gapicClient->deleteLog($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.LoggingServiceV2/DeleteLog', $actualFuncCall); + $actualValue = $actualRequestObject->getLogName(); + $this->assertProtobufEquals($formattedLogName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteLogExceptionTest() + { + $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 + $formattedLogName = $gapicClient->logName('[PROJECT]', '[LOG]'); + $request = (new DeleteLogRequest()) + ->setLogName($formattedLogName); + try { + $gapicClient->deleteLog($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 listLogEntriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $entriesElement = new LogEntry(); + $entries = [ + $entriesElement, + ]; + $expectedResponse = new ListLogEntriesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEntries($entries); + $transport->addResponse($expectedResponse); + // Mock request + $formattedResourceNames = [ + $gapicClient->projectName('[PROJECT]'), + ]; + $request = (new ListLogEntriesRequest()) + ->setResourceNames($formattedResourceNames); + $response = $gapicClient->listLogEntries($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEntries()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.LoggingServiceV2/ListLogEntries', $actualFuncCall); + $actualValue = $actualRequestObject->getResourceNames(); + $this->assertProtobufEquals($formattedResourceNames, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLogEntriesExceptionTest() + { + $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 + $formattedResourceNames = [ + $gapicClient->projectName('[PROJECT]'), + ]; + $request = (new ListLogEntriesRequest()) + ->setResourceNames($formattedResourceNames); + try { + $gapicClient->listLogEntries($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 listLogsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $logNamesElement = 'logNamesElement-1079688374'; + $logNames = [ + $logNamesElement, + ]; + $expectedResponse = new ListLogsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLogNames($logNames); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListLogsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listLogs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLogNames()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.LoggingServiceV2/ListLogs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLogsExceptionTest() + { + $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 ListLogsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listLogs($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 listMonitoredResourceDescriptorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $resourceDescriptorsElement = new MonitoredResourceDescriptor(); + $resourceDescriptors = [ + $resourceDescriptorsElement, + ]; + $expectedResponse = new ListMonitoredResourceDescriptorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setResourceDescriptors($resourceDescriptors); + $transport->addResponse($expectedResponse); + $request = new ListMonitoredResourceDescriptorsRequest(); + $response = $gapicClient->listMonitoredResourceDescriptors($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getResourceDescriptors()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMonitoredResourceDescriptorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListMonitoredResourceDescriptorsRequest(); + try { + $gapicClient->listMonitoredResourceDescriptors($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 tailLogEntriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new TailLogEntriesResponse(); + $transport->addResponse($expectedResponse); + $expectedResponse2 = new TailLogEntriesResponse(); + $transport->addResponse($expectedResponse2); + $expectedResponse3 = new TailLogEntriesResponse(); + $transport->addResponse($expectedResponse3); + // Mock request + $resourceNames = []; + $request = new TailLogEntriesRequest(); + $request->setResourceNames($resourceNames); + $resourceNames2 = []; + $request2 = new TailLogEntriesRequest(); + $request2->setResourceNames($resourceNames2); + $resourceNames3 = []; + $request3 = new TailLogEntriesRequest(); + $request3->setResourceNames($resourceNames3); + $bidi = $gapicClient->tailLogEntries(); + $this->assertInstanceOf(BidiStream::class, $bidi); + $bidi->write($request); + $responses = []; + $responses[] = $bidi->read(); + $bidi->writeAll([ + $request2, + $request3, + ]); + foreach ($bidi->closeWriteAndReadAll() as $response) { + $responses[] = $response; + } + + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $createStreamRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($createStreamRequests)); + $streamFuncCall = $createStreamRequests[0]->getFuncCall(); + $streamRequestObject = $createStreamRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.LoggingServiceV2/TailLogEntries', $streamFuncCall); + $this->assertNull($streamRequestObject); + $callObjects = $transport->popCallObjects(); + $this->assertSame(1, count($callObjects)); + $bidiCall = $callObjects[0]; + $writeRequests = $bidiCall->popReceivedCalls(); + $expectedRequests = []; + $expectedRequests[] = $request; + $expectedRequests[] = $request2; + $expectedRequests[] = $request3; + $this->assertEquals($expectedRequests, $writeRequests); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function tailLogEntriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + $bidi = $gapicClient->tailLogEntries(); + $results = $bidi->closeWriteAndReadAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function writeLogEntriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new WriteLogEntriesResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $entries = []; + $request = (new WriteLogEntriesRequest()) + ->setEntries($entries); + $response = $gapicClient->writeLogEntries($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.LoggingServiceV2/WriteLogEntries', $actualFuncCall); + $actualValue = $actualRequestObject->getEntries(); + $this->assertProtobufEquals($entries, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function writeLogEntriesExceptionTest() + { + $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 + $entries = []; + $request = (new WriteLogEntriesRequest()) + ->setEntries($entries); + try { + $gapicClient->writeLogEntries($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 deleteLogAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedLogName = $gapicClient->logName('[PROJECT]', '[LOG]'); + $request = (new DeleteLogRequest()) + ->setLogName($formattedLogName); + $gapicClient->deleteLogAsync($request)->wait(); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.LoggingServiceV2/DeleteLog', $actualFuncCall); + $actualValue = $actualRequestObject->getLogName(); + $this->assertProtobufEquals($formattedLogName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/MetricsServiceV2ClientTest.php b/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/MetricsServiceV2ClientTest.php new file mode 100644 index 000000000000..35ce817fb79a --- /dev/null +++ b/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/MetricsServiceV2ClientTest.php @@ -0,0 +1,498 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return MetricsServiceV2Client */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new MetricsServiceV2Client($options); + } + + /** @test */ + public function createLogMetricTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $filter = 'filter-1274492040'; + $bucketName = 'bucketName283610048'; + $disabled = true; + $valueExtractor = 'valueExtractor2047672534'; + $expectedResponse = new LogMetric(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setFilter($filter); + $expectedResponse->setBucketName($bucketName); + $expectedResponse->setDisabled($disabled); + $expectedResponse->setValueExtractor($valueExtractor); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $metric = new LogMetric(); + $metricName = 'metricName-610759589'; + $metric->setName($metricName); + $metricFilter = 'metricFilter1248897352'; + $metric->setFilter($metricFilter); + $request = (new CreateLogMetricRequest()) + ->setParent($formattedParent) + ->setMetric($metric); + $response = $gapicClient->createLogMetric($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.MetricsServiceV2/CreateLogMetric', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getMetric(); + $this->assertProtobufEquals($metric, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createLogMetricExceptionTest() + { + $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]'); + $metric = new LogMetric(); + $metricName = 'metricName-610759589'; + $metric->setName($metricName); + $metricFilter = 'metricFilter1248897352'; + $metric->setFilter($metricFilter); + $request = (new CreateLogMetricRequest()) + ->setParent($formattedParent) + ->setMetric($metric); + try { + $gapicClient->createLogMetric($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 deleteLogMetricTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); + $request = (new DeleteLogMetricRequest()) + ->setMetricName($formattedMetricName); + $gapicClient->deleteLogMetric($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.MetricsServiceV2/DeleteLogMetric', $actualFuncCall); + $actualValue = $actualRequestObject->getMetricName(); + $this->assertProtobufEquals($formattedMetricName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteLogMetricExceptionTest() + { + $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 + $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); + $request = (new DeleteLogMetricRequest()) + ->setMetricName($formattedMetricName); + try { + $gapicClient->deleteLogMetric($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 getLogMetricTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $filter = 'filter-1274492040'; + $bucketName = 'bucketName283610048'; + $disabled = true; + $valueExtractor = 'valueExtractor2047672534'; + $expectedResponse = new LogMetric(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setFilter($filter); + $expectedResponse->setBucketName($bucketName); + $expectedResponse->setDisabled($disabled); + $expectedResponse->setValueExtractor($valueExtractor); + $transport->addResponse($expectedResponse); + // Mock request + $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); + $request = (new GetLogMetricRequest()) + ->setMetricName($formattedMetricName); + $response = $gapicClient->getLogMetric($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.MetricsServiceV2/GetLogMetric', $actualFuncCall); + $actualValue = $actualRequestObject->getMetricName(); + $this->assertProtobufEquals($formattedMetricName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLogMetricExceptionTest() + { + $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 + $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); + $request = (new GetLogMetricRequest()) + ->setMetricName($formattedMetricName); + try { + $gapicClient->getLogMetric($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 listLogMetricsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $metricsElement = new LogMetric(); + $metrics = [ + $metricsElement, + ]; + $expectedResponse = new ListLogMetricsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMetrics($metrics); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListLogMetricsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listLogMetrics($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMetrics()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.MetricsServiceV2/ListLogMetrics', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLogMetricsExceptionTest() + { + $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 ListLogMetricsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listLogMetrics($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 updateLogMetricTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $filter = 'filter-1274492040'; + $bucketName = 'bucketName283610048'; + $disabled = true; + $valueExtractor = 'valueExtractor2047672534'; + $expectedResponse = new LogMetric(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setFilter($filter); + $expectedResponse->setBucketName($bucketName); + $expectedResponse->setDisabled($disabled); + $expectedResponse->setValueExtractor($valueExtractor); + $transport->addResponse($expectedResponse); + // Mock request + $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); + $metric = new LogMetric(); + $metricName = 'metricName-610759589'; + $metric->setName($metricName); + $metricFilter = 'metricFilter1248897352'; + $metric->setFilter($metricFilter); + $request = (new UpdateLogMetricRequest()) + ->setMetricName($formattedMetricName) + ->setMetric($metric); + $response = $gapicClient->updateLogMetric($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.logging.v2.MetricsServiceV2/UpdateLogMetric', $actualFuncCall); + $actualValue = $actualRequestObject->getMetricName(); + $this->assertProtobufEquals($formattedMetricName, $actualValue); + $actualValue = $actualRequestObject->getMetric(); + $this->assertProtobufEquals($metric, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateLogMetricExceptionTest() + { + $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 + $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); + $metric = new LogMetric(); + $metricName = 'metricName-610759589'; + $metric->setName($metricName); + $metricFilter = 'metricFilter1248897352'; + $metric->setFilter($metricFilter); + $request = (new UpdateLogMetricRequest()) + ->setMetricName($formattedMetricName) + ->setMetric($metric); + try { + $gapicClient->updateLogMetric($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 createLogMetricAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $description = 'description-1724546052'; + $filter = 'filter-1274492040'; + $bucketName = 'bucketName283610048'; + $disabled = true; + $valueExtractor = 'valueExtractor2047672534'; + $expectedResponse = new LogMetric(); + $expectedResponse->setName($name); + $expectedResponse->setDescription($description); + $expectedResponse->setFilter($filter); + $expectedResponse->setBucketName($bucketName); + $expectedResponse->setDisabled($disabled); + $expectedResponse->setValueExtractor($valueExtractor); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $metric = new LogMetric(); + $metricName = 'metricName-610759589'; + $metric->setName($metricName); + $metricFilter = 'metricFilter1248897352'; + $metric->setFilter($metricFilter); + $request = (new CreateLogMetricRequest()) + ->setParent($formattedParent) + ->setMetric($metric); + $response = $gapicClient->createLogMetricAsync($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.logging.v2.MetricsServiceV2/CreateLogMetric', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getMetric(); + $this->assertProtobufEquals($metric, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/LongRunning/proto/src/GPBMetadata/Google/Longrunning/Operations.php b/owl-bot-staging/LongRunning/proto/src/GPBMetadata/Google/Longrunning/Operations.php new file mode 100644 index 000000000000..2cb985dc9247 --- /dev/null +++ b/owl-bot-staging/LongRunning/proto/src/GPBMetadata/Google/Longrunning/Operations.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + "\x0A\x8F\x0E\x0A#google/longrunning/operations.proto\x12\x12google.longrunning\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/protobuf/any.proto\x1A google/protobuf/descriptor.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A\x17google/rpc/status.proto\"\xA8\x01\x0A\x09Operation\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12&\x0A\x08metadata\x18\x02 \x01(\x0B2\x14.google.protobuf.Any\x12\x0C\x0A\x04done\x18\x03 \x01(\x08\x12#\x0A\x05error\x18\x04 \x01(\x0B2\x12.google.rpc.StatusH\x00\x12(\x0A\x08response\x18\x05 \x01(\x0B2\x14.google.protobuf.AnyH\x00B\x08\x0A\x06result\"#\x0A\x13GetOperationRequest\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\"|\x0A\x15ListOperationsRequest\x12\x0C\x0A\x04name\x18\x04 \x01(\x09\x12\x0E\x0A\x06filter\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x1E\x0A\x16return_partial_success\x18\x05 \x01(\x08\"~\x0A\x16ListOperationsResponse\x121\x0A\x0Aoperations\x18\x01 \x03(\x0B2\x1D.google.longrunning.Operation\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x18\x0A\x0Bunreachable\x18\x03 \x03(\x09B\x03\xE0A\x06\"&\x0A\x16CancelOperationRequest\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\"&\x0A\x16DeleteOperationRequest\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\"P\x0A\x14WaitOperationRequest\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12*\x0A\x07timeout\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\"=\x0A\x0DOperationInfo\x12\x15\x0A\x0Dresponse_type\x18\x01 \x01(\x09\x12\x15\x0A\x0Dmetadata_type\x18\x02 \x01(\x092\xAA\x05\x0A\x0AOperations\x12\x94\x01\x0A\x0EListOperations\x12).google.longrunning.ListOperationsRequest\x1A*.google.longrunning.ListOperationsResponse\"+\xDAA\x0Bname,filter\x82\xD3\xE4\x93\x02\x17\x12\x15/v1/{name=operations}\x12\x7F\x0A\x0CGetOperation\x12'.google.longrunning.GetOperationRequest\x1A\x1D.google.longrunning.Operation\"'\xDAA\x04name\x82\xD3\xE4\x93\x02\x1A\x12\x18/v1/{name=operations/**}\x12~\x0A\x0FDeleteOperation\x12*.google.longrunning.DeleteOperationRequest\x1A\x16.google.protobuf.Empty\"'\xDAA\x04name\x82\xD3\xE4\x93\x02\x1A*\x18/v1/{name=operations/**}\x12\x88\x01\x0A\x0FCancelOperation\x12*.google.longrunning.CancelOperationRequest\x1A\x16.google.protobuf.Empty\"1\xDAA\x04name\x82\xD3\xE4\x93\x02\$\"\x1F/v1/{name=operations/**}:cancel:\x01*\x12Z\x0A\x0DWaitOperation\x12(.google.longrunning.WaitOperationRequest\x1A\x1D.google.longrunning.Operation\"\x00\x1A\x1D\xCAA\x1Alongrunning.googleapis.comB\xA2\x01\x0A\x16com.google.longrunningB\x0FOperationsProtoP\x01ZCcloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb\xA2\x02\x05GLRUN\xAA\x02\x12Google.LongRunning\xCA\x02\x12Google\\LongRunningb\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/CancelOperationRequest.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/CancelOperationRequest.php new file mode 100644 index 000000000000..58790425ede5 --- /dev/null +++ b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/CancelOperationRequest.php @@ -0,0 +1,81 @@ +google.longrunning.CancelOperationRequest + */ +class CancelOperationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the operation resource to be cancelled. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * @param string $name The name of the operation resource to be cancelled. + * + * @return \Google\LongRunning\CancelOperationRequest + * + * @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 + * The name of the operation resource to be cancelled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Longrunning\Operations::initOnce(); + parent::__construct($data); + } + + /** + * The name of the operation resource to be cancelled. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the operation resource to be cancelled. + * + * 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; + } + +} + diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/DeleteOperationRequest.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/DeleteOperationRequest.php new file mode 100644 index 000000000000..59dd77e6b61f --- /dev/null +++ b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/DeleteOperationRequest.php @@ -0,0 +1,81 @@ +google.longrunning.DeleteOperationRequest + */ +class DeleteOperationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the operation resource to be deleted. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * @param string $name The name of the operation resource to be deleted. + * + * @return \Google\LongRunning\DeleteOperationRequest + * + * @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 + * The name of the operation resource to be deleted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Longrunning\Operations::initOnce(); + parent::__construct($data); + } + + /** + * The name of the operation resource to be deleted. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the operation resource to be deleted. + * + * 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; + } + +} + diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/GetOperationRequest.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/GetOperationRequest.php new file mode 100644 index 000000000000..53dfb8b5e851 --- /dev/null +++ b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/GetOperationRequest.php @@ -0,0 +1,81 @@ +google.longrunning.GetOperationRequest + */ +class GetOperationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the operation resource. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * @param string $name The name of the operation resource. + * + * @return \Google\LongRunning\GetOperationRequest + * + * @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 + * The name of the operation resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Longrunning\Operations::initOnce(); + parent::__construct($data); + } + + /** + * The name of the operation resource. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the operation resource. + * + * 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; + } + +} + diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsRequest.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsRequest.php new file mode 100644 index 000000000000..6abe7bd540ca --- /dev/null +++ b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsRequest.php @@ -0,0 +1,247 @@ +google.longrunning.ListOperationsRequest + */ +class ListOperationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the operation's parent resource. + * + * Generated from protobuf field string name = 4; + */ + protected $name = ''; + /** + * The standard list filter. + * + * Generated from protobuf field string filter = 1; + */ + protected $filter = ''; + /** + * The standard list page size. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The standard list page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * When set to `true`, operations that are reachable are returned as normal, + * and those that are unreachable are returned in the + * [ListOperationsResponse.unreachable] field. + * This can only be `true` when reading across collections e.g. when `parent` + * is set to `"projects/example/locations/-"`. + * This field is not by default supported and will result in an + * `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + * service or product specific documentation. + * + * Generated from protobuf field bool return_partial_success = 5; + */ + protected $return_partial_success = false; + + /** + * @param string $name The name of the operation's parent resource. + * @param string $filter The standard list filter. + * + * @return \Google\LongRunning\ListOperationsRequest + * + * @experimental + */ + public static function build(string $name, string $filter): self + { + return (new self()) + ->setName($name) + ->setFilter($filter); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the operation's parent resource. + * @type string $filter + * The standard list filter. + * @type int $page_size + * The standard list page size. + * @type string $page_token + * The standard list page token. + * @type bool $return_partial_success + * When set to `true`, operations that are reachable are returned as normal, + * and those that are unreachable are returned in the + * [ListOperationsResponse.unreachable] field. + * This can only be `true` when reading across collections e.g. when `parent` + * is set to `"projects/example/locations/-"`. + * This field is not by default supported and will result in an + * `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + * service or product specific documentation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Longrunning\Operations::initOnce(); + parent::__construct($data); + } + + /** + * The name of the operation's parent resource. + * + * Generated from protobuf field string name = 4; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the operation's parent resource. + * + * Generated from protobuf field string name = 4; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The standard list filter. + * + * Generated from protobuf field string filter = 1; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The standard list filter. + * + * Generated from protobuf field string filter = 1; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The standard list page size. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The standard list page size. + * + * 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 standard list page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The standard list page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * When set to `true`, operations that are reachable are returned as normal, + * and those that are unreachable are returned in the + * [ListOperationsResponse.unreachable] field. + * This can only be `true` when reading across collections e.g. when `parent` + * is set to `"projects/example/locations/-"`. + * This field is not by default supported and will result in an + * `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + * service or product specific documentation. + * + * Generated from protobuf field bool return_partial_success = 5; + * @return bool + */ + public function getReturnPartialSuccess() + { + return $this->return_partial_success; + } + + /** + * When set to `true`, operations that are reachable are returned as normal, + * and those that are unreachable are returned in the + * [ListOperationsResponse.unreachable] field. + * This can only be `true` when reading across collections e.g. when `parent` + * is set to `"projects/example/locations/-"`. + * This field is not by default supported and will result in an + * `UNIMPLEMENTED` error if set unless explicitly documented otherwise in + * service or product specific documentation. + * + * Generated from protobuf field bool return_partial_success = 5; + * @param bool $var + * @return $this + */ + public function setReturnPartialSuccess($var) + { + GPBUtil::checkBool($var); + $this->return_partial_success = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsResponse.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsResponse.php new file mode 100644 index 000000000000..7aa1348e9916 --- /dev/null +++ b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsResponse.php @@ -0,0 +1,148 @@ +google.longrunning.ListOperationsResponse + */ +class ListOperationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of operations that matches the specified filter in the request. + * + * Generated from protobuf field repeated .google.longrunning.Operation operations = 1; + */ + private $operations; + /** + * The standard List next-page token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Unordered list. Unreachable resources. Populated when the request sets + * `ListOperationsRequest.return_partial_success` and reads across + * collections e.g. when attempting to list all resources across all supported + * locations. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\LongRunning\Operation[] $operations + * A list of operations that matches the specified filter in the request. + * @type string $next_page_token + * The standard List next-page token. + * @type string[] $unreachable + * Unordered list. Unreachable resources. Populated when the request sets + * `ListOperationsRequest.return_partial_success` and reads across + * collections e.g. when attempting to list all resources across all supported + * locations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Longrunning\Operations::initOnce(); + parent::__construct($data); + } + + /** + * A list of operations that matches the specified filter in the request. + * + * Generated from protobuf field repeated .google.longrunning.Operation operations = 1; + * @return RepeatedField<\Google\LongRunning\Operation> + */ + public function getOperations() + { + return $this->operations; + } + + /** + * A list of operations that matches the specified filter in the request. + * + * Generated from protobuf field repeated .google.longrunning.Operation operations = 1; + * @param \Google\LongRunning\Operation[] $var + * @return $this + */ + public function setOperations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\LongRunning\Operation::class); + $this->operations = $arr; + + return $this; + } + + /** + * The standard List next-page token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The standard List next-page token. + * + * 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; + } + + /** + * Unordered list. Unreachable resources. Populated when the request sets + * `ListOperationsRequest.return_partial_success` and reads across + * collections e.g. when attempting to list all resources across all supported + * locations. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Unordered list. Unreachable resources. Populated when the request sets + * `ListOperationsRequest.return_partial_success` and reads across + * collections e.g. when attempting to list all resources across all supported + * locations. + * + * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/Operation.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/Operation.php new file mode 100644 index 000000000000..4bb21f0edac0 --- /dev/null +++ b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/Operation.php @@ -0,0 +1,270 @@ +google.longrunning.Operation + */ +class Operation extends \Google\Protobuf\Internal\Message +{ + /** + * The server-assigned name, which is only unique within the same service that + * originally returns it. If you use the default HTTP mapping, the + * `name` should be a resource name ending with `operations/{unique_id}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Service-specific metadata associated with the operation. It typically + * contains progress information and common metadata such as create time. + * Some services might not provide such metadata. Any method that returns a + * long-running operation should document the metadata type, if any. + * + * Generated from protobuf field .google.protobuf.Any metadata = 2; + */ + protected $metadata = null; + /** + * If the value is `false`, it means the operation is still in progress. + * If `true`, the operation is completed, and either `error` or `response` is + * available. + * + * Generated from protobuf field bool done = 3; + */ + protected $done = false; + protected $result; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The server-assigned name, which is only unique within the same service that + * originally returns it. If you use the default HTTP mapping, the + * `name` should be a resource name ending with `operations/{unique_id}`. + * @type \Google\Protobuf\Any $metadata + * Service-specific metadata associated with the operation. It typically + * contains progress information and common metadata such as create time. + * Some services might not provide such metadata. Any method that returns a + * long-running operation should document the metadata type, if any. + * @type bool $done + * If the value is `false`, it means the operation is still in progress. + * If `true`, the operation is completed, and either `error` or `response` is + * available. + * @type \Google\Rpc\Status $error + * The error result of the operation in case of failure or cancellation. + * @type \Google\Protobuf\Any $response + * The normal, successful response of the operation. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` + * is the original method name. For example, if the original method name + * is `TakeSnapshot()`, the inferred response type is + * `TakeSnapshotResponse`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Longrunning\Operations::initOnce(); + parent::__construct($data); + } + + /** + * The server-assigned name, which is only unique within the same service that + * originally returns it. If you use the default HTTP mapping, the + * `name` should be a resource name ending with `operations/{unique_id}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The server-assigned name, which is only unique within the same service that + * originally returns it. If you use the default HTTP mapping, the + * `name` should be a resource name ending with `operations/{unique_id}`. + * + * 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; + } + + /** + * Service-specific metadata associated with the operation. It typically + * contains progress information and common metadata such as create time. + * Some services might not provide such metadata. Any method that returns a + * long-running operation should document the metadata type, if any. + * + * Generated from protobuf field .google.protobuf.Any metadata = 2; + * @return \Google\Protobuf\Any|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Service-specific metadata associated with the operation. It typically + * contains progress information and common metadata such as create time. + * Some services might not provide such metadata. Any method that returns a + * long-running operation should document the metadata type, if any. + * + * Generated from protobuf field .google.protobuf.Any metadata = 2; + * @param \Google\Protobuf\Any $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); + $this->metadata = $var; + + return $this; + } + + /** + * If the value is `false`, it means the operation is still in progress. + * If `true`, the operation is completed, and either `error` or `response` is + * available. + * + * Generated from protobuf field bool done = 3; + * @return bool + */ + public function getDone() + { + return $this->done; + } + + /** + * If the value is `false`, it means the operation is still in progress. + * If `true`, the operation is completed, and either `error` or `response` is + * available. + * + * Generated from protobuf field bool done = 3; + * @param bool $var + * @return $this + */ + public function setDone($var) + { + GPBUtil::checkBool($var); + $this->done = $var; + + return $this; + } + + /** + * The error result of the operation in case of failure or cancellation. + * + * Generated from protobuf field .google.rpc.Status error = 4; + * @return \Google\Rpc\Status|null + */ + public function getError() + { + return $this->readOneof(4); + } + + public function hasError() + { + return $this->hasOneof(4); + } + + /** + * The error result of the operation in case of failure or cancellation. + * + * Generated from protobuf field .google.rpc.Status error = 4; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setError($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The normal, successful response of the operation. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` + * is the original method name. For example, if the original method name + * is `TakeSnapshot()`, the inferred response type is + * `TakeSnapshotResponse`. + * + * Generated from protobuf field .google.protobuf.Any response = 5; + * @return \Google\Protobuf\Any|null + */ + public function getResponse() + { + return $this->readOneof(5); + } + + public function hasResponse() + { + return $this->hasOneof(5); + } + + /** + * The normal, successful response of the operation. If the original + * method returns no data on success, such as `Delete`, the response is + * `google.protobuf.Empty`. If the original method is standard + * `Get`/`Create`/`Update`, the response should be the resource. For other + * methods, the response should have the type `XxxResponse`, where `Xxx` + * is the original method name. For example, if the original method name + * is `TakeSnapshot()`, the inferred response type is + * `TakeSnapshotResponse`. + * + * Generated from protobuf field .google.protobuf.Any response = 5; + * @param \Google\Protobuf\Any $var + * @return $this + */ + public function setResponse($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * @return string + */ + public function getResult() + { + return $this->whichOneof("result"); + } + +} + diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/OperationInfo.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/OperationInfo.php new file mode 100644 index 000000000000..e8d2bb3398a3 --- /dev/null +++ b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/OperationInfo.php @@ -0,0 +1,144 @@ +google.longrunning.OperationInfo + */ +class OperationInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The message name of the primary return type for this + * long-running operation. + * This type will be used to deserialize the LRO's response. + * If the response is in a different package from the rpc, a fully-qualified + * message name must be used (e.g. `google.protobuf.Struct`). + * Note: Altering this value constitutes a breaking change. + * + * Generated from protobuf field string response_type = 1; + */ + protected $response_type = ''; + /** + * Required. The message name of the metadata type for this long-running + * operation. + * If the response is in a different package from the rpc, a fully-qualified + * message name must be used (e.g. `google.protobuf.Struct`). + * Note: Altering this value constitutes a breaking change. + * + * Generated from protobuf field string metadata_type = 2; + */ + protected $metadata_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $response_type + * Required. The message name of the primary return type for this + * long-running operation. + * This type will be used to deserialize the LRO's response. + * If the response is in a different package from the rpc, a fully-qualified + * message name must be used (e.g. `google.protobuf.Struct`). + * Note: Altering this value constitutes a breaking change. + * @type string $metadata_type + * Required. The message name of the metadata type for this long-running + * operation. + * If the response is in a different package from the rpc, a fully-qualified + * message name must be used (e.g. `google.protobuf.Struct`). + * Note: Altering this value constitutes a breaking change. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Longrunning\Operations::initOnce(); + parent::__construct($data); + } + + /** + * Required. The message name of the primary return type for this + * long-running operation. + * This type will be used to deserialize the LRO's response. + * If the response is in a different package from the rpc, a fully-qualified + * message name must be used (e.g. `google.protobuf.Struct`). + * Note: Altering this value constitutes a breaking change. + * + * Generated from protobuf field string response_type = 1; + * @return string + */ + public function getResponseType() + { + return $this->response_type; + } + + /** + * Required. The message name of the primary return type for this + * long-running operation. + * This type will be used to deserialize the LRO's response. + * If the response is in a different package from the rpc, a fully-qualified + * message name must be used (e.g. `google.protobuf.Struct`). + * Note: Altering this value constitutes a breaking change. + * + * Generated from protobuf field string response_type = 1; + * @param string $var + * @return $this + */ + public function setResponseType($var) + { + GPBUtil::checkString($var, True); + $this->response_type = $var; + + return $this; + } + + /** + * Required. The message name of the metadata type for this long-running + * operation. + * If the response is in a different package from the rpc, a fully-qualified + * message name must be used (e.g. `google.protobuf.Struct`). + * Note: Altering this value constitutes a breaking change. + * + * Generated from protobuf field string metadata_type = 2; + * @return string + */ + public function getMetadataType() + { + return $this->metadata_type; + } + + /** + * Required. The message name of the metadata type for this long-running + * operation. + * If the response is in a different package from the rpc, a fully-qualified + * message name must be used (e.g. `google.protobuf.Struct`). + * Note: Altering this value constitutes a breaking change. + * + * Generated from protobuf field string metadata_type = 2; + * @param string $var + * @return $this + */ + public function setMetadataType($var) + { + GPBUtil::checkString($var, True); + $this->metadata_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/WaitOperationRequest.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/WaitOperationRequest.php new file mode 100644 index 000000000000..957fff8419e3 --- /dev/null +++ b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/WaitOperationRequest.php @@ -0,0 +1,120 @@ +google.longrunning.WaitOperationRequest + */ +class WaitOperationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the operation resource to wait on. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The maximum duration to wait before timing out. If left blank, the wait + * will be at most the time permitted by the underlying HTTP/RPC protocol. + * If RPC context deadline is also specified, the shorter one will be used. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 2; + */ + protected $timeout = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the operation resource to wait on. + * @type \Google\Protobuf\Duration $timeout + * The maximum duration to wait before timing out. If left blank, the wait + * will be at most the time permitted by the underlying HTTP/RPC protocol. + * If RPC context deadline is also specified, the shorter one will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Longrunning\Operations::initOnce(); + parent::__construct($data); + } + + /** + * The name of the operation resource to wait on. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the operation resource to wait on. + * + * 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 maximum duration to wait before timing out. If left blank, the wait + * will be at most the time permitted by the underlying HTTP/RPC protocol. + * If RPC context deadline is also specified, the shorter one will be used. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getTimeout() + { + return $this->timeout; + } + + public function hasTimeout() + { + return isset($this->timeout); + } + + public function clearTimeout() + { + unset($this->timeout); + } + + /** + * The maximum duration to wait before timing out. If left blank, the wait + * will be at most the time permitted by the underlying HTTP/RPC protocol. + * If RPC context deadline is also specified, the shorter one will be used. + * + * Generated from protobuf field .google.protobuf.Duration timeout = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTimeout($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->timeout = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/LongRunning/src/LongRunning/Client/OperationsClient.php b/owl-bot-staging/LongRunning/src/LongRunning/Client/OperationsClient.php new file mode 100644 index 000000000000..787a39443797 --- /dev/null +++ b/owl-bot-staging/LongRunning/src/LongRunning/Client/OperationsClient.php @@ -0,0 +1,344 @@ + cancelOperationAsync(CancelOperationRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteOperationAsync(DeleteOperationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getOperationAsync(GetOperationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listOperationsAsync(ListOperationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface waitOperationAsync(WaitOperationRequest $request, array $optionalArgs = []) + */ +final class OperationsClient +{ + use GapicClientTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.longrunning.Operations'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'longrunning.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'longrunning.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = []; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/operations_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/operations_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/operations_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/operations_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'longrunning.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\LongRunning\OperationsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new OperationsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Starts asynchronous cancellation on a long-running operation. The server + * makes a best effort to cancel the operation, but success is not + * guaranteed. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. Clients can use + * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or + * other methods to check whether the cancellation succeeded or whether the + * operation completed despite cancellation. On successful cancellation, + * the operation is not deleted; instead, it becomes an operation with + * an [Operation.error][google.longrunning.Operation.error] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of `1`, corresponding to + * `Code.CANCELLED`. + * + * The async variant is {@see OperationsClient::cancelOperationAsync()} . + * + * @example samples/OperationsClient/cancel_operation.php + * + * @param CancelOperationRequest $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 cancelOperation(CancelOperationRequest $request, array $callOptions = []): void + { + $this->startApiCall('CancelOperation', $request, $callOptions)->wait(); + } + + /** + * Deletes a long-running operation. This method indicates that the client is + * no longer interested in the operation result. It does not cancel the + * operation. If the server doesn't support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * + * The async variant is {@see OperationsClient::deleteOperationAsync()} . + * + * @example samples/OperationsClient/delete_operation.php + * + * @param DeleteOperationRequest $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 deleteOperation(DeleteOperationRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteOperation', $request, $callOptions)->wait(); + } + + /** + * Gets the latest state of a long-running operation. Clients can use this + * method to poll the operation result at intervals as recommended by the API + * service. + * + * The async variant is {@see OperationsClient::getOperationAsync()} . + * + * @example samples/OperationsClient/get_operation.php + * + * @param GetOperationRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function getOperation(GetOperationRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('GetOperation', $request, $callOptions)->wait(); + } + + /** + * Lists operations that match the specified filter in the request. If the + * server doesn't support this method, it returns `UNIMPLEMENTED`. + * + * The async variant is {@see OperationsClient::listOperationsAsync()} . + * + * @example samples/OperationsClient/list_operations.php + * + * @param ListOperationsRequest $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 listOperations(ListOperationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListOperations', $request, $callOptions); + } + + /** + * Waits until the specified long-running operation is done or reaches at most + * a specified timeout, returning the latest state. If the operation is + * already done, the latest state is immediately returned. If the timeout + * specified is greater than the default HTTP/RPC timeout, the HTTP/RPC + * timeout is used. If the server does not support this method, it returns + * `google.rpc.Code.UNIMPLEMENTED`. + * Note that this method is on a best-effort basis. It may return the latest + * state before the specified timeout (including immediately), meaning even an + * immediate response is no guarantee that the operation is done. + * + * The async variant is {@see OperationsClient::waitOperationAsync()} . + * + * @example samples/OperationsClient/wait_operation.php + * + * @param WaitOperationRequest $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 Operation + * + * @throws ApiException Thrown if the API call fails. + */ + public function waitOperation(WaitOperationRequest $request, array $callOptions = []): Operation + { + return $this->startApiCall('WaitOperation', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/LongRunning/src/LongRunning/gapic_metadata.json b/owl-bot-staging/LongRunning/src/LongRunning/gapic_metadata.json new file mode 100644 index 000000000000..f31c63933dd7 --- /dev/null +++ b/owl-bot-staging/LongRunning/src/LongRunning/gapic_metadata.json @@ -0,0 +1,43 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.longrunning", + "libraryPackage": "Google\\LongRunning", + "services": { + "Operations": { + "clients": { + "grpc": { + "libraryClient": "OperationsGapicClient", + "rpcs": { + "CancelOperation": { + "methods": [ + "cancelOperation" + ] + }, + "DeleteOperation": { + "methods": [ + "deleteOperation" + ] + }, + "GetOperation": { + "methods": [ + "getOperation" + ] + }, + "ListOperations": { + "methods": [ + "listOperations" + ] + }, + "WaitOperation": { + "methods": [ + "waitOperation" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_client_config.json b/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_client_config.json new file mode 100644 index 000000000000..cbc0a41eb225 --- /dev/null +++ b/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_client_config.json @@ -0,0 +1,59 @@ +{ + "interfaces": { + "google.longrunning.Operations": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 500, + "retry_delay_multiplier": 2.0, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 10000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 10000, + "total_timeout_millis": 10000 + } + }, + "methods": { + "CancelOperation": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteOperation": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetOperation": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListOperations": { + "timeout_millis": 10000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "WaitOperation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_descriptor_config.php b/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_descriptor_config.php new file mode 100644 index 000000000000..8f47a3a01c5f --- /dev/null +++ b/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_descriptor_config.php @@ -0,0 +1,88 @@ + [ + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\LongRunning\Operation', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getOperations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\LongRunning\ListOperationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'WaitOperation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\LongRunning\Operation', + ], + ], + ], +]; diff --git a/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_rest_client_config.php b/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_rest_client_config.php new file mode 100644 index 000000000000..f87ce69e0b6f --- /dev/null +++ b/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_rest_client_config.php @@ -0,0 +1,76 @@ + [ + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=operations/**}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=operations/**}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=operations/**}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=operations}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + 'queryParams' => [ + 'filter', + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/LongRunning/tests/Unit/Client/OperationsClientTest.php b/owl-bot-staging/LongRunning/tests/Unit/Client/OperationsClientTest.php new file mode 100644 index 000000000000..3a3319d7a627 --- /dev/null +++ b/owl-bot-staging/LongRunning/tests/Unit/Client/OperationsClientTest.php @@ -0,0 +1,418 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return OperationsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new OperationsClient($options); + } + + /** @test */ + public function cancelOperationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new CancelOperationRequest()) + ->setName($name); + $gapicClient->cancelOperation($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/CancelOperation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function cancelOperationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new CancelOperationRequest()) + ->setName($name); + try { + $gapicClient->cancelOperation($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 deleteOperationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new DeleteOperationRequest()) + ->setName($name); + $gapicClient->deleteOperation($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/DeleteOperation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteOperationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new DeleteOperationRequest()) + ->setName($name); + try { + $gapicClient->deleteOperation($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 getOperationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $done = true; + $expectedResponse = new Operation(); + $expectedResponse->setName($name2); + $expectedResponse->setDone($done); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new GetOperationRequest()) + ->setName($name); + $response = $gapicClient->getOperation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOperationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $name = 'name3373707'; + $request = (new GetOperationRequest()) + ->setName($name); + try { + $gapicClient->getOperation($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 listOperationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $operationsElement = new Operation(); + $operations = [ + $operationsElement, + ]; + $expectedResponse = new ListOperationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setOperations($operations); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $filter = 'filter-1274492040'; + $request = (new ListOperationsRequest()) + ->setName($name) + ->setFilter($filter); + $response = $gapicClient->listOperations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getOperations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/ListOperations', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getFilter(); + $this->assertProtobufEquals($filter, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOperationsExceptionTest() + { + $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'; + $filter = 'filter-1274492040'; + $request = (new ListOperationsRequest()) + ->setName($name) + ->setFilter($filter); + try { + $gapicClient->listOperations($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 waitOperationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $done = true; + $expectedResponse = new Operation(); + $expectedResponse->setName($name2); + $expectedResponse->setDone($done); + $transport->addResponse($expectedResponse); + $request = new WaitOperationRequest(); + $response = $gapicClient->waitOperation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/WaitOperation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function waitOperationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new WaitOperationRequest(); + try { + $gapicClient->waitOperation($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 cancelOperationAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new CancelOperationRequest()) + ->setName($name); + $gapicClient->cancelOperationAsync($request)->wait(); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/CancelOperation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Trace/v1/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V1/Trace.php b/owl-bot-staging/Trace/v1/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V1/Trace.php new file mode 100644 index 000000000000..b8149934a377 --- /dev/null +++ b/owl-bot-staging/Trace/v1/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V1/Trace.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\x9A\x12\x0A)google/devtools/cloudtrace/v1/trace.proto\x12\x1Dgoogle.devtools.cloudtrace.v1\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Cgoogle/api/annotations.proto\"f\x0A\x05Trace\x12\x12\x0A\x0Aproject_id\x18\x01 \x01(\x09\x12\x10\x0A\x08trace_id\x18\x02 \x01(\x09\x127\x0A\x05spans\x18\x03 \x03(\x0B2(.google.devtools.cloudtrace.v1.TraceSpan\">\x0A\x06Traces\x124\x0A\x06traces\x18\x01 \x03(\x0B2\$.google.devtools.cloudtrace.v1.Trace\"\xA2\x03\x0A\x09TraceSpan\x12\x0F\x0A\x07span_id\x18\x01 \x01(\x06\x12?\x0A\x04kind\x18\x02 \x01(\x0E21.google.devtools.cloudtrace.v1.TraceSpan.SpanKind\x12\x0C\x0A\x04name\x18\x03 \x01(\x09\x12.\x0A\x0Astart_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x1B\x0A\x0Eparent_span_id\x18\x06 \x01(\x06B\x03\xE0A\x01\x12D\x0A\x06labels\x18\x07 \x03(\x0B24.google.devtools.cloudtrace.v1.TraceSpan.LabelsEntry\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"E\x0A\x08SpanKind\x12\x19\x0A\x15SPAN_KIND_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ARPC_SERVER\x10\x01\x12\x0E\x0A\x0ARPC_CLIENT\x10\x02\"\x80\x03\x0A\x11ListTracesRequest\x12\x17\x0A\x0Aproject_id\x18\x01 \x01(\x09B\x03\xE0A\x02\x12L\x0A\x04view\x18\x02 \x01(\x0E29.google.devtools.cloudtrace.v1.ListTracesRequest.ViewTypeB\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\x12.\x0A\x0Astart_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x13\x0A\x06filter\x18\x07 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x08 \x01(\x09B\x03\xE0A\x01\"N\x0A\x08ViewType\x12\x19\x0A\x15VIEW_TYPE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07MINIMAL\x10\x01\x12\x0C\x0A\x08ROOTSPAN\x10\x02\x12\x0C\x0A\x08COMPLETE\x10\x03\"c\x0A\x12ListTracesResponse\x124\x0A\x06traces\x18\x01 \x03(\x0B2\$.google.devtools.cloudtrace.v1.Trace\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"A\x0A\x0FGetTraceRequest\x12\x17\x0A\x0Aproject_id\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x15\x0A\x08trace_id\x18\x02 \x01(\x09B\x03\xE0A\x02\"i\x0A\x12PatchTracesRequest\x12\x17\x0A\x0Aproject_id\x18\x01 \x01(\x09B\x03\xE0A\x02\x12:\x0A\x06traces\x18\x02 \x01(\x0B2%.google.devtools.cloudtrace.v1.TracesB\x03\xE0A\x022\xB5\x05\x0A\x0CTraceService\x12\xA8\x01\x0A\x0AListTraces\x120.google.devtools.cloudtrace.v1.ListTracesRequest\x1A1.google.devtools.cloudtrace.v1.ListTracesResponse\"5\xDAA\x0Aproject_id\x82\xD3\xE4\x93\x02\"\x12 /v1/projects/{project_id}/traces\x12\xAB\x01\x0A\x08GetTrace\x12..google.devtools.cloudtrace.v1.GetTraceRequest\x1A\$.google.devtools.cloudtrace.v1.Trace\"I\xDAA\x13project_id,trace_id\x82\xD3\xE4\x93\x02-\x12+/v1/projects/{project_id}/traces/{trace_id}\x12\x9E\x01\x0A\x0BPatchTraces\x121.google.devtools.cloudtrace.v1.PatchTracesRequest\x1A\x16.google.protobuf.Empty\"D\xDAA\x11project_id,traces\x82\xD3\xE4\x93\x02*2 /v1/projects/{project_id}/traces:\x06traces\x1A\xAA\x01\xCAA\x19cloudtrace.googleapis.com\xD2A\x8A\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/trace.append,https://www.googleapis.com/auth/trace.readonlyB\xAD\x01\x0A!com.google.devtools.cloudtrace.v1B\x0ATraceProtoP\x01Z/cloud.google.com/go/trace/apiv1/tracepb;tracepb\xAA\x02\x15Google.Cloud.Trace.V1\xCA\x02\x15Google\\Cloud\\Trace\\V1\xEA\x02\x18Google::Cloud::Trace::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/GetTraceRequest.php b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/GetTraceRequest.php new file mode 100644 index 000000000000..f019550cf21a --- /dev/null +++ b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/GetTraceRequest.php @@ -0,0 +1,116 @@ +google.devtools.cloudtrace.v1.GetTraceRequest + */ +class GetTraceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. ID of the Cloud project where the trace data is stored. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project_id = ''; + /** + * Required. ID of the trace to return. + * + * Generated from protobuf field string trace_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $trace_id = ''; + + /** + * @param string $projectId Required. ID of the Cloud project where the trace data is stored. + * @param string $traceId Required. ID of the trace to return. + * + * @return \Google\Cloud\Trace\V1\GetTraceRequest + * + * @experimental + */ + public static function build(string $projectId, string $traceId): self + { + return (new self()) + ->setProjectId($projectId) + ->setTraceId($traceId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * Required. ID of the Cloud project where the trace data is stored. + * @type string $trace_id + * Required. ID of the trace to return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Required. ID of the Cloud project where the trace data is stored. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Required. ID of the Cloud project where the trace data is stored. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Required. ID of the trace to return. + * + * Generated from protobuf field string trace_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getTraceId() + { + return $this->trace_id; + } + + /** + * Required. ID of the trace to return. + * + * Generated from protobuf field string trace_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setTraceId($var) + { + GPBUtil::checkString($var, True); + $this->trace_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest.php b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest.php new file mode 100644 index 000000000000..4d9925cffdf9 --- /dev/null +++ b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest.php @@ -0,0 +1,507 @@ +google.devtools.cloudtrace.v1.ListTracesRequest + */ +class ListTracesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. ID of the Cloud project where the trace data is stored. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project_id = ''; + /** + * Optional. Type of data returned for traces in the list. Default is + * `MINIMAL`. + * + * Generated from protobuf field .google.devtools.cloudtrace.v1.ListTracesRequest.ViewType view = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $view = 0; + /** + * Optional. Maximum number of traces to return. If not specified or <= 0, the + * implementation selects a reasonable value. The implementation may + * return fewer traces than the requested page size. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Token identifying the page of results to return. If provided, use the + * value of the `next_page_token` field from a previous request. + * + * Generated from protobuf field string page_token = 4; + */ + protected $page_token = ''; + /** + * Start of the time interval (inclusive) during which the trace data was + * collected from the application. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; + */ + protected $start_time = null; + /** + * End of the time interval (inclusive) during which the trace data was + * collected from the application. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + */ + protected $end_time = null; + /** + * Optional. A filter against labels for the request. + * By default, searches use prefix matching. To specify exact match, prepend + * a plus symbol (`+`) to the search term. + * Multiple terms are ANDed. Syntax: + * * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root + * span starts with `NAME_PREFIX`. + * * `+root:NAME` or `+NAME`: Return traces where any root span's name is + * exactly `NAME`. + * * `span:NAME_PREFIX`: Return traces where any span starts with + * `NAME_PREFIX`. + * * `+span:NAME`: Return traces where any span's name is exactly + * `NAME`. + * * `latency:DURATION`: Return traces whose overall latency is + * greater or equal to than `DURATION`. Accepted units are nanoseconds + * (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For + * example, `latency:24ms` returns traces whose overall latency + * is greater than or equal to 24 milliseconds. + * * `label:LABEL_KEY`: Return all traces containing the specified + * label key (exact match, case-sensitive) regardless of the key:value + * pair's value (including empty values). + * * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified + * label key (exact match, case-sensitive) whose value starts with + * `VALUE_PREFIX`. Both a key and a value must be specified. + * * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair + * exactly matching the specified text. Both a key and a value must be + * specified. + * * `method:VALUE`: Equivalent to `/http/method:VALUE`. + * * `url:VALUE`: Equivalent to `/http/url:VALUE`. + * + * Generated from protobuf field string filter = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Field used to sort the returned traces. + * Can be one of the following: + * * `trace_id` + * * `name` (`name` field of root span in the trace) + * * `duration` (difference between `end_time` and `start_time` fields of + * the root span) + * * `start` (`start_time` field of the root span) + * Descending order can be specified by appending `desc` to the sort field + * (for example, `name desc`). + * Only one sort field is permitted. + * + * Generated from protobuf field string order_by = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * @param string $projectId Required. ID of the Cloud project where the trace data is stored. + * + * @return \Google\Cloud\Trace\V1\ListTracesRequest + * + * @experimental + */ + public static function build(string $projectId): self + { + return (new self()) + ->setProjectId($projectId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * Required. ID of the Cloud project where the trace data is stored. + * @type int $view + * Optional. Type of data returned for traces in the list. Default is + * `MINIMAL`. + * @type int $page_size + * Optional. Maximum number of traces to return. If not specified or <= 0, the + * implementation selects a reasonable value. The implementation may + * return fewer traces than the requested page size. + * @type string $page_token + * Token identifying the page of results to return. If provided, use the + * value of the `next_page_token` field from a previous request. + * @type \Google\Protobuf\Timestamp $start_time + * Start of the time interval (inclusive) during which the trace data was + * collected from the application. + * @type \Google\Protobuf\Timestamp $end_time + * End of the time interval (inclusive) during which the trace data was + * collected from the application. + * @type string $filter + * Optional. A filter against labels for the request. + * By default, searches use prefix matching. To specify exact match, prepend + * a plus symbol (`+`) to the search term. + * Multiple terms are ANDed. Syntax: + * * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root + * span starts with `NAME_PREFIX`. + * * `+root:NAME` or `+NAME`: Return traces where any root span's name is + * exactly `NAME`. + * * `span:NAME_PREFIX`: Return traces where any span starts with + * `NAME_PREFIX`. + * * `+span:NAME`: Return traces where any span's name is exactly + * `NAME`. + * * `latency:DURATION`: Return traces whose overall latency is + * greater or equal to than `DURATION`. Accepted units are nanoseconds + * (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For + * example, `latency:24ms` returns traces whose overall latency + * is greater than or equal to 24 milliseconds. + * * `label:LABEL_KEY`: Return all traces containing the specified + * label key (exact match, case-sensitive) regardless of the key:value + * pair's value (including empty values). + * * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified + * label key (exact match, case-sensitive) whose value starts with + * `VALUE_PREFIX`. Both a key and a value must be specified. + * * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair + * exactly matching the specified text. Both a key and a value must be + * specified. + * * `method:VALUE`: Equivalent to `/http/method:VALUE`. + * * `url:VALUE`: Equivalent to `/http/url:VALUE`. + * @type string $order_by + * Optional. Field used to sort the returned traces. + * Can be one of the following: + * * `trace_id` + * * `name` (`name` field of root span in the trace) + * * `duration` (difference between `end_time` and `start_time` fields of + * the root span) + * * `start` (`start_time` field of the root span) + * Descending order can be specified by appending `desc` to the sort field + * (for example, `name desc`). + * Only one sort field is permitted. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Required. ID of the Cloud project where the trace data is stored. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Required. ID of the Cloud project where the trace data is stored. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Optional. Type of data returned for traces in the list. Default is + * `MINIMAL`. + * + * Generated from protobuf field .google.devtools.cloudtrace.v1.ListTracesRequest.ViewType view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getView() + { + return $this->view; + } + + /** + * Optional. Type of data returned for traces in the list. Default is + * `MINIMAL`. + * + * Generated from protobuf field .google.devtools.cloudtrace.v1.ListTracesRequest.ViewType view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setView($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Trace\V1\ListTracesRequest\ViewType::class); + $this->view = $var; + + return $this; + } + + /** + * Optional. Maximum number of traces to return. If not specified or <= 0, the + * implementation selects a reasonable value. The implementation may + * return fewer traces than the requested page size. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of traces to return. If not specified or <= 0, the + * implementation selects a reasonable value. The implementation may + * return fewer traces than the requested page size. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Token identifying the page of results to return. If provided, use the + * value of the `next_page_token` field from a previous request. + * + * Generated from protobuf field string page_token = 4; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Token identifying the page of results to return. If provided, use the + * value of the `next_page_token` field from a previous request. + * + * Generated from protobuf field string page_token = 4; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Start of the time interval (inclusive) during which the trace data was + * collected from the application. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; + * @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); + } + + /** + * Start of the time interval (inclusive) during which the trace data was + * collected from the application. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * End of the time interval (inclusive) during which the trace data was + * collected from the application. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + * @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); + } + + /** + * End of the time interval (inclusive) during which the trace data was + * collected from the application. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Optional. A filter against labels for the request. + * By default, searches use prefix matching. To specify exact match, prepend + * a plus symbol (`+`) to the search term. + * Multiple terms are ANDed. Syntax: + * * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root + * span starts with `NAME_PREFIX`. + * * `+root:NAME` or `+NAME`: Return traces where any root span's name is + * exactly `NAME`. + * * `span:NAME_PREFIX`: Return traces where any span starts with + * `NAME_PREFIX`. + * * `+span:NAME`: Return traces where any span's name is exactly + * `NAME`. + * * `latency:DURATION`: Return traces whose overall latency is + * greater or equal to than `DURATION`. Accepted units are nanoseconds + * (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For + * example, `latency:24ms` returns traces whose overall latency + * is greater than or equal to 24 milliseconds. + * * `label:LABEL_KEY`: Return all traces containing the specified + * label key (exact match, case-sensitive) regardless of the key:value + * pair's value (including empty values). + * * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified + * label key (exact match, case-sensitive) whose value starts with + * `VALUE_PREFIX`. Both a key and a value must be specified. + * * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair + * exactly matching the specified text. Both a key and a value must be + * specified. + * * `method:VALUE`: Equivalent to `/http/method:VALUE`. + * * `url:VALUE`: Equivalent to `/http/url:VALUE`. + * + * Generated from protobuf field string filter = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. A filter against labels for the request. + * By default, searches use prefix matching. To specify exact match, prepend + * a plus symbol (`+`) to the search term. + * Multiple terms are ANDed. Syntax: + * * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root + * span starts with `NAME_PREFIX`. + * * `+root:NAME` or `+NAME`: Return traces where any root span's name is + * exactly `NAME`. + * * `span:NAME_PREFIX`: Return traces where any span starts with + * `NAME_PREFIX`. + * * `+span:NAME`: Return traces where any span's name is exactly + * `NAME`. + * * `latency:DURATION`: Return traces whose overall latency is + * greater or equal to than `DURATION`. Accepted units are nanoseconds + * (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For + * example, `latency:24ms` returns traces whose overall latency + * is greater than or equal to 24 milliseconds. + * * `label:LABEL_KEY`: Return all traces containing the specified + * label key (exact match, case-sensitive) regardless of the key:value + * pair's value (including empty values). + * * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified + * label key (exact match, case-sensitive) whose value starts with + * `VALUE_PREFIX`. Both a key and a value must be specified. + * * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair + * exactly matching the specified text. Both a key and a value must be + * specified. + * * `method:VALUE`: Equivalent to `/http/method:VALUE`. + * * `url:VALUE`: Equivalent to `/http/url:VALUE`. + * + * Generated from protobuf field string filter = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Field used to sort the returned traces. + * Can be one of the following: + * * `trace_id` + * * `name` (`name` field of root span in the trace) + * * `duration` (difference between `end_time` and `start_time` fields of + * the root span) + * * `start` (`start_time` field of the root span) + * Descending order can be specified by appending `desc` to the sort field + * (for example, `name desc`). + * Only one sort field is permitted. + * + * Generated from protobuf field string order_by = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Field used to sort the returned traces. + * Can be one of the following: + * * `trace_id` + * * `name` (`name` field of root span in the trace) + * * `duration` (difference between `end_time` and `start_time` fields of + * the root span) + * * `start` (`start_time` field of the root span) + * Descending order can be specified by appending `desc` to the sort field + * (for example, `name desc`). + * Only one sort field is permitted. + * + * Generated from protobuf field string order_by = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest/ViewType.php b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest/ViewType.php new file mode 100644 index 000000000000..e66a0222867a --- /dev/null +++ b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest/ViewType.php @@ -0,0 +1,72 @@ +google.devtools.cloudtrace.v1.ListTracesRequest.ViewType + */ +class ViewType +{ + /** + * Default is `MINIMAL` if unspecified. + * + * Generated from protobuf enum VIEW_TYPE_UNSPECIFIED = 0; + */ + const VIEW_TYPE_UNSPECIFIED = 0; + /** + * Minimal view of the trace record that contains only the project + * and trace IDs. + * + * Generated from protobuf enum MINIMAL = 1; + */ + const MINIMAL = 1; + /** + * Root span view of the trace record that returns the root spans along + * with the minimal trace data. + * + * Generated from protobuf enum ROOTSPAN = 2; + */ + const ROOTSPAN = 2; + /** + * Complete view of the trace record that contains the actual trace data. + * This is equivalent to calling the REST `get` or RPC `GetTrace` method + * using the ID of each listed trace. + * + * Generated from protobuf enum COMPLETE = 3; + */ + const COMPLETE = 3; + + private static $valueToName = [ + self::VIEW_TYPE_UNSPECIFIED => 'VIEW_TYPE_UNSPECIFIED', + self::MINIMAL => 'MINIMAL', + self::ROOTSPAN => 'ROOTSPAN', + self::COMPLETE => 'COMPLETE', + ]; + + 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/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesResponse.php b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesResponse.php new file mode 100644 index 000000000000..f7cfcbc991df --- /dev/null +++ b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesResponse.php @@ -0,0 +1,109 @@ +google.devtools.cloudtrace.v1.ListTracesResponse + */ +class ListTracesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of trace records as specified by the view parameter. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.Trace traces = 1; + */ + private $traces; + /** + * If defined, indicates that there are more traces that match the request + * and that this value should be passed to the next request to continue + * retrieving additional traces. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Trace\V1\Trace[] $traces + * List of trace records as specified by the view parameter. + * @type string $next_page_token + * If defined, indicates that there are more traces that match the request + * and that this value should be passed to the next request to continue + * retrieving additional traces. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * List of trace records as specified by the view parameter. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.Trace traces = 1; + * @return RepeatedField<\Google\Cloud\Trace\V1\Trace> + */ + public function getTraces() + { + return $this->traces; + } + + /** + * List of trace records as specified by the view parameter. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.Trace traces = 1; + * @param \Google\Cloud\Trace\V1\Trace[] $var + * @return $this + */ + public function setTraces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V1\Trace::class); + $this->traces = $arr; + + return $this; + } + + /** + * If defined, indicates that there are more traces that match the request + * and that this value should be passed to the next request to continue + * retrieving additional traces. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * If defined, indicates that there are more traces that match the request + * and that this value should be passed to the next request to continue + * retrieving additional traces. + * + * 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/Trace/v1/proto/src/Google/Cloud/Trace/V1/PatchTracesRequest.php b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/PatchTracesRequest.php new file mode 100644 index 000000000000..362847f8ef8a --- /dev/null +++ b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/PatchTracesRequest.php @@ -0,0 +1,126 @@ +google.devtools.cloudtrace.v1.PatchTracesRequest + */ +class PatchTracesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. ID of the Cloud project where the trace data is stored. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $project_id = ''; + /** + * Required. The body of the message. + * + * Generated from protobuf field .google.devtools.cloudtrace.v1.Traces traces = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $traces = null; + + /** + * @param string $projectId Required. ID of the Cloud project where the trace data is stored. + * @param \Google\Cloud\Trace\V1\Traces $traces Required. The body of the message. + * + * @return \Google\Cloud\Trace\V1\PatchTracesRequest + * + * @experimental + */ + public static function build(string $projectId, \Google\Cloud\Trace\V1\Traces $traces): self + { + return (new self()) + ->setProjectId($projectId) + ->setTraces($traces); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * Required. ID of the Cloud project where the trace data is stored. + * @type \Google\Cloud\Trace\V1\Traces $traces + * Required. The body of the message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Required. ID of the Cloud project where the trace data is stored. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Required. ID of the Cloud project where the trace data is stored. + * + * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Required. The body of the message. + * + * Generated from protobuf field .google.devtools.cloudtrace.v1.Traces traces = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Trace\V1\Traces|null + */ + public function getTraces() + { + return $this->traces; + } + + public function hasTraces() + { + return isset($this->traces); + } + + public function clearTraces() + { + unset($this->traces); + } + + /** + * Required. The body of the message. + * + * Generated from protobuf field .google.devtools.cloudtrace.v1.Traces traces = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Trace\V1\Traces $var + * @return $this + */ + public function setTraces($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V1\Traces::class); + $this->traces = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/Trace.php b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/Trace.php new file mode 100644 index 000000000000..8caa6a030853 --- /dev/null +++ b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/Trace.php @@ -0,0 +1,145 @@ +google.devtools.cloudtrace.v1.Trace + */ +class Trace extends \Google\Protobuf\Internal\Message +{ + /** + * Project ID of the Cloud project where the trace data is stored. + * + * Generated from protobuf field string project_id = 1; + */ + protected $project_id = ''; + /** + * Globally unique identifier for the trace. This identifier is a 128-bit + * numeric value formatted as a 32-byte hex string. For example, + * `382d4f4c6b7bb2f4a972559d9085001d`. + * + * Generated from protobuf field string trace_id = 2; + */ + protected $trace_id = ''; + /** + * Collection of spans in the trace. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3; + */ + private $spans; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $project_id + * Project ID of the Cloud project where the trace data is stored. + * @type string $trace_id + * Globally unique identifier for the trace. This identifier is a 128-bit + * numeric value formatted as a 32-byte hex string. For example, + * `382d4f4c6b7bb2f4a972559d9085001d`. + * @type \Google\Cloud\Trace\V1\TraceSpan[] $spans + * Collection of spans in the trace. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Project ID of the Cloud project where the trace data is stored. + * + * Generated from protobuf field string project_id = 1; + * @return string + */ + public function getProjectId() + { + return $this->project_id; + } + + /** + * Project ID of the Cloud project where the trace data is stored. + * + * Generated from protobuf field string project_id = 1; + * @param string $var + * @return $this + */ + public function setProjectId($var) + { + GPBUtil::checkString($var, True); + $this->project_id = $var; + + return $this; + } + + /** + * Globally unique identifier for the trace. This identifier is a 128-bit + * numeric value formatted as a 32-byte hex string. For example, + * `382d4f4c6b7bb2f4a972559d9085001d`. + * + * Generated from protobuf field string trace_id = 2; + * @return string + */ + public function getTraceId() + { + return $this->trace_id; + } + + /** + * Globally unique identifier for the trace. This identifier is a 128-bit + * numeric value formatted as a 32-byte hex string. For example, + * `382d4f4c6b7bb2f4a972559d9085001d`. + * + * Generated from protobuf field string trace_id = 2; + * @param string $var + * @return $this + */ + public function setTraceId($var) + { + GPBUtil::checkString($var, True); + $this->trace_id = $var; + + return $this; + } + + /** + * Collection of spans in the trace. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3; + * @return RepeatedField<\Google\Cloud\Trace\V1\TraceSpan> + */ + public function getSpans() + { + return $this->spans; + } + + /** + * Collection of spans in the trace. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3; + * @param \Google\Cloud\Trace\V1\TraceSpan[] $var + * @return $this + */ + public function setSpans($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V1\TraceSpan::class); + $this->spans = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/TraceSpan.php b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/TraceSpan.php new file mode 100644 index 000000000000..9364dc166515 --- /dev/null +++ b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/TraceSpan.php @@ -0,0 +1,451 @@ +google.devtools.cloudtrace.v1.TraceSpan + */ +class TraceSpan extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier for the span. Must be a 64-bit integer other than 0 and + * unique within a trace. For example, `2205310701640571284`. + * + * Generated from protobuf field fixed64 span_id = 1; + */ + protected $span_id = 0; + /** + * Distinguishes between spans generated in a particular context. For example, + * two spans with the same name may be distinguished using `RPC_CLIENT` + * and `RPC_SERVER` to identify queueing latency associated with the span. + * + * Generated from protobuf field .google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2; + */ + protected $kind = 0; + /** + * Name of the span. Must be less than 128 bytes. The span name is sanitized + * and displayed in the Stackdriver Trace tool in the + * Google Cloud Platform Console. + * The name may be a method name or some other per-call site name. + * For the same executable and the same call point, a best practice is + * to use a consistent name, which makes it easier to correlate + * cross-trace spans. + * + * Generated from protobuf field string name = 3; + */ + protected $name = ''; + /** + * Start time of the span in nanoseconds from the UNIX epoch. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + */ + protected $start_time = null; + /** + * End time of the span in nanoseconds from the UNIX epoch. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; + */ + protected $end_time = null; + /** + * Optional. ID of the parent span, if any. + * + * Generated from protobuf field fixed64 parent_span_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $parent_span_id = 0; + /** + * Collection of labels associated with the span. Label keys must be less than + * 128 bytes. Label values must be less than 16 kilobytes (10MB for + * `/stacktrace` values). + * Some predefined label keys exist, or you may create your own. When creating + * your own, we recommend the following formats: + * * `/category/product/key` for agents of well-known products (e.g. + * `/db/mongodb/read_size`). + * * `short_host/path/key` for domain-specific keys (e.g. + * `foo.com/myproduct/bar`) + * Predefined labels include: + * * `/agent` + * * `/component` + * * `/error/message` + * * `/error/name` + * * `/http/client_city` + * * `/http/client_country` + * * `/http/client_protocol` + * * `/http/client_region` + * * `/http/host` + * * `/http/method` + * * `/http/path` + * * `/http/redirected_url` + * * `/http/request/size` + * * `/http/response/size` + * * `/http/route` + * * `/http/status_code` + * * `/http/url` + * * `/http/user_agent` + * * `/pid` + * * `/stacktrace` + * * `/tid` + * + * Generated from protobuf field map labels = 7; + */ + private $labels; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $span_id + * Identifier for the span. Must be a 64-bit integer other than 0 and + * unique within a trace. For example, `2205310701640571284`. + * @type int $kind + * Distinguishes between spans generated in a particular context. For example, + * two spans with the same name may be distinguished using `RPC_CLIENT` + * and `RPC_SERVER` to identify queueing latency associated with the span. + * @type string $name + * Name of the span. Must be less than 128 bytes. The span name is sanitized + * and displayed in the Stackdriver Trace tool in the + * Google Cloud Platform Console. + * The name may be a method name or some other per-call site name. + * For the same executable and the same call point, a best practice is + * to use a consistent name, which makes it easier to correlate + * cross-trace spans. + * @type \Google\Protobuf\Timestamp $start_time + * Start time of the span in nanoseconds from the UNIX epoch. + * @type \Google\Protobuf\Timestamp $end_time + * End time of the span in nanoseconds from the UNIX epoch. + * @type int|string $parent_span_id + * Optional. ID of the parent span, if any. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Collection of labels associated with the span. Label keys must be less than + * 128 bytes. Label values must be less than 16 kilobytes (10MB for + * `/stacktrace` values). + * Some predefined label keys exist, or you may create your own. When creating + * your own, we recommend the following formats: + * * `/category/product/key` for agents of well-known products (e.g. + * `/db/mongodb/read_size`). + * * `short_host/path/key` for domain-specific keys (e.g. + * `foo.com/myproduct/bar`) + * Predefined labels include: + * * `/agent` + * * `/component` + * * `/error/message` + * * `/error/name` + * * `/http/client_city` + * * `/http/client_country` + * * `/http/client_protocol` + * * `/http/client_region` + * * `/http/host` + * * `/http/method` + * * `/http/path` + * * `/http/redirected_url` + * * `/http/request/size` + * * `/http/response/size` + * * `/http/route` + * * `/http/status_code` + * * `/http/url` + * * `/http/user_agent` + * * `/pid` + * * `/stacktrace` + * * `/tid` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Identifier for the span. Must be a 64-bit integer other than 0 and + * unique within a trace. For example, `2205310701640571284`. + * + * Generated from protobuf field fixed64 span_id = 1; + * @return int|string + */ + public function getSpanId() + { + return $this->span_id; + } + + /** + * Identifier for the span. Must be a 64-bit integer other than 0 and + * unique within a trace. For example, `2205310701640571284`. + * + * Generated from protobuf field fixed64 span_id = 1; + * @param int|string $var + * @return $this + */ + public function setSpanId($var) + { + GPBUtil::checkUint64($var); + $this->span_id = $var; + + return $this; + } + + /** + * Distinguishes between spans generated in a particular context. For example, + * two spans with the same name may be distinguished using `RPC_CLIENT` + * and `RPC_SERVER` to identify queueing latency associated with the span. + * + * Generated from protobuf field .google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2; + * @return int + */ + public function getKind() + { + return $this->kind; + } + + /** + * Distinguishes between spans generated in a particular context. For example, + * two spans with the same name may be distinguished using `RPC_CLIENT` + * and `RPC_SERVER` to identify queueing latency associated with the span. + * + * Generated from protobuf field .google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2; + * @param int $var + * @return $this + */ + public function setKind($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Trace\V1\TraceSpan\SpanKind::class); + $this->kind = $var; + + return $this; + } + + /** + * Name of the span. Must be less than 128 bytes. The span name is sanitized + * and displayed in the Stackdriver Trace tool in the + * Google Cloud Platform Console. + * The name may be a method name or some other per-call site name. + * For the same executable and the same call point, a best practice is + * to use a consistent name, which makes it easier to correlate + * cross-trace spans. + * + * Generated from protobuf field string name = 3; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the span. Must be less than 128 bytes. The span name is sanitized + * and displayed in the Stackdriver Trace tool in the + * Google Cloud Platform Console. + * The name may be a method name or some other per-call site name. + * For the same executable and the same call point, a best practice is + * to use a consistent name, which makes it easier to correlate + * cross-trace spans. + * + * Generated from protobuf field string name = 3; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Start time of the span in nanoseconds from the UNIX epoch. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; + * @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); + } + + /** + * Start time of the span in nanoseconds from the UNIX epoch. + * + * 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->start_time = $var; + + return $this; + } + + /** + * End time of the span in nanoseconds from the UNIX epoch. + * + * 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); + } + + /** + * End time of the span in nanoseconds from the UNIX epoch. + * + * 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; + } + + /** + * Optional. ID of the parent span, if any. + * + * Generated from protobuf field fixed64 parent_span_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|string + */ + public function getParentSpanId() + { + return $this->parent_span_id; + } + + /** + * Optional. ID of the parent span, if any. + * + * Generated from protobuf field fixed64 parent_span_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|string $var + * @return $this + */ + public function setParentSpanId($var) + { + GPBUtil::checkUint64($var); + $this->parent_span_id = $var; + + return $this; + } + + /** + * Collection of labels associated with the span. Label keys must be less than + * 128 bytes. Label values must be less than 16 kilobytes (10MB for + * `/stacktrace` values). + * Some predefined label keys exist, or you may create your own. When creating + * your own, we recommend the following formats: + * * `/category/product/key` for agents of well-known products (e.g. + * `/db/mongodb/read_size`). + * * `short_host/path/key` for domain-specific keys (e.g. + * `foo.com/myproduct/bar`) + * Predefined labels include: + * * `/agent` + * * `/component` + * * `/error/message` + * * `/error/name` + * * `/http/client_city` + * * `/http/client_country` + * * `/http/client_protocol` + * * `/http/client_region` + * * `/http/host` + * * `/http/method` + * * `/http/path` + * * `/http/redirected_url` + * * `/http/request/size` + * * `/http/response/size` + * * `/http/route` + * * `/http/status_code` + * * `/http/url` + * * `/http/user_agent` + * * `/pid` + * * `/stacktrace` + * * `/tid` + * + * Generated from protobuf field map labels = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Collection of labels associated with the span. Label keys must be less than + * 128 bytes. Label values must be less than 16 kilobytes (10MB for + * `/stacktrace` values). + * Some predefined label keys exist, or you may create your own. When creating + * your own, we recommend the following formats: + * * `/category/product/key` for agents of well-known products (e.g. + * `/db/mongodb/read_size`). + * * `short_host/path/key` for domain-specific keys (e.g. + * `foo.com/myproduct/bar`) + * Predefined labels include: + * * `/agent` + * * `/component` + * * `/error/message` + * * `/error/name` + * * `/http/client_city` + * * `/http/client_country` + * * `/http/client_protocol` + * * `/http/client_region` + * * `/http/host` + * * `/http/method` + * * `/http/path` + * * `/http/redirected_url` + * * `/http/request/size` + * * `/http/response/size` + * * `/http/route` + * * `/http/status_code` + * * `/http/url` + * * `/http/user_agent` + * * `/pid` + * * `/stacktrace` + * * `/tid` + * + * Generated from protobuf field map labels = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/TraceSpan/SpanKind.php b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/TraceSpan/SpanKind.php new file mode 100644 index 000000000000..942aedebb833 --- /dev/null +++ b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/TraceSpan/SpanKind.php @@ -0,0 +1,64 @@ +google.devtools.cloudtrace.v1.TraceSpan.SpanKind + */ +class SpanKind +{ + /** + * Unspecified. + * + * Generated from protobuf enum SPAN_KIND_UNSPECIFIED = 0; + */ + const SPAN_KIND_UNSPECIFIED = 0; + /** + * Indicates that the span covers server-side handling of an RPC or other + * remote network request. + * + * Generated from protobuf enum RPC_SERVER = 1; + */ + const RPC_SERVER = 1; + /** + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. + * + * Generated from protobuf enum RPC_CLIENT = 2; + */ + const RPC_CLIENT = 2; + + private static $valueToName = [ + self::SPAN_KIND_UNSPECIFIED => 'SPAN_KIND_UNSPECIFIED', + self::RPC_SERVER => 'RPC_SERVER', + self::RPC_CLIENT => 'RPC_CLIENT', + ]; + + 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/Trace/v1/proto/src/Google/Cloud/Trace/V1/Traces.php b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/Traces.php new file mode 100644 index 000000000000..01f9ab1e640e --- /dev/null +++ b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/Traces.php @@ -0,0 +1,67 @@ +google.devtools.cloudtrace.v1.Traces + */ +class Traces extends \Google\Protobuf\Internal\Message +{ + /** + * List of traces. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.Trace traces = 1; + */ + private $traces; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Trace\V1\Trace[] $traces + * List of traces. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); + parent::__construct($data); + } + + /** + * List of traces. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.Trace traces = 1; + * @return RepeatedField<\Google\Cloud\Trace\V1\Trace> + */ + public function getTraces() + { + return $this->traces; + } + + /** + * List of traces. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.Trace traces = 1; + * @param \Google\Cloud\Trace\V1\Trace[] $var + * @return $this + */ + public function setTraces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V1\Trace::class); + $this->traces = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/get_trace.php b/owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/get_trace.php new file mode 100644 index 000000000000..4b813e4c2263 --- /dev/null +++ b/owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/get_trace.php @@ -0,0 +1,73 @@ +setProjectId($projectId) + ->setTraceId($traceId); + + // Call the API and handle any network failures. + try { + /** @var Trace $response */ + $response = $traceServiceClient->getTrace($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $projectId = '[PROJECT_ID]'; + $traceId = '[TRACE_ID]'; + + get_trace_sample($projectId, $traceId); +} +// [END cloudtrace_v1_generated_TraceService_GetTrace_sync] diff --git a/owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/list_traces.php b/owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/list_traces.php new file mode 100644 index 000000000000..663bbc384d0a --- /dev/null +++ b/owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/list_traces.php @@ -0,0 +1,75 @@ +setProjectId($projectId); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $traceServiceClient->listTraces($request); + + /** @var Trace $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 +{ + $projectId = '[PROJECT_ID]'; + + list_traces_sample($projectId); +} +// [END cloudtrace_v1_generated_TraceService_ListTraces_sync] diff --git a/owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/patch_traces.php b/owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/patch_traces.php new file mode 100644 index 000000000000..d8668ae741de --- /dev/null +++ b/owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/patch_traces.php @@ -0,0 +1,75 @@ +setProjectId($projectId) + ->setTraces($traces); + + // Call the API and handle any network failures. + try { + $traceServiceClient->patchTraces($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $projectId = '[PROJECT_ID]'; + + patch_traces_sample($projectId); +} +// [END cloudtrace_v1_generated_TraceService_PatchTraces_sync] diff --git a/owl-bot-staging/Trace/v1/src/V1/Client/TraceServiceClient.php b/owl-bot-staging/Trace/v1/src/V1/Client/TraceServiceClient.php new file mode 100644 index 000000000000..99e30160e015 --- /dev/null +++ b/owl-bot-staging/Trace/v1/src/V1/Client/TraceServiceClient.php @@ -0,0 +1,270 @@ + getTraceAsync(GetTraceRequest $request, array $optionalArgs = []) + * @method PromiseInterface listTracesAsync(ListTracesRequest $request, array $optionalArgs = []) + * @method PromiseInterface patchTracesAsync(PatchTracesRequest $request, array $optionalArgs = []) + */ +final class TraceServiceClient +{ + use GapicClientTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.devtools.cloudtrace.v1.TraceService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudtrace.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudtrace.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/trace.append', + 'https://www.googleapis.com/auth/trace.readonly', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/trace_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/trace_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/trace_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/trace_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'cloudtrace.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Trace\V1\TraceServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new TraceServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Gets a single trace by its ID. + * + * The async variant is {@see TraceServiceClient::getTraceAsync()} . + * + * @example samples/V1/TraceServiceClient/get_trace.php + * + * @param GetTraceRequest $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 Trace + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTrace(GetTraceRequest $request, array $callOptions = []): Trace + { + return $this->startApiCall('GetTrace', $request, $callOptions)->wait(); + } + + /** + * Returns of a list of traces that match the specified filter conditions. + * + * The async variant is {@see TraceServiceClient::listTracesAsync()} . + * + * @example samples/V1/TraceServiceClient/list_traces.php + * + * @param ListTracesRequest $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 listTraces(ListTracesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTraces', $request, $callOptions); + } + + /** + * Sends new traces to Stackdriver Trace or updates existing traces. If the ID + * of a trace that you send matches that of an existing trace, any fields + * in the existing trace and its spans are overwritten by the provided values, + * and any new fields provided are merged with the existing trace data. If the + * ID does not match, a new trace is created. + * + * The async variant is {@see TraceServiceClient::patchTracesAsync()} . + * + * @example samples/V1/TraceServiceClient/patch_traces.php + * + * @param PatchTracesRequest $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 patchTraces(PatchTracesRequest $request, array $callOptions = []): void + { + $this->startApiCall('PatchTraces', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Trace/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Trace/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..da0965fdc210 --- /dev/null +++ b/owl-bot-staging/Trace/v1/src/V1/gapic_metadata.json @@ -0,0 +1,33 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.devtools.cloudtrace.v1", + "libraryPackage": "Google\\Cloud\\Trace\\V1", + "services": { + "TraceService": { + "clients": { + "grpc": { + "libraryClient": "TraceServiceGapicClient", + "rpcs": { + "GetTrace": { + "methods": [ + "getTrace" + ] + }, + "ListTraces": { + "methods": [ + "listTraces" + ] + }, + "PatchTraces": { + "methods": [ + "patchTraces" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Trace/v1/src/V1/resources/trace_service_client_config.json b/owl-bot-staging/Trace/v1/src/V1/resources/trace_service_client_config.json new file mode 100644 index 000000000000..7c905cf282d2 --- /dev/null +++ b/owl-bot-staging/Trace/v1/src/V1/resources/trace_service_client_config.json @@ -0,0 +1,50 @@ +{ + "interfaces": { + "google.devtools.cloudtrace.v1.TraceService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.2, + "max_retry_delay_millis": 1000, + "initial_rpc_timeout_millis": 45000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 45000, + "total_timeout_millis": 45000 + } + }, + "methods": { + "GetTrace": { + "timeout_millis": 45000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTraces": { + "timeout_millis": 45000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "PatchTraces": { + "timeout_millis": 45000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Trace/v1/src/V1/resources/trace_service_descriptor_config.php b/owl-bot-staging/Trace/v1/src/V1/resources/trace_service_descriptor_config.php new file mode 100644 index 000000000000..42918bb58eaa --- /dev/null +++ b/owl-bot-staging/Trace/v1/src/V1/resources/trace_service_descriptor_config.php @@ -0,0 +1,78 @@ + [ + 'google.devtools.cloudtrace.v1.TraceService' => [ + 'GetTrace' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Trace\V1\Trace', + 'headerParams' => [ + [ + 'keyName' => 'project_id', + 'fieldAccessors' => [ + 'getProjectId', + ], + ], + [ + 'keyName' => 'trace_id', + 'fieldAccessors' => [ + 'getTraceId', + ], + ], + ], + ], + 'ListTraces' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTraces', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Trace\V1\ListTracesResponse', + 'headerParams' => [ + [ + 'keyName' => 'project_id', + 'fieldAccessors' => [ + 'getProjectId', + ], + ], + ], + ], + 'PatchTraces' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'project_id', + 'fieldAccessors' => [ + 'getProjectId', + ], + ], + ], + ], + ], + ], +]; diff --git a/owl-bot-staging/Trace/v1/src/V1/resources/trace_service_rest_client_config.php b/owl-bot-staging/Trace/v1/src/V1/resources/trace_service_rest_client_config.php new file mode 100644 index 000000000000..c4ffa5774291 --- /dev/null +++ b/owl-bot-staging/Trace/v1/src/V1/resources/trace_service_rest_client_config.php @@ -0,0 +1,68 @@ + [ + 'google.devtools.cloudtrace.v1.TraceService' => [ + 'GetTrace' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project_id}/traces/{trace_id}', + 'placeholders' => [ + 'project_id' => [ + 'getters' => [ + 'getProjectId', + ], + ], + 'trace_id' => [ + 'getters' => [ + 'getTraceId', + ], + ], + ], + ], + 'ListTraces' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/projects/{project_id}/traces', + 'placeholders' => [ + 'project_id' => [ + 'getters' => [ + 'getProjectId', + ], + ], + ], + ], + 'PatchTraces' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/projects/{project_id}/traces', + 'body' => 'traces', + 'placeholders' => [ + 'project_id' => [ + 'getters' => [ + 'getProjectId', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Trace/v1/tests/Unit/V1/Client/TraceServiceClientTest.php b/owl-bot-staging/Trace/v1/tests/Unit/V1/Client/TraceServiceClientTest.php new file mode 100644 index 000000000000..a67c6ecebd5d --- /dev/null +++ b/owl-bot-staging/Trace/v1/tests/Unit/V1/Client/TraceServiceClientTest.php @@ -0,0 +1,313 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TraceServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TraceServiceClient($options); + } + + /** @test */ + public function getTraceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $projectId2 = 'projectId2939242356'; + $traceId2 = 'traceId2987826376'; + $expectedResponse = new Trace(); + $expectedResponse->setProjectId($projectId2); + $expectedResponse->setTraceId($traceId2); + $transport->addResponse($expectedResponse); + // Mock request + $projectId = 'projectId-1969970175'; + $traceId = 'traceId1270300245'; + $request = (new GetTraceRequest()) + ->setProjectId($projectId) + ->setTraceId($traceId); + $response = $gapicClient->getTrace($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.cloudtrace.v1.TraceService/GetTrace', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectId(); + $this->assertProtobufEquals($projectId, $actualValue); + $actualValue = $actualRequestObject->getTraceId(); + $this->assertProtobufEquals($traceId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTraceExceptionTest() + { + $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 + $projectId = 'projectId-1969970175'; + $traceId = 'traceId1270300245'; + $request = (new GetTraceRequest()) + ->setProjectId($projectId) + ->setTraceId($traceId); + try { + $gapicClient->getTrace($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 listTracesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $tracesElement = new Trace(); + $traces = [ + $tracesElement, + ]; + $expectedResponse = new ListTracesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTraces($traces); + $transport->addResponse($expectedResponse); + // Mock request + $projectId = 'projectId-1969970175'; + $request = (new ListTracesRequest()) + ->setProjectId($projectId); + $response = $gapicClient->listTraces($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTraces()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.cloudtrace.v1.TraceService/ListTraces', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectId(); + $this->assertProtobufEquals($projectId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTracesExceptionTest() + { + $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 + $projectId = 'projectId-1969970175'; + $request = (new ListTracesRequest()) + ->setProjectId($projectId); + try { + $gapicClient->listTraces($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 patchTracesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $projectId = 'projectId-1969970175'; + $traces = new Traces(); + $request = (new PatchTracesRequest()) + ->setProjectId($projectId) + ->setTraces($traces); + $gapicClient->patchTraces($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.cloudtrace.v1.TraceService/PatchTraces', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectId(); + $this->assertProtobufEquals($projectId, $actualValue); + $actualValue = $actualRequestObject->getTraces(); + $this->assertProtobufEquals($traces, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function patchTracesExceptionTest() + { + $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 + $projectId = 'projectId-1969970175'; + $traces = new Traces(); + $request = (new PatchTracesRequest()) + ->setProjectId($projectId) + ->setTraces($traces); + try { + $gapicClient->patchTraces($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 getTraceAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $projectId2 = 'projectId2939242356'; + $traceId2 = 'traceId2987826376'; + $expectedResponse = new Trace(); + $expectedResponse->setProjectId($projectId2); + $expectedResponse->setTraceId($traceId2); + $transport->addResponse($expectedResponse); + // Mock request + $projectId = 'projectId-1969970175'; + $traceId = 'traceId1270300245'; + $request = (new GetTraceRequest()) + ->setProjectId($projectId) + ->setTraceId($traceId); + $response = $gapicClient->getTraceAsync($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.devtools.cloudtrace.v1.TraceService/GetTrace', $actualFuncCall); + $actualValue = $actualRequestObject->getProjectId(); + $this->assertProtobufEquals($projectId, $actualValue); + $actualValue = $actualRequestObject->getTraceId(); + $this->assertProtobufEquals($traceId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Trace/v2/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V2/Trace.php b/owl-bot-staging/Trace/v2/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V2/Trace.php new file mode 100644 index 000000000000..5e3b5365f37b --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V2/Trace.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xDB\x1C\x0A)google/devtools/cloudtrace/v2/trace.proto\x12\x1Dgoogle.devtools.cloudtrace.v2\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Egoogle/protobuf/wrappers.proto\x1A\x17google/rpc/status.proto\"\xF1\x11\x0A\x04Span\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x14\x0A\x07span_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x16\x0A\x0Eparent_span_id\x18\x03 \x01(\x09\x12K\x0A\x0Cdisplay_name\x18\x04 \x01(\x0B20.google.devtools.cloudtrace.v2.TruncatableStringB\x03\xE0A\x02\x123\x0A\x0Astart_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x02\x121\x0A\x08end_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x02\x12B\x0A\x0Aattributes\x18\x07 \x01(\x0B2..google.devtools.cloudtrace.v2.Span.Attributes\x12>\x0A\x0Bstack_trace\x18\x08 \x01(\x0B2).google.devtools.cloudtrace.v2.StackTrace\x12C\x0A\x0Btime_events\x18\x09 \x01(\x0B2..google.devtools.cloudtrace.v2.Span.TimeEvents\x128\x0A\x05links\x18\x0A \x01(\x0B2).google.devtools.cloudtrace.v2.Span.Links\x12'\x0A\x06status\x18\x0B \x01(\x0B2\x12.google.rpc.StatusB\x03\xE0A\x01\x12D\x0A\x1Bsame_process_as_parent_span\x18\x0C \x01(\x0B2\x1A.google.protobuf.BoolValueB\x03\xE0A\x01\x12:\x0A\x10child_span_count\x18\x0D \x01(\x0B2\x1B.google.protobuf.Int32ValueB\x03\xE0A\x01\x12D\x0A\x09span_kind\x18\x0E \x01(\x0E2,.google.devtools.cloudtrace.v2.Span.SpanKindB\x03\xE0A\x01\x1A\xEB\x01\x0A\x0AAttributes\x12W\x0A\x0Dattribute_map\x18\x01 \x03(\x0B2@.google.devtools.cloudtrace.v2.Span.Attributes.AttributeMapEntry\x12 \x0A\x18dropped_attributes_count\x18\x02 \x01(\x05\x1Ab\x0A\x11AttributeMapEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12<\x0A\x05value\x18\x02 \x01(\x0B2-.google.devtools.cloudtrace.v2.AttributeValue:\x028\x01\x1A\xDF\x04\x0A\x09TimeEvent\x12(\x0A\x04time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12N\x0A\x0Aannotation\x18\x02 \x01(\x0B28.google.devtools.cloudtrace.v2.Span.TimeEvent.AnnotationH\x00\x12S\x0A\x0Dmessage_event\x18\x03 \x01(\x0B2:.google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEventH\x00\x1A\x97\x01\x0A\x0AAnnotation\x12E\x0A\x0Bdescription\x18\x01 \x01(\x0B20.google.devtools.cloudtrace.v2.TruncatableString\x12B\x0A\x0Aattributes\x18\x02 \x01(\x0B2..google.devtools.cloudtrace.v2.Span.Attributes\x1A\xDF\x01\x0A\x0CMessageEvent\x12M\x0A\x04type\x18\x01 \x01(\x0E2?.google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.Type\x12\x0A\x0A\x02id\x18\x02 \x01(\x03\x12\x1F\x0A\x17uncompressed_size_bytes\x18\x03 \x01(\x03\x12\x1D\x0A\x15compressed_size_bytes\x18\x04 \x01(\x03\"4\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04SENT\x10\x01\x12\x0C\x0A\x08RECEIVED\x10\x02B\x07\x0A\x05value\x1A\x98\x01\x0A\x0ATimeEvents\x12A\x0A\x0Atime_event\x18\x01 \x03(\x0B2-.google.devtools.cloudtrace.v2.Span.TimeEvent\x12!\x0A\x19dropped_annotations_count\x18\x02 \x01(\x05\x12\$\x0A\x1Cdropped_message_events_count\x18\x03 \x01(\x05\x1A\xF7\x01\x0A\x04Link\x12\x10\x0A\x08trace_id\x18\x01 \x01(\x09\x12\x0F\x0A\x07span_id\x18\x02 \x01(\x09\x12;\x0A\x04type\x18\x03 \x01(\x0E2-.google.devtools.cloudtrace.v2.Span.Link.Type\x12B\x0A\x0Aattributes\x18\x04 \x01(\x0B2..google.devtools.cloudtrace.v2.Span.Attributes\"K\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\x0A\x11CHILD_LINKED_SPAN\x10\x01\x12\x16\x0A\x12PARENT_LINKED_SPAN\x10\x02\x1A\\\x0A\x05Links\x126\x0A\x04link\x18\x01 \x03(\x0B2(.google.devtools.cloudtrace.v2.Span.Link\x12\x1B\x0A\x13dropped_links_count\x18\x02 \x01(\x05\"g\x0A\x08SpanKind\x12\x19\x0A\x15SPAN_KIND_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08INTERNAL\x10\x01\x12\x0A\x0A\x06SERVER\x10\x02\x12\x0A\x0A\x06CLIENT\x10\x03\x12\x0C\x0A\x08PRODUCER\x10\x04\x12\x0C\x0A\x08CONSUMER\x10\x05:S\xEAAP\x0A\x1Ecloudtrace.googleapis.com/Span\x12.projects/{project}/traces/{trace}/spans/{span}\"\x8E\x01\x0A\x0EAttributeValue\x12H\x0A\x0Cstring_value\x18\x01 \x01(\x0B20.google.devtools.cloudtrace.v2.TruncatableStringH\x00\x12\x13\x0A\x09int_value\x18\x02 \x01(\x03H\x00\x12\x14\x0A\x0Abool_value\x18\x03 \x01(\x08H\x00B\x07\x0A\x05value\"\x89\x05\x0A\x0AStackTrace\x12K\x0A\x0Cstack_frames\x18\x01 \x01(\x0B25.google.devtools.cloudtrace.v2.StackTrace.StackFrames\x12\x1B\x0A\x13stack_trace_hash_id\x18\x02 \x01(\x03\x1A\x9E\x03\x0A\x0AStackFrame\x12G\x0A\x0Dfunction_name\x18\x01 \x01(\x0B20.google.devtools.cloudtrace.v2.TruncatableString\x12P\x0A\x16original_function_name\x18\x02 \x01(\x0B20.google.devtools.cloudtrace.v2.TruncatableString\x12C\x0A\x09file_name\x18\x03 \x01(\x0B20.google.devtools.cloudtrace.v2.TruncatableString\x12\x13\x0A\x0Bline_number\x18\x04 \x01(\x03\x12\x15\x0A\x0Dcolumn_number\x18\x05 \x01(\x03\x12:\x0A\x0Bload_module\x18\x06 \x01(\x0B2%.google.devtools.cloudtrace.v2.Module\x12H\x0A\x0Esource_version\x18\x07 \x01(\x0B20.google.devtools.cloudtrace.v2.TruncatableString\x1Ap\x0A\x0BStackFrames\x12C\x0A\x05frame\x18\x01 \x03(\x0B24.google.devtools.cloudtrace.v2.StackTrace.StackFrame\x12\x1C\x0A\x14dropped_frames_count\x18\x02 \x01(\x05\"\x8E\x01\x0A\x06Module\x12@\x0A\x06module\x18\x01 \x01(\x0B20.google.devtools.cloudtrace.v2.TruncatableString\x12B\x0A\x08build_id\x18\x02 \x01(\x0B20.google.devtools.cloudtrace.v2.TruncatableString\"@\x0A\x11TruncatableString\x12\x0D\x0A\x05value\x18\x01 \x01(\x09\x12\x1C\x0A\x14truncated_byte_count\x18\x02 \x01(\x05B\xAD\x01\x0A!com.google.devtools.cloudtrace.v2B\x0ATraceProtoP\x01Z/cloud.google.com/go/trace/apiv2/tracepb;tracepb\xAA\x02\x15Google.Cloud.Trace.V2\xCA\x02\x15Google\\Cloud\\Trace\\V2\xEA\x02\x18Google::Cloud::Trace::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Trace/v2/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V2/Tracing.php b/owl-bot-staging/Trace/v2/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V2/Tracing.php new file mode 100644 index 000000000000..dae2966934fc --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V2/Tracing.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + "\x0A\xF7\x07\x0A+google/devtools/cloudtrace/v2/tracing.proto\x12\x1Dgoogle.devtools.cloudtrace.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A)google/devtools/cloudtrace/v2/trace.proto\x1A\x1Bgoogle/protobuf/empty.proto\"\x94\x01\x0A\x16BatchWriteSpansRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+cloudresourcemanager.googleapis.com/Project\x127\x0A\x05spans\x18\x02 \x03(\x0B2#.google.devtools.cloudtrace.v2.SpanB\x03\xE0A\x022\xBA\x03\x0A\x0CTraceService\x12\xA1\x01\x0A\x0FBatchWriteSpans\x125.google.devtools.cloudtrace.v2.BatchWriteSpansRequest\x1A\x16.google.protobuf.Empty\"?\xDAA\x0Aname,spans\x82\xD3\xE4\x93\x02,\"'/v2/{name=projects/*}/traces:batchWrite:\x01*\x12\x89\x01\x0A\x0ACreateSpan\x12#.google.devtools.cloudtrace.v2.Span\x1A#.google.devtools.cloudtrace.v2.Span\"1\x82\xD3\xE4\x93\x02+\"&/v2/{name=projects/*/traces/*/spans/*}:\x01*\x1Az\xCAA\x19cloudtrace.googleapis.com\xD2A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/trace.appendB\xAF\x01\x0A!com.google.devtools.cloudtrace.v2B\x0CTracingProtoP\x01Z/cloud.google.com/go/trace/apiv2/tracepb;tracepb\xAA\x02\x15Google.Cloud.Trace.V2\xCA\x02\x15Google\\Cloud\\Trace\\V2\xEA\x02\x18Google::Cloud::Trace::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/AttributeValue.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/AttributeValue.php new file mode 100644 index 000000000000..00a274d4a79d --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/AttributeValue.php @@ -0,0 +1,141 @@ +google.devtools.cloudtrace.v2.AttributeValue + */ +class AttributeValue extends \Google\Protobuf\Internal\Message +{ + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Trace\V2\TruncatableString $string_value + * A string up to 256 bytes long. + * @type int|string $int_value + * A 64-bit signed integer. + * @type bool $bool_value + * A Boolean value represented by `true` or `false`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); + parent::__construct($data); + } + + /** + * A string up to 256 bytes long. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString string_value = 1; + * @return \Google\Cloud\Trace\V2\TruncatableString|null + */ + public function getStringValue() + { + return $this->readOneof(1); + } + + public function hasStringValue() + { + return $this->hasOneof(1); + } + + /** + * A string up to 256 bytes long. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString string_value = 1; + * @param \Google\Cloud\Trace\V2\TruncatableString $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A 64-bit signed integer. + * + * Generated from protobuf field int64 int_value = 2; + * @return int|string + */ + public function getIntValue() + { + return $this->readOneof(2); + } + + public function hasIntValue() + { + return $this->hasOneof(2); + } + + /** + * A 64-bit signed integer. + * + * Generated from protobuf field int64 int_value = 2; + * @param int|string $var + * @return $this + */ + public function setIntValue($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A Boolean value represented by `true` or `false`. + * + * Generated from protobuf field bool bool_value = 3; + * @return bool + */ + public function getBoolValue() + { + return $this->readOneof(3); + } + + public function hasBoolValue() + { + return $this->hasOneof(3); + } + + /** + * A Boolean value represented by `true` or `false`. + * + * Generated from protobuf field bool bool_value = 3; + * @param bool $var + * @return $this + */ + public function setBoolValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/BatchWriteSpansRequest.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/BatchWriteSpansRequest.php new file mode 100644 index 000000000000..063dda30c110 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/BatchWriteSpansRequest.php @@ -0,0 +1,127 @@ +google.devtools.cloudtrace.v2.BatchWriteSpansRequest + */ +class BatchWriteSpansRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the project where the spans belong. The format is + * `projects/[PROJECT_ID]`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. A list of new spans. The span names must not match existing + * spans, otherwise the results are undefined. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span spans = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $spans; + + /** + * @param string $name Required. The name of the project where the spans belong. The format is + * `projects/[PROJECT_ID]`. Please see + * {@see TraceServiceClient::projectName()} for help formatting this field. + * @param \Google\Cloud\Trace\V2\Span[] $spans Required. A list of new spans. The span names must not match existing + * spans, otherwise the results are undefined. + * + * @return \Google\Cloud\Trace\V2\BatchWriteSpansRequest + * + * @experimental + */ + public static function build(string $name, array $spans): self + { + return (new self()) + ->setName($name) + ->setSpans($spans); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the project where the spans belong. The format is + * `projects/[PROJECT_ID]`. + * @type \Google\Cloud\Trace\V2\Span[] $spans + * Required. A list of new spans. The span names must not match existing + * spans, otherwise the results are undefined. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V2\Tracing::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the project where the spans belong. The format is + * `projects/[PROJECT_ID]`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the project where the spans belong. The format is + * `projects/[PROJECT_ID]`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. A list of new spans. The span names must not match existing + * spans, otherwise the results are undefined. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span spans = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\Trace\V2\Span> + */ + public function getSpans() + { + return $this->spans; + } + + /** + * Required. A list of new spans. The span names must not match existing + * spans, otherwise the results are undefined. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span spans = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Trace\V2\Span[] $var + * @return $this + */ + public function setSpans($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V2\Span::class); + $this->spans = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Module.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Module.php new file mode 100644 index 000000000000..649c1d66c40f --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Module.php @@ -0,0 +1,129 @@ +google.devtools.cloudtrace.v2.Module + */ +class Module extends \Google\Protobuf\Internal\Message +{ + /** + * For example: main binary, kernel modules, and dynamic libraries + * such as libc.so, sharedlib.so (up to 256 bytes). + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString module = 1; + */ + protected $module = null; + /** + * A unique identifier for the module, usually a hash of its + * contents (up to 128 bytes). + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString build_id = 2; + */ + protected $build_id = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Trace\V2\TruncatableString $module + * For example: main binary, kernel modules, and dynamic libraries + * such as libc.so, sharedlib.so (up to 256 bytes). + * @type \Google\Cloud\Trace\V2\TruncatableString $build_id + * A unique identifier for the module, usually a hash of its + * contents (up to 128 bytes). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); + parent::__construct($data); + } + + /** + * For example: main binary, kernel modules, and dynamic libraries + * such as libc.so, sharedlib.so (up to 256 bytes). + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString module = 1; + * @return \Google\Cloud\Trace\V2\TruncatableString|null + */ + public function getModule() + { + return $this->module; + } + + public function hasModule() + { + return isset($this->module); + } + + public function clearModule() + { + unset($this->module); + } + + /** + * For example: main binary, kernel modules, and dynamic libraries + * such as libc.so, sharedlib.so (up to 256 bytes). + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString module = 1; + * @param \Google\Cloud\Trace\V2\TruncatableString $var + * @return $this + */ + public function setModule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class); + $this->module = $var; + + return $this; + } + + /** + * A unique identifier for the module, usually a hash of its + * contents (up to 128 bytes). + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString build_id = 2; + * @return \Google\Cloud\Trace\V2\TruncatableString|null + */ + public function getBuildId() + { + return $this->build_id; + } + + public function hasBuildId() + { + return isset($this->build_id); + } + + public function clearBuildId() + { + unset($this->build_id); + } + + /** + * A unique identifier for the module, usually a hash of its + * contents (up to 128 bytes). + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString build_id = 2; + * @param \Google\Cloud\Trace\V2\TruncatableString $var + * @return $this + */ + public function setBuildId($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class); + $this->build_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span.php new file mode 100644 index 000000000000..0fcc11cda46c --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span.php @@ -0,0 +1,783 @@ +google.devtools.cloudtrace.v2.Span + */ +class Span extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the span in the following format: + * * `projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]` + * `[TRACE_ID]` is a unique identifier for a trace within a project; + * it is a 32-character hexadecimal encoding of a 16-byte array. It should + * not be zero. + * `[SPAN_ID]` is a unique identifier for a span within a trace; it + * is a 16-character hexadecimal encoding of an 8-byte array. It should not + * be zero. + * . + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * Required. The `[SPAN_ID]` portion of the span's resource name. + * + * Generated from protobuf field string span_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $span_id = ''; + /** + * The `[SPAN_ID]` of this span's parent span. If this is a root span, + * then this field must be empty. + * + * Generated from protobuf field string parent_span_id = 3; + */ + protected $parent_span_id = ''; + /** + * Required. A description of the span's operation (up to 128 bytes). + * Cloud Trace displays the description in the + * Cloud console. + * For example, the display name can be a qualified method name or a file name + * and a line number where the operation is called. A best practice is to use + * the same display name within an application and at the same call point. + * This makes it easier to correlate spans in different traces. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = null; + /** + * Required. The start time of the span. On the client side, this is the time + * kept by the local machine where the span execution starts. On the server + * side, this is the time when the server's application handler starts + * running. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $start_time = null; + /** + * Required. The end time of the span. On the client side, this is the time + * kept by the local machine where the span execution ends. On the server + * side, this is the time when the server application handler stops running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $end_time = null; + /** + * A set of attributes on the span. You can have up to 32 attributes per + * span. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Attributes attributes = 7; + */ + protected $attributes = null; + /** + * Stack trace captured at the start of the span. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.StackTrace stack_trace = 8; + */ + protected $stack_trace = null; + /** + * A set of time events. You can have up to 32 annotations and 128 message + * events per span. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvents time_events = 9; + */ + protected $time_events = null; + /** + * Links associated with the span. You can have up to 128 links per Span. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Links links = 10; + */ + protected $links = null; + /** + * Optional. The final status for this span. + * + * Generated from protobuf field .google.rpc.Status status = 11 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $status = null; + /** + * Optional. Set this parameter to indicate whether this span is in + * the same process as its parent. If you do not set this parameter, + * Trace is unable to take advantage of this helpful information. + * + * Generated from protobuf field .google.protobuf.BoolValue same_process_as_parent_span = 12 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $same_process_as_parent_span = null; + /** + * Optional. The number of child spans that were generated while this span + * was active. If set, allows implementation to detect missing child spans. + * + * Generated from protobuf field .google.protobuf.Int32Value child_span_count = 13 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $child_span_count = null; + /** + * Optional. Distinguishes between spans generated in a particular context. + * For example, two spans with the same name may be distinguished using + * `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.SpanKind span_kind = 14 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $span_kind = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the span in the following format: + * * `projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]` + * `[TRACE_ID]` is a unique identifier for a trace within a project; + * it is a 32-character hexadecimal encoding of a 16-byte array. It should + * not be zero. + * `[SPAN_ID]` is a unique identifier for a span within a trace; it + * is a 16-character hexadecimal encoding of an 8-byte array. It should not + * be zero. + * . + * @type string $span_id + * Required. The `[SPAN_ID]` portion of the span's resource name. + * @type string $parent_span_id + * The `[SPAN_ID]` of this span's parent span. If this is a root span, + * then this field must be empty. + * @type \Google\Cloud\Trace\V2\TruncatableString $display_name + * Required. A description of the span's operation (up to 128 bytes). + * Cloud Trace displays the description in the + * Cloud console. + * For example, the display name can be a qualified method name or a file name + * and a line number where the operation is called. A best practice is to use + * the same display name within an application and at the same call point. + * This makes it easier to correlate spans in different traces. + * @type \Google\Protobuf\Timestamp $start_time + * Required. The start time of the span. On the client side, this is the time + * kept by the local machine where the span execution starts. On the server + * side, this is the time when the server's application handler starts + * running. + * @type \Google\Protobuf\Timestamp $end_time + * Required. The end time of the span. On the client side, this is the time + * kept by the local machine where the span execution ends. On the server + * side, this is the time when the server application handler stops running. + * @type \Google\Cloud\Trace\V2\Span\Attributes $attributes + * A set of attributes on the span. You can have up to 32 attributes per + * span. + * @type \Google\Cloud\Trace\V2\StackTrace $stack_trace + * Stack trace captured at the start of the span. + * @type \Google\Cloud\Trace\V2\Span\TimeEvents $time_events + * A set of time events. You can have up to 32 annotations and 128 message + * events per span. + * @type \Google\Cloud\Trace\V2\Span\Links $links + * Links associated with the span. You can have up to 128 links per Span. + * @type \Google\Rpc\Status $status + * Optional. The final status for this span. + * @type \Google\Protobuf\BoolValue $same_process_as_parent_span + * Optional. Set this parameter to indicate whether this span is in + * the same process as its parent. If you do not set this parameter, + * Trace is unable to take advantage of this helpful information. + * @type \Google\Protobuf\Int32Value $child_span_count + * Optional. The number of child spans that were generated while this span + * was active. If set, allows implementation to detect missing child spans. + * @type int $span_kind + * Optional. Distinguishes between spans generated in a particular context. + * For example, two spans with the same name may be distinguished using + * `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the span in the following format: + * * `projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]` + * `[TRACE_ID]` is a unique identifier for a trace within a project; + * it is a 32-character hexadecimal encoding of a 16-byte array. It should + * not be zero. + * `[SPAN_ID]` is a unique identifier for a span within a trace; it + * is a 16-character hexadecimal encoding of an 8-byte array. It should not + * be zero. + * . + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the span in the following format: + * * `projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]` + * `[TRACE_ID]` is a unique identifier for a trace within a project; + * it is a 32-character hexadecimal encoding of a 16-byte array. It should + * not be zero. + * `[SPAN_ID]` is a unique identifier for a span within a trace; it + * is a 16-character hexadecimal encoding of an 8-byte array. It should not + * be zero. + * . + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The `[SPAN_ID]` portion of the span's resource name. + * + * Generated from protobuf field string span_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSpanId() + { + return $this->span_id; + } + + /** + * Required. The `[SPAN_ID]` portion of the span's resource name. + * + * Generated from protobuf field string span_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSpanId($var) + { + GPBUtil::checkString($var, True); + $this->span_id = $var; + + return $this; + } + + /** + * The `[SPAN_ID]` of this span's parent span. If this is a root span, + * then this field must be empty. + * + * Generated from protobuf field string parent_span_id = 3; + * @return string + */ + public function getParentSpanId() + { + return $this->parent_span_id; + } + + /** + * The `[SPAN_ID]` of this span's parent span. If this is a root span, + * then this field must be empty. + * + * Generated from protobuf field string parent_span_id = 3; + * @param string $var + * @return $this + */ + public function setParentSpanId($var) + { + GPBUtil::checkString($var, True); + $this->parent_span_id = $var; + + return $this; + } + + /** + * Required. A description of the span's operation (up to 128 bytes). + * Cloud Trace displays the description in the + * Cloud console. + * For example, the display name can be a qualified method name or a file name + * and a line number where the operation is called. A best practice is to use + * the same display name within an application and at the same call point. + * This makes it easier to correlate spans in different traces. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Trace\V2\TruncatableString|null + */ + public function getDisplayName() + { + return $this->display_name; + } + + public function hasDisplayName() + { + return isset($this->display_name); + } + + public function clearDisplayName() + { + unset($this->display_name); + } + + /** + * Required. A description of the span's operation (up to 128 bytes). + * Cloud Trace displays the description in the + * Cloud console. + * For example, the display name can be a qualified method name or a file name + * and a line number where the operation is called. A best practice is to use + * the same display name within an application and at the same call point. + * This makes it easier to correlate spans in different traces. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Trace\V2\TruncatableString $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class); + $this->display_name = $var; + + return $this; + } + + /** + * Required. The start time of the span. On the client side, this is the time + * kept by the local machine where the span execution starts. On the server + * side, this is the time when the server's application handler starts + * running. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * @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); + } + + /** + * Required. The start time of the span. On the client side, this is the time + * kept by the local machine where the span execution starts. On the server + * side, this is the time when the server's application handler starts + * running. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Required. The end time of the span. On the client side, this is the time + * kept by the local machine where the span execution ends. On the server + * side, this is the time when the server application handler stops running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = REQUIRED]; + * @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); + } + + /** + * Required. The end time of the span. On the client side, this is the time + * kept by the local machine where the span execution ends. On the server + * side, this is the time when the server application handler stops running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * A set of attributes on the span. You can have up to 32 attributes per + * span. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Attributes attributes = 7; + * @return \Google\Cloud\Trace\V2\Span\Attributes|null + */ + public function getAttributes() + { + return $this->attributes; + } + + public function hasAttributes() + { + return isset($this->attributes); + } + + public function clearAttributes() + { + unset($this->attributes); + } + + /** + * A set of attributes on the span. You can have up to 32 attributes per + * span. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Attributes attributes = 7; + * @param \Google\Cloud\Trace\V2\Span\Attributes $var + * @return $this + */ + public function setAttributes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\Span\Attributes::class); + $this->attributes = $var; + + return $this; + } + + /** + * Stack trace captured at the start of the span. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.StackTrace stack_trace = 8; + * @return \Google\Cloud\Trace\V2\StackTrace|null + */ + public function getStackTrace() + { + return $this->stack_trace; + } + + public function hasStackTrace() + { + return isset($this->stack_trace); + } + + public function clearStackTrace() + { + unset($this->stack_trace); + } + + /** + * Stack trace captured at the start of the span. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.StackTrace stack_trace = 8; + * @param \Google\Cloud\Trace\V2\StackTrace $var + * @return $this + */ + public function setStackTrace($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\StackTrace::class); + $this->stack_trace = $var; + + return $this; + } + + /** + * A set of time events. You can have up to 32 annotations and 128 message + * events per span. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvents time_events = 9; + * @return \Google\Cloud\Trace\V2\Span\TimeEvents|null + */ + public function getTimeEvents() + { + return $this->time_events; + } + + public function hasTimeEvents() + { + return isset($this->time_events); + } + + public function clearTimeEvents() + { + unset($this->time_events); + } + + /** + * A set of time events. You can have up to 32 annotations and 128 message + * events per span. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvents time_events = 9; + * @param \Google\Cloud\Trace\V2\Span\TimeEvents $var + * @return $this + */ + public function setTimeEvents($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\Span\TimeEvents::class); + $this->time_events = $var; + + return $this; + } + + /** + * Links associated with the span. You can have up to 128 links per Span. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Links links = 10; + * @return \Google\Cloud\Trace\V2\Span\Links|null + */ + public function getLinks() + { + return $this->links; + } + + public function hasLinks() + { + return isset($this->links); + } + + public function clearLinks() + { + unset($this->links); + } + + /** + * Links associated with the span. You can have up to 128 links per Span. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Links links = 10; + * @param \Google\Cloud\Trace\V2\Span\Links $var + * @return $this + */ + public function setLinks($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\Span\Links::class); + $this->links = $var; + + return $this; + } + + /** + * Optional. The final status for this span. + * + * Generated from protobuf field .google.rpc.Status status = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Rpc\Status|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Optional. The final status for this span. + * + * Generated from protobuf field .google.rpc.Status status = 11 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->status = $var; + + return $this; + } + + /** + * Optional. Set this parameter to indicate whether this span is in + * the same process as its parent. If you do not set this parameter, + * Trace is unable to take advantage of this helpful information. + * + * Generated from protobuf field .google.protobuf.BoolValue same_process_as_parent_span = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\BoolValue|null + */ + public function getSameProcessAsParentSpan() + { + return $this->same_process_as_parent_span; + } + + public function hasSameProcessAsParentSpan() + { + return isset($this->same_process_as_parent_span); + } + + public function clearSameProcessAsParentSpan() + { + unset($this->same_process_as_parent_span); + } + + /** + * Returns the unboxed value from getSameProcessAsParentSpan() + + * Optional. Set this parameter to indicate whether this span is in + * the same process as its parent. If you do not set this parameter, + * Trace is unable to take advantage of this helpful information. + * + * Generated from protobuf field .google.protobuf.BoolValue same_process_as_parent_span = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool|null + */ + public function getSameProcessAsParentSpanUnwrapped() + { + return $this->readWrapperValue("same_process_as_parent_span"); + } + + /** + * Optional. Set this parameter to indicate whether this span is in + * the same process as its parent. If you do not set this parameter, + * Trace is unable to take advantage of this helpful information. + * + * Generated from protobuf field .google.protobuf.BoolValue same_process_as_parent_span = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\BoolValue $var + * @return $this + */ + public function setSameProcessAsParentSpan($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); + $this->same_process_as_parent_span = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. + + * Optional. Set this parameter to indicate whether this span is in + * the same process as its parent. If you do not set this parameter, + * Trace is unable to take advantage of this helpful information. + * + * Generated from protobuf field .google.protobuf.BoolValue same_process_as_parent_span = 12 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool|null $var + * @return $this + */ + public function setSameProcessAsParentSpanUnwrapped($var) + { + $this->writeWrapperValue("same_process_as_parent_span", $var); + return $this;} + + /** + * Optional. The number of child spans that were generated while this span + * was active. If set, allows implementation to detect missing child spans. + * + * Generated from protobuf field .google.protobuf.Int32Value child_span_count = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Int32Value|null + */ + public function getChildSpanCount() + { + return $this->child_span_count; + } + + public function hasChildSpanCount() + { + return isset($this->child_span_count); + } + + public function clearChildSpanCount() + { + unset($this->child_span_count); + } + + /** + * Returns the unboxed value from getChildSpanCount() + + * Optional. The number of child spans that were generated while this span + * was active. If set, allows implementation to detect missing child spans. + * + * Generated from protobuf field .google.protobuf.Int32Value child_span_count = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @return int|null + */ + public function getChildSpanCountUnwrapped() + { + return $this->readWrapperValue("child_span_count"); + } + + /** + * Optional. The number of child spans that were generated while this span + * was active. If set, allows implementation to detect missing child spans. + * + * Generated from protobuf field .google.protobuf.Int32Value child_span_count = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Int32Value $var + * @return $this + */ + public function setChildSpanCount($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); + $this->child_span_count = $var; + + return $this; + } + + /** + * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. + + * Optional. The number of child spans that were generated while this span + * was active. If set, allows implementation to detect missing child spans. + * + * Generated from protobuf field .google.protobuf.Int32Value child_span_count = 13 [(.google.api.field_behavior) = OPTIONAL]; + * @param int|null $var + * @return $this + */ + public function setChildSpanCountUnwrapped($var) + { + $this->writeWrapperValue("child_span_count", $var); + return $this;} + + /** + * Optional. Distinguishes between spans generated in a particular context. + * For example, two spans with the same name may be distinguished using + * `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.SpanKind span_kind = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getSpanKind() + { + return $this->span_kind; + } + + /** + * Optional. Distinguishes between spans generated in a particular context. + * For example, two spans with the same name may be distinguished using + * `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.SpanKind span_kind = 14 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setSpanKind($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Trace\V2\Span\SpanKind::class); + $this->span_kind = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Attributes.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Attributes.php new file mode 100644 index 000000000000..56f9f3858eee --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Attributes.php @@ -0,0 +1,129 @@ +google.devtools.cloudtrace.v2.Span.Attributes + */ +class Attributes extends \Google\Protobuf\Internal\Message +{ + /** + * A set of attributes. Each attribute's key can be up to 128 bytes + * long. The value can be a string up to 256 bytes, a signed 64-bit integer, + * or the boolean values `true` or `false`. For example: + * "/instance_id": { "string_value": { "value": "my-instance" } } + * "/http/request_bytes": { "int_value": 300 } + * "abc.com/myattribute": { "bool_value": false } + * + * Generated from protobuf field map attribute_map = 1; + */ + private $attribute_map; + /** + * The number of attributes that were discarded. Attributes can be discarded + * because their keys are too long or because there are too many attributes. + * If this value is 0 then all attributes are valid. + * + * Generated from protobuf field int32 dropped_attributes_count = 2; + */ + protected $dropped_attributes_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $attribute_map + * A set of attributes. Each attribute's key can be up to 128 bytes + * long. The value can be a string up to 256 bytes, a signed 64-bit integer, + * or the boolean values `true` or `false`. For example: + * "/instance_id": { "string_value": { "value": "my-instance" } } + * "/http/request_bytes": { "int_value": 300 } + * "abc.com/myattribute": { "bool_value": false } + * @type int $dropped_attributes_count + * The number of attributes that were discarded. Attributes can be discarded + * because their keys are too long or because there are too many attributes. + * If this value is 0 then all attributes are valid. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); + parent::__construct($data); + } + + /** + * A set of attributes. Each attribute's key can be up to 128 bytes + * long. The value can be a string up to 256 bytes, a signed 64-bit integer, + * or the boolean values `true` or `false`. For example: + * "/instance_id": { "string_value": { "value": "my-instance" } } + * "/http/request_bytes": { "int_value": 300 } + * "abc.com/myattribute": { "bool_value": false } + * + * Generated from protobuf field map attribute_map = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAttributeMap() + { + return $this->attribute_map; + } + + /** + * A set of attributes. Each attribute's key can be up to 128 bytes + * long. The value can be a string up to 256 bytes, a signed 64-bit integer, + * or the boolean values `true` or `false`. For example: + * "/instance_id": { "string_value": { "value": "my-instance" } } + * "/http/request_bytes": { "int_value": 300 } + * "abc.com/myattribute": { "bool_value": false } + * + * Generated from protobuf field map attribute_map = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAttributeMap($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V2\AttributeValue::class); + $this->attribute_map = $arr; + + return $this; + } + + /** + * The number of attributes that were discarded. Attributes can be discarded + * because their keys are too long or because there are too many attributes. + * If this value is 0 then all attributes are valid. + * + * Generated from protobuf field int32 dropped_attributes_count = 2; + * @return int + */ + public function getDroppedAttributesCount() + { + return $this->dropped_attributes_count; + } + + /** + * The number of attributes that were discarded. Attributes can be discarded + * because their keys are too long or because there are too many attributes. + * If this value is 0 then all attributes are valid. + * + * Generated from protobuf field int32 dropped_attributes_count = 2; + * @param int $var + * @return $this + */ + public function setDroppedAttributesCount($var) + { + GPBUtil::checkInt32($var); + $this->dropped_attributes_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link.php new file mode 100644 index 000000000000..7742324ce4d4 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link.php @@ -0,0 +1,186 @@ +google.devtools.cloudtrace.v2.Span.Link + */ +class Link extends \Google\Protobuf\Internal\Message +{ + /** + * The `[TRACE_ID]` for a trace within a project. + * + * Generated from protobuf field string trace_id = 1; + */ + protected $trace_id = ''; + /** + * The `[SPAN_ID]` for a span within a trace. + * + * Generated from protobuf field string span_id = 2; + */ + protected $span_id = ''; + /** + * The relationship of the current span relative to the linked span. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Link.Type type = 3; + */ + protected $type = 0; + /** + * A set of attributes on the link. Up to 32 attributes can be + * specified per link. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Attributes attributes = 4; + */ + protected $attributes = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $trace_id + * The `[TRACE_ID]` for a trace within a project. + * @type string $span_id + * The `[SPAN_ID]` for a span within a trace. + * @type int $type + * The relationship of the current span relative to the linked span. + * @type \Google\Cloud\Trace\V2\Span\Attributes $attributes + * A set of attributes on the link. Up to 32 attributes can be + * specified per link. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); + parent::__construct($data); + } + + /** + * The `[TRACE_ID]` for a trace within a project. + * + * Generated from protobuf field string trace_id = 1; + * @return string + */ + public function getTraceId() + { + return $this->trace_id; + } + + /** + * The `[TRACE_ID]` for a trace within a project. + * + * Generated from protobuf field string trace_id = 1; + * @param string $var + * @return $this + */ + public function setTraceId($var) + { + GPBUtil::checkString($var, True); + $this->trace_id = $var; + + return $this; + } + + /** + * The `[SPAN_ID]` for a span within a trace. + * + * Generated from protobuf field string span_id = 2; + * @return string + */ + public function getSpanId() + { + return $this->span_id; + } + + /** + * The `[SPAN_ID]` for a span within a trace. + * + * Generated from protobuf field string span_id = 2; + * @param string $var + * @return $this + */ + public function setSpanId($var) + { + GPBUtil::checkString($var, True); + $this->span_id = $var; + + return $this; + } + + /** + * The relationship of the current span relative to the linked span. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Link.Type type = 3; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The relationship of the current span relative to the linked span. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Link.Type type = 3; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Trace\V2\Span\Link\Type::class); + $this->type = $var; + + return $this; + } + + /** + * A set of attributes on the link. Up to 32 attributes can be + * specified per link. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Attributes attributes = 4; + * @return \Google\Cloud\Trace\V2\Span\Attributes|null + */ + public function getAttributes() + { + return $this->attributes; + } + + public function hasAttributes() + { + return isset($this->attributes); + } + + public function clearAttributes() + { + unset($this->attributes); + } + + /** + * A set of attributes on the link. Up to 32 attributes can be + * specified per link. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Attributes attributes = 4; + * @param \Google\Cloud\Trace\V2\Span\Attributes $var + * @return $this + */ + public function setAttributes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\Span\Attributes::class); + $this->attributes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link/Type.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link/Type.php new file mode 100644 index 000000000000..906a4dbea490 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link/Type.php @@ -0,0 +1,62 @@ +google.devtools.cloudtrace.v2.Span.Link.Type + */ +class Type +{ + /** + * The relationship of the two spans is unknown. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * The linked span is a child of the current span. + * + * Generated from protobuf enum CHILD_LINKED_SPAN = 1; + */ + const CHILD_LINKED_SPAN = 1; + /** + * The linked span is a parent of the current span. + * + * Generated from protobuf enum PARENT_LINKED_SPAN = 2; + */ + const PARENT_LINKED_SPAN = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::CHILD_LINKED_SPAN => 'CHILD_LINKED_SPAN', + self::PARENT_LINKED_SPAN => 'PARENT_LINKED_SPAN', + ]; + + 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/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Links.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Links.php new file mode 100644 index 000000000000..c8bd76c68205 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Links.php @@ -0,0 +1,106 @@ +google.devtools.cloudtrace.v2.Span.Links + */ +class Links extends \Google\Protobuf\Internal\Message +{ + /** + * A collection of links. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span.Link link = 1; + */ + private $link; + /** + * The number of dropped links after the maximum size was enforced. If + * this value is 0, then no links were dropped. + * + * Generated from protobuf field int32 dropped_links_count = 2; + */ + protected $dropped_links_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Trace\V2\Span\Link[] $link + * A collection of links. + * @type int $dropped_links_count + * The number of dropped links after the maximum size was enforced. If + * this value is 0, then no links were dropped. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); + parent::__construct($data); + } + + /** + * A collection of links. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span.Link link = 1; + * @return RepeatedField<\Google\Cloud\Trace\V2\Span\Link> + */ + public function getLink() + { + return $this->link; + } + + /** + * A collection of links. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span.Link link = 1; + * @param \Google\Cloud\Trace\V2\Span\Link[] $var + * @return $this + */ + public function setLink($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V2\Span\Link::class); + $this->link = $arr; + + return $this; + } + + /** + * The number of dropped links after the maximum size was enforced. If + * this value is 0, then no links were dropped. + * + * Generated from protobuf field int32 dropped_links_count = 2; + * @return int + */ + public function getDroppedLinksCount() + { + return $this->dropped_links_count; + } + + /** + * The number of dropped links after the maximum size was enforced. If + * this value is 0, then no links were dropped. + * + * Generated from protobuf field int32 dropped_links_count = 2; + * @param int $var + * @return $this + */ + public function setDroppedLinksCount($var) + { + GPBUtil::checkInt32($var); + $this->dropped_links_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/SpanKind.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/SpanKind.php new file mode 100644 index 000000000000..6e3ebcf26e50 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/SpanKind.php @@ -0,0 +1,92 @@ +google.devtools.cloudtrace.v2.Span.SpanKind + */ +class SpanKind +{ + /** + * Unspecified. Do NOT use as default. + * Implementations MAY assume SpanKind.INTERNAL to be default. + * + * Generated from protobuf enum SPAN_KIND_UNSPECIFIED = 0; + */ + const SPAN_KIND_UNSPECIFIED = 0; + /** + * Indicates that the span is used internally. Default value. + * + * Generated from protobuf enum INTERNAL = 1; + */ + const INTERNAL = 1; + /** + * Indicates that the span covers server-side handling of an RPC or other + * remote network request. + * + * Generated from protobuf enum SERVER = 2; + */ + const SERVER = 2; + /** + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. + * + * Generated from protobuf enum CLIENT = 3; + */ + const CLIENT = 3; + /** + * Indicates that the span describes producer sending a message to a broker. + * Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans (e.g. publishing a + * message to a pubsub service). + * + * Generated from protobuf enum PRODUCER = 4; + */ + const PRODUCER = 4; + /** + * Indicates that the span describes consumer receiving a message from a + * broker. Unlike client and server, there is no direct critical path + * latency relationship between producer and consumer spans (e.g. receiving + * a message from a pubsub service subscription). + * + * Generated from protobuf enum CONSUMER = 5; + */ + const CONSUMER = 5; + + private static $valueToName = [ + self::SPAN_KIND_UNSPECIFIED => 'SPAN_KIND_UNSPECIFIED', + self::INTERNAL => 'INTERNAL', + self::SERVER => 'SERVER', + self::CLIENT => 'CLIENT', + self::PRODUCER => 'PRODUCER', + self::CONSUMER => 'CONSUMER', + ]; + + 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/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent.php new file mode 100644 index 000000000000..b3f8fe87615f --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent.php @@ -0,0 +1,152 @@ +google.devtools.cloudtrace.v2.Span.TimeEvent + */ +class TimeEvent extends \Google\Protobuf\Internal\Message +{ + /** + * The timestamp indicating the time the event occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp time = 1; + */ + protected $time = null; + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $time + * The timestamp indicating the time the event occurred. + * @type \Google\Cloud\Trace\V2\Span\TimeEvent\Annotation $annotation + * Text annotation with a set of attributes. + * @type \Google\Cloud\Trace\V2\Span\TimeEvent\MessageEvent $message_event + * An event describing a message sent/received between Spans. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); + parent::__construct($data); + } + + /** + * The timestamp indicating the time the event occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getTime() + { + return $this->time; + } + + public function hasTime() + { + return isset($this->time); + } + + public function clearTime() + { + unset($this->time); + } + + /** + * The timestamp indicating the time the event occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->time = $var; + + return $this; + } + + /** + * Text annotation with a set of attributes. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation annotation = 2; + * @return \Google\Cloud\Trace\V2\Span\TimeEvent\Annotation|null + */ + public function getAnnotation() + { + return $this->readOneof(2); + } + + public function hasAnnotation() + { + return $this->hasOneof(2); + } + + /** + * Text annotation with a set of attributes. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation annotation = 2; + * @param \Google\Cloud\Trace\V2\Span\TimeEvent\Annotation $var + * @return $this + */ + public function setAnnotation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\Span\TimeEvent\Annotation::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * An event describing a message sent/received between Spans. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent message_event = 3; + * @return \Google\Cloud\Trace\V2\Span\TimeEvent\MessageEvent|null + */ + public function getMessageEvent() + { + return $this->readOneof(3); + } + + public function hasMessageEvent() + { + return $this->hasOneof(3); + } + + /** + * An event describing a message sent/received between Spans. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent message_event = 3; + * @param \Google\Cloud\Trace\V2\Span\TimeEvent\MessageEvent $var + * @return $this + */ + public function setMessageEvent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\Span\TimeEvent\MessageEvent::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/Annotation.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/Annotation.php new file mode 100644 index 000000000000..826f24e7f966 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/Annotation.php @@ -0,0 +1,129 @@ +google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation + */ +class Annotation extends \Google\Protobuf\Internal\Message +{ + /** + * A user-supplied message describing the event. The maximum length for + * the description is 256 bytes. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString description = 1; + */ + protected $description = null; + /** + * A set of attributes on the annotation. You can have up to 4 attributes + * per Annotation. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Attributes attributes = 2; + */ + protected $attributes = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Trace\V2\TruncatableString $description + * A user-supplied message describing the event. The maximum length for + * the description is 256 bytes. + * @type \Google\Cloud\Trace\V2\Span\Attributes $attributes + * A set of attributes on the annotation. You can have up to 4 attributes + * per Annotation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); + parent::__construct($data); + } + + /** + * A user-supplied message describing the event. The maximum length for + * the description is 256 bytes. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString description = 1; + * @return \Google\Cloud\Trace\V2\TruncatableString|null + */ + public function getDescription() + { + return $this->description; + } + + public function hasDescription() + { + return isset($this->description); + } + + public function clearDescription() + { + unset($this->description); + } + + /** + * A user-supplied message describing the event. The maximum length for + * the description is 256 bytes. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString description = 1; + * @param \Google\Cloud\Trace\V2\TruncatableString $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class); + $this->description = $var; + + return $this; + } + + /** + * A set of attributes on the annotation. You can have up to 4 attributes + * per Annotation. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Attributes attributes = 2; + * @return \Google\Cloud\Trace\V2\Span\Attributes|null + */ + public function getAttributes() + { + return $this->attributes; + } + + public function hasAttributes() + { + return isset($this->attributes); + } + + public function clearAttributes() + { + unset($this->attributes); + } + + /** + * A set of attributes on the annotation. You can have up to 4 attributes + * per Annotation. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Attributes attributes = 2; + * @param \Google\Cloud\Trace\V2\Span\Attributes $var + * @return $this + */ + public function setAttributes($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\Span\Attributes::class); + $this->attributes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent.php new file mode 100644 index 000000000000..0c34f5fc43e5 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent.php @@ -0,0 +1,185 @@ +google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent + */ +class MessageEvent extends \Google\Protobuf\Internal\Message +{ + /** + * Type of MessageEvent. Indicates whether the message was sent or + * received. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.Type type = 1; + */ + protected $type = 0; + /** + * An identifier for the MessageEvent's message that can be used to match + * `SENT` and `RECEIVED` MessageEvents. + * + * Generated from protobuf field int64 id = 2; + */ + protected $id = 0; + /** + * The number of uncompressed bytes sent or received. + * + * Generated from protobuf field int64 uncompressed_size_bytes = 3; + */ + protected $uncompressed_size_bytes = 0; + /** + * The number of compressed bytes sent or received. If missing, the + * compressed size is assumed to be the same size as the uncompressed + * size. + * + * Generated from protobuf field int64 compressed_size_bytes = 4; + */ + protected $compressed_size_bytes = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Type of MessageEvent. Indicates whether the message was sent or + * received. + * @type int|string $id + * An identifier for the MessageEvent's message that can be used to match + * `SENT` and `RECEIVED` MessageEvents. + * @type int|string $uncompressed_size_bytes + * The number of uncompressed bytes sent or received. + * @type int|string $compressed_size_bytes + * The number of compressed bytes sent or received. If missing, the + * compressed size is assumed to be the same size as the uncompressed + * size. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Type of MessageEvent. Indicates whether the message was sent or + * received. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Type of MessageEvent. Indicates whether the message was sent or + * received. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Trace\V2\Span\TimeEvent\MessageEvent\Type::class); + $this->type = $var; + + return $this; + } + + /** + * An identifier for the MessageEvent's message that can be used to match + * `SENT` and `RECEIVED` MessageEvents. + * + * Generated from protobuf field int64 id = 2; + * @return int|string + */ + public function getId() + { + return $this->id; + } + + /** + * An identifier for the MessageEvent's message that can be used to match + * `SENT` and `RECEIVED` MessageEvents. + * + * Generated from protobuf field int64 id = 2; + * @param int|string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkInt64($var); + $this->id = $var; + + return $this; + } + + /** + * The number of uncompressed bytes sent or received. + * + * Generated from protobuf field int64 uncompressed_size_bytes = 3; + * @return int|string + */ + public function getUncompressedSizeBytes() + { + return $this->uncompressed_size_bytes; + } + + /** + * The number of uncompressed bytes sent or received. + * + * Generated from protobuf field int64 uncompressed_size_bytes = 3; + * @param int|string $var + * @return $this + */ + public function setUncompressedSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->uncompressed_size_bytes = $var; + + return $this; + } + + /** + * The number of compressed bytes sent or received. If missing, the + * compressed size is assumed to be the same size as the uncompressed + * size. + * + * Generated from protobuf field int64 compressed_size_bytes = 4; + * @return int|string + */ + public function getCompressedSizeBytes() + { + return $this->compressed_size_bytes; + } + + /** + * The number of compressed bytes sent or received. If missing, the + * compressed size is assumed to be the same size as the uncompressed + * size. + * + * Generated from protobuf field int64 compressed_size_bytes = 4; + * @param int|string $var + * @return $this + */ + public function setCompressedSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->compressed_size_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent/Type.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent/Type.php new file mode 100644 index 000000000000..7fcb66587fdf --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent/Type.php @@ -0,0 +1,61 @@ +google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.Type + */ +class Type +{ + /** + * Unknown event type. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Indicates a sent message. + * + * Generated from protobuf enum SENT = 1; + */ + const SENT = 1; + /** + * Indicates a received message. + * + * Generated from protobuf enum RECEIVED = 2; + */ + const RECEIVED = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::SENT => 'SENT', + self::RECEIVED => 'RECEIVED', + ]; + + 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/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvents.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvents.php new file mode 100644 index 000000000000..9cb3408a24d7 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvents.php @@ -0,0 +1,145 @@ +google.devtools.cloudtrace.v2.Span.TimeEvents + */ +class TimeEvents extends \Google\Protobuf\Internal\Message +{ + /** + * A collection of `TimeEvent`s. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span.TimeEvent time_event = 1; + */ + private $time_event; + /** + * The number of dropped annotations in all the included time events. + * If the value is 0, then no annotations were dropped. + * + * Generated from protobuf field int32 dropped_annotations_count = 2; + */ + protected $dropped_annotations_count = 0; + /** + * The number of dropped message events in all the included time events. + * If the value is 0, then no message events were dropped. + * + * Generated from protobuf field int32 dropped_message_events_count = 3; + */ + protected $dropped_message_events_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Trace\V2\Span\TimeEvent[] $time_event + * A collection of `TimeEvent`s. + * @type int $dropped_annotations_count + * The number of dropped annotations in all the included time events. + * If the value is 0, then no annotations were dropped. + * @type int $dropped_message_events_count + * The number of dropped message events in all the included time events. + * If the value is 0, then no message events were dropped. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); + parent::__construct($data); + } + + /** + * A collection of `TimeEvent`s. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span.TimeEvent time_event = 1; + * @return RepeatedField<\Google\Cloud\Trace\V2\Span\TimeEvent> + */ + public function getTimeEvent() + { + return $this->time_event; + } + + /** + * A collection of `TimeEvent`s. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span.TimeEvent time_event = 1; + * @param \Google\Cloud\Trace\V2\Span\TimeEvent[] $var + * @return $this + */ + public function setTimeEvent($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V2\Span\TimeEvent::class); + $this->time_event = $arr; + + return $this; + } + + /** + * The number of dropped annotations in all the included time events. + * If the value is 0, then no annotations were dropped. + * + * Generated from protobuf field int32 dropped_annotations_count = 2; + * @return int + */ + public function getDroppedAnnotationsCount() + { + return $this->dropped_annotations_count; + } + + /** + * The number of dropped annotations in all the included time events. + * If the value is 0, then no annotations were dropped. + * + * Generated from protobuf field int32 dropped_annotations_count = 2; + * @param int $var + * @return $this + */ + public function setDroppedAnnotationsCount($var) + { + GPBUtil::checkInt32($var); + $this->dropped_annotations_count = $var; + + return $this; + } + + /** + * The number of dropped message events in all the included time events. + * If the value is 0, then no message events were dropped. + * + * Generated from protobuf field int32 dropped_message_events_count = 3; + * @return int + */ + public function getDroppedMessageEventsCount() + { + return $this->dropped_message_events_count; + } + + /** + * The number of dropped message events in all the included time events. + * If the value is 0, then no message events were dropped. + * + * Generated from protobuf field int32 dropped_message_events_count = 3; + * @param int $var + * @return $this + */ + public function setDroppedMessageEventsCount($var) + { + GPBUtil::checkInt32($var); + $this->dropped_message_events_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace.php new file mode 100644 index 000000000000..6363d89a1388 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace.php @@ -0,0 +1,135 @@ +google.devtools.cloudtrace.v2.StackTrace + */ +class StackTrace extends \Google\Protobuf\Internal\Message +{ + /** + * Stack frames in this stack trace. A maximum of 128 frames are allowed. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.StackTrace.StackFrames stack_frames = 1; + */ + protected $stack_frames = null; + /** + * The hash ID is used to conserve network bandwidth for duplicate + * stack traces within a single trace. + * Often multiple spans will have identical stack traces. + * The first occurrence of a stack trace should contain both the + * `stackFrame` content and a value in `stackTraceHashId`. + * Subsequent spans within the same request can refer + * to that stack trace by only setting `stackTraceHashId`. + * + * Generated from protobuf field int64 stack_trace_hash_id = 2; + */ + protected $stack_trace_hash_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Trace\V2\StackTrace\StackFrames $stack_frames + * Stack frames in this stack trace. A maximum of 128 frames are allowed. + * @type int|string $stack_trace_hash_id + * The hash ID is used to conserve network bandwidth for duplicate + * stack traces within a single trace. + * Often multiple spans will have identical stack traces. + * The first occurrence of a stack trace should contain both the + * `stackFrame` content and a value in `stackTraceHashId`. + * Subsequent spans within the same request can refer + * to that stack trace by only setting `stackTraceHashId`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Stack frames in this stack trace. A maximum of 128 frames are allowed. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.StackTrace.StackFrames stack_frames = 1; + * @return \Google\Cloud\Trace\V2\StackTrace\StackFrames|null + */ + public function getStackFrames() + { + return $this->stack_frames; + } + + public function hasStackFrames() + { + return isset($this->stack_frames); + } + + public function clearStackFrames() + { + unset($this->stack_frames); + } + + /** + * Stack frames in this stack trace. A maximum of 128 frames are allowed. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.StackTrace.StackFrames stack_frames = 1; + * @param \Google\Cloud\Trace\V2\StackTrace\StackFrames $var + * @return $this + */ + public function setStackFrames($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\StackTrace\StackFrames::class); + $this->stack_frames = $var; + + return $this; + } + + /** + * The hash ID is used to conserve network bandwidth for duplicate + * stack traces within a single trace. + * Often multiple spans will have identical stack traces. + * The first occurrence of a stack trace should contain both the + * `stackFrame` content and a value in `stackTraceHashId`. + * Subsequent spans within the same request can refer + * to that stack trace by only setting `stackTraceHashId`. + * + * Generated from protobuf field int64 stack_trace_hash_id = 2; + * @return int|string + */ + public function getStackTraceHashId() + { + return $this->stack_trace_hash_id; + } + + /** + * The hash ID is used to conserve network bandwidth for duplicate + * stack traces within a single trace. + * Often multiple spans will have identical stack traces. + * The first occurrence of a stack trace should contain both the + * `stackFrame` content and a value in `stackTraceHashId`. + * Subsequent spans within the same request can refer + * to that stack trace by only setting `stackTraceHashId`. + * + * Generated from protobuf field int64 stack_trace_hash_id = 2; + * @param int|string $var + * @return $this + */ + public function setStackTraceHashId($var) + { + GPBUtil::checkInt64($var); + $this->stack_trace_hash_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrame.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrame.php new file mode 100644 index 000000000000..f2b789f56775 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrame.php @@ -0,0 +1,345 @@ +google.devtools.cloudtrace.v2.StackTrace.StackFrame + */ +class StackFrame extends \Google\Protobuf\Internal\Message +{ + /** + * The fully-qualified name that uniquely identifies the function or + * method that is active in this frame (up to 1024 bytes). + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString function_name = 1; + */ + protected $function_name = null; + /** + * An un-mangled function name, if `function_name` is mangled. + * To get information about name mangling, run + * [this search](https://www.google.com/search?q=cxx+name+mangling). + * The name can be fully-qualified (up to 1024 bytes). + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString original_function_name = 2; + */ + protected $original_function_name = null; + /** + * The name of the source file where the function call appears (up to 256 + * bytes). + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString file_name = 3; + */ + protected $file_name = null; + /** + * The line number in `file_name` where the function call appears. + * + * Generated from protobuf field int64 line_number = 4; + */ + protected $line_number = 0; + /** + * The column number where the function call appears, if available. + * This is important in JavaScript because of its anonymous functions. + * + * Generated from protobuf field int64 column_number = 5; + */ + protected $column_number = 0; + /** + * The binary module from where the code was loaded. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Module load_module = 6; + */ + protected $load_module = null; + /** + * The version of the deployed source code (up to 128 bytes). + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString source_version = 7; + */ + protected $source_version = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Trace\V2\TruncatableString $function_name + * The fully-qualified name that uniquely identifies the function or + * method that is active in this frame (up to 1024 bytes). + * @type \Google\Cloud\Trace\V2\TruncatableString $original_function_name + * An un-mangled function name, if `function_name` is mangled. + * To get information about name mangling, run + * [this search](https://www.google.com/search?q=cxx+name+mangling). + * The name can be fully-qualified (up to 1024 bytes). + * @type \Google\Cloud\Trace\V2\TruncatableString $file_name + * The name of the source file where the function call appears (up to 256 + * bytes). + * @type int|string $line_number + * The line number in `file_name` where the function call appears. + * @type int|string $column_number + * The column number where the function call appears, if available. + * This is important in JavaScript because of its anonymous functions. + * @type \Google\Cloud\Trace\V2\Module $load_module + * The binary module from where the code was loaded. + * @type \Google\Cloud\Trace\V2\TruncatableString $source_version + * The version of the deployed source code (up to 128 bytes). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); + parent::__construct($data); + } + + /** + * The fully-qualified name that uniquely identifies the function or + * method that is active in this frame (up to 1024 bytes). + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString function_name = 1; + * @return \Google\Cloud\Trace\V2\TruncatableString|null + */ + public function getFunctionName() + { + return $this->function_name; + } + + public function hasFunctionName() + { + return isset($this->function_name); + } + + public function clearFunctionName() + { + unset($this->function_name); + } + + /** + * The fully-qualified name that uniquely identifies the function or + * method that is active in this frame (up to 1024 bytes). + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString function_name = 1; + * @param \Google\Cloud\Trace\V2\TruncatableString $var + * @return $this + */ + public function setFunctionName($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class); + $this->function_name = $var; + + return $this; + } + + /** + * An un-mangled function name, if `function_name` is mangled. + * To get information about name mangling, run + * [this search](https://www.google.com/search?q=cxx+name+mangling). + * The name can be fully-qualified (up to 1024 bytes). + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString original_function_name = 2; + * @return \Google\Cloud\Trace\V2\TruncatableString|null + */ + public function getOriginalFunctionName() + { + return $this->original_function_name; + } + + public function hasOriginalFunctionName() + { + return isset($this->original_function_name); + } + + public function clearOriginalFunctionName() + { + unset($this->original_function_name); + } + + /** + * An un-mangled function name, if `function_name` is mangled. + * To get information about name mangling, run + * [this search](https://www.google.com/search?q=cxx+name+mangling). + * The name can be fully-qualified (up to 1024 bytes). + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString original_function_name = 2; + * @param \Google\Cloud\Trace\V2\TruncatableString $var + * @return $this + */ + public function setOriginalFunctionName($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class); + $this->original_function_name = $var; + + return $this; + } + + /** + * The name of the source file where the function call appears (up to 256 + * bytes). + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString file_name = 3; + * @return \Google\Cloud\Trace\V2\TruncatableString|null + */ + public function getFileName() + { + return $this->file_name; + } + + public function hasFileName() + { + return isset($this->file_name); + } + + public function clearFileName() + { + unset($this->file_name); + } + + /** + * The name of the source file where the function call appears (up to 256 + * bytes). + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString file_name = 3; + * @param \Google\Cloud\Trace\V2\TruncatableString $var + * @return $this + */ + public function setFileName($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class); + $this->file_name = $var; + + return $this; + } + + /** + * The line number in `file_name` where the function call appears. + * + * Generated from protobuf field int64 line_number = 4; + * @return int|string + */ + public function getLineNumber() + { + return $this->line_number; + } + + /** + * The line number in `file_name` where the function call appears. + * + * Generated from protobuf field int64 line_number = 4; + * @param int|string $var + * @return $this + */ + public function setLineNumber($var) + { + GPBUtil::checkInt64($var); + $this->line_number = $var; + + return $this; + } + + /** + * The column number where the function call appears, if available. + * This is important in JavaScript because of its anonymous functions. + * + * Generated from protobuf field int64 column_number = 5; + * @return int|string + */ + public function getColumnNumber() + { + return $this->column_number; + } + + /** + * The column number where the function call appears, if available. + * This is important in JavaScript because of its anonymous functions. + * + * Generated from protobuf field int64 column_number = 5; + * @param int|string $var + * @return $this + */ + public function setColumnNumber($var) + { + GPBUtil::checkInt64($var); + $this->column_number = $var; + + return $this; + } + + /** + * The binary module from where the code was loaded. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Module load_module = 6; + * @return \Google\Cloud\Trace\V2\Module|null + */ + public function getLoadModule() + { + return $this->load_module; + } + + public function hasLoadModule() + { + return isset($this->load_module); + } + + public function clearLoadModule() + { + unset($this->load_module); + } + + /** + * The binary module from where the code was loaded. + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.Module load_module = 6; + * @param \Google\Cloud\Trace\V2\Module $var + * @return $this + */ + public function setLoadModule($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\Module::class); + $this->load_module = $var; + + return $this; + } + + /** + * The version of the deployed source code (up to 128 bytes). + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString source_version = 7; + * @return \Google\Cloud\Trace\V2\TruncatableString|null + */ + public function getSourceVersion() + { + return $this->source_version; + } + + public function hasSourceVersion() + { + return isset($this->source_version); + } + + public function clearSourceVersion() + { + unset($this->source_version); + } + + /** + * The version of the deployed source code (up to 128 bytes). + * + * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString source_version = 7; + * @param \Google\Cloud\Trace\V2\TruncatableString $var + * @return $this + */ + public function setSourceVersion($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class); + $this->source_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrames.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrames.php new file mode 100644 index 000000000000..29df626fb376 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrames.php @@ -0,0 +1,109 @@ +google.devtools.cloudtrace.v2.StackTrace.StackFrames + */ +class StackFrames extends \Google\Protobuf\Internal\Message +{ + /** + * Stack frames in this call stack. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.StackTrace.StackFrame frame = 1; + */ + private $frame; + /** + * The number of stack frames that were dropped because there + * were too many stack frames. + * If this value is 0, then no stack frames were dropped. + * + * Generated from protobuf field int32 dropped_frames_count = 2; + */ + protected $dropped_frames_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Trace\V2\StackTrace\StackFrame[] $frame + * Stack frames in this call stack. + * @type int $dropped_frames_count + * The number of stack frames that were dropped because there + * were too many stack frames. + * If this value is 0, then no stack frames were dropped. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); + parent::__construct($data); + } + + /** + * Stack frames in this call stack. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.StackTrace.StackFrame frame = 1; + * @return RepeatedField<\Google\Cloud\Trace\V2\StackTrace\StackFrame> + */ + public function getFrame() + { + return $this->frame; + } + + /** + * Stack frames in this call stack. + * + * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.StackTrace.StackFrame frame = 1; + * @param \Google\Cloud\Trace\V2\StackTrace\StackFrame[] $var + * @return $this + */ + public function setFrame($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V2\StackTrace\StackFrame::class); + $this->frame = $arr; + + return $this; + } + + /** + * The number of stack frames that were dropped because there + * were too many stack frames. + * If this value is 0, then no stack frames were dropped. + * + * Generated from protobuf field int32 dropped_frames_count = 2; + * @return int + */ + public function getDroppedFramesCount() + { + return $this->dropped_frames_count; + } + + /** + * The number of stack frames that were dropped because there + * were too many stack frames. + * If this value is 0, then no stack frames were dropped. + * + * Generated from protobuf field int32 dropped_frames_count = 2; + * @param int $var + * @return $this + */ + public function setDroppedFramesCount($var) + { + GPBUtil::checkInt32($var); + $this->dropped_frames_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/TruncatableString.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/TruncatableString.php new file mode 100644 index 000000000000..0afad14951f8 --- /dev/null +++ b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/TruncatableString.php @@ -0,0 +1,125 @@ +google.devtools.cloudtrace.v2.TruncatableString + */ +class TruncatableString extends \Google\Protobuf\Internal\Message +{ + /** + * The shortened string. For example, if the original string is 500 + * bytes long and the limit of the string is 128 bytes, then + * `value` contains the first 128 bytes of the 500-byte string. + * Truncation always happens on a UTF8 character boundary. If there + * are multi-byte characters in the string, then the length of the + * shortened string might be less than the size limit. + * + * Generated from protobuf field string value = 1; + */ + protected $value = ''; + /** + * The number of bytes removed from the original string. If this + * value is 0, then the string was not shortened. + * + * Generated from protobuf field int32 truncated_byte_count = 2; + */ + protected $truncated_byte_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $value + * The shortened string. For example, if the original string is 500 + * bytes long and the limit of the string is 128 bytes, then + * `value` contains the first 128 bytes of the 500-byte string. + * Truncation always happens on a UTF8 character boundary. If there + * are multi-byte characters in the string, then the length of the + * shortened string might be less than the size limit. + * @type int $truncated_byte_count + * The number of bytes removed from the original string. If this + * value is 0, then the string was not shortened. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); + parent::__construct($data); + } + + /** + * The shortened string. For example, if the original string is 500 + * bytes long and the limit of the string is 128 bytes, then + * `value` contains the first 128 bytes of the 500-byte string. + * Truncation always happens on a UTF8 character boundary. If there + * are multi-byte characters in the string, then the length of the + * shortened string might be less than the size limit. + * + * Generated from protobuf field string value = 1; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The shortened string. For example, if the original string is 500 + * bytes long and the limit of the string is 128 bytes, then + * `value` contains the first 128 bytes of the 500-byte string. + * Truncation always happens on a UTF8 character boundary. If there + * are multi-byte characters in the string, then the length of the + * shortened string might be less than the size limit. + * + * Generated from protobuf field string value = 1; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * The number of bytes removed from the original string. If this + * value is 0, then the string was not shortened. + * + * Generated from protobuf field int32 truncated_byte_count = 2; + * @return int + */ + public function getTruncatedByteCount() + { + return $this->truncated_byte_count; + } + + /** + * The number of bytes removed from the original string. If this + * value is 0, then the string was not shortened. + * + * Generated from protobuf field int32 truncated_byte_count = 2; + * @param int $var + * @return $this + */ + public function setTruncatedByteCount($var) + { + GPBUtil::checkInt32($var); + $this->truncated_byte_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Trace/v2/samples/V2/TraceServiceClient/batch_write_spans.php b/owl-bot-staging/Trace/v2/samples/V2/TraceServiceClient/batch_write_spans.php new file mode 100644 index 000000000000..df92e0c777ac --- /dev/null +++ b/owl-bot-staging/Trace/v2/samples/V2/TraceServiceClient/batch_write_spans.php @@ -0,0 +1,103 @@ +setName($spansName) + ->setSpanId($spansSpanId) + ->setDisplayName($spansDisplayName) + ->setStartTime($spansStartTime) + ->setEndTime($spansEndTime); + $spans = [$span,]; + $request = (new BatchWriteSpansRequest()) + ->setName($formattedName) + ->setSpans($spans); + + // Call the API and handle any network failures. + try { + $traceServiceClient->batchWriteSpans($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = TraceServiceClient::projectName('[PROJECT]'); + $spansName = '[NAME]'; + $spansSpanId = '[SPAN_ID]'; + + batch_write_spans_sample($formattedName, $spansName, $spansSpanId); +} +// [END cloudtrace_v2_generated_TraceService_BatchWriteSpans_sync] diff --git a/owl-bot-staging/Trace/v2/samples/V2/TraceServiceClient/create_span.php b/owl-bot-staging/Trace/v2/samples/V2/TraceServiceClient/create_span.php new file mode 100644 index 000000000000..6f1721930e63 --- /dev/null +++ b/owl-bot-staging/Trace/v2/samples/V2/TraceServiceClient/create_span.php @@ -0,0 +1,91 @@ +setName($name) + ->setSpanId($spanId) + ->setDisplayName($displayName) + ->setStartTime($startTime) + ->setEndTime($endTime); + + // Call the API and handle any network failures. + try { + /** @var Span $response */ + $response = $traceServiceClient->createSpan($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $name = '[NAME]'; + $spanId = '[SPAN_ID]'; + + create_span_sample($name, $spanId); +} +// [END cloudtrace_v2_generated_TraceService_CreateSpan_sync] diff --git a/owl-bot-staging/Trace/v2/src/V2/Client/TraceServiceClient.php b/owl-bot-staging/Trace/v2/src/V2/Client/TraceServiceClient.php new file mode 100644 index 000000000000..aa10f09aa88b --- /dev/null +++ b/owl-bot-staging/Trace/v2/src/V2/Client/TraceServiceClient.php @@ -0,0 +1,304 @@ + batchWriteSpansAsync(BatchWriteSpansRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSpanAsync(Span $request, array $optionalArgs = []) + */ +final class TraceServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.devtools.cloudtrace.v2.TraceService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudtrace.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudtrace.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + 'https://www.googleapis.com/auth/trace.append', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/trace_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/trace_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/trace_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/trace_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a span + * resource. + * + * @param string $project + * @param string $trace + * @param string $span + * + * @return string The formatted span resource. + */ + public static function spanName(string $project, string $trace, string $span): string + { + return self::getPathTemplate('span')->render([ + 'project' => $project, + 'trace' => $trace, + 'span' => $span, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - project: projects/{project} + * - span: projects/{project}/traces/{trace}/spans/{span} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'cloudtrace.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\Trace\V2\TraceServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new TraceServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Batch writes new spans to new or existing traces. You cannot update + * existing spans. + * + * The async variant is {@see TraceServiceClient::batchWriteSpansAsync()} . + * + * @example samples/V2/TraceServiceClient/batch_write_spans.php + * + * @param BatchWriteSpansRequest $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 batchWriteSpans(BatchWriteSpansRequest $request, array $callOptions = []): void + { + $this->startApiCall('BatchWriteSpans', $request, $callOptions)->wait(); + } + + /** + * Creates a new span. + * + * The async variant is {@see TraceServiceClient::createSpanAsync()} . + * + * @example samples/V2/TraceServiceClient/create_span.php + * + * @param Span $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 Span + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSpan(Span $request, array $callOptions = []): Span + { + return $this->startApiCall('CreateSpan', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Trace/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Trace/v2/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..5917f6fef5be --- /dev/null +++ b/owl-bot-staging/Trace/v2/src/V2/gapic_metadata.json @@ -0,0 +1,28 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.devtools.cloudtrace.v2", + "libraryPackage": "Google\\Cloud\\Trace\\V2", + "services": { + "TraceService": { + "clients": { + "grpc": { + "libraryClient": "TraceServiceGapicClient", + "rpcs": { + "BatchWriteSpans": { + "methods": [ + "batchWriteSpans" + ] + }, + "CreateSpan": { + "methods": [ + "createSpan" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Trace/v2/src/V2/resources/trace_service_client_config.json b/owl-bot-staging/Trace/v2/src/V2/resources/trace_service_client_config.json new file mode 100644 index 000000000000..527565fb4b5c --- /dev/null +++ b/owl-bot-staging/Trace/v2/src/V2/resources/trace_service_client_config.json @@ -0,0 +1,58 @@ +{ + "interfaces": { + "google.devtools.cloudtrace.v2.TraceService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ], + "retry_policy_2_codes": [ + "UNAVAILABLE", + "DEADLINE_EXCEEDED" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 2.0, + "max_retry_delay_millis": 30000, + "initial_rpc_timeout_millis": 120000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 120000, + "total_timeout_millis": 120000 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.2, + "max_retry_delay_millis": 1000, + "initial_rpc_timeout_millis": 120000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 120000, + "total_timeout_millis": 120000 + } + }, + "methods": { + "BatchWriteSpans": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateSpan": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + } + } + } + } +} diff --git a/owl-bot-staging/Trace/v2/src/V2/resources/trace_service_descriptor_config.php b/owl-bot-staging/Trace/v2/src/V2/resources/trace_service_descriptor_config.php new file mode 100644 index 000000000000..7e314c14a398 --- /dev/null +++ b/owl-bot-staging/Trace/v2/src/V2/resources/trace_service_descriptor_config.php @@ -0,0 +1,56 @@ + [ + 'google.devtools.cloudtrace.v2.TraceService' => [ + 'BatchWriteSpans' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateSpan' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Trace\V2\Span', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'project' => 'projects/{project}', + 'span' => 'projects/{project}/traces/{trace}/spans/{span}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Trace/v2/src/V2/resources/trace_service_rest_client_config.php b/owl-bot-staging/Trace/v2/src/V2/resources/trace_service_rest_client_config.php new file mode 100644 index 000000000000..c03716ffd1e2 --- /dev/null +++ b/owl-bot-staging/Trace/v2/src/V2/resources/trace_service_rest_client_config.php @@ -0,0 +1,53 @@ + [ + 'google.devtools.cloudtrace.v2.TraceService' => [ + 'BatchWriteSpans' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*}/traces:batchWrite', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateSpan' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/traces/*/spans/*}', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Trace/v2/tests/Unit/V2/Client/TraceServiceClientTest.php b/owl-bot-staging/Trace/v2/tests/Unit/V2/Client/TraceServiceClientTest.php new file mode 100644 index 000000000000..9405c91e9a3e --- /dev/null +++ b/owl-bot-staging/Trace/v2/tests/Unit/V2/Client/TraceServiceClientTest.php @@ -0,0 +1,254 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return TraceServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new TraceServiceClient($options); + } + + /** @test */ + public function batchWriteSpansTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->projectName('[PROJECT]'); + $spans = []; + $request = (new BatchWriteSpansRequest()) + ->setName($formattedName) + ->setSpans($spans); + $gapicClient->batchWriteSpans($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.cloudtrace.v2.TraceService/BatchWriteSpans', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getSpans(); + $this->assertProtobufEquals($spans, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function batchWriteSpansExceptionTest() + { + $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->projectName('[PROJECT]'); + $spans = []; + $request = (new BatchWriteSpansRequest()) + ->setName($formattedName) + ->setSpans($spans); + try { + $gapicClient->batchWriteSpans($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 createSpanTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $spanId2 = 'spanId2-643891741'; + $parentSpanId2 = 'parentSpanId2-1321225074'; + $expectedResponse = new Span(); + $expectedResponse->setName($name2); + $expectedResponse->setSpanId($spanId2); + $expectedResponse->setParentSpanId($parentSpanId2); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $spanId = 'spanId-2011840976'; + $displayName = new TruncatableString(); + $startTime = new Timestamp(); + $endTime = new Timestamp(); + $request = (new Span()) + ->setName($name) + ->setSpanId($spanId) + ->setDisplayName($displayName) + ->setStartTime($startTime) + ->setEndTime($endTime); + $response = $gapicClient->createSpan($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.cloudtrace.v2.TraceService/CreateSpan', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $actualValue = $actualRequestObject->getSpanId(); + $this->assertProtobufEquals($spanId, $actualValue); + $actualValue = $actualRequestObject->getDisplayName(); + $this->assertProtobufEquals($displayName, $actualValue); + $actualValue = $actualRequestObject->getStartTime(); + $this->assertProtobufEquals($startTime, $actualValue); + $actualValue = $actualRequestObject->getEndTime(); + $this->assertProtobufEquals($endTime, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSpanExceptionTest() + { + $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'; + $spanId = 'spanId-2011840976'; + $displayName = new TruncatableString(); + $startTime = new Timestamp(); + $endTime = new Timestamp(); + $request = (new Span()) + ->setName($name) + ->setSpanId($spanId) + ->setDisplayName($displayName) + ->setStartTime($startTime) + ->setEndTime($endTime); + try { + $gapicClient->createSpan($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 batchWriteSpansAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->projectName('[PROJECT]'); + $spans = []; + $request = (new BatchWriteSpansRequest()) + ->setName($formattedName) + ->setSpans($spans); + $gapicClient->batchWriteSpansAsync($request)->wait(); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.devtools.cloudtrace.v2.TraceService/BatchWriteSpans', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getSpans(); + $this->assertProtobufEquals($spans, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Annotations.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Annotations.php new file mode 100644 index 000000000000..1ecba652a2f9 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Annotations.php @@ -0,0 +1,26 @@ +internalAddGeneratedFile( + "\x0A\xA9@\x0A*google/cloud/visionai/v1/annotations.proto\x12\x18google.cloud.visionai.v1\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x95\x0D\x0A*PersonalProtectiveEquipmentDetectionOutput\x120\x0A\x0Ccurrent_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12m\x0A\x10detected_persons\x18\x02 \x03(\x0B2S.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson\x1A(\x0A\x0CPersonEntity\x12\x18\x0A\x10person_entity_id\x18\x01 \x01(\x03\x1Az\x0A\x09PPEEntity\x12\x14\x0A\x0Cppe_label_id\x18\x01 \x01(\x03\x12\x18\x0A\x10ppe_label_string\x18\x02 \x01(\x09\x12&\x0A\x1Eppe_supercategory_label_string\x18\x03 \x01(\x09\x12\x15\x0A\x0Dppe_entity_id\x18\x04 \x01(\x03\x1AR\x0A\x15NormalizedBoundingBox\x12\x0C\x0A\x04xmin\x18\x01 \x01(\x02\x12\x0C\x0A\x04ymin\x18\x02 \x01(\x02\x12\x0D\x0A\x05width\x18\x03 \x01(\x02\x12\x0E\x0A\x06height\x18\x04 \x01(\x02\x1A\xA6\x02\x0A\x13PersonIdentifiedBox\x12\x0E\x0A\x06box_id\x18\x01 \x01(\x03\x12{\x0A\x17normalized_bounding_box\x18\x02 \x01(\x0B2Z.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox\x12\x18\x0A\x10confidence_score\x18\x03 \x01(\x02\x12h\x0A\x0Dperson_entity\x18\x04 \x01(\x0B2Q.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity\x1A\x9D\x02\x0A\x10PPEIdentifiedBox\x12\x0E\x0A\x06box_id\x18\x01 \x01(\x03\x12{\x0A\x17normalized_bounding_box\x18\x02 \x01(\x0B2Z.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox\x12\x18\x0A\x10confidence_score\x18\x03 \x01(\x02\x12b\x0A\x0Appe_entity\x18\x04 \x01(\x0B2N.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity\x1A\x82\x05\x0A\x0EDetectedPerson\x12\x11\x0A\x09person_id\x18\x01 \x01(\x03\x12\x80\x01\x0A\x1Edetected_person_identified_box\x18\x02 \x01(\x0B2X.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox\x12|\x0A\x1Ddetected_ppe_identified_boxes\x18\x03 \x03(\x0B2U.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox\x12 \x0A\x13face_coverage_score\x18\x04 \x01(\x02H\x00\x88\x01\x01\x12 \x0A\x13eyes_coverage_score\x18\x05 \x01(\x02H\x01\x88\x01\x01\x12 \x0A\x13head_coverage_score\x18\x06 \x01(\x02H\x02\x88\x01\x01\x12!\x0A\x14hands_coverage_score\x18\x07 \x01(\x02H\x03\x88\x01\x01\x12 \x0A\x13body_coverage_score\x18\x08 \x01(\x02H\x04\x88\x01\x01\x12 \x0A\x13feet_coverage_score\x18\x09 \x01(\x02H\x05\x88\x01\x01B\x16\x0A\x14_face_coverage_scoreB\x16\x0A\x14_eyes_coverage_scoreB\x16\x0A\x14_head_coverage_scoreB\x17\x0A\x15_hands_coverage_scoreB\x16\x0A\x14_body_coverage_scoreB\x16\x0A\x14_feet_coverage_score\"\xCA\x04\x0A\x1FObjectDetectionPredictionResult\x120\x0A\x0Ccurrent_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12a\x0A\x10identified_boxes\x18\x02 \x03(\x0B2G.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox\x1A0\x0A\x06Entity\x12\x10\x0A\x08label_id\x18\x01 \x01(\x03\x12\x14\x0A\x0Clabel_string\x18\x02 \x01(\x09\x1A\xDF\x02\x0A\x0DIdentifiedBox\x12\x0E\x0A\x06box_id\x18\x01 \x01(\x03\x12~\x0A\x17normalized_bounding_box\x18\x02 \x01(\x0B2].google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox\x12\x18\x0A\x10confidence_score\x18\x03 \x01(\x02\x12P\x0A\x06entity\x18\x04 \x01(\x0B2@.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity\x1AR\x0A\x15NormalizedBoundingBox\x12\x0C\x0A\x04xmin\x18\x01 \x01(\x02\x12\x0C\x0A\x04ymin\x18\x02 \x01(\x02\x12\x0D\x0A\x05width\x18\x03 \x01(\x02\x12\x0E\x0A\x06height\x18\x04 \x01(\x02\"\x8B\x01\x0A\$ImageObjectDetectionPredictionResult\x12\x0B\x0A\x03ids\x18\x01 \x03(\x03\x12\x15\x0A\x0Ddisplay_names\x18\x02 \x03(\x09\x12\x13\x0A\x0Bconfidences\x18\x03 \x03(\x02\x12*\x0A\x06bboxes\x18\x04 \x03(\x0B2\x1A.google.protobuf.ListValue\"Y\x0A\x1EClassificationPredictionResult\x12\x0B\x0A\x03ids\x18\x01 \x03(\x03\x12\x15\x0A\x0Ddisplay_names\x18\x02 \x03(\x09\x12\x13\x0A\x0Bconfidences\x18\x03 \x03(\x02\"S\x0A!ImageSegmentationPredictionResult\x12\x15\x0A\x0Dcategory_mask\x18\x01 \x01(\x09\x12\x17\x0A\x0Fconfidence_mask\x18\x02 \x01(\x09\"\xC4\x02\x0A&VideoActionRecognitionPredictionResult\x126\x0A\x12segment_start_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x124\x0A\x10segment_end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12b\x0A\x07actions\x18\x03 \x03(\x0B2Q.google.cloud.visionai.v1.VideoActionRecognitionPredictionResult.IdentifiedAction\x1AH\x0A\x10IdentifiedAction\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12\x12\x0A\x0Aconfidence\x18\x03 \x01(\x02\"\xF9\x03\x0A#VideoObjectTrackingPredictionResult\x126\x0A\x12segment_start_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x124\x0A\x10segment_end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12]\x0A\x07objects\x18\x03 \x03(\x0B2L.google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.DetectedObject\x1AI\x0A\x0BBoundingBox\x12\x0D\x0A\x05x_min\x18\x01 \x01(\x02\x12\x0D\x0A\x05x_max\x18\x02 \x01(\x02\x12\x0D\x0A\x05y_min\x18\x03 \x01(\x02\x12\x0D\x0A\x05y_max\x18\x04 \x01(\x02\x1A\xB9\x01\x0A\x0EDetectedObject\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12_\x0A\x0Cbounding_box\x18\x03 \x01(\x0B2I.google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.BoundingBox\x12\x12\x0A\x0Aconfidence\x18\x04 \x01(\x02\x12\x10\x0A\x08track_id\x18\x05 \x01(\x03\"\xD6\x02\x0A#VideoClassificationPredictionResult\x126\x0A\x12segment_start_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x124\x0A\x10segment_end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12o\x0A\x0Fclassifications\x18\x03 \x03(\x0B2V.google.cloud.visionai.v1.VideoClassificationPredictionResult.IdentifiedClassification\x1AP\x0A\x18IdentifiedClassification\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12\x12\x0A\x0Aconfidence\x18\x03 \x01(\x02\"\xEB\x13\x0A!OccupancyCountingPredictionResult\x120\x0A\x0Ccurrent_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12c\x0A\x10identified_boxes\x18\x02 \x03(\x0B2I.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox\x12P\x0A\x05stats\x18\x03 \x01(\x0B2A.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats\x12Y\x0A\x0Atrack_info\x18\x04 \x03(\x0B2E.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo\x12b\x0A\x0Fdwell_time_info\x18\x05 \x03(\x0B2I.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo\x12\x10\x0A\x03pts\x18\x06 \x01(\x03H\x00\x88\x01\x01\x1A0\x0A\x06Entity\x12\x10\x0A\x08label_id\x18\x01 \x01(\x03\x12\x14\x0A\x0Clabel_string\x18\x02 \x01(\x09\x1A\xEB\x02\x0A\x0DIdentifiedBox\x12\x0E\x0A\x06box_id\x18\x01 \x01(\x03\x12\x80\x01\x0A\x17normalized_bounding_box\x18\x02 \x01(\x0B2_.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox\x12\x0D\x0A\x05score\x18\x03 \x01(\x02\x12R\x0A\x06entity\x18\x04 \x01(\x0B2B.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity\x12\x10\x0A\x08track_id\x18\x05 \x01(\x03\x1AR\x0A\x15NormalizedBoundingBox\x12\x0C\x0A\x04xmin\x18\x01 \x01(\x02\x12\x0C\x0A\x04ymin\x18\x02 \x01(\x02\x12\x0D\x0A\x05width\x18\x03 \x01(\x02\x12\x0E\x0A\x06height\x18\x04 \x01(\x02\x1A\xF5\x0A\x0A\x05Stats\x12g\x0A\x10full_frame_count\x18\x01 \x03(\x0B2M.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount\x12q\x0A\x14crossing_line_counts\x18\x02 \x03(\x0B2S.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount\x12m\x0A\x12active_zone_counts\x18\x03 \x03(\x0B2Q.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount\x1Ap\x0A\x0BObjectCount\x12R\x0A\x06entity\x18\x01 \x01(\x0B2B.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity\x12\x0D\x0A\x05count\x18\x02 \x01(\x05\x1A\xAD\x01\x0A\x16AccumulatedObjectCount\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12c\x0A\x0Cobject_count\x18\x02 \x01(\x0B2M.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount\x1A\xCB\x04\x0A\x11CrossingLineCount\x12>\x0A\x0Aannotation\x18\x01 \x01(\x0B2*.google.cloud.visionai.v1.StreamAnnotation\x12p\x0A\x19positive_direction_counts\x18\x02 \x03(\x0B2M.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount\x12p\x0A\x19negative_direction_counts\x18\x03 \x03(\x0B2M.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount\x12\x87\x01\x0A%accumulated_positive_direction_counts\x18\x04 \x03(\x0B2X.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount\x12\x87\x01\x0A%accumulated_negative_direction_counts\x18\x05 \x03(\x0B2X.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount\x1A\xB0\x01\x0A\x0FActiveZoneCount\x12>\x0A\x0Aannotation\x18\x01 \x01(\x0B2*.google.cloud.visionai.v1.StreamAnnotation\x12]\x0A\x06counts\x18\x02 \x03(\x0B2M.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount\x1AM\x0A\x09TrackInfo\x12\x10\x0A\x08track_id\x18\x01 \x01(\x09\x12.\x0A\x0Astart_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x1A\x9C\x01\x0A\x0DDwellTimeInfo\x12\x10\x0A\x08track_id\x18\x01 \x01(\x09\x12\x0F\x0A\x07zone_id\x18\x02 \x01(\x09\x124\x0A\x10dwell_start_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x122\x0A\x0Edwell_end_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x06\x0A\x04_pts\"\xAA\x02\x0A\x10StreamAnnotation\x12B\x0A\x0Bactive_zone\x18\x05 \x01(\x0B2+.google.cloud.visionai.v1.NormalizedPolygonH\x00\x12E\x0A\x0Dcrossing_line\x18\x06 \x01(\x0B2,.google.cloud.visionai.v1.NormalizedPolylineH\x00\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12\x15\x0A\x0Dsource_stream\x18\x03 \x01(\x09\x12<\x0A\x04type\x18\x04 \x01(\x0E2..google.cloud.visionai.v1.StreamAnnotationTypeB\x14\x0A\x12annotation_payload\"[\x0A\x11StreamAnnotations\x12F\x0A\x12stream_annotations\x18\x01 \x03(\x0B2*.google.cloud.visionai.v1.StreamAnnotation\"\\\x0A\x11NormalizedPolygon\x12G\x0A\x13normalized_vertices\x18\x01 \x03(\x0B2*.google.cloud.visionai.v1.NormalizedVertex\"]\x0A\x12NormalizedPolyline\x12G\x0A\x13normalized_vertices\x18\x01 \x03(\x0B2*.google.cloud.visionai.v1.NormalizedVertex\"(\x0A\x10NormalizedVertex\x12\x09\x0A\x01x\x18\x01 \x01(\x02\x12\x09\x0A\x01y\x18\x02 \x01(\x02\"`\x0A\x13AppPlatformMetadata\x12\x13\x0A\x0Bapplication\x18\x01 \x01(\x09\x12\x13\x0A\x0Binstance_id\x18\x02 \x01(\x09\x12\x0C\x0A\x04node\x18\x03 \x01(\x09\x12\x11\x0A\x09processor\x18\x04 \x01(\x09\"\xBE\x02\x0A\x1FAppPlatformCloudFunctionRequest\x12L\x0A\x15app_platform_metadata\x18\x01 \x01(\x0B2-.google.cloud.visionai.v1.AppPlatformMetadata\x12f\x0A\x0Bannotations\x18\x02 \x03(\x0B2Q.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation\x1Ae\x0A\x17StructedInputAnnotation\x12\x1D\x0A\x15ingestion_time_micros\x18\x01 \x01(\x03\x12+\x0A\x0Aannotation\x18\x02 \x01(\x0B2\x17.google.protobuf.Struct\"\xB5\x02\x0A AppPlatformCloudFunctionResponse\x12h\x0A\x0Bannotations\x18\x02 \x03(\x0B2S.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation\x12\x1E\x0A\x16annotation_passthrough\x18\x03 \x01(\x08\x12>\x0A\x06events\x18\x04 \x03(\x0B2..google.cloud.visionai.v1.AppPlatformEventBody\x1AG\x0A\x18StructedOutputAnnotation\x12+\x0A\x0Aannotation\x18\x01 \x01(\x0B2\x17.google.protobuf.Struct\"i\x0A\x14AppPlatformEventBody\x12\x15\x0A\x0Devent_message\x18\x01 \x01(\x09\x12(\x0A\x07payload\x18\x02 \x01(\x0B2\x17.google.protobuf.Struct\x12\x10\x0A\x08event_id\x18\x03 \x01(\x09*\x90\x01\x0A\x14StreamAnnotationType\x12&\x0A\"STREAM_ANNOTATION_TYPE_UNSPECIFIED\x10\x00\x12&\x0A\"STREAM_ANNOTATION_TYPE_ACTIVE_ZONE\x10\x01\x12(\x0A\$STREAM_ANNOTATION_TYPE_CROSSING_LINE\x10\x02B\xC0\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x10AnnotationsProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Common.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Common.php new file mode 100644 index 000000000000..6b1a2c2c659f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Common.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\x95\x0A\x0A%google/cloud/visionai/v1/common.proto\x12\x18google.cloud.visionai.v1\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xAC\x05\x0A\x07Cluster\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12=\x0A\x06labels\x18\x04 \x03(\x0B2-.google.cloud.visionai.v1.Cluster.LabelsEntry\x12G\x0A\x0Bannotations\x18\x05 \x03(\x0B22.google.cloud.visionai.v1.Cluster.AnnotationsEntry\x12'\x0A\x1Adataplane_service_endpoint\x18\x06 \x01(\x09B\x03\xE0A\x03\x12;\x0A\x05state\x18\x07 \x01(\x0E2'.google.cloud.visionai.v1.Cluster.StateB\x03\xE0A\x03\x12\x17\x0A\x0Apsc_target\x18\x08 \x01(\x09B\x03\xE0A\x03\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"V\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CPROVISIONING\x10\x01\x12\x0B\x0A\x07RUNNING\x10\x02\x12\x0C\x0A\x08STOPPING\x10\x03\x12\x09\x0A\x05ERROR\x10\x04:`\xEAA]\x0A\x1Fvisionai.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\x1E\x0A\x09GcsSource\x12\x11\x0A\x04uris\x18\x01 \x03(\x09B\x03\xE0A\x02B\xBB\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x0BCommonProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/HealthService.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/HealthService.php new file mode 100644 index 000000000000..f5e7bf4439fc --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/HealthService.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xE6\x06\x0A-google/cloud/visionai/v1/health_service.proto\x12\x18google.cloud.visionai.v1\x1A\x17google/api/client.proto\x1A\x19google/api/resource.proto\"K\x0A\x12HealthCheckRequest\x125\x0A\x07cluster\x18\x01 \x01(\x09B\$\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\"s\x0A\x13HealthCheckResponse\x12\x0F\x0A\x07healthy\x18\x01 \x01(\x08\x12\x0E\x0A\x06reason\x18\x02 \x01(\x09\x12;\x0A\x0Ccluster_info\x18\x03 \x01(\x0B2%.google.cloud.visionai.v1.ClusterInfo\"=\x0A\x0BClusterInfo\x12\x15\x0A\x0Dstreams_count\x18\x01 \x01(\x05\x12\x17\x0A\x0Fprocesses_count\x18\x02 \x01(\x052\x93\x02\x0A\x12HealthCheckService\x12\xAF\x01\x0A\x0BHealthCheck\x12,.google.cloud.visionai.v1.HealthCheckRequest\x1A-.google.cloud.visionai.v1.HealthCheckResponse\"C\x82\xD3\xE4\x93\x02=\x12;/v1/{cluster=projects/*/locations/*/clusters/*}:healthCheck\x1AK\xCAA\x17visionai.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xC7\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x17HealthCheckServiceProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Lva.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Lva.php new file mode 100644 index 000000000000..2ed6022d7539 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Lva.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xDB\x10\x0A\"google/cloud/visionai/v1/lva.proto\x12\x18google.cloud.visionai.v1\"\xCA\x04\x0A\x12OperatorDefinition\x12\x10\x0A\x08operator\x18\x01 \x01(\x09\x12S\x0A\x0Ainput_args\x18\x02 \x03(\x0B2?.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition\x12T\x0A\x0Boutput_args\x18\x03 \x03(\x0B2?.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition\x12T\x0A\x0Aattributes\x18\x04 \x03(\x0B2@.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition\x12B\x0A\x09resources\x18\x05 \x01(\x0B2/.google.cloud.visionai.v1.ResourceSpecification\x12\x19\x0A\x11short_description\x18\x06 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x07 \x01(\x09\x1A4\x0A\x12ArgumentDefinition\x12\x10\x0A\x08argument\x18\x01 \x01(\x09\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x1Aw\x0A\x13AttributeDefinition\x12\x11\x0A\x09attribute\x18\x01 \x01(\x09\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x12?\x0A\x0Ddefault_value\x18\x03 \x01(\x0B2(.google.cloud.visionai.v1.AttributeValue\"\x88\x01\x0A\x15ResourceSpecification\x12\x0B\x0A\x03cpu\x18\x01 \x01(\x09\x12\x12\x0A\x0Acpu_limits\x18\x05 \x01(\x09\x12\x0E\x0A\x06memory\x18\x02 \x01(\x09\x12\x15\x0A\x0Dmemory_limits\x18\x06 \x01(\x09\x12\x0C\x0A\x04gpus\x18\x03 \x01(\x05\x12\x19\x0A\x11latency_budget_ms\x18\x04 \x01(\x05\"M\x0A\x0EAttributeValue\x12\x0B\x0A\x01i\x18\x01 \x01(\x03H\x00\x12\x0B\x0A\x01f\x18\x02 \x01(\x02H\x00\x12\x0B\x0A\x01b\x18\x03 \x01(\x08H\x00\x12\x0B\x0A\x01s\x18\x04 \x01(\x0CH\x00B\x07\x0A\x05value\"\xDB\x05\x0A\x12AnalyzerDefinition\x12\x10\x0A\x08analyzer\x18\x01 \x01(\x09\x12\x10\x0A\x08operator\x18\x02 \x01(\x09\x12H\x0A\x06inputs\x18\x03 \x03(\x0B28.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput\x12F\x0A\x05attrs\x18\x04 \x03(\x0B27.google.cloud.visionai.v1.AnalyzerDefinition.AttrsEntry\x12P\x0A\x0Ddebug_options\x18\x05 \x01(\x0B29.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions\x12T\x0A\x0Foperator_option\x18\x06 \x01(\x0B2;.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption\x1A\x1C\x0A\x0BStreamInput\x12\x0D\x0A\x05input\x18\x01 \x01(\x09\x1A\xBF\x01\x0A\x0CDebugOptions\x12r\x0A\x15environment_variables\x18\x01 \x03(\x0B2S.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions.EnvironmentVariablesEntry\x1A;\x0A\x19EnvironmentVariablesEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A/\x0A\x0EOperatorOption\x12\x0B\x0A\x03tag\x18\x01 \x01(\x09\x12\x10\x0A\x08registry\x18\x02 \x01(\x09\x1AV\x0A\x0AAttrsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x127\x0A\x05value\x18\x02 \x01(\x0B2(.google.cloud.visionai.v1.AttributeValue:\x028\x01\"U\x0A\x12AnalysisDefinition\x12?\x0A\x09analyzers\x18\x01 \x03(\x0B2,.google.cloud.visionai.v1.AnalyzerDefinition\"\xBC\x01\x0A\x09RunStatus\x128\x0A\x05state\x18\x01 \x01(\x0E2).google.cloud.visionai.v1.RunStatus.State\x12\x0E\x0A\x06reason\x18\x02 \x01(\x09\"e\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CINITIALIZING\x10\x01\x12\x0B\x0A\x07RUNNING\x10\x02\x12\x0D\x0A\x09COMPLETED\x10\x03\x12\x0A\x0A\x06FAILED\x10\x04\x12\x0B\x0A\x07PENDING\x10\x05*=\x0A\x07RunMode\x12\x18\x0A\x14RUN_MODE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04LIVE\x10\x01\x12\x0E\x0A\x0ASUBMISSION\x10\x02B\xB8\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x08LvaProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/LvaResources.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/LvaResources.php new file mode 100644 index 000000000000..ff8ceec2d44b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/LvaResources.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xD2\x10\x0A,google/cloud/visionai/v1/lva_resources.proto\x12\x18google.cloud.visionai.v1\x1A\x19google/api/resource.proto\x1A\"google/cloud/visionai/v1/lva.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB9\x03\x0A\x08Operator\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12>\x0A\x06labels\x18\x04 \x03(\x0B2..google.cloud.visionai.v1.Operator.LabelsEntry\x12I\x0A\x13operator_definition\x18\x05 \x01(\x0B2,.google.cloud.visionai.v1.OperatorDefinition\x12\x14\x0A\x0Cdocker_image\x18\x06 \x01(\x09\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:c\xEAA`\x0A visionai.googleapis.com/Operator\x12\x0A\x06labels\x18\x04 \x03(\x0B2..google.cloud.visionai.v1.Analysis.LabelsEntry\x12I\x0A\x13analysis_definition\x18\x05 \x01(\x0B2,.google.cloud.visionai.v1.AnalysisDefinition\x12Z\x0A\x15input_streams_mapping\x18\x06 \x03(\x0B2;.google.cloud.visionai.v1.Analysis.InputStreamsMappingEntry\x12\\\x0A\x16output_streams_mapping\x18\x07 \x03(\x0B2<.google.cloud.visionai.v1.Analysis.OutputStreamsMappingEntry\x12\x1B\x0A\x13disable_event_watch\x18\x08 \x01(\x08\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A:\x0A\x18InputStreamsMappingEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A;\x0A\x19OutputStreamsMappingEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:u\xEAAr\x0A visionai.googleapis.com/Analysis\x12Nprojects/{project}/locations/{location}/clusters/{cluster}/analyses/{analysis}\"\x97\x04\x0A\x07Process\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12:\x0A\x08analysis\x18\x04 \x01(\x09B(\xE0A\x02\xFAA\"\x0A visionai.googleapis.com/Analysis\x12 \x0A\x13attribute_overrides\x18\x05 \x03(\x09B\x03\xE0A\x01\x12<\x0A\x0Arun_status\x18\x06 \x01(\x0B2#.google.cloud.visionai.v1.RunStatusB\x03\xE0A\x01\x128\x0A\x08run_mode\x18\x07 \x01(\x0E2!.google.cloud.visionai.v1.RunModeB\x03\xE0A\x01\x12\x15\x0A\x08event_id\x18\x08 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08batch_id\x18\x09 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bretry_count\x18\x0A \x01(\x05B\x03\xE0A\x01:t\xEAAq\x0A\x1Fvisionai.googleapis.com/Process\x12Nprojects/{project}/locations/{location}/clusters/{cluster}/processes/{process}B\xC1\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x11LvaResourcesProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/LvaService.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/LvaService.php new file mode 100644 index 000000000000..0cfd009e8cba --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/LvaService.php @@ -0,0 +1,33 @@ +internalAddGeneratedFile( + "\x0A\xB1>\x0A*google/cloud/visionai/v1/lva_service.proto\x12\x18google.cloud.visionai.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A%google/cloud/visionai/v1/common.proto\x1A,google/cloud/visionai/v1/lva_resources.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\"\x9A\x01\x0A\x14ListOperatorsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"|\x0A\x15ListOperatorsResponse\x125\x0A\x09operators\x18\x01 \x03(\x0B2\".google.cloud.visionai.v1.Operator\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"L\x0A\x12GetOperatorRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A visionai.googleapis.com/Operator\"\xC0\x01\x0A\x15CreateOperatorRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x18\x0A\x0Boperator_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x129\x0A\x08operator\x18\x03 \x01(\x0B2\".google.cloud.visionai.v1.OperatorB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xA1\x01\x0A\x15UpdateOperatorRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x129\x0A\x08operator\x18\x02 \x01(\x0B2\".google.cloud.visionai.v1.OperatorB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"h\x0A\x15DeleteOperatorRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A visionai.googleapis.com/Operator\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\x97\x01\x0A\x13ListAnalysesRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"z\x0A\x14ListAnalysesResponse\x124\x0A\x08analyses\x18\x01 \x03(\x0B2\".google.cloud.visionai.v1.Analysis\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"L\x0A\x12GetAnalysisRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A visionai.googleapis.com/Analysis\"\xBE\x01\x0A\x15CreateAnalysisRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x18\x0A\x0Banalysis_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x129\x0A\x08analysis\x18\x03 \x01(\x0B2\".google.cloud.visionai.v1.AnalysisB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xA1\x01\x0A\x15UpdateAnalysisRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x129\x0A\x08analysis\x18\x02 \x01(\x0B2\".google.cloud.visionai.v1.AnalysisB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"h\x0A\x15DeleteAnalysisRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A visionai.googleapis.com/Analysis\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\x98\x01\x0A\x14ListProcessesRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"{\x0A\x15ListProcessesResponse\x124\x0A\x09processes\x18\x01 \x03(\x0B2!.google.cloud.visionai.v1.Process\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"J\x0A\x11GetProcessRequest\x125\x0A\x04name\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Process\"\xBA\x01\x0A\x14CreateProcessRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x17\x0A\x0Aprocess_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x127\x0A\x07process\x18\x03 \x01(\x0B2!.google.cloud.visionai.v1.ProcessB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\x9E\x01\x0A\x14UpdateProcessRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x127\x0A\x07process\x18\x02 \x01(\x0B2!.google.cloud.visionai.v1.ProcessB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"f\x0A\x14DeleteProcessRequest\x125\x0A\x04name\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Process\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\xD1\x02\x0A\x16BatchRunProcessRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12E\x0A\x08requests\x18\x02 \x03(\x0B2..google.cloud.visionai.v1.CreateProcessRequestB\x03\xE0A\x02\x12]\x0A\x07options\x18\x03 \x01(\x0B2G.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptionsB\x03\xE0A\x01\x12\x15\x0A\x08batch_id\x18\x04 \x01(\x09B\x03\xE0A\x03\x1AA\x0A\x16BatchRunProcessOptions\x12\x13\x0A\x0Bretry_count\x18\x01 \x01(\x05\x12\x12\x0A\x0Abatch_size\x18\x02 \x01(\x05\"a\x0A\x17BatchRunProcessResponse\x12\x10\x0A\x08batch_id\x18\x01 \x01(\x09\x124\x0A\x09processes\x18\x02 \x03(\x0B2!.google.cloud.visionai.v1.Process\"\x96\x01\x0A\x1AResolveOperatorInfoRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12=\x0A\x07queries\x18\x02 \x03(\x0B2'.google.cloud.visionai.v1.OperatorQueryB\x03\xE0A\x02\"s\x0A\x0DOperatorQuery\x12\x15\x0A\x08operator\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x10\x0A\x03tag\x18\x02 \x01(\x09B\x03\xE0A\x01\x129\x0A\x08registry\x18\x03 \x01(\x0E2\".google.cloud.visionai.v1.RegistryB\x03\xE0A\x01\"T\x0A\x1BResolveOperatorInfoResponse\x125\x0A\x09operators\x18\x01 \x03(\x0B2\".google.cloud.visionai.v1.Operator\"\xA0\x01\x0A\x1AListPublicOperatorsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"m\x0A\x1BListPublicOperatorsResponse\x125\x0A\x09operators\x18\x01 \x03(\x0B2\".google.cloud.visionai.v1.Operator\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09*=\x0A\x08Registry\x12\x18\x0A\x14REGISTRY_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06PUBLIC\x10\x01\x12\x0B\x0A\x07PRIVATE\x10\x022\x8D\x1E\x0A\x12LiveVideoAnalytics\x12\xCC\x01\x0A\x13ListPublicOperators\x124.google.cloud.visionai.v1.ListPublicOperatorsRequest\x1A5.google.cloud.visionai.v1.ListPublicOperatorsResponse\"H\xDAA\x06parent\x82\xD3\xE4\x93\x029\x127/v1/{parent=projects/*/locations/*}:listPublicOperators\x12\xD7\x01\x0A\x13ResolveOperatorInfo\x124.google.cloud.visionai.v1.ResolveOperatorInfoRequest\x1A5.google.cloud.visionai.v1.ResolveOperatorInfoResponse\"S\xDAA\x0Eparent,queries\x82\xD3\xE4\x93\x02<\"7/v1/{parent=projects/*/locations/*}:resolveOperatorInfo:\x01*\x12\xB0\x01\x0A\x0DListOperators\x12..google.cloud.visionai.v1.ListOperatorsRequest\x1A/.google.cloud.visionai.v1.ListOperatorsResponse\">\xDAA\x06parent\x82\xD3\xE4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/operators\x12\x9D\x01\x0A\x0BGetOperator\x12,.google.cloud.visionai.v1.GetOperatorRequest\x1A\".google.cloud.visionai.v1.Operator\"<\xDAA\x04name\x82\xD3\xE4\x93\x02/\x12-/v1/{name=projects/*/locations/*/operators/*}\x12\xDF\x01\x0A\x0ECreateOperator\x12/.google.cloud.visionai.v1.CreateOperatorRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA\x1D\x0A\x08Operator\x12\x11OperationMetadata\xDAA\x1Bparent,operator,operator_id\x82\xD3\xE4\x93\x029\"-/v1/{parent=projects/*/locations/*}/operators:\x08operator\x12\xE1\x01\x0A\x0EUpdateOperator\x12/.google.cloud.visionai.v1.UpdateOperatorRequest\x1A\x1D.google.longrunning.Operation\"\x7F\xCAA\x1D\x0A\x08Operator\x12\x11OperationMetadata\xDAA\x14operator,update_mask\x82\xD3\xE4\x93\x02B26/v1/{operator.name=projects/*/locations/*/operators/*}:\x08operator\x12\xCB\x01\x0A\x0EDeleteOperator\x12/.google.cloud.visionai.v1.DeleteOperatorRequest\x1A\x1D.google.longrunning.Operation\"i\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02/*-/v1/{name=projects/*/locations/*/operators/*}\x12\xB7\x01\x0A\x0CListAnalyses\x12-.google.cloud.visionai.v1.ListAnalysesRequest\x1A..google.cloud.visionai.v1.ListAnalysesResponse\"H\xDAA\x06parent\x82\xD3\xE4\x93\x029\x127/v1/{parent=projects/*/locations/*/clusters/*}/analyses\x12\xA7\x01\x0A\x0BGetAnalysis\x12,.google.cloud.visionai.v1.GetAnalysisRequest\x1A\".google.cloud.visionai.v1.Analysis\"F\xDAA\x04name\x82\xD3\xE4\x93\x029\x127/v1/{name=projects/*/locations/*/clusters/*/analyses/*}\x12\xEA\x01\x0A\x0ECreateAnalysis\x12/.google.cloud.visionai.v1.CreateAnalysisRequest\x1A\x1D.google.longrunning.Operation\"\x87\x01\xCAA\x1D\x0A\x08Analysis\x12\x11OperationMetadata\xDAA\x1Bparent,analysis,analysis_id\x82\xD3\xE4\x93\x02C\"7/v1/{parent=projects/*/locations/*/clusters/*}/analyses:\x08analysis\x12\xEC\x01\x0A\x0EUpdateAnalysis\x12/.google.cloud.visionai.v1.UpdateAnalysisRequest\x1A\x1D.google.longrunning.Operation\"\x89\x01\xCAA\x1D\x0A\x08Analysis\x12\x11OperationMetadata\xDAA\x14analysis,update_mask\x82\xD3\xE4\x93\x02L2@/v1/{analysis.name=projects/*/locations/*/clusters/*/analyses/*}:\x08analysis\x12\xD5\x01\x0A\x0EDeleteAnalysis\x12/.google.cloud.visionai.v1.DeleteAnalysisRequest\x1A\x1D.google.longrunning.Operation\"s\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x029*7/v1/{name=projects/*/locations/*/clusters/*/analyses/*}\x12\xBB\x01\x0A\x0DListProcesses\x12..google.cloud.visionai.v1.ListProcessesRequest\x1A/.google.cloud.visionai.v1.ListProcessesResponse\"I\xDAA\x06parent\x82\xD3\xE4\x93\x02:\x128/v1/{parent=projects/*/locations/*/clusters/*}/processes\x12\xA5\x01\x0A\x0AGetProcess\x12+.google.cloud.visionai.v1.GetProcessRequest\x1A!.google.cloud.visionai.v1.Process\"G\xDAA\x04name\x82\xD3\xE4\x93\x02:\x128/v1/{name=projects/*/locations/*/clusters/*/processes/*}\x12\xE5\x01\x0A\x0DCreateProcess\x12..google.cloud.visionai.v1.CreateProcessRequest\x1A\x1D.google.longrunning.Operation\"\x84\x01\xCAA\x1C\x0A\x07Process\x12\x11OperationMetadata\xDAA\x19parent,process,process_id\x82\xD3\xE4\x93\x02C\"8/v1/{parent=projects/*/locations/*/clusters/*}/processes:\x07process\x12\xE7\x01\x0A\x0DUpdateProcess\x12..google.cloud.visionai.v1.UpdateProcessRequest\x1A\x1D.google.longrunning.Operation\"\x86\x01\xCAA\x1C\x0A\x07Process\x12\x11OperationMetadata\xDAA\x13process,update_mask\x82\xD3\xE4\x93\x02K2@/v1/{process.name=projects/*/locations/*/clusters/*/processes/*}:\x07process\x12\xD4\x01\x0A\x0DDeleteProcess\x12..google.cloud.visionai.v1.DeleteProcessRequest\x1A\x1D.google.longrunning.Operation\"t\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02:*8/v1/{name=projects/*/locations/*/clusters/*/processes/*}\x12\xF2\x01\x0A\x0FBatchRunProcess\x120.google.cloud.visionai.v1.BatchRunProcessRequest\x1A\x1D.google.longrunning.Operation\"\x8D\x01\xCAA,\x0A\x17BatchRunProcessResponse\x12\x11OperationMetadata\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x02F\"A/v1/{parent=projects/*/locations/*/clusters/*}/processes:batchRun:\x01*\x1AK\xCAA\x17visionai.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xBF\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x0FLvaServiceProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Platform.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Platform.php new file mode 100644 index 000000000000..259de146a890 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Platform.php @@ -0,0 +1,36 @@ +internalAddGeneratedFile( + "\x0A\x9B\xC0\x01\x0A'google/cloud/visionai/v1/platform.proto\x12\x18google.cloud.visionai.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A*google/cloud/visionai/v1/annotations.proto\x1A%google/cloud/visionai/v1/common.proto\x1A#google/longrunning/operations.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\$\x0A\"DeleteApplicationInstancesResponse\"\$\x0A\"CreateApplicationInstancesResponse\"\$\x0A\"UpdateApplicationInstancesResponse\"\xCA\x01\x0A!CreateApplicationInstancesRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\x12Q\x0A\x15application_instances\x18\x02 \x03(\x0B2-.google.cloud.visionai.v1.ApplicationInstanceB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xB7\x01\x0A!DeleteApplicationInstancesRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\x12>\x0A\x0Cinstance_ids\x18\x02 \x03(\x09B(\xE0A\x02\xFAA\"\x0A visionai.googleapis.com/Instance\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x1B\x0A\x19DeployApplicationResponse\"\x1D\x0A\x1BUndeployApplicationResponse\"&\x0A\$RemoveApplicationStreamInputResponse\"#\x0A!AddApplicationStreamInputResponse\"&\x0A\$UpdateApplicationStreamInputResponse\"\x9F\x01\x0A\x17ListApplicationsRequest\x12;\x0A\x06parent\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x12#visionai.googleapis.com/Application\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"\x85\x01\x0A\x18ListApplicationsResponse\x12;\x0A\x0Capplications\x18\x01 \x03(\x0B2%.google.cloud.visionai.v1.Application\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"R\x0A\x15GetApplicationRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\"\xCE\x01\x0A\x18CreateApplicationRequest\x12;\x0A\x06parent\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x12#visionai.googleapis.com/Application\x12\x1B\x0A\x0Eapplication_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12?\x0A\x0Bapplication\x18\x03 \x01(\x0B2%.google.cloud.visionai.v1.ApplicationB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xAA\x01\x0A\x18UpdateApplicationRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12?\x0A\x0Bapplication\x18\x02 \x01(\x0B2%.google.cloud.visionai.v1.ApplicationB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x82\x01\x0A\x18DeleteApplicationRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x12\x0A\x05force\x18\x03 \x01(\x08B\x03\xE0A\x01\"\xA5\x01\x0A\x18DeployApplicationRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\x12\x15\x0A\x0Dvalidate_only\x18\x02 \x01(\x08\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x1E\x0A\x11enable_monitoring\x18\x04 \x01(\x08B\x03\xE0A\x01\"p\x0A\x1AUndeployApplicationRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"h\x0A\x16ApplicationStreamInput\x12N\x0A\x16stream_with_annotation\x18\x01 \x01(\x0B2..google.cloud.visionai.v1.StreamWithAnnotation\"\xCB\x01\x0A AddApplicationStreamInputRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\x12S\x0A\x19application_stream_inputs\x18\x02 \x03(\x0B20.google.cloud.visionai.v1.ApplicationStreamInput\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\xE5\x01\x0A#UpdateApplicationStreamInputRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\x12S\x0A\x19application_stream_inputs\x18\x02 \x03(\x0B20.google.cloud.visionai.v1.ApplicationStreamInput\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x0Dallow_missing\x18\x04 \x01(\x08\"\xB2\x02\x0A#RemoveApplicationStreamInputRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\x12m\x0A\x14target_stream_inputs\x18\x02 \x03(\x0B2O.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\x1AH\x0A\x11TargetStreamInput\x123\x0A\x06stream\x18\x01 \x01(\x09B#\xFAA \x0A\x1Evisionai.googleapis.com/Stream\"\x99\x01\x0A\x14ListInstancesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 visionai.googleapis.com/Instance\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"|\x0A\x15ListInstancesResponse\x125\x0A\x09instances\x18\x01 \x03(\x0B2\".google.cloud.visionai.v1.Instance\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"L\x0A\x12GetInstanceRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A visionai.googleapis.com/Instance\"\x93\x01\x0A\x11ListDraftsRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x12\x1Dvisionai.googleapis.com/Draft\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"s\x0A\x12ListDraftsResponse\x12/\x0A\x06drafts\x18\x01 \x03(\x0B2\x1F.google.cloud.visionai.v1.Draft\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"F\x0A\x0FGetDraftRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Draft\"\xB0\x01\x0A\x12CreateDraftRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x12\x1Dvisionai.googleapis.com/Draft\x12\x15\x0A\x08draft_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x123\x0A\x05draft\x18\x03 \x01(\x0B2\x1F.google.cloud.visionai.v1.DraftB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xAF\x01\x0A\x12UpdateDraftRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x123\x0A\x05draft\x18\x02 \x01(\x0B2\x1F.google.cloud.visionai.v1.DraftB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x0Dallow_missing\x18\x04 \x01(\x08\"\xAD\x03\x0A!UpdateApplicationInstancesRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\x12t\x0A\x15application_instances\x18\x02 \x03(\x0B2U.google.cloud.visionai.v1.UpdateApplicationInstancesRequest.UpdateApplicationInstance\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x0Dallow_missing\x18\x04 \x01(\x08\x1A\xA6\x01\x0A\x19UpdateApplicationInstance\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x129\x0A\x08instance\x18\x02 \x01(\x0B2\".google.cloud.visionai.v1.InstanceB\x03\xE0A\x02\x12\x18\x0A\x0Binstance_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"b\x0A\x12DeleteDraftRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Draft\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\x9B\x01\x0A\x15ListProcessorsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!visionai.googleapis.com/Processor\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"\x7F\x0A\x16ListProcessorsResponse\x127\x0A\x0Aprocessors\x18\x01 \x03(\x0B2#.google.cloud.visionai.v1.Processor\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"Z\x0A\x1DListPrebuiltProcessorsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!visionai.googleapis.com/Processor\"Y\x0A\x1EListPrebuiltProcessorsResponse\x127\x0A\x0Aprocessors\x18\x01 \x03(\x0B2#.google.cloud.visionai.v1.Processor\"N\x0A\x13GetProcessorRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!visionai.googleapis.com/Processor\"\xC4\x01\x0A\x16CreateProcessorRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!visionai.googleapis.com/Processor\x12\x19\x0A\x0Cprocessor_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12;\x0A\x09processor\x18\x03 \x01(\x0B2#.google.cloud.visionai.v1.ProcessorB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xA4\x01\x0A\x16UpdateProcessorRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12;\x0A\x09processor\x18\x02 \x01(\x0B2#.google.cloud.visionai.v1.ProcessorB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"j\x0A\x16DeleteProcessorRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!visionai.googleapis.com/Processor\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\xDA\x0A\x0A\x0BApplication\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12A\x0A\x06labels\x18\x04 \x03(\x0B21.google.cloud.visionai.v1.Application.LabelsEntry\x12\x19\x0A\x0Cdisplay_name\x18\x05 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x0Bdescription\x18\x06 \x01(\x09\x12I\x0A\x13application_configs\x18\x07 \x01(\x0B2,.google.cloud.visionai.v1.ApplicationConfigs\x12W\x0A\x0Cruntime_info\x18\x08 \x01(\x0B2<.google.cloud.visionai.v1.Application.ApplicationRuntimeInfoB\x03\xE0A\x03\x12?\x0A\x05state\x18\x09 \x01(\x0E2+.google.cloud.visionai.v1.Application.StateB\x03\xE0A\x03\x12G\x0A\x0Cbilling_mode\x18\x0C \x01(\x0E21.google.cloud.visionai.v1.Application.BillingMode\x1A\xA1\x03\x0A\x16ApplicationRuntimeInfo\x12/\x0A\x0Bdeploy_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12r\x0A\x17global_output_resources\x18\x03 \x03(\x0B2Q.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource\x12h\x0A\x11monitoring_config\x18\x04 \x01(\x0B2M.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig\x1AS\x0A\x14GlobalOutputResource\x12\x17\x0A\x0Foutput_resource\x18\x01 \x01(\x09\x12\x15\x0A\x0Dproducer_node\x18\x02 \x01(\x09\x12\x0B\x0A\x03key\x18\x03 \x01(\x09\x1A#\x0A\x10MonitoringConfig\x12\x0F\x0A\x07enabled\x18\x01 \x01(\x08\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\xA7\x01\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07CREATED\x10\x01\x12\x0D\x0A\x09DEPLOYING\x10\x02\x12\x0C\x0A\x08DEPLOYED\x10\x03\x12\x0F\x0A\x0BUNDEPLOYING\x10\x04\x12\x0B\x0A\x07DELETED\x10\x05\x12\x09\x0A\x05ERROR\x10\x06\x12\x0C\x0A\x08CREATING\x10\x07\x12\x0C\x0A\x08UPDATING\x10\x08\x12\x0C\x0A\x08DELETING\x10\x09\x12\x0A\x0A\x06FIXING\x10\x0A\"B\x0A\x0BBillingMode\x12\x1C\x0A\x18BILLING_MODE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04PAYG\x10\x01\x12\x0B\x0A\x07MONTHLY\x10\x02:o\xEAAl\x0A#visionai.googleapis.com/Application\x12Bprojects/{project}/locations/{location}/applications/{application}R\x01\x01\"\x8A\x02\x0A\x12ApplicationConfigs\x12-\x0A\x05nodes\x18\x01 \x03(\x0B2\x1E.google.cloud.visionai.v1.Node\x12_\x0A\x15event_delivery_config\x18\x03 \x01(\x0B2@.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig\x1Ad\x0A\x13EventDeliveryConfig\x12\x0F\x0A\x07channel\x18\x01 \x01(\x09\x12<\x0A\x19minimal_delivery_interval\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\"\xE7\x02\x0A\x04Node\x12.\x0A\$output_all_output_channels_to_stream\x18\x06 \x01(\x08H\x00\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12>\x0A\x0Bnode_config\x18\x03 \x01(\x0B2).google.cloud.visionai.v1.ProcessorConfig\x12\x11\x0A\x09processor\x18\x04 \x01(\x09\x129\x0A\x07parents\x18\x05 \x03(\x0B2(.google.cloud.visionai.v1.Node.InputEdge\x1A`\x0A\x09InputEdge\x12\x13\x0A\x0Bparent_node\x18\x01 \x01(\x09\x12\x1D\x0A\x15parent_output_channel\x18\x02 \x01(\x09\x12\x1F\x0A\x17connected_input_channel\x18\x03 \x01(\x09B\x16\x0A\x14stream_output_config\"\xE8\x03\x0A\x05Draft\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12;\x0A\x06labels\x18\x03 \x03(\x0B2+.google.cloud.visionai.v1.Draft.LabelsEntry\x12\x19\x0A\x0Cdisplay_name\x18\x04 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x0Bdescription\x18\x05 \x01(\x09\x12O\x0A\x19draft_application_configs\x18\x06 \x01(\x0B2,.google.cloud.visionai.v1.ApplicationConfigs\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:x\xEAAu\x0A\x1Dvisionai.googleapis.com/Draft\x12Qprojects/{project}/locations/{location}/applications/{application}/drafts/{draft}R\x01\x01\"\xD4\x0B\x0A\x08Instance\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12>\x0A\x06labels\x18\x03 \x03(\x0B2..google.cloud.visionai.v1.Instance.LabelsEntry\x12\x19\x0A\x0Cdisplay_name\x18\x04 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x0Bdescription\x18\x05 \x01(\x09\x12F\x0A\x0Dinstance_type\x18\x0A \x01(\x0E2/.google.cloud.visionai.v1.Instance.InstanceType\x12I\x0A\x0Finput_resources\x18\x06 \x03(\x0B20.google.cloud.visionai.v1.Instance.InputResource\x12K\x0A\x10output_resources\x18\x07 \x03(\x0B21.google.cloud.visionai.v1.Instance.OutputResource\x127\x0A\x05state\x18\x09 \x01(\x0E2(.google.cloud.visionai.v1.Instance.State\x1A\xC9\x02\x0A\x0DInputResource\x12\x18\x0A\x0Einput_resource\x18\x01 \x01(\x09H\x00\x12N\x0A\x10annotated_stream\x18\x04 \x01(\x0B2..google.cloud.visionai.v1.StreamWithAnnotationB\x02\x18\x01H\x00\x125\x0A\x09data_type\x18\x06 \x01(\x0E2\".google.cloud.visionai.v1.DataType\x12\x15\x0A\x0Dconsumer_node\x18\x02 \x01(\x09\x12\x1E\x0A\x16input_resource_binding\x18\x03 \x01(\x09\x12B\x0A\x0Bannotations\x18\x05 \x01(\x0B2-.google.cloud.visionai.v1.ResourceAnnotationsB\x1C\x0A\x1Ainput_resource_information\x1A\x92\x01\x0A\x0EOutputResource\x12\x17\x0A\x0Foutput_resource\x18\x01 \x01(\x09\x12\x15\x0A\x0Dproducer_node\x18\x02 \x01(\x09\x12\x1F\x0A\x17output_resource_binding\x18\x04 \x01(\x09\x12\x19\x0A\x0Cis_temporary\x18\x03 \x01(\x08B\x03\xE0A\x03\x12\x14\x0A\x07autogen\x18\x05 \x01(\x08B\x03\xE0A\x03\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"t\x0A\x0CInstanceType\x12\x1D\x0A\x19INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x18\x0A\x14STREAMING_PREDICTION\x10\x01\x12\x14\x0A\x10BATCH_PREDICTION\x10\x02\x12\x15\x0A\x11ONLINE_PREDICTION\x10\x03\"\xB5\x01\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0B\x0A\x07CREATED\x10\x02\x12\x0D\x0A\x09DEPLOYING\x10\x03\x12\x0C\x0A\x08DEPLOYED\x10\x04\x12\x0F\x0A\x0BUNDEPLOYING\x10\x05\x12\x0B\x0A\x07DELETED\x10\x06\x12\x09\x0A\x05ERROR\x10\x07\x12\x0C\x0A\x08UPDATING\x10\x08\x12\x0C\x0A\x08DELETING\x10\x09\x12\x0A\x0A\x06FIXING\x10\x0A\x12\x0C\x0A\x08FINISHED\x10\x0B:\x81\x01\xEAA~\x0A visionai.googleapis.com/Instance\x12Wprojects/{project}/locations/{location}/applications/{application}/instances/{instance}R\x01\x01\"j\x0A\x13ApplicationInstance\x12\x18\x0A\x0Binstance_id\x18\x01 \x01(\x09B\x03\xE0A\x02\x129\x0A\x08instance\x18\x02 \x01(\x0B2\".google.cloud.visionai.v1.InstanceB\x03\xE0A\x02\"\xBC\x09\x0A\x09Processor\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12?\x0A\x06labels\x18\x04 \x03(\x0B2/.google.cloud.visionai.v1.Processor.LabelsEntry\x12\x19\x0A\x0Cdisplay_name\x18\x05 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x0Bdescription\x18\x0A \x01(\x09\x12N\x0A\x0Eprocessor_type\x18\x06 \x01(\x0E21.google.cloud.visionai.v1.Processor.ProcessorTypeB\x03\xE0A\x03\x127\x0A\x0Amodel_type\x18\x0D \x01(\x0E2#.google.cloud.visionai.v1.ModelType\x12Y\x0A\x1Ccustom_processor_source_info\x18\x07 \x01(\x0B23.google.cloud.visionai.v1.CustomProcessorSourceInfo\x12F\x0A\x05state\x18\x08 \x01(\x0E22.google.cloud.visionai.v1.Processor.ProcessorStateB\x03\xE0A\x03\x12I\x0A\x11processor_io_spec\x18\x0B \x01(\x0B2).google.cloud.visionai.v1.ProcessorIOSpecB\x03\xE0A\x03\x12\"\x0A\x15configuration_typeurl\x18\x0E \x01(\x09B\x03\xE0A\x03\x12W\x0A\x1Asupported_annotation_types\x18\x0F \x03(\x0E2..google.cloud.visionai.v1.StreamAnnotationTypeB\x03\xE0A\x03\x12 \x0A\x18supports_post_processing\x18\x11 \x01(\x08\x12Q\x0A\x18supported_instance_types\x18\x12 \x03(\x0E2/.google.cloud.visionai.v1.Instance.InstanceType\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"Z\x0A\x0DProcessorType\x12\x1E\x0A\x1APROCESSOR_TYPE_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0APRETRAINED\x10\x01\x12\x0A\x0A\x06CUSTOM\x10\x02\x12\x0D\x0A\x09CONNECTOR\x10\x03\"e\x0A\x0EProcessorState\x12\x1F\x0A\x1BPROCESSOR_STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0C\x0A\x08DELETING\x10\x03\x12\x0A\x0A\x06FAILED\x10\x04:i\xEAAf\x0A!visionai.googleapis.com/Processor\x12>projects/{project}/locations/{location}/processors/{processor}R\x01\x01\"\xD6\x07\x0A\x0FProcessorIOSpec\x12b\x0A\x19graph_input_channel_specs\x18\x03 \x03(\x0B2?.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec\x12d\x0A\x1Agraph_output_channel_specs\x18\x04 \x03(\x0B2@.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec\x12y\x0A%instance_resource_input_binding_specs\x18\x05 \x03(\x0B2J.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec\x12{\x0A&instance_resource_output_binding_specs\x18\x06 \x03(\x0B2K.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec\x1A\xAF\x01\x0A\x15GraphInputChannelSpec\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x125\x0A\x09data_type\x18\x02 \x01(\x0E2\".google.cloud.visionai.v1.DataType\x12\x1F\x0A\x17accepted_data_type_uris\x18\x05 \x03(\x09\x12\x10\x0A\x08required\x18\x03 \x01(\x08\x12\x1E\x0A\x16max_connection_allowed\x18\x04 \x01(\x03\x1At\x0A\x16GraphOutputChannelSpec\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x125\x0A\x09data_type\x18\x02 \x01(\x0E2\".google.cloud.visionai.v1.DataType\x12\x15\x0A\x0Ddata_type_uri\x18\x03 \x01(\x09\x1Ay\x0A InstanceResourceInputBindingSpec\x12\x19\x0A\x0Fconfig_type_uri\x18\x02 \x01(\x09H\x00\x12\x1B\x0A\x11resource_type_uri\x18\x03 \x01(\x09H\x00\x12\x0C\x0A\x04name\x18\x01 \x01(\x09B\x0F\x0A\x0Dresource_type\x1A^\x0A!InstanceResourceOutputBindingSpec\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x19\x0A\x11resource_type_uri\x18\x02 \x01(\x09\x12\x10\x0A\x08explicit\x18\x03 \x01(\x08\"\xA4\x07\x0A\x19CustomProcessorSourceInfo\x12\x16\x0A\x0Cvertex_model\x18\x02 \x01(\x09H\x00\x12t\x0A\x1Bproduct_recognizer_artifact\x18\x03 \x01(\x0B2M.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifactH\x00\x12S\x0A\x0Bsource_type\x18\x01 \x01(\x0E2>.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType\x12e\x0A\x0Fadditional_info\x18\x04 \x03(\x0B2G.google.cloud.visionai.v1.CustomProcessorSourceInfo.AdditionalInfoEntryB\x03\xE0A\x03\x12U\x0A\x0Cmodel_schema\x18\x05 \x01(\x0B2?.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema\x1Ae\x0A\x19ProductRecognizerArtifact\x12-\x0A retail_product_recognition_index\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x19\x0A\x0Cvertex_model\x18\x02 \x01(\x09B\x03\xE0A\x01\x1A\xCD\x01\x0A\x0BModelSchema\x12=\x0A\x10instances_schema\x18\x01 \x01(\x0B2#.google.cloud.visionai.v1.GcsSource\x12>\x0A\x11parameters_schema\x18\x02 \x01(\x0B2#.google.cloud.visionai.v1.GcsSource\x12?\x0A\x12predictions_schema\x18\x03 \x01(\x0B2#.google.cloud.visionai.v1.GcsSource\x1A5\x0A\x13AdditionalInfoEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"g\x0A\x0ASourceType\x12\x1B\x0A\x17SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x11\x0A\x0DVERTEX_AUTOML\x10\x01\x12\x11\x0A\x0DVERTEX_CUSTOM\x10\x02\x12\x16\x0A\x12PRODUCT_RECOGNIZER\x10\x03B\x0F\x0A\x0Dartifact_path\"\xD2\x0B\x0A\x0FProcessorConfig\x12U\x0A\x19video_stream_input_config\x18\x09 \x01(\x0B20.google.cloud.visionai.v1.VideoStreamInputConfigH\x00\x12`\x0A\x1Fai_enabled_devices_input_config\x18\x14 \x01(\x0B25.google.cloud.visionai.v1.AIEnabledDevicesInputConfigH\x00\x12P\x0A\x16media_warehouse_config\x18\x0A \x01(\x0B2..google.cloud.visionai.v1.MediaWarehouseConfigH\x00\x12H\x0A\x12person_blur_config\x18\x0B \x01(\x0B2*.google.cloud.visionai.v1.PersonBlurConfigH\x00\x12P\x0A\x16occupancy_count_config\x18\x0C \x01(\x0B2..google.cloud.visionai.v1.OccupancyCountConfigH\x00\x12a\x0A\x1Fperson_vehicle_detection_config\x18\x0F \x01(\x0B26.google.cloud.visionai.v1.PersonVehicleDetectionConfigH\x00\x12Y\x0A\x1Bvertex_automl_vision_config\x18\x0D \x01(\x0B22.google.cloud.visionai.v1.VertexAutoMLVisionConfigH\x00\x12W\x0A\x1Avertex_automl_video_config\x18\x0E \x01(\x0B21.google.cloud.visionai.v1.VertexAutoMLVideoConfigH\x00\x12L\x0A\x14vertex_custom_config\x18\x11 \x01(\x0B2,.google.cloud.visionai.v1.VertexCustomConfigH\x00\x12a\x0A\x1Fgeneral_object_detection_config\x18\x12 \x01(\x0B26.google.cloud.visionai.v1.GeneralObjectDetectionConfigH\x00\x12D\x0A\x10big_query_config\x18\x13 \x01(\x0B2(.google.cloud.visionai.v1.BigQueryConfigH\x00\x12F\x0A\x11gcs_output_config\x18\x1B \x01(\x0B2).google.cloud.visionai.v1.GcsOutputConfigH\x00\x12V\x0A\x19product_recognizer_config\x18\x15 \x01(\x0B21.google.cloud.visionai.v1.ProductRecognizerConfigH\x00\x12~\x0A.personal_protective_equipment_detection_config\x18\x16 \x01(\x0B2D.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfigH\x00\x12N\x0A\x15tag_recognizer_config\x18\x19 \x01(\x0B2-.google.cloud.visionai.v1.TagRecognizerConfigH\x00\x12P\x0A\x16universal_input_config\x18\x1C \x01(\x0B2..google.cloud.visionai.v1.UniversalInputConfigH\x00\x124\x0A\x13experimental_config\x18\x1A \x01(\x0B2\x17.google.protobuf.StructB\x12\x0A\x10processor_config\"\xD2\x02\x0A\x14StreamWithAnnotation\x123\x0A\x06stream\x18\x01 \x01(\x09B#\xFAA \x0A\x1Evisionai.googleapis.com/Stream\x12K\x0A\x17application_annotations\x18\x02 \x03(\x0B2*.google.cloud.visionai.v1.StreamAnnotation\x12W\x0A\x10node_annotations\x18\x03 \x03(\x0B2=.google.cloud.visionai.v1.StreamWithAnnotation.NodeAnnotation\x1A_\x0A\x0ENodeAnnotation\x12\x0C\x0A\x04node\x18\x01 \x01(\x09\x12?\x0A\x0Bannotations\x18\x02 \x03(\x0B2*.google.cloud.visionai.v1.StreamAnnotation\"j\x0A\x19ApplicationNodeAnnotation\x12\x0C\x0A\x04node\x18\x01 \x01(\x09\x12?\x0A\x0Bannotations\x18\x02 \x03(\x0B2*.google.cloud.visionai.v1.StreamAnnotation\"\xB1\x01\x0A\x13ResourceAnnotations\x12K\x0A\x17application_annotations\x18\x01 \x03(\x0B2*.google.cloud.visionai.v1.StreamAnnotation\x12M\x0A\x10node_annotations\x18\x02 \x03(\x0B23.google.cloud.visionai.v1.ApplicationNodeAnnotation\"\x82\x01\x0A\x16VideoStreamInputConfig\x12\x13\x0A\x07streams\x18\x01 \x03(\x09B\x02\x18\x01\x12S\x0A\x17streams_with_annotation\x18\x02 \x03(\x0B2..google.cloud.visionai.v1.StreamWithAnnotationB\x02\x18\x01\"\x1D\x0A\x1BAIEnabledDevicesInputConfig\"b\x0A\x14MediaWarehouseConfig\x12\x0E\x0A\x06corpus\x18\x01 \x01(\x09\x12\x12\x0A\x06region\x18\x02 \x01(\x09B\x02\x18\x01\x12&\x0A\x03ttl\x18\x03 \x01(\x0B2\x19.google.protobuf.Duration\"\xD5\x01\x0A\x10PersonBlurConfig\x12S\x0A\x10person_blur_type\x18\x01 \x01(\x0E29.google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType\x12\x12\x0A\x0Afaces_only\x18\x02 \x01(\x08\"X\x0A\x0EPersonBlurType\x12 \x0A\x1CPERSON_BLUR_TYPE_UNSPECIFIED\x10\x00\x12\x13\x0A\x0FFULL_OCCULUSION\x10\x01\x12\x0F\x0A\x0BBLUR_FILTER\x10\x02\"~\x0A\x14OccupancyCountConfig\x12\x1E\x0A\x16enable_people_counting\x18\x01 \x01(\x08\x12\x1F\x0A\x17enable_vehicle_counting\x18\x02 \x01(\x08\x12%\x0A\x1Denable_dwelling_time_tracking\x18\x03 \x01(\x08\"_\x0A\x1CPersonVehicleDetectionConfig\x12\x1E\x0A\x16enable_people_counting\x18\x01 \x01(\x08\x12\x1F\x0A\x17enable_vehicle_counting\x18\x02 \x01(\x08\"\xA5\x01\x0A*PersonalProtectiveEquipmentDetectionConfig\x12&\x0A\x1Eenable_face_coverage_detection\x18\x01 \x01(\x08\x12&\x0A\x1Eenable_head_coverage_detection\x18\x02 \x01(\x08\x12'\x0A\x1Fenable_hands_coverage_detection\x18\x03 \x01(\x08\"\x1E\x0A\x1CGeneralObjectDetectionConfig\"\xEC\x01\x0A\x0EBigQueryConfig\x12\x0D\x0A\x05table\x18\x01 \x01(\x09\x12b\x0A\x16cloud_function_mapping\x18\x02 \x03(\x0B2B.google.cloud.visionai.v1.BigQueryConfig.CloudFunctionMappingEntry\x12*\x0A\"create_default_table_if_not_exists\x18\x03 \x01(\x08\x1A;\x0A\x19CloudFunctionMappingEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"Q\x0A\x18VertexAutoMLVisionConfig\x12\x1C\x0A\x14confidence_threshold\x18\x01 \x01(\x02\x12\x17\x0A\x0Fmax_predictions\x18\x02 \x01(\x05\"\x89\x01\x0A\x17VertexAutoMLVideoConfig\x12\x1C\x0A\x14confidence_threshold\x18\x01 \x01(\x02\x12\x16\x0A\x0Eblocked_labels\x18\x02 \x03(\x09\x12\x17\x0A\x0Fmax_predictions\x18\x03 \x01(\x05\x12\x1F\x0A\x17bounding_box_size_limit\x18\x04 \x01(\x02\"\x95\x02\x0A\x12VertexCustomConfig\x12\x1A\x0A\x12max_prediction_fps\x18\x01 \x01(\x05\x12I\x0A\x13dedicated_resources\x18\x02 \x01(\x0B2,.google.cloud.visionai.v1.DedicatedResources\x12&\x0A\x1Epost_processing_cloud_function\x18\x03 \x01(\x09\x12#\x0A\x1Battach_application_metadata\x18\x04 \x01(\x08\x12,\x0A\x1Adynamic_config_input_topic\x18\x06 \x01(\x09B\x03\xE0A\x01H\x00\x88\x01\x01B\x1D\x0A\x1B_dynamic_config_input_topic\"#\x0A\x0FGcsOutputConfig\x12\x10\x0A\x08gcs_path\x18\x01 \x01(\x09\"\x16\x0A\x14UniversalInputConfig\"\x8D\x01\x0A\x0BMachineSpec\x12\x19\x0A\x0Cmachine_type\x18\x01 \x01(\x09B\x03\xE0A\x05\x12H\x0A\x10accelerator_type\x18\x02 \x01(\x0E2).google.cloud.visionai.v1.AcceleratorTypeB\x03\xE0A\x05\x12\x19\x0A\x11accelerator_count\x18\x03 \x01(\x05\"A\x0A\x15AutoscalingMetricSpec\x12\x18\x0A\x0Bmetric_name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x0E\x0A\x06target\x18\x02 \x01(\x05\"\xF4\x01\x0A\x12DedicatedResources\x12C\x0A\x0Cmachine_spec\x18\x01 \x01(\x0B2%.google.cloud.visionai.v1.MachineSpecB\x06\xE0A\x02\xE0A\x05\x12!\x0A\x11min_replica_count\x18\x02 \x01(\x05B\x06\xE0A\x02\xE0A\x05\x12\x1E\x0A\x11max_replica_count\x18\x03 \x01(\x05B\x03\xE0A\x05\x12V\x0A\x18autoscaling_metric_specs\x18\x04 \x03(\x0B2/.google.cloud.visionai.v1.AutoscalingMetricSpecB\x03\xE0A\x05\"\\\x0A\x17ProductRecognizerConfig\x12\x17\x0A\x0Fretail_endpoint\x18\x01 \x01(\x09\x12(\x0A recognition_confidence_threshold\x18\x02 \x01(\x02\"\x8C\x01\x0A\x13TagRecognizerConfig\x12-\x0A%entity_detection_confidence_threshold\x18\x01 \x01(\x02\x12F\x0A\x12tag_parsing_config\x18\x02 \x01(\x0B2*.google.cloud.visionai.v1.TagParsingConfig\"\xAA\x03\x0A\x10TagParsingConfig\x12^\x0A\x16entity_parsing_configs\x18\x01 \x03(\x0B2>.google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig\x1A\xB5\x02\x0A\x13EntityParsingConfig\x12\x19\x0A\x0Centity_class\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x12\x0A\x05regex\x18\x02 \x01(\x09B\x03\xE0A\x01\x12|\x0A\x18entity_matching_strategy\x18\x03 \x01(\x0E2U.google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig.EntityMatchingStrategyB\x03\xE0A\x01\"q\x0A\x16EntityMatchingStrategy\x12(\x0A\$ENTITY_MATCHING_STRATEGY_UNSPECIFIED\x10\x00\x12\x17\x0A\x13MULTI_LINE_MATCHING\x10\x01\x12\x14\x0A\x10MAX_OVERLAP_AREA\x10\x02*\xA0\x02\x0A\x09ModelType\x12\x1A\x0A\x16MODEL_TYPE_UNSPECIFIED\x10\x00\x12\x18\x0A\x14IMAGE_CLASSIFICATION\x10\x01\x12\x14\x0A\x10OBJECT_DETECTION\x10\x02\x12\x18\x0A\x14VIDEO_CLASSIFICATION\x10\x03\x12\x19\x0A\x15VIDEO_OBJECT_TRACKING\x10\x04\x12\x1C\x0A\x18VIDEO_ACTION_RECOGNITION\x10\x05\x12\x16\x0A\x12OCCUPANCY_COUNTING\x10\x06\x12\x0F\x0A\x0BPERSON_BLUR\x10\x07\x12\x11\x0A\x0DVERTEX_CUSTOM\x10\x08\x12\x16\x0A\x12PRODUCT_RECOGNIZER\x10\x09\x12\x12\x0A\x0ETAG_RECOGNIZER\x10\x0A\x12\x0C\x0A\x08SYNTH_ID\x10\x0F*\xD0\x01\x0A\x0FAcceleratorType\x12 \x0A\x1CACCELERATOR_TYPE_UNSPECIFIED\x10\x00\x12\x14\x0A\x10NVIDIA_TESLA_K80\x10\x01\x12\x15\x0A\x11NVIDIA_TESLA_P100\x10\x02\x12\x15\x0A\x11NVIDIA_TESLA_V100\x10\x03\x12\x13\x0A\x0FNVIDIA_TESLA_P4\x10\x04\x12\x13\x0A\x0FNVIDIA_TESLA_T4\x10\x05\x12\x15\x0A\x11NVIDIA_TESLA_A100\x10\x08\x12\x0A\x0A\x06TPU_V2\x10\x06\x12\x0A\x0A\x06TPU_V3\x10\x07*W\x0A\x08DataType\x12\x19\x0A\x15DATA_TYPE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05VIDEO\x10\x01\x12\x09\x0A\x05IMAGE\x10\x03\x12\x09\x0A\x05PROTO\x10\x02\x12\x0F\x0A\x0BPLACEHOLDER\x10\x042\xEA-\x0A\x0BAppPlatform\x12\xBC\x01\x0A\x10ListApplications\x121.google.cloud.visionai.v1.ListApplicationsRequest\x1A2.google.cloud.visionai.v1.ListApplicationsResponse\"A\xDAA\x06parent\x82\xD3\xE4\x93\x022\x120/v1/{parent=projects/*/locations/*}/applications\x12\xA9\x01\x0A\x0EGetApplication\x12/.google.cloud.visionai.v1.GetApplicationRequest\x1A%.google.cloud.visionai.v1.Application\"?\xDAA\x04name\x82\xD3\xE4\x93\x022\x120/v1/{name=projects/*/locations/*/applications/*}\x12\xE5\x01\x0A\x11CreateApplication\x122.google.cloud.visionai.v1.CreateApplicationRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA \x0A\x0BApplication\x12\x11OperationMetadata\xDAA\x12parent,application\x82\xD3\xE4\x93\x02?\"0/v1/{parent=projects/*/locations/*}/applications:\x0Bapplication\x12\xF7\x01\x0A\x11UpdateApplication\x122.google.cloud.visionai.v1.UpdateApplicationRequest\x1A\x1D.google.longrunning.Operation\"\x8E\x01\xCAA \x0A\x0BApplication\x12\x11OperationMetadata\xDAA\x17application,update_mask\x82\xD3\xE4\x93\x02K2\"9/v1/{name=projects/*/locations/*/applications/*}:undeploy:\x01*\x12\x83\x02\x0A\x19AddApplicationStreamInput\x12:.google.cloud.visionai.v1.AddApplicationStreamInputRequest\x1A\x1D.google.longrunning.Operation\"\x8A\x01\xCAA6\x0A!AddApplicationStreamInputResponse\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02D\"?/v1/{name=projects/*/locations/*/applications/*}:addStreamInput:\x01*\x12\x8F\x02\x0A\x1CRemoveApplicationStreamInput\x12=.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest\x1A\x1D.google.longrunning.Operation\"\x90\x01\xCAA9\x0A\$RemoveApplicationStreamInputResponse\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02G\"B/v1/{name=projects/*/locations/*/applications/*}:removeStreamInput:\x01*\x12\x8F\x02\x0A\x1CUpdateApplicationStreamInput\x12=.google.cloud.visionai.v1.UpdateApplicationStreamInputRequest\x1A\x1D.google.longrunning.Operation\"\x90\x01\xCAA9\x0A\$UpdateApplicationStreamInputResponse\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02G\"B/v1/{name=projects/*/locations/*/applications/*}:updateStreamInput:\x01*\x12\xBF\x01\x0A\x0DListInstances\x12..google.cloud.visionai.v1.ListInstancesRequest\x1A/.google.cloud.visionai.v1.ListInstancesResponse\"M\xDAA\x06parent\x82\xD3\xE4\x93\x02>\x12\x12internalAddGeneratedFile( + "\x0A\xE1\x0C\x0A2google/cloud/visionai/v1/streaming_resources.proto\x12\x18google.cloud.visionai.v1\x1A\x19google/api/resource.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xCF\x01\x0A\x19GstreamerBufferDescriptor\x12\x13\x0A\x0Bcaps_string\x18\x01 \x01(\x09\x12\x14\x0A\x0Cis_key_frame\x18\x02 \x01(\x08\x12,\x0A\x08pts_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08dts_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12+\x0A\x08duration\x18\x05 \x01(\x0B2\x19.google.protobuf.Duration\"C\x0A\x12RawImageDescriptor\x12\x0E\x0A\x06format\x18\x01 \x01(\x09\x12\x0E\x0A\x06height\x18\x02 \x01(\x05\x12\x0D\x0A\x05width\x18\x03 \x01(\x05\"\xC9\x02\x0A\x0APacketType\x12\x12\x0A\x0Atype_class\x18\x01 \x01(\x09\x12L\x0A\x0Ftype_descriptor\x18\x02 \x01(\x0B23.google.cloud.visionai.v1.PacketType.TypeDescriptor\x1A\xD8\x01\x0A\x0ETypeDescriptor\x12Z\x0A\x1Bgstreamer_buffer_descriptor\x18\x02 \x01(\x0B23.google.cloud.visionai.v1.GstreamerBufferDescriptorH\x00\x12L\x0A\x14raw_image_descriptor\x18\x03 \x01(\x0B2,.google.cloud.visionai.v1.RawImageDescriptorH\x00\x12\x0C\x0A\x04type\x18\x01 \x01(\x09B\x0E\x0A\x0Ctype_details\"Q\x0A\x0EServerMetadata\x12\x0E\x0A\x06offset\x18\x01 \x01(\x03\x12/\x0A\x0Bingest_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\"E\x0A\x0ESeriesMetadata\x123\x0A\x06series\x18\x01 \x01(\x09B#\xFAA \x0A\x1Evisionai.googleapis.com/Series\"\xF4\x02\x0A\x0CPacketHeader\x125\x0A\x0Ccapture_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x04\x12:\x0A\x04type\x18\x02 \x01(\x0B2\$.google.cloud.visionai.v1.PacketTypeB\x06\xE0A\x04\xE0A\x05\x12.\x0A\x08metadata\x18\x03 \x01(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x04\x12F\x0A\x0Fserver_metadata\x18\x04 \x01(\x0B2(.google.cloud.visionai.v1.ServerMetadataB\x03\xE0A\x03\x12I\x0A\x0Fseries_metadata\x18\x05 \x01(\x0B2(.google.cloud.visionai.v1.SeriesMetadataB\x06\xE0A\x04\xE0A\x05\x12\x12\x0A\x05flags\x18\x06 \x01(\x05B\x03\xE0A\x05\x12\x1A\x0A\x0Dtrace_context\x18\x07 \x01(\x09B\x03\xE0A\x05\"Q\x0A\x06Packet\x126\x0A\x06header\x18\x01 \x01(\x0B2&.google.cloud.visionai.v1.PacketHeader\x12\x0F\x0A\x07payload\x18\x02 \x01(\x0CB\xC7\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x17StreamingResourcesProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamingService.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamingService.php new file mode 100644 index 000000000000..be61f013f4a7 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamingService.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xBA \x0A0google/cloud/visionai/v1/streaming_service.proto\x12\x18google.cloud.visionai.v1\x1A\x17google/api/client.proto\x1A2google/cloud/visionai/v1/streaming_resources.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB5\x03\x0A\x14ReceiveEventsRequest\x12T\x0A\x0Dsetup_request\x18\x01 \x01(\x0B2;.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequestH\x00\x12A\x0A\x0Ecommit_request\x18\x02 \x01(\x0B2'.google.cloud.visionai.v1.CommitRequestH\x00\x1A\xF8\x01\x0A\x0CSetupRequest\x12\x0F\x0A\x07cluster\x18\x01 \x01(\x09\x12\x0E\x0A\x06stream\x18\x02 \x01(\x09\x12\x10\x0A\x08receiver\x18\x03 \x01(\x09\x12A\x0A\x0Fcontrolled_mode\x18\x04 \x01(\x0B2(.google.cloud.visionai.v1.ControlledMode\x125\x0A\x12heartbeat_interval\x18\x05 \x01(\x0B2\x19.google.protobuf.Duration\x12;\x0A\x18writes_done_grace_period\x18\x06 \x01(\x0B2\x19.google.protobuf.DurationB\x09\x0A\x07request\"}\x0A\x0BEventUpdate\x12\x0E\x0A\x06stream\x18\x01 \x01(\x09\x12\x0D\x0A\x05event\x18\x02 \x01(\x09\x12\x0E\x0A\x06series\x18\x03 \x01(\x09\x12/\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x0E\x0A\x06offset\x18\x05 \x01(\x03\"]\x0A\x1CReceiveEventsControlResponse\x12\x13\x0A\x09heartbeat\x18\x01 \x01(\x08H\x00\x12\x1D\x0A\x13writes_done_request\x18\x02 \x01(\x08H\x00B\x09\x0A\x07control\"\xAD\x01\x0A\x15ReceiveEventsResponse\x12=\x0A\x0Cevent_update\x18\x01 \x01(\x0B2%.google.cloud.visionai.v1.EventUpdateH\x00\x12I\x0A\x07control\x18\x02 \x01(\x0B26.google.cloud.visionai.v1.ReceiveEventsControlResponseH\x00B\x0A\x0A\x08response\"\x9C\x01\x0A\x05Lease\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x0E\x0A\x06series\x18\x02 \x01(\x09\x12\x0D\x0A\x05owner\x18\x03 \x01(\x09\x12/\x0A\x0Bexpire_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x127\x0A\x0Alease_type\x18\x05 \x01(\x0E2#.google.cloud.visionai.v1.LeaseType\"\x96\x01\x0A\x13AcquireLeaseRequest\x12\x0E\x0A\x06series\x18\x01 \x01(\x09\x12\x0D\x0A\x05owner\x18\x02 \x01(\x09\x12'\x0A\x04term\x18\x03 \x01(\x0B2\x19.google.protobuf.Duration\x127\x0A\x0Alease_type\x18\x04 \x01(\x0E2#.google.cloud.visionai.v1.LeaseType\"g\x0A\x11RenewLeaseRequest\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x0E\x0A\x06series\x18\x02 \x01(\x09\x12\x0D\x0A\x05owner\x18\x03 \x01(\x09\x12'\x0A\x04term\x18\x04 \x01(\x0B2\x19.google.protobuf.Duration\"@\x0A\x13ReleaseLeaseRequest\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x0E\x0A\x06series\x18\x02 \x01(\x09\x12\x0D\x0A\x05owner\x18\x03 \x01(\x09\"\x16\x0A\x14ReleaseLeaseResponse\"\x90\x01\x0A\x0FRequestMetadata\x12\x0E\x0A\x06stream\x18\x01 \x01(\x09\x12\x0D\x0A\x05event\x18\x02 \x01(\x09\x12\x0E\x0A\x06series\x18\x03 \x01(\x09\x12\x10\x0A\x08lease_id\x18\x04 \x01(\x09\x12\x0D\x0A\x05owner\x18\x05 \x01(\x09\x12-\x0A\x0Alease_term\x18\x06 \x01(\x0B2\x19.google.protobuf.Duration\"\x92\x01\x0A\x12SendPacketsRequest\x122\x0A\x06packet\x18\x01 \x01(\x0B2 .google.cloud.visionai.v1.PacketH\x00\x12=\x0A\x08metadata\x18\x02 \x01(\x0B2).google.cloud.visionai.v1.RequestMetadataH\x00B\x09\x0A\x07request\"\x15\x0A\x13SendPacketsResponse\"\xB1\x04\x0A\x15ReceivePacketsRequest\x12U\x0A\x0Dsetup_request\x18\x06 \x01(\x0B2<.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequestH\x00\x12A\x0A\x0Ecommit_request\x18\x07 \x01(\x0B2'.google.cloud.visionai.v1.CommitRequestH\x00\x1A\xF2\x02\x0A\x0CSetupRequest\x12A\x0A\x12eager_receive_mode\x18\x03 \x01(\x0B2#.google.cloud.visionai.v1.EagerModeH\x00\x12K\x0A\x17controlled_receive_mode\x18\x04 \x01(\x0B2(.google.cloud.visionai.v1.ControlledModeH\x00\x12;\x0A\x08metadata\x18\x01 \x01(\x0B2).google.cloud.visionai.v1.RequestMetadata\x12\x10\x0A\x08receiver\x18\x02 \x01(\x09\x125\x0A\x12heartbeat_interval\x18\x05 \x01(\x0B2\x19.google.protobuf.Duration\x12;\x0A\x18writes_done_grace_period\x18\x06 \x01(\x0B2\x19.google.protobuf.DurationB\x0F\x0A\x0Dconsumer_modeB\x09\x0A\x07request\"^\x0A\x1DReceivePacketsControlResponse\x12\x13\x0A\x09heartbeat\x18\x01 \x01(\x08H\x00\x12\x1D\x0A\x13writes_done_request\x18\x02 \x01(\x08H\x00B\x09\x0A\x07control\"\xA4\x01\x0A\x16ReceivePacketsResponse\x122\x0A\x06packet\x18\x01 \x01(\x0B2 .google.cloud.visionai.v1.PacketH\x00\x12J\x0A\x07control\x18\x03 \x01(\x0B27.google.cloud.visionai.v1.ReceivePacketsControlResponseH\x00B\x0A\x0A\x08response\"\x0B\x0A\x09EagerMode\"h\x0A\x0EControlledMode\x12!\x0A\x17starting_logical_offset\x18\x01 \x01(\x09H\x00\x12 \x0A\x18fallback_starting_offset\x18\x02 \x01(\x09B\x11\x0A\x0Fstarting_offset\"\x1F\x0A\x0DCommitRequest\x12\x0E\x0A\x06offset\x18\x01 \x01(\x03*U\x0A\x09LeaseType\x12\x1A\x0A\x16LEASE_TYPE_UNSPECIFIED\x10\x00\x12\x15\x0A\x11LEASE_TYPE_READER\x10\x01\x12\x15\x0A\x11LEASE_TYPE_WRITER\x10\x022\xE3\x07\x0A\x10StreamingService\x12p\x0A\x0BSendPackets\x12,.google.cloud.visionai.v1.SendPacketsRequest\x1A-.google.cloud.visionai.v1.SendPacketsResponse\"\x00(\x010\x01\x12y\x0A\x0EReceivePackets\x12/.google.cloud.visionai.v1.ReceivePacketsRequest\x1A0.google.cloud.visionai.v1.ReceivePacketsResponse\"\x00(\x010\x01\x12v\x0A\x0DReceiveEvents\x12..google.cloud.visionai.v1.ReceiveEventsRequest\x1A/.google.cloud.visionai.v1.ReceiveEventsResponse\"\x00(\x010\x01\x12\xAF\x01\x0A\x0CAcquireLease\x12-.google.cloud.visionai.v1.AcquireLeaseRequest\x1A\x1F.google.cloud.visionai.v1.Lease\"O\x82\xD3\xE4\x93\x02I\"D/v1/{series=projects/*/locations/*/clusters/*/series/*}:acquireLease:\x01*\x12\xA9\x01\x0A\x0ARenewLease\x12+.google.cloud.visionai.v1.RenewLeaseRequest\x1A\x1F.google.cloud.visionai.v1.Lease\"M\x82\xD3\xE4\x93\x02G\"B/v1/{series=projects/*/locations/*/clusters/*/series/*}:renewLease:\x01*\x12\xBE\x01\x0A\x0CReleaseLease\x12-.google.cloud.visionai.v1.ReleaseLeaseRequest\x1A..google.cloud.visionai.v1.ReleaseLeaseResponse\"O\x82\xD3\xE4\x93\x02I\"D/v1/{series=projects/*/locations/*/clusters/*/series/*}:releaseLease:\x01*\x1AK\xCAA\x17visionai.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xC5\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x15StreamingServiceProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamsResources.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamsResources.php new file mode 100644 index 000000000000..8c05b93e3826 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamsResources.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xCF\x15\x0A0google/cloud/visionai/v1/streams_resources.proto\x12\x18google.cloud.visionai.v1\x1A\x19google/api/resource.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xAF\x04\x0A\x06Stream\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12<\x0A\x06labels\x18\x04 \x03(\x0B2,.google.cloud.visionai.v1.Stream.LabelsEntry\x12F\x0A\x0Bannotations\x18\x05 \x03(\x0B21.google.cloud.visionai.v1.Stream.AnnotationsEntry\x12\x14\x0A\x0Cdisplay_name\x18\x06 \x01(\x09\x12\x1B\x0A\x13enable_hls_playback\x18\x07 \x01(\x08\x12\x1D\x0A\x15media_warehouse_asset\x18\x08 \x01(\x09\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:p\xEAAm\x0A\x1Evisionai.googleapis.com/Stream\x12Kprojects/{project}/locations/{location}/clusters/{cluster}/streams/{stream}\"\x81\x05\x0A\x05Event\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12;\x0A\x06labels\x18\x04 \x03(\x0B2+.google.cloud.visionai.v1.Event.LabelsEntry\x12E\x0A\x0Bannotations\x18\x05 \x03(\x0B20.google.cloud.visionai.v1.Event.AnnotationsEntry\x12>\x0A\x0Falignment_clock\x18\x06 \x01(\x0E2%.google.cloud.visionai.v1.Event.Clock\x12/\x0A\x0Cgrace_period\x18\x07 \x01(\x0B2\x19.google.protobuf.Duration\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"7\x0A\x05Clock\x12\x15\x0A\x11CLOCK_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07CAPTURE\x10\x01\x12\x0A\x0A\x06INGEST\x10\x02:m\xEAAj\x0A\x1Dvisionai.googleapis.com/Event\x12Iprojects/{project}/locations/{location}/clusters/{cluster}/events/{event}\"\xCA\x04\x0A\x06Series\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12<\x0A\x06labels\x18\x04 \x03(\x0B2,.google.cloud.visionai.v1.Series.LabelsEntry\x12F\x0A\x0Bannotations\x18\x05 \x03(\x0B21.google.cloud.visionai.v1.Series.AnnotationsEntry\x126\x0A\x06stream\x18\x06 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Stream\x124\x0A\x05event\x18\x07 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Event\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:o\xEAAl\x0A\x1Evisionai.googleapis.com/Series\x12Jprojects/{project}/locations/{location}/clusters/{cluster}/series/{series}\"\xD1\x04\x0A\x07Channel\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12=\x0A\x06labels\x18\x04 \x03(\x0B2-.google.cloud.visionai.v1.Channel.LabelsEntry\x12G\x0A\x0Bannotations\x18\x05 \x03(\x0B22.google.cloud.visionai.v1.Channel.AnnotationsEntry\x126\x0A\x06stream\x18\x06 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Stream\x124\x0A\x05event\x18\x07 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Event\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:s\xEAAp\x0A\x1Fvisionai.googleapis.com/Channel\x12Mprojects/{project}/locations/{location}/clusters/{cluster}/channels/{channel}B\xC5\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x15StreamsResourcesProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamsService.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamsService.php new file mode 100644 index 000000000000..9062b432eb9d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamsService.php @@ -0,0 +1,34 @@ +internalAddGeneratedFile( + "\x0A\xE2F\x0A.google/cloud/visionai/v1/streams_service.proto\x12\x18google.cloud.visionai.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A%google/cloud/visionai/v1/common.proto\x1A0google/cloud/visionai/v1/streams_resources.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x99\x01\x0A\x13ListClustersRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"y\x0A\x14ListClustersResponse\x123\x0A\x08clusters\x18\x01 \x03(\x0B2!.google.cloud.visionai.v1.Cluster\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"J\x0A\x11GetClusterRequest\x125\x0A\x04name\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\"\xBA\x01\x0A\x14CreateClusterRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x12\x1Fvisionai.googleapis.com/Cluster\x12\x17\x0A\x0Acluster_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x127\x0A\x07cluster\x18\x03 \x01(\x0B2!.google.cloud.visionai.v1.ClusterB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\x9E\x01\x0A\x14UpdateClusterRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x127\x0A\x07cluster\x18\x02 \x01(\x0B2!.google.cloud.visionai.v1.ClusterB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"f\x0A\x14DeleteClusterRequest\x125\x0A\x04name\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\x96\x01\x0A\x12ListStreamsRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"v\x0A\x13ListStreamsResponse\x121\x0A\x07streams\x18\x01 \x03(\x0B2 .google.cloud.visionai.v1.Stream\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"H\x0A\x10GetStreamRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Stream\"\xB6\x01\x0A\x13CreateStreamRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x16\x0A\x09stream_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x125\x0A\x06stream\x18\x03 \x01(\x0B2 .google.cloud.visionai.v1.StreamB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\x9B\x01\x0A\x13UpdateStreamRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x125\x0A\x06stream\x18\x02 \x01(\x0B2 .google.cloud.visionai.v1.StreamB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"d\x0A\x13DeleteStreamRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Stream\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"{\x0A\x19GetStreamThumbnailRequest\x12\x13\x0A\x06stream\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1C\x0A\x0Fgcs_object_name\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x12\x0A\x05event\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\x1C\x0A\x1AGetStreamThumbnailResponse\"4\x0A\x1DGenerateStreamHlsTokenRequest\x12\x13\x0A\x06stream\x18\x01 \x01(\x09B\x03\xE0A\x02\"d\x0A\x1EGenerateStreamHlsTokenResponse\x12\x0D\x0A\x05token\x18\x01 \x01(\x09\x123\x0A\x0Fexpiration_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x95\x01\x0A\x11ListEventsRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"s\x0A\x12ListEventsResponse\x12/\x0A\x06events\x18\x01 \x03(\x0B2\x1F.google.cloud.visionai.v1.Event\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"F\x0A\x0FGetEventRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Event\"\xB2\x01\x0A\x12CreateEventRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x15\x0A\x08event_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x123\x0A\x05event\x18\x03 \x01(\x0B2\x1F.google.cloud.visionai.v1.EventB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\x98\x01\x0A\x12UpdateEventRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x123\x0A\x05event\x18\x02 \x01(\x0B2\x1F.google.cloud.visionai.v1.EventB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"b\x0A\x12DeleteEventRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Event\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\x95\x01\x0A\x11ListSeriesRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"t\x0A\x12ListSeriesResponse\x120\x0A\x06series\x18\x01 \x03(\x0B2 .google.cloud.visionai.v1.Series\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"H\x0A\x10GetSeriesRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Series\"\xB6\x01\x0A\x13CreateSeriesRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x16\x0A\x09series_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x125\x0A\x06series\x18\x03 \x01(\x0B2 .google.cloud.visionai.v1.SeriesB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\x9B\x01\x0A\x13UpdateSeriesRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x125\x0A\x06series\x18\x02 \x01(\x0B2 .google.cloud.visionai.v1.SeriesB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"d\x0A\x13DeleteSeriesRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Series\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\xBF\x01\x0A\x19MaterializeChannelRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x17\x0A\x0Achannel_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x127\x0A\x07channel\x18\x03 \x01(\x0B2!.google.cloud.visionai.v1.ChannelB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x012\xBC%\x0A\x0EStreamsService\x12\xAC\x01\x0A\x0CListClusters\x12-.google.cloud.visionai.v1.ListClustersRequest\x1A..google.cloud.visionai.v1.ListClustersResponse\"=\xDAA\x06parent\x82\xD3\xE4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/clusters\x12\x99\x01\x0A\x0AGetCluster\x12+.google.cloud.visionai.v1.GetClusterRequest\x1A!.google.cloud.visionai.v1.Cluster\";\xDAA\x04name\x82\xD3\xE4\x93\x02.\x12,/v1/{name=projects/*/locations/*/clusters/*}\x12\xD8\x01\x0A\x0DCreateCluster\x12..google.cloud.visionai.v1.CreateClusterRequest\x1A\x1D.google.longrunning.Operation\"x\xCAA\x1C\x0A\x07Cluster\x12\x11OperationMetadata\xDAA\x19parent,cluster,cluster_id\x82\xD3\xE4\x93\x027\",/v1/{parent=projects/*/locations/*}/clusters:\x07cluster\x12\xDA\x01\x0A\x0DUpdateCluster\x12..google.cloud.visionai.v1.UpdateClusterRequest\x1A\x1D.google.longrunning.Operation\"z\xCAA\x1C\x0A\x07Cluster\x12\x11OperationMetadata\xDAA\x13cluster,update_mask\x82\xD3\xE4\x93\x02?24/v1/{cluster.name=projects/*/locations/*/clusters/*}:\x07cluster\x12\xC8\x01\x0A\x0DDeleteCluster\x12..google.cloud.visionai.v1.DeleteClusterRequest\x1A\x1D.google.longrunning.Operation\"h\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02.*,/v1/{name=projects/*/locations/*/clusters/*}\x12\xB3\x01\x0A\x0BListStreams\x12,.google.cloud.visionai.v1.ListStreamsRequest\x1A-.google.cloud.visionai.v1.ListStreamsResponse\"G\xDAA\x06parent\x82\xD3\xE4\x93\x028\x126/v1/{parent=projects/*/locations/*/clusters/*}/streams\x12\xA0\x01\x0A\x09GetStream\x12*.google.cloud.visionai.v1.GetStreamRequest\x1A .google.cloud.visionai.v1.Stream\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\x126/v1/{name=projects/*/locations/*/clusters/*/streams/*}\x12\xDC\x01\x0A\x0CCreateStream\x12-.google.cloud.visionai.v1.CreateStreamRequest\x1A\x1D.google.longrunning.Operation\"~\xCAA\x1B\x0A\x06Stream\x12\x11OperationMetadata\xDAA\x17parent,stream,stream_id\x82\xD3\xE4\x93\x02@\"6/v1/{parent=projects/*/locations/*/clusters/*}/streams:\x06stream\x12\xDF\x01\x0A\x0CUpdateStream\x12-.google.cloud.visionai.v1.UpdateStreamRequest\x1A\x1D.google.longrunning.Operation\"\x80\x01\xCAA\x1B\x0A\x06Stream\x12\x11OperationMetadata\xDAA\x12stream,update_mask\x82\xD3\xE4\x93\x02G2=/v1/{stream.name=projects/*/locations/*/clusters/*/streams/*}:\x06stream\x12\xD0\x01\x0A\x0CDeleteStream\x12-.google.cloud.visionai.v1.DeleteStreamRequest\x1A\x1D.google.longrunning.Operation\"r\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x028*6/v1/{name=projects/*/locations/*/clusters/*/streams/*}\x12\x86\x02\x0A\x12GetStreamThumbnail\x123.google.cloud.visionai.v1.GetStreamThumbnailRequest\x1A\x1D.google.longrunning.Operation\"\x9B\x01\xCAA/\x0A\x1AGetStreamThumbnailResponse\x12\x11OperationMetadata\xDAA\x16stream,gcs_object_name\x82\xD3\xE4\x93\x02J\"E/v1/{stream=projects/*/locations/*/clusters/*/streams/*}:getThumbnail:\x01*\x12\xF0\x01\x0A\x16GenerateStreamHlsToken\x127.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest\x1A8.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse\"c\xDAA\x06stream\x82\xD3\xE4\x93\x02T\"O/v1/{stream=projects/*/locations/*/clusters/*/streams/*}:generateStreamHlsToken:\x01*\x12\xAF\x01\x0A\x0AListEvents\x12+.google.cloud.visionai.v1.ListEventsRequest\x1A,.google.cloud.visionai.v1.ListEventsResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*/clusters/*}/events\x12\x9C\x01\x0A\x08GetEvent\x12).google.cloud.visionai.v1.GetEventRequest\x1A\x1F.google.cloud.visionai.v1.Event\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/clusters/*/events/*}\x12\xD5\x01\x0A\x0BCreateEvent\x12,.google.cloud.visionai.v1.CreateEventRequest\x1A\x1D.google.longrunning.Operation\"y\xCAA\x1A\x0A\x05Event\x12\x11OperationMetadata\xDAA\x15parent,event,event_id\x82\xD3\xE4\x93\x02>\"5/v1/{parent=projects/*/locations/*/clusters/*}/events:\x05event\x12\xD7\x01\x0A\x0BUpdateEvent\x12,.google.cloud.visionai.v1.UpdateEventRequest\x1A\x1D.google.longrunning.Operation\"{\xCAA\x1A\x0A\x05Event\x12\x11OperationMetadata\xDAA\x11event,update_mask\x82\xD3\xE4\x93\x02D2;/v1/{event.name=projects/*/locations/*/clusters/*/events/*}:\x05event\x12\xCD\x01\x0A\x0BDeleteEvent\x12,.google.cloud.visionai.v1.DeleteEventRequest\x1A\x1D.google.longrunning.Operation\"q\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x027*5/v1/{name=projects/*/locations/*/clusters/*/events/*}\x12\xAF\x01\x0A\x0AListSeries\x12+.google.cloud.visionai.v1.ListSeriesRequest\x1A,.google.cloud.visionai.v1.ListSeriesResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*/clusters/*}/series\x12\x9F\x01\x0A\x09GetSeries\x12*.google.cloud.visionai.v1.GetSeriesRequest\x1A .google.cloud.visionai.v1.Series\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/clusters/*/series/*}\x12\xDB\x01\x0A\x0CCreateSeries\x12-.google.cloud.visionai.v1.CreateSeriesRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA\x1B\x0A\x06Series\x12\x11OperationMetadata\xDAA\x17parent,series,series_id\x82\xD3\xE4\x93\x02?\"5/v1/{parent=projects/*/locations/*/clusters/*}/series:\x06series\x12\xDD\x01\x0A\x0CUpdateSeries\x12-.google.cloud.visionai.v1.UpdateSeriesRequest\x1A\x1D.google.longrunning.Operation\"\x7F\xCAA\x1B\x0A\x06Series\x12\x11OperationMetadata\xDAA\x12series,update_mask\x82\xD3\xE4\x93\x02F2internalAddGeneratedFile( + "\x0A\xDF\xB4\x02\x0A(google/cloud/visionai/v1/warehouse.proto\x12\x18google.cloud.visionai.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A%google/cloud/visionai/v1/common.proto\x1A#google/longrunning/operations.proto\x1A\x19google/protobuf/any.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/rpc/status.proto\x1A\x1Agoogle/type/datetime.proto\"\xAA\x01\x0A\x12CreateAssetRequest\x126\x0A\x06parent\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Corpus\x123\x0A\x05asset\x18\x02 \x01(\x0B2\x1F.google.cloud.visionai.v1.AssetB\x03\xE0A\x02\x12\x1A\x0A\x08asset_id\x18\x03 \x01(\x09B\x03\xE0A\x01H\x00\x88\x01\x01B\x0B\x0A\x09_asset_id\"F\x0A\x0FGetAssetRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\"\x81\x01\x0A\x11ListAssetsRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x12\x1Dvisionai.googleapis.com/Asset\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x05 \x01(\x09\"^\x0A\x12ListAssetsResponse\x12/\x0A\x06assets\x18\x01 \x03(\x0B2\x1F.google.cloud.visionai.v1.Asset\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"z\x0A\x12UpdateAssetRequest\x123\x0A\x05asset\x18\x01 \x01(\x0B2\x1F.google.cloud.visionai.v1.AssetB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"I\x0A\x12DeleteAssetRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\"\x97\x02\x0A\x0BAssetSource\x12P\x0A\x10asset_gcs_source\x18\x01 \x01(\x0B24.google.cloud.visionai.v1.AssetSource.AssetGcsSourceH\x00\x12T\x0A\x12asset_content_data\x18\x02 \x01(\x0B26.google.cloud.visionai.v1.AssetSource.AssetContentDataH\x00\x1A!\x0A\x0EAssetGcsSource\x12\x0F\x0A\x07gcs_uri\x18\x01 \x01(\x09\x1A.\x0A\x10AssetContentData\x12\x1A\x0A\x12asset_content_data\x18\x01 \x01(\x0CB\x0D\x0A\x0Bsource_form\"\x86\x01\x0A\x12UploadAssetRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\x12;\x0A\x0Casset_source\x18\x02 \x01(\x0B2%.google.cloud.visionai.v1.AssetSource\"\x15\x0A\x13UploadAssetResponse\"v\x0A\x13UploadAssetMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bupdate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\"R\x0A\x1BGenerateRetrievalUrlRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\"2\x0A\x1CGenerateRetrievalUrlResponse\x12\x12\x0A\x0Asigned_uri\x18\x01 \x01(\x09\"\x86\x02\x0A\x05Asset\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12&\x0A\x03ttl\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\x12S\x0A\x10asset_gcs_source\x18\x04 \x01(\x0B24.google.cloud.visionai.v1.AssetSource.AssetGcsSourceB\x03\xE0A\x03:r\xEAAo\x0A\x1Dvisionai.googleapis.com/Asset\x12Nprojects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}\"J\x0A\x13AnalyzeAssetRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\"\xE1\x03\x0A\x14AnalyzeAssetMetadata\x12V\x0A\x0Fanalysis_status\x18\x01 \x03(\x0B2=.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus\x12.\x0A\x0Astart_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x1A\x8F\x02\x0A\x0EAnalysisStatus\x12R\x0A\x05state\x18\x02 \x01(\x0E2C.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State\x12\x16\x0A\x0Estatus_message\x18\x03 \x01(\x09\x12E\x0A\x11search_capability\x18\x04 \x01(\x0B2*.google.cloud.visionai.v1.SearchCapability\"J\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0F\x0A\x0BIN_PROGRESS\x10\x01\x12\x0D\x0A\x09SUCCEEDED\x10\x02\x12\x0A\x0A\x06FAILED\x10\x03\"\x16\x0A\x14AnalyzeAssetResponse\"\xB8\x01\x0A\x0EIndexingStatus\x12B\x0A\x05state\x18\x02 \x01(\x0E2..google.cloud.visionai.v1.IndexingStatus.StateB\x03\xE0A\x03\x12\x16\x0A\x0Estatus_message\x18\x03 \x01(\x09\"J\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0F\x0A\x0BIN_PROGRESS\x10\x01\x12\x0D\x0A\x09SUCCEEDED\x10\x02\x12\x0A\x0A\x06FAILED\x10\x03\"~\x0A\x11IndexAssetRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\x124\x0A\x05index\x18\x02 \x01(\x09B%\xE0A\x01\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Index\"\xAF\x01\x0A\x12IndexAssetMetadata\x128\x0A\x06status\x18\x04 \x01(\x0B2(.google.cloud.visionai.v1.IndexingStatus\x12.\x0A\x0Astart_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x14\x0A\x12IndexAssetResponse\"\x84\x01\x0A\x17RemoveIndexAssetRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\x124\x0A\x05index\x18\x02 \x01(\x09B%\xE0A\x01\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Index\"\xBE\x01\x0A\x18RemoveIndexAssetMetadata\x12A\x0A\x0Findexing_status\x18\x01 \x01(\x0B2(.google.cloud.visionai.v1.IndexingStatus\x12.\x0A\x0Astart_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x1A\x0A\x18RemoveIndexAssetResponse\"\xE6\x01\x0A\x0CIndexedAsset\x124\x0A\x05index\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Index\x124\x0A\x05asset\x18\x02 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"\x87\x01\x0A\x18ViewIndexedAssetsRequest\x124\x0A\x05index\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Index\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\"t\x0A\x19ViewIndexedAssetsResponse\x12>\x0A\x0Eindexed_assets\x18\x01 \x03(\x0B2&.google.cloud.visionai.v1.IndexedAsset\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"a\x0A\x13CreateCorpusRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x125\x0A\x06corpus\x18\x02 \x01(\x0B2 .google.cloud.visionai.v1.CorpusB\x03\xE0A\x02\"x\x0A\x14CreateCorpusMetadata\x12/\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x85\x01\x0A\x10SearchCapability\x12=\x0A\x04type\x18\x01 \x01(\x0E2/.google.cloud.visionai.v1.SearchCapability.Type\"2\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x14\x0A\x10EMBEDDING_SEARCH\x10\x01\"b\x0A\x17SearchCapabilitySetting\x12G\x0A\x13search_capabilities\x18\x01 \x03(\x0B2*.google.cloud.visionai.v1.SearchCapability\"c\x0A\x18CreateCollectionMetadata\x12G\x0A\x12operation_metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\"\xC3\x01\x0A\x17CreateCollectionRequest\x126\x0A\x06parent\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Corpus\x12=\x0A\x0Acollection\x18\x02 \x01(\x0B2\$.google.cloud.visionai.v1.CollectionB\x03\xE0A\x02\x12\x1F\x0A\x0Dcollection_id\x18\x03 \x01(\x09B\x03\xE0A\x01H\x00\x88\x01\x01B\x10\x0A\x0E_collection_id\"c\x0A\x18DeleteCollectionMetadata\x12G\x0A\x12operation_metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\"S\x0A\x17DeleteCollectionRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"visionai.googleapis.com/Collection\"P\x0A\x14GetCollectionRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"visionai.googleapis.com/Collection\"\x89\x01\x0A\x17UpdateCollectionRequest\x12=\x0A\x0Acollection\x18\x01 \x01(\x0B2\$.google.cloud.visionai.v1.CollectionB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"{\x0A\x16ListCollectionsRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"visionai.googleapis.com/Collection\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"m\x0A\x17ListCollectionsResponse\x129\x0A\x0Bcollections\x18\x01 \x03(\x0B2\$.google.cloud.visionai.v1.Collection\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"W\x0A\x18AddCollectionItemRequest\x12;\x0A\x04item\x18\x01 \x01(\x0B2(.google.cloud.visionai.v1.CollectionItemB\x03\xE0A\x02\"S\x0A\x19AddCollectionItemResponse\x126\x0A\x04item\x18\x01 \x01(\x0B2(.google.cloud.visionai.v1.CollectionItem\"Z\x0A\x1BRemoveCollectionItemRequest\x12;\x0A\x04item\x18\x01 \x01(\x0B2(.google.cloud.visionai.v1.CollectionItemB\x03\xE0A\x02\"V\x0A\x1CRemoveCollectionItemResponse\x126\x0A\x04item\x18\x01 \x01(\x0B2(.google.cloud.visionai.v1.CollectionItem\"\x83\x01\x0A\x1AViewCollectionItemsRequest\x12>\x0A\x0Acollection\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"visionai.googleapis.com/Collection\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"o\x0A\x1BViewCollectionItemsResponse\x127\x0A\x05items\x18\x01 \x03(\x0B2(.google.cloud.visionai.v1.CollectionItem\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xD8\x01\x0A\x0ACollection\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bdescription\x18\x03 \x01(\x09B\x03\xE0A\x01:\x81\x01\xEAA~\x0A\"visionai.googleapis.com/Collection\x12Xprojects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}\"\xD7\x01\x0A\x0ECollectionItem\x12>\x0A\x0Acollection\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"visionai.googleapis.com/Collection\x12@\x0A\x04type\x18\x02 \x01(\x0E2-.google.cloud.visionai.v1.CollectionItem.TypeB\x03\xE0A\x02\x12\x1A\x0A\x0Ditem_resource\x18\x03 \x01(\x09B\x03\xE0A\x02\"'\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05ASSET\x10\x01\"\x98\x01\x0A\x12CreateIndexRequest\x126\x0A\x06parent\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Corpus\x12\x15\x0A\x08index_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x123\x0A\x05index\x18\x03 \x01(\x0B2\x1F.google.cloud.visionai.v1.IndexB\x03\xE0A\x02\"^\x0A\x13CreateIndexMetadata\x12G\x0A\x12operation_metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\"\x7F\x0A\x12UpdateIndexRequest\x123\x0A\x05index\x18\x01 \x01(\x0B2\x1F.google.cloud.visionai.v1.IndexB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\"^\x0A\x13UpdateIndexMetadata\x12G\x0A\x12operation_metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\"F\x0A\x0FGetIndexRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Index\"r\x0A\x12ListIndexesRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x12\x1Dvisionai.googleapis.com/Index\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"`\x0A\x13ListIndexesResponse\x120\x0A\x07indexes\x18\x01 \x03(\x0B2\x1F.google.cloud.visionai.v1.Index\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"I\x0A\x12DeleteIndexRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Index\"\x15\x0A\x13DeleteIndexMetadata\"\x94\x05\x0A\x05Index\x12\x17\x0A\x0Dentire_corpus\x18\x09 \x01(\x08H\x00\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bdescription\x18\x03 \x01(\x09B\x03\xE0A\x01\x129\x0A\x05state\x18\x04 \x01(\x0E2%.google.cloud.visionai.v1.Index.StateB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12O\x0A\x10deployed_indexes\x18\x08 \x03(\x0B20.google.cloud.visionai.v1.DeployedIndexReferenceB\x03\xE0A\x03\x12\x1F\x0A\x0Dsatisfies_pzs\x18\x0B \x01(\x08B\x03\xE0A\x03H\x01\x88\x01\x01\x12\x1F\x0A\x0Dsatisfies_pzi\x18\x0C \x01(\x08B\x03\xE0A\x03H\x02\x88\x01\x01\"G\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0B\x0A\x07CREATED\x10\x02\x12\x0C\x0A\x08UPDATING\x10\x03:s\xEAAp\x0A\x1Dvisionai.googleapis.com/Index\x12Oprojects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}B\x0E\x0A\x0Casset_filterB\x10\x0A\x0E_satisfies_pzsB\x10\x0A\x0E_satisfies_pzi\"_\x0A\x16DeployedIndexReference\x12E\x0A\x0Eindex_endpoint\x18\x01 \x01(\x09B-\xE0A\x05\xFAA'\x0A%visionai.googleapis.com/IndexEndpoint\"\xAC\x04\x0A\x06Corpus\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x03 \x01(\x09B\x03\xE0A\x01\x123\x0A\x0Bdefault_ttl\x18\x05 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01\x128\x0A\x04type\x18\x07 \x01(\x0E2%.google.cloud.visionai.v1.Corpus.TypeB\x03\xE0A\x01\x12T\x0A\x19search_capability_setting\x18\x08 \x01(\x0B21.google.cloud.visionai.v1.SearchCapabilitySetting\x12\x1F\x0A\x0Dsatisfies_pzs\x18\x0B \x01(\x08B\x03\xE0A\x03H\x00\x88\x01\x01\x12\x1F\x0A\x0Dsatisfies_pzi\x18\x0C \x01(\x08B\x03\xE0A\x03H\x01\x88\x01\x01\"N\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CSTREAM_VIDEO\x10\x01\x12\x09\x0A\x05IMAGE\x10\x02\x12\x13\x0A\x0FVIDEO_ON_DEMAND\x10\x03:d\xEAAa\x0A\x1Evisionai.googleapis.com/Corpus\x12?projects/{project_number}/locations/{location}/corpora/{corpus}B\x10\x0A\x0E_satisfies_pzsB\x10\x0A\x0E_satisfies_pzi\"H\x0A\x10GetCorpusRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Corpus\"}\x0A\x13UpdateCorpusRequest\x125\x0A\x06corpus\x18\x01 \x01(\x0B2 .google.cloud.visionai.v1.CorpusB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"`\x0A\x12ListCorporaRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x05 \x01(\x09\"a\x0A\x13ListCorporaResponse\x121\x0A\x07corpora\x18\x01 \x03(\x0B2 .google.cloud.visionai.v1.Corpus\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"K\x0A\x13DeleteCorpusRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Corpus\"L\x0A\x14AnalyzeCorpusRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Corpus\"V\x0A\x15AnalyzeCorpusMetadata\x12=\x0A\x08metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\"\x17\x0A\x15AnalyzeCorpusResponse\"\x91\x01\x0A\x17CreateDataSchemaRequest\x126\x0A\x06parent\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Corpus\x12>\x0A\x0Bdata_schema\x18\x02 \x01(\x0B2\$.google.cloud.visionai.v1.DataSchemaB\x03\xE0A\x02\"\xF6\x01\x0A\x0ADataSchema\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x10\x0A\x03key\x18\x02 \x01(\x09B\x03\xE0A\x02\x12C\x0A\x0Eschema_details\x18\x03 \x01(\x0B2+.google.cloud.visionai.v1.DataSchemaDetails:\x82\x01\xEAA\x7F\x0A\"visionai.googleapis.com/DataSchema\x12Yprojects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}\"\xD4\x0C\x0A\x11DataSchemaDetails\x12G\x0A\x04type\x18\x01 \x01(\x0E24.google.cloud.visionai.v1.DataSchemaDetails.DataTypeH\x00\x88\x01\x01\x12T\x0A\x10proto_any_config\x18\x06 \x01(\x0B2:.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig\x12K\x0A\x0Blist_config\x18\x08 \x01(\x0B26.google.cloud.visionai.v1.DataSchemaDetails.ListConfig\x12d\x0A\x18customized_struct_config\x18\x09 \x01(\x0B2B.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig\x12Q\x0A\x0Bgranularity\x18\x05 \x01(\x0E27.google.cloud.visionai.v1.DataSchemaDetails.GranularityH\x01\x88\x01\x01\x12S\x0A\x0Fsearch_strategy\x18\x07 \x01(\x0B2:.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy\x1A\"\x0A\x0EProtoAnyConfig\x12\x10\x0A\x08type_uri\x18\x01 \x01(\x09\x1AO\x0A\x0AListConfig\x12A\x0A\x0Cvalue_schema\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.DataSchemaDetails\x1A\xE7\x01\x0A\x16CustomizedStructConfig\x12k\x0A\x0Dfield_schemas\x18\x01 \x03(\x0B2T.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig.FieldSchemasEntry\x1A`\x0A\x11FieldSchemasEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12:\x0A\x05value\x18\x02 \x01(\x0B2+.google.cloud.visionai.v1.DataSchemaDetails:\x028\x01\x1A\xB7\x03\x0A\x0ESearchStrategy\x12p\x0A\x14search_strategy_type\x18\x01 \x01(\x0E2M.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyTypeH\x00\x88\x01\x01\x12\x81\x01\x0A\x1Dconfidence_score_index_config\x18\x02 \x01(\x0B2U.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfigB\x03\xE0A\x01\x1AM\x0A\x1AConfidenceScoreIndexConfig\x12\x17\x0A\x0Afield_path\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x16\x0A\x09threshold\x18\x02 \x01(\x02B\x03\xE0A\x02\"G\x0A\x12SearchStrategyType\x12\x0D\x0A\x09NO_SEARCH\x10\x00\x12\x10\x0A\x0CEXACT_SEARCH\x10\x01\x12\x10\x0A\x0CSMART_SEARCH\x10\x02B\x17\x0A\x15_search_strategy_type\"\xA8\x01\x0A\x08DataType\x12\x19\x0A\x15DATA_TYPE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07INTEGER\x10\x01\x12\x09\x0A\x05FLOAT\x10\x02\x12\x0A\x0A\x06STRING\x10\x03\x12\x0C\x0A\x08DATETIME\x10\x05\x12\x12\x0A\x0EGEO_COORDINATE\x10\x07\x12\x0D\x0A\x09PROTO_ANY\x10\x08\x12\x0B\x0A\x07BOOLEAN\x10\x09\x12\x08\x0A\x04LIST\x10\x0A\x12\x15\x0A\x11CUSTOMIZED_STRUCT\x10\x06\"h\x0A\x0BGranularity\x12\x1B\x0A\x17GRANULARITY_UNSPECIFIED\x10\x00\x12\x1B\x0A\x17GRANULARITY_ASSET_LEVEL\x10\x01\x12\x1F\x0A\x1BGRANULARITY_PARTITION_LEVEL\x10\x02B\x07\x0A\x05_typeB\x0E\x0A\x0C_granularity\"\x8A\x01\x0A\x17UpdateDataSchemaRequest\x12>\x0A\x0Bdata_schema\x18\x01 \x01(\x0B2\$.google.cloud.visionai.v1.DataSchemaB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"P\x0A\x14GetDataSchemaRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"visionai.googleapis.com/DataSchema\"S\x0A\x17DeleteDataSchemaRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"visionai.googleapis.com/DataSchema\"{\x0A\x16ListDataSchemasRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"visionai.googleapis.com/DataSchema\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"n\x0A\x17ListDataSchemasResponse\x12:\x0A\x0Cdata_schemas\x18\x01 \x03(\x0B2\$.google.cloud.visionai.v1.DataSchema\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xC2\x01\x0A\x17CreateAnnotationRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\x12=\x0A\x0Aannotation\x18\x02 \x01(\x0B2\$.google.cloud.visionai.v1.AnnotationB\x03\xE0A\x02\x12\x1F\x0A\x0Dannotation_id\x18\x03 \x01(\x09B\x03\xE0A\x01H\x00\x88\x01\x01B\x10\x0A\x0E_annotation_id\"\x84\x02\x0A\x0AAnnotation\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12T\x0A\x19user_specified_annotation\x18\x02 \x01(\x0B21.google.cloud.visionai.v1.UserSpecifiedAnnotation:\x91\x01\xEAA\x8D\x01\x0A\"visionai.googleapis.com/Annotation\x12gprojects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}\"\x9D\x01\x0A\x17UserSpecifiedAnnotation\x12\x10\x0A\x03key\x18\x01 \x01(\x09B\x03\xE0A\x02\x128\x0A\x05value\x18\x02 \x01(\x0B2).google.cloud.visionai.v1.AnnotationValue\x126\x0A\x09partition\x18\x03 \x01(\x0B2#.google.cloud.visionai.v1.Partition\"4\x0A\x0DGeoCoordinate\x12\x10\x0A\x08latitude\x18\x01 \x01(\x01\x12\x11\x0A\x09longitude\x18\x02 \x01(\x01\"\xD9\x03\x0A\x0FAnnotationValue\x12\x13\x0A\x09int_value\x18\x01 \x01(\x03H\x00\x12\x15\x0A\x0Bfloat_value\x18\x02 \x01(\x02H\x00\x12\x13\x0A\x09str_value\x18\x03 \x01(\x09H\x00\x12\x18\x0A\x0Edatetime_value\x18\x05 \x01(\x09H\x00\x12A\x0A\x0Egeo_coordinate\x18\x07 \x01(\x0B2'.google.cloud.visionai.v1.GeoCoordinateH\x00\x12/\x0A\x0Fproto_any_value\x18\x08 \x01(\x0B2\x14.google.protobuf.AnyH\x00\x12\x14\x0A\x0Abool_value\x18\x09 \x01(\x08H\x00\x12?\x0A\x1Ccustomized_struct_data_value\x18\x0A \x01(\x0B2\x17.google.protobuf.StructH\x00\x12>\x0A\x0Alist_value\x18\x0B \x01(\x0B2(.google.cloud.visionai.v1.AnnotationListH\x00\x12W\x0A\x17customized_struct_value\x18\x06 \x01(\x0B24.google.cloud.visionai.v1.AnnotationCustomizedStructH\x00B\x07\x0A\x05value\"K\x0A\x0EAnnotationList\x129\x0A\x06values\x18\x01 \x03(\x0B2).google.cloud.visionai.v1.AnnotationValue\"\xCE\x01\x0A\x1AAnnotationCustomizedStruct\x12T\x0A\x08elements\x18\x02 \x03(\x0B2B.google.cloud.visionai.v1.AnnotationCustomizedStruct.ElementsEntry\x1AZ\x0A\x0DElementsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x128\x0A\x05value\x18\x02 \x01(\x0B2).google.cloud.visionai.v1.AnnotationValue:\x028\x01\"\x83\x01\x0A\x16ListAnnotationsRequest\x122\x0A\x06parent\x18\x01 \x01(\x09B\"\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\"m\x0A\x17ListAnnotationsResponse\x129\x0A\x0Bannotations\x18\x01 \x03(\x0B2\$.google.cloud.visionai.v1.Annotation\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"P\x0A\x14GetAnnotationRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"visionai.googleapis.com/Annotation\"\x89\x01\x0A\x17UpdateAnnotationRequest\x12=\x0A\x0Aannotation\x18\x01 \x01(\x0B2\$.google.cloud.visionai.v1.AnnotationB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"S\x0A\x17DeleteAnnotationRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"visionai.googleapis.com/Annotation\"q\x0A\x13ImportAssetsRequest\x12\x18\x0A\x0Eassets_gcs_uri\x18\x02 \x01(\x09H\x00\x126\x0A\x06parent\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/CorpusB\x08\x0A\x06source\"\x95\x01\x0A\x14ImportAssetsMetadata\x12=\x0A\x08metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\x12>\x0A\x06status\x18\x02 \x01(\x0B2..google.cloud.visionai.v1.BatchOperationStatus\"D\x0A\x14BatchOperationStatus\x12\x15\x0A\x0Dsuccess_count\x18\x01 \x01(\x05\x12\x15\x0A\x0Dfailure_count\x18\x02 \x01(\x05\"\x16\x0A\x14ImportAssetsResponse\"\xBC\x01\x0A\x19CreateSearchConfigRequest\x12<\x0A\x06parent\x18\x01 \x01(\x09B,\xE0A\x02\xFAA&\x12\$visionai.googleapis.com/SearchConfig\x12B\x0A\x0Dsearch_config\x18\x02 \x01(\x0B2&.google.cloud.visionai.v1.SearchConfigB\x03\xE0A\x02\x12\x1D\x0A\x10search_config_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\x90\x01\x0A\x19UpdateSearchConfigRequest\x12B\x0A\x0Dsearch_config\x18\x01 \x01(\x0B2&.google.cloud.visionai.v1.SearchConfigB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"T\x0A\x16GetSearchConfigRequest\x12:\x0A\x04name\x18\x01 \x01(\x09B,\xE0A\x02\xFAA&\x0A\$visionai.googleapis.com/SearchConfig\"W\x0A\x19DeleteSearchConfigRequest\x12:\x0A\x04name\x18\x01 \x01(\x09B,\xE0A\x02\xFAA&\x0A\$visionai.googleapis.com/SearchConfig\"\x7F\x0A\x18ListSearchConfigsRequest\x12<\x0A\x06parent\x18\x01 \x01(\x09B,\xE0A\x02\xFAA&\x12\$visionai.googleapis.com/SearchConfig\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"t\x0A\x19ListSearchConfigsResponse\x12>\x0A\x0Esearch_configs\x18\x01 \x03(\x0B2&.google.cloud.visionai.v1.SearchConfig\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xBD\x02\x0A\x0CSearchConfig\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12?\x0A\x0Efacet_property\x18\x02 \x01(\x0B2'.google.cloud.visionai.v1.FacetProperty\x12R\x0A\x18search_criteria_property\x18\x03 \x01(\x0B20.google.cloud.visionai.v1.SearchCriteriaProperty:\x89\x01\xEAA\x85\x01\x0A\$visionai.googleapis.com/SearchConfig\x12]projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}\"\xF5\x05\x0A\x0DIndexEndpoint\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bdescription\x18\x03 \x01(\x09B\x03\xE0A\x01\x12D\x0A\x0Edeployed_index\x18\x09 \x01(\x0B2'.google.cloud.visionai.v1.DeployedIndexB\x03\xE0A\x03\x12A\x0A\x05state\x18\x05 \x01(\x0E2-.google.cloud.visionai.v1.IndexEndpoint.StateB\x03\xE0A\x03\x12H\x0A\x06labels\x18\x06 \x03(\x0B23.google.cloud.visionai.v1.IndexEndpoint.LabelsEntryB\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x1F\x0A\x0Dsatisfies_pzs\x18\x0A \x01(\x08B\x03\xE0A\x03H\x00\x88\x01\x01\x12\x1F\x0A\x0Dsatisfies_pzi\x18\x0B \x01(\x08B\x03\xE0A\x03H\x01\x88\x01\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"S\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0B\x0A\x07CREATED\x10\x02\x12\x0C\x0A\x08UPDATING\x10\x03\x12\x0A\x0A\x06FAILED\x10\x04:s\xEAAp\x0A%visionai.googleapis.com/IndexEndpoint\x12Gprojects/{project}/locations/{location}/indexEndpoints/{index_endpoint}B\x10\x0A\x0E_satisfies_pzsB\x10\x0A\x0E_satisfies_pzi\"\xBD\x01\x0A\x1ACreateIndexEndpointRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x1E\x0A\x11index_endpoint_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x12D\x0A\x0Eindex_endpoint\x18\x03 \x01(\x0B2'.google.cloud.visionai.v1.IndexEndpointB\x03\xE0A\x02\"f\x0A\x1BCreateIndexEndpointMetadata\x12G\x0A\x12operation_metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\"V\x0A\x17GetIndexEndpointRequest\x12;\x0A\x04name\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x0A%visionai.googleapis.com/IndexEndpoint\"\x9C\x01\x0A\x19ListIndexEndpointsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\"w\x0A\x1AListIndexEndpointsResponse\x12@\x0A\x0Findex_endpoints\x18\x01 \x03(\x0B2'.google.cloud.visionai.v1.IndexEndpoint\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x98\x01\x0A\x1AUpdateIndexEndpointRequest\x12D\x0A\x0Eindex_endpoint\x18\x01 \x01(\x0B2'.google.cloud.visionai.v1.IndexEndpointB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\"f\x0A\x1BUpdateIndexEndpointMetadata\x12G\x0A\x12operation_metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\"Y\x0A\x1ADeleteIndexEndpointRequest\x12;\x0A\x04name\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x0A%visionai.googleapis.com/IndexEndpoint\"f\x0A\x1BDeleteIndexEndpointMetadata\x12G\x0A\x12operation_metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\"\xA1\x01\x0A\x12DeployIndexRequest\x12E\x0A\x0Eindex_endpoint\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x0A%visionai.googleapis.com/IndexEndpoint\x12D\x0A\x0Edeployed_index\x18\x03 \x01(\x0B2'.google.cloud.visionai.v1.DeployedIndexB\x03\xE0A\x02\"\x15\x0A\x13DeployIndexResponse\"\x9D\x01\x0A\x13DeployIndexMetadata\x12G\x0A\x12operation_metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\x12=\x0A\x0Edeployed_index\x18\x02 \x01(\x09B%\xE0A\x03\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Index\"\x9F\x01\x0A\x15UndeployIndexMetadata\x12G\x0A\x12operation_metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\x12=\x0A\x0Edeployed_index\x18\x02 \x01(\x09B%\xE0A\x03\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Index\"]\x0A\x14UndeployIndexRequest\x12E\x0A\x0Eindex_endpoint\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x0A%visionai.googleapis.com/IndexEndpoint\"\x17\x0A\x15UndeployIndexResponse\"E\x0A\x0DDeployedIndex\x124\x0A\x05index\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Index\"\x84\x07\x0A\x0DFacetProperty\x12_\x0A\x17fixed_range_bucket_spec\x18\x05 \x01(\x0B2<.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpecH\x00\x12a\x0A\x18custom_range_bucket_spec\x18\x06 \x01(\x0B2=.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpecH\x00\x12Z\x0A\x14datetime_bucket_spec\x18\x07 \x01(\x0B2:.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpecH\x00\x12\x15\x0A\x0Dmapped_fields\x18\x01 \x03(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12\x13\x0A\x0Bresult_size\x18\x03 \x01(\x03\x12>\x0A\x0Bbucket_type\x18\x04 \x01(\x0E2).google.cloud.visionai.v1.FacetBucketType\x1A\xAA\x01\x0A\x14FixedRangeBucketSpec\x12:\x0A\x0Cbucket_start\x18\x01 \x01(\x0B2\$.google.cloud.visionai.v1.FacetValue\x12@\x0A\x12bucket_granularity\x18\x02 \x01(\x0B2\$.google.cloud.visionai.v1.FacetValue\x12\x14\x0A\x0Cbucket_count\x18\x03 \x01(\x05\x1AP\x0A\x15CustomRangeBucketSpec\x127\x0A\x09endpoints\x18\x01 \x03(\x0B2\$.google.cloud.visionai.v1.FacetValue\x1A\xBB\x01\x0A\x12DateTimeBucketSpec\x12[\x0A\x0Bgranularity\x18\x01 \x01(\x0E2F.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity\"H\x0A\x0BGranularity\x12\x1B\x0A\x17GRANULARITY_UNSPECIFIED\x10\x00\x12\x08\x0A\x04YEAR\x10\x01\x12\x09\x0A\x05MONTH\x10\x02\x12\x07\x0A\x03DAY\x10\x03B\x14\x0A\x12range_facet_config\"\xDE\x01\x0A\x0ESearchHypernym\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x15\x0A\x08hypernym\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08hyponyms\x18\x03 \x03(\x09B\x03\xE0A\x01:\x8F\x01\xEAA\x8B\x01\x0A&visionai.googleapis.com/SearchHypernym\x12aprojects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}\"\xDA\x01\x0A\x1BCreateSearchHypernymRequest\x126\x0A\x06parent\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Corpus\x12F\x0A\x0Fsearch_hypernym\x18\x02 \x01(\x0B2(.google.cloud.visionai.v1.SearchHypernymB\x03\xE0A\x02\x12\$\x0A\x12search_hypernym_id\x18\x03 \x01(\x09B\x03\xE0A\x01H\x00\x88\x01\x01B\x15\x0A\x13_search_hypernym_id\"\x96\x01\x0A\x1BUpdateSearchHypernymRequest\x12F\x0A\x0Fsearch_hypernym\x18\x01 \x01(\x0B2(.google.cloud.visionai.v1.SearchHypernymB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"X\x0A\x18GetSearchHypernymRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&visionai.googleapis.com/SearchHypernym\"[\x0A\x1BDeleteSearchHypernymRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&visionai.googleapis.com/SearchHypernym\"\x83\x01\x0A\x1AListSearchHypernymsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x12&visionai.googleapis.com/SearchHypernym\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"z\x0A\x1BListSearchHypernymsResponse\x12B\x0A\x10search_hypernyms\x18\x01 \x03(\x0B2(.google.cloud.visionai.v1.SearchHypernym\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"/\x0A\x16SearchCriteriaProperty\x12\x15\x0A\x0Dmapped_fields\x18\x01 \x03(\x09\"w\x0A\x0AFacetValue\x12\x16\x0A\x0Cstring_value\x18\x01 \x01(\x09H\x00\x12\x17\x0A\x0Dinteger_value\x18\x02 \x01(\x03H\x00\x12/\x0A\x0Edatetime_value\x18\x03 \x01(\x0B2\x15.google.type.DateTimeH\x00B\x07\x0A\x05value\"\x95\x02\x0A\x0BFacetBucket\x125\x0A\x05value\x18\x02 \x01(\x0B2\$.google.cloud.visionai.v1.FacetValueH\x00\x12<\x0A\x05range\x18\x04 \x01(\x0B2+.google.cloud.visionai.v1.FacetBucket.RangeH\x00\x12\x10\x0A\x08selected\x18\x03 \x01(\x08\x1Ao\x0A\x05Range\x123\x0A\x05start\x18\x01 \x01(\x0B2\$.google.cloud.visionai.v1.FacetValue\x121\x0A\x03end\x18\x02 \x01(\x0B2\$.google.cloud.visionai.v1.FacetValueB\x0E\x0A\x0Cbucket_value\"\xCF\x01\x0A\x0AFacetGroup\x12\x10\x0A\x08facet_id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x126\x0A\x07buckets\x18\x03 \x03(\x0B2%.google.cloud.visionai.v1.FacetBucket\x12>\x0A\x0Bbucket_type\x18\x04 \x01(\x0E2).google.cloud.visionai.v1.FacetBucketType\x12!\x0A\x19fetch_matched_annotations\x18\x05 \x01(\x08\"\xA8\x05\x0A\x12IngestAssetRequest\x12E\x0A\x06config\x18\x01 \x01(\x0B23.google.cloud.visionai.v1.IngestAssetRequest.ConfigH\x00\x12Y\x0A\x11time_indexed_data\x18\x02 \x01(\x0B2<.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedDataH\x00\x1A\xE6\x02\x0A\x06Config\x12S\x0A\x0Avideo_type\x18\x02 \x01(\x0B2=.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoTypeH\x00\x124\x0A\x05asset\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\x1A\xC3\x01\x0A\x09VideoType\x12g\x0A\x10container_format\x18\x01 \x01(\x0E2M.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat\"M\x0A\x0FContainerFormat\x12 \x0A\x1CCONTAINER_FORMAT_UNSPECIFIED\x10\x00\x12\x18\x0A\x14CONTAINER_FORMAT_MP4\x10\x01B\x0B\x0A\x09data_type\x1Ar\x0A\x0FTimeIndexedData\x12\x0C\x0A\x04data\x18\x01 \x01(\x0C\x12Q\x0A\x12temporal_partition\x18\x02 \x01(\x0B25.google.cloud.visionai.v1.Partition.TemporalPartitionB\x13\x0A\x11streaming_request\"u\x0A\x13IngestAssetResponse\x12^\x0A\x1Fsuccessfully_ingested_partition\x18\x01 \x01(\x0B25.google.cloud.visionai.v1.Partition.TemporalPartition\"\x9F\x01\x0A\x10ClipAssetRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\x12V\x0A\x12temporal_partition\x18\x02 \x01(\x0B25.google.cloud.visionai.v1.Partition.TemporalPartitionB\x03\xE0A\x02\"\xDC\x01\x0A\x11ClipAssetResponse\x12U\x0A\x11time_indexed_uris\x18\x01 \x03(\x0B2:.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri\x1Ap\x0A\x0ETimeIndexedUri\x12Q\x0A\x12temporal_partition\x18\x01 \x01(\x0B25.google.cloud.visionai.v1.Partition.TemporalPartition\x12\x0B\x0A\x03uri\x18\x02 \x01(\x09\"\xBB\x01\x0A\x15GenerateHlsUriRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\x12R\x0A\x13temporal_partitions\x18\x02 \x03(\x0B25.google.cloud.visionai.v1.Partition.TemporalPartition\x12\x19\x0A\x11live_view_enabled\x18\x03 \x01(\x08\"y\x0A\x16GenerateHlsUriResponse\x12\x0B\x0A\x03uri\x18\x01 \x01(\x09\x12R\x0A\x13temporal_partitions\x18\x02 \x03(\x0B25.google.cloud.visionai.v1.Partition.TemporalPartition\"\xD3\x03\x0A\x13SearchAssetsRequest\x12Y\x0A\x1Bschema_key_sorting_strategy\x18\x09 \x01(\x0B22.google.cloud.visionai.v1.SchemaKeySortingStrategyH\x00\x126\x0A\x06corpus\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Corpus\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12I\x0A\x13content_time_ranges\x18\x05 \x01(\x0B2,.google.cloud.visionai.v1.DateTimeRangeArray\x124\x0A\x08criteria\x18\x04 \x03(\x0B2\".google.cloud.visionai.v1.Criteria\x12>\x0A\x10facet_selections\x18\x06 \x03(\x0B2\$.google.cloud.visionai.v1.FacetGroup\x12\x1E\x0A\x16result_annotation_keys\x18\x08 \x03(\x09\x12\x14\x0A\x0Csearch_query\x18\x0A \x01(\x09B\x0B\x0A\x09sort_spec\"\xDC\x02\x0A\x1ASearchIndexEndpointRequest\x12;\x0A\x0Bimage_query\x18\x02 \x01(\x0B2\$.google.cloud.visionai.v1.ImageQueryH\x00\x12\x14\x0A\x0Atext_query\x18\x03 \x01(\x09H\x00\x12E\x0A\x0Eindex_endpoint\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x0A%visionai.googleapis.com/IndexEndpoint\x124\x0A\x08criteria\x18\x04 \x03(\x0B2\".google.cloud.visionai.v1.Criteria\x12>\x0A\x12exclusion_criteria\x18\x07 \x03(\x0B2\".google.cloud.visionai.v1.Criteria\x12\x11\x0A\x09page_size\x18\x05 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x06 \x01(\x09B\x07\x0A\x05query\"a\x0A\x0AImageQuery\x12\x15\x0A\x0Binput_image\x18\x01 \x01(\x0CH\x00\x123\x0A\x05asset\x18\x02 \x01(\x09B\"\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/AssetH\x00B\x07\x0A\x05image\"\x94\x03\x0A\x18SchemaKeySortingStrategy\x12J\x0A\x07options\x18\x01 \x03(\x0B29.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option\x1A\xAB\x02\x0A\x06Option\x12\x17\x0A\x0Fdata_schema_key\x18\x01 \x01(\x09\x12\x17\x0A\x0Fsort_decreasing\x18\x02 \x01(\x08\x12h\x0A\x10aggregate_method\x18\x03 \x01(\x0E2I.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethodH\x00\x88\x01\x01\"p\x0A\x0FAggregateMethod\x12 \x0A\x1CAGGREGATE_METHOD_UNSPECIFIED\x10\x00\x12\x1C\x0A\x18AGGREGATE_METHOD_LARGEST\x10\x01\x12\x1D\x0A\x19AGGREGATE_METHOD_SMALLEST\x10\x02B\x13\x0A\x11_aggregate_method\"\x15\x0A\x13DeleteAssetMetadata\"\xB7\x01\x0A\x18AnnotationMatchingResult\x124\x0A\x08criteria\x18\x01 \x01(\x0B2\".google.cloud.visionai.v1.Criteria\x12A\x0A\x13matched_annotations\x18\x02 \x03(\x0B2\$.google.cloud.visionai.v1.Annotation\x12\"\x0A\x06status\x18\x03 \x01(\x0B2\x12.google.rpc.Status\"\xE7\x02\x0A\x10SearchResultItem\x12\x0D\x0A\x05asset\x18\x01 \x01(\x09\x12K\x0A\x08segments\x18\x02 \x03(\x0B25.google.cloud.visionai.v1.Partition.TemporalPartitionB\x02\x18\x01\x12F\x0A\x07segment\x18\x05 \x01(\x0B25.google.cloud.visionai.v1.Partition.TemporalPartition\x12\x11\x0A\x09relevance\x18\x06 \x01(\x01\x12C\x0A\x15requested_annotations\x18\x03 \x03(\x0B2\$.google.cloud.visionai.v1.Annotation\x12W\x0A\x1Bannotation_matching_results\x18\x04 \x03(\x0B22.google.cloud.visionai.v1.AnnotationMatchingResult\"\xB5\x01\x0A\x14SearchAssetsResponse\x12G\x0A\x13search_result_items\x18\x01 \x03(\x0B2*.google.cloud.visionai.v1.SearchResultItem\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12;\x0A\x0Dfacet_results\x18\x03 \x03(\x0B2\$.google.cloud.visionai.v1.FacetGroup\"\x7F\x0A\x1BSearchIndexEndpointResponse\x12G\x0A\x13search_result_items\x18\x01 \x03(\x0B2*.google.cloud.visionai.v1.SearchResultItem\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"B\x0A\x08IntRange\x12\x12\x0A\x05start\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x10\x0A\x03end\x18\x02 \x01(\x03H\x01\x88\x01\x01B\x08\x0A\x06_startB\x06\x0A\x04_end\"D\x0A\x0AFloatRange\x12\x12\x0A\x05start\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x10\x0A\x03end\x18\x02 \x01(\x02H\x01\x88\x01\x01B\x08\x0A\x06_startB\x06\x0A\x04_end\"!\x0A\x0BStringArray\x12\x12\x0A\x0Atxt_values\x18\x01 \x03(\x09\"G\x0A\x0DIntRangeArray\x126\x0A\x0Aint_ranges\x18\x01 \x03(\x0B2\".google.cloud.visionai.v1.IntRange\"M\x0A\x0FFloatRangeArray\x12:\x0A\x0Cfloat_ranges\x18\x01 \x03(\x0B2\$.google.cloud.visionai.v1.FloatRange\"Y\x0A\x0DDateTimeRange\x12\$\x0A\x05start\x18\x01 \x01(\x0B2\x15.google.type.DateTime\x12\"\x0A\x03end\x18\x02 \x01(\x0B2\x15.google.type.DateTime\"W\x0A\x12DateTimeRangeArray\x12A\x0A\x10date_time_ranges\x18\x01 \x03(\x0B2'.google.cloud.visionai.v1.DateTimeRange\"G\x0A\x0ACircleArea\x12\x10\x0A\x08latitude\x18\x01 \x01(\x01\x12\x11\x0A\x09longitude\x18\x02 \x01(\x01\x12\x14\x0A\x0Cradius_meter\x18\x03 \x01(\x01\"N\x0A\x10GeoLocationArray\x12:\x0A\x0Ccircle_areas\x18\x01 \x03(\x0B2\$.google.cloud.visionai.v1.CircleArea\"\x1A\x0A\x09BoolValue\x12\x0D\x0A\x05value\x18\x01 \x01(\x08\"\xE2\x03\x0A\x08Criteria\x12;\x0A\x0Atext_array\x18\x02 \x01(\x0B2%.google.cloud.visionai.v1.StringArrayH\x00\x12B\x0A\x0Fint_range_array\x18\x03 \x01(\x0B2'.google.cloud.visionai.v1.IntRangeArrayH\x00\x12F\x0A\x11float_range_array\x18\x04 \x01(\x0B2).google.cloud.visionai.v1.FloatRangeArrayH\x00\x12M\x0A\x15date_time_range_array\x18\x05 \x01(\x0B2,.google.cloud.visionai.v1.DateTimeRangeArrayH\x00\x12H\x0A\x12geo_location_array\x18\x06 \x01(\x0B2*.google.cloud.visionai.v1.GeoLocationArrayH\x00\x129\x0A\x0Abool_value\x18\x07 \x01(\x0B2#.google.cloud.visionai.v1.BoolValueH\x00\x12\x0D\x0A\x05field\x18\x01 \x01(\x09\x12!\x0A\x19fetch_matched_annotations\x18\x08 \x01(\x08B\x07\x0A\x05value\"\x90\x05\x0A\x09Partition\x12Q\x0A\x12temporal_partition\x18\x01 \x01(\x0B25.google.cloud.visionai.v1.Partition.TemporalPartition\x12O\x0A\x11spatial_partition\x18\x02 \x01(\x0B24.google.cloud.visionai.v1.Partition.SpatialPartition\x12b\x0A\x1Brelative_temporal_partition\x18\x03 \x01(\x0B2=.google.cloud.visionai.v1.Partition.RelativeTemporalPartition\x1Aq\x0A\x11TemporalPartition\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x1A\x8A\x01\x0A\x10SpatialPartition\x12\x12\x0A\x05x_min\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x12\x0A\x05y_min\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\x12\x0A\x05x_max\x18\x03 \x01(\x03H\x02\x88\x01\x01\x12\x12\x0A\x05y_max\x18\x04 \x01(\x03H\x03\x88\x01\x01B\x08\x0A\x06_x_minB\x08\x0A\x06_y_minB\x08\x0A\x06_x_maxB\x08\x0A\x06_y_max\x1A{\x0A\x19RelativeTemporalPartition\x12/\x0A\x0Cstart_offset\x18\x01 \x01(\x0B2\x19.google.protobuf.Duration\x12-\x0A\x0Aend_offset\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration*\xB8\x01\x0A\x0FFacetBucketType\x12!\x0A\x1DFACET_BUCKET_TYPE_UNSPECIFIED\x10\x00\x12\x1B\x0A\x17FACET_BUCKET_TYPE_VALUE\x10\x01\x12\x1E\x0A\x1AFACET_BUCKET_TYPE_DATETIME\x10\x02\x12!\x0A\x1DFACET_BUCKET_TYPE_FIXED_RANGE\x10\x03\x12\"\x0A\x1EFACET_BUCKET_TYPE_CUSTOM_RANGE\x10\x042\x9Bf\x0A\x09Warehouse\x12\xB9\x01\x0A\x0BCreateAsset\x12,.google.cloud.visionai.v1.CreateAssetRequest\x1A\x1F.google.cloud.visionai.v1.Asset\"[\xDAA\x15parent,asset,asset_id\x82\xD3\xE4\x93\x02=\"4/v1/{parent=projects/*/locations/*/corpora/*}/assets:\x05asset\x12\xBB\x01\x0A\x0BUpdateAsset\x12,.google.cloud.visionai.v1.UpdateAssetRequest\x1A\x1F.google.cloud.visionai.v1.Asset\"]\xDAA\x11asset,update_mask\x82\xD3\xE4\x93\x02C2:/v1/{asset.name=projects/*/locations/*/corpora/*/assets/*}:\x05asset\x12\x9B\x01\x0A\x08GetAsset\x12).google.cloud.visionai.v1.GetAssetRequest\x1A\x1F.google.cloud.visionai.v1.Asset\"C\xDAA\x04name\x82\xD3\xE4\x93\x026\x124/v1/{name=projects/*/locations/*/corpora/*/assets/*}\x12\xAE\x01\x0A\x0AListAssets\x12+.google.cloud.visionai.v1.ListAssetsRequest\x1A,.google.cloud.visionai.v1.ListAssetsResponse\"E\xDAA\x06parent\x82\xD3\xE4\x93\x026\x124/v1/{parent=projects/*/locations/*/corpora/*}/assets\x12\xCE\x01\x0A\x0BDeleteAsset\x12,.google.cloud.visionai.v1.DeleteAssetRequest\x1A\x1D.google.longrunning.Operation\"r\xCAA,\x0A\x15google.protobuf.Empty\x12\x13DeleteAssetMetadata\xDAA\x04name\x82\xD3\xE4\x93\x026*4/v1/{name=projects/*/locations/*/corpora/*/assets/*}\x12\xCF\x01\x0A\x0BUploadAsset\x12,.google.cloud.visionai.v1.UploadAssetRequest\x1A\x1D.google.longrunning.Operation\"s\xCAA*\x0A\x13UploadAssetResponse\x12\x13UploadAssetMetadata\x82\xD3\xE4\x93\x02@\";/v1/{name=projects/*/locations/*/corpora/*/assets/*}:upload:\x01*\x12\xDB\x01\x0A\x14GenerateRetrievalUrl\x125.google.cloud.visionai.v1.GenerateRetrievalUrlRequest\x1A6.google.cloud.visionai.v1.GenerateRetrievalUrlResponse\"T\x82\xD3\xE4\x93\x02N\"I/v1/{name=projects/*/locations/*/corpora/*/assets/*}:generateRetrievalUrl:\x01*\x12\xD4\x01\x0A\x0CAnalyzeAsset\x12-.google.cloud.visionai.v1.AnalyzeAssetRequest\x1A\x1D.google.longrunning.Operation\"v\xCAA,\x0A\x14AnalyzeAssetResponse\x12\x14AnalyzeAssetMetadata\x82\xD3\xE4\x93\x02A\"\"5/v1/{parent=projects/*/locations/*/corpora/*}/indexes:\x05index\x12\xD9\x01\x0A\x0BUpdateIndex\x12,.google.cloud.visionai.v1.UpdateIndexRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA\x1C\x0A\x05Index\x12\x13UpdateIndexMetadata\xDAA\x11index,update_mask\x82\xD3\xE4\x93\x02D2;/v1/{index.name=projects/*/locations/*/corpora/*/indexes/*}:\x05index\x12\x9C\x01\x0A\x08GetIndex\x12).google.cloud.visionai.v1.GetIndexRequest\x1A\x1F.google.cloud.visionai.v1.Index\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/corpora/*/indexes/*}\x12\xB2\x01\x0A\x0BListIndexes\x12,.google.cloud.visionai.v1.ListIndexesRequest\x1A-.google.cloud.visionai.v1.ListIndexesResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*/corpora/*}/indexes\x12\xCF\x01\x0A\x0BDeleteIndex\x12,.google.cloud.visionai.v1.DeleteIndexRequest\x1A\x1D.google.longrunning.Operation\"s\xCAA,\x0A\x15google.protobuf.Empty\x12\x13DeleteIndexMetadata\xDAA\x04name\x82\xD3\xE4\x93\x027*5/v1/{name=projects/*/locations/*/corpora/*/indexes/*}\x12\xCA\x01\x0A\x0CCreateCorpus\x12-.google.cloud.visionai.v1.CreateCorpusRequest\x1A\x1D.google.longrunning.Operation\"l\xCAA\x1E\x0A\x06Corpus\x12\x14CreateCorpusMetadata\xDAA\x0Dparent,corpus\x82\xD3\xE4\x93\x025\"+/v1/{parent=projects/*/locations/*}/corpora:\x06corpus\x12\x95\x01\x0A\x09GetCorpus\x12*.google.cloud.visionai.v1.GetCorpusRequest\x1A .google.cloud.visionai.v1.Corpus\":\xDAA\x04name\x82\xD3\xE4\x93\x02-\x12+/v1/{name=projects/*/locations/*/corpora/*}\x12\xB8\x01\x0A\x0CUpdateCorpus\x12-.google.cloud.visionai.v1.UpdateCorpusRequest\x1A .google.cloud.visionai.v1.Corpus\"W\xDAA\x12corpus,update_mask\x82\xD3\xE4\x93\x02<22/v1/{corpus.name=projects/*/locations/*/corpora/*}:\x06corpus\x12\xA8\x01\x0A\x0BListCorpora\x12,.google.cloud.visionai.v1.ListCorporaRequest\x1A-.google.cloud.visionai.v1.ListCorporaResponse\"<\xDAA\x06parent\x82\xD3\xE4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/corpora\x12\x91\x01\x0A\x0CDeleteCorpus\x12-.google.cloud.visionai.v1.DeleteCorpusRequest\x1A\x16.google.protobuf.Empty\":\xDAA\x04name\x82\xD3\xE4\x93\x02-*+/v1/{name=projects/*/locations/*/corpora/*}\x12\xCF\x01\x0A\x0DAnalyzeCorpus\x12..google.cloud.visionai.v1.AnalyzeCorpusRequest\x1A\x1D.google.longrunning.Operation\"o\xCAA.\x0A\x15AnalyzeCorpusResponse\x12\x15AnalyzeCorpusMetadata\x82\xD3\xE4\x93\x028\"3/v1/{name=projects/*/locations/*/corpora/*}:analyze:\x01*\x12\xD0\x01\x0A\x10CreateDataSchema\x121.google.cloud.visionai.v1.CreateDataSchemaRequest\x1A\$.google.cloud.visionai.v1.DataSchema\"c\xDAA\x12parent,data_schema\x82\xD3\xE4\x93\x02H\"9/v1/{parent=projects/*/locations/*/corpora/*}/dataSchemas:\x0Bdata_schema\x12\xE1\x01\x0A\x10UpdateDataSchema\x121.google.cloud.visionai.v1.UpdateDataSchemaRequest\x1A\$.google.cloud.visionai.v1.DataSchema\"t\xDAA\x17data_schema,update_mask\x82\xD3\xE4\x93\x02T2E/v1/{data_schema.name=projects/*/locations/*/corpora/*/dataSchemas/*}:\x0Bdata_schema\x12\xAF\x01\x0A\x0DGetDataSchema\x12..google.cloud.visionai.v1.GetDataSchemaRequest\x1A\$.google.cloud.visionai.v1.DataSchema\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=projects/*/locations/*/corpora/*/dataSchemas/*}\x12\xA7\x01\x0A\x10DeleteDataSchema\x121.google.cloud.visionai.v1.DeleteDataSchemaRequest\x1A\x16.google.protobuf.Empty\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=projects/*/locations/*/corpora/*/dataSchemas/*}\x12\xC2\x01\x0A\x0FListDataSchemas\x120.google.cloud.visionai.v1.ListDataSchemasRequest\x1A1.google.cloud.visionai.v1.ListDataSchemasResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=projects/*/locations/*/corpora/*}/dataSchemas\x12\xE5\x01\x0A\x10CreateAnnotation\x121.google.cloud.visionai.v1.CreateAnnotationRequest\x1A\$.google.cloud.visionai.v1.Annotation\"x\xDAA\x1Fparent,annotation,annotation_id\x82\xD3\xE4\x93\x02P\"B/v1/{parent=projects/*/locations/*/corpora/*/assets/*}/annotations:\x0Aannotation\x12\xB8\x01\x0A\x0DGetAnnotation\x12..google.cloud.visionai.v1.GetAnnotationRequest\x1A\$.google.cloud.visionai.v1.Annotation\"Q\xDAA\x04name\x82\xD3\xE4\x93\x02D\x12B/v1/{name=projects/*/locations/*/corpora/*/assets/*/annotations/*}\x12\xCB\x01\x0A\x0FListAnnotations\x120.google.cloud.visionai.v1.ListAnnotationsRequest\x1A1.google.cloud.visionai.v1.ListAnnotationsResponse\"S\xDAA\x06parent\x82\xD3\xE4\x93\x02D\x12B/v1/{parent=projects/*/locations/*/corpora/*/assets/*}/annotations\x12\xE7\x01\x0A\x10UpdateAnnotation\x121.google.cloud.visionai.v1.UpdateAnnotationRequest\x1A\$.google.cloud.visionai.v1.Annotation\"z\xDAA\x16annotation,update_mask\x82\xD3\xE4\x93\x02[2M/v1/{annotation.name=projects/*/locations/*/corpora/*/assets/*/annotations/*}:\x0Aannotation\x12\xB0\x01\x0A\x10DeleteAnnotation\x121.google.cloud.visionai.v1.DeleteAnnotationRequest\x1A\x16.google.protobuf.Empty\"Q\xDAA\x04name\x82\xD3\xE4\x93\x02D*B/v1/{name=projects/*/locations/*/corpora/*/assets/*/annotations/*}\x12p\x0A\x0BIngestAsset\x12,.google.cloud.visionai.v1.IngestAssetRequest\x1A-.google.cloud.visionai.v1.IngestAssetResponse\"\x00(\x010\x01\x12\xAA\x01\x0A\x09ClipAsset\x12*.google.cloud.visionai.v1.ClipAssetRequest\x1A+.google.cloud.visionai.v1.ClipAssetResponse\"D\x82\xD3\xE4\x93\x02>\"9/v1/{name=projects/*/locations/*/corpora/*/assets/*}:clip:\x01*\x12\xC3\x01\x0A\x0EGenerateHlsUri\x12/.google.cloud.visionai.v1.GenerateHlsUriRequest\x1A0.google.cloud.visionai.v1.GenerateHlsUriResponse\"N\x82\xD3\xE4\x93\x02H\"C/v1/{name=projects/*/locations/*/corpora/*/assets/*}:generateHlsUri:\x01*\x12\xD3\x01\x0A\x0CImportAssets\x12-.google.cloud.visionai.v1.ImportAssetsRequest\x1A\x1D.google.longrunning.Operation\"u\xCAA,\x0A\x14ImportAssetsResponse\x12\x14ImportAssetsMetadata\x82\xD3\xE4\x93\x02@\";/v1/{parent=projects/*/locations/*/corpora/*}/assets:import:\x01*\x12\xED\x01\x0A\x12CreateSearchConfig\x123.google.cloud.visionai.v1.CreateSearchConfigRequest\x1A&.google.cloud.visionai.v1.SearchConfig\"z\xDAA%parent,search_config,search_config_id\x82\xD3\xE4\x93\x02L\";/v1/{parent=projects/*/locations/*/corpora/*}/searchConfigs:\x0Dsearch_config\x12\xEF\x01\x0A\x12UpdateSearchConfig\x123.google.cloud.visionai.v1.UpdateSearchConfigRequest\x1A&.google.cloud.visionai.v1.SearchConfig\"|\xDAA\x19search_config,update_mask\x82\xD3\xE4\x93\x02Z2I/v1/{search_config.name=projects/*/locations/*/corpora/*/searchConfigs/*}:\x0Dsearch_config\x12\xB7\x01\x0A\x0FGetSearchConfig\x120.google.cloud.visionai.v1.GetSearchConfigRequest\x1A&.google.cloud.visionai.v1.SearchConfig\"J\xDAA\x04name\x82\xD3\xE4\x93\x02=\x12;/v1/{name=projects/*/locations/*/corpora/*/searchConfigs/*}\x12\xAD\x01\x0A\x12DeleteSearchConfig\x123.google.cloud.visionai.v1.DeleteSearchConfigRequest\x1A\x16.google.protobuf.Empty\"J\xDAA\x04name\x82\xD3\xE4\x93\x02=*;/v1/{name=projects/*/locations/*/corpora/*/searchConfigs/*}\x12\xCA\x01\x0A\x11ListSearchConfigs\x122.google.cloud.visionai.v1.ListSearchConfigsRequest\x1A3.google.cloud.visionai.v1.ListSearchConfigsResponse\"L\xDAA\x06parent\x82\xD3\xE4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/corpora/*}/searchConfigs\x12\xFC\x01\x0A\x14CreateSearchHypernym\x125.google.cloud.visionai.v1.CreateSearchHypernymRequest\x1A(.google.cloud.visionai.v1.SearchHypernym\"\x82\x01\xDAA)parent,search_hypernym,search_hypernym_id\x82\xD3\xE4\x93\x02P\"=/v1/{parent=projects/*/locations/*/corpora/*}/searchHypernyms:\x0Fsearch_hypernym\x12\xFE\x01\x0A\x14UpdateSearchHypernym\x125.google.cloud.visionai.v1.UpdateSearchHypernymRequest\x1A(.google.cloud.visionai.v1.SearchHypernym\"\x84\x01\xDAA\x1Bsearch_hypernym,update_mask\x82\xD3\xE4\x93\x02`2M/v1/{search_hypernym.name=projects/*/locations/*/corpora/*/searchHypernyms/*}:\x0Fsearch_hypernym\x12\xBF\x01\x0A\x11GetSearchHypernym\x122.google.cloud.visionai.v1.GetSearchHypernymRequest\x1A(.google.cloud.visionai.v1.SearchHypernym\"L\xDAA\x04name\x82\xD3\xE4\x93\x02?\x12=/v1/{name=projects/*/locations/*/corpora/*/searchHypernyms/*}\x12\xB3\x01\x0A\x14DeleteSearchHypernym\x125.google.cloud.visionai.v1.DeleteSearchHypernymRequest\x1A\x16.google.protobuf.Empty\"L\xDAA\x04name\x82\xD3\xE4\x93\x02?*=/v1/{name=projects/*/locations/*/corpora/*/searchHypernyms/*}\x12\xD2\x01\x0A\x13ListSearchHypernyms\x124.google.cloud.visionai.v1.ListSearchHypernymsRequest\x1A5.google.cloud.visionai.v1.ListSearchHypernymsResponse\"N\xDAA\x06parent\x82\xD3\xE4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/corpora/*}/searchHypernyms\x12\xB4\x01\x0A\x0CSearchAssets\x12-.google.cloud.visionai.v1.SearchAssetsRequest\x1A..google.cloud.visionai.v1.SearchAssetsResponse\"E\x82\xD3\xE4\x93\x02?\":/v1/{corpus=projects/*/locations/*/corpora/*}:searchAssets:\x01*\x12\xDF\x01\x0A\x13SearchIndexEndpoint\x124.google.cloud.visionai.v1.SearchIndexEndpointRequest\x1A5.google.cloud.visionai.v1.SearchIndexEndpointResponse\"[\x82\xD3\xE4\x93\x02U\"P/v1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:searchIndexEndpoint:\x01*\x12\x90\x02\x0A\x13CreateIndexEndpoint\x124.google.cloud.visionai.v1.CreateIndexEndpointRequest\x1A\x1D.google.longrunning.Operation\"\xA3\x01\xCAA,\x0A\x0DIndexEndpoint\x12\x1BCreateIndexEndpointMetadata\xDAA'parent,index_endpoint,index_endpoint_id\x82\xD3\xE4\x93\x02D\"2/v1/{parent=projects/*/locations/*}/indexEndpoints:\x0Eindex_endpoint\x12\xB1\x01\x0A\x10GetIndexEndpoint\x121.google.cloud.visionai.v1.GetIndexEndpointRequest\x1A'.google.cloud.visionai.v1.IndexEndpoint\"A\xDAA\x04name\x82\xD3\xE4\x93\x024\x122/v1/{name=projects/*/locations/*/indexEndpoints/*}\x12\xC4\x01\x0A\x12ListIndexEndpoints\x123.google.cloud.visionai.v1.ListIndexEndpointsRequest\x1A4.google.cloud.visionai.v1.ListIndexEndpointsResponse\"C\xDAA\x06parent\x82\xD3\xE4\x93\x024\x122/v1/{parent=projects/*/locations/*}/indexEndpoints\x12\x92\x02\x0A\x13UpdateIndexEndpoint\x124.google.cloud.visionai.v1.UpdateIndexEndpointRequest\x1A\x1D.google.longrunning.Operation\"\xA5\x01\xCAA,\x0A\x0DIndexEndpoint\x12\x1BUpdateIndexEndpointMetadata\xDAA\x1Aindex_endpoint,update_mask\x82\xD3\xE4\x93\x02S2A/v1/{index_endpoint.name=projects/*/locations/*/indexEndpoints/*}:\x0Eindex_endpoint\x12\xE4\x01\x0A\x13DeleteIndexEndpoint\x124.google.cloud.visionai.v1.DeleteIndexEndpointRequest\x1A\x1D.google.longrunning.Operation\"x\xCAA4\x0A\x15google.protobuf.Empty\x12\x1BDeleteIndexEndpointMetadata\xDAA\x04name\x82\xD3\xE4\x93\x024*2/v1/{name=projects/*/locations/*/indexEndpoints/*}\x12\xDD\x01\x0A\x0BDeployIndex\x12,.google.cloud.visionai.v1.DeployIndexRequest\x1A\x1D.google.longrunning.Operation\"\x80\x01\xCAA*\x0A\x13DeployIndexResponse\x12\x13DeployIndexMetadata\x82\xD3\xE4\x93\x02M\"H/v1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:deployIndex:\x01*\x12\xE7\x01\x0A\x0DUndeployIndex\x12..google.cloud.visionai.v1.UndeployIndexRequest\x1A\x1D.google.longrunning.Operation\"\x86\x01\xCAA.\x0A\x15UndeployIndexResponse\x12\x15UndeployIndexMetadata\x82\xD3\xE4\x93\x02O\"J/v1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:undeployIndex:\x01*\x12\xFF\x01\x0A\x10CreateCollection\x121.google.cloud.visionai.v1.CreateCollectionRequest\x1A\x1D.google.longrunning.Operation\"\x98\x01\xCAA&\x0A\x0ACollection\x12\x18CreateCollectionMetadata\xDAA\x1Fparent,collection,collection_id\x82\xD3\xE4\x93\x02G\"9/v1/{parent=projects/*/locations/*/corpora/*}/collections:\x0Acollection\x12\xE2\x01\x0A\x10DeleteCollection\x121.google.cloud.visionai.v1.DeleteCollectionRequest\x1A\x1D.google.longrunning.Operation\"|\xCAA1\x0A\x15google.protobuf.Empty\x12\x18DeleteCollectionMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=projects/*/locations/*/corpora/*/collections/*}\x12\xAF\x01\x0A\x0DGetCollection\x12..google.cloud.visionai.v1.GetCollectionRequest\x1A\$.google.cloud.visionai.v1.Collection\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=projects/*/locations/*/corpora/*/collections/*}\x12\xDE\x01\x0A\x10UpdateCollection\x121.google.cloud.visionai.v1.UpdateCollectionRequest\x1A\$.google.cloud.visionai.v1.Collection\"q\xDAA\x16collection,update_mask\x82\xD3\xE4\x93\x02R2D/v1/{collection.name=projects/*/locations/*/corpora/*/collections/*}:\x0Acollection\x12\xC2\x01\x0A\x0FListCollections\x120.google.cloud.visionai.v1.ListCollectionsRequest\x1A1.google.cloud.visionai.v1.ListCollectionsResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=projects/*/locations/*/corpora/*}/collections\x12\xE6\x01\x0A\x11AddCollectionItem\x122.google.cloud.visionai.v1.AddCollectionItemRequest\x1A3.google.cloud.visionai.v1.AddCollectionItemResponse\"h\xDAA\x04item\x82\xD3\xE4\x93\x02[\"V/v1/{item.collection=projects/*/locations/*/corpora/*/collections/*}:addCollectionItem:\x01*\x12\xF2\x01\x0A\x14RemoveCollectionItem\x125.google.cloud.visionai.v1.RemoveCollectionItemRequest\x1A6.google.cloud.visionai.v1.RemoveCollectionItemResponse\"k\xDAA\x04item\x82\xD3\xE4\x93\x02^\"Y/v1/{item.collection=projects/*/locations/*/corpora/*/collections/*}:removeCollectionItem:\x01*\x12\xEC\x01\x0A\x13ViewCollectionItems\x124.google.cloud.visionai.v1.ViewCollectionItemsRequest\x1A5.google.cloud.visionai.v1.ViewCollectionItemsResponse\"h\xDAA\x0Acollection\x82\xD3\xE4\x93\x02U\x12S/v1/{collection=projects/*/locations/*/corpora/*/collections/*}:viewCollectionItems\x1AU\xCAA!warehouse-visionai.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xBE\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x0EWarehouseProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AIEnabledDevicesInputConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AIEnabledDevicesInputConfig.php new file mode 100644 index 000000000000..f112055a62ed --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AIEnabledDevicesInputConfig.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.AIEnabledDevicesInputConfig + */ +class AIEnabledDevicesInputConfig extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AcceleratorType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AcceleratorType.php new file mode 100644 index 000000000000..05680f1236ab --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AcceleratorType.php @@ -0,0 +1,103 @@ +google.cloud.visionai.v1.AcceleratorType + */ +class AcceleratorType +{ + /** + * Unspecified accelerator type, which means no accelerator. + * + * Generated from protobuf enum ACCELERATOR_TYPE_UNSPECIFIED = 0; + */ + const ACCELERATOR_TYPE_UNSPECIFIED = 0; + /** + * Nvidia Tesla K80 GPU. + * + * Generated from protobuf enum NVIDIA_TESLA_K80 = 1; + */ + const NVIDIA_TESLA_K80 = 1; + /** + * Nvidia Tesla P100 GPU. + * + * Generated from protobuf enum NVIDIA_TESLA_P100 = 2; + */ + const NVIDIA_TESLA_P100 = 2; + /** + * Nvidia Tesla V100 GPU. + * + * Generated from protobuf enum NVIDIA_TESLA_V100 = 3; + */ + const NVIDIA_TESLA_V100 = 3; + /** + * Nvidia Tesla P4 GPU. + * + * Generated from protobuf enum NVIDIA_TESLA_P4 = 4; + */ + const NVIDIA_TESLA_P4 = 4; + /** + * Nvidia Tesla T4 GPU. + * + * Generated from protobuf enum NVIDIA_TESLA_T4 = 5; + */ + const NVIDIA_TESLA_T4 = 5; + /** + * Nvidia Tesla A100 GPU. + * + * Generated from protobuf enum NVIDIA_TESLA_A100 = 8; + */ + const NVIDIA_TESLA_A100 = 8; + /** + * TPU v2. + * + * Generated from protobuf enum TPU_V2 = 6; + */ + const TPU_V2 = 6; + /** + * TPU v3. + * + * Generated from protobuf enum TPU_V3 = 7; + */ + const TPU_V3 = 7; + + private static $valueToName = [ + self::ACCELERATOR_TYPE_UNSPECIFIED => 'ACCELERATOR_TYPE_UNSPECIFIED', + self::NVIDIA_TESLA_K80 => 'NVIDIA_TESLA_K80', + self::NVIDIA_TESLA_P100 => 'NVIDIA_TESLA_P100', + self::NVIDIA_TESLA_V100 => 'NVIDIA_TESLA_V100', + self::NVIDIA_TESLA_P4 => 'NVIDIA_TESLA_P4', + self::NVIDIA_TESLA_T4 => 'NVIDIA_TESLA_T4', + self::NVIDIA_TESLA_A100 => 'NVIDIA_TESLA_A100', + self::TPU_V2 => 'TPU_V2', + self::TPU_V3 => 'TPU_V3', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AcquireLeaseRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AcquireLeaseRequest.php new file mode 100644 index 000000000000..cf25e5823be7 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AcquireLeaseRequest.php @@ -0,0 +1,179 @@ +google.cloud.visionai.v1.AcquireLeaseRequest + */ +class AcquireLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The series name. + * + * Generated from protobuf field string series = 1; + */ + protected $series = ''; + /** + * The owner name. + * + * Generated from protobuf field string owner = 2; + */ + protected $owner = ''; + /** + * The lease term. + * + * Generated from protobuf field .google.protobuf.Duration term = 3; + */ + protected $term = null; + /** + * The lease type. + * + * Generated from protobuf field .google.cloud.visionai.v1.LeaseType lease_type = 4; + */ + protected $lease_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $series + * The series name. + * @type string $owner + * The owner name. + * @type \Google\Protobuf\Duration $term + * The lease term. + * @type int $lease_type + * The lease type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + + /** + * The series name. + * + * Generated from protobuf field string series = 1; + * @return string + */ + public function getSeries() + { + return $this->series; + } + + /** + * The series name. + * + * Generated from protobuf field string series = 1; + * @param string $var + * @return $this + */ + public function setSeries($var) + { + GPBUtil::checkString($var, True); + $this->series = $var; + + return $this; + } + + /** + * The owner name. + * + * Generated from protobuf field string owner = 2; + * @return string + */ + public function getOwner() + { + return $this->owner; + } + + /** + * The owner name. + * + * Generated from protobuf field string owner = 2; + * @param string $var + * @return $this + */ + public function setOwner($var) + { + GPBUtil::checkString($var, True); + $this->owner = $var; + + return $this; + } + + /** + * The lease term. + * + * Generated from protobuf field .google.protobuf.Duration term = 3; + * @return \Google\Protobuf\Duration|null + */ + public function getTerm() + { + return $this->term; + } + + public function hasTerm() + { + return isset($this->term); + } + + public function clearTerm() + { + unset($this->term); + } + + /** + * The lease term. + * + * Generated from protobuf field .google.protobuf.Duration term = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTerm($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->term = $var; + + return $this; + } + + /** + * The lease type. + * + * Generated from protobuf field .google.cloud.visionai.v1.LeaseType lease_type = 4; + * @return int + */ + public function getLeaseType() + { + return $this->lease_type; + } + + /** + * The lease type. + * + * Generated from protobuf field .google.cloud.visionai.v1.LeaseType lease_type = 4; + * @param int $var + * @return $this + */ + public function setLeaseType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\LeaseType::class); + $this->lease_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddApplicationStreamInputRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddApplicationStreamInputRequest.php new file mode 100644 index 000000000000..d1f89125e521 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddApplicationStreamInputRequest.php @@ -0,0 +1,203 @@ +google.cloud.visionai.v1.AddApplicationStreamInputRequest + */ +class AddApplicationStreamInputRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The stream inputs to add, the stream resource name is the key of each + * StreamInput, and it must be unique within each application. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + */ + private $application_stream_inputs; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * Please see {@see AppPlatformClient::applicationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\AddApplicationStreamInputRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @type \Google\Cloud\VisionAI\V1\ApplicationStreamInput[] $application_stream_inputs + * The stream inputs to add, the stream resource name is the key of each + * StreamInput, and it must be unique within each application. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * 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 stream inputs to add, the stream resource name is the key of each + * StreamInput, and it must be unique within each application. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\ApplicationStreamInput> + */ + public function getApplicationStreamInputs() + { + return $this->application_stream_inputs; + } + + /** + * The stream inputs to add, the stream resource name is the key of each + * StreamInput, and it must be unique within each application. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * @param \Google\Cloud\VisionAI\V1\ApplicationStreamInput[] $var + * @return $this + */ + public function setApplicationStreamInputs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ApplicationStreamInput::class); + $this->application_stream_inputs = $arr; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddApplicationStreamInputResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddApplicationStreamInputResponse.php new file mode 100644 index 000000000000..243226a3e761 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddApplicationStreamInputResponse.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.AddApplicationStreamInputResponse + */ +class AddApplicationStreamInputResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddCollectionItemRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddCollectionItemRequest.php new file mode 100644 index 000000000000..93048bafe747 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddCollectionItemRequest.php @@ -0,0 +1,90 @@ +google.cloud.visionai.v1.AddCollectionItemRequest + */ +class AddCollectionItemRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The item to be added. + * + * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $item = null; + + /** + * @param \Google\Cloud\VisionAI\V1\CollectionItem $item Required. The item to be added. + * + * @return \Google\Cloud\VisionAI\V1\AddCollectionItemRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\CollectionItem $item): self + { + return (new self()) + ->setItem($item); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\CollectionItem $item + * Required. The item to be added. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The item to be added. + * + * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\CollectionItem|null + */ + public function getItem() + { + return $this->item; + } + + public function hasItem() + { + return isset($this->item); + } + + public function clearItem() + { + unset($this->item); + } + + /** + * Required. The item to be added. + * + * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\CollectionItem $var + * @return $this + */ + public function setItem($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\CollectionItem::class); + $this->item = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddCollectionItemResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddCollectionItemResponse.php new file mode 100644 index 000000000000..cace42561560 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddCollectionItemResponse.php @@ -0,0 +1,77 @@ +google.cloud.visionai.v1.AddCollectionItemResponse + */ +class AddCollectionItemResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The item that has already been added. + * + * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1; + */ + protected $item = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\CollectionItem $item + * The item that has already been added. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The item that has already been added. + * + * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1; + * @return \Google\Cloud\VisionAI\V1\CollectionItem|null + */ + public function getItem() + { + return $this->item; + } + + public function hasItem() + { + return isset($this->item); + } + + public function clearItem() + { + unset($this->item); + } + + /** + * The item that has already been added. + * + * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1; + * @param \Google\Cloud\VisionAI\V1\CollectionItem $var + * @return $this + */ + public function setItem($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\CollectionItem::class); + $this->item = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Analysis.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Analysis.php new file mode 100644 index 000000000000..659a3a98f4e9 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Analysis.php @@ -0,0 +1,371 @@ +google.cloud.visionai.v1.Analysis + */ +class Analysis extends \Google\Protobuf\Internal\Message +{ + /** + * The name of resource. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * The definition of the analysis. + * + * Generated from protobuf field .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; + */ + protected $analysis_definition = null; + /** + * Map from the input parameter in the definition to the real stream. + * E.g., suppose you had a stream source operator named "input-0" and you try + * to receive from the real stream "stream-0". You can add the following + * mapping: [input-0: stream-0]. + * + * Generated from protobuf field map input_streams_mapping = 6; + */ + private $input_streams_mapping; + /** + * Map from the output parameter in the definition to the real stream. + * E.g., suppose you had a stream sink operator named "output-0" and you try + * to send to the real stream "stream-0". You can add the following + * mapping: [output-0: stream-0]. + * + * Generated from protobuf field map output_streams_mapping = 7; + */ + private $output_streams_mapping; + /** + * Boolean flag to indicate whether you would like to disable the ability + * to automatically start a Process when new event happening in the input + * Stream. If you would like to start a Process manually, the field needs + * to be set to true. + * + * Generated from protobuf field bool disable_event_watch = 8; + */ + protected $disable_event_watch = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The create timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update timestamp. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs. + * @type \Google\Cloud\VisionAI\V1\AnalysisDefinition $analysis_definition + * The definition of the analysis. + * @type array|\Google\Protobuf\Internal\MapField $input_streams_mapping + * Map from the input parameter in the definition to the real stream. + * E.g., suppose you had a stream source operator named "input-0" and you try + * to receive from the real stream "stream-0". You can add the following + * mapping: [input-0: stream-0]. + * @type array|\Google\Protobuf\Internal\MapField $output_streams_mapping + * Map from the output parameter in the definition to the real stream. + * E.g., suppose you had a stream sink operator named "output-0" and you try + * to send to the real stream "stream-0". You can add the following + * mapping: [output-0: stream-0]. + * @type bool $disable_event_watch + * Boolean flag to indicate whether you would like to disable the ability + * to automatically start a Process when new event happening in the input + * Stream. If you would like to start a Process manually, the field needs + * to be set to true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaResources::initOnce(); + parent::__construct($data); + } + + /** + * The name of resource. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of resource. + * + * 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 create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * The definition of the analysis. + * + * Generated from protobuf field .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; + * @return \Google\Cloud\VisionAI\V1\AnalysisDefinition|null + */ + public function getAnalysisDefinition() + { + return $this->analysis_definition; + } + + public function hasAnalysisDefinition() + { + return isset($this->analysis_definition); + } + + public function clearAnalysisDefinition() + { + unset($this->analysis_definition); + } + + /** + * The definition of the analysis. + * + * Generated from protobuf field .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; + * @param \Google\Cloud\VisionAI\V1\AnalysisDefinition $var + * @return $this + */ + public function setAnalysisDefinition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AnalysisDefinition::class); + $this->analysis_definition = $var; + + return $this; + } + + /** + * Map from the input parameter in the definition to the real stream. + * E.g., suppose you had a stream source operator named "input-0" and you try + * to receive from the real stream "stream-0". You can add the following + * mapping: [input-0: stream-0]. + * + * Generated from protobuf field map input_streams_mapping = 6; + * @return \Google\Protobuf\Internal\MapField + */ + public function getInputStreamsMapping() + { + return $this->input_streams_mapping; + } + + /** + * Map from the input parameter in the definition to the real stream. + * E.g., suppose you had a stream source operator named "input-0" and you try + * to receive from the real stream "stream-0". You can add the following + * mapping: [input-0: stream-0]. + * + * Generated from protobuf field map input_streams_mapping = 6; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setInputStreamsMapping($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->input_streams_mapping = $arr; + + return $this; + } + + /** + * Map from the output parameter in the definition to the real stream. + * E.g., suppose you had a stream sink operator named "output-0" and you try + * to send to the real stream "stream-0". You can add the following + * mapping: [output-0: stream-0]. + * + * Generated from protobuf field map output_streams_mapping = 7; + * @return \Google\Protobuf\Internal\MapField + */ + public function getOutputStreamsMapping() + { + return $this->output_streams_mapping; + } + + /** + * Map from the output parameter in the definition to the real stream. + * E.g., suppose you had a stream sink operator named "output-0" and you try + * to send to the real stream "stream-0". You can add the following + * mapping: [output-0: stream-0]. + * + * Generated from protobuf field map output_streams_mapping = 7; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setOutputStreamsMapping($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->output_streams_mapping = $arr; + + return $this; + } + + /** + * Boolean flag to indicate whether you would like to disable the ability + * to automatically start a Process when new event happening in the input + * Stream. If you would like to start a Process manually, the field needs + * to be set to true. + * + * Generated from protobuf field bool disable_event_watch = 8; + * @return bool + */ + public function getDisableEventWatch() + { + return $this->disable_event_watch; + } + + /** + * Boolean flag to indicate whether you would like to disable the ability + * to automatically start a Process when new event happening in the input + * Stream. If you would like to start a Process manually, the field needs + * to be set to true. + * + * Generated from protobuf field bool disable_event_watch = 8; + * @param bool $var + * @return $this + */ + public function setDisableEventWatch($var) + { + GPBUtil::checkBool($var); + $this->disable_event_watch = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalysisDefinition.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalysisDefinition.php new file mode 100644 index 000000000000..f1dfcf854272 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalysisDefinition.php @@ -0,0 +1,72 @@ +google.cloud.visionai.v1.AnalysisDefinition + */ +class AnalysisDefinition extends \Google\Protobuf\Internal\Message +{ + /** + * Analyzer definitions. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + */ + private $analyzers; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\AnalyzerDefinition[] $analyzers + * Analyzer definitions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); + parent::__construct($data); + } + + /** + * Analyzer definitions. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\AnalyzerDefinition> + */ + public function getAnalyzers() + { + return $this->analyzers; + } + + /** + * Analyzer definitions. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; + * @param \Google\Cloud\VisionAI\V1\AnalyzerDefinition[] $var + * @return $this + */ + public function setAnalyzers($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AnalyzerDefinition::class); + $this->analyzers = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata.php new file mode 100644 index 000000000000..d275381581e5 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata.php @@ -0,0 +1,155 @@ +google.cloud.visionai.v1.AnalyzeAssetMetadata + */ +class AnalyzeAssetMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The status of analysis on all search capabilities. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + */ + private $analysis_status; + /** + * The start time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + */ + protected $start_time = null; + /** + * The update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\AnalyzeAssetMetadata\AnalysisStatus[] $analysis_status + * The status of analysis on all search capabilities. + * @type \Google\Protobuf\Timestamp $start_time + * The start time of the operation. + * @type \Google\Protobuf\Timestamp $update_time + * The update time of the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The status of analysis on all search capabilities. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\AnalyzeAssetMetadata\AnalysisStatus> + */ + public function getAnalysisStatus() + { + return $this->analysis_status; + } + + /** + * The status of analysis on all search capabilities. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; + * @param \Google\Cloud\VisionAI\V1\AnalyzeAssetMetadata\AnalysisStatus[] $var + * @return $this + */ + public function setAnalysisStatus($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AnalyzeAssetMetadata\AnalysisStatus::class); + $this->analysis_status = $arr; + + return $this; + } + + /** + * The start time of the operation. + * + * 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 of the operation. + * + * 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 update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * The update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata/AnalysisStatus.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata/AnalysisStatus.php new file mode 100644 index 000000000000..5daf3d3c45b2 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata/AnalysisStatus.php @@ -0,0 +1,131 @@ +google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus + */ +class AnalysisStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State state = 2; + */ + protected $state = 0; + /** + * Generated from protobuf field string status_message = 3; + */ + protected $status_message = ''; + /** + * The search capability requested. + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchCapability search_capability = 4; + */ + protected $search_capability = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * @type string $status_message + * @type \Google\Cloud\VisionAI\V1\SearchCapability $search_capability + * The search capability requested. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State state = 2; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Generated from protobuf field .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State state = 2; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\AnalyzeAssetMetadata\AnalysisStatus\State::class); + $this->state = $var; + + return $this; + } + + /** + * Generated from protobuf field string status_message = 3; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Generated from protobuf field string status_message = 3; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * The search capability requested. + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchCapability search_capability = 4; + * @return \Google\Cloud\VisionAI\V1\SearchCapability|null + */ + public function getSearchCapability() + { + return $this->search_capability; + } + + public function hasSearchCapability() + { + return isset($this->search_capability); + } + + public function clearSearchCapability() + { + unset($this->search_capability); + } + + /** + * The search capability requested. + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchCapability search_capability = 4; + * @param \Google\Cloud\VisionAI\V1\SearchCapability $var + * @return $this + */ + public function setSearchCapability($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\SearchCapability::class); + $this->search_capability = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata/AnalysisStatus/State.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata/AnalysisStatus/State.php new file mode 100644 index 000000000000..812af2314e68 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata/AnalysisStatus/State.php @@ -0,0 +1,68 @@ +google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State + */ +class State +{ + /** + * The default process state should never happen. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The ml model analysis is in progress. + * + * Generated from protobuf enum IN_PROGRESS = 1; + */ + const IN_PROGRESS = 1; + /** + * The ml model analysis is successfully done. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * The ml model analysis failed. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::IN_PROGRESS => 'IN_PROGRESS', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetRequest.php new file mode 100644 index 000000000000..543d57ae25a8 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetRequest.php @@ -0,0 +1,75 @@ +google.cloud.visionai.v1.AnalyzeAssetRequest + */ +class AnalyzeAssetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the asset to analyze. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the asset to analyze. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the asset to analyze. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the asset to analyze. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetResponse.php new file mode 100644 index 000000000000..2008be400e02 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetResponse.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.AnalyzeAssetResponse + */ +class AnalyzeAssetResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusMetadata.php new file mode 100644 index 000000000000..0f43644a075e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusMetadata.php @@ -0,0 +1,77 @@ +google.cloud.visionai.v1.AnalyzeCorpusMetadata + */ +class AnalyzeCorpusMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The metadata of the operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + protected $metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\OperationMetadata $metadata + * The metadata of the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The metadata of the operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata metadata = 1; + * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * The metadata of the operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata metadata = 1; + * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); + $this->metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusRequest.php new file mode 100644 index 000000000000..5349383ebe8d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusRequest.php @@ -0,0 +1,75 @@ +google.cloud.visionai.v1.AnalyzeCorpusRequest + */ +class AnalyzeCorpusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent corpus resource where the assets will be analyzed. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The parent corpus resource where the assets will be analyzed. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent corpus resource where the assets will be analyzed. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The parent corpus resource where the assets will be analyzed. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusResponse.php new file mode 100644 index 000000000000..1ecd2a2969ea --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusResponse.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.AnalyzeCorpusResponse + */ +class AnalyzeCorpusResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition.php new file mode 100644 index 000000000000..b309745cd537 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition.php @@ -0,0 +1,280 @@ +google.cloud.visionai.v1.AnalyzerDefinition + */ +class AnalyzerDefinition extends \Google\Protobuf\Internal\Message +{ + /** + * The name of this analyzer. + * Tentatively [a-z][a-z0-9]*(_[a-z0-9]+)*. + * + * Generated from protobuf field string analyzer = 1; + */ + protected $analyzer = ''; + /** + * The name of the operator that this analyzer runs. + * Must match the name of a supported operator. + * + * Generated from protobuf field string operator = 2; + */ + protected $operator = ''; + /** + * Input streams. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + */ + private $inputs; + /** + * The attribute values that this analyzer applies to the operator. + * Supply a mapping between the attribute names and the actual value you wish + * to apply. If an attribute name is omitted, then it will take a + * preconfigured default value. + * + * Generated from protobuf field map attrs = 4; + */ + private $attrs; + /** + * Debug options. + * + * Generated from protobuf field .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; + */ + protected $debug_options = null; + /** + * Operator option. + * + * Generated from protobuf field .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; + */ + protected $operator_option = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $analyzer + * The name of this analyzer. + * Tentatively [a-z][a-z0-9]*(_[a-z0-9]+)*. + * @type string $operator + * The name of the operator that this analyzer runs. + * Must match the name of a supported operator. + * @type \Google\Cloud\VisionAI\V1\AnalyzerDefinition\StreamInput[] $inputs + * Input streams. + * @type array|\Google\Protobuf\Internal\MapField $attrs + * The attribute values that this analyzer applies to the operator. + * Supply a mapping between the attribute names and the actual value you wish + * to apply. If an attribute name is omitted, then it will take a + * preconfigured default value. + * @type \Google\Cloud\VisionAI\V1\AnalyzerDefinition\DebugOptions $debug_options + * Debug options. + * @type \Google\Cloud\VisionAI\V1\AnalyzerDefinition\OperatorOption $operator_option + * Operator option. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); + parent::__construct($data); + } + + /** + * The name of this analyzer. + * Tentatively [a-z][a-z0-9]*(_[a-z0-9]+)*. + * + * Generated from protobuf field string analyzer = 1; + * @return string + */ + public function getAnalyzer() + { + return $this->analyzer; + } + + /** + * The name of this analyzer. + * Tentatively [a-z][a-z0-9]*(_[a-z0-9]+)*. + * + * Generated from protobuf field string analyzer = 1; + * @param string $var + * @return $this + */ + public function setAnalyzer($var) + { + GPBUtil::checkString($var, True); + $this->analyzer = $var; + + return $this; + } + + /** + * The name of the operator that this analyzer runs. + * Must match the name of a supported operator. + * + * Generated from protobuf field string operator = 2; + * @return string + */ + public function getOperator() + { + return $this->operator; + } + + /** + * The name of the operator that this analyzer runs. + * Must match the name of a supported operator. + * + * Generated from protobuf field string operator = 2; + * @param string $var + * @return $this + */ + public function setOperator($var) + { + GPBUtil::checkString($var, True); + $this->operator = $var; + + return $this; + } + + /** + * Input streams. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\AnalyzerDefinition\StreamInput> + */ + public function getInputs() + { + return $this->inputs; + } + + /** + * Input streams. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; + * @param \Google\Cloud\VisionAI\V1\AnalyzerDefinition\StreamInput[] $var + * @return $this + */ + public function setInputs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AnalyzerDefinition\StreamInput::class); + $this->inputs = $arr; + + return $this; + } + + /** + * The attribute values that this analyzer applies to the operator. + * Supply a mapping between the attribute names and the actual value you wish + * to apply. If an attribute name is omitted, then it will take a + * preconfigured default value. + * + * Generated from protobuf field map attrs = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAttrs() + { + return $this->attrs; + } + + /** + * The attribute values that this analyzer applies to the operator. + * Supply a mapping between the attribute names and the actual value you wish + * to apply. If an attribute name is omitted, then it will take a + * preconfigured default value. + * + * Generated from protobuf field map attrs = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAttrs($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AttributeValue::class); + $this->attrs = $arr; + + return $this; + } + + /** + * Debug options. + * + * Generated from protobuf field .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; + * @return \Google\Cloud\VisionAI\V1\AnalyzerDefinition\DebugOptions|null + */ + public function getDebugOptions() + { + return $this->debug_options; + } + + public function hasDebugOptions() + { + return isset($this->debug_options); + } + + public function clearDebugOptions() + { + unset($this->debug_options); + } + + /** + * Debug options. + * + * Generated from protobuf field .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; + * @param \Google\Cloud\VisionAI\V1\AnalyzerDefinition\DebugOptions $var + * @return $this + */ + public function setDebugOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AnalyzerDefinition\DebugOptions::class); + $this->debug_options = $var; + + return $this; + } + + /** + * Operator option. + * + * Generated from protobuf field .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; + * @return \Google\Cloud\VisionAI\V1\AnalyzerDefinition\OperatorOption|null + */ + public function getOperatorOption() + { + return $this->operator_option; + } + + public function hasOperatorOption() + { + return isset($this->operator_option); + } + + public function clearOperatorOption() + { + unset($this->operator_option); + } + + /** + * Operator option. + * + * Generated from protobuf field .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; + * @param \Google\Cloud\VisionAI\V1\AnalyzerDefinition\OperatorOption $var + * @return $this + */ + public function setOperatorOption($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AnalyzerDefinition\OperatorOption::class); + $this->operator_option = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/DebugOptions.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/DebugOptions.php new file mode 100644 index 000000000000..2c55ead13872 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/DebugOptions.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions + */ +class DebugOptions extends \Google\Protobuf\Internal\Message +{ + /** + * Environment variables. + * + * Generated from protobuf field map environment_variables = 1; + */ + private $environment_variables; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $environment_variables + * Environment variables. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); + parent::__construct($data); + } + + /** + * Environment variables. + * + * Generated from protobuf field map environment_variables = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getEnvironmentVariables() + { + return $this->environment_variables; + } + + /** + * Environment variables. + * + * Generated from protobuf field map environment_variables = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setEnvironmentVariables($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->environment_variables = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/OperatorOption.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/OperatorOption.php new file mode 100644 index 000000000000..514c2a141b11 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/OperatorOption.php @@ -0,0 +1,101 @@ +google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption + */ +class OperatorOption extends \Google\Protobuf\Internal\Message +{ + /** + * Tag of the operator. + * + * Generated from protobuf field string tag = 1; + */ + protected $tag = ''; + /** + * Registry of the operator. e.g. public, dev. + * + * Generated from protobuf field string registry = 2; + */ + protected $registry = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $tag + * Tag of the operator. + * @type string $registry + * Registry of the operator. e.g. public, dev. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); + parent::__construct($data); + } + + /** + * Tag of the operator. + * + * Generated from protobuf field string tag = 1; + * @return string + */ + public function getTag() + { + return $this->tag; + } + + /** + * Tag of the operator. + * + * Generated from protobuf field string tag = 1; + * @param string $var + * @return $this + */ + public function setTag($var) + { + GPBUtil::checkString($var, True); + $this->tag = $var; + + return $this; + } + + /** + * Registry of the operator. e.g. public, dev. + * + * Generated from protobuf field string registry = 2; + * @return string + */ + public function getRegistry() + { + return $this->registry; + } + + /** + * Registry of the operator. e.g. public, dev. + * + * Generated from protobuf field string registry = 2; + * @param string $var + * @return $this + */ + public function setRegistry($var) + { + GPBUtil::checkString($var, True); + $this->registry = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/StreamInput.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/StreamInput.php new file mode 100644 index 000000000000..a1ddbc0e2ae3 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/StreamInput.php @@ -0,0 +1,79 @@ +: + * Example: + * Suppose you had an operator named "SomeOp" that has 2 output + * arguments, the first of which is named "foo" and the second of which is + * named "bar", and an operator named "MyOp" that accepts 2 inputs. + * Also suppose that there is an analyzer named "some-analyzer" that is + * running "SomeOp" and another analyzer named "my-analyzer" running "MyOp". + * To indicate that "my-analyzer" is to consume "some-analyzer"'s "foo" + * output as its first input and "some-analyzer"'s "bar" output as its + * second input, you can set this field to the following: + * input = ["some-analyzer:foo", "some-analyzer:bar"] + * + * Generated from protobuf message google.cloud.visionai.v1.AnalyzerDefinition.StreamInput + */ +class StreamInput extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the stream input (as discussed above). + * + * Generated from protobuf field string input = 1; + */ + protected $input = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $input + * The name of the stream input (as discussed above). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); + parent::__construct($data); + } + + /** + * The name of the stream input (as discussed above). + * + * Generated from protobuf field string input = 1; + * @return string + */ + public function getInput() + { + return $this->input; + } + + /** + * The name of the stream input (as discussed above). + * + * Generated from protobuf field string input = 1; + * @param string $var + * @return $this + */ + public function setInput($var) + { + GPBUtil::checkString($var, True); + $this->input = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Annotation.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Annotation.php new file mode 100644 index 000000000000..1dc16e0c00e6 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Annotation.php @@ -0,0 +1,120 @@ +google.cloud.visionai.v1.Annotation + */ +class Annotation extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the annotation. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * User provided annotation. + * + * Generated from protobuf field .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; + */ + protected $user_specified_annotation = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the annotation. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * @type \Google\Cloud\VisionAI\V1\UserSpecifiedAnnotation $user_specified_annotation + * User provided annotation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the annotation. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the annotation. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * + * 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; + } + + /** + * User provided annotation. + * + * Generated from protobuf field .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; + * @return \Google\Cloud\VisionAI\V1\UserSpecifiedAnnotation|null + */ + public function getUserSpecifiedAnnotation() + { + return $this->user_specified_annotation; + } + + public function hasUserSpecifiedAnnotation() + { + return isset($this->user_specified_annotation); + } + + public function clearUserSpecifiedAnnotation() + { + unset($this->user_specified_annotation); + } + + /** + * User provided annotation. + * + * Generated from protobuf field .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; + * @param \Google\Cloud\VisionAI\V1\UserSpecifiedAnnotation $var + * @return $this + */ + public function setUserSpecifiedAnnotation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\UserSpecifiedAnnotation::class); + $this->user_specified_annotation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationCustomizedStruct.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationCustomizedStruct.php new file mode 100644 index 000000000000..2715fa950d8a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationCustomizedStruct.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.AnnotationCustomizedStruct + */ +class AnnotationCustomizedStruct extends \Google\Protobuf\Internal\Message +{ + /** + * A map from elements' keys to element's annotation value. + * + * Generated from protobuf field map elements = 2; + */ + private $elements; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $elements + * A map from elements' keys to element's annotation value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * A map from elements' keys to element's annotation value. + * + * Generated from protobuf field map elements = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getElements() + { + return $this->elements; + } + + /** + * A map from elements' keys to element's annotation value. + * + * Generated from protobuf field map elements = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setElements($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AnnotationValue::class); + $this->elements = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationList.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationList.php new file mode 100644 index 000000000000..6948dfe5da6d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationList.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.AnnotationList + */ +class AnnotationList extends \Google\Protobuf\Internal\Message +{ + /** + * The values of `LIST` data type annotation. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + */ + private $values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\AnnotationValue[] $values + * The values of `LIST` data type annotation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The values of `LIST` data type annotation. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\AnnotationValue> + */ + public function getValues() + { + return $this->values; + } + + /** + * The values of `LIST` data type annotation. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AnnotationValue values = 1; + * @param \Google\Cloud\VisionAI\V1\AnnotationValue[] $var + * @return $this + */ + public function setValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AnnotationValue::class); + $this->values = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationMatchingResult.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationMatchingResult.php new file mode 100644 index 000000000000..71dc52aebfb4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationMatchingResult.php @@ -0,0 +1,167 @@ +google.cloud.visionai.v1.AnnotationMatchingResult + */ +class AnnotationMatchingResult extends \Google\Protobuf\Internal\Message +{ + /** + * The criteria used for matching. It can be an input search criteria or a + * criteria converted from a facet selection. + * + * Generated from protobuf field .google.cloud.visionai.v1.Criteria criteria = 1; + */ + protected $criteria = null; + /** + * Matched annotations for the criteria. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + */ + private $matched_annotations; + /** + * Status of the match result. Possible values: + * FAILED_PRECONDITION - the criteria is not eligible for match. + * OK - matching is performed. + * + * Generated from protobuf field .google.rpc.Status status = 3; + */ + protected $status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Criteria $criteria + * The criteria used for matching. It can be an input search criteria or a + * criteria converted from a facet selection. + * @type \Google\Cloud\VisionAI\V1\Annotation[] $matched_annotations + * Matched annotations for the criteria. + * @type \Google\Rpc\Status $status + * Status of the match result. Possible values: + * FAILED_PRECONDITION - the criteria is not eligible for match. + * OK - matching is performed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The criteria used for matching. It can be an input search criteria or a + * criteria converted from a facet selection. + * + * Generated from protobuf field .google.cloud.visionai.v1.Criteria criteria = 1; + * @return \Google\Cloud\VisionAI\V1\Criteria|null + */ + public function getCriteria() + { + return $this->criteria; + } + + public function hasCriteria() + { + return isset($this->criteria); + } + + public function clearCriteria() + { + unset($this->criteria); + } + + /** + * The criteria used for matching. It can be an input search criteria or a + * criteria converted from a facet selection. + * + * Generated from protobuf field .google.cloud.visionai.v1.Criteria criteria = 1; + * @param \Google\Cloud\VisionAI\V1\Criteria $var + * @return $this + */ + public function setCriteria($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Criteria::class); + $this->criteria = $var; + + return $this; + } + + /** + * Matched annotations for the criteria. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Annotation> + */ + public function getMatchedAnnotations() + { + return $this->matched_annotations; + } + + /** + * Matched annotations for the criteria. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; + * @param \Google\Cloud\VisionAI\V1\Annotation[] $var + * @return $this + */ + public function setMatchedAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Annotation::class); + $this->matched_annotations = $arr; + + return $this; + } + + /** + * Status of the match result. Possible values: + * FAILED_PRECONDITION - the criteria is not eligible for match. + * OK - matching is performed. + * + * Generated from protobuf field .google.rpc.Status status = 3; + * @return \Google\Rpc\Status|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * Status of the match result. Possible values: + * FAILED_PRECONDITION - the criteria is not eligible for match. + * OK - matching is performed. + * + * Generated from protobuf field .google.rpc.Status status = 3; + * @param \Google\Rpc\Status $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Rpc\Status::class); + $this->status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationValue.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationValue.php new file mode 100644 index 000000000000..f37f297d694f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationValue.php @@ -0,0 +1,375 @@ +google.cloud.visionai.v1.AnnotationValue + */ +class AnnotationValue extends \Google\Protobuf\Internal\Message +{ + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $int_value + * Value of int type annotation. + * @type float $float_value + * Value of float type annotation. + * @type string $str_value + * Value of string type annotation. + * @type string $datetime_value + * Value of date time type annotation. + * @type \Google\Cloud\VisionAI\V1\GeoCoordinate $geo_coordinate + * Value of geo coordinate type annotation. + * @type \Google\Protobuf\Any $proto_any_value + * Value of any proto value. + * @type bool $bool_value + * Value of boolean type annotation. + * @type \Google\Protobuf\Struct $customized_struct_data_value + * Value of customized struct annotation. This field does not have effects. + * Use customized_struct_value instead for customized struct annotation. + * @type \Google\Cloud\VisionAI\V1\AnnotationList $list_value + * Value of list type annotation. + * @type \Google\Cloud\VisionAI\V1\AnnotationCustomizedStruct $customized_struct_value + * Value of custom struct type annotation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Value of int type annotation. + * + * Generated from protobuf field int64 int_value = 1; + * @return int|string + */ + public function getIntValue() + { + return $this->readOneof(1); + } + + public function hasIntValue() + { + return $this->hasOneof(1); + } + + /** + * Value of int type annotation. + * + * Generated from protobuf field int64 int_value = 1; + * @param int|string $var + * @return $this + */ + public function setIntValue($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Value of float type annotation. + * + * Generated from protobuf field float float_value = 2; + * @return float + */ + public function getFloatValue() + { + return $this->readOneof(2); + } + + public function hasFloatValue() + { + return $this->hasOneof(2); + } + + /** + * Value of float type annotation. + * + * Generated from protobuf field float float_value = 2; + * @param float $var + * @return $this + */ + public function setFloatValue($var) + { + GPBUtil::checkFloat($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Value of string type annotation. + * + * Generated from protobuf field string str_value = 3; + * @return string + */ + public function getStrValue() + { + return $this->readOneof(3); + } + + public function hasStrValue() + { + return $this->hasOneof(3); + } + + /** + * Value of string type annotation. + * + * Generated from protobuf field string str_value = 3; + * @param string $var + * @return $this + */ + public function setStrValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Value of date time type annotation. + * + * Generated from protobuf field string datetime_value = 5; + * @return string + */ + public function getDatetimeValue() + { + return $this->readOneof(5); + } + + public function hasDatetimeValue() + { + return $this->hasOneof(5); + } + + /** + * Value of date time type annotation. + * + * Generated from protobuf field string datetime_value = 5; + * @param string $var + * @return $this + */ + public function setDatetimeValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Value of geo coordinate type annotation. + * + * Generated from protobuf field .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7; + * @return \Google\Cloud\VisionAI\V1\GeoCoordinate|null + */ + public function getGeoCoordinate() + { + return $this->readOneof(7); + } + + public function hasGeoCoordinate() + { + return $this->hasOneof(7); + } + + /** + * Value of geo coordinate type annotation. + * + * Generated from protobuf field .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7; + * @param \Google\Cloud\VisionAI\V1\GeoCoordinate $var + * @return $this + */ + public function setGeoCoordinate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\GeoCoordinate::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Value of any proto value. + * + * Generated from protobuf field .google.protobuf.Any proto_any_value = 8; + * @return \Google\Protobuf\Any|null + */ + public function getProtoAnyValue() + { + return $this->readOneof(8); + } + + public function hasProtoAnyValue() + { + return $this->hasOneof(8); + } + + /** + * Value of any proto value. + * + * Generated from protobuf field .google.protobuf.Any proto_any_value = 8; + * @param \Google\Protobuf\Any $var + * @return $this + */ + public function setProtoAnyValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * Value of boolean type annotation. + * + * Generated from protobuf field bool bool_value = 9; + * @return bool + */ + public function getBoolValue() + { + return $this->readOneof(9); + } + + public function hasBoolValue() + { + return $this->hasOneof(9); + } + + /** + * Value of boolean type annotation. + * + * Generated from protobuf field bool bool_value = 9; + * @param bool $var + * @return $this + */ + public function setBoolValue($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Value of customized struct annotation. This field does not have effects. + * Use customized_struct_value instead for customized struct annotation. + * + * Generated from protobuf field .google.protobuf.Struct customized_struct_data_value = 10; + * @return \Google\Protobuf\Struct|null + */ + public function getCustomizedStructDataValue() + { + return $this->readOneof(10); + } + + public function hasCustomizedStructDataValue() + { + return $this->hasOneof(10); + } + + /** + * Value of customized struct annotation. This field does not have effects. + * Use customized_struct_value instead for customized struct annotation. + * + * Generated from protobuf field .google.protobuf.Struct customized_struct_data_value = 10; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setCustomizedStructDataValue($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Value of list type annotation. + * + * Generated from protobuf field .google.cloud.visionai.v1.AnnotationList list_value = 11; + * @return \Google\Cloud\VisionAI\V1\AnnotationList|null + */ + public function getListValue() + { + return $this->readOneof(11); + } + + public function hasListValue() + { + return $this->hasOneof(11); + } + + /** + * Value of list type annotation. + * + * Generated from protobuf field .google.cloud.visionai.v1.AnnotationList list_value = 11; + * @param \Google\Cloud\VisionAI\V1\AnnotationList $var + * @return $this + */ + public function setListValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AnnotationList::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Value of custom struct type annotation. + * + * Generated from protobuf field .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6; + * @return \Google\Cloud\VisionAI\V1\AnnotationCustomizedStruct|null + */ + public function getCustomizedStructValue() + { + return $this->readOneof(6); + } + + public function hasCustomizedStructValue() + { + return $this->hasOneof(6); + } + + /** + * Value of custom struct type annotation. + * + * Generated from protobuf field .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6; + * @param \Google\Cloud\VisionAI\V1\AnnotationCustomizedStruct $var + * @return $this + */ + public function setCustomizedStructValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AnnotationCustomizedStruct::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionRequest.php new file mode 100644 index 000000000000..811c6ee8e423 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionRequest.php @@ -0,0 +1,118 @@ +google.cloud.visionai.v1.AppPlatformCloudFunctionRequest + */ +class AppPlatformCloudFunctionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The metadata of the AppPlatform for customer to identify the source of the + * payload. + * + * Generated from protobuf field .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; + */ + protected $app_platform_metadata = null; + /** + * The actual annotations to be processed by the customized Cloud Function. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + */ + private $annotations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\AppPlatformMetadata $app_platform_metadata + * The metadata of the AppPlatform for customer to identify the source of the + * payload. + * @type \Google\Cloud\VisionAI\V1\AppPlatformCloudFunctionRequest\StructedInputAnnotation[] $annotations + * The actual annotations to be processed by the customized Cloud Function. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * The metadata of the AppPlatform for customer to identify the source of the + * payload. + * + * Generated from protobuf field .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; + * @return \Google\Cloud\VisionAI\V1\AppPlatformMetadata|null + */ + public function getAppPlatformMetadata() + { + return $this->app_platform_metadata; + } + + public function hasAppPlatformMetadata() + { + return isset($this->app_platform_metadata); + } + + public function clearAppPlatformMetadata() + { + unset($this->app_platform_metadata); + } + + /** + * The metadata of the AppPlatform for customer to identify the source of the + * payload. + * + * Generated from protobuf field .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; + * @param \Google\Cloud\VisionAI\V1\AppPlatformMetadata $var + * @return $this + */ + public function setAppPlatformMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AppPlatformMetadata::class); + $this->app_platform_metadata = $var; + + return $this; + } + + /** + * The actual annotations to be processed by the customized Cloud Function. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\AppPlatformCloudFunctionRequest\StructedInputAnnotation> + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * The actual annotations to be processed by the customized Cloud Function. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; + * @param \Google\Cloud\VisionAI\V1\AppPlatformCloudFunctionRequest\StructedInputAnnotation[] $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AppPlatformCloudFunctionRequest\StructedInputAnnotation::class); + $this->annotations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionRequest/StructedInputAnnotation.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionRequest/StructedInputAnnotation.php new file mode 100644 index 000000000000..6ea53794ec49 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionRequest/StructedInputAnnotation.php @@ -0,0 +1,112 @@ +google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation + */ +class StructedInputAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * The ingestion time of the current annotation. + * + * Generated from protobuf field int64 ingestion_time_micros = 1; + */ + protected $ingestion_time_micros = 0; + /** + * The struct format of the actual annotation. + * + * Generated from protobuf field .google.protobuf.Struct annotation = 2; + */ + protected $annotation = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $ingestion_time_micros + * The ingestion time of the current annotation. + * @type \Google\Protobuf\Struct $annotation + * The struct format of the actual annotation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * The ingestion time of the current annotation. + * + * Generated from protobuf field int64 ingestion_time_micros = 1; + * @return int|string + */ + public function getIngestionTimeMicros() + { + return $this->ingestion_time_micros; + } + + /** + * The ingestion time of the current annotation. + * + * Generated from protobuf field int64 ingestion_time_micros = 1; + * @param int|string $var + * @return $this + */ + public function setIngestionTimeMicros($var) + { + GPBUtil::checkInt64($var); + $this->ingestion_time_micros = $var; + + return $this; + } + + /** + * The struct format of the actual annotation. + * + * Generated from protobuf field .google.protobuf.Struct annotation = 2; + * @return \Google\Protobuf\Struct|null + */ + public function getAnnotation() + { + return $this->annotation; + } + + public function hasAnnotation() + { + return isset($this->annotation); + } + + public function clearAnnotation() + { + unset($this->annotation); + } + + /** + * The struct format of the actual annotation. + * + * Generated from protobuf field .google.protobuf.Struct annotation = 2; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setAnnotation($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->annotation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionResponse.php new file mode 100644 index 000000000000..708fa510121f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionResponse.php @@ -0,0 +1,155 @@ +google.cloud.visionai.v1.AppPlatformCloudFunctionResponse + */ +class AppPlatformCloudFunctionResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The modified annotations that is returned back to AppPlatform. + * If the annotations fields are empty, then those annotations will be dropped + * by AppPlatform. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + */ + private $annotations; + /** + * If set to true, AppPlatform will use original annotations instead of + * dropping them, even if it is empty in the annotations filed. + * + * Generated from protobuf field bool annotation_passthrough = 3; + */ + protected $annotation_passthrough = false; + /** + * The event notifications that is returned back to AppPlatform. Typically it + * will then be configured to be consumed/forwared to a operator that handles + * events, such as Pub/Sub operator. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + */ + private $events; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\AppPlatformCloudFunctionResponse\StructedOutputAnnotation[] $annotations + * The modified annotations that is returned back to AppPlatform. + * If the annotations fields are empty, then those annotations will be dropped + * by AppPlatform. + * @type bool $annotation_passthrough + * If set to true, AppPlatform will use original annotations instead of + * dropping them, even if it is empty in the annotations filed. + * @type \Google\Cloud\VisionAI\V1\AppPlatformEventBody[] $events + * The event notifications that is returned back to AppPlatform. Typically it + * will then be configured to be consumed/forwared to a operator that handles + * events, such as Pub/Sub operator. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * The modified annotations that is returned back to AppPlatform. + * If the annotations fields are empty, then those annotations will be dropped + * by AppPlatform. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\AppPlatformCloudFunctionResponse\StructedOutputAnnotation> + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * The modified annotations that is returned back to AppPlatform. + * If the annotations fields are empty, then those annotations will be dropped + * by AppPlatform. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; + * @param \Google\Cloud\VisionAI\V1\AppPlatformCloudFunctionResponse\StructedOutputAnnotation[] $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AppPlatformCloudFunctionResponse\StructedOutputAnnotation::class); + $this->annotations = $arr; + + return $this; + } + + /** + * If set to true, AppPlatform will use original annotations instead of + * dropping them, even if it is empty in the annotations filed. + * + * Generated from protobuf field bool annotation_passthrough = 3; + * @return bool + */ + public function getAnnotationPassthrough() + { + return $this->annotation_passthrough; + } + + /** + * If set to true, AppPlatform will use original annotations instead of + * dropping them, even if it is empty in the annotations filed. + * + * Generated from protobuf field bool annotation_passthrough = 3; + * @param bool $var + * @return $this + */ + public function setAnnotationPassthrough($var) + { + GPBUtil::checkBool($var); + $this->annotation_passthrough = $var; + + return $this; + } + + /** + * The event notifications that is returned back to AppPlatform. Typically it + * will then be configured to be consumed/forwared to a operator that handles + * events, such as Pub/Sub operator. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\AppPlatformEventBody> + */ + public function getEvents() + { + return $this->events; + } + + /** + * The event notifications that is returned back to AppPlatform. Typically it + * will then be configured to be consumed/forwared to a operator that handles + * events, such as Pub/Sub operator. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; + * @param \Google\Cloud\VisionAI\V1\AppPlatformEventBody[] $var + * @return $this + */ + public function setEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AppPlatformEventBody::class); + $this->events = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionResponse/StructedOutputAnnotation.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionResponse/StructedOutputAnnotation.php new file mode 100644 index 000000000000..b5a253b17c1e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionResponse/StructedOutputAnnotation.php @@ -0,0 +1,78 @@ +google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation + */ +class StructedOutputAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * The struct format of the actual annotation. + * + * Generated from protobuf field .google.protobuf.Struct annotation = 1; + */ + protected $annotation = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Struct $annotation + * The struct format of the actual annotation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * The struct format of the actual annotation. + * + * Generated from protobuf field .google.protobuf.Struct annotation = 1; + * @return \Google\Protobuf\Struct|null + */ + public function getAnnotation() + { + return $this->annotation; + } + + public function hasAnnotation() + { + return isset($this->annotation); + } + + public function clearAnnotation() + { + unset($this->annotation); + } + + /** + * The struct format of the actual annotation. + * + * Generated from protobuf field .google.protobuf.Struct annotation = 1; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setAnnotation($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->annotation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformEventBody.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformEventBody.php new file mode 100644 index 000000000000..0af6c3690231 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformEventBody.php @@ -0,0 +1,165 @@ +google.cloud.visionai.v1.AppPlatformEventBody + */ +class AppPlatformEventBody extends \Google\Protobuf\Internal\Message +{ + /** + * Human readable string of the event like "There are more than 6 people in + * the scene". or "Shelf is empty!". + * + * Generated from protobuf field string event_message = 1; + */ + protected $event_message = ''; + /** + * For the case of Pub/Sub, it will be stored in the message attributes. + * ​​pubsub.proto + * + * Generated from protobuf field .google.protobuf.Struct payload = 2; + */ + protected $payload = null; + /** + * User defined Event Id, used to classify event, within a delivery interval, + * events from the same application instance with the same id will be + * de-duplicated & only first one will be sent out. Empty event_id will be + * treated as "". + * + * Generated from protobuf field string event_id = 3; + */ + protected $event_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $event_message + * Human readable string of the event like "There are more than 6 people in + * the scene". or "Shelf is empty!". + * @type \Google\Protobuf\Struct $payload + * For the case of Pub/Sub, it will be stored in the message attributes. + * ​​pubsub.proto + * @type string $event_id + * User defined Event Id, used to classify event, within a delivery interval, + * events from the same application instance with the same id will be + * de-duplicated & only first one will be sent out. Empty event_id will be + * treated as "". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * Human readable string of the event like "There are more than 6 people in + * the scene". or "Shelf is empty!". + * + * Generated from protobuf field string event_message = 1; + * @return string + */ + public function getEventMessage() + { + return $this->event_message; + } + + /** + * Human readable string of the event like "There are more than 6 people in + * the scene". or "Shelf is empty!". + * + * Generated from protobuf field string event_message = 1; + * @param string $var + * @return $this + */ + public function setEventMessage($var) + { + GPBUtil::checkString($var, True); + $this->event_message = $var; + + return $this; + } + + /** + * For the case of Pub/Sub, it will be stored in the message attributes. + * ​​pubsub.proto + * + * Generated from protobuf field .google.protobuf.Struct payload = 2; + * @return \Google\Protobuf\Struct|null + */ + public function getPayload() + { + return $this->payload; + } + + public function hasPayload() + { + return isset($this->payload); + } + + public function clearPayload() + { + unset($this->payload); + } + + /** + * For the case of Pub/Sub, it will be stored in the message attributes. + * ​​pubsub.proto + * + * Generated from protobuf field .google.protobuf.Struct payload = 2; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->payload = $var; + + return $this; + } + + /** + * User defined Event Id, used to classify event, within a delivery interval, + * events from the same application instance with the same id will be + * de-duplicated & only first one will be sent out. Empty event_id will be + * treated as "". + * + * Generated from protobuf field string event_id = 3; + * @return string + */ + public function getEventId() + { + return $this->event_id; + } + + /** + * User defined Event Id, used to classify event, within a delivery interval, + * events from the same application instance with the same id will be + * de-duplicated & only first one will be sent out. Empty event_id will be + * treated as "". + * + * Generated from protobuf field string event_id = 3; + * @param string $var + * @return $this + */ + public function setEventId($var) + { + GPBUtil::checkString($var, True); + $this->event_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformMetadata.php new file mode 100644 index 000000000000..6443fea5a72c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformMetadata.php @@ -0,0 +1,175 @@ +google.cloud.visionai.v1.AppPlatformMetadata + */ +class AppPlatformMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The application resource name. + * + * Generated from protobuf field string application = 1; + */ + protected $application = ''; + /** + * The instance resource id. Instance is the nested resource of application + * under collection 'instances'. + * + * Generated from protobuf field string instance_id = 2; + */ + protected $instance_id = ''; + /** + * The node name of the application graph. + * + * Generated from protobuf field string node = 3; + */ + protected $node = ''; + /** + * The referred processor resource name of the application node. + * + * Generated from protobuf field string processor = 4; + */ + protected $processor = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $application + * The application resource name. + * @type string $instance_id + * The instance resource id. Instance is the nested resource of application + * under collection 'instances'. + * @type string $node + * The node name of the application graph. + * @type string $processor + * The referred processor resource name of the application node. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * The application resource name. + * + * Generated from protobuf field string application = 1; + * @return string + */ + public function getApplication() + { + return $this->application; + } + + /** + * The application resource name. + * + * Generated from protobuf field string application = 1; + * @param string $var + * @return $this + */ + public function setApplication($var) + { + GPBUtil::checkString($var, True); + $this->application = $var; + + return $this; + } + + /** + * The instance resource id. Instance is the nested resource of application + * under collection 'instances'. + * + * Generated from protobuf field string instance_id = 2; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * The instance resource id. Instance is the nested resource of application + * under collection 'instances'. + * + * Generated from protobuf field string instance_id = 2; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + + /** + * The node name of the application graph. + * + * Generated from protobuf field string node = 3; + * @return string + */ + public function getNode() + { + return $this->node; + } + + /** + * The node name of the application graph. + * + * Generated from protobuf field string node = 3; + * @param string $var + * @return $this + */ + public function setNode($var) + { + GPBUtil::checkString($var, True); + $this->node = $var; + + return $this; + } + + /** + * The referred processor resource name of the application node. + * + * Generated from protobuf field string processor = 4; + * @return string + */ + public function getProcessor() + { + return $this->processor; + } + + /** + * The referred processor resource name of the application node. + * + * Generated from protobuf field string processor = 4; + * @param string $var + * @return $this + */ + public function setProcessor($var) + { + GPBUtil::checkString($var, True); + $this->processor = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application.php new file mode 100644 index 000000000000..ad17c8e462b4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application.php @@ -0,0 +1,417 @@ +google.cloud.visionai.v1.Application + */ +class Application extends \Google\Protobuf\Internal\Message +{ + /** + * name of resource + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. [Output only] Create timestamp + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. [Output only] Update timestamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Required. A user friendly display name for the solution. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * A description for this application. + * + * Generated from protobuf field string description = 6; + */ + protected $description = ''; + /** + * Application graph configuration. + * + * Generated from protobuf field .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; + */ + protected $application_configs = null; + /** + * Output only. Application graph runtime info. Only exists when application + * state equals to DEPLOYED. + * + * Generated from protobuf field .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $runtime_info = null; + /** + * Output only. State of the application. + * + * Generated from protobuf field .google.cloud.visionai.v1.Application.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Billing mode of the application. + * + * Generated from protobuf field .google.cloud.visionai.v1.Application.BillingMode billing_mode = 12; + */ + protected $billing_mode = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * name of resource + * @type \Google\Protobuf\Timestamp $create_time + * Output only. [Output only] Create timestamp + * @type \Google\Protobuf\Timestamp $update_time + * Output only. [Output only] Update timestamp + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs + * @type string $display_name + * Required. A user friendly display name for the solution. + * @type string $description + * A description for this application. + * @type \Google\Cloud\VisionAI\V1\ApplicationConfigs $application_configs + * Application graph configuration. + * @type \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo $runtime_info + * Output only. Application graph runtime info. Only exists when application + * state equals to DEPLOYED. + * @type int $state + * Output only. State of the application. + * @type int $billing_mode + * Billing mode of the application. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * name of resource + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * name of resource + * + * 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. [Output only] Create timestamp + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. [Output only] Create timestamp + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. [Output only] Update timestamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. [Output only] Update timestamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. A user friendly display name for the solution. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. A user friendly display name for the solution. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * A description for this application. + * + * Generated from protobuf field string description = 6; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A description for this application. + * + * Generated from protobuf field string description = 6; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Application graph configuration. + * + * Generated from protobuf field .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; + * @return \Google\Cloud\VisionAI\V1\ApplicationConfigs|null + */ + public function getApplicationConfigs() + { + return $this->application_configs; + } + + public function hasApplicationConfigs() + { + return isset($this->application_configs); + } + + public function clearApplicationConfigs() + { + unset($this->application_configs); + } + + /** + * Application graph configuration. + * + * Generated from protobuf field .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; + * @param \Google\Cloud\VisionAI\V1\ApplicationConfigs $var + * @return $this + */ + public function setApplicationConfigs($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ApplicationConfigs::class); + $this->application_configs = $var; + + return $this; + } + + /** + * Output only. Application graph runtime info. Only exists when application + * state equals to DEPLOYED. + * + * Generated from protobuf field .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo|null + */ + public function getRuntimeInfo() + { + return $this->runtime_info; + } + + public function hasRuntimeInfo() + { + return isset($this->runtime_info); + } + + public function clearRuntimeInfo() + { + unset($this->runtime_info); + } + + /** + * Output only. Application graph runtime info. Only exists when application + * state equals to DEPLOYED. + * + * Generated from protobuf field .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo $var + * @return $this + */ + public function setRuntimeInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo::class); + $this->runtime_info = $var; + + return $this; + } + + /** + * Output only. State of the application. + * + * Generated from protobuf field .google.cloud.visionai.v1.Application.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the application. + * + * Generated from protobuf field .google.cloud.visionai.v1.Application.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Application\State::class); + $this->state = $var; + + return $this; + } + + /** + * Billing mode of the application. + * + * Generated from protobuf field .google.cloud.visionai.v1.Application.BillingMode billing_mode = 12; + * @return int + */ + public function getBillingMode() + { + return $this->billing_mode; + } + + /** + * Billing mode of the application. + * + * Generated from protobuf field .google.cloud.visionai.v1.Application.BillingMode billing_mode = 12; + * @param int $var + * @return $this + */ + public function setBillingMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Application\BillingMode::class); + $this->billing_mode = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo.php new file mode 100644 index 000000000000..c17707846f72 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo.php @@ -0,0 +1,155 @@ +google.cloud.visionai.v1.Application.ApplicationRuntimeInfo + */ +class ApplicationRuntimeInfo extends \Google\Protobuf\Internal\Message +{ + /** + * Timestamp when the engine be deployed + * + * Generated from protobuf field .google.protobuf.Timestamp deploy_time = 1; + */ + protected $deploy_time = null; + /** + * Globally created resources like warehouse dataschemas. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + */ + private $global_output_resources; + /** + * Monitoring-related configuration for this application. + * + * Generated from protobuf field .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; + */ + protected $monitoring_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $deploy_time + * Timestamp when the engine be deployed + * @type \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo\GlobalOutputResource[] $global_output_resources + * Globally created resources like warehouse dataschemas. + * @type \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo\MonitoringConfig $monitoring_config + * Monitoring-related configuration for this application. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Timestamp when the engine be deployed + * + * Generated from protobuf field .google.protobuf.Timestamp deploy_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeployTime() + { + return $this->deploy_time; + } + + public function hasDeployTime() + { + return isset($this->deploy_time); + } + + public function clearDeployTime() + { + unset($this->deploy_time); + } + + /** + * Timestamp when the engine be deployed + * + * Generated from protobuf field .google.protobuf.Timestamp deploy_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeployTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->deploy_time = $var; + + return $this; + } + + /** + * Globally created resources like warehouse dataschemas. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo\GlobalOutputResource> + */ + public function getGlobalOutputResources() + { + return $this->global_output_resources; + } + + /** + * Globally created resources like warehouse dataschemas. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; + * @param \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo\GlobalOutputResource[] $var + * @return $this + */ + public function setGlobalOutputResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo\GlobalOutputResource::class); + $this->global_output_resources = $arr; + + return $this; + } + + /** + * Monitoring-related configuration for this application. + * + * Generated from protobuf field .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; + * @return \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo\MonitoringConfig|null + */ + public function getMonitoringConfig() + { + return $this->monitoring_config; + } + + public function hasMonitoringConfig() + { + return isset($this->monitoring_config); + } + + public function clearMonitoringConfig() + { + unset($this->monitoring_config); + } + + /** + * Monitoring-related configuration for this application. + * + * Generated from protobuf field .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; + * @param \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo\MonitoringConfig $var + * @return $this + */ + public function setMonitoringConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo\MonitoringConfig::class); + $this->monitoring_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo/GlobalOutputResource.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo/GlobalOutputResource.php new file mode 100644 index 000000000000..2b661d1dc809 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo/GlobalOutputResource.php @@ -0,0 +1,159 @@ +google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource + */ +class GlobalOutputResource extends \Google\Protobuf\Internal\Message +{ + /** + * The full resource name of the outputted resources. + * + * Generated from protobuf field string output_resource = 1; + */ + protected $output_resource = ''; + /** + * The name of graph node who produces the output resource name. + * For example: + * output_resource: + * /projects/123/locations/us-central1/corpora/my-corpus/dataSchemas/my-schema + * producer_node: occupancy-count + * + * Generated from protobuf field string producer_node = 2; + */ + protected $producer_node = ''; + /** + * The key of the output resource, it has to be unique within the same + * producer node. One producer node can output several output resources, + * the key can be used to match corresponding output resources. + * + * Generated from protobuf field string key = 3; + */ + protected $key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $output_resource + * The full resource name of the outputted resources. + * @type string $producer_node + * The name of graph node who produces the output resource name. + * For example: + * output_resource: + * /projects/123/locations/us-central1/corpora/my-corpus/dataSchemas/my-schema + * producer_node: occupancy-count + * @type string $key + * The key of the output resource, it has to be unique within the same + * producer node. One producer node can output several output resources, + * the key can be used to match corresponding output resources. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * The full resource name of the outputted resources. + * + * Generated from protobuf field string output_resource = 1; + * @return string + */ + public function getOutputResource() + { + return $this->output_resource; + } + + /** + * The full resource name of the outputted resources. + * + * Generated from protobuf field string output_resource = 1; + * @param string $var + * @return $this + */ + public function setOutputResource($var) + { + GPBUtil::checkString($var, True); + $this->output_resource = $var; + + return $this; + } + + /** + * The name of graph node who produces the output resource name. + * For example: + * output_resource: + * /projects/123/locations/us-central1/corpora/my-corpus/dataSchemas/my-schema + * producer_node: occupancy-count + * + * Generated from protobuf field string producer_node = 2; + * @return string + */ + public function getProducerNode() + { + return $this->producer_node; + } + + /** + * The name of graph node who produces the output resource name. + * For example: + * output_resource: + * /projects/123/locations/us-central1/corpora/my-corpus/dataSchemas/my-schema + * producer_node: occupancy-count + * + * Generated from protobuf field string producer_node = 2; + * @param string $var + * @return $this + */ + public function setProducerNode($var) + { + GPBUtil::checkString($var, True); + $this->producer_node = $var; + + return $this; + } + + /** + * The key of the output resource, it has to be unique within the same + * producer node. One producer node can output several output resources, + * the key can be used to match corresponding output resources. + * + * Generated from protobuf field string key = 3; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * The key of the output resource, it has to be unique within the same + * producer node. One producer node can output several output resources, + * the key can be used to match corresponding output resources. + * + * Generated from protobuf field string key = 3; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo/MonitoringConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo/MonitoringConfig.php new file mode 100644 index 000000000000..908b01893eac --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo/MonitoringConfig.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig + */ +class MonitoringConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Whether this application has monitoring enabled. + * + * Generated from protobuf field bool enabled = 1; + */ + protected $enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enabled + * Whether this application has monitoring enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Whether this application has monitoring enabled. + * + * Generated from protobuf field bool enabled = 1; + * @return bool + */ + public function getEnabled() + { + return $this->enabled; + } + + /** + * Whether this application has monitoring enabled. + * + * Generated from protobuf field bool enabled = 1; + * @param bool $var + * @return $this + */ + public function setEnabled($var) + { + GPBUtil::checkBool($var); + $this->enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/BillingMode.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/BillingMode.php new file mode 100644 index 000000000000..6955a560a80f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/BillingMode.php @@ -0,0 +1,61 @@ +google.cloud.visionai.v1.Application.BillingMode + */ +class BillingMode +{ + /** + * The default value. + * + * Generated from protobuf enum BILLING_MODE_UNSPECIFIED = 0; + */ + const BILLING_MODE_UNSPECIFIED = 0; + /** + * Pay as you go billing mode. + * + * Generated from protobuf enum PAYG = 1; + */ + const PAYG = 1; + /** + * Monthly billing mode. + * + * Generated from protobuf enum MONTHLY = 2; + */ + const MONTHLY = 2; + + private static $valueToName = [ + self::BILLING_MODE_UNSPECIFIED => 'BILLING_MODE_UNSPECIFIED', + self::PAYG => 'PAYG', + self::MONTHLY => 'MONTHLY', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/State.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/State.php new file mode 100644 index 000000000000..137b8cd5064a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/State.php @@ -0,0 +1,117 @@ +google.cloud.visionai.v1.Application.State + */ +class State +{ + /** + * The default value. This value is used if the state is omitted. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * State CREATED. + * + * Generated from protobuf enum CREATED = 1; + */ + const CREATED = 1; + /** + * State DEPLOYING. + * + * Generated from protobuf enum DEPLOYING = 2; + */ + const DEPLOYING = 2; + /** + * State DEPLOYED. + * + * Generated from protobuf enum DEPLOYED = 3; + */ + const DEPLOYED = 3; + /** + * State UNDEPLOYING. + * + * Generated from protobuf enum UNDEPLOYING = 4; + */ + const UNDEPLOYING = 4; + /** + * State DELETED. + * + * Generated from protobuf enum DELETED = 5; + */ + const DELETED = 5; + /** + * State ERROR. + * + * Generated from protobuf enum ERROR = 6; + */ + const ERROR = 6; + /** + * State CREATING. + * + * Generated from protobuf enum CREATING = 7; + */ + const CREATING = 7; + /** + * State Updating. + * + * Generated from protobuf enum UPDATING = 8; + */ + const UPDATING = 8; + /** + * State Deleting. + * + * Generated from protobuf enum DELETING = 9; + */ + const DELETING = 9; + /** + * State Fixing. + * + * Generated from protobuf enum FIXING = 10; + */ + const FIXING = 10; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATED => 'CREATED', + self::DEPLOYING => 'DEPLOYING', + self::DEPLOYED => 'DEPLOYED', + self::UNDEPLOYING => 'UNDEPLOYING', + self::DELETED => 'DELETED', + self::ERROR => 'ERROR', + self::CREATING => 'CREATING', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + self::FIXING => 'FIXING', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationConfigs.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationConfigs.php new file mode 100644 index 000000000000..1e1abc340163 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationConfigs.php @@ -0,0 +1,111 @@ +google.cloud.visionai.v1.ApplicationConfigs + */ +class ApplicationConfigs extends \Google\Protobuf\Internal\Message +{ + /** + * A list of nodes in the application graph. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Node nodes = 1; + */ + private $nodes; + /** + * Event-related configuration for this application. + * + * Generated from protobuf field .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; + */ + protected $event_delivery_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Node[] $nodes + * A list of nodes in the application graph. + * @type \Google\Cloud\VisionAI\V1\ApplicationConfigs\EventDeliveryConfig $event_delivery_config + * Event-related configuration for this application. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * A list of nodes in the application graph. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Node nodes = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Node> + */ + public function getNodes() + { + return $this->nodes; + } + + /** + * A list of nodes in the application graph. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Node nodes = 1; + * @param \Google\Cloud\VisionAI\V1\Node[] $var + * @return $this + */ + public function setNodes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Node::class); + $this->nodes = $arr; + + return $this; + } + + /** + * Event-related configuration for this application. + * + * Generated from protobuf field .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; + * @return \Google\Cloud\VisionAI\V1\ApplicationConfigs\EventDeliveryConfig|null + */ + public function getEventDeliveryConfig() + { + return $this->event_delivery_config; + } + + public function hasEventDeliveryConfig() + { + return isset($this->event_delivery_config); + } + + public function clearEventDeliveryConfig() + { + unset($this->event_delivery_config); + } + + /** + * Event-related configuration for this application. + * + * Generated from protobuf field .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; + * @param \Google\Cloud\VisionAI\V1\ApplicationConfigs\EventDeliveryConfig $var + * @return $this + */ + public function setEventDeliveryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ApplicationConfigs\EventDeliveryConfig::class); + $this->event_delivery_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationConfigs/EventDeliveryConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationConfigs/EventDeliveryConfig.php new file mode 100644 index 000000000000..019a71704b1a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationConfigs/EventDeliveryConfig.php @@ -0,0 +1,135 @@ +google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig + */ +class EventDeliveryConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The delivery channel for the event notification, only pub/sub topic is + * supported now. + * Example channel: + * [//pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic] + * + * Generated from protobuf field string channel = 1; + */ + protected $channel = ''; + /** + * The expected delivery interval for the same event. The same event won't + * be notified multiple times during this internal event that it is + * happening multiple times during the period of time.The same event is + * identified by . + * + * Generated from protobuf field .google.protobuf.Duration minimal_delivery_interval = 2; + */ + protected $minimal_delivery_interval = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $channel + * The delivery channel for the event notification, only pub/sub topic is + * supported now. + * Example channel: + * [//pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic] + * @type \Google\Protobuf\Duration $minimal_delivery_interval + * The expected delivery interval for the same event. The same event won't + * be notified multiple times during this internal event that it is + * happening multiple times during the period of time.The same event is + * identified by . + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * The delivery channel for the event notification, only pub/sub topic is + * supported now. + * Example channel: + * [//pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic] + * + * Generated from protobuf field string channel = 1; + * @return string + */ + public function getChannel() + { + return $this->channel; + } + + /** + * The delivery channel for the event notification, only pub/sub topic is + * supported now. + * Example channel: + * [//pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic] + * + * Generated from protobuf field string channel = 1; + * @param string $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkString($var, True); + $this->channel = $var; + + return $this; + } + + /** + * The expected delivery interval for the same event. The same event won't + * be notified multiple times during this internal event that it is + * happening multiple times during the period of time.The same event is + * identified by . + * + * Generated from protobuf field .google.protobuf.Duration minimal_delivery_interval = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getMinimalDeliveryInterval() + { + return $this->minimal_delivery_interval; + } + + public function hasMinimalDeliveryInterval() + { + return isset($this->minimal_delivery_interval); + } + + public function clearMinimalDeliveryInterval() + { + unset($this->minimal_delivery_interval); + } + + /** + * The expected delivery interval for the same event. The same event won't + * be notified multiple times during this internal event that it is + * happening multiple times during the period of time.The same event is + * identified by . + * + * Generated from protobuf field .google.protobuf.Duration minimal_delivery_interval = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setMinimalDeliveryInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->minimal_delivery_interval = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationInstance.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationInstance.php new file mode 100644 index 000000000000..9662ccf00eca --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationInstance.php @@ -0,0 +1,111 @@ +google.cloud.visionai.v1.ApplicationInstance + */ +class ApplicationInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string instance_id = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $instance_id + * Required. Id of the requesting object. + * @type \Google\Cloud\VisionAI\V1\Instance $instance + * Required. The resource being created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string instance_id = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string instance_id = 1 [(.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 resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Instance::class); + $this->instance = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationNodeAnnotation.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationNodeAnnotation.php new file mode 100644 index 000000000000..d9e87e7c59f7 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationNodeAnnotation.php @@ -0,0 +1,102 @@ +google.cloud.visionai.v1.ApplicationNodeAnnotation + */ +class ApplicationNodeAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * The node name of the application graph. + * + * Generated from protobuf field string node = 1; + */ + protected $node = ''; + /** + * The node specific stream annotations. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + private $annotations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $node + * The node name of the application graph. + * @type \Google\Cloud\VisionAI\V1\StreamAnnotation[] $annotations + * The node specific stream annotations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * The node name of the application graph. + * + * Generated from protobuf field string node = 1; + * @return string + */ + public function getNode() + { + return $this->node; + } + + /** + * The node name of the application graph. + * + * Generated from protobuf field string node = 1; + * @param string $var + * @return $this + */ + public function setNode($var) + { + GPBUtil::checkString($var, True); + $this->node = $var; + + return $this; + } + + /** + * The node specific stream annotations. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\StreamAnnotation> + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * The node specific stream annotations. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + * @param \Google\Cloud\VisionAI\V1\StreamAnnotation[] $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\StreamAnnotation::class); + $this->annotations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationStreamInput.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationStreamInput.php new file mode 100644 index 000000000000..4488f0565444 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationStreamInput.php @@ -0,0 +1,70 @@ +google.cloud.visionai.v1.ApplicationStreamInput + */ +class ApplicationStreamInput extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; + */ + protected $stream_with_annotation = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\StreamWithAnnotation $stream_with_annotation + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; + * @return \Google\Cloud\VisionAI\V1\StreamWithAnnotation|null + */ + public function getStreamWithAnnotation() + { + return $this->stream_with_annotation; + } + + public function hasStreamWithAnnotation() + { + return isset($this->stream_with_annotation); + } + + public function clearStreamWithAnnotation() + { + unset($this->stream_with_annotation); + } + + /** + * Generated from protobuf field .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; + * @param \Google\Cloud\VisionAI\V1\StreamWithAnnotation $var + * @return $this + */ + public function setStreamWithAnnotation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\StreamWithAnnotation::class); + $this->stream_with_annotation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Asset.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Asset.php new file mode 100644 index 000000000000..c633444e6803 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Asset.php @@ -0,0 +1,178 @@ +google.cloud.visionai.v1.Asset + */ +class Asset extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the asset. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The duration for which all media assets, associated metadata, and search + * documents can exist. If not set, then it will using the default ttl in the + * parent corpus resource. + * + * Generated from protobuf field .google.protobuf.Duration ttl = 2; + */ + protected $ttl = null; + /** + * Output only. The original cloud storage source uri that is associated with + * this asset. + * + * Generated from protobuf field .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $asset_gcs_source = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the asset. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * @type \Google\Protobuf\Duration $ttl + * The duration for which all media assets, associated metadata, and search + * documents can exist. If not set, then it will using the default ttl in the + * parent corpus resource. + * @type \Google\Cloud\VisionAI\V1\AssetSource\AssetGcsSource $asset_gcs_source + * Output only. The original cloud storage source uri that is associated with + * this asset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the asset. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the asset. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * 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 duration for which all media assets, associated metadata, and search + * documents can exist. If not set, then it will using the default ttl in the + * parent corpus resource. + * + * Generated from protobuf field .google.protobuf.Duration ttl = 2; + * @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 duration for which all media assets, associated metadata, and search + * documents can exist. If not set, then it will using the default ttl in the + * parent corpus resource. + * + * Generated from protobuf field .google.protobuf.Duration ttl = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->ttl = $var; + + return $this; + } + + /** + * Output only. The original cloud storage source uri that is associated with + * this asset. + * + * Generated from protobuf field .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VisionAI\V1\AssetSource\AssetGcsSource|null + */ + public function getAssetGcsSource() + { + return $this->asset_gcs_source; + } + + public function hasAssetGcsSource() + { + return isset($this->asset_gcs_source); + } + + public function clearAssetGcsSource() + { + unset($this->asset_gcs_source); + } + + /** + * Output only. The original cloud storage source uri that is associated with + * this asset. + * + * Generated from protobuf field .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VisionAI\V1\AssetSource\AssetGcsSource $var + * @return $this + */ + public function setAssetGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AssetSource\AssetGcsSource::class); + $this->asset_gcs_source = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource.php new file mode 100644 index 000000000000..ead441f9b1fe --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource.php @@ -0,0 +1,108 @@ +google.cloud.visionai.v1.AssetSource + */ +class AssetSource extends \Google\Protobuf\Internal\Message +{ + protected $source_form; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\AssetSource\AssetGcsSource $asset_gcs_source + * The source of the asset is from Cloud Storage. + * @type \Google\Cloud\VisionAI\V1\AssetSource\AssetContentData $asset_content_data + * The source of the asset is from content bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The source of the asset is from Cloud Storage. + * + * Generated from protobuf field .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 1; + * @return \Google\Cloud\VisionAI\V1\AssetSource\AssetGcsSource|null + */ + public function getAssetGcsSource() + { + return $this->readOneof(1); + } + + public function hasAssetGcsSource() + { + return $this->hasOneof(1); + } + + /** + * The source of the asset is from Cloud Storage. + * + * Generated from protobuf field .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 1; + * @param \Google\Cloud\VisionAI\V1\AssetSource\AssetGcsSource $var + * @return $this + */ + public function setAssetGcsSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AssetSource\AssetGcsSource::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The source of the asset is from content bytes. + * + * Generated from protobuf field .google.cloud.visionai.v1.AssetSource.AssetContentData asset_content_data = 2; + * @return \Google\Cloud\VisionAI\V1\AssetSource\AssetContentData|null + */ + public function getAssetContentData() + { + return $this->readOneof(2); + } + + public function hasAssetContentData() + { + return $this->hasOneof(2); + } + + /** + * The source of the asset is from content bytes. + * + * Generated from protobuf field .google.cloud.visionai.v1.AssetSource.AssetContentData asset_content_data = 2; + * @param \Google\Cloud\VisionAI\V1\AssetSource\AssetContentData $var + * @return $this + */ + public function setAssetContentData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AssetSource\AssetContentData::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getSourceForm() + { + return $this->whichOneof("source_form"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource/AssetContentData.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource/AssetContentData.php new file mode 100644 index 000000000000..04cb10d6dd7e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource/AssetContentData.php @@ -0,0 +1,60 @@ +google.cloud.visionai.v1.AssetSource.AssetContentData + */ +class AssetContentData extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bytes asset_content_data = 1; + */ + protected $asset_content_data = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $asset_content_data + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bytes asset_content_data = 1; + * @return string + */ + public function getAssetContentData() + { + return $this->asset_content_data; + } + + /** + * Generated from protobuf field bytes asset_content_data = 1; + * @param string $var + * @return $this + */ + public function setAssetContentData($var) + { + GPBUtil::checkString($var, False); + $this->asset_content_data = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource/AssetGcsSource.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource/AssetGcsSource.php new file mode 100644 index 000000000000..ec9549782712 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource/AssetGcsSource.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.AssetSource.AssetGcsSource + */ +class AssetGcsSource extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud storage uri. + * + * Generated from protobuf field string gcs_uri = 1; + */ + protected $gcs_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_uri + * Cloud storage uri. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Cloud storage uri. + * + * Generated from protobuf field string gcs_uri = 1; + * @return string + */ + public function getGcsUri() + { + return $this->gcs_uri; + } + + /** + * Cloud storage uri. + * + * Generated from protobuf field string gcs_uri = 1; + * @param string $var + * @return $this + */ + public function setGcsUri($var) + { + GPBUtil::checkString($var, True); + $this->gcs_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AttributeValue.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AttributeValue.php new file mode 100644 index 000000000000..4d61beaa1eb8 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AttributeValue.php @@ -0,0 +1,174 @@ +google.cloud.visionai.v1.AttributeValue + */ +class AttributeValue extends \Google\Protobuf\Internal\Message +{ + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $i + * int. + * @type float $f + * float. + * @type bool $b + * bool. + * @type string $s + * string. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); + parent::__construct($data); + } + + /** + * int. + * + * Generated from protobuf field int64 i = 1; + * @return int|string + */ + public function getI() + { + return $this->readOneof(1); + } + + public function hasI() + { + return $this->hasOneof(1); + } + + /** + * int. + * + * Generated from protobuf field int64 i = 1; + * @param int|string $var + * @return $this + */ + public function setI($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * float. + * + * Generated from protobuf field float f = 2; + * @return float + */ + public function getF() + { + return $this->readOneof(2); + } + + public function hasF() + { + return $this->hasOneof(2); + } + + /** + * float. + * + * Generated from protobuf field float f = 2; + * @param float $var + * @return $this + */ + public function setF($var) + { + GPBUtil::checkFloat($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * bool. + * + * Generated from protobuf field bool b = 3; + * @return bool + */ + public function getB() + { + return $this->readOneof(3); + } + + public function hasB() + { + return $this->hasOneof(3); + } + + /** + * bool. + * + * Generated from protobuf field bool b = 3; + * @param bool $var + * @return $this + */ + public function setB($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * string. + * + * Generated from protobuf field bytes s = 4; + * @return string + */ + public function getS() + { + return $this->readOneof(4); + } + + public function hasS() + { + return $this->hasOneof(4); + } + + /** + * string. + * + * Generated from protobuf field bytes s = 4; + * @param string $var + * @return $this + */ + public function setS($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AutoscalingMetricSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AutoscalingMetricSpec.php new file mode 100644 index 000000000000..f523ada0e392 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AutoscalingMetricSpec.php @@ -0,0 +1,131 @@ +google.cloud.visionai.v1.AutoscalingMetricSpec + */ +class AutoscalingMetricSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource metric name. + * Supported metrics: + * * For Online Prediction: + * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` + * * `aiplatform.googleapis.com/prediction/online/cpu/utilization` + * + * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $metric_name = ''; + /** + * The target resource utilization in percentage (1% - 100%) for the given + * metric; once the real usage deviates from the target by a certain + * percentage, the machine replicas change. The default value is 60 + * (representing 60%) if not provided. + * + * Generated from protobuf field int32 target = 2; + */ + protected $target = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $metric_name + * Required. The resource metric name. + * Supported metrics: + * * For Online Prediction: + * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` + * * `aiplatform.googleapis.com/prediction/online/cpu/utilization` + * @type int $target + * The target resource utilization in percentage (1% - 100%) for the given + * metric; once the real usage deviates from the target by a certain + * percentage, the machine replicas change. The default value is 60 + * (representing 60%) if not provided. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource metric name. + * Supported metrics: + * * For Online Prediction: + * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` + * * `aiplatform.googleapis.com/prediction/online/cpu/utilization` + * + * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getMetricName() + { + return $this->metric_name; + } + + /** + * Required. The resource metric name. + * Supported metrics: + * * For Online Prediction: + * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` + * * `aiplatform.googleapis.com/prediction/online/cpu/utilization` + * + * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setMetricName($var) + { + GPBUtil::checkString($var, True); + $this->metric_name = $var; + + return $this; + } + + /** + * The target resource utilization in percentage (1% - 100%) for the given + * metric; once the real usage deviates from the target by a certain + * percentage, the machine replicas change. The default value is 60 + * (representing 60%) if not provided. + * + * Generated from protobuf field int32 target = 2; + * @return int + */ + public function getTarget() + { + return $this->target; + } + + /** + * The target resource utilization in percentage (1% - 100%) for the given + * metric; once the real usage deviates from the target by a certain + * percentage, the machine replicas change. The default value is 60 + * (representing 60%) if not provided. + * + * Generated from protobuf field int32 target = 2; + * @param int $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkInt32($var); + $this->target = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchOperationStatus.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchOperationStatus.php new file mode 100644 index 000000000000..0e6d7c04b9d0 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchOperationStatus.php @@ -0,0 +1,109 @@ +google.cloud.visionai.v1.BatchOperationStatus + */ +class BatchOperationStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The count of assets (together with their annotations if any) successfully + * ingested. + * + * Generated from protobuf field int32 success_count = 1; + */ + protected $success_count = 0; + /** + * The count of assets failed to ingested; it might be due to the annotation + * ingestion error. + * + * Generated from protobuf field int32 failure_count = 2; + */ + protected $failure_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $success_count + * The count of assets (together with their annotations if any) successfully + * ingested. + * @type int $failure_count + * The count of assets failed to ingested; it might be due to the annotation + * ingestion error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The count of assets (together with their annotations if any) successfully + * ingested. + * + * Generated from protobuf field int32 success_count = 1; + * @return int + */ + public function getSuccessCount() + { + return $this->success_count; + } + + /** + * The count of assets (together with their annotations if any) successfully + * ingested. + * + * Generated from protobuf field int32 success_count = 1; + * @param int $var + * @return $this + */ + public function setSuccessCount($var) + { + GPBUtil::checkInt32($var); + $this->success_count = $var; + + return $this; + } + + /** + * The count of assets failed to ingested; it might be due to the annotation + * ingestion error. + * + * Generated from protobuf field int32 failure_count = 2; + * @return int + */ + public function getFailureCount() + { + return $this->failure_count; + } + + /** + * The count of assets failed to ingested; it might be due to the annotation + * ingestion error. + * + * Generated from protobuf field int32 failure_count = 2; + * @param int $var + * @return $this + */ + public function setFailureCount($var) + { + GPBUtil::checkInt32($var); + $this->failure_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessRequest.php new file mode 100644 index 000000000000..148176bcc498 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessRequest.php @@ -0,0 +1,195 @@ +google.cloud.visionai.v1.BatchRunProcessRequest + */ +class BatchRunProcessRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource shared by all processes being created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The create process requests. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $requests; + /** + * Optional. Options for batch processes. + * + * Generated from protobuf field .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $options = null; + /** + * Output only. The batch ID. + * + * Generated from protobuf field string batch_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $batch_id = ''; + + /** + * @param string $parent Required. The parent resource shared by all processes being created. Please see + * {@see LiveVideoAnalyticsClient::clusterName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\CreateProcessRequest[] $requests Required. The create process requests. + * + * @return \Google\Cloud\VisionAI\V1\BatchRunProcessRequest + * + * @experimental + */ + public static function build(string $parent, array $requests): self + { + return (new self()) + ->setParent($parent) + ->setRequests($requests); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource shared by all processes being created. + * @type \Google\Cloud\VisionAI\V1\CreateProcessRequest[] $requests + * Required. The create process requests. + * @type \Google\Cloud\VisionAI\V1\BatchRunProcessRequest\BatchRunProcessOptions $options + * Optional. Options for batch processes. + * @type string $batch_id + * Output only. The batch ID. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource shared by all processes being created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource shared by all processes being created. + * + * 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 create process requests. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\CreateProcessRequest> + */ + public function getRequests() + { + return $this->requests; + } + + /** + * Required. The create process requests. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\CreateProcessRequest[] $var + * @return $this + */ + public function setRequests($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\CreateProcessRequest::class); + $this->requests = $arr; + + return $this; + } + + /** + * Optional. Options for batch processes. + * + * Generated from protobuf field .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VisionAI\V1\BatchRunProcessRequest\BatchRunProcessOptions|null + */ + public function getOptions() + { + return $this->options; + } + + public function hasOptions() + { + return isset($this->options); + } + + public function clearOptions() + { + unset($this->options); + } + + /** + * Optional. Options for batch processes. + * + * Generated from protobuf field .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VisionAI\V1\BatchRunProcessRequest\BatchRunProcessOptions $var + * @return $this + */ + public function setOptions($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\BatchRunProcessRequest\BatchRunProcessOptions::class); + $this->options = $var; + + return $this; + } + + /** + * Output only. The batch ID. + * + * Generated from protobuf field string batch_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getBatchId() + { + return $this->batch_id; + } + + /** + * Output only. The batch ID. + * + * Generated from protobuf field string batch_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setBatchId($var) + { + GPBUtil::checkString($var, True); + $this->batch_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessRequest/BatchRunProcessOptions.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessRequest/BatchRunProcessOptions.php new file mode 100644 index 000000000000..9415e0de4aa0 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessRequest/BatchRunProcessOptions.php @@ -0,0 +1,101 @@ +google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions + */ +class BatchRunProcessOptions extends \Google\Protobuf\Internal\Message +{ + /** + * The retry counts per process. Default: 3. + * + * Generated from protobuf field int32 retry_count = 1; + */ + protected $retry_count = 0; + /** + * The batch size. Default: 5, maximum: 100. + * + * Generated from protobuf field int32 batch_size = 2; + */ + protected $batch_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $retry_count + * The retry counts per process. Default: 3. + * @type int $batch_size + * The batch size. Default: 5, maximum: 100. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * The retry counts per process. Default: 3. + * + * Generated from protobuf field int32 retry_count = 1; + * @return int + */ + public function getRetryCount() + { + return $this->retry_count; + } + + /** + * The retry counts per process. Default: 3. + * + * Generated from protobuf field int32 retry_count = 1; + * @param int $var + * @return $this + */ + public function setRetryCount($var) + { + GPBUtil::checkInt32($var); + $this->retry_count = $var; + + return $this; + } + + /** + * The batch size. Default: 5, maximum: 100. + * + * Generated from protobuf field int32 batch_size = 2; + * @return int + */ + public function getBatchSize() + { + return $this->batch_size; + } + + /** + * The batch size. Default: 5, maximum: 100. + * + * Generated from protobuf field int32 batch_size = 2; + * @param int $var + * @return $this + */ + public function setBatchSize($var) + { + GPBUtil::checkInt32($var); + $this->batch_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessResponse.php new file mode 100644 index 000000000000..6f39d400932c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessResponse.php @@ -0,0 +1,101 @@ +google.cloud.visionai.v1.BatchRunProcessResponse + */ +class BatchRunProcessResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The batch ID. + * + * Generated from protobuf field string batch_id = 1; + */ + protected $batch_id = ''; + /** + * Processes created. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Process processes = 2; + */ + private $processes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $batch_id + * The batch ID. + * @type \Google\Cloud\VisionAI\V1\Process[] $processes + * Processes created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * The batch ID. + * + * Generated from protobuf field string batch_id = 1; + * @return string + */ + public function getBatchId() + { + return $this->batch_id; + } + + /** + * The batch ID. + * + * Generated from protobuf field string batch_id = 1; + * @param string $var + * @return $this + */ + public function setBatchId($var) + { + GPBUtil::checkString($var, True); + $this->batch_id = $var; + + return $this; + } + + /** + * Processes created. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Process processes = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Process> + */ + public function getProcesses() + { + return $this->processes; + } + + /** + * Processes created. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Process processes = 2; + * @param \Google\Cloud\VisionAI\V1\Process[] $var + * @return $this + */ + public function setProcesses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Process::class); + $this->processes = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BigQueryConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BigQueryConfig.php new file mode 100644 index 000000000000..be1bcbcaf7cd --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BigQueryConfig.php @@ -0,0 +1,259 @@ +google.cloud.visionai.v1.BigQueryConfig + */ +class BigQueryConfig extends \Google\Protobuf\Internal\Message +{ + /** + * BigQuery table resource for Vision AI Platform to ingest annotations to. + * + * Generated from protobuf field string table = 1; + */ + protected $table = ''; + /** + * Data Schema + * By default, Vision AI Application will try to write annotations to the + * target BigQuery table using the following schema: + * ingestion_time: TIMESTAMP, the ingestion time of the original data. + * application: STRING, name of the application which produces the annotation. + * instance: STRING, Id of the instance which produces the annotation. + * node: STRING, name of the application graph node which produces the + * annotation. + * annotation: STRING or JSON, the actual annotation protobuf will be + * converted to json string with bytes field as 64 encoded string. It can be + * written to both String or Json type column. + * To forward annotation data to an existing BigQuery table, customer needs to + * make sure the compatibility of the schema. + * The map maps application node name to its corresponding cloud function + * endpoint to transform the annotations directly to the + * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or + * proto_rows should be set). If configured, annotations produced by + * corresponding application node will sent to the Cloud Function at first + * before be forwarded to BigQuery. + * If the default table schema doesn't fit, customer is able to transform the + * annotation output from Vision AI Application to arbitrary BigQuery table + * schema with CloudFunction. + * * The cloud function will receive AppPlatformCloudFunctionRequest where + * the annotations field will be the json format of Vision AI annotation. + * * The cloud function should return AppPlatformCloudFunctionResponse with + * AppendRowsRequest stored in the annotations field. + * * To drop the annotation, simply clear the annotations field in the + * returned AppPlatformCloudFunctionResponse. + * + * Generated from protobuf field map cloud_function_mapping = 2; + */ + private $cloud_function_mapping; + /** + * If true, App Platform will create the BigQuery DataSet and the + * BigQuery Table with default schema if the specified table doesn't exist. + * This doesn't work if any cloud function customized schema is specified + * since the system doesn't know your desired schema. + * JSON column will be used in the default table created by App Platform. + * + * Generated from protobuf field bool create_default_table_if_not_exists = 3; + */ + protected $create_default_table_if_not_exists = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $table + * BigQuery table resource for Vision AI Platform to ingest annotations to. + * @type array|\Google\Protobuf\Internal\MapField $cloud_function_mapping + * Data Schema + * By default, Vision AI Application will try to write annotations to the + * target BigQuery table using the following schema: + * ingestion_time: TIMESTAMP, the ingestion time of the original data. + * application: STRING, name of the application which produces the annotation. + * instance: STRING, Id of the instance which produces the annotation. + * node: STRING, name of the application graph node which produces the + * annotation. + * annotation: STRING or JSON, the actual annotation protobuf will be + * converted to json string with bytes field as 64 encoded string. It can be + * written to both String or Json type column. + * To forward annotation data to an existing BigQuery table, customer needs to + * make sure the compatibility of the schema. + * The map maps application node name to its corresponding cloud function + * endpoint to transform the annotations directly to the + * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or + * proto_rows should be set). If configured, annotations produced by + * corresponding application node will sent to the Cloud Function at first + * before be forwarded to BigQuery. + * If the default table schema doesn't fit, customer is able to transform the + * annotation output from Vision AI Application to arbitrary BigQuery table + * schema with CloudFunction. + * * The cloud function will receive AppPlatformCloudFunctionRequest where + * the annotations field will be the json format of Vision AI annotation. + * * The cloud function should return AppPlatformCloudFunctionResponse with + * AppendRowsRequest stored in the annotations field. + * * To drop the annotation, simply clear the annotations field in the + * returned AppPlatformCloudFunctionResponse. + * @type bool $create_default_table_if_not_exists + * If true, App Platform will create the BigQuery DataSet and the + * BigQuery Table with default schema if the specified table doesn't exist. + * This doesn't work if any cloud function customized schema is specified + * since the system doesn't know your desired schema. + * JSON column will be used in the default table created by App Platform. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * BigQuery table resource for Vision AI Platform to ingest annotations to. + * + * Generated from protobuf field string table = 1; + * @return string + */ + public function getTable() + { + return $this->table; + } + + /** + * BigQuery table resource for Vision AI Platform to ingest annotations to. + * + * Generated from protobuf field string table = 1; + * @param string $var + * @return $this + */ + public function setTable($var) + { + GPBUtil::checkString($var, True); + $this->table = $var; + + return $this; + } + + /** + * Data Schema + * By default, Vision AI Application will try to write annotations to the + * target BigQuery table using the following schema: + * ingestion_time: TIMESTAMP, the ingestion time of the original data. + * application: STRING, name of the application which produces the annotation. + * instance: STRING, Id of the instance which produces the annotation. + * node: STRING, name of the application graph node which produces the + * annotation. + * annotation: STRING or JSON, the actual annotation protobuf will be + * converted to json string with bytes field as 64 encoded string. It can be + * written to both String or Json type column. + * To forward annotation data to an existing BigQuery table, customer needs to + * make sure the compatibility of the schema. + * The map maps application node name to its corresponding cloud function + * endpoint to transform the annotations directly to the + * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or + * proto_rows should be set). If configured, annotations produced by + * corresponding application node will sent to the Cloud Function at first + * before be forwarded to BigQuery. + * If the default table schema doesn't fit, customer is able to transform the + * annotation output from Vision AI Application to arbitrary BigQuery table + * schema with CloudFunction. + * * The cloud function will receive AppPlatformCloudFunctionRequest where + * the annotations field will be the json format of Vision AI annotation. + * * The cloud function should return AppPlatformCloudFunctionResponse with + * AppendRowsRequest stored in the annotations field. + * * To drop the annotation, simply clear the annotations field in the + * returned AppPlatformCloudFunctionResponse. + * + * Generated from protobuf field map cloud_function_mapping = 2; + * @return \Google\Protobuf\Internal\MapField + */ + public function getCloudFunctionMapping() + { + return $this->cloud_function_mapping; + } + + /** + * Data Schema + * By default, Vision AI Application will try to write annotations to the + * target BigQuery table using the following schema: + * ingestion_time: TIMESTAMP, the ingestion time of the original data. + * application: STRING, name of the application which produces the annotation. + * instance: STRING, Id of the instance which produces the annotation. + * node: STRING, name of the application graph node which produces the + * annotation. + * annotation: STRING or JSON, the actual annotation protobuf will be + * converted to json string with bytes field as 64 encoded string. It can be + * written to both String or Json type column. + * To forward annotation data to an existing BigQuery table, customer needs to + * make sure the compatibility of the schema. + * The map maps application node name to its corresponding cloud function + * endpoint to transform the annotations directly to the + * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or + * proto_rows should be set). If configured, annotations produced by + * corresponding application node will sent to the Cloud Function at first + * before be forwarded to BigQuery. + * If the default table schema doesn't fit, customer is able to transform the + * annotation output from Vision AI Application to arbitrary BigQuery table + * schema with CloudFunction. + * * The cloud function will receive AppPlatformCloudFunctionRequest where + * the annotations field will be the json format of Vision AI annotation. + * * The cloud function should return AppPlatformCloudFunctionResponse with + * AppendRowsRequest stored in the annotations field. + * * To drop the annotation, simply clear the annotations field in the + * returned AppPlatformCloudFunctionResponse. + * + * Generated from protobuf field map cloud_function_mapping = 2; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setCloudFunctionMapping($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->cloud_function_mapping = $arr; + + return $this; + } + + /** + * If true, App Platform will create the BigQuery DataSet and the + * BigQuery Table with default schema if the specified table doesn't exist. + * This doesn't work if any cloud function customized schema is specified + * since the system doesn't know your desired schema. + * JSON column will be used in the default table created by App Platform. + * + * Generated from protobuf field bool create_default_table_if_not_exists = 3; + * @return bool + */ + public function getCreateDefaultTableIfNotExists() + { + return $this->create_default_table_if_not_exists; + } + + /** + * If true, App Platform will create the BigQuery DataSet and the + * BigQuery Table with default schema if the specified table doesn't exist. + * This doesn't work if any cloud function customized schema is specified + * since the system doesn't know your desired schema. + * JSON column will be used in the default table created by App Platform. + * + * Generated from protobuf field bool create_default_table_if_not_exists = 3; + * @param bool $var + * @return $this + */ + public function setCreateDefaultTableIfNotExists($var) + { + GPBUtil::checkBool($var); + $this->create_default_table_if_not_exists = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BoolValue.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BoolValue.php new file mode 100644 index 000000000000..9ab19ab4a176 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BoolValue.php @@ -0,0 +1,58 @@ +google.cloud.visionai.v1.BoolValue + */ +class BoolValue extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field bool value = 1; + */ + protected $value = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $value + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field bool value = 1; + * @return bool + */ + public function getValue() + { + return $this->value; + } + + /** + * Generated from protobuf field bool value = 1; + * @param bool $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkBool($var); + $this->value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Channel.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Channel.php new file mode 100644 index 000000000000..790a60b02556 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Channel.php @@ -0,0 +1,291 @@ +google.cloud.visionai.v1.Channel + */ +class Channel extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the resource. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Annotations to allow clients to store small amounts of arbitrary data. + * + * Generated from protobuf field map annotations = 5; + */ + private $annotations; + /** + * Required. Stream that is associated with this series. + * + * Generated from protobuf field string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $stream = ''; + /** + * Required. Event that is associated with this series. + * + * Generated from protobuf field string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $event = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The create timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update timestamp. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Annotations to allow clients to store small amounts of arbitrary data. + * @type string $stream + * Required. Stream that is associated with this series. + * @type string $event + * Required. Event that is associated with this series. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsResources::initOnce(); + parent::__construct($data); + } + + /** + * Name of the resource. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the resource. + * + * 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 create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Annotations to allow clients to store small amounts of arbitrary data. + * + * Generated from protobuf field map annotations = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Annotations to allow clients to store small amounts of arbitrary data. + * + * Generated from protobuf field map annotations = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Required. Stream that is associated with this series. + * + * Generated from protobuf field string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getStream() + { + return $this->stream; + } + + /** + * Required. Stream that is associated with this series. + * + * Generated from protobuf field string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setStream($var) + { + GPBUtil::checkString($var, True); + $this->stream = $var; + + return $this; + } + + /** + * Required. Event that is associated with this series. + * + * Generated from protobuf field string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getEvent() + { + return $this->event; + } + + /** + * Required. Event that is associated with this series. + * + * Generated from protobuf field string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkString($var, True); + $this->event = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CircleArea.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CircleArea.php new file mode 100644 index 000000000000..d4904c24024d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CircleArea.php @@ -0,0 +1,135 @@ +google.cloud.visionai.v1.CircleArea + */ +class CircleArea extends \Google\Protobuf\Internal\Message +{ + /** + * Latitude of circle area's center. Degrees [-90 .. 90] + * + * Generated from protobuf field double latitude = 1; + */ + protected $latitude = 0.0; + /** + * Longitude of circle area's center. Degrees [-180 .. 180] + * + * Generated from protobuf field double longitude = 2; + */ + protected $longitude = 0.0; + /** + * Radius of the circle area in meters. + * + * Generated from protobuf field double radius_meter = 3; + */ + protected $radius_meter = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $latitude + * Latitude of circle area's center. Degrees [-90 .. 90] + * @type float $longitude + * Longitude of circle area's center. Degrees [-180 .. 180] + * @type float $radius_meter + * Radius of the circle area in meters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Latitude of circle area's center. Degrees [-90 .. 90] + * + * Generated from protobuf field double latitude = 1; + * @return float + */ + public function getLatitude() + { + return $this->latitude; + } + + /** + * Latitude of circle area's center. Degrees [-90 .. 90] + * + * Generated from protobuf field double latitude = 1; + * @param float $var + * @return $this + */ + public function setLatitude($var) + { + GPBUtil::checkDouble($var); + $this->latitude = $var; + + return $this; + } + + /** + * Longitude of circle area's center. Degrees [-180 .. 180] + * + * Generated from protobuf field double longitude = 2; + * @return float + */ + public function getLongitude() + { + return $this->longitude; + } + + /** + * Longitude of circle area's center. Degrees [-180 .. 180] + * + * Generated from protobuf field double longitude = 2; + * @param float $var + * @return $this + */ + public function setLongitude($var) + { + GPBUtil::checkDouble($var); + $this->longitude = $var; + + return $this; + } + + /** + * Radius of the circle area in meters. + * + * Generated from protobuf field double radius_meter = 3; + * @return float + */ + public function getRadiusMeter() + { + return $this->radius_meter; + } + + /** + * Radius of the circle area in meters. + * + * Generated from protobuf field double radius_meter = 3; + * @param float $var + * @return $this + */ + public function setRadiusMeter($var) + { + GPBUtil::checkDouble($var); + $this->radius_meter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClassificationPredictionResult.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClassificationPredictionResult.php new file mode 100644 index 000000000000..59479d31a6d2 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClassificationPredictionResult.php @@ -0,0 +1,143 @@ +google.cloud.visionai.v1.ClassificationPredictionResult + */ +class ClassificationPredictionResult extends \Google\Protobuf\Internal\Message +{ + /** + * The resource IDs of the AnnotationSpecs that had been identified. + * + * Generated from protobuf field repeated int64 ids = 1; + */ + private $ids; + /** + * The display names of the AnnotationSpecs that had been identified, order + * matches the IDs. + * + * Generated from protobuf field repeated string display_names = 2; + */ + private $display_names; + /** + * The Model's confidences in correctness of the predicted IDs, higher value + * means higher confidence. Order matches the Ids. + * + * Generated from protobuf field repeated float confidences = 3; + */ + private $confidences; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int[]|string[] $ids + * The resource IDs of the AnnotationSpecs that had been identified. + * @type string[] $display_names + * The display names of the AnnotationSpecs that had been identified, order + * matches the IDs. + * @type float[] $confidences + * The Model's confidences in correctness of the predicted IDs, higher value + * means higher confidence. Order matches the Ids. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * The resource IDs of the AnnotationSpecs that had been identified. + * + * Generated from protobuf field repeated int64 ids = 1; + * @return RepeatedField|RepeatedField + */ + public function getIds() + { + return $this->ids; + } + + /** + * The resource IDs of the AnnotationSpecs that had been identified. + * + * Generated from protobuf field repeated int64 ids = 1; + * @param int[]|string[] $var + * @return $this + */ + public function setIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); + $this->ids = $arr; + + return $this; + } + + /** + * The display names of the AnnotationSpecs that had been identified, order + * matches the IDs. + * + * Generated from protobuf field repeated string display_names = 2; + * @return RepeatedField + */ + public function getDisplayNames() + { + return $this->display_names; + } + + /** + * The display names of the AnnotationSpecs that had been identified, order + * matches the IDs. + * + * Generated from protobuf field repeated string display_names = 2; + * @param string[] $var + * @return $this + */ + public function setDisplayNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->display_names = $arr; + + return $this; + } + + /** + * The Model's confidences in correctness of the predicted IDs, higher value + * means higher confidence. Order matches the Ids. + * + * Generated from protobuf field repeated float confidences = 3; + * @return RepeatedField + */ + public function getConfidences() + { + return $this->confidences; + } + + /** + * The Model's confidences in correctness of the predicted IDs, higher value + * means higher confidence. Order matches the Ids. + * + * Generated from protobuf field repeated float confidences = 3; + * @param float[] $var + * @return $this + */ + public function setConfidences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FLOAT); + $this->confidences = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetRequest.php new file mode 100644 index 000000000000..f3161d4b4504 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetRequest.php @@ -0,0 +1,119 @@ +google.cloud.visionai.v1.ClipAssetRequest + */ +class ClipAssetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the asset to request clips for. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The time range to request clips for. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $temporal_partition = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the asset to request clips for. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * @type \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $temporal_partition + * Required. The time range to request clips for. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the asset to request clips for. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the asset to request clips for. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Required. The time range to request clips for. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Partition\TemporalPartition|null + */ + public function getTemporalPartition() + { + return $this->temporal_partition; + } + + public function hasTemporalPartition() + { + return isset($this->temporal_partition); + } + + public function clearTemporalPartition() + { + unset($this->temporal_partition); + } + + /** + * Required. The time range to request clips for. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $var + * @return $this + */ + public function setTemporalPartition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Partition\TemporalPartition::class); + $this->temporal_partition = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetResponse.php new file mode 100644 index 000000000000..a8e0e9ae75ee --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetResponse.php @@ -0,0 +1,71 @@ +google.cloud.visionai.v1.ClipAssetResponse + */ +class ClipAssetResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A list of signed uris to download the video clips that cover the requested + * time range ordered by time. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + */ + private $time_indexed_uris; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\ClipAssetResponse\TimeIndexedUri[] $time_indexed_uris + * A list of signed uris to download the video clips that cover the requested + * time range ordered by time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * A list of signed uris to download the video clips that cover the requested + * time range ordered by time. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\ClipAssetResponse\TimeIndexedUri> + */ + public function getTimeIndexedUris() + { + return $this->time_indexed_uris; + } + + /** + * A list of signed uris to download the video clips that cover the requested + * time range ordered by time. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; + * @param \Google\Cloud\VisionAI\V1\ClipAssetResponse\TimeIndexedUri[] $var + * @return $this + */ + public function setTimeIndexedUris($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ClipAssetResponse\TimeIndexedUri::class); + $this->time_indexed_uris = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetResponse/TimeIndexedUri.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetResponse/TimeIndexedUri.php new file mode 100644 index 000000000000..36e58634b6bf --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetResponse/TimeIndexedUri.php @@ -0,0 +1,111 @@ +google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri + */ +class TimeIndexedUri extends \Google\Protobuf\Internal\Message +{ + /** + * Time range of the video that the uri is for. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + protected $temporal_partition = null; + /** + * Signed uri to download the video clip. + * + * Generated from protobuf field string uri = 2; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $temporal_partition + * Time range of the video that the uri is for. + * @type string $uri + * Signed uri to download the video clip. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Time range of the video that the uri is for. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + * @return \Google\Cloud\VisionAI\V1\Partition\TemporalPartition|null + */ + public function getTemporalPartition() + { + return $this->temporal_partition; + } + + public function hasTemporalPartition() + { + return isset($this->temporal_partition); + } + + public function clearTemporalPartition() + { + unset($this->temporal_partition); + } + + /** + * Time range of the video that the uri is for. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + * @param \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $var + * @return $this + */ + public function setTemporalPartition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Partition\TemporalPartition::class); + $this->temporal_partition = $var; + + return $this; + } + + /** + * Signed uri to download the video clip. + * + * Generated from protobuf field string uri = 2; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Signed uri to download the video clip. + * + * Generated from protobuf field string uri = 2; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Cluster.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Cluster.php new file mode 100644 index 000000000000..dc1b5248c8a5 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Cluster.php @@ -0,0 +1,325 @@ +google.cloud.visionai.v1.Cluster + */ +class Cluster extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Annotations to allow clients to store small amounts of arbitrary data. + * + * Generated from protobuf field map annotations = 5; + */ + private $annotations; + /** + * Output only. The DNS name of the data plane service + * + * Generated from protobuf field string dataplane_service_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $dataplane_service_endpoint = ''; + /** + * Output only. The current state of the cluster. + * + * Generated from protobuf field .google.cloud.visionai.v1.Cluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The private service connection service target name. + * + * Generated from protobuf field string psc_target = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $psc_target = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Name of the resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The create timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update timestamp. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Annotations to allow clients to store small amounts of arbitrary data. + * @type string $dataplane_service_endpoint + * Output only. The DNS name of the data plane service + * @type int $state + * Output only. The current state of the cluster. + * @type string $psc_target + * Output only. The private service connection service target name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Annotations to allow clients to store small amounts of arbitrary data. + * + * Generated from protobuf field map annotations = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Annotations to allow clients to store small amounts of arbitrary data. + * + * Generated from protobuf field map annotations = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Output only. The DNS name of the data plane service + * + * Generated from protobuf field string dataplane_service_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDataplaneServiceEndpoint() + { + return $this->dataplane_service_endpoint; + } + + /** + * Output only. The DNS name of the data plane service + * + * Generated from protobuf field string dataplane_service_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDataplaneServiceEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->dataplane_service_endpoint = $var; + + return $this; + } + + /** + * Output only. The current state of the cluster. + * + * Generated from protobuf field .google.cloud.visionai.v1.Cluster.State state = 7 [(.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.cloud.visionai.v1.Cluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Cluster\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The private service connection service target name. + * + * Generated from protobuf field string psc_target = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getPscTarget() + { + return $this->psc_target; + } + + /** + * Output only. The private service connection service target name. + * + * Generated from protobuf field string psc_target = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setPscTarget($var) + { + GPBUtil::checkString($var, True); + $this->psc_target = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Cluster/State.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Cluster/State.php new file mode 100644 index 000000000000..d8861d9cf0c3 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Cluster/State.php @@ -0,0 +1,77 @@ +google.cloud.visionai.v1.Cluster.State + */ +class State +{ + /** + * Not set. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The PROVISIONING state indicates the cluster is being created. + * + * Generated from protobuf enum PROVISIONING = 1; + */ + const PROVISIONING = 1; + /** + * The RUNNING state indicates the cluster has been created and is fully + * usable. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * The STOPPING state indicates the cluster is being deleted. + * + * Generated from protobuf enum STOPPING = 3; + */ + const STOPPING = 3; + /** + * The ERROR state indicates the cluster is unusable. It will be + * automatically deleted. + * + * Generated from protobuf enum ERROR = 4; + */ + const ERROR = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PROVISIONING => 'PROVISIONING', + self::RUNNING => 'RUNNING', + self::STOPPING => 'STOPPING', + self::ERROR => 'ERROR', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClusterInfo.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClusterInfo.php new file mode 100644 index 000000000000..ce6596dae6b5 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClusterInfo.php @@ -0,0 +1,99 @@ +google.cloud.visionai.v1.ClusterInfo + */ +class ClusterInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The number of active streams in the cluster. + * + * Generated from protobuf field int32 streams_count = 1; + */ + protected $streams_count = 0; + /** + * The number of active processes in the cluster. + * + * Generated from protobuf field int32 processes_count = 2; + */ + protected $processes_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $streams_count + * The number of active streams in the cluster. + * @type int $processes_count + * The number of active processes in the cluster. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\HealthService::initOnce(); + parent::__construct($data); + } + + /** + * The number of active streams in the cluster. + * + * Generated from protobuf field int32 streams_count = 1; + * @return int + */ + public function getStreamsCount() + { + return $this->streams_count; + } + + /** + * The number of active streams in the cluster. + * + * Generated from protobuf field int32 streams_count = 1; + * @param int $var + * @return $this + */ + public function setStreamsCount($var) + { + GPBUtil::checkInt32($var); + $this->streams_count = $var; + + return $this; + } + + /** + * The number of active processes in the cluster. + * + * Generated from protobuf field int32 processes_count = 2; + * @return int + */ + public function getProcessesCount() + { + return $this->processes_count; + } + + /** + * The number of active processes in the cluster. + * + * Generated from protobuf field int32 processes_count = 2; + * @param int $var + * @return $this + */ + public function setProcessesCount($var) + { + GPBUtil::checkInt32($var); + $this->processes_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Collection.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Collection.php new file mode 100644 index 000000000000..02675027c268 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Collection.php @@ -0,0 +1,148 @@ +google.cloud.visionai.v1.Collection + */ +class Collection extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Resource name of the collection. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Optional. The collection name for displaying. + * The name can be up to 256 characters long. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Optional. Description of the collection. Can be up to 25000 characters + * long. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Resource name of the collection. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * @type string $display_name + * Optional. The collection name for displaying. + * The name can be up to 256 characters long. + * @type string $description + * Optional. Description of the collection. Can be up to 25000 characters + * long. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Resource name of the collection. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Resource name of the collection. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The collection name for displaying. + * The name can be up to 256 characters long. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. The collection name for displaying. + * The name can be up to 256 characters long. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. Description of the collection. Can be up to 25000 characters + * long. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the collection. Can be up to 25000 characters + * long. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CollectionItem.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CollectionItem.php new file mode 100644 index 000000000000..e4a5dd3684ae --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CollectionItem.php @@ -0,0 +1,148 @@ +google.cloud.visionai.v1.CollectionItem + */ +class CollectionItem extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The collection name that this item belongs to. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * + * Generated from protobuf field string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $collection = ''; + /** + * Required. The type of item. + * + * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $type = 0; + /** + * Required. The name of the CollectionItem. Its format depends on the `type` + * above. For ASSET: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * + * Generated from protobuf field string item_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $item_resource = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $collection + * Required. The collection name that this item belongs to. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * @type int $type + * Required. The type of item. + * @type string $item_resource + * Required. The name of the CollectionItem. Its format depends on the `type` + * above. For ASSET: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The collection name that this item belongs to. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * + * Generated from protobuf field string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getCollection() + { + return $this->collection; + } + + /** + * Required. The collection name that this item belongs to. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * + * Generated from protobuf field string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCollection($var) + { + GPBUtil::checkString($var, True); + $this->collection = $var; + + return $this; + } + + /** + * Required. The type of item. + * + * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Required. The type of item. + * + * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\CollectionItem\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Required. The name of the CollectionItem. Its format depends on the `type` + * above. For ASSET: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * + * Generated from protobuf field string item_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getItemResource() + { + return $this->item_resource; + } + + /** + * Required. The name of the CollectionItem. Its format depends on the `type` + * above. For ASSET: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * + * Generated from protobuf field string item_resource = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setItemResource($var) + { + GPBUtil::checkString($var, True); + $this->item_resource = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CollectionItem/Type.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CollectionItem/Type.php new file mode 100644 index 000000000000..72028409c845 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CollectionItem/Type.php @@ -0,0 +1,54 @@ +google.cloud.visionai.v1.CollectionItem.Type + */ +class Type +{ + /** + * The default type of item should never happen. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Asset type item. + * + * Generated from protobuf enum ASSET = 1; + */ + const ASSET = 1; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::ASSET => 'ASSET', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CommitRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CommitRequest.php new file mode 100644 index 000000000000..5f56e3c8ad6c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CommitRequest.php @@ -0,0 +1,69 @@ +google.cloud.visionai.v1.CommitRequest + */ +class CommitRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The offset to commit. + * + * Generated from protobuf field int64 offset = 1; + */ + protected $offset = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $offset + * The offset to commit. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + + /** + * The offset to commit. + * + * Generated from protobuf field int64 offset = 1; + * @return int|string + */ + public function getOffset() + { + return $this->offset; + } + + /** + * The offset to commit. + * + * Generated from protobuf field int64 offset = 1; + * @param int|string $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkInt64($var); + $this->offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ControlledMode.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ControlledMode.php new file mode 100644 index 000000000000..08d7cbc37d06 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ControlledMode.php @@ -0,0 +1,143 @@ +google.cloud.visionai.v1.ControlledMode + */ +class ControlledMode extends \Google\Protobuf\Internal\Message +{ + /** + * This is the logical starting point to fallback upon should the + * specified starting offset be unavailable. + * This can be one of the following values: + * "begin": This will read from the earliest available message. + * "end": This will read only future messages. + * + * Generated from protobuf field string fallback_starting_offset = 2; + */ + protected $fallback_starting_offset = ''; + protected $starting_offset; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $starting_logical_offset + * This can be set to the following logical starting points: + * "begin": This will read from the earliest available message. + * "most-recent": This will read from the latest available message. + * "end": This will read only future messages. + * "stored": This will resume reads one past the last committed offset. + * It is the only option that resumes progress; all others + * jump unilaterally. + * @type string $fallback_starting_offset + * This is the logical starting point to fallback upon should the + * specified starting offset be unavailable. + * This can be one of the following values: + * "begin": This will read from the earliest available message. + * "end": This will read only future messages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + + /** + * This can be set to the following logical starting points: + * "begin": This will read from the earliest available message. + * "most-recent": This will read from the latest available message. + * "end": This will read only future messages. + * "stored": This will resume reads one past the last committed offset. + * It is the only option that resumes progress; all others + * jump unilaterally. + * + * Generated from protobuf field string starting_logical_offset = 1; + * @return string + */ + public function getStartingLogicalOffset() + { + return $this->readOneof(1); + } + + public function hasStartingLogicalOffset() + { + return $this->hasOneof(1); + } + + /** + * This can be set to the following logical starting points: + * "begin": This will read from the earliest available message. + * "most-recent": This will read from the latest available message. + * "end": This will read only future messages. + * "stored": This will resume reads one past the last committed offset. + * It is the only option that resumes progress; all others + * jump unilaterally. + * + * Generated from protobuf field string starting_logical_offset = 1; + * @param string $var + * @return $this + */ + public function setStartingLogicalOffset($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * This is the logical starting point to fallback upon should the + * specified starting offset be unavailable. + * This can be one of the following values: + * "begin": This will read from the earliest available message. + * "end": This will read only future messages. + * + * Generated from protobuf field string fallback_starting_offset = 2; + * @return string + */ + public function getFallbackStartingOffset() + { + return $this->fallback_starting_offset; + } + + /** + * This is the logical starting point to fallback upon should the + * specified starting offset be unavailable. + * This can be one of the following values: + * "begin": This will read from the earliest available message. + * "end": This will read only future messages. + * + * Generated from protobuf field string fallback_starting_offset = 2; + * @param string $var + * @return $this + */ + public function setFallbackStartingOffset($var) + { + GPBUtil::checkString($var, True); + $this->fallback_starting_offset = $var; + + return $this; + } + + /** + * @return string + */ + public function getStartingOffset() + { + return $this->whichOneof("starting_offset"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Corpus.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Corpus.php new file mode 100644 index 000000000000..c8f73b73f81e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Corpus.php @@ -0,0 +1,387 @@ +google.cloud.visionai.v1.Corpus + */ +class Corpus extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the corpus. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The corpus name to shown in the UI. The name can be up to 32 + * characters long. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Optional. Description of the corpus. Can be up to 25000 characters long. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Optional. The default TTL value for all assets under the corpus without a + * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is + * required and the maximum allowed + * default_ttl is 10 years. + * + * Generated from protobuf field .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $default_ttl = null; + /** + * Optional. Type of the asset inside corpus. + * + * Generated from protobuf field .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $type = 0; + /** + * Default search capability setting on corpus level. + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; + */ + protected $search_capability_setting = null; + /** + * Output only. This boolean field is only set for projects that have Physical + * Zone Separation enabled via an Org Policy constraint. It is set to true + * when the corpus is a valid zone separated corpus and false if it isn't. + * + * Generated from protobuf field optional bool satisfies_pzs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = null; + /** + * Output only. This boolean field is only set for projects that have Physical + * Zone Isolation enabled via an Org Policy constraint. It is set to true when + * the corpus is a valid zone isolated corpus and false if it isn't. + * + * Generated from protobuf field optional bool satisfies_pzi = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzi = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the corpus. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * @type string $display_name + * Required. The corpus name to shown in the UI. The name can be up to 32 + * characters long. + * @type string $description + * Optional. Description of the corpus. Can be up to 25000 characters long. + * @type \Google\Protobuf\Duration $default_ttl + * Optional. The default TTL value for all assets under the corpus without a + * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is + * required and the maximum allowed + * default_ttl is 10 years. + * @type int $type + * Optional. Type of the asset inside corpus. + * @type \Google\Cloud\VisionAI\V1\SearchCapabilitySetting $search_capability_setting + * Default search capability setting on corpus level. + * @type bool $satisfies_pzs + * Output only. This boolean field is only set for projects that have Physical + * Zone Separation enabled via an Org Policy constraint. It is set to true + * when the corpus is a valid zone separated corpus and false if it isn't. + * @type bool $satisfies_pzi + * Output only. This boolean field is only set for projects that have Physical + * Zone Isolation enabled via an Org Policy constraint. It is set to true when + * the corpus is a valid zone isolated corpus and false if it isn't. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the corpus. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the corpus. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * 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 corpus name to shown in the UI. The name can be up to 32 + * characters long. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. The corpus name to shown in the UI. The name can be up to 32 + * characters long. + * + * 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; + } + + /** + * Optional. Description of the corpus. Can be up to 25000 characters long. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the corpus. Can be up to 25000 characters long. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. The default TTL value for all assets under the corpus without a + * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is + * required and the maximum allowed + * default_ttl is 10 years. + * + * Generated from protobuf field .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Duration|null + */ + public function getDefaultTtl() + { + return $this->default_ttl; + } + + public function hasDefaultTtl() + { + return isset($this->default_ttl); + } + + public function clearDefaultTtl() + { + unset($this->default_ttl); + } + + /** + * Optional. The default TTL value for all assets under the corpus without a + * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is + * required and the maximum allowed + * default_ttl is 10 years. + * + * Generated from protobuf field .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDefaultTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->default_ttl = $var; + + return $this; + } + + /** + * Optional. Type of the asset inside corpus. + * + * Generated from protobuf field .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Optional. Type of the asset inside corpus. + * + * Generated from protobuf field .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Corpus\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Default search capability setting on corpus level. + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; + * @return \Google\Cloud\VisionAI\V1\SearchCapabilitySetting|null + */ + public function getSearchCapabilitySetting() + { + return $this->search_capability_setting; + } + + public function hasSearchCapabilitySetting() + { + return isset($this->search_capability_setting); + } + + public function clearSearchCapabilitySetting() + { + unset($this->search_capability_setting); + } + + /** + * Default search capability setting on corpus level. + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; + * @param \Google\Cloud\VisionAI\V1\SearchCapabilitySetting $var + * @return $this + */ + public function setSearchCapabilitySetting($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\SearchCapabilitySetting::class); + $this->search_capability_setting = $var; + + return $this; + } + + /** + * Output only. This boolean field is only set for projects that have Physical + * Zone Separation enabled via an Org Policy constraint. It is set to true + * when the corpus is a valid zone separated corpus and false if it isn't. + * + * Generated from protobuf field optional bool satisfies_pzs = 11 [(.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. This boolean field is only set for projects that have Physical + * Zone Separation enabled via an Org Policy constraint. It is set to true + * when the corpus is a valid zone separated corpus and false if it isn't. + * + * Generated from protobuf field optional bool satisfies_pzs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Output only. This boolean field is only set for projects that have Physical + * Zone Isolation enabled via an Org Policy constraint. It is set to true when + * the corpus is a valid zone isolated corpus and false if it isn't. + * + * Generated from protobuf field optional bool satisfies_pzi = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzi() + { + return isset($this->satisfies_pzi) ? $this->satisfies_pzi : false; + } + + public function hasSatisfiesPzi() + { + return isset($this->satisfies_pzi); + } + + public function clearSatisfiesPzi() + { + unset($this->satisfies_pzi); + } + + /** + * Output only. This boolean field is only set for projects that have Physical + * Zone Isolation enabled via an Org Policy constraint. It is set to true when + * the corpus is a valid zone isolated corpus and false if it isn't. + * + * Generated from protobuf field optional bool satisfies_pzi = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzi($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzi = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Corpus/Type.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Corpus/Type.php new file mode 100644 index 000000000000..be19ea0edcc6 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Corpus/Type.php @@ -0,0 +1,69 @@ +google.cloud.visionai.v1.Corpus.Type + */ +class Type +{ + /** + * The default type, not supposed to be used. If this default type is used, + * the corpus will be created as STREAM_VIDEO corpus. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Asset is a live streaming video. + * + * Generated from protobuf enum STREAM_VIDEO = 1; + */ + const STREAM_VIDEO = 1; + /** + * Asset is an image. + * + * Generated from protobuf enum IMAGE = 2; + */ + const IMAGE = 2; + /** + * Asset is a batch video. + * + * Generated from protobuf enum VIDEO_ON_DEMAND = 3; + */ + const VIDEO_ON_DEMAND = 3; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::STREAM_VIDEO => 'STREAM_VIDEO', + self::IMAGE => 'IMAGE', + self::VIDEO_ON_DEMAND => 'VIDEO_ON_DEMAND', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAnalysisRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAnalysisRequest.php new file mode 100644 index 000000000000..3038aaa8b117 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAnalysisRequest.php @@ -0,0 +1,237 @@ +google.cloud.visionai.v1.CreateAnalysisRequest + */ +class CreateAnalysisRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string analysis_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $analysis_id = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $analysis = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see LiveVideoAnalyticsClient::clusterName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\Analysis $analysis Required. The resource being created. + * @param string $analysisId Required. Id of the requesting object. + * + * @return \Google\Cloud\VisionAI\V1\CreateAnalysisRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\Analysis $analysis, string $analysisId): self + { + return (new self()) + ->setParent($parent) + ->setAnalysis($analysis) + ->setAnalysisId($analysisId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $analysis_id + * Required. Id of the requesting object. + * @type \Google\Cloud\VisionAI\V1\Analysis $analysis + * Required. The resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * 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. Value for parent. + * + * 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. Id of the requesting object. + * + * Generated from protobuf field string analysis_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getAnalysisId() + { + return $this->analysis_id; + } + + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string analysis_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setAnalysisId($var) + { + GPBUtil::checkString($var, True); + $this->analysis_id = $var; + + return $this; + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Analysis|null + */ + public function getAnalysis() + { + return $this->analysis; + } + + public function hasAnalysis() + { + return isset($this->analysis); + } + + public function clearAnalysis() + { + unset($this->analysis); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Analysis $var + * @return $this + */ + public function setAnalysis($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Analysis::class); + $this->analysis = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAnnotationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAnnotationRequest.php new file mode 100644 index 000000000000..187db2c477e0 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAnnotationRequest.php @@ -0,0 +1,209 @@ +google.cloud.visionai.v1.CreateAnnotationRequest + */ +class CreateAnnotationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this annotation will be created. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The annotation to create. + * + * Generated from protobuf field .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $annotation = null; + /** + * Optional. The ID to use for the annotation, which will become the final + * component of the annotation's resource name if user choose to specify. + * Otherwise, annotation id will be generated by system. + * This value should be up to 63 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * + * Generated from protobuf field optional string annotation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $annotation_id = null; + + /** + * @param string $parent Required. The parent resource where this annotation will be created. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * Please see {@see WarehouseClient::assetName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\Annotation $annotation Required. The annotation to create. + * @param string $annotationId Optional. The ID to use for the annotation, which will become the final + * component of the annotation's resource name if user choose to specify. + * Otherwise, annotation id will be generated by system. + * + * This value should be up to 63 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * + * @return \Google\Cloud\VisionAI\V1\CreateAnnotationRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\Annotation $annotation, string $annotationId): self + { + return (new self()) + ->setParent($parent) + ->setAnnotation($annotation) + ->setAnnotationId($annotationId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this annotation will be created. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * @type \Google\Cloud\VisionAI\V1\Annotation $annotation + * Required. The annotation to create. + * @type string $annotation_id + * Optional. The ID to use for the annotation, which will become the final + * component of the annotation's resource name if user choose to specify. + * Otherwise, annotation id will be generated by system. + * This value should be up to 63 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this annotation will be created. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where this annotation will be created. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The annotation to create. + * + * Generated from protobuf field .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Annotation|null + */ + public function getAnnotation() + { + return $this->annotation; + } + + public function hasAnnotation() + { + return isset($this->annotation); + } + + public function clearAnnotation() + { + unset($this->annotation); + } + + /** + * Required. The annotation to create. + * + * Generated from protobuf field .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Annotation $var + * @return $this + */ + public function setAnnotation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Annotation::class); + $this->annotation = $var; + + return $this; + } + + /** + * Optional. The ID to use for the annotation, which will become the final + * component of the annotation's resource name if user choose to specify. + * Otherwise, annotation id will be generated by system. + * This value should be up to 63 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * + * Generated from protobuf field optional string annotation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAnnotationId() + { + return isset($this->annotation_id) ? $this->annotation_id : ''; + } + + public function hasAnnotationId() + { + return isset($this->annotation_id); + } + + public function clearAnnotationId() + { + unset($this->annotation_id); + } + + /** + * Optional. The ID to use for the annotation, which will become the final + * component of the annotation's resource name if user choose to specify. + * Otherwise, annotation id will be generated by system. + * This value should be up to 63 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * + * Generated from protobuf field optional string annotation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAnnotationId($var) + { + GPBUtil::checkString($var, True); + $this->annotation_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationInstancesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationInstancesRequest.php new file mode 100644 index 000000000000..5ef5e8285f61 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationInstancesRequest.php @@ -0,0 +1,199 @@ +google.cloud.visionai.v1.CreateApplicationInstancesRequest + */ +class CreateApplicationInstancesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. The resources being created. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $application_instances; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * Please see {@see AppPlatformClient::applicationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\CreateApplicationInstancesRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @type \Google\Cloud\VisionAI\V1\ApplicationInstance[] $application_instances + * Required. The resources being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * 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 resources being created. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\ApplicationInstance> + */ + public function getApplicationInstances() + { + return $this->application_instances; + } + + /** + * Required. The resources being created. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\ApplicationInstance[] $var + * @return $this + */ + public function setApplicationInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ApplicationInstance::class); + $this->application_instances = $arr; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationInstancesResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationInstancesResponse.php new file mode 100644 index 000000000000..012853feabfa --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationInstancesResponse.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.CreateApplicationInstancesResponse + */ +class CreateApplicationInstancesResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationRequest.php new file mode 100644 index 000000000000..645d9c345abe --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationRequest.php @@ -0,0 +1,235 @@ +google.cloud.visionai.v1.CreateApplicationRequest + */ +class CreateApplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $application_id = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $application = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see AppPlatformClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\Application $application Required. The resource being created. + * + * @return \Google\Cloud\VisionAI\V1\CreateApplicationRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\Application $application): self + { + return (new self()) + ->setParent($parent) + ->setApplication($application); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $application_id + * Required. Id of the requesting object. + * @type \Google\Cloud\VisionAI\V1\Application $application + * Required. The resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * 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. Value for parent. + * + * 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. Id of the requesting object. + * + * Generated from protobuf field string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getApplicationId() + { + return $this->application_id; + } + + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setApplicationId($var) + { + GPBUtil::checkString($var, True); + $this->application_id = $var; + + return $this; + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Application|null + */ + public function getApplication() + { + return $this->application; + } + + public function hasApplication() + { + return isset($this->application); + } + + public function clearApplication() + { + unset($this->application); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Application $var + * @return $this + */ + public function setApplication($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Application::class); + $this->application = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAssetRequest.php new file mode 100644 index 000000000000..b79991cb552f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAssetRequest.php @@ -0,0 +1,209 @@ +google.cloud.visionai.v1.CreateAssetRequest + */ +class CreateAssetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this asset will be created. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The asset to create. + * + * Generated from protobuf field .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $asset = null; + /** + * Optional. The ID to use for the asset, which will become the final + * component of the asset's resource name if user choose to specify. + * Otherwise, asset id will be generated by system. + * This value should be up to 63 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * + * Generated from protobuf field optional string asset_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $asset_id = null; + + /** + * @param string $parent Required. The parent resource where this asset will be created. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * Please see {@see WarehouseClient::corpusName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\Asset $asset Required. The asset to create. + * @param string $assetId Optional. The ID to use for the asset, which will become the final + * component of the asset's resource name if user choose to specify. + * Otherwise, asset id will be generated by system. + * + * This value should be up to 63 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * + * @return \Google\Cloud\VisionAI\V1\CreateAssetRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\Asset $asset, string $assetId): self + { + return (new self()) + ->setParent($parent) + ->setAsset($asset) + ->setAssetId($assetId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this asset will be created. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * @type \Google\Cloud\VisionAI\V1\Asset $asset + * Required. The asset to create. + * @type string $asset_id + * Optional. The ID to use for the asset, which will become the final + * component of the asset's resource name if user choose to specify. + * Otherwise, asset id will be generated by system. + * This value should be up to 63 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this asset will be created. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where this asset will be created. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The asset to create. + * + * Generated from protobuf field .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Asset|null + */ + public function getAsset() + { + return $this->asset; + } + + public function hasAsset() + { + return isset($this->asset); + } + + public function clearAsset() + { + unset($this->asset); + } + + /** + * Required. The asset to create. + * + * Generated from protobuf field .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Asset $var + * @return $this + */ + public function setAsset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Asset::class); + $this->asset = $var; + + return $this; + } + + /** + * Optional. The ID to use for the asset, which will become the final + * component of the asset's resource name if user choose to specify. + * Otherwise, asset id will be generated by system. + * This value should be up to 63 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * + * Generated from protobuf field optional string asset_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAssetId() + { + return isset($this->asset_id) ? $this->asset_id : ''; + } + + public function hasAssetId() + { + return isset($this->asset_id); + } + + public function clearAssetId() + { + unset($this->asset_id); + } + + /** + * Optional. The ID to use for the asset, which will become the final + * component of the asset's resource name if user choose to specify. + * Otherwise, asset id will be generated by system. + * This value should be up to 63 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * + * Generated from protobuf field optional string asset_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAssetId($var) + { + GPBUtil::checkString($var, True); + $this->asset_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateClusterRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateClusterRequest.php new file mode 100644 index 000000000000..e767a28bf3c6 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateClusterRequest.php @@ -0,0 +1,237 @@ +google.cloud.visionai.v1.CreateClusterRequest + */ +class CreateClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster_id = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see StreamsServiceClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\Cluster $cluster Required. The resource being created. + * @param string $clusterId Required. Id of the requesting object. + * + * @return \Google\Cloud\VisionAI\V1\CreateClusterRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\Cluster $cluster, string $clusterId): self + { + return (new self()) + ->setParent($parent) + ->setCluster($cluster) + ->setClusterId($clusterId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $cluster_id + * Required. Id of the requesting object. + * @type \Google\Cloud\VisionAI\V1\Cluster $cluster + * Required. The resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * 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. Value for parent. + * + * 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. Id of the requesting object. + * + * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getClusterId() + { + return $this->cluster_id; + } + + /** + * Required. Id of the requesting object. + * + * 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 resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Cluster|null + */ + public function getCluster() + { + return $this->cluster; + } + + public function hasCluster() + { + return isset($this->cluster); + } + + public function clearCluster() + { + unset($this->cluster); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Cluster $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Cluster::class); + $this->cluster = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCollectionMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCollectionMetadata.php new file mode 100644 index 000000000000..ab6a9ba38059 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCollectionMetadata.php @@ -0,0 +1,77 @@ +google.cloud.visionai.v1.CreateCollectionMetadata + */ +class CreateCollectionMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + protected $operation_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\OperationMetadata $operation_metadata + * Common metadata of the long-running operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null + */ + public function getOperationMetadata() + { + return $this->operation_metadata; + } + + public function hasOperationMetadata() + { + return isset($this->operation_metadata); + } + + public function clearOperationMetadata() + { + unset($this->operation_metadata); + } + + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var + * @return $this + */ + public function setOperationMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); + $this->operation_metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCollectionRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCollectionRequest.php new file mode 100644 index 000000000000..211a5d7e2bc0 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCollectionRequest.php @@ -0,0 +1,204 @@ +google.cloud.visionai.v1.CreateCollectionRequest + */ +class CreateCollectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this collection will be created. + * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The collection resource to be created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $collection = null; + /** + * Optional. The ID to use for the collection, which will become the final + * component of the resource name if user choose to specify. Otherwise, + * collection id will be generated by system. + * This value should be up to 55 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * + * Generated from protobuf field optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $collection_id = null; + + /** + * @param string $parent Required. The parent resource where this collection will be created. + * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` + * Please see {@see WarehouseClient::corpusName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\Collection $collection Required. The collection resource to be created. + * @param string $collectionId Optional. The ID to use for the collection, which will become the final + * component of the resource name if user choose to specify. Otherwise, + * collection id will be generated by system. + * + * This value should be up to 55 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * + * @return \Google\Cloud\VisionAI\V1\CreateCollectionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\Collection $collection, string $collectionId): self + { + return (new self()) + ->setParent($parent) + ->setCollection($collection) + ->setCollectionId($collectionId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this collection will be created. + * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @type \Google\Cloud\VisionAI\V1\Collection $collection + * Required. The collection resource to be created. + * @type string $collection_id + * Optional. The ID to use for the collection, which will become the final + * component of the resource name if user choose to specify. Otherwise, + * collection id will be generated by system. + * This value should be up to 55 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this collection will be created. + * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where this collection will be created. + * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * 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 collection resource to be created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Collection|null + */ + public function getCollection() + { + return $this->collection; + } + + public function hasCollection() + { + return isset($this->collection); + } + + public function clearCollection() + { + unset($this->collection); + } + + /** + * Required. The collection resource to be created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Collection $var + * @return $this + */ + public function setCollection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Collection::class); + $this->collection = $var; + + return $this; + } + + /** + * Optional. The ID to use for the collection, which will become the final + * component of the resource name if user choose to specify. Otherwise, + * collection id will be generated by system. + * This value should be up to 55 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * + * Generated from protobuf field optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getCollectionId() + { + return isset($this->collection_id) ? $this->collection_id : ''; + } + + public function hasCollectionId() + { + return isset($this->collection_id); + } + + public function clearCollectionId() + { + unset($this->collection_id); + } + + /** + * Optional. The ID to use for the collection, which will become the final + * component of the resource name if user choose to specify. Otherwise, + * collection id will be generated by system. + * This value should be up to 55 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * + * Generated from protobuf field optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setCollectionId($var) + { + GPBUtil::checkString($var, True); + $this->collection_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCorpusMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCorpusMetadata.php new file mode 100644 index 000000000000..476cec0221d2 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCorpusMetadata.php @@ -0,0 +1,121 @@ +google.cloud.visionai.v1.CreateCorpusMetadata + */ +class CreateCorpusMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The create time of the create corpus operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + */ + protected $create_time = null; + /** + * The update time of the create corpus operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * The create time of the create corpus operation. + * @type \Google\Protobuf\Timestamp $update_time + * The update time of the create corpus operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The create time of the create corpus operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + * @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); + } + + /** + * The create time of the create corpus operation. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; + * @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 update time of the create corpus operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * The update time of the create corpus operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCorpusRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCorpusRequest.php new file mode 100644 index 000000000000..c8b27751b970 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCorpusRequest.php @@ -0,0 +1,126 @@ +google.cloud.visionai.v1.CreateCorpusRequest + */ +class CreateCorpusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Form: `projects/{project_number}/locations/{location_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Required. The corpus to be created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $corpus = null; + + /** + * @param string $parent Required. Form: `projects/{project_number}/locations/{location_id}` + * @param \Google\Cloud\VisionAI\V1\Corpus $corpus Required. The corpus to be created. + * + * @return \Google\Cloud\VisionAI\V1\CreateCorpusRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\Corpus $corpus): self + { + return (new self()) + ->setParent($parent) + ->setCorpus($corpus); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Form: `projects/{project_number}/locations/{location_id}` + * @type \Google\Cloud\VisionAI\V1\Corpus $corpus + * Required. The corpus to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. Form: `projects/{project_number}/locations/{location_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Form: `projects/{project_number}/locations/{location_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The corpus to be created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Corpus|null + */ + public function getCorpus() + { + return $this->corpus; + } + + public function hasCorpus() + { + return isset($this->corpus); + } + + public function clearCorpus() + { + unset($this->corpus); + } + + /** + * Required. The corpus to be created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Corpus $var + * @return $this + */ + public function setCorpus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Corpus::class); + $this->corpus = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateDataSchemaRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateDataSchemaRequest.php new file mode 100644 index 000000000000..42876e401591 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateDataSchemaRequest.php @@ -0,0 +1,137 @@ +google.cloud.visionai.v1.CreateDataSchemaRequest + */ +class CreateDataSchemaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this data schema will be created. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The data schema to create. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_schema = null; + + /** + * @param string $parent Required. The parent resource where this data schema will be created. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * Please see {@see WarehouseClient::corpusName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\DataSchema $dataSchema Required. The data schema to create. + * + * @return \Google\Cloud\VisionAI\V1\CreateDataSchemaRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\DataSchema $dataSchema): self + { + return (new self()) + ->setParent($parent) + ->setDataSchema($dataSchema); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this data schema will be created. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * @type \Google\Cloud\VisionAI\V1\DataSchema $data_schema + * Required. The data schema to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this data schema will be created. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where this data schema will be created. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The data schema to create. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\DataSchema|null + */ + public function getDataSchema() + { + return $this->data_schema; + } + + public function hasDataSchema() + { + return isset($this->data_schema); + } + + public function clearDataSchema() + { + unset($this->data_schema); + } + + /** + * Required. The data schema to create. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\DataSchema $var + * @return $this + */ + public function setDataSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DataSchema::class); + $this->data_schema = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateDraftRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateDraftRequest.php new file mode 100644 index 000000000000..c9843ad39f4c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateDraftRequest.php @@ -0,0 +1,237 @@ +google.cloud.visionai.v1.CreateDraftRequest + */ +class CreateDraftRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string draft_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $draft_id = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $draft = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see AppPlatformClient::applicationName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\Draft $draft Required. The resource being created. + * @param string $draftId Required. Id of the requesting object. + * + * @return \Google\Cloud\VisionAI\V1\CreateDraftRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\Draft $draft, string $draftId): self + { + return (new self()) + ->setParent($parent) + ->setDraft($draft) + ->setDraftId($draftId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $draft_id + * Required. Id of the requesting object. + * @type \Google\Cloud\VisionAI\V1\Draft $draft + * Required. The resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * 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. Value for parent. + * + * 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. Id of the requesting object. + * + * Generated from protobuf field string draft_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDraftId() + { + return $this->draft_id; + } + + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string draft_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDraftId($var) + { + GPBUtil::checkString($var, True); + $this->draft_id = $var; + + return $this; + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Draft|null + */ + public function getDraft() + { + return $this->draft; + } + + public function hasDraft() + { + return isset($this->draft); + } + + public function clearDraft() + { + unset($this->draft); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Draft $var + * @return $this + */ + public function setDraft($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Draft::class); + $this->draft = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateEventRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateEventRequest.php new file mode 100644 index 000000000000..d695ee1d3d78 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateEventRequest.php @@ -0,0 +1,237 @@ +google.cloud.visionai.v1.CreateEventRequest + */ +class CreateEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $event_id = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $event = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see StreamsServiceClient::clusterName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\Event $event Required. The resource being created. + * @param string $eventId Required. Id of the requesting object. + * + * @return \Google\Cloud\VisionAI\V1\CreateEventRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\Event $event, string $eventId): self + { + return (new self()) + ->setParent($parent) + ->setEvent($event) + ->setEventId($eventId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $event_id + * Required. Id of the requesting object. + * @type \Google\Cloud\VisionAI\V1\Event $event + * Required. The resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * 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. Value for parent. + * + * 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. Id of the requesting object. + * + * Generated from protobuf field string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEventId() + { + return $this->event_id; + } + + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEventId($var) + { + GPBUtil::checkString($var, True); + $this->event_id = $var; + + return $this; + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Event|null + */ + public function getEvent() + { + return $this->event; + } + + public function hasEvent() + { + return isset($this->event); + } + + public function clearEvent() + { + unset($this->event); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Event $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Event::class); + $this->event = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexEndpointMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexEndpointMetadata.php new file mode 100644 index 000000000000..ac9c1c21d5a3 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexEndpointMetadata.php @@ -0,0 +1,77 @@ +google.cloud.visionai.v1.CreateIndexEndpointMetadata + */ +class CreateIndexEndpointMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + protected $operation_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\OperationMetadata $operation_metadata + * Common metadata of the long-running operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null + */ + public function getOperationMetadata() + { + return $this->operation_metadata; + } + + public function hasOperationMetadata() + { + return isset($this->operation_metadata); + } + + public function clearOperationMetadata() + { + unset($this->operation_metadata); + } + + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var + * @return $this + */ + public function setOperationMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); + $this->operation_metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexEndpointRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexEndpointRequest.php new file mode 100644 index 000000000000..a735cde5006e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexEndpointRequest.php @@ -0,0 +1,189 @@ +google.cloud.visionai.v1.CreateIndexEndpointRequest + */ +class CreateIndexEndpointRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The ID to use for the IndexEndpoint, which will become the final + * component of the IndexEndpoint's resource name if the user specifies it. + * Otherwise, IndexEndpoint id will be autogenerated. + * This value should be up to 63 characters, and valid characters + * are a-z, 0-9 and dash (-). The first character must be a letter, the last + * must be a letter or a number. + * + * Generated from protobuf field string index_endpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $index_endpoint_id = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $index_endpoint = null; + + /** + * @param string $parent Required. Format: `projects/{project}/locations/{location}` + * Please see {@see WarehouseClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\IndexEndpoint $indexEndpoint Required. The resource being created. + * @param string $indexEndpointId Optional. The ID to use for the IndexEndpoint, which will become the final + * component of the IndexEndpoint's resource name if the user specifies it. + * Otherwise, IndexEndpoint id will be autogenerated. + * + * This value should be up to 63 characters, and valid characters + * are a-z, 0-9 and dash (-). The first character must be a letter, the last + * must be a letter or a number. + * + * @return \Google\Cloud\VisionAI\V1\CreateIndexEndpointRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\IndexEndpoint $indexEndpoint, string $indexEndpointId): self + { + return (new self()) + ->setParent($parent) + ->setIndexEndpoint($indexEndpoint) + ->setIndexEndpointId($indexEndpointId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Format: `projects/{project}/locations/{location}` + * @type string $index_endpoint_id + * Optional. The ID to use for the IndexEndpoint, which will become the final + * component of the IndexEndpoint's resource name if the user specifies it. + * Otherwise, IndexEndpoint id will be autogenerated. + * This value should be up to 63 characters, and valid characters + * are a-z, 0-9 and dash (-). The first character must be a letter, the last + * must be a letter or a number. + * @type \Google\Cloud\VisionAI\V1\IndexEndpoint $index_endpoint + * Required. The resource being created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: `projects/{project}/locations/{location}` + * + * 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. Format: `projects/{project}/locations/{location}` + * + * 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; + } + + /** + * Optional. The ID to use for the IndexEndpoint, which will become the final + * component of the IndexEndpoint's resource name if the user specifies it. + * Otherwise, IndexEndpoint id will be autogenerated. + * This value should be up to 63 characters, and valid characters + * are a-z, 0-9 and dash (-). The first character must be a letter, the last + * must be a letter or a number. + * + * Generated from protobuf field string index_endpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getIndexEndpointId() + { + return $this->index_endpoint_id; + } + + /** + * Optional. The ID to use for the IndexEndpoint, which will become the final + * component of the IndexEndpoint's resource name if the user specifies it. + * Otherwise, IndexEndpoint id will be autogenerated. + * This value should be up to 63 characters, and valid characters + * are a-z, 0-9 and dash (-). The first character must be a letter, the last + * must be a letter or a number. + * + * Generated from protobuf field string index_endpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setIndexEndpointId($var) + { + GPBUtil::checkString($var, True); + $this->index_endpoint_id = $var; + + return $this; + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\IndexEndpoint|null + */ + public function getIndexEndpoint() + { + return $this->index_endpoint; + } + + public function hasIndexEndpoint() + { + return isset($this->index_endpoint); + } + + public function clearIndexEndpoint() + { + unset($this->index_endpoint); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\IndexEndpoint $var + * @return $this + */ + public function setIndexEndpoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\IndexEndpoint::class); + $this->index_endpoint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexMetadata.php new file mode 100644 index 000000000000..9ee79340c56f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexMetadata.php @@ -0,0 +1,77 @@ +google.cloud.visionai.v1.CreateIndexMetadata + */ +class CreateIndexMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + protected $operation_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\OperationMetadata $operation_metadata + * Common metadata of the long-running operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null + */ + public function getOperationMetadata() + { + return $this->operation_metadata; + } + + public function hasOperationMetadata() + { + return isset($this->operation_metadata); + } + + public function clearOperationMetadata() + { + unset($this->operation_metadata); + } + + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var + * @return $this + */ + public function setOperationMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); + $this->operation_metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexRequest.php new file mode 100644 index 000000000000..c75a6cfbc77f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexRequest.php @@ -0,0 +1,199 @@ +google.cloud.visionai.v1.CreateIndexRequest + */ +class CreateIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for the parent. The resource name of the Corpus under which + * this index is created. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The ID for the index. This will become the final resource name + * for the index. If the user does not specify this value, it will be + * generated by system. + * This value should be up to 63 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * + * Generated from protobuf field string index_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $index_id = ''; + /** + * Required. The index being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $index = null; + + /** + * @param string $parent Required. Value for the parent. The resource name of the Corpus under which + * this index is created. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * Please see {@see WarehouseClient::corpusName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\Index $index Required. The index being created. + * @param string $indexId Optional. The ID for the index. This will become the final resource name + * for the index. If the user does not specify this value, it will be + * generated by system. + * + * This value should be up to 63 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * + * @return \Google\Cloud\VisionAI\V1\CreateIndexRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\Index $index, string $indexId): self + { + return (new self()) + ->setParent($parent) + ->setIndex($index) + ->setIndexId($indexId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for the parent. The resource name of the Corpus under which + * this index is created. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * @type string $index_id + * Optional. The ID for the index. This will become the final resource name + * for the index. If the user does not specify this value, it will be + * generated by system. + * This value should be up to 63 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * @type \Google\Cloud\VisionAI\V1\Index $index + * Required. The index being created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for the parent. The resource name of the Corpus under which + * this index is created. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Value for the parent. The resource name of the Corpus under which + * this index is created. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Optional. The ID for the index. This will become the final resource name + * for the index. If the user does not specify this value, it will be + * generated by system. + * This value should be up to 63 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * + * Generated from protobuf field string index_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getIndexId() + { + return $this->index_id; + } + + /** + * Optional. The ID for the index. This will become the final resource name + * for the index. If the user does not specify this value, it will be + * generated by system. + * This value should be up to 63 characters, and valid characters + * are /[a-z][0-9]-/. The first character must be a letter, the last could be + * a letter or a number. + * + * Generated from protobuf field string index_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setIndexId($var) + { + GPBUtil::checkString($var, True); + $this->index_id = $var; + + return $this; + } + + /** + * Required. The index being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Index|null + */ + public function getIndex() + { + return $this->index; + } + + public function hasIndex() + { + return isset($this->index); + } + + public function clearIndex() + { + unset($this->index); + } + + /** + * Required. The index being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Index $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Index::class); + $this->index = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateOperatorRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateOperatorRequest.php new file mode 100644 index 000000000000..b07cd75ebb9f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateOperatorRequest.php @@ -0,0 +1,237 @@ +google.cloud.visionai.v1.CreateOperatorRequest + */ +class CreateOperatorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string operator_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $operator_id = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $operator = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see LiveVideoAnalyticsClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\Operator $operator Required. The resource being created. + * @param string $operatorId Required. Id of the requesting object. + * + * @return \Google\Cloud\VisionAI\V1\CreateOperatorRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\Operator $operator, string $operatorId): self + { + return (new self()) + ->setParent($parent) + ->setOperator($operator) + ->setOperatorId($operatorId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $operator_id + * Required. Id of the requesting object. + * @type \Google\Cloud\VisionAI\V1\Operator $operator + * Required. The resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * 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. Value for parent. + * + * 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. Id of the requesting object. + * + * Generated from protobuf field string operator_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOperatorId() + { + return $this->operator_id; + } + + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string operator_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setOperatorId($var) + { + GPBUtil::checkString($var, True); + $this->operator_id = $var; + + return $this; + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Operator|null + */ + public function getOperator() + { + return $this->operator; + } + + public function hasOperator() + { + return isset($this->operator); + } + + public function clearOperator() + { + unset($this->operator); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Operator $var + * @return $this + */ + public function setOperator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Operator::class); + $this->operator = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateProcessRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateProcessRequest.php new file mode 100644 index 000000000000..bdf12be7cf7e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateProcessRequest.php @@ -0,0 +1,237 @@ +google.cloud.visionai.v1.CreateProcessRequest + */ +class CreateProcessRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string process_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $process_id = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $process = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see LiveVideoAnalyticsClient::clusterName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\Process $process Required. The resource being created. + * @param string $processId Required. Id of the requesting object. + * + * @return \Google\Cloud\VisionAI\V1\CreateProcessRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\Process $process, string $processId): self + { + return (new self()) + ->setParent($parent) + ->setProcess($process) + ->setProcessId($processId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $process_id + * Required. Id of the requesting object. + * @type \Google\Cloud\VisionAI\V1\Process $process + * Required. The resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * 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. Value for parent. + * + * 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. Id of the requesting object. + * + * Generated from protobuf field string process_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProcessId() + { + return $this->process_id; + } + + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string process_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProcessId($var) + { + GPBUtil::checkString($var, True); + $this->process_id = $var; + + return $this; + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Process|null + */ + public function getProcess() + { + return $this->process; + } + + public function hasProcess() + { + return isset($this->process); + } + + public function clearProcess() + { + unset($this->process); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Process $var + * @return $this + */ + public function setProcess($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Process::class); + $this->process = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateProcessorRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateProcessorRequest.php new file mode 100644 index 000000000000..93bf4b093abe --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateProcessorRequest.php @@ -0,0 +1,237 @@ +google.cloud.visionai.v1.CreateProcessorRequest + */ +class CreateProcessorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string processor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $processor_id = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $processor = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see AppPlatformClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\Processor $processor Required. The resource being created. + * @param string $processorId Required. Id of the requesting object. + * + * @return \Google\Cloud\VisionAI\V1\CreateProcessorRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\Processor $processor, string $processorId): self + { + return (new self()) + ->setParent($parent) + ->setProcessor($processor) + ->setProcessorId($processorId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $processor_id + * Required. Id of the requesting object. + * @type \Google\Cloud\VisionAI\V1\Processor $processor + * Required. The resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * 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. Value for parent. + * + * 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. Id of the requesting object. + * + * Generated from protobuf field string processor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getProcessorId() + { + return $this->processor_id; + } + + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string processor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setProcessorId($var) + { + GPBUtil::checkString($var, True); + $this->processor_id = $var; + + return $this; + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Processor|null + */ + public function getProcessor() + { + return $this->processor; + } + + public function hasProcessor() + { + return isset($this->processor); + } + + public function clearProcessor() + { + unset($this->processor); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Processor $var + * @return $this + */ + public function setProcessor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Processor::class); + $this->processor = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSearchConfigRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSearchConfigRequest.php new file mode 100644 index 000000000000..0a20460800d7 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSearchConfigRequest.php @@ -0,0 +1,188 @@ +google.cloud.visionai.v1.CreateSearchConfigRequest + */ +class CreateSearchConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this search configuration will be + * created. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The search config to create. + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $search_config = null; + /** + * Required. ID to use for the new search config. Will become the final + * component of the SearchConfig's resource name. This value should be up to + * 63 characters, and valid characters are /[a-z][0-9]-_/. The first character + * must be a letter, the last could be a letter or a number. + * + * Generated from protobuf field string search_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $search_config_id = ''; + + /** + * @param string $parent Required. The parent resource where this search configuration will be + * created. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * Please see {@see WarehouseClient::corpusName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\SearchConfig $searchConfig Required. The search config to create. + * @param string $searchConfigId Required. ID to use for the new search config. Will become the final + * component of the SearchConfig's resource name. This value should be up to + * 63 characters, and valid characters are /[a-z][0-9]-_/. The first character + * must be a letter, the last could be a letter or a number. + * + * @return \Google\Cloud\VisionAI\V1\CreateSearchConfigRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\SearchConfig $searchConfig, string $searchConfigId): self + { + return (new self()) + ->setParent($parent) + ->setSearchConfig($searchConfig) + ->setSearchConfigId($searchConfigId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this search configuration will be + * created. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * @type \Google\Cloud\VisionAI\V1\SearchConfig $search_config + * Required. The search config to create. + * @type string $search_config_id + * Required. ID to use for the new search config. Will become the final + * component of the SearchConfig's resource name. This value should be up to + * 63 characters, and valid characters are /[a-z][0-9]-_/. The first character + * must be a letter, the last could be a letter or a number. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this search configuration will be + * created. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where this search configuration will be + * created. Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Required. The search config to create. + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\SearchConfig|null + */ + public function getSearchConfig() + { + return $this->search_config; + } + + public function hasSearchConfig() + { + return isset($this->search_config); + } + + public function clearSearchConfig() + { + unset($this->search_config); + } + + /** + * Required. The search config to create. + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\SearchConfig $var + * @return $this + */ + public function setSearchConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\SearchConfig::class); + $this->search_config = $var; + + return $this; + } + + /** + * Required. ID to use for the new search config. Will become the final + * component of the SearchConfig's resource name. This value should be up to + * 63 characters, and valid characters are /[a-z][0-9]-_/. The first character + * must be a letter, the last could be a letter or a number. + * + * Generated from protobuf field string search_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSearchConfigId() + { + return $this->search_config_id; + } + + /** + * Required. ID to use for the new search config. Will become the final + * component of the SearchConfig's resource name. This value should be up to + * 63 characters, and valid characters are /[a-z][0-9]-_/. The first character + * must be a letter, the last could be a letter or a number. + * + * Generated from protobuf field string search_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSearchConfigId($var) + { + GPBUtil::checkString($var, True); + $this->search_config_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSearchHypernymRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSearchHypernymRequest.php new file mode 100644 index 000000000000..f353d767c03c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSearchHypernymRequest.php @@ -0,0 +1,183 @@ +google.cloud.visionai.v1.CreateSearchHypernymRequest + */ +class CreateSearchHypernymRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource where this SearchHypernym will be created. + * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The SearchHypernym to create. + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $search_hypernym = null; + /** + * Optional. The search hypernym id. + * If omitted, a random UUID will be generated. + * + * Generated from protobuf field optional string search_hypernym_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $search_hypernym_id = null; + + /** + * @param string $parent Required. The parent resource where this SearchHypernym will be created. + * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` + * Please see {@see WarehouseClient::corpusName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\SearchHypernym $searchHypernym Required. The SearchHypernym to create. + * @param string $searchHypernymId Optional. The search hypernym id. + * If omitted, a random UUID will be generated. + * + * @return \Google\Cloud\VisionAI\V1\CreateSearchHypernymRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\SearchHypernym $searchHypernym, string $searchHypernymId): self + { + return (new self()) + ->setParent($parent) + ->setSearchHypernym($searchHypernym) + ->setSearchHypernymId($searchHypernymId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource where this SearchHypernym will be created. + * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @type \Google\Cloud\VisionAI\V1\SearchHypernym $search_hypernym + * Required. The SearchHypernym to create. + * @type string $search_hypernym_id + * Optional. The search hypernym id. + * If omitted, a random UUID will be generated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource where this SearchHypernym will be created. + * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent resource where this SearchHypernym will be created. + * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * 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 SearchHypernym to create. + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\SearchHypernym|null + */ + public function getSearchHypernym() + { + return $this->search_hypernym; + } + + public function hasSearchHypernym() + { + return isset($this->search_hypernym); + } + + public function clearSearchHypernym() + { + unset($this->search_hypernym); + } + + /** + * Required. The SearchHypernym to create. + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\SearchHypernym $var + * @return $this + */ + public function setSearchHypernym($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\SearchHypernym::class); + $this->search_hypernym = $var; + + return $this; + } + + /** + * Optional. The search hypernym id. + * If omitted, a random UUID will be generated. + * + * Generated from protobuf field optional string search_hypernym_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getSearchHypernymId() + { + return isset($this->search_hypernym_id) ? $this->search_hypernym_id : ''; + } + + public function hasSearchHypernymId() + { + return isset($this->search_hypernym_id); + } + + public function clearSearchHypernymId() + { + unset($this->search_hypernym_id); + } + + /** + * Optional. The search hypernym id. + * If omitted, a random UUID will be generated. + * + * Generated from protobuf field optional string search_hypernym_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setSearchHypernymId($var) + { + GPBUtil::checkString($var, True); + $this->search_hypernym_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSeriesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSeriesRequest.php new file mode 100644 index 000000000000..d738327ece8d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSeriesRequest.php @@ -0,0 +1,237 @@ +google.cloud.visionai.v1.CreateSeriesRequest + */ +class CreateSeriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string series_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $series_id = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $series = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see StreamsServiceClient::clusterName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\Series $series Required. The resource being created. + * @param string $seriesId Required. Id of the requesting object. + * + * @return \Google\Cloud\VisionAI\V1\CreateSeriesRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\Series $series, string $seriesId): self + { + return (new self()) + ->setParent($parent) + ->setSeries($series) + ->setSeriesId($seriesId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $series_id + * Required. Id of the requesting object. + * @type \Google\Cloud\VisionAI\V1\Series $series + * Required. The resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * 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. Value for parent. + * + * 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. Id of the requesting object. + * + * Generated from protobuf field string series_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getSeriesId() + { + return $this->series_id; + } + + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string series_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setSeriesId($var) + { + GPBUtil::checkString($var, True); + $this->series_id = $var; + + return $this; + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Series|null + */ + public function getSeries() + { + return $this->series; + } + + public function hasSeries() + { + return isset($this->series); + } + + public function clearSeries() + { + unset($this->series); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Series $var + * @return $this + */ + public function setSeries($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Series::class); + $this->series = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateStreamRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateStreamRequest.php new file mode 100644 index 000000000000..2d57c7628a8f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateStreamRequest.php @@ -0,0 +1,237 @@ +google.cloud.visionai.v1.CreateStreamRequest + */ +class CreateStreamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $stream_id = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $stream = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see StreamsServiceClient::clusterName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\Stream $stream Required. The resource being created. + * @param string $streamId Required. Id of the requesting object. + * + * @return \Google\Cloud\VisionAI\V1\CreateStreamRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\Stream $stream, string $streamId): self + { + return (new self()) + ->setParent($parent) + ->setStream($stream) + ->setStreamId($streamId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $stream_id + * Required. Id of the requesting object. + * @type \Google\Cloud\VisionAI\V1\Stream $stream + * Required. The resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * 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. Value for parent. + * + * 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. Id of the requesting object. + * + * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getStreamId() + { + return $this->stream_id; + } + + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setStreamId($var) + { + GPBUtil::checkString($var, True); + $this->stream_id = $var; + + return $this; + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Stream|null + */ + public function getStream() + { + return $this->stream; + } + + public function hasStream() + { + return isset($this->stream); + } + + public function clearStream() + { + unset($this->stream); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Stream $var + * @return $this + */ + public function setStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Stream::class); + $this->stream = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Criteria.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Criteria.php new file mode 100644 index 000000000000..49d090a199b6 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Criteria.php @@ -0,0 +1,336 @@ +google.cloud.visionai.v1.Criteria + */ +class Criteria extends \Google\Protobuf\Internal\Message +{ + /** + * The UGA field or ML field to apply filtering criteria. + * + * Generated from protobuf field string field = 1; + */ + protected $field = ''; + /** + * If true, return query matched annotations for this criteria. + * This option is only applicable for inclusion criteria, i.e., not exclusion + * criteria, with partition level annotations. It supports the following data + * types: + * - INTEGER + * - FLOAT + * - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only) + * - BOOLEAN + * + * Generated from protobuf field bool fetch_matched_annotations = 8; + */ + protected $fetch_matched_annotations = false; + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\StringArray $text_array + * The text values associated with the field. + * @type \Google\Cloud\VisionAI\V1\IntRangeArray $int_range_array + * The integer ranges associated with the field. + * @type \Google\Cloud\VisionAI\V1\FloatRangeArray $float_range_array + * The float ranges associated with the field. + * @type \Google\Cloud\VisionAI\V1\DateTimeRangeArray $date_time_range_array + * The datetime ranges associated with the field. + * @type \Google\Cloud\VisionAI\V1\GeoLocationArray $geo_location_array + * Geo Location array. + * @type \Google\Cloud\VisionAI\V1\BoolValue $bool_value + * A Boolean value. + * @type string $field + * The UGA field or ML field to apply filtering criteria. + * @type bool $fetch_matched_annotations + * If true, return query matched annotations for this criteria. + * This option is only applicable for inclusion criteria, i.e., not exclusion + * criteria, with partition level annotations. It supports the following data + * types: + * - INTEGER + * - FLOAT + * - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only) + * - BOOLEAN + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The text values associated with the field. + * + * Generated from protobuf field .google.cloud.visionai.v1.StringArray text_array = 2; + * @return \Google\Cloud\VisionAI\V1\StringArray|null + */ + public function getTextArray() + { + return $this->readOneof(2); + } + + public function hasTextArray() + { + return $this->hasOneof(2); + } + + /** + * The text values associated with the field. + * + * Generated from protobuf field .google.cloud.visionai.v1.StringArray text_array = 2; + * @param \Google\Cloud\VisionAI\V1\StringArray $var + * @return $this + */ + public function setTextArray($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\StringArray::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The integer ranges associated with the field. + * + * Generated from protobuf field .google.cloud.visionai.v1.IntRangeArray int_range_array = 3; + * @return \Google\Cloud\VisionAI\V1\IntRangeArray|null + */ + public function getIntRangeArray() + { + return $this->readOneof(3); + } + + public function hasIntRangeArray() + { + return $this->hasOneof(3); + } + + /** + * The integer ranges associated with the field. + * + * Generated from protobuf field .google.cloud.visionai.v1.IntRangeArray int_range_array = 3; + * @param \Google\Cloud\VisionAI\V1\IntRangeArray $var + * @return $this + */ + public function setIntRangeArray($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\IntRangeArray::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The float ranges associated with the field. + * + * Generated from protobuf field .google.cloud.visionai.v1.FloatRangeArray float_range_array = 4; + * @return \Google\Cloud\VisionAI\V1\FloatRangeArray|null + */ + public function getFloatRangeArray() + { + return $this->readOneof(4); + } + + public function hasFloatRangeArray() + { + return $this->hasOneof(4); + } + + /** + * The float ranges associated with the field. + * + * Generated from protobuf field .google.cloud.visionai.v1.FloatRangeArray float_range_array = 4; + * @param \Google\Cloud\VisionAI\V1\FloatRangeArray $var + * @return $this + */ + public function setFloatRangeArray($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FloatRangeArray::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The datetime ranges associated with the field. + * + * Generated from protobuf field .google.cloud.visionai.v1.DateTimeRangeArray date_time_range_array = 5; + * @return \Google\Cloud\VisionAI\V1\DateTimeRangeArray|null + */ + public function getDateTimeRangeArray() + { + return $this->readOneof(5); + } + + public function hasDateTimeRangeArray() + { + return $this->hasOneof(5); + } + + /** + * The datetime ranges associated with the field. + * + * Generated from protobuf field .google.cloud.visionai.v1.DateTimeRangeArray date_time_range_array = 5; + * @param \Google\Cloud\VisionAI\V1\DateTimeRangeArray $var + * @return $this + */ + public function setDateTimeRangeArray($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DateTimeRangeArray::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Geo Location array. + * + * Generated from protobuf field .google.cloud.visionai.v1.GeoLocationArray geo_location_array = 6; + * @return \Google\Cloud\VisionAI\V1\GeoLocationArray|null + */ + public function getGeoLocationArray() + { + return $this->readOneof(6); + } + + public function hasGeoLocationArray() + { + return $this->hasOneof(6); + } + + /** + * Geo Location array. + * + * Generated from protobuf field .google.cloud.visionai.v1.GeoLocationArray geo_location_array = 6; + * @param \Google\Cloud\VisionAI\V1\GeoLocationArray $var + * @return $this + */ + public function setGeoLocationArray($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\GeoLocationArray::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * A Boolean value. + * + * Generated from protobuf field .google.cloud.visionai.v1.BoolValue bool_value = 7; + * @return \Google\Cloud\VisionAI\V1\BoolValue|null + */ + public function getBoolValue() + { + return $this->readOneof(7); + } + + public function hasBoolValue() + { + return $this->hasOneof(7); + } + + /** + * A Boolean value. + * + * Generated from protobuf field .google.cloud.visionai.v1.BoolValue bool_value = 7; + * @param \Google\Cloud\VisionAI\V1\BoolValue $var + * @return $this + */ + public function setBoolValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\BoolValue::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * The UGA field or ML field to apply filtering criteria. + * + * Generated from protobuf field string field = 1; + * @return string + */ + public function getField() + { + return $this->field; + } + + /** + * The UGA field or ML field to apply filtering criteria. + * + * Generated from protobuf field string field = 1; + * @param string $var + * @return $this + */ + public function setField($var) + { + GPBUtil::checkString($var, True); + $this->field = $var; + + return $this; + } + + /** + * If true, return query matched annotations for this criteria. + * This option is only applicable for inclusion criteria, i.e., not exclusion + * criteria, with partition level annotations. It supports the following data + * types: + * - INTEGER + * - FLOAT + * - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only) + * - BOOLEAN + * + * Generated from protobuf field bool fetch_matched_annotations = 8; + * @return bool + */ + public function getFetchMatchedAnnotations() + { + return $this->fetch_matched_annotations; + } + + /** + * If true, return query matched annotations for this criteria. + * This option is only applicable for inclusion criteria, i.e., not exclusion + * criteria, with partition level annotations. It supports the following data + * types: + * - INTEGER + * - FLOAT + * - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only) + * - BOOLEAN + * + * Generated from protobuf field bool fetch_matched_annotations = 8; + * @param bool $var + * @return $this + */ + public function setFetchMatchedAnnotations($var) + { + GPBUtil::checkBool($var); + $this->fetch_matched_annotations = $var; + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo.php new file mode 100644 index 000000000000..ad6f4f33263b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo.php @@ -0,0 +1,240 @@ +google.cloud.visionai.v1.CustomProcessorSourceInfo + */ +class CustomProcessorSourceInfo extends \Google\Protobuf\Internal\Message +{ + /** + * The original product which holds the custom processor's functionality. + * + * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; + */ + protected $source_type = 0; + /** + * Output only. Additional info related to the imported custom processor. + * Data is filled in by app platform during the processor creation. + * + * Generated from protobuf field map additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $additional_info; + /** + * Model schema files which specifies the signature of the model. + * For VERTEX_CUSTOM models, instances schema is required. + * If instances schema is not specified during the processor creation, + * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the + * creation will fail. + * + * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; + */ + protected $model_schema = null; + protected $artifact_path; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $vertex_model + * The resource name original model hosted in the vertex AI platform. + * @type \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo\ProductRecognizerArtifact $product_recognizer_artifact + * Artifact for product recognizer. + * @type int $source_type + * The original product which holds the custom processor's functionality. + * @type array|\Google\Protobuf\Internal\MapField $additional_info + * Output only. Additional info related to the imported custom processor. + * Data is filled in by app platform during the processor creation. + * @type \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo\ModelSchema $model_schema + * Model schema files which specifies the signature of the model. + * For VERTEX_CUSTOM models, instances schema is required. + * If instances schema is not specified during the processor creation, + * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the + * creation will fail. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * The resource name original model hosted in the vertex AI platform. + * + * Generated from protobuf field string vertex_model = 2; + * @return string + */ + public function getVertexModel() + { + return $this->readOneof(2); + } + + public function hasVertexModel() + { + return $this->hasOneof(2); + } + + /** + * The resource name original model hosted in the vertex AI platform. + * + * Generated from protobuf field string vertex_model = 2; + * @param string $var + * @return $this + */ + public function setVertexModel($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Artifact for product recognizer. + * + * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; + * @return \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo\ProductRecognizerArtifact|null + */ + public function getProductRecognizerArtifact() + { + return $this->readOneof(3); + } + + public function hasProductRecognizerArtifact() + { + return $this->hasOneof(3); + } + + /** + * Artifact for product recognizer. + * + * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; + * @param \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo\ProductRecognizerArtifact $var + * @return $this + */ + public function setProductRecognizerArtifact($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo\ProductRecognizerArtifact::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The original product which holds the custom processor's functionality. + * + * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; + * @return int + */ + public function getSourceType() + { + return $this->source_type; + } + + /** + * The original product which holds the custom processor's functionality. + * + * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; + * @param int $var + * @return $this + */ + public function setSourceType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo\SourceType::class); + $this->source_type = $var; + + return $this; + } + + /** + * Output only. Additional info related to the imported custom processor. + * Data is filled in by app platform during the processor creation. + * + * Generated from protobuf field map additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAdditionalInfo() + { + return $this->additional_info; + } + + /** + * Output only. Additional info related to the imported custom processor. + * Data is filled in by app platform during the processor creation. + * + * Generated from protobuf field map additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAdditionalInfo($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->additional_info = $arr; + + return $this; + } + + /** + * Model schema files which specifies the signature of the model. + * For VERTEX_CUSTOM models, instances schema is required. + * If instances schema is not specified during the processor creation, + * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the + * creation will fail. + * + * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; + * @return \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo\ModelSchema|null + */ + public function getModelSchema() + { + return $this->model_schema; + } + + public function hasModelSchema() + { + return isset($this->model_schema); + } + + public function clearModelSchema() + { + unset($this->model_schema); + } + + /** + * Model schema files which specifies the signature of the model. + * For VERTEX_CUSTOM models, instances schema is required. + * If instances schema is not specified during the processor creation, + * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the + * creation will fail. + * + * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; + * @param \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo\ModelSchema $var + * @return $this + */ + public function setModelSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo\ModelSchema::class); + $this->model_schema = $var; + + return $this; + } + + /** + * @return string + */ + public function getArtifactPath() + { + return $this->whichOneof("artifact_path"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/ModelSchema.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/ModelSchema.php new file mode 100644 index 000000000000..048786c95619 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/ModelSchema.php @@ -0,0 +1,178 @@ +google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema + */ +class ModelSchema extends \Google\Protobuf\Internal\Message +{ + /** + * Cloud Storage location to a YAML file that defines the format of a single + * instance used in prediction and explanation requests. + * + * Generated from protobuf field .google.cloud.visionai.v1.GcsSource instances_schema = 1; + */ + protected $instances_schema = null; + /** + * Cloud Storage location to a YAML file that defines the prediction and + * explanation parameters. + * + * Generated from protobuf field .google.cloud.visionai.v1.GcsSource parameters_schema = 2; + */ + protected $parameters_schema = null; + /** + * Cloud Storage location to a YAML file that defines the format of a single + * prediction or explanation. + * + * Generated from protobuf field .google.cloud.visionai.v1.GcsSource predictions_schema = 3; + */ + protected $predictions_schema = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\GcsSource $instances_schema + * Cloud Storage location to a YAML file that defines the format of a single + * instance used in prediction and explanation requests. + * @type \Google\Cloud\VisionAI\V1\GcsSource $parameters_schema + * Cloud Storage location to a YAML file that defines the prediction and + * explanation parameters. + * @type \Google\Cloud\VisionAI\V1\GcsSource $predictions_schema + * Cloud Storage location to a YAML file that defines the format of a single + * prediction or explanation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Cloud Storage location to a YAML file that defines the format of a single + * instance used in prediction and explanation requests. + * + * Generated from protobuf field .google.cloud.visionai.v1.GcsSource instances_schema = 1; + * @return \Google\Cloud\VisionAI\V1\GcsSource|null + */ + public function getInstancesSchema() + { + return $this->instances_schema; + } + + public function hasInstancesSchema() + { + return isset($this->instances_schema); + } + + public function clearInstancesSchema() + { + unset($this->instances_schema); + } + + /** + * Cloud Storage location to a YAML file that defines the format of a single + * instance used in prediction and explanation requests. + * + * Generated from protobuf field .google.cloud.visionai.v1.GcsSource instances_schema = 1; + * @param \Google\Cloud\VisionAI\V1\GcsSource $var + * @return $this + */ + public function setInstancesSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\GcsSource::class); + $this->instances_schema = $var; + + return $this; + } + + /** + * Cloud Storage location to a YAML file that defines the prediction and + * explanation parameters. + * + * Generated from protobuf field .google.cloud.visionai.v1.GcsSource parameters_schema = 2; + * @return \Google\Cloud\VisionAI\V1\GcsSource|null + */ + public function getParametersSchema() + { + return $this->parameters_schema; + } + + public function hasParametersSchema() + { + return isset($this->parameters_schema); + } + + public function clearParametersSchema() + { + unset($this->parameters_schema); + } + + /** + * Cloud Storage location to a YAML file that defines the prediction and + * explanation parameters. + * + * Generated from protobuf field .google.cloud.visionai.v1.GcsSource parameters_schema = 2; + * @param \Google\Cloud\VisionAI\V1\GcsSource $var + * @return $this + */ + public function setParametersSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\GcsSource::class); + $this->parameters_schema = $var; + + return $this; + } + + /** + * Cloud Storage location to a YAML file that defines the format of a single + * prediction or explanation. + * + * Generated from protobuf field .google.cloud.visionai.v1.GcsSource predictions_schema = 3; + * @return \Google\Cloud\VisionAI\V1\GcsSource|null + */ + public function getPredictionsSchema() + { + return $this->predictions_schema; + } + + public function hasPredictionsSchema() + { + return isset($this->predictions_schema); + } + + public function clearPredictionsSchema() + { + unset($this->predictions_schema); + } + + /** + * Cloud Storage location to a YAML file that defines the format of a single + * prediction or explanation. + * + * Generated from protobuf field .google.cloud.visionai.v1.GcsSource predictions_schema = 3; + * @param \Google\Cloud\VisionAI\V1\GcsSource $var + * @return $this + */ + public function setPredictionsSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\GcsSource::class); + $this->predictions_schema = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/ProductRecognizerArtifact.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/ProductRecognizerArtifact.php new file mode 100644 index 000000000000..1f577b71cc48 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/ProductRecognizerArtifact.php @@ -0,0 +1,113 @@ +google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact + */ +class ProductRecognizerArtifact extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of RetailProductRecognitionIndex. + * Format is + * 'projects/{@*}locations/{@*}retailCatalogs/{@*}retailProductRecognitionIndexes/*' + * + * Generated from protobuf field string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $retail_product_recognition_index = ''; + /** + * Optional. The resource name of embedding model hosted in Vertex AI + * Platform. + * + * Generated from protobuf field string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $vertex_model = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $retail_product_recognition_index + * Required. Resource name of RetailProductRecognitionIndex. + * Format is + * 'projects/{@*}locations/{@*}retailCatalogs/{@*}retailProductRecognitionIndexes/*' + * @type string $vertex_model + * Optional. The resource name of embedding model hosted in Vertex AI + * Platform. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of RetailProductRecognitionIndex. + * Format is + * 'projects/{@*}locations/{@*}retailCatalogs/{@*}retailProductRecognitionIndexes/*' + * + * Generated from protobuf field string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getRetailProductRecognitionIndex() + { + return $this->retail_product_recognition_index; + } + + /** + * Required. Resource name of RetailProductRecognitionIndex. + * Format is + * 'projects/{@*}locations/{@*}retailCatalogs/{@*}retailProductRecognitionIndexes/*' + * + * Generated from protobuf field string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setRetailProductRecognitionIndex($var) + { + GPBUtil::checkString($var, True); + $this->retail_product_recognition_index = $var; + + return $this; + } + + /** + * Optional. The resource name of embedding model hosted in Vertex AI + * Platform. + * + * Generated from protobuf field string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getVertexModel() + { + return $this->vertex_model; + } + + /** + * Optional. The resource name of embedding model hosted in Vertex AI + * Platform. + * + * Generated from protobuf field string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setVertexModel($var) + { + GPBUtil::checkString($var, True); + $this->vertex_model = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/SourceType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/SourceType.php new file mode 100644 index 000000000000..e168c6a873c8 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/SourceType.php @@ -0,0 +1,68 @@ +google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType + */ +class SourceType +{ + /** + * Source type unspecified. + * + * Generated from protobuf enum SOURCE_TYPE_UNSPECIFIED = 0; + */ + const SOURCE_TYPE_UNSPECIFIED = 0; + /** + * Custom processors coming from Vertex AutoML product. + * + * Generated from protobuf enum VERTEX_AUTOML = 1; + */ + const VERTEX_AUTOML = 1; + /** + * Custom processors coming from general custom models from Vertex. + * + * Generated from protobuf enum VERTEX_CUSTOM = 2; + */ + const VERTEX_CUSTOM = 2; + /** + * Source for Product Recognizer. + * + * Generated from protobuf enum PRODUCT_RECOGNIZER = 3; + */ + const PRODUCT_RECOGNIZER = 3; + + private static $valueToName = [ + self::SOURCE_TYPE_UNSPECIFIED => 'SOURCE_TYPE_UNSPECIFIED', + self::VERTEX_AUTOML => 'VERTEX_AUTOML', + self::VERTEX_CUSTOM => 'VERTEX_CUSTOM', + self::PRODUCT_RECOGNIZER => 'PRODUCT_RECOGNIZER', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchema.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchema.php new file mode 100644 index 000000000000..fa76b7726b00 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchema.php @@ -0,0 +1,166 @@ +google.cloud.visionai.v1.DataSchema + */ +class DataSchema extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the data schema in the form of: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` + * where {data_schema} part should be the same as the `key` field below. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Required. The key of this data schema. This key should be matching the key + * of user specified annotation and unique inside corpus. This value can be up + * to 63 characters, and valid characters are /[a-z][0-9]-/. The first + * character must be a letter, the last could be a letter or a number. + * + * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $key = ''; + /** + * The schema details mapping to the key. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; + */ + protected $schema_details = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the data schema in the form of: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` + * where {data_schema} part should be the same as the `key` field below. + * @type string $key + * Required. The key of this data schema. This key should be matching the key + * of user specified annotation and unique inside corpus. This value can be up + * to 63 characters, and valid characters are /[a-z][0-9]-/. The first + * character must be a letter, the last could be a letter or a number. + * @type \Google\Cloud\VisionAI\V1\DataSchemaDetails $schema_details + * The schema details mapping to the key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the data schema in the form of: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` + * where {data_schema} part should be the same as the `key` field below. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the data schema in the form of: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` + * where {data_schema} part should be the same as the `key` field below. + * + * 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 key of this data schema. This key should be matching the key + * of user specified annotation and unique inside corpus. This value can be up + * to 63 characters, and valid characters are /[a-z][0-9]-/. The first + * character must be a letter, the last could be a letter or a number. + * + * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Required. The key of this data schema. This key should be matching the key + * of user specified annotation and unique inside corpus. This value can be up + * to 63 characters, and valid characters are /[a-z][0-9]-/. The first + * character must be a letter, the last could be a letter or a number. + * + * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The schema details mapping to the key. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; + * @return \Google\Cloud\VisionAI\V1\DataSchemaDetails|null + */ + public function getSchemaDetails() + { + return $this->schema_details; + } + + public function hasSchemaDetails() + { + return isset($this->schema_details); + } + + public function clearSchemaDetails() + { + unset($this->schema_details); + } + + /** + * The schema details mapping to the key. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; + * @param \Google\Cloud\VisionAI\V1\DataSchemaDetails $var + * @return $this + */ + public function setSchemaDetails($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails::class); + $this->schema_details = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails.php new file mode 100644 index 000000000000..3dfda71dfd7c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails.php @@ -0,0 +1,298 @@ +google.cloud.visionai.v1.DataSchemaDetails + */ +class DataSchemaDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Type of the annotation. + * + * Generated from protobuf field optional .google.cloud.visionai.v1.DataSchemaDetails.DataType type = 1; + */ + protected $type = null; + /** + * Config for protobuf any type. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; + */ + protected $proto_any_config = null; + /** + * Config for List data type. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; + */ + protected $list_config = null; + /** + * Config for CustomizedStruct data type. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; + */ + protected $customized_struct_config = null; + /** + * The granularity associated with this DataSchema. + * + * Generated from protobuf field optional .google.cloud.visionai.v1.DataSchemaDetails.Granularity granularity = 5; + */ + protected $granularity = null; + /** + * The search strategy to be applied on the `key` above. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; + */ + protected $search_strategy = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Type of the annotation. + * @type \Google\Cloud\VisionAI\V1\DataSchemaDetails\ProtoAnyConfig $proto_any_config + * Config for protobuf any type. + * @type \Google\Cloud\VisionAI\V1\DataSchemaDetails\ListConfig $list_config + * Config for List data type. + * @type \Google\Cloud\VisionAI\V1\DataSchemaDetails\CustomizedStructConfig $customized_struct_config + * Config for CustomizedStruct data type. + * @type int $granularity + * The granularity associated with this DataSchema. + * @type \Google\Cloud\VisionAI\V1\DataSchemaDetails\SearchStrategy $search_strategy + * The search strategy to be applied on the `key` above. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Type of the annotation. + * + * Generated from protobuf field optional .google.cloud.visionai.v1.DataSchemaDetails.DataType type = 1; + * @return int + */ + public function getType() + { + return isset($this->type) ? $this->type : 0; + } + + public function hasType() + { + return isset($this->type); + } + + public function clearType() + { + unset($this->type); + } + + /** + * Type of the annotation. + * + * Generated from protobuf field optional .google.cloud.visionai.v1.DataSchemaDetails.DataType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails\DataType::class); + $this->type = $var; + + return $this; + } + + /** + * Config for protobuf any type. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; + * @return \Google\Cloud\VisionAI\V1\DataSchemaDetails\ProtoAnyConfig|null + */ + public function getProtoAnyConfig() + { + return $this->proto_any_config; + } + + public function hasProtoAnyConfig() + { + return isset($this->proto_any_config); + } + + public function clearProtoAnyConfig() + { + unset($this->proto_any_config); + } + + /** + * Config for protobuf any type. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; + * @param \Google\Cloud\VisionAI\V1\DataSchemaDetails\ProtoAnyConfig $var + * @return $this + */ + public function setProtoAnyConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails\ProtoAnyConfig::class); + $this->proto_any_config = $var; + + return $this; + } + + /** + * Config for List data type. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; + * @return \Google\Cloud\VisionAI\V1\DataSchemaDetails\ListConfig|null + */ + public function getListConfig() + { + return $this->list_config; + } + + public function hasListConfig() + { + return isset($this->list_config); + } + + public function clearListConfig() + { + unset($this->list_config); + } + + /** + * Config for List data type. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; + * @param \Google\Cloud\VisionAI\V1\DataSchemaDetails\ListConfig $var + * @return $this + */ + public function setListConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails\ListConfig::class); + $this->list_config = $var; + + return $this; + } + + /** + * Config for CustomizedStruct data type. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; + * @return \Google\Cloud\VisionAI\V1\DataSchemaDetails\CustomizedStructConfig|null + */ + public function getCustomizedStructConfig() + { + return $this->customized_struct_config; + } + + public function hasCustomizedStructConfig() + { + return isset($this->customized_struct_config); + } + + public function clearCustomizedStructConfig() + { + unset($this->customized_struct_config); + } + + /** + * Config for CustomizedStruct data type. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; + * @param \Google\Cloud\VisionAI\V1\DataSchemaDetails\CustomizedStructConfig $var + * @return $this + */ + public function setCustomizedStructConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails\CustomizedStructConfig::class); + $this->customized_struct_config = $var; + + return $this; + } + + /** + * The granularity associated with this DataSchema. + * + * Generated from protobuf field optional .google.cloud.visionai.v1.DataSchemaDetails.Granularity granularity = 5; + * @return int + */ + public function getGranularity() + { + return isset($this->granularity) ? $this->granularity : 0; + } + + public function hasGranularity() + { + return isset($this->granularity); + } + + public function clearGranularity() + { + unset($this->granularity); + } + + /** + * The granularity associated with this DataSchema. + * + * Generated from protobuf field optional .google.cloud.visionai.v1.DataSchemaDetails.Granularity granularity = 5; + * @param int $var + * @return $this + */ + public function setGranularity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails\Granularity::class); + $this->granularity = $var; + + return $this; + } + + /** + * The search strategy to be applied on the `key` above. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; + * @return \Google\Cloud\VisionAI\V1\DataSchemaDetails\SearchStrategy|null + */ + public function getSearchStrategy() + { + return $this->search_strategy; + } + + public function hasSearchStrategy() + { + return isset($this->search_strategy); + } + + public function clearSearchStrategy() + { + unset($this->search_strategy); + } + + /** + * The search strategy to be applied on the `key` above. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; + * @param \Google\Cloud\VisionAI\V1\DataSchemaDetails\SearchStrategy $var + * @return $this + */ + public function setSearchStrategy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails\SearchStrategy::class); + $this->search_strategy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/CustomizedStructConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/CustomizedStructConfig.php new file mode 100644 index 000000000000..806eaf501a6e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/CustomizedStructConfig.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig + */ +class CustomizedStructConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Direct child elements data schemas. + * + * Generated from protobuf field map field_schemas = 1; + */ + private $field_schemas; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array|\Google\Protobuf\Internal\MapField $field_schemas + * Direct child elements data schemas. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Direct child elements data schemas. + * + * Generated from protobuf field map field_schemas = 1; + * @return \Google\Protobuf\Internal\MapField + */ + public function getFieldSchemas() + { + return $this->field_schemas; + } + + /** + * Direct child elements data schemas. + * + * Generated from protobuf field map field_schemas = 1; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setFieldSchemas($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\DataSchemaDetails::class); + $this->field_schemas = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/DataType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/DataType.php new file mode 100644 index 000000000000..a1ee8a987e2c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/DataType.php @@ -0,0 +1,176 @@ +google.cloud.visionai.v1.DataSchemaDetails.DataType + */ +class DataType +{ + /** + * Unspecified type. + * + * Generated from protobuf enum DATA_TYPE_UNSPECIFIED = 0; + */ + const DATA_TYPE_UNSPECIFIED = 0; + /** + * Integer type. + * Allowed search strategies: + * - DataSchema.SearchStrategy.NO_SEARCH, + * - DataSchema.SearchStrategy.EXACT_SEARCH. + * Supports query by IntRangeArray. + * + * Generated from protobuf enum INTEGER = 1; + */ + const INTEGER = 1; + /** + * Float type. + * Allowed search strategies: + * - DataSchema.SearchStrategy.NO_SEARCH, + * - DataSchema.SearchStrategy.EXACT_SEARCH. + * Supports query by FloatRangeArray. + * + * Generated from protobuf enum FLOAT = 2; + */ + const FLOAT = 2; + /** + * String type. + * Allowed search strategies: + * - DataSchema.SearchStrategy.NO_SEARCH, + * - DataSchema.SearchStrategy.EXACT_SEARCH, + * - DataSchema.SearchStrategy.SMART_SEARCH. + * + * Generated from protobuf enum STRING = 3; + */ + const STRING = 3; + /** + * Supported formats: + * %Y-%m-%dT%H:%M:%E*S%E*z (absl::RFC3339_full) + * %Y-%m-%dT%H:%M:%E*S + * %Y-%m-%dT%H:%M%E*z + * %Y-%m-%dT%H:%M + * %Y-%m-%dT%H%E*z + * %Y-%m-%dT%H + * %Y-%m-%d%E*z + * %Y-%m-%d + * %Y-%m + * %Y + * Allowed search strategies: + * - DataSchema.SearchStrategy.NO_SEARCH, + * - DataSchema.SearchStrategy.EXACT_SEARCH. + * Supports query by DateTimeRangeArray. + * + * Generated from protobuf enum DATETIME = 5; + */ + const DATETIME = 5; + /** + * Geo coordinate type. + * Allowed search strategies: + * - DataSchema.SearchStrategy.NO_SEARCH, + * - DataSchema.SearchStrategy.EXACT_SEARCH. + * Supports query by GeoLocationArray. + * + * Generated from protobuf enum GEO_COORDINATE = 7; + */ + const GEO_COORDINATE = 7; + /** + * Type to pass any proto as available in annotations.proto. Only use + * internally. + * Available proto types and its corresponding search behavior: + * - ImageObjectDetectionPredictionResult, allows SMART_SEARCH on + * display_names and NO_SEARCH. + * - ClassificationPredictionResult, allows SMART_SEARCH on display_names + * and NO_SEARCH. + * - ImageSegmentationPredictionResult, allows NO_SEARCH. + * - VideoActionRecognitionPredictionResult, allows SMART_SEARCH on + * display_name and NO_SEARCH. + * - VideoObjectTrackingPredictionResult, allows SMART_SEARCH on + * display_name and NO_SEARCH. + * - VideoClassificationPredictionResult, allows SMART_SEARCH on + * display_name and NO_SEARCH. + * - OccupancyCountingPredictionResult, allows EXACT_SEARCH on + * stats.full_frame_count.count and NO_SEARCH. + * - ObjectDetectionPredictionResult, allows SMART_SEARCH on + * identified_boxes.entity.label_string and NO_SEARCH. + * + * Generated from protobuf enum PROTO_ANY = 8; + */ + const PROTO_ANY = 8; + /** + * Boolean type. + * Allowed search strategies: + * - DataSchema.SearchStrategy.NO_SEARCH, + * - DataSchema.SearchStrategy.EXACT_SEARCH. + * + * Generated from protobuf enum BOOLEAN = 9; + */ + const BOOLEAN = 9; + /** + * List type. + * - Each element in the list must be of the exact same data schema; + * otherwise, they are invalid arguments. + * - List level cannot set search strategy. Leaf node level can do. + * - Elements cannot be another list (no list of list). + * - Elements can be CUSTOMIZED_STRUCT, and max number of layers is 10. + * + * Generated from protobuf enum LIST = 10; + */ + const PBLIST = 10; + /** + * Struct type. + * - SearchStrategy: + * * Data Schema that's CUSTOMIZED_STRUCT cannot set search strategy. + * * Leaf-node elements allow setting search strategy based on element's + * SearchStrategy restriction. + * - Nested layer restrictions: + * * Data Schema that's CUSTOMIZED_STRUCT allows its fields to be of + * CUSTOMIZED_STRUCT as well, but the overall layers restriction is 10. + * + * Generated from protobuf enum CUSTOMIZED_STRUCT = 6; + */ + const CUSTOMIZED_STRUCT = 6; + + private static $valueToName = [ + self::DATA_TYPE_UNSPECIFIED => 'DATA_TYPE_UNSPECIFIED', + self::INTEGER => 'INTEGER', + self::FLOAT => 'FLOAT', + self::STRING => 'STRING', + self::DATETIME => 'DATETIME', + self::GEO_COORDINATE => 'GEO_COORDINATE', + self::PROTO_ANY => 'PROTO_ANY', + self::BOOLEAN => 'BOOLEAN', + self::PBLIST => 'LIST', + self::CUSTOMIZED_STRUCT => 'CUSTOMIZED_STRUCT', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/Granularity.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/Granularity.php new file mode 100644 index 000000000000..21306761f205 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/Granularity.php @@ -0,0 +1,61 @@ +google.cloud.visionai.v1.DataSchemaDetails.Granularity + */ +class Granularity +{ + /** + * Unspecified granularity. + * + * Generated from protobuf enum GRANULARITY_UNSPECIFIED = 0; + */ + const GRANULARITY_UNSPECIFIED = 0; + /** + * Asset-level granularity (annotations must not contain partition info). + * + * Generated from protobuf enum GRANULARITY_ASSET_LEVEL = 1; + */ + const GRANULARITY_ASSET_LEVEL = 1; + /** + * Partition-level granularity (annotations must contain partition info). + * + * Generated from protobuf enum GRANULARITY_PARTITION_LEVEL = 2; + */ + const GRANULARITY_PARTITION_LEVEL = 2; + + private static $valueToName = [ + self::GRANULARITY_UNSPECIFIED => 'GRANULARITY_UNSPECIFIED', + self::GRANULARITY_ASSET_LEVEL => 'GRANULARITY_ASSET_LEVEL', + self::GRANULARITY_PARTITION_LEVEL => 'GRANULARITY_PARTITION_LEVEL', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/ListConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/ListConfig.php new file mode 100644 index 000000000000..6f334d263540 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/ListConfig.php @@ -0,0 +1,77 @@ +google.cloud.visionai.v1.DataSchemaDetails.ListConfig + */ +class ListConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The value's data schema in the list. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; + */ + protected $value_schema = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\DataSchemaDetails $value_schema + * The value's data schema in the list. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The value's data schema in the list. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; + * @return \Google\Cloud\VisionAI\V1\DataSchemaDetails|null + */ + public function getValueSchema() + { + return $this->value_schema; + } + + public function hasValueSchema() + { + return isset($this->value_schema); + } + + public function clearValueSchema() + { + unset($this->value_schema); + } + + /** + * The value's data schema in the list. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; + * @param \Google\Cloud\VisionAI\V1\DataSchemaDetails $var + * @return $this + */ + public function setValueSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails::class); + $this->value_schema = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/ProtoAnyConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/ProtoAnyConfig.php new file mode 100644 index 000000000000..637d4b6cf497 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/ProtoAnyConfig.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig + */ +class ProtoAnyConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The type URI of the proto message. + * + * Generated from protobuf field string type_uri = 1; + */ + protected $type_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type_uri + * The type URI of the proto message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The type URI of the proto message. + * + * Generated from protobuf field string type_uri = 1; + * @return string + */ + public function getTypeUri() + { + return $this->type_uri; + } + + /** + * The type URI of the proto message. + * + * Generated from protobuf field string type_uri = 1; + * @param string $var + * @return $this + */ + public function setTypeUri($var) + { + GPBUtil::checkString($var, True); + $this->type_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy.php new file mode 100644 index 000000000000..4b036187b462 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy.php @@ -0,0 +1,149 @@ +google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy + */ +class SearchStrategy extends \Google\Protobuf\Internal\Message +{ + /** + * The type of search strategy to be applied on the `key` above. + * The allowed `search_strategy_type` is different for different data types, + * which is documented in the DataSchemaDetails.DataType. Specifying + * unsupported `search_strategy_type` for data types will result in + * INVALID_ARGUMENT error. + * + * Generated from protobuf field optional .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType search_strategy_type = 1; + */ + protected $search_strategy_type = null; + /** + * Optional. Configs the path to the confidence score, and the threshold. + * Only if the score is greater than the threshold, current field will be + * built into the index. Only applies to leaf nodes using EXACT_SEARCH or + * SMART_SEARCH. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $confidence_score_index_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $search_strategy_type + * The type of search strategy to be applied on the `key` above. + * The allowed `search_strategy_type` is different for different data types, + * which is documented in the DataSchemaDetails.DataType. Specifying + * unsupported `search_strategy_type` for data types will result in + * INVALID_ARGUMENT error. + * @type \Google\Cloud\VisionAI\V1\DataSchemaDetails\SearchStrategy\ConfidenceScoreIndexConfig $confidence_score_index_config + * Optional. Configs the path to the confidence score, and the threshold. + * Only if the score is greater than the threshold, current field will be + * built into the index. Only applies to leaf nodes using EXACT_SEARCH or + * SMART_SEARCH. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The type of search strategy to be applied on the `key` above. + * The allowed `search_strategy_type` is different for different data types, + * which is documented in the DataSchemaDetails.DataType. Specifying + * unsupported `search_strategy_type` for data types will result in + * INVALID_ARGUMENT error. + * + * Generated from protobuf field optional .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType search_strategy_type = 1; + * @return int + */ + public function getSearchStrategyType() + { + return isset($this->search_strategy_type) ? $this->search_strategy_type : 0; + } + + public function hasSearchStrategyType() + { + return isset($this->search_strategy_type); + } + + public function clearSearchStrategyType() + { + unset($this->search_strategy_type); + } + + /** + * The type of search strategy to be applied on the `key` above. + * The allowed `search_strategy_type` is different for different data types, + * which is documented in the DataSchemaDetails.DataType. Specifying + * unsupported `search_strategy_type` for data types will result in + * INVALID_ARGUMENT error. + * + * Generated from protobuf field optional .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType search_strategy_type = 1; + * @param int $var + * @return $this + */ + public function setSearchStrategyType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails\SearchStrategy\SearchStrategyType::class); + $this->search_strategy_type = $var; + + return $this; + } + + /** + * Optional. Configs the path to the confidence score, and the threshold. + * Only if the score is greater than the threshold, current field will be + * built into the index. Only applies to leaf nodes using EXACT_SEARCH or + * SMART_SEARCH. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VisionAI\V1\DataSchemaDetails\SearchStrategy\ConfidenceScoreIndexConfig|null + */ + public function getConfidenceScoreIndexConfig() + { + return $this->confidence_score_index_config; + } + + public function hasConfidenceScoreIndexConfig() + { + return isset($this->confidence_score_index_config); + } + + public function clearConfidenceScoreIndexConfig() + { + unset($this->confidence_score_index_config); + } + + /** + * Optional. Configs the path to the confidence score, and the threshold. + * Only if the score is greater than the threshold, current field will be + * built into the index. Only applies to leaf nodes using EXACT_SEARCH or + * SMART_SEARCH. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VisionAI\V1\DataSchemaDetails\SearchStrategy\ConfidenceScoreIndexConfig $var + * @return $this + */ + public function setConfidenceScoreIndexConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails\SearchStrategy\ConfidenceScoreIndexConfig::class); + $this->confidence_score_index_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy/ConfidenceScoreIndexConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy/ConfidenceScoreIndexConfig.php new file mode 100644 index 000000000000..f50e6fbe02e4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy/ConfidenceScoreIndexConfig.php @@ -0,0 +1,258 @@ + 0.6 will be indexed. + * + * Generated from protobuf message google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig + */ +class ConfidenceScoreIndexConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The path to the confidence score field. It is a string that + * concatenates all the data schema keys along the path. See the example + * above. If the data schema contains LIST, use '_ENTRIES' to concatenate. + * Example data schema contains a list: + * "key": "list-name-score", + * "schemaDetails": { + * "type": "LIST", + * "granularity": "GRANULARITY_PARTITION_LEVEL", + * "listConfig": { + * "valueSchema": { + * "type": "CUSTOMIZED_STRUCT", + * "granularity": "GRANULARITY_PARTITION_LEVEL", + * "customizedStructConfig": { + * "fieldSchemas": { + * "name": { + * "type": "STRING", + * "granularity": "GRANULARITY_PARTITION_LEVEL", + * "searchStrategy": { + * "searchStrategyType": "SMART_SEARCH" + * "confidence_score_index_config": { + * "field_path": "list-name-score._ENTRIES.score", + * "threshold": "0.9", + * } + * } + * }, + * "score": { + * "type": "FLOAT", + * "granularity": "GRANULARITY_PARTITION_LEVEL", + * } + * } + * } + * } + * } + * } + * + * Generated from protobuf field string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $field_path = ''; + /** + * Required. The threshold. + * + * Generated from protobuf field float threshold = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $threshold = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $field_path + * Required. The path to the confidence score field. It is a string that + * concatenates all the data schema keys along the path. See the example + * above. If the data schema contains LIST, use '_ENTRIES' to concatenate. + * Example data schema contains a list: + * "key": "list-name-score", + * "schemaDetails": { + * "type": "LIST", + * "granularity": "GRANULARITY_PARTITION_LEVEL", + * "listConfig": { + * "valueSchema": { + * "type": "CUSTOMIZED_STRUCT", + * "granularity": "GRANULARITY_PARTITION_LEVEL", + * "customizedStructConfig": { + * "fieldSchemas": { + * "name": { + * "type": "STRING", + * "granularity": "GRANULARITY_PARTITION_LEVEL", + * "searchStrategy": { + * "searchStrategyType": "SMART_SEARCH" + * "confidence_score_index_config": { + * "field_path": "list-name-score._ENTRIES.score", + * "threshold": "0.9", + * } + * } + * }, + * "score": { + * "type": "FLOAT", + * "granularity": "GRANULARITY_PARTITION_LEVEL", + * } + * } + * } + * } + * } + * } + * @type float $threshold + * Required. The threshold. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The path to the confidence score field. It is a string that + * concatenates all the data schema keys along the path. See the example + * above. If the data schema contains LIST, use '_ENTRIES' to concatenate. + * Example data schema contains a list: + * "key": "list-name-score", + * "schemaDetails": { + * "type": "LIST", + * "granularity": "GRANULARITY_PARTITION_LEVEL", + * "listConfig": { + * "valueSchema": { + * "type": "CUSTOMIZED_STRUCT", + * "granularity": "GRANULARITY_PARTITION_LEVEL", + * "customizedStructConfig": { + * "fieldSchemas": { + * "name": { + * "type": "STRING", + * "granularity": "GRANULARITY_PARTITION_LEVEL", + * "searchStrategy": { + * "searchStrategyType": "SMART_SEARCH" + * "confidence_score_index_config": { + * "field_path": "list-name-score._ENTRIES.score", + * "threshold": "0.9", + * } + * } + * }, + * "score": { + * "type": "FLOAT", + * "granularity": "GRANULARITY_PARTITION_LEVEL", + * } + * } + * } + * } + * } + * } + * + * Generated from protobuf field string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFieldPath() + { + return $this->field_path; + } + + /** + * Required. The path to the confidence score field. It is a string that + * concatenates all the data schema keys along the path. See the example + * above. If the data schema contains LIST, use '_ENTRIES' to concatenate. + * Example data schema contains a list: + * "key": "list-name-score", + * "schemaDetails": { + * "type": "LIST", + * "granularity": "GRANULARITY_PARTITION_LEVEL", + * "listConfig": { + * "valueSchema": { + * "type": "CUSTOMIZED_STRUCT", + * "granularity": "GRANULARITY_PARTITION_LEVEL", + * "customizedStructConfig": { + * "fieldSchemas": { + * "name": { + * "type": "STRING", + * "granularity": "GRANULARITY_PARTITION_LEVEL", + * "searchStrategy": { + * "searchStrategyType": "SMART_SEARCH" + * "confidence_score_index_config": { + * "field_path": "list-name-score._ENTRIES.score", + * "threshold": "0.9", + * } + * } + * }, + * "score": { + * "type": "FLOAT", + * "granularity": "GRANULARITY_PARTITION_LEVEL", + * } + * } + * } + * } + * } + * } + * + * Generated from protobuf field string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFieldPath($var) + { + GPBUtil::checkString($var, True); + $this->field_path = $var; + + return $this; + } + + /** + * Required. The threshold. + * + * Generated from protobuf field float threshold = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return float + */ + public function getThreshold() + { + return $this->threshold; + } + + /** + * Required. The threshold. + * + * Generated from protobuf field float threshold = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param float $var + * @return $this + */ + public function setThreshold($var) + { + GPBUtil::checkFloat($var); + $this->threshold = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy/SearchStrategyType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy/SearchStrategyType.php new file mode 100644 index 000000000000..35900935d831 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy/SearchStrategyType.php @@ -0,0 +1,63 @@ +google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType + */ +class SearchStrategyType +{ + /** + * Annotatation values of the `key` above will not be searchable. + * + * Generated from protobuf enum NO_SEARCH = 0; + */ + const NO_SEARCH = 0; + /** + * When searching with `key`, the value must be exactly as the annotation + * value that has been ingested. + * + * Generated from protobuf enum EXACT_SEARCH = 1; + */ + const EXACT_SEARCH = 1; + /** + * When searching with `key`, Warehouse will perform broad search based on + * semantic of the annotation value. + * + * Generated from protobuf enum SMART_SEARCH = 2; + */ + const SMART_SEARCH = 2; + + private static $valueToName = [ + self::NO_SEARCH => 'NO_SEARCH', + self::EXACT_SEARCH => 'EXACT_SEARCH', + self::SMART_SEARCH => 'SMART_SEARCH', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataType.php new file mode 100644 index 000000000000..4cb35ad13cea --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataType.php @@ -0,0 +1,77 @@ +google.cloud.visionai.v1.DataType + */ +class DataType +{ + /** + * The default value of DataType. + * + * Generated from protobuf enum DATA_TYPE_UNSPECIFIED = 0; + */ + const DATA_TYPE_UNSPECIFIED = 0; + /** + * Video data type like H264. + * + * Generated from protobuf enum VIDEO = 1; + */ + const VIDEO = 1; + /** + * Image data type. + * + * Generated from protobuf enum IMAGE = 3; + */ + const IMAGE = 3; + /** + * Protobuf data type, usually used for general data blob. + * + * Generated from protobuf enum PROTO = 2; + */ + const PROTO = 2; + /** + * A placeholder data type, applicable for the universal input processor which + * supports any data type. This will be instantiated and replaced by a + * concrete underlying `DataType` during instance deployment. + * + * Generated from protobuf enum PLACEHOLDER = 4; + */ + const PLACEHOLDER = 4; + + private static $valueToName = [ + self::DATA_TYPE_UNSPECIFIED => 'DATA_TYPE_UNSPECIFIED', + self::VIDEO => 'VIDEO', + self::IMAGE => 'IMAGE', + self::PROTO => 'PROTO', + self::PLACEHOLDER => 'PLACEHOLDER', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DateTimeRange.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DateTimeRange.php new file mode 100644 index 000000000000..ad56d84e7b5f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DateTimeRange.php @@ -0,0 +1,121 @@ +google.cloud.visionai.v1.DateTimeRange + */ +class DateTimeRange extends \Google\Protobuf\Internal\Message +{ + /** + * Start date time. + * + * Generated from protobuf field .google.type.DateTime start = 1; + */ + protected $start = null; + /** + * End data time. + * + * Generated from protobuf field .google.type.DateTime end = 2; + */ + protected $end = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Type\DateTime $start + * Start date time. + * @type \Google\Type\DateTime $end + * End data time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Start date time. + * + * Generated from protobuf field .google.type.DateTime start = 1; + * @return \Google\Type\DateTime|null + */ + public function getStart() + { + return $this->start; + } + + public function hasStart() + { + return isset($this->start); + } + + public function clearStart() + { + unset($this->start); + } + + /** + * Start date time. + * + * Generated from protobuf field .google.type.DateTime start = 1; + * @param \Google\Type\DateTime $var + * @return $this + */ + public function setStart($var) + { + GPBUtil::checkMessage($var, \Google\Type\DateTime::class); + $this->start = $var; + + return $this; + } + + /** + * End data time. + * + * Generated from protobuf field .google.type.DateTime end = 2; + * @return \Google\Type\DateTime|null + */ + public function getEnd() + { + return $this->end; + } + + public function hasEnd() + { + return isset($this->end); + } + + public function clearEnd() + { + unset($this->end); + } + + /** + * End data time. + * + * Generated from protobuf field .google.type.DateTime end = 2; + * @param \Google\Type\DateTime $var + * @return $this + */ + public function setEnd($var) + { + GPBUtil::checkMessage($var, \Google\Type\DateTime::class); + $this->end = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DateTimeRangeArray.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DateTimeRangeArray.php new file mode 100644 index 000000000000..35719c712c23 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DateTimeRangeArray.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.DateTimeRangeArray + */ +class DateTimeRangeArray extends \Google\Protobuf\Internal\Message +{ + /** + * Date time ranges. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + */ + private $date_time_ranges; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\DateTimeRange[] $date_time_ranges + * Date time ranges. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Date time ranges. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\DateTimeRange> + */ + public function getDateTimeRanges() + { + return $this->date_time_ranges; + } + + /** + * Date time ranges. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; + * @param \Google\Cloud\VisionAI\V1\DateTimeRange[] $var + * @return $this + */ + public function setDateTimeRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\DateTimeRange::class); + $this->date_time_ranges = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DedicatedResources.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DedicatedResources.php new file mode 100644 index 000000000000..058183fd617f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DedicatedResources.php @@ -0,0 +1,328 @@ +google.cloud.visionai.v1.DedicatedResources + */ +class DedicatedResources extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Immutable. The specification of a single machine used by the + * prediction. + * + * Generated from protobuf field .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $machine_spec = null; + /** + * Required. Immutable. The minimum number of machine replicas this + * DeployedModel will be always deployed on. This value must be greater than + * or equal to 1. + * If traffic against the DeployedModel increases, it may dynamically be + * deployed onto more replicas, and as traffic decreases, some of these extra + * replicas may be freed. + * + * Generated from protobuf field int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $min_replica_count = 0; + /** + * Immutable. The maximum number of replicas this DeployedModel may be + * deployed on when the traffic against it increases. If the requested value + * is too large, the deployment will error, but if deployment succeeds then + * the ability to scale the model to that many replicas is guaranteed (barring + * service outages). If traffic against the DeployedModel increases beyond + * what its replicas at maximum may handle, a portion of the traffic will be + * dropped. If this value is not provided, will use + * [min_replica_count][google.cloud.visionai.v1.DedicatedResources.min_replica_count] + * as the default value. + * The value of this field impacts the charge against Vertex CPU and GPU + * quotas. Specifically, you will be charged for max_replica_count * + * number of cores in the selected machine type) and (max_replica_count * + * number of GPUs per replica in the selected machine type). + * + * Generated from protobuf field int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $max_replica_count = 0; + /** + * Immutable. The metric specifications that overrides a resource + * utilization metric (CPU utilization, accelerator's duty cycle, and so on) + * target value (default to 60 if not set). At most one entry is allowed per + * metric. + * If + * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count] + * is above 0, the autoscaling will be based on both CPU utilization and + * accelerator's duty cycle metrics and scale up when either metrics exceeds + * its target value while scale down if both metrics are under their target + * value. The default target value is 60 for both metrics. + * If + * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count] + * is 0, the autoscaling will be based on CPU utilization metric only with + * default target value 60 if not explicitly set. + * For example, in the case of Online Prediction, if you want to override + * target CPU utilization to 80, you should set + * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name] + * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and + * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target] + * to `80`. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + */ + private $autoscaling_metric_specs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\MachineSpec $machine_spec + * Required. Immutable. The specification of a single machine used by the + * prediction. + * @type int $min_replica_count + * Required. Immutable. The minimum number of machine replicas this + * DeployedModel will be always deployed on. This value must be greater than + * or equal to 1. + * If traffic against the DeployedModel increases, it may dynamically be + * deployed onto more replicas, and as traffic decreases, some of these extra + * replicas may be freed. + * @type int $max_replica_count + * Immutable. The maximum number of replicas this DeployedModel may be + * deployed on when the traffic against it increases. If the requested value + * is too large, the deployment will error, but if deployment succeeds then + * the ability to scale the model to that many replicas is guaranteed (barring + * service outages). If traffic against the DeployedModel increases beyond + * what its replicas at maximum may handle, a portion of the traffic will be + * dropped. If this value is not provided, will use + * [min_replica_count][google.cloud.visionai.v1.DedicatedResources.min_replica_count] + * as the default value. + * The value of this field impacts the charge against Vertex CPU and GPU + * quotas. Specifically, you will be charged for max_replica_count * + * number of cores in the selected machine type) and (max_replica_count * + * number of GPUs per replica in the selected machine type). + * @type \Google\Cloud\VisionAI\V1\AutoscalingMetricSpec[] $autoscaling_metric_specs + * Immutable. The metric specifications that overrides a resource + * utilization metric (CPU utilization, accelerator's duty cycle, and so on) + * target value (default to 60 if not set). At most one entry is allowed per + * metric. + * If + * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count] + * is above 0, the autoscaling will be based on both CPU utilization and + * accelerator's duty cycle metrics and scale up when either metrics exceeds + * its target value while scale down if both metrics are under their target + * value. The default target value is 60 for both metrics. + * If + * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count] + * is 0, the autoscaling will be based on CPU utilization metric only with + * default target value 60 if not explicitly set. + * For example, in the case of Online Prediction, if you want to override + * target CPU utilization to 80, you should set + * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name] + * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and + * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target] + * to `80`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. Immutable. The specification of a single machine used by the + * prediction. + * + * Generated from protobuf field .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\VisionAI\V1\MachineSpec|null + */ + public function getMachineSpec() + { + return $this->machine_spec; + } + + public function hasMachineSpec() + { + return isset($this->machine_spec); + } + + public function clearMachineSpec() + { + unset($this->machine_spec); + } + + /** + * Required. Immutable. The specification of a single machine used by the + * prediction. + * + * Generated from protobuf field .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\VisionAI\V1\MachineSpec $var + * @return $this + */ + public function setMachineSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\MachineSpec::class); + $this->machine_spec = $var; + + return $this; + } + + /** + * Required. Immutable. The minimum number of machine replicas this + * DeployedModel will be always deployed on. This value must be greater than + * or equal to 1. + * If traffic against the DeployedModel increases, it may dynamically be + * deployed onto more replicas, and as traffic decreases, some of these extra + * replicas may be freed. + * + * Generated from protobuf field int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getMinReplicaCount() + { + return $this->min_replica_count; + } + + /** + * Required. Immutable. The minimum number of machine replicas this + * DeployedModel will be always deployed on. This value must be greater than + * or equal to 1. + * If traffic against the DeployedModel increases, it may dynamically be + * deployed onto more replicas, and as traffic decreases, some of these extra + * replicas may be freed. + * + * Generated from protobuf field int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setMinReplicaCount($var) + { + GPBUtil::checkInt32($var); + $this->min_replica_count = $var; + + return $this; + } + + /** + * Immutable. The maximum number of replicas this DeployedModel may be + * deployed on when the traffic against it increases. If the requested value + * is too large, the deployment will error, but if deployment succeeds then + * the ability to scale the model to that many replicas is guaranteed (barring + * service outages). If traffic against the DeployedModel increases beyond + * what its replicas at maximum may handle, a portion of the traffic will be + * dropped. If this value is not provided, will use + * [min_replica_count][google.cloud.visionai.v1.DedicatedResources.min_replica_count] + * as the default value. + * The value of this field impacts the charge against Vertex CPU and GPU + * quotas. Specifically, you will be charged for max_replica_count * + * number of cores in the selected machine type) and (max_replica_count * + * number of GPUs per replica in the selected machine type). + * + * Generated from protobuf field int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getMaxReplicaCount() + { + return $this->max_replica_count; + } + + /** + * Immutable. The maximum number of replicas this DeployedModel may be + * deployed on when the traffic against it increases. If the requested value + * is too large, the deployment will error, but if deployment succeeds then + * the ability to scale the model to that many replicas is guaranteed (barring + * service outages). If traffic against the DeployedModel increases beyond + * what its replicas at maximum may handle, a portion of the traffic will be + * dropped. If this value is not provided, will use + * [min_replica_count][google.cloud.visionai.v1.DedicatedResources.min_replica_count] + * as the default value. + * The value of this field impacts the charge against Vertex CPU and GPU + * quotas. Specifically, you will be charged for max_replica_count * + * number of cores in the selected machine type) and (max_replica_count * + * number of GPUs per replica in the selected machine type). + * + * Generated from protobuf field int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setMaxReplicaCount($var) + { + GPBUtil::checkInt32($var); + $this->max_replica_count = $var; + + return $this; + } + + /** + * Immutable. The metric specifications that overrides a resource + * utilization metric (CPU utilization, accelerator's duty cycle, and so on) + * target value (default to 60 if not set). At most one entry is allowed per + * metric. + * If + * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count] + * is above 0, the autoscaling will be based on both CPU utilization and + * accelerator's duty cycle metrics and scale up when either metrics exceeds + * its target value while scale down if both metrics are under their target + * value. The default target value is 60 for both metrics. + * If + * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count] + * is 0, the autoscaling will be based on CPU utilization metric only with + * default target value 60 if not explicitly set. + * For example, in the case of Online Prediction, if you want to override + * target CPU utilization to 80, you should set + * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name] + * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and + * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target] + * to `80`. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\AutoscalingMetricSpec> + */ + public function getAutoscalingMetricSpecs() + { + return $this->autoscaling_metric_specs; + } + + /** + * Immutable. The metric specifications that overrides a resource + * utilization metric (CPU utilization, accelerator's duty cycle, and so on) + * target value (default to 60 if not set). At most one entry is allowed per + * metric. + * If + * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count] + * is above 0, the autoscaling will be based on both CPU utilization and + * accelerator's duty cycle metrics and scale up when either metrics exceeds + * its target value while scale down if both metrics are under their target + * value. The default target value is 60 for both metrics. + * If + * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count] + * is 0, the autoscaling will be based on CPU utilization metric only with + * default target value 60 if not explicitly set. + * For example, in the case of Online Prediction, if you want to override + * target CPU utilization to 80, you should set + * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name] + * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and + * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target] + * to `80`. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\VisionAI\V1\AutoscalingMetricSpec[] $var + * @return $this + */ + public function setAutoscalingMetricSpecs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AutoscalingMetricSpec::class); + $this->autoscaling_metric_specs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAnalysisRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAnalysisRequest.php new file mode 100644 index 000000000000..5658c12ec947 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAnalysisRequest.php @@ -0,0 +1,155 @@ +google.cloud.visionai.v1.DeleteAnalysisRequest + */ +class DeleteAnalysisRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see LiveVideoAnalyticsClient::analysisName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeleteAnalysisRequest + * + * @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 resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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 resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAnnotationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAnnotationRequest.php new file mode 100644 index 000000000000..8c1d044976a7 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAnnotationRequest.php @@ -0,0 +1,91 @@ +google.cloud.visionai.v1.DeleteAnnotationRequest + */ +class DeleteAnnotationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the annotation to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the annotation to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * Please see {@see WarehouseClient::annotationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeleteAnnotationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the annotation to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the annotation to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the annotation to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationInstancesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationInstancesRequest.php new file mode 100644 index 000000000000..1c6262e22106 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationInstancesRequest.php @@ -0,0 +1,199 @@ +google.cloud.visionai.v1.DeleteApplicationInstancesRequest + */ +class DeleteApplicationInstancesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + private $instance_ids; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * Please see {@see AppPlatformClient::applicationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeleteApplicationInstancesRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @type string[] $instance_ids + * Required. Id of the requesting object. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * 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. Id of the requesting object. + * + * Generated from protobuf field repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return RepeatedField + */ + public function getInstanceIds() + { + return $this->instance_ids; + } + + /** + * Required. Id of the requesting object. + * + * Generated from protobuf field repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string[] $var + * @return $this + */ + public function setInstanceIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->instance_ids = $arr; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationInstancesResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationInstancesResponse.php new file mode 100644 index 000000000000..6639869a6e32 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationInstancesResponse.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.DeleteApplicationInstancesResponse + */ +class DeleteApplicationInstancesResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationRequest.php new file mode 100644 index 000000000000..5a1cce55d659 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationRequest.php @@ -0,0 +1,197 @@ +google.cloud.visionai.v1.DeleteApplicationRequest + */ +class DeleteApplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. If set to true, any instances and drafts from this application + * will also be deleted. (Otherwise, the request will only work if the + * application has no instances and drafts.) + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $force = false; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see AppPlatformClient::applicationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeleteApplicationRequest + * + * @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 resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $force + * Optional. If set to true, any instances and drafts from this application + * will also be deleted. (Otherwise, the request will only work if the + * application has no instances and drafts.) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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 resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. If set to true, any instances and drafts from this application + * will also be deleted. (Otherwise, the request will only work if the + * application has no instances and drafts.) + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * Optional. If set to true, any instances and drafts from this application + * will also be deleted. (Otherwise, the request will only work if the + * application has no instances and drafts.) + * + * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAssetMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAssetMetadata.php new file mode 100644 index 000000000000..619ebee1ddf8 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAssetMetadata.php @@ -0,0 +1,34 @@ +google.cloud.visionai.v1.DeleteAssetMetadata + */ +class DeleteAssetMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAssetRequest.php new file mode 100644 index 000000000000..5f287c5b92a0 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAssetRequest.php @@ -0,0 +1,91 @@ +google.cloud.visionai.v1.DeleteAssetRequest + */ +class DeleteAssetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the asset to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the asset to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * Please see {@see WarehouseClient::assetName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeleteAssetRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the asset to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the asset to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the asset to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteClusterRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteClusterRequest.php new file mode 100644 index 000000000000..ffe21a44616b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteClusterRequest.php @@ -0,0 +1,155 @@ +google.cloud.visionai.v1.DeleteClusterRequest + */ +class DeleteClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource + * Please see {@see StreamsServiceClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\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. Name of the resource + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource + * + * 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 resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCollectionMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCollectionMetadata.php new file mode 100644 index 000000000000..21c6ddbb0d10 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCollectionMetadata.php @@ -0,0 +1,77 @@ +google.cloud.visionai.v1.DeleteCollectionMetadata + */ +class DeleteCollectionMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + protected $operation_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\OperationMetadata $operation_metadata + * Common metadata of the long-running operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null + */ + public function getOperationMetadata() + { + return $this->operation_metadata; + } + + public function hasOperationMetadata() + { + return isset($this->operation_metadata); + } + + public function clearOperationMetadata() + { + unset($this->operation_metadata); + } + + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var + * @return $this + */ + public function setOperationMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); + $this->operation_metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCollectionRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCollectionRequest.php new file mode 100644 index 000000000000..8543be3ee99b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCollectionRequest.php @@ -0,0 +1,86 @@ +google.cloud.visionai.v1.DeleteCollectionRequest + */ +class DeleteCollectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the collection to delete. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the collection to delete. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * Please see {@see WarehouseClient::collectionName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeleteCollectionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the collection to delete. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the collection to delete. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the collection to delete. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCorpusRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCorpusRequest.php new file mode 100644 index 000000000000..b498c647dc70 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCorpusRequest.php @@ -0,0 +1,81 @@ +google.cloud.visionai.v1.DeleteCorpusRequest + */ +class DeleteCorpusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the corpus to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the corpus to delete. Please see + * {@see WarehouseClient::corpusName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeleteCorpusRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the corpus to delete. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the corpus to delete. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the corpus to delete. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteDataSchemaRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteDataSchemaRequest.php new file mode 100644 index 000000000000..95ef12345233 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteDataSchemaRequest.php @@ -0,0 +1,91 @@ +google.cloud.visionai.v1.DeleteDataSchemaRequest + */ +class DeleteDataSchemaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the data schema to delete. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the data schema to delete. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` + * Please see {@see WarehouseClient::dataSchemaName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeleteDataSchemaRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the data schema to delete. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the data schema to delete. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the data schema to delete. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteDraftRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteDraftRequest.php new file mode 100644 index 000000000000..af9bf47e607a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteDraftRequest.php @@ -0,0 +1,155 @@ +google.cloud.visionai.v1.DeleteDraftRequest + */ +class DeleteDraftRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see AppPlatformClient::draftName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeleteDraftRequest + * + * @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 resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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 resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteEventRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteEventRequest.php new file mode 100644 index 000000000000..2e1ec7d70945 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteEventRequest.php @@ -0,0 +1,155 @@ +google.cloud.visionai.v1.DeleteEventRequest + */ +class DeleteEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see StreamsServiceClient::eventName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeleteEventRequest + * + * @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 resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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 resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexEndpointMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexEndpointMetadata.php new file mode 100644 index 000000000000..41e56e755d94 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexEndpointMetadata.php @@ -0,0 +1,77 @@ +google.cloud.visionai.v1.DeleteIndexEndpointMetadata + */ +class DeleteIndexEndpointMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + protected $operation_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\OperationMetadata $operation_metadata + * Common metadata of the long-running operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null + */ + public function getOperationMetadata() + { + return $this->operation_metadata; + } + + public function hasOperationMetadata() + { + return isset($this->operation_metadata); + } + + public function clearOperationMetadata() + { + unset($this->operation_metadata); + } + + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var + * @return $this + */ + public function setOperationMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); + $this->operation_metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexEndpointRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexEndpointRequest.php new file mode 100644 index 000000000000..6b867f691d2e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexEndpointRequest.php @@ -0,0 +1,81 @@ +google.cloud.visionai.v1.DeleteIndexEndpointRequest + */ +class DeleteIndexEndpointRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * 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 resource. Please see + * {@see WarehouseClient::indexEndpointName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeleteIndexEndpointRequest + * + * @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 resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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 resource. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexMetadata.php new file mode 100644 index 000000000000..837eaa5cbe72 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexMetadata.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.DeleteIndexMetadata + */ +class DeleteIndexMetadata extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexRequest.php new file mode 100644 index 000000000000..8e3f48470d4f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexRequest.php @@ -0,0 +1,91 @@ +google.cloud.visionai.v1.DeleteIndexRequest + */ +class DeleteIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the index to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the index to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * Please see {@see WarehouseClient::indexName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeleteIndexRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the index to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the index to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the index to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteOperatorRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteOperatorRequest.php new file mode 100644 index 000000000000..c1897ce316ed --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteOperatorRequest.php @@ -0,0 +1,155 @@ +google.cloud.visionai.v1.DeleteOperatorRequest + */ +class DeleteOperatorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource + * Please see {@see LiveVideoAnalyticsClient::operatorName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeleteOperatorRequest + * + * @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 resource + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource + * + * 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 resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteProcessRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteProcessRequest.php new file mode 100644 index 000000000000..4b0279a12296 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteProcessRequest.php @@ -0,0 +1,155 @@ +google.cloud.visionai.v1.DeleteProcessRequest + */ +class DeleteProcessRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see LiveVideoAnalyticsClient::processName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeleteProcessRequest + * + * @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 resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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 resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteProcessorRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteProcessorRequest.php new file mode 100644 index 000000000000..f42a12d90175 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteProcessorRequest.php @@ -0,0 +1,155 @@ +google.cloud.visionai.v1.DeleteProcessorRequest + */ +class DeleteProcessorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource + * Please see {@see AppPlatformClient::processorName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeleteProcessorRequest + * + * @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 resource + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource + * + * 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 resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSearchConfigRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSearchConfigRequest.php new file mode 100644 index 000000000000..df56c6d9dfcc --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSearchConfigRequest.php @@ -0,0 +1,91 @@ +google.cloud.visionai.v1.DeleteSearchConfigRequest + */ +class DeleteSearchConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the search configuration to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the search configuration to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * Please see {@see WarehouseClient::searchConfigName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeleteSearchConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the search configuration to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the search configuration to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the search configuration to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSearchHypernymRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSearchHypernymRequest.php new file mode 100644 index 000000000000..b6cf51b22ae5 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSearchHypernymRequest.php @@ -0,0 +1,91 @@ +google.cloud.visionai.v1.DeleteSearchHypernymRequest + */ +class DeleteSearchHypernymRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the SearchHypernym to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the SearchHypernym to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * Please see {@see WarehouseClient::searchHypernymName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeleteSearchHypernymRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the SearchHypernym to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the SearchHypernym to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the SearchHypernym to delete. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSeriesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSeriesRequest.php new file mode 100644 index 000000000000..ced26faa3df5 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSeriesRequest.php @@ -0,0 +1,155 @@ +google.cloud.visionai.v1.DeleteSeriesRequest + */ +class DeleteSeriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see StreamsServiceClient::seriesName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeleteSeriesRequest + * + * @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 resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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 resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteStreamRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteStreamRequest.php new file mode 100644 index 000000000000..c3125881e5b7 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteStreamRequest.php @@ -0,0 +1,155 @@ +google.cloud.visionai.v1.DeleteStreamRequest + */ +class DeleteStreamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. Name of the resource. Please see + * {@see StreamsServiceClient::streamName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeleteStreamRequest + * + * @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 resource. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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 resource. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes after the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployApplicationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployApplicationRequest.php new file mode 100644 index 000000000000..078bf7361e4b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployApplicationRequest.php @@ -0,0 +1,241 @@ +google.cloud.visionai.v1.DeployApplicationRequest + */ +class DeployApplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * If set, validate the request and preview the application graph, but do not + * actually deploy it. + * + * Generated from protobuf field bool validate_only = 2; + */ + protected $validate_only = false; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. Whether or not to enable monitoring for the application on + * deployment. + * + * Generated from protobuf field bool enable_monitoring = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $enable_monitoring = false; + + /** + * @param string $name Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * Please see {@see AppPlatformClient::applicationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\DeployApplicationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @type bool $validate_only + * If set, validate the request and preview the application graph, but do not + * actually deploy it. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $enable_monitoring + * Optional. Whether or not to enable monitoring for the application on + * deployment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * 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; + } + + /** + * If set, validate the request and preview the application graph, but do not + * actually deploy it. + * + * Generated from protobuf field bool validate_only = 2; + * @return bool + */ + public function getValidateOnly() + { + return $this->validate_only; + } + + /** + * If set, validate the request and preview the application graph, but do not + * actually deploy it. + * + * Generated from protobuf field bool validate_only = 2; + * @param bool $var + * @return $this + */ + public function setValidateOnly($var) + { + GPBUtil::checkBool($var); + $this->validate_only = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. Whether or not to enable monitoring for the application on + * deployment. + * + * Generated from protobuf field bool enable_monitoring = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getEnableMonitoring() + { + return $this->enable_monitoring; + } + + /** + * Optional. Whether or not to enable monitoring for the application on + * deployment. + * + * Generated from protobuf field bool enable_monitoring = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setEnableMonitoring($var) + { + GPBUtil::checkBool($var); + $this->enable_monitoring = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployApplicationResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployApplicationResponse.php new file mode 100644 index 000000000000..6f8675f33f00 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployApplicationResponse.php @@ -0,0 +1,34 @@ +google.cloud.visionai.v1.DeployApplicationResponse + */ +class DeployApplicationResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexMetadata.php new file mode 100644 index 000000000000..507d6534547e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexMetadata.php @@ -0,0 +1,111 @@ +google.cloud.visionai.v1.DeployIndexMetadata + */ +class DeployIndexMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + protected $operation_metadata = null; + /** + * Output only. The index being deployed. + * + * Generated from protobuf field string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $deployed_index = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\OperationMetadata $operation_metadata + * Common metadata of the long-running operation. + * @type string $deployed_index + * Output only. The index being deployed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null + */ + public function getOperationMetadata() + { + return $this->operation_metadata; + } + + public function hasOperationMetadata() + { + return isset($this->operation_metadata); + } + + public function clearOperationMetadata() + { + unset($this->operation_metadata); + } + + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var + * @return $this + */ + public function setOperationMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); + $this->operation_metadata = $var; + + return $this; + } + + /** + * Output only. The index being deployed. + * + * Generated from protobuf field string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getDeployedIndex() + { + return $this->deployed_index; + } + + /** + * Output only. The index being deployed. + * + * Generated from protobuf field string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDeployedIndex($var) + { + GPBUtil::checkString($var, True); + $this->deployed_index = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexRequest.php new file mode 100644 index 000000000000..65c579f46479 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexRequest.php @@ -0,0 +1,119 @@ +google.cloud.visionai.v1.DeployIndexRequest + */ +class DeployIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. IndexEndpoint the index is deployed to. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + * + * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $index_endpoint = ''; + /** + * Required. Index to deploy. + * + * Generated from protobuf field .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $deployed_index = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $index_endpoint + * Required. IndexEndpoint the index is deployed to. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + * @type \Google\Cloud\VisionAI\V1\DeployedIndex $deployed_index + * Required. Index to deploy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. IndexEndpoint the index is deployed to. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + * + * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getIndexEndpoint() + { + return $this->index_endpoint; + } + + /** + * Required. IndexEndpoint the index is deployed to. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + * + * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setIndexEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->index_endpoint = $var; + + return $this; + } + + /** + * Required. Index to deploy. + * + * Generated from protobuf field .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\DeployedIndex|null + */ + public function getDeployedIndex() + { + return $this->deployed_index; + } + + public function hasDeployedIndex() + { + return isset($this->deployed_index); + } + + public function clearDeployedIndex() + { + unset($this->deployed_index); + } + + /** + * Required. Index to deploy. + * + * Generated from protobuf field .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\DeployedIndex $var + * @return $this + */ + public function setDeployedIndex($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DeployedIndex::class); + $this->deployed_index = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexResponse.php new file mode 100644 index 000000000000..cdc4ce60f89c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexResponse.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.DeployIndexResponse + */ +class DeployIndexResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployedIndex.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployedIndex.php new file mode 100644 index 000000000000..aa161daa9e2c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployedIndex.php @@ -0,0 +1,75 @@ +google.cloud.visionai.v1.DeployedIndex + */ +class DeployedIndex extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the deployed Index. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}` + * + * Generated from protobuf field string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $index = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $index + * Required. Name of the deployed Index. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the deployed Index. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}` + * + * Generated from protobuf field string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getIndex() + { + return $this->index; + } + + /** + * Required. Name of the deployed Index. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}` + * + * Generated from protobuf field string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkString($var, True); + $this->index = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployedIndexReference.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployedIndexReference.php new file mode 100644 index 000000000000..3f59a61c809f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployedIndexReference.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.DeployedIndexReference + */ +class DeployedIndexReference extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. A resource name of the IndexEndpoint. + * + * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + */ + protected $index_endpoint = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $index_endpoint + * Immutable. A resource name of the IndexEndpoint. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. A resource name of the IndexEndpoint. + * + * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @return string + */ + public function getIndexEndpoint() + { + return $this->index_endpoint; + } + + /** + * Immutable. A resource name of the IndexEndpoint. + * + * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setIndexEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->index_endpoint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Draft.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Draft.php new file mode 100644 index 000000000000..94fd0425a320 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Draft.php @@ -0,0 +1,301 @@ +google.cloud.visionai.v1.Draft + */ +class Draft extends \Google\Protobuf\Internal\Message +{ + /** + * name of resource + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. [Output only] Create timestamp + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. [Output only] Create timestamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 3; + */ + private $labels; + /** + * Required. A user friendly display name for the solution. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * A description for this application. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * The draft application configs which haven't been updated to an application. + * + * Generated from protobuf field .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; + */ + protected $draft_application_configs = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * name of resource + * @type \Google\Protobuf\Timestamp $create_time + * Output only. [Output only] Create timestamp + * @type \Google\Protobuf\Timestamp $update_time + * Output only. [Output only] Create timestamp + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs + * @type string $display_name + * Required. A user friendly display name for the solution. + * @type string $description + * A description for this application. + * @type \Google\Cloud\VisionAI\V1\ApplicationConfigs $draft_application_configs + * The draft application configs which haven't been updated to an application. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * name of resource + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * name of resource + * + * 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. [Output only] Create timestamp + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. [Output only] Create timestamp + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. [Output only] Create timestamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. [Output only] Create timestamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. A user friendly display name for the solution. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. A user friendly display name for the solution. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * A description for this application. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A description for this application. + * + * 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; + } + + /** + * The draft application configs which haven't been updated to an application. + * + * Generated from protobuf field .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; + * @return \Google\Cloud\VisionAI\V1\ApplicationConfigs|null + */ + public function getDraftApplicationConfigs() + { + return $this->draft_application_configs; + } + + public function hasDraftApplicationConfigs() + { + return isset($this->draft_application_configs); + } + + public function clearDraftApplicationConfigs() + { + unset($this->draft_application_configs); + } + + /** + * The draft application configs which haven't been updated to an application. + * + * Generated from protobuf field .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; + * @param \Google\Cloud\VisionAI\V1\ApplicationConfigs $var + * @return $this + */ + public function setDraftApplicationConfigs($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ApplicationConfigs::class); + $this->draft_application_configs = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/EagerMode.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/EagerMode.php new file mode 100644 index 000000000000..60161051f0ae --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/EagerMode.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.EagerMode + */ +class EagerMode extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Event.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Event.php new file mode 100644 index 000000000000..dd4482c6fe4d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Event.php @@ -0,0 +1,313 @@ +google.cloud.visionai.v1.Event + */ +class Event extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the resource. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Annotations to allow clients to store small amounts of arbitrary data. + * + * Generated from protobuf field map annotations = 5; + */ + private $annotations; + /** + * The clock used for joining streams. + * + * Generated from protobuf field .google.cloud.visionai.v1.Event.Clock alignment_clock = 6; + */ + protected $alignment_clock = 0; + /** + * Grace period for cleaning up the event. This is the time the controller + * waits for before deleting the event. During this period, if there is any + * active channel on the event. The deletion of the event after grace_period + * will be ignored. + * + * Generated from protobuf field .google.protobuf.Duration grace_period = 7; + */ + protected $grace_period = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The create timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update timestamp. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Annotations to allow clients to store small amounts of arbitrary data. + * @type int $alignment_clock + * The clock used for joining streams. + * @type \Google\Protobuf\Duration $grace_period + * Grace period for cleaning up the event. This is the time the controller + * waits for before deleting the event. During this period, if there is any + * active channel on the event. The deletion of the event after grace_period + * will be ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsResources::initOnce(); + parent::__construct($data); + } + + /** + * Name of the resource. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the resource. + * + * 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 create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Annotations to allow clients to store small amounts of arbitrary data. + * + * Generated from protobuf field map annotations = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Annotations to allow clients to store small amounts of arbitrary data. + * + * Generated from protobuf field map annotations = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * The clock used for joining streams. + * + * Generated from protobuf field .google.cloud.visionai.v1.Event.Clock alignment_clock = 6; + * @return int + */ + public function getAlignmentClock() + { + return $this->alignment_clock; + } + + /** + * The clock used for joining streams. + * + * Generated from protobuf field .google.cloud.visionai.v1.Event.Clock alignment_clock = 6; + * @param int $var + * @return $this + */ + public function setAlignmentClock($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Event\Clock::class); + $this->alignment_clock = $var; + + return $this; + } + + /** + * Grace period for cleaning up the event. This is the time the controller + * waits for before deleting the event. During this period, if there is any + * active channel on the event. The deletion of the event after grace_period + * will be ignored. + * + * Generated from protobuf field .google.protobuf.Duration grace_period = 7; + * @return \Google\Protobuf\Duration|null + */ + public function getGracePeriod() + { + return $this->grace_period; + } + + public function hasGracePeriod() + { + return isset($this->grace_period); + } + + public function clearGracePeriod() + { + unset($this->grace_period); + } + + /** + * Grace period for cleaning up the event. This is the time the controller + * waits for before deleting the event. During this period, if there is any + * active channel on the event. The deletion of the event after grace_period + * will be ignored. + * + * Generated from protobuf field .google.protobuf.Duration grace_period = 7; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setGracePeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->grace_period = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Event/Clock.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Event/Clock.php new file mode 100644 index 000000000000..b5add37772a9 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Event/Clock.php @@ -0,0 +1,62 @@ +google.cloud.visionai.v1.Event.Clock + */ +class Clock +{ + /** + * Clock is not specified. + * + * Generated from protobuf enum CLOCK_UNSPECIFIED = 0; + */ + const CLOCK_UNSPECIFIED = 0; + /** + * Use the timestamp when the data is captured. Clients need to sync the + * clock. + * + * Generated from protobuf enum CAPTURE = 1; + */ + const CAPTURE = 1; + /** + * Use the timestamp when the data is received. + * + * Generated from protobuf enum INGEST = 2; + */ + const INGEST = 2; + + private static $valueToName = [ + self::CLOCK_UNSPECIFIED => 'CLOCK_UNSPECIFIED', + self::CAPTURE => 'CAPTURE', + self::INGEST => 'INGEST', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/EventUpdate.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/EventUpdate.php new file mode 100644 index 000000000000..e8bbf180ae94 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/EventUpdate.php @@ -0,0 +1,217 @@ +google.cloud.visionai.v1.EventUpdate + */ +class EventUpdate extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the stream that the event is attached to. + * + * Generated from protobuf field string stream = 1; + */ + protected $stream = ''; + /** + * The name of the event. + * + * Generated from protobuf field string event = 2; + */ + protected $event = ''; + /** + * The name of the series. + * + * Generated from protobuf field string series = 3; + */ + protected $series = ''; + /** + * The timestamp when the Event update happens. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + */ + protected $update_time = null; + /** + * The offset of the message that will be used to acknowledge of the message + * receiving. + * + * Generated from protobuf field int64 offset = 5; + */ + protected $offset = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $stream + * The name of the stream that the event is attached to. + * @type string $event + * The name of the event. + * @type string $series + * The name of the series. + * @type \Google\Protobuf\Timestamp $update_time + * The timestamp when the Event update happens. + * @type int|string $offset + * The offset of the message that will be used to acknowledge of the message + * receiving. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + + /** + * The name of the stream that the event is attached to. + * + * Generated from protobuf field string stream = 1; + * @return string + */ + public function getStream() + { + return $this->stream; + } + + /** + * The name of the stream that the event is attached to. + * + * Generated from protobuf field string stream = 1; + * @param string $var + * @return $this + */ + public function setStream($var) + { + GPBUtil::checkString($var, True); + $this->stream = $var; + + return $this; + } + + /** + * The name of the event. + * + * Generated from protobuf field string event = 2; + * @return string + */ + public function getEvent() + { + return $this->event; + } + + /** + * The name of the event. + * + * Generated from protobuf field string event = 2; + * @param string $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkString($var, True); + $this->event = $var; + + return $this; + } + + /** + * The name of the series. + * + * Generated from protobuf field string series = 3; + * @return string + */ + public function getSeries() + { + return $this->series; + } + + /** + * The name of the series. + * + * Generated from protobuf field string series = 3; + * @param string $var + * @return $this + */ + public function setSeries($var) + { + GPBUtil::checkString($var, True); + $this->series = $var; + + return $this; + } + + /** + * The timestamp when the Event update happens. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * The timestamp when the Event update happens. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * The offset of the message that will be used to acknowledge of the message + * receiving. + * + * Generated from protobuf field int64 offset = 5; + * @return int|string + */ + public function getOffset() + { + return $this->offset; + } + + /** + * The offset of the message that will be used to acknowledge of the message + * receiving. + * + * Generated from protobuf field int64 offset = 5; + * @param int|string $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkInt64($var); + $this->offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucket.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucket.php new file mode 100644 index 000000000000..9cf0f0d6c598 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucket.php @@ -0,0 +1,146 @@ +google.cloud.visionai.v1.FacetBucket + */ +class FacetBucket extends \Google\Protobuf\Internal\Message +{ + /** + * Whether one facet bucket is selected. This field represents user's facet + * selection. It is set by frontend in SearchVideosRequest. + * + * Generated from protobuf field bool selected = 3; + */ + protected $selected = false; + protected $bucket_value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\FacetValue $value + * Singular value. + * @type \Google\Cloud\VisionAI\V1\FacetBucket\Range $range + * Range value. + * @type bool $selected + * Whether one facet bucket is selected. This field represents user's facet + * selection. It is set by frontend in SearchVideosRequest. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Singular value. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetValue value = 2; + * @return \Google\Cloud\VisionAI\V1\FacetValue|null + */ + public function getValue() + { + return $this->readOneof(2); + } + + public function hasValue() + { + return $this->hasOneof(2); + } + + /** + * Singular value. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetValue value = 2; + * @param \Google\Cloud\VisionAI\V1\FacetValue $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetValue::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Range value. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetBucket.Range range = 4; + * @return \Google\Cloud\VisionAI\V1\FacetBucket\Range|null + */ + public function getRange() + { + return $this->readOneof(4); + } + + public function hasRange() + { + return $this->hasOneof(4); + } + + /** + * Range value. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetBucket.Range range = 4; + * @param \Google\Cloud\VisionAI\V1\FacetBucket\Range $var + * @return $this + */ + public function setRange($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetBucket\Range::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Whether one facet bucket is selected. This field represents user's facet + * selection. It is set by frontend in SearchVideosRequest. + * + * Generated from protobuf field bool selected = 3; + * @return bool + */ + public function getSelected() + { + return $this->selected; + } + + /** + * Whether one facet bucket is selected. This field represents user's facet + * selection. It is set by frontend in SearchVideosRequest. + * + * Generated from protobuf field bool selected = 3; + * @param bool $var + * @return $this + */ + public function setSelected($var) + { + GPBUtil::checkBool($var); + $this->selected = $var; + + return $this; + } + + /** + * @return string + */ + public function getBucketValue() + { + return $this->whichOneof("bucket_value"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucket/Range.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucket/Range.php new file mode 100644 index 000000000000..2330b162d28e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucket/Range.php @@ -0,0 +1,121 @@ +google.cloud.visionai.v1.FacetBucket.Range + */ +class Range extends \Google\Protobuf\Internal\Message +{ + /** + * Start of the range. Non-existence indicates some bound (e.g. -inf). + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetValue start = 1; + */ + protected $start = null; + /** + * End of the range. Non-existence indicates some bound (e.g. inf). + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetValue end = 2; + */ + protected $end = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\FacetValue $start + * Start of the range. Non-existence indicates some bound (e.g. -inf). + * @type \Google\Cloud\VisionAI\V1\FacetValue $end + * End of the range. Non-existence indicates some bound (e.g. inf). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Start of the range. Non-existence indicates some bound (e.g. -inf). + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetValue start = 1; + * @return \Google\Cloud\VisionAI\V1\FacetValue|null + */ + public function getStart() + { + return $this->start; + } + + public function hasStart() + { + return isset($this->start); + } + + public function clearStart() + { + unset($this->start); + } + + /** + * Start of the range. Non-existence indicates some bound (e.g. -inf). + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetValue start = 1; + * @param \Google\Cloud\VisionAI\V1\FacetValue $var + * @return $this + */ + public function setStart($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetValue::class); + $this->start = $var; + + return $this; + } + + /** + * End of the range. Non-existence indicates some bound (e.g. inf). + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetValue end = 2; + * @return \Google\Cloud\VisionAI\V1\FacetValue|null + */ + public function getEnd() + { + return $this->end; + } + + public function hasEnd() + { + return isset($this->end); + } + + public function clearEnd() + { + unset($this->end); + } + + /** + * End of the range. Non-existence indicates some bound (e.g. inf). + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetValue end = 2; + * @param \Google\Cloud\VisionAI\V1\FacetValue $var + * @return $this + */ + public function setEnd($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetValue::class); + $this->end = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucketType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucketType.php new file mode 100644 index 000000000000..29836710ce5a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucketType.php @@ -0,0 +1,75 @@ +google.cloud.visionai.v1.FacetBucketType + */ +class FacetBucketType +{ + /** + * Unspecified type. + * + * Generated from protobuf enum FACET_BUCKET_TYPE_UNSPECIFIED = 0; + */ + const FACET_BUCKET_TYPE_UNSPECIFIED = 0; + /** + * Value type. + * + * Generated from protobuf enum FACET_BUCKET_TYPE_VALUE = 1; + */ + const FACET_BUCKET_TYPE_VALUE = 1; + /** + * Datetime type. + * + * Generated from protobuf enum FACET_BUCKET_TYPE_DATETIME = 2; + */ + const FACET_BUCKET_TYPE_DATETIME = 2; + /** + * Fixed Range type. + * + * Generated from protobuf enum FACET_BUCKET_TYPE_FIXED_RANGE = 3; + */ + const FACET_BUCKET_TYPE_FIXED_RANGE = 3; + /** + * Custom Range type. + * + * Generated from protobuf enum FACET_BUCKET_TYPE_CUSTOM_RANGE = 4; + */ + const FACET_BUCKET_TYPE_CUSTOM_RANGE = 4; + + private static $valueToName = [ + self::FACET_BUCKET_TYPE_UNSPECIFIED => 'FACET_BUCKET_TYPE_UNSPECIFIED', + self::FACET_BUCKET_TYPE_VALUE => 'FACET_BUCKET_TYPE_VALUE', + self::FACET_BUCKET_TYPE_DATETIME => 'FACET_BUCKET_TYPE_DATETIME', + self::FACET_BUCKET_TYPE_FIXED_RANGE => 'FACET_BUCKET_TYPE_FIXED_RANGE', + self::FACET_BUCKET_TYPE_CUSTOM_RANGE => 'FACET_BUCKET_TYPE_CUSTOM_RANGE', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetGroup.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetGroup.php new file mode 100644 index 000000000000..fab8822be591 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetGroup.php @@ -0,0 +1,224 @@ +google.cloud.visionai.v1.FacetGroup + */ +class FacetGroup extends \Google\Protobuf\Internal\Message +{ + /** + * Unique id of the facet group. + * + * Generated from protobuf field string facet_id = 1; + */ + protected $facet_id = ''; + /** + * Display name of the facet. To be used by UI for facet rendering. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Buckets associated with the facet. E.g. for "Team" facet, the bucket + * can be 49ers, patriots, etc. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + */ + private $buckets; + /** + * Facet bucket type. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + */ + protected $bucket_type = 0; + /** + * If true, return query matched annotations for this facet group's selection. + * This option is only applicable for facets based on partition level + * annotations. It supports the following facet values: + * - INTEGER + * - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only) + * + * Generated from protobuf field bool fetch_matched_annotations = 5; + */ + protected $fetch_matched_annotations = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $facet_id + * Unique id of the facet group. + * @type string $display_name + * Display name of the facet. To be used by UI for facet rendering. + * @type \Google\Cloud\VisionAI\V1\FacetBucket[] $buckets + * Buckets associated with the facet. E.g. for "Team" facet, the bucket + * can be 49ers, patriots, etc. + * @type int $bucket_type + * Facet bucket type. + * @type bool $fetch_matched_annotations + * If true, return query matched annotations for this facet group's selection. + * This option is only applicable for facets based on partition level + * annotations. It supports the following facet values: + * - INTEGER + * - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only) + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Unique id of the facet group. + * + * Generated from protobuf field string facet_id = 1; + * @return string + */ + public function getFacetId() + { + return $this->facet_id; + } + + /** + * Unique id of the facet group. + * + * Generated from protobuf field string facet_id = 1; + * @param string $var + * @return $this + */ + public function setFacetId($var) + { + GPBUtil::checkString($var, True); + $this->facet_id = $var; + + return $this; + } + + /** + * Display name of the facet. To be used by UI for facet rendering. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Display name of the facet. To be used by UI for facet rendering. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Buckets associated with the facet. E.g. for "Team" facet, the bucket + * can be 49ers, patriots, etc. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\FacetBucket> + */ + public function getBuckets() + { + return $this->buckets; + } + + /** + * Buckets associated with the facet. E.g. for "Team" facet, the bucket + * can be 49ers, patriots, etc. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; + * @param \Google\Cloud\VisionAI\V1\FacetBucket[] $var + * @return $this + */ + public function setBuckets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\FacetBucket::class); + $this->buckets = $arr; + + return $this; + } + + /** + * Facet bucket type. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * @return int + */ + public function getBucketType() + { + return $this->bucket_type; + } + + /** + * Facet bucket type. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * @param int $var + * @return $this + */ + public function setBucketType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\FacetBucketType::class); + $this->bucket_type = $var; + + return $this; + } + + /** + * If true, return query matched annotations for this facet group's selection. + * This option is only applicable for facets based on partition level + * annotations. It supports the following facet values: + * - INTEGER + * - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only) + * + * Generated from protobuf field bool fetch_matched_annotations = 5; + * @return bool + */ + public function getFetchMatchedAnnotations() + { + return $this->fetch_matched_annotations; + } + + /** + * If true, return query matched annotations for this facet group's selection. + * This option is only applicable for facets based on partition level + * annotations. It supports the following facet values: + * - INTEGER + * - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only) + * + * Generated from protobuf field bool fetch_matched_annotations = 5; + * @param bool $var + * @return $this + */ + public function setFetchMatchedAnnotations($var) + { + GPBUtil::checkBool($var); + $this->fetch_matched_annotations = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty.php new file mode 100644 index 000000000000..915b8bdba03f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty.php @@ -0,0 +1,329 @@ +google.cloud.visionai.v1.FacetProperty + */ +class FacetProperty extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the facets, which are the dimensions users want to use to refine + * search results. `mapped_fields` will match UserSpecifiedDataSchema keys. + * For example, user can add a bunch of UGAs with the same key, such as + * player:adam, player:bob, player:charles. When multiple mapped_fields are + * specified, will merge their value together as final facet value. E.g. + * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field = + * [home_team, away_team], facet_value will be [a, b, c]. + * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the + * mapped_field equals the parent SearchConfig.name, the parent must + * also contain a SearchCriteriaProperty that maps to the same fields. + * mapped_fields must not be empty. + * + * Generated from protobuf field repeated string mapped_fields = 1; + */ + private $mapped_fields; + /** + * Display name of the facet. To be used by UI for facet rendering. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Maximum number of unique bucket to return for one facet. Bucket number can + * be large for high-cardinality facet such as "player". We only return top-n + * most related ones to user. If it's <= 0, the server will decide the + * appropriate result_size. + * + * Generated from protobuf field int64 result_size = 3; + */ + protected $result_size = 0; + /** + * Facet bucket type e.g. value, range. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + */ + protected $bucket_type = 0; + protected $range_facet_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\FacetProperty\FixedRangeBucketSpec $fixed_range_bucket_spec + * Fixed range facet bucket config. + * @type \Google\Cloud\VisionAI\V1\FacetProperty\CustomRangeBucketSpec $custom_range_bucket_spec + * Custom range facet bucket config. + * @type \Google\Cloud\VisionAI\V1\FacetProperty\DateTimeBucketSpec $datetime_bucket_spec + * Datetime range facet bucket config. + * @type string[] $mapped_fields + * Name of the facets, which are the dimensions users want to use to refine + * search results. `mapped_fields` will match UserSpecifiedDataSchema keys. + * For example, user can add a bunch of UGAs with the same key, such as + * player:adam, player:bob, player:charles. When multiple mapped_fields are + * specified, will merge their value together as final facet value. E.g. + * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field = + * [home_team, away_team], facet_value will be [a, b, c]. + * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the + * mapped_field equals the parent SearchConfig.name, the parent must + * also contain a SearchCriteriaProperty that maps to the same fields. + * mapped_fields must not be empty. + * @type string $display_name + * Display name of the facet. To be used by UI for facet rendering. + * @type int|string $result_size + * Maximum number of unique bucket to return for one facet. Bucket number can + * be large for high-cardinality facet such as "player". We only return top-n + * most related ones to user. If it's <= 0, the server will decide the + * appropriate result_size. + * @type int $bucket_type + * Facet bucket type e.g. value, range. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Fixed range facet bucket config. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5; + * @return \Google\Cloud\VisionAI\V1\FacetProperty\FixedRangeBucketSpec|null + */ + public function getFixedRangeBucketSpec() + { + return $this->readOneof(5); + } + + public function hasFixedRangeBucketSpec() + { + return $this->hasOneof(5); + } + + /** + * Fixed range facet bucket config. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5; + * @param \Google\Cloud\VisionAI\V1\FacetProperty\FixedRangeBucketSpec $var + * @return $this + */ + public function setFixedRangeBucketSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetProperty\FixedRangeBucketSpec::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Custom range facet bucket config. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6; + * @return \Google\Cloud\VisionAI\V1\FacetProperty\CustomRangeBucketSpec|null + */ + public function getCustomRangeBucketSpec() + { + return $this->readOneof(6); + } + + public function hasCustomRangeBucketSpec() + { + return $this->hasOneof(6); + } + + /** + * Custom range facet bucket config. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6; + * @param \Google\Cloud\VisionAI\V1\FacetProperty\CustomRangeBucketSpec $var + * @return $this + */ + public function setCustomRangeBucketSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetProperty\CustomRangeBucketSpec::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Datetime range facet bucket config. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7; + * @return \Google\Cloud\VisionAI\V1\FacetProperty\DateTimeBucketSpec|null + */ + public function getDatetimeBucketSpec() + { + return $this->readOneof(7); + } + + public function hasDatetimeBucketSpec() + { + return $this->hasOneof(7); + } + + /** + * Datetime range facet bucket config. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7; + * @param \Google\Cloud\VisionAI\V1\FacetProperty\DateTimeBucketSpec $var + * @return $this + */ + public function setDatetimeBucketSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetProperty\DateTimeBucketSpec::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Name of the facets, which are the dimensions users want to use to refine + * search results. `mapped_fields` will match UserSpecifiedDataSchema keys. + * For example, user can add a bunch of UGAs with the same key, such as + * player:adam, player:bob, player:charles. When multiple mapped_fields are + * specified, will merge their value together as final facet value. E.g. + * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field = + * [home_team, away_team], facet_value will be [a, b, c]. + * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the + * mapped_field equals the parent SearchConfig.name, the parent must + * also contain a SearchCriteriaProperty that maps to the same fields. + * mapped_fields must not be empty. + * + * Generated from protobuf field repeated string mapped_fields = 1; + * @return RepeatedField + */ + public function getMappedFields() + { + return $this->mapped_fields; + } + + /** + * Name of the facets, which are the dimensions users want to use to refine + * search results. `mapped_fields` will match UserSpecifiedDataSchema keys. + * For example, user can add a bunch of UGAs with the same key, such as + * player:adam, player:bob, player:charles. When multiple mapped_fields are + * specified, will merge their value together as final facet value. E.g. + * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field = + * [home_team, away_team], facet_value will be [a, b, c]. + * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the + * mapped_field equals the parent SearchConfig.name, the parent must + * also contain a SearchCriteriaProperty that maps to the same fields. + * mapped_fields must not be empty. + * + * Generated from protobuf field repeated string mapped_fields = 1; + * @param string[] $var + * @return $this + */ + public function setMappedFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->mapped_fields = $arr; + + return $this; + } + + /** + * Display name of the facet. To be used by UI for facet rendering. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Display name of the facet. To be used by UI for facet rendering. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Maximum number of unique bucket to return for one facet. Bucket number can + * be large for high-cardinality facet such as "player". We only return top-n + * most related ones to user. If it's <= 0, the server will decide the + * appropriate result_size. + * + * Generated from protobuf field int64 result_size = 3; + * @return int|string + */ + public function getResultSize() + { + return $this->result_size; + } + + /** + * Maximum number of unique bucket to return for one facet. Bucket number can + * be large for high-cardinality facet such as "player". We only return top-n + * most related ones to user. If it's <= 0, the server will decide the + * appropriate result_size. + * + * Generated from protobuf field int64 result_size = 3; + * @param int|string $var + * @return $this + */ + public function setResultSize($var) + { + GPBUtil::checkInt64($var); + $this->result_size = $var; + + return $this; + } + + /** + * Facet bucket type e.g. value, range. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * @return int + */ + public function getBucketType() + { + return $this->bucket_type; + } + + /** + * Facet bucket type e.g. value, range. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; + * @param int $var + * @return $this + */ + public function setBucketType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\FacetBucketType::class); + $this->bucket_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getRangeFacetConfig() + { + return $this->whichOneof("range_facet_config"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/CustomRangeBucketSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/CustomRangeBucketSpec.php new file mode 100644 index 000000000000..cdedcb07e040 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/CustomRangeBucketSpec.php @@ -0,0 +1,74 @@ +google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec + */ +class CustomRangeBucketSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Currently, only integer type is supported for this field. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + */ + private $endpoints; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\FacetValue[] $endpoints + * Currently, only integer type is supported for this field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Currently, only integer type is supported for this field. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\FacetValue> + */ + public function getEndpoints() + { + return $this->endpoints; + } + + /** + * Currently, only integer type is supported for this field. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; + * @param \Google\Cloud\VisionAI\V1\FacetValue[] $var + * @return $this + */ + public function setEndpoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\FacetValue::class); + $this->endpoints = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/DateTimeBucketSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/DateTimeBucketSpec.php new file mode 100644 index 000000000000..667fa8856f67 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/DateTimeBucketSpec.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec + */ +class DateTimeBucketSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Granularity of date type facet. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity granularity = 1; + */ + protected $granularity = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $granularity + * Granularity of date type facet. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Granularity of date type facet. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity granularity = 1; + * @return int + */ + public function getGranularity() + { + return $this->granularity; + } + + /** + * Granularity of date type facet. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity granularity = 1; + * @param int $var + * @return $this + */ + public function setGranularity($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\FacetProperty\DateTimeBucketSpec\Granularity::class); + $this->granularity = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/DateTimeBucketSpec/Granularity.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/DateTimeBucketSpec/Granularity.php new file mode 100644 index 000000000000..a858537b2482 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/DateTimeBucketSpec/Granularity.php @@ -0,0 +1,68 @@ +google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity + */ +class Granularity +{ + /** + * Unspecified granularity. + * + * Generated from protobuf enum GRANULARITY_UNSPECIFIED = 0; + */ + const GRANULARITY_UNSPECIFIED = 0; + /** + * Granularity is year. + * + * Generated from protobuf enum YEAR = 1; + */ + const YEAR = 1; + /** + * Granularity is month. + * + * Generated from protobuf enum MONTH = 2; + */ + const MONTH = 2; + /** + * Granularity is day. + * + * Generated from protobuf enum DAY = 3; + */ + const DAY = 3; + + private static $valueToName = [ + self::GRANULARITY_UNSPECIFIED => 'GRANULARITY_UNSPECIFIED', + self::YEAR => 'YEAR', + self::MONTH => 'MONTH', + self::DAY => 'DAY', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/FixedRangeBucketSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/FixedRangeBucketSpec.php new file mode 100644 index 000000000000..fbcc8cb0bd3a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/FixedRangeBucketSpec.php @@ -0,0 +1,169 @@ +google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec + */ +class FixedRangeBucketSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Lower bound of the bucket. NOTE: Only integer type is currently supported + * for this field. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetValue bucket_start = 1; + */ + protected $bucket_start = null; + /** + * Bucket granularity. NOTE: Only integer type is currently supported for + * this field. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; + */ + protected $bucket_granularity = null; + /** + * Total number of buckets. + * + * Generated from protobuf field int32 bucket_count = 3; + */ + protected $bucket_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\FacetValue $bucket_start + * Lower bound of the bucket. NOTE: Only integer type is currently supported + * for this field. + * @type \Google\Cloud\VisionAI\V1\FacetValue $bucket_granularity + * Bucket granularity. NOTE: Only integer type is currently supported for + * this field. + * @type int $bucket_count + * Total number of buckets. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Lower bound of the bucket. NOTE: Only integer type is currently supported + * for this field. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetValue bucket_start = 1; + * @return \Google\Cloud\VisionAI\V1\FacetValue|null + */ + public function getBucketStart() + { + return $this->bucket_start; + } + + public function hasBucketStart() + { + return isset($this->bucket_start); + } + + public function clearBucketStart() + { + unset($this->bucket_start); + } + + /** + * Lower bound of the bucket. NOTE: Only integer type is currently supported + * for this field. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetValue bucket_start = 1; + * @param \Google\Cloud\VisionAI\V1\FacetValue $var + * @return $this + */ + public function setBucketStart($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetValue::class); + $this->bucket_start = $var; + + return $this; + } + + /** + * Bucket granularity. NOTE: Only integer type is currently supported for + * this field. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; + * @return \Google\Cloud\VisionAI\V1\FacetValue|null + */ + public function getBucketGranularity() + { + return $this->bucket_granularity; + } + + public function hasBucketGranularity() + { + return isset($this->bucket_granularity); + } + + public function clearBucketGranularity() + { + unset($this->bucket_granularity); + } + + /** + * Bucket granularity. NOTE: Only integer type is currently supported for + * this field. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; + * @param \Google\Cloud\VisionAI\V1\FacetValue $var + * @return $this + */ + public function setBucketGranularity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetValue::class); + $this->bucket_granularity = $var; + + return $this; + } + + /** + * Total number of buckets. + * + * Generated from protobuf field int32 bucket_count = 3; + * @return int + */ + public function getBucketCount() + { + return $this->bucket_count; + } + + /** + * Total number of buckets. + * + * Generated from protobuf field int32 bucket_count = 3; + * @param int $var + * @return $this + */ + public function setBucketCount($var) + { + GPBUtil::checkInt32($var); + $this->bucket_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetValue.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetValue.php new file mode 100644 index 000000000000..5bab50ba7e65 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetValue.php @@ -0,0 +1,141 @@ +google.cloud.visionai.v1.FacetValue + */ +class FacetValue extends \Google\Protobuf\Internal\Message +{ + protected $value; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $string_value + * String type value. + * @type int|string $integer_value + * Integer type value. + * @type \Google\Type\DateTime $datetime_value + * Datetime type value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * String type value. + * + * Generated from protobuf field string string_value = 1; + * @return string + */ + public function getStringValue() + { + return $this->readOneof(1); + } + + public function hasStringValue() + { + return $this->hasOneof(1); + } + + /** + * String type value. + * + * Generated from protobuf field string string_value = 1; + * @param string $var + * @return $this + */ + public function setStringValue($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Integer type value. + * + * Generated from protobuf field int64 integer_value = 2; + * @return int|string + */ + public function getIntegerValue() + { + return $this->readOneof(2); + } + + public function hasIntegerValue() + { + return $this->hasOneof(2); + } + + /** + * Integer type value. + * + * Generated from protobuf field int64 integer_value = 2; + * @param int|string $var + * @return $this + */ + public function setIntegerValue($var) + { + GPBUtil::checkInt64($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Datetime type value. + * + * Generated from protobuf field .google.type.DateTime datetime_value = 3; + * @return \Google\Type\DateTime|null + */ + public function getDatetimeValue() + { + return $this->readOneof(3); + } + + public function hasDatetimeValue() + { + return $this->hasOneof(3); + } + + /** + * Datetime type value. + * + * Generated from protobuf field .google.type.DateTime datetime_value = 3; + * @param \Google\Type\DateTime $var + * @return $this + */ + public function setDatetimeValue($var) + { + GPBUtil::checkMessage($var, \Google\Type\DateTime::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getValue() + { + return $this->whichOneof("value"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FloatRange.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FloatRange.php new file mode 100644 index 000000000000..e8b722731500 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FloatRange.php @@ -0,0 +1,121 @@ +google.cloud.visionai.v1.FloatRange + */ +class FloatRange extends \Google\Protobuf\Internal\Message +{ + /** + * Start of the float range. + * + * Generated from protobuf field optional float start = 1; + */ + protected $start = null; + /** + * End of the float range. + * + * Generated from protobuf field optional float end = 2; + */ + protected $end = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $start + * Start of the float range. + * @type float $end + * End of the float range. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Start of the float range. + * + * Generated from protobuf field optional float start = 1; + * @return float + */ + public function getStart() + { + return isset($this->start) ? $this->start : 0.0; + } + + public function hasStart() + { + return isset($this->start); + } + + public function clearStart() + { + unset($this->start); + } + + /** + * Start of the float range. + * + * Generated from protobuf field optional float start = 1; + * @param float $var + * @return $this + */ + public function setStart($var) + { + GPBUtil::checkFloat($var); + $this->start = $var; + + return $this; + } + + /** + * End of the float range. + * + * Generated from protobuf field optional float end = 2; + * @return float + */ + public function getEnd() + { + return isset($this->end) ? $this->end : 0.0; + } + + public function hasEnd() + { + return isset($this->end); + } + + public function clearEnd() + { + unset($this->end); + } + + /** + * End of the float range. + * + * Generated from protobuf field optional float end = 2; + * @param float $var + * @return $this + */ + public function setEnd($var) + { + GPBUtil::checkFloat($var); + $this->end = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FloatRangeArray.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FloatRangeArray.php new file mode 100644 index 000000000000..686d4d7b3f66 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FloatRangeArray.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.FloatRangeArray + */ +class FloatRangeArray extends \Google\Protobuf\Internal\Message +{ + /** + * Float range values. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + */ + private $float_ranges; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\FloatRange[] $float_ranges + * Float range values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Float range values. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\FloatRange> + */ + public function getFloatRanges() + { + return $this->float_ranges; + } + + /** + * Float range values. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; + * @param \Google\Cloud\VisionAI\V1\FloatRange[] $var + * @return $this + */ + public function setFloatRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\FloatRange::class); + $this->float_ranges = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GcsOutputConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GcsOutputConfig.php new file mode 100644 index 000000000000..05143623b491 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GcsOutputConfig.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.GcsOutputConfig + */ +class GcsOutputConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The Cloud Storage path for Vision AI Platform to ingest annotations to. + * + * Generated from protobuf field string gcs_path = 1; + */ + protected $gcs_path = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $gcs_path + * The Cloud Storage path for Vision AI Platform to ingest annotations to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * The Cloud Storage path for Vision AI Platform to ingest annotations to. + * + * Generated from protobuf field string gcs_path = 1; + * @return string + */ + public function getGcsPath() + { + return $this->gcs_path; + } + + /** + * The Cloud Storage path for Vision AI Platform to ingest annotations to. + * + * Generated from protobuf field string gcs_path = 1; + * @param string $var + * @return $this + */ + public function setGcsPath($var) + { + GPBUtil::checkString($var, True); + $this->gcs_path = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GcsSource.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GcsSource.php new file mode 100644 index 000000000000..4c1063058a5d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GcsSource.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.GcsSource + */ +class GcsSource extends \Google\Protobuf\Internal\Message +{ + /** + * Required. References to a Google Cloud Storage paths. + * + * Generated from protobuf field repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private $uris; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $uris + * Required. References to a Google Cloud Storage paths. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Required. References to a Google Cloud Storage paths. + * + * Generated from protobuf field repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField + */ + public function getUris() + { + return $this->uris; + } + + /** + * Required. References to a Google Cloud Storage paths. + * + * Generated from protobuf field repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string[] $var + * @return $this + */ + public function setUris($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->uris = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeneralObjectDetectionConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeneralObjectDetectionConfig.php new file mode 100644 index 000000000000..e755d890a4f7 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeneralObjectDetectionConfig.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.GeneralObjectDetectionConfig + */ +class GeneralObjectDetectionConfig extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateHlsUriRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateHlsUriRequest.php new file mode 100644 index 000000000000..fe71fa49dea1 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateHlsUriRequest.php @@ -0,0 +1,151 @@ +google.cloud.visionai.v1.GenerateHlsUriRequest + */ +class GenerateHlsUriRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the asset to request clips for. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The time range to request clips for. Will be ignored if `get_live_view` is + * set to True. The total time range requested should be smaller than 24h. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + */ + private $temporal_partitions; + /** + * Option to exclusively show a livestream of the asset with up to 3 minutes + * of backlog data. + * + * Generated from protobuf field bool live_view_enabled = 3; + */ + protected $live_view_enabled = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the asset to request clips for. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * @type \Google\Cloud\VisionAI\V1\Partition\TemporalPartition[] $temporal_partitions + * The time range to request clips for. Will be ignored if `get_live_view` is + * set to True. The total time range requested should be smaller than 24h. + * @type bool $live_view_enabled + * Option to exclusively show a livestream of the asset with up to 3 minutes + * of backlog data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the asset to request clips for. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the asset to request clips for. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The time range to request clips for. Will be ignored if `get_live_view` is + * set to True. The total time range requested should be smaller than 24h. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Partition\TemporalPartition> + */ + public function getTemporalPartitions() + { + return $this->temporal_partitions; + } + + /** + * The time range to request clips for. Will be ignored if `get_live_view` is + * set to True. The total time range requested should be smaller than 24h. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * @param \Google\Cloud\VisionAI\V1\Partition\TemporalPartition[] $var + * @return $this + */ + public function setTemporalPartitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Partition\TemporalPartition::class); + $this->temporal_partitions = $arr; + + return $this; + } + + /** + * Option to exclusively show a livestream of the asset with up to 3 minutes + * of backlog data. + * + * Generated from protobuf field bool live_view_enabled = 3; + * @return bool + */ + public function getLiveViewEnabled() + { + return $this->live_view_enabled; + } + + /** + * Option to exclusively show a livestream of the asset with up to 3 minutes + * of backlog data. + * + * Generated from protobuf field bool live_view_enabled = 3; + * @param bool $var + * @return $this + */ + public function setLiveViewEnabled($var) + { + GPBUtil::checkBool($var); + $this->live_view_enabled = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateHlsUriResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateHlsUriResponse.php new file mode 100644 index 000000000000..9ca10d650efa --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateHlsUriResponse.php @@ -0,0 +1,109 @@ +google.cloud.visionai.v1.GenerateHlsUriResponse + */ +class GenerateHlsUriResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A signed uri to download the HLS manifest corresponding to the requested + * times. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + /** + * A list of temporal partitions of the content returned in the order they + * appear in the stream. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + */ + private $temporal_partitions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * A signed uri to download the HLS manifest corresponding to the requested + * times. + * @type \Google\Cloud\VisionAI\V1\Partition\TemporalPartition[] $temporal_partitions + * A list of temporal partitions of the content returned in the order they + * appear in the stream. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * A signed uri to download the HLS manifest corresponding to the requested + * times. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * A signed uri to download the HLS manifest corresponding to the requested + * times. + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * A list of temporal partitions of the content returned in the order they + * appear in the stream. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Partition\TemporalPartition> + */ + public function getTemporalPartitions() + { + return $this->temporal_partitions; + } + + /** + * A list of temporal partitions of the content returned in the order they + * appear in the stream. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; + * @param \Google\Cloud\VisionAI\V1\Partition\TemporalPartition[] $var + * @return $this + */ + public function setTemporalPartitions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Partition\TemporalPartition::class); + $this->temporal_partitions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateRetrievalUrlRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateRetrievalUrlRequest.php new file mode 100644 index 000000000000..ef1dce3b8733 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateRetrievalUrlRequest.php @@ -0,0 +1,75 @@ +google.cloud.visionai.v1.GenerateRetrievalUrlRequest + */ +class GenerateRetrievalUrlRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the asset to request signed url for. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the asset to request signed url for. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the asset to request signed url for. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the asset to request signed url for. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateRetrievalUrlResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateRetrievalUrlResponse.php new file mode 100644 index 000000000000..957b8531550c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateRetrievalUrlResponse.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.GenerateRetrievalUrlResponse + */ +class GenerateRetrievalUrlResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A signed url to download the content of the asset. + * + * Generated from protobuf field string signed_uri = 1; + */ + protected $signed_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $signed_uri + * A signed url to download the content of the asset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * A signed url to download the content of the asset. + * + * Generated from protobuf field string signed_uri = 1; + * @return string + */ + public function getSignedUri() + { + return $this->signed_uri; + } + + /** + * A signed url to download the content of the asset. + * + * Generated from protobuf field string signed_uri = 1; + * @param string $var + * @return $this + */ + public function setSignedUri($var) + { + GPBUtil::checkString($var, True); + $this->signed_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateStreamHlsTokenRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateStreamHlsTokenRequest.php new file mode 100644 index 000000000000..eec595a8a4b8 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateStreamHlsTokenRequest.php @@ -0,0 +1,80 @@ +google.cloud.visionai.v1.GenerateStreamHlsTokenRequest + */ +class GenerateStreamHlsTokenRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the stream. + * + * Generated from protobuf field string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $stream = ''; + + /** + * @param string $stream Required. The name of the stream. + * + * @return \Google\Cloud\VisionAI\V1\GenerateStreamHlsTokenRequest + * + * @experimental + */ + public static function build(string $stream): self + { + return (new self()) + ->setStream($stream); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $stream + * Required. The name of the stream. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the stream. + * + * Generated from protobuf field string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getStream() + { + return $this->stream; + } + + /** + * Required. The name of the stream. + * + * Generated from protobuf field string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setStream($var) + { + GPBUtil::checkString($var, True); + $this->stream = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateStreamHlsTokenResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateStreamHlsTokenResponse.php new file mode 100644 index 000000000000..b6069895af4e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateStreamHlsTokenResponse.php @@ -0,0 +1,127 @@ +google.cloud.visionai.v1.GenerateStreamHlsTokenResponse + */ +class GenerateStreamHlsTokenResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The generated JWT token. + * The caller should insert this token to the authorization header of the HTTP + * requests to get the HLS playlist manifest and the video chunks. + * eg: curl -H "Authorization: Bearer $TOKEN" + * https://domain.com/test-stream.playback/master.m3u8 + * + * Generated from protobuf field string token = 1; + */ + protected $token = ''; + /** + * The expiration time of the token. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2; + */ + protected $expiration_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $token + * The generated JWT token. + * The caller should insert this token to the authorization header of the HTTP + * requests to get the HLS playlist manifest and the video chunks. + * eg: curl -H "Authorization: Bearer $TOKEN" + * https://domain.com/test-stream.playback/master.m3u8 + * @type \Google\Protobuf\Timestamp $expiration_time + * The expiration time of the token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * The generated JWT token. + * The caller should insert this token to the authorization header of the HTTP + * requests to get the HLS playlist manifest and the video chunks. + * eg: curl -H "Authorization: Bearer $TOKEN" + * https://domain.com/test-stream.playback/master.m3u8 + * + * Generated from protobuf field string token = 1; + * @return string + */ + public function getToken() + { + return $this->token; + } + + /** + * The generated JWT token. + * The caller should insert this token to the authorization header of the HTTP + * requests to get the HLS playlist manifest and the video chunks. + * eg: curl -H "Authorization: Bearer $TOKEN" + * https://domain.com/test-stream.playback/master.m3u8 + * + * Generated from protobuf field string token = 1; + * @param string $var + * @return $this + */ + public function setToken($var) + { + GPBUtil::checkString($var, True); + $this->token = $var; + + return $this; + } + + /** + * The expiration time of the token. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpirationTime() + { + return $this->expiration_time; + } + + public function hasExpirationTime() + { + return isset($this->expiration_time); + } + + public function clearExpirationTime() + { + unset($this->expiration_time); + } + + /** + * The expiration time of the token. + * + * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpirationTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expiration_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeoCoordinate.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeoCoordinate.php new file mode 100644 index 000000000000..8e27e4dc371a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeoCoordinate.php @@ -0,0 +1,101 @@ +google.cloud.visionai.v1.GeoCoordinate + */ +class GeoCoordinate extends \Google\Protobuf\Internal\Message +{ + /** + * Latitude Coordinate. Degrees [-90 .. 90] + * + * Generated from protobuf field double latitude = 1; + */ + protected $latitude = 0.0; + /** + * Longitude Coordinate. Degrees [-180 .. 180] + * + * Generated from protobuf field double longitude = 2; + */ + protected $longitude = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $latitude + * Latitude Coordinate. Degrees [-90 .. 90] + * @type float $longitude + * Longitude Coordinate. Degrees [-180 .. 180] + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Latitude Coordinate. Degrees [-90 .. 90] + * + * Generated from protobuf field double latitude = 1; + * @return float + */ + public function getLatitude() + { + return $this->latitude; + } + + /** + * Latitude Coordinate. Degrees [-90 .. 90] + * + * Generated from protobuf field double latitude = 1; + * @param float $var + * @return $this + */ + public function setLatitude($var) + { + GPBUtil::checkDouble($var); + $this->latitude = $var; + + return $this; + } + + /** + * Longitude Coordinate. Degrees [-180 .. 180] + * + * Generated from protobuf field double longitude = 2; + * @return float + */ + public function getLongitude() + { + return $this->longitude; + } + + /** + * Longitude Coordinate. Degrees [-180 .. 180] + * + * Generated from protobuf field double longitude = 2; + * @param float $var + * @return $this + */ + public function setLongitude($var) + { + GPBUtil::checkDouble($var); + $this->longitude = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeoLocationArray.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeoLocationArray.php new file mode 100644 index 000000000000..15ec29e0347c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeoLocationArray.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.GeoLocationArray + */ +class GeoLocationArray extends \Google\Protobuf\Internal\Message +{ + /** + * A list of circle areas. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + */ + private $circle_areas; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\CircleArea[] $circle_areas + * A list of circle areas. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * A list of circle areas. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\CircleArea> + */ + public function getCircleAreas() + { + return $this->circle_areas; + } + + /** + * A list of circle areas. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; + * @param \Google\Cloud\VisionAI\V1\CircleArea[] $var + * @return $this + */ + public function setCircleAreas($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\CircleArea::class); + $this->circle_areas = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAnalysisRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAnalysisRequest.php new file mode 100644 index 000000000000..f410e8e6dcca --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAnalysisRequest.php @@ -0,0 +1,81 @@ +google.cloud.visionai.v1.GetAnalysisRequest + */ +class GetAnalysisRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * 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 resource. Please see + * {@see LiveVideoAnalyticsClient::analysisName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\GetAnalysisRequest + * + * @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 resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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 resource. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAnnotationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAnnotationRequest.php new file mode 100644 index 000000000000..c122ff03401f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAnnotationRequest.php @@ -0,0 +1,91 @@ +google.cloud.visionai.v1.GetAnnotationRequest + */ +class GetAnnotationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the annotation to retrieve. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the annotation to retrieve. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * Please see {@see WarehouseClient::annotationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\GetAnnotationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the annotation to retrieve. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the annotation to retrieve. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the annotation to retrieve. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetApplicationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetApplicationRequest.php new file mode 100644 index 000000000000..39d6a1ea1e3f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetApplicationRequest.php @@ -0,0 +1,81 @@ +google.cloud.visionai.v1.GetApplicationRequest + */ +class GetApplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * 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 resource. Please see + * {@see AppPlatformClient::applicationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\GetApplicationRequest + * + * @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 resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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 resource. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAssetRequest.php new file mode 100644 index 000000000000..e9d6b921667c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAssetRequest.php @@ -0,0 +1,91 @@ +google.cloud.visionai.v1.GetAssetRequest + */ +class GetAssetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the asset to retrieve. + * Format: + * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the asset to retrieve. + * Format: + * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} + * Please see {@see WarehouseClient::assetName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\GetAssetRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the asset to retrieve. + * Format: + * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the asset to retrieve. + * Format: + * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the asset to retrieve. + * Format: + * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetClusterRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetClusterRequest.php new file mode 100644 index 000000000000..daeea0ab30a8 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetClusterRequest.php @@ -0,0 +1,81 @@ +google.cloud.visionai.v1.GetClusterRequest + */ +class GetClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * 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 resource. Please see + * {@see StreamsServiceClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\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. Name of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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 resource. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetCollectionRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetCollectionRequest.php new file mode 100644 index 000000000000..855c273c922d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetCollectionRequest.php @@ -0,0 +1,86 @@ +google.cloud.visionai.v1.GetCollectionRequest + */ +class GetCollectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the collection to retrieve. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the collection to retrieve. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * Please see {@see WarehouseClient::collectionName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\GetCollectionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the collection to retrieve. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the collection to retrieve. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the collection to retrieve. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetCorpusRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetCorpusRequest.php new file mode 100644 index 000000000000..859154d92aff --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetCorpusRequest.php @@ -0,0 +1,81 @@ +google.cloud.visionai.v1.GetCorpusRequest + */ +class GetCorpusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the corpus to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the corpus to retrieve. Please see + * {@see WarehouseClient::corpusName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\GetCorpusRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the corpus to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the corpus to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the corpus to retrieve. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetDataSchemaRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetDataSchemaRequest.php new file mode 100644 index 000000000000..e7db27657c6b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetDataSchemaRequest.php @@ -0,0 +1,91 @@ +google.cloud.visionai.v1.GetDataSchemaRequest + */ +class GetDataSchemaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the data schema to retrieve. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the data schema to retrieve. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` + * Please see {@see WarehouseClient::dataSchemaName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\GetDataSchemaRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the data schema to retrieve. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the data schema to retrieve. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the data schema to retrieve. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetDraftRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetDraftRequest.php new file mode 100644 index 000000000000..f74a4692e54d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetDraftRequest.php @@ -0,0 +1,81 @@ +google.cloud.visionai.v1.GetDraftRequest + */ +class GetDraftRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * 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 resource. Please see + * {@see AppPlatformClient::draftName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\GetDraftRequest + * + * @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 resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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 resource. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetEventRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetEventRequest.php new file mode 100644 index 000000000000..194138daa1b5 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetEventRequest.php @@ -0,0 +1,81 @@ +google.cloud.visionai.v1.GetEventRequest + */ +class GetEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * 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 resource. Please see + * {@see StreamsServiceClient::eventName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\GetEventRequest + * + * @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 resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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 resource. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetIndexEndpointRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetIndexEndpointRequest.php new file mode 100644 index 000000000000..1748fcf55bf7 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetIndexEndpointRequest.php @@ -0,0 +1,81 @@ +google.cloud.visionai.v1.GetIndexEndpointRequest + */ +class GetIndexEndpointRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the IndexEndpoint resource. + * + * 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 IndexEndpoint resource. Please see + * {@see WarehouseClient::indexEndpointName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\GetIndexEndpointRequest + * + * @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 IndexEndpoint resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the IndexEndpoint resource. + * + * 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 IndexEndpoint resource. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetIndexRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetIndexRequest.php new file mode 100644 index 000000000000..dd0ed8e9243b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetIndexRequest.php @@ -0,0 +1,91 @@ +google.cloud.visionai.v1.GetIndexRequest + */ +class GetIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the Index resource. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * + * 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 Index resource. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * Please see {@see WarehouseClient::indexName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\GetIndexRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the Index resource. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the Index resource. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * + * 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 Index resource. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetInstanceRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetInstanceRequest.php new file mode 100644 index 000000000000..96eb0d1a4367 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetInstanceRequest.php @@ -0,0 +1,81 @@ +google.cloud.visionai.v1.GetInstanceRequest + */ +class GetInstanceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * 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 resource. Please see + * {@see AppPlatformClient::instanceName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\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. Name of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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 resource. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetOperatorRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetOperatorRequest.php new file mode 100644 index 000000000000..e918c49c8988 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetOperatorRequest.php @@ -0,0 +1,81 @@ +google.cloud.visionai.v1.GetOperatorRequest + */ +class GetOperatorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * 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 resource. Please see + * {@see LiveVideoAnalyticsClient::operatorName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\GetOperatorRequest + * + * @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 resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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 resource. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetProcessRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetProcessRequest.php new file mode 100644 index 000000000000..c7f8d00158a4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetProcessRequest.php @@ -0,0 +1,81 @@ +google.cloud.visionai.v1.GetProcessRequest + */ +class GetProcessRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * 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 resource. Please see + * {@see LiveVideoAnalyticsClient::processName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\GetProcessRequest + * + * @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 resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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 resource. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetProcessorRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetProcessorRequest.php new file mode 100644 index 000000000000..359eb870f41c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetProcessorRequest.php @@ -0,0 +1,81 @@ +google.cloud.visionai.v1.GetProcessorRequest + */ +class GetProcessorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * 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 resource. Please see + * {@see AppPlatformClient::processorName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\GetProcessorRequest + * + * @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 resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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 resource. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSearchConfigRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSearchConfigRequest.php new file mode 100644 index 000000000000..4a0623bcfee5 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSearchConfigRequest.php @@ -0,0 +1,91 @@ +google.cloud.visionai.v1.GetSearchConfigRequest + */ +class GetSearchConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the search configuration to retrieve. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the search configuration to retrieve. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * Please see {@see WarehouseClient::searchConfigName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\GetSearchConfigRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the search configuration to retrieve. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the search configuration to retrieve. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the search configuration to retrieve. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSearchHypernymRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSearchHypernymRequest.php new file mode 100644 index 000000000000..13d3e0a48843 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSearchHypernymRequest.php @@ -0,0 +1,91 @@ +google.cloud.visionai.v1.GetSearchHypernymRequest + */ +class GetSearchHypernymRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the SearchHypernym to retrieve. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the SearchHypernym to retrieve. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * Please see {@see WarehouseClient::searchHypernymName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\GetSearchHypernymRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the SearchHypernym to retrieve. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the SearchHypernym to retrieve. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The name of the SearchHypernym to retrieve. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSeriesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSeriesRequest.php new file mode 100644 index 000000000000..5d3184b6ceaa --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSeriesRequest.php @@ -0,0 +1,81 @@ +google.cloud.visionai.v1.GetSeriesRequest + */ +class GetSeriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * 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 resource. Please see + * {@see StreamsServiceClient::seriesName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\GetSeriesRequest + * + * @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 resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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 resource. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamRequest.php new file mode 100644 index 000000000000..b2f8ba0f8ab3 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamRequest.php @@ -0,0 +1,81 @@ +google.cloud.visionai.v1.GetStreamRequest + */ +class GetStreamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the resource. + * + * 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 resource. Please see + * {@see StreamsServiceClient::streamName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\GetStreamRequest + * + * @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 resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the resource. + * + * 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 resource. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamThumbnailRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamThumbnailRequest.php new file mode 100644 index 000000000000..009595e0c95b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamThumbnailRequest.php @@ -0,0 +1,228 @@ +google.cloud.visionai.v1.GetStreamThumbnailRequest + */ +class GetStreamThumbnailRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the stream for to get the thumbnail from. + * + * Generated from protobuf field string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $stream = ''; + /** + * Required. The name of the GCS object to store the thumbnail image. + * + * Generated from protobuf field string gcs_object_name = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $gcs_object_name = ''; + /** + * Optional. The name of the event. If unspecified, the thumbnail will be + * retrieved from the latest event. + * + * Generated from protobuf field string event = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $event = ''; + /** + * Optional. An optional request ID to identify the requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $stream Required. The name of the stream for to get the thumbnail from. + * @param string $gcsObjectName Required. The name of the GCS object to store the thumbnail image. + * + * @return \Google\Cloud\VisionAI\V1\GetStreamThumbnailRequest + * + * @experimental + */ + public static function build(string $stream, string $gcsObjectName): self + { + return (new self()) + ->setStream($stream) + ->setGcsObjectName($gcsObjectName); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $stream + * Required. The name of the stream for to get the thumbnail from. + * @type string $gcs_object_name + * Required. The name of the GCS object to store the thumbnail image. + * @type string $event + * Optional. The name of the event. If unspecified, the thumbnail will be + * retrieved from the latest event. + * @type string $request_id + * Optional. An optional request ID to identify the requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the stream for to get the thumbnail from. + * + * Generated from protobuf field string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getStream() + { + return $this->stream; + } + + /** + * Required. The name of the stream for to get the thumbnail from. + * + * Generated from protobuf field string stream = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setStream($var) + { + GPBUtil::checkString($var, True); + $this->stream = $var; + + return $this; + } + + /** + * Required. The name of the GCS object to store the thumbnail image. + * + * Generated from protobuf field string gcs_object_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getGcsObjectName() + { + return $this->gcs_object_name; + } + + /** + * Required. The name of the GCS object to store the thumbnail image. + * + * Generated from protobuf field string gcs_object_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setGcsObjectName($var) + { + GPBUtil::checkString($var, True); + $this->gcs_object_name = $var; + + return $this; + } + + /** + * Optional. The name of the event. If unspecified, the thumbnail will be + * retrieved from the latest event. + * + * Generated from protobuf field string event = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEvent() + { + return $this->event; + } + + /** + * Optional. The name of the event. If unspecified, the thumbnail will be + * retrieved from the latest event. + * + * Generated from protobuf field string event = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkString($var, True); + $this->event = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify the requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify the requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamThumbnailResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamThumbnailResponse.php new file mode 100644 index 000000000000..ea4eaa66aa14 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamThumbnailResponse.php @@ -0,0 +1,34 @@ +google.cloud.visionai.v1.GetStreamThumbnailResponse + */ +class GetStreamThumbnailResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GstreamerBufferDescriptor.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GstreamerBufferDescriptor.php new file mode 100644 index 000000000000..8b0fc331ebb5 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GstreamerBufferDescriptor.php @@ -0,0 +1,233 @@ +google.cloud.visionai.v1.GstreamerBufferDescriptor + */ +class GstreamerBufferDescriptor extends \Google\Protobuf\Internal\Message +{ + /** + * The caps string of the payload. + * + * Generated from protobuf field string caps_string = 1; + */ + protected $caps_string = ''; + /** + * Whether the buffer is a key frame. + * + * Generated from protobuf field bool is_key_frame = 2; + */ + protected $is_key_frame = false; + /** + * PTS of the frame. + * + * Generated from protobuf field .google.protobuf.Timestamp pts_time = 3; + */ + protected $pts_time = null; + /** + * DTS of the frame. + * + * Generated from protobuf field .google.protobuf.Timestamp dts_time = 4; + */ + protected $dts_time = null; + /** + * Duration of the frame. + * + * Generated from protobuf field .google.protobuf.Duration duration = 5; + */ + protected $duration = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $caps_string + * The caps string of the payload. + * @type bool $is_key_frame + * Whether the buffer is a key frame. + * @type \Google\Protobuf\Timestamp $pts_time + * PTS of the frame. + * @type \Google\Protobuf\Timestamp $dts_time + * DTS of the frame. + * @type \Google\Protobuf\Duration $duration + * Duration of the frame. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingResources::initOnce(); + parent::__construct($data); + } + + /** + * The caps string of the payload. + * + * Generated from protobuf field string caps_string = 1; + * @return string + */ + public function getCapsString() + { + return $this->caps_string; + } + + /** + * The caps string of the payload. + * + * Generated from protobuf field string caps_string = 1; + * @param string $var + * @return $this + */ + public function setCapsString($var) + { + GPBUtil::checkString($var, True); + $this->caps_string = $var; + + return $this; + } + + /** + * Whether the buffer is a key frame. + * + * Generated from protobuf field bool is_key_frame = 2; + * @return bool + */ + public function getIsKeyFrame() + { + return $this->is_key_frame; + } + + /** + * Whether the buffer is a key frame. + * + * Generated from protobuf field bool is_key_frame = 2; + * @param bool $var + * @return $this + */ + public function setIsKeyFrame($var) + { + GPBUtil::checkBool($var); + $this->is_key_frame = $var; + + return $this; + } + + /** + * PTS of the frame. + * + * Generated from protobuf field .google.protobuf.Timestamp pts_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPtsTime() + { + return $this->pts_time; + } + + public function hasPtsTime() + { + return isset($this->pts_time); + } + + public function clearPtsTime() + { + unset($this->pts_time); + } + + /** + * PTS of the frame. + * + * Generated from protobuf field .google.protobuf.Timestamp pts_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPtsTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->pts_time = $var; + + return $this; + } + + /** + * DTS of the frame. + * + * Generated from protobuf field .google.protobuf.Timestamp dts_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDtsTime() + { + return $this->dts_time; + } + + public function hasDtsTime() + { + return isset($this->dts_time); + } + + public function clearDtsTime() + { + unset($this->dts_time); + } + + /** + * DTS of the frame. + * + * Generated from protobuf field .google.protobuf.Timestamp dts_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDtsTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->dts_time = $var; + + return $this; + } + + /** + * Duration of the frame. + * + * Generated from protobuf field .google.protobuf.Duration duration = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getDuration() + { + return $this->duration; + } + + public function hasDuration() + { + return isset($this->duration); + } + + public function clearDuration() + { + unset($this->duration); + } + + /** + * Duration of the frame. + * + * Generated from protobuf field .google.protobuf.Duration duration = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setDuration($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->duration = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/HealthCheckRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/HealthCheckRequest.php new file mode 100644 index 000000000000..4033d15f21b2 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/HealthCheckRequest.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.HealthCheckRequest + */ +class HealthCheckRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The parent of the resource. + * + * Generated from protobuf field string cluster = 1 [(.google.api.resource_reference) = { + */ + protected $cluster = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cluster + * The parent of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\HealthService::initOnce(); + parent::__construct($data); + } + + /** + * The parent of the resource. + * + * Generated from protobuf field string cluster = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getCluster() + { + return $this->cluster; + } + + /** + * The parent of the resource. + * + * Generated from protobuf field string cluster = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkString($var, True); + $this->cluster = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/HealthCheckResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/HealthCheckResponse.php new file mode 100644 index 000000000000..f64bc29bd54c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/HealthCheckResponse.php @@ -0,0 +1,145 @@ +google.cloud.visionai.v1.HealthCheckResponse + */ +class HealthCheckResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Indicates whether the cluster is in healthy state or not. + * + * Generated from protobuf field bool healthy = 1; + */ + protected $healthy = false; + /** + * Reason of why the cluster is in unhealthy state. + * + * Generated from protobuf field string reason = 2; + */ + protected $reason = ''; + /** + * Other information of the cluster client may be interested. + * + * Generated from protobuf field .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; + */ + protected $cluster_info = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $healthy + * Indicates whether the cluster is in healthy state or not. + * @type string $reason + * Reason of why the cluster is in unhealthy state. + * @type \Google\Cloud\VisionAI\V1\ClusterInfo $cluster_info + * Other information of the cluster client may be interested. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\HealthService::initOnce(); + parent::__construct($data); + } + + /** + * Indicates whether the cluster is in healthy state or not. + * + * Generated from protobuf field bool healthy = 1; + * @return bool + */ + public function getHealthy() + { + return $this->healthy; + } + + /** + * Indicates whether the cluster is in healthy state or not. + * + * Generated from protobuf field bool healthy = 1; + * @param bool $var + * @return $this + */ + public function setHealthy($var) + { + GPBUtil::checkBool($var); + $this->healthy = $var; + + return $this; + } + + /** + * Reason of why the cluster is in unhealthy state. + * + * Generated from protobuf field string reason = 2; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * Reason of why the cluster is in unhealthy state. + * + * Generated from protobuf field string reason = 2; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + + /** + * Other information of the cluster client may be interested. + * + * Generated from protobuf field .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; + * @return \Google\Cloud\VisionAI\V1\ClusterInfo|null + */ + public function getClusterInfo() + { + return $this->cluster_info; + } + + public function hasClusterInfo() + { + return isset($this->cluster_info); + } + + public function clearClusterInfo() + { + unset($this->cluster_info); + } + + /** + * Other information of the cluster client may be interested. + * + * Generated from protobuf field .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; + * @param \Google\Cloud\VisionAI\V1\ClusterInfo $var + * @return $this + */ + public function setClusterInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ClusterInfo::class); + $this->cluster_info = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageObjectDetectionPredictionResult.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageObjectDetectionPredictionResult.php new file mode 100644 index 000000000000..95155b137ac4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageObjectDetectionPredictionResult.php @@ -0,0 +1,205 @@ +google.cloud.visionai.v1.ImageObjectDetectionPredictionResult + */ +class ImageObjectDetectionPredictionResult extends \Google\Protobuf\Internal\Message +{ + /** + * The resource IDs of the AnnotationSpecs that had been identified, ordered + * by the confidence score descendingly. It is the id segment instead of full + * resource name. + * + * Generated from protobuf field repeated int64 ids = 1; + */ + private $ids; + /** + * The display names of the AnnotationSpecs that had been identified, order + * matches the IDs. + * + * Generated from protobuf field repeated string display_names = 2; + */ + private $display_names; + /** + * The Model's confidences in correctness of the predicted IDs, higher value + * means higher confidence. Order matches the Ids. + * + * Generated from protobuf field repeated float confidences = 3; + */ + private $confidences; + /** + * Bounding boxes, i.e. the rectangles over the image, that pinpoint + * the found AnnotationSpecs. Given in order that matches the IDs. Each + * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and + * `yMax`, which represent the extremal coordinates of the box. They are + * relative to the image size, and the point 0,0 is in the top left + * of the image. + * + * Generated from protobuf field repeated .google.protobuf.ListValue bboxes = 4; + */ + private $bboxes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int[]|string[] $ids + * The resource IDs of the AnnotationSpecs that had been identified, ordered + * by the confidence score descendingly. It is the id segment instead of full + * resource name. + * @type string[] $display_names + * The display names of the AnnotationSpecs that had been identified, order + * matches the IDs. + * @type float[] $confidences + * The Model's confidences in correctness of the predicted IDs, higher value + * means higher confidence. Order matches the Ids. + * @type \Google\Protobuf\ListValue[] $bboxes + * Bounding boxes, i.e. the rectangles over the image, that pinpoint + * the found AnnotationSpecs. Given in order that matches the IDs. Each + * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and + * `yMax`, which represent the extremal coordinates of the box. They are + * relative to the image size, and the point 0,0 is in the top left + * of the image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * The resource IDs of the AnnotationSpecs that had been identified, ordered + * by the confidence score descendingly. It is the id segment instead of full + * resource name. + * + * Generated from protobuf field repeated int64 ids = 1; + * @return RepeatedField|RepeatedField + */ + public function getIds() + { + return $this->ids; + } + + /** + * The resource IDs of the AnnotationSpecs that had been identified, ordered + * by the confidence score descendingly. It is the id segment instead of full + * resource name. + * + * Generated from protobuf field repeated int64 ids = 1; + * @param int[]|string[] $var + * @return $this + */ + public function setIds($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); + $this->ids = $arr; + + return $this; + } + + /** + * The display names of the AnnotationSpecs that had been identified, order + * matches the IDs. + * + * Generated from protobuf field repeated string display_names = 2; + * @return RepeatedField + */ + public function getDisplayNames() + { + return $this->display_names; + } + + /** + * The display names of the AnnotationSpecs that had been identified, order + * matches the IDs. + * + * Generated from protobuf field repeated string display_names = 2; + * @param string[] $var + * @return $this + */ + public function setDisplayNames($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->display_names = $arr; + + return $this; + } + + /** + * The Model's confidences in correctness of the predicted IDs, higher value + * means higher confidence. Order matches the Ids. + * + * Generated from protobuf field repeated float confidences = 3; + * @return RepeatedField + */ + public function getConfidences() + { + return $this->confidences; + } + + /** + * The Model's confidences in correctness of the predicted IDs, higher value + * means higher confidence. Order matches the Ids. + * + * Generated from protobuf field repeated float confidences = 3; + * @param float[] $var + * @return $this + */ + public function setConfidences($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FLOAT); + $this->confidences = $arr; + + return $this; + } + + /** + * Bounding boxes, i.e. the rectangles over the image, that pinpoint + * the found AnnotationSpecs. Given in order that matches the IDs. Each + * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and + * `yMax`, which represent the extremal coordinates of the box. They are + * relative to the image size, and the point 0,0 is in the top left + * of the image. + * + * Generated from protobuf field repeated .google.protobuf.ListValue bboxes = 4; + * @return RepeatedField<\Google\Protobuf\ListValue> + */ + public function getBboxes() + { + return $this->bboxes; + } + + /** + * Bounding boxes, i.e. the rectangles over the image, that pinpoint + * the found AnnotationSpecs. Given in order that matches the IDs. Each + * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and + * `yMax`, which represent the extremal coordinates of the box. They are + * relative to the image size, and the point 0,0 is in the top left + * of the image. + * + * Generated from protobuf field repeated .google.protobuf.ListValue bboxes = 4; + * @param \Google\Protobuf\ListValue[] $var + * @return $this + */ + public function setBboxes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\ListValue::class); + $this->bboxes = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageQuery.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageQuery.php new file mode 100644 index 000000000000..d1add05b0504 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageQuery.php @@ -0,0 +1,114 @@ +google.cloud.visionai.v1.ImageQuery + */ +class ImageQuery extends \Google\Protobuf\Internal\Message +{ + protected $image; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $input_image + * Input image in raw bytes. + * @type string $asset + * Resource name of the asset. Only supported in IMAGE corpus type. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Input image in raw bytes. + * + * Generated from protobuf field bytes input_image = 1; + * @return string + */ + public function getInputImage() + { + return $this->readOneof(1); + } + + public function hasInputImage() + { + return $this->hasOneof(1); + } + + /** + * Input image in raw bytes. + * + * Generated from protobuf field bytes input_image = 1; + * @param string $var + * @return $this + */ + public function setInputImage($var) + { + GPBUtil::checkString($var, False); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Resource name of the asset. Only supported in IMAGE corpus type. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string asset = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getAsset() + { + return $this->readOneof(2); + } + + public function hasAsset() + { + return $this->hasOneof(2); + } + + /** + * Resource name of the asset. Only supported in IMAGE corpus type. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string asset = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAsset($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getImage() + { + return $this->whichOneof("image"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageSegmentationPredictionResult.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageSegmentationPredictionResult.php new file mode 100644 index 000000000000..6715f9b30a1c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageSegmentationPredictionResult.php @@ -0,0 +1,137 @@ +google.cloud.visionai.v1.ImageSegmentationPredictionResult + */ +class ImageSegmentationPredictionResult extends \Google\Protobuf\Internal\Message +{ + /** + * A PNG image where each pixel in the mask represents the category in which + * the pixel in the original image was predicted to belong to. The size of + * this image will be the same as the original image. The mapping between the + * AnntoationSpec and the color can be found in model's metadata. The model + * will choose the most likely category and if none of the categories reach + * the confidence threshold, the pixel will be marked as background. + * + * Generated from protobuf field string category_mask = 1; + */ + protected $category_mask = ''; + /** + * A one channel image which is encoded as an 8bit lossless PNG. The size of + * the image will be the same as the original image. For a specific pixel, + * darker color means less confidence in correctness of the cateogry in the + * categoryMask for the corresponding pixel. Black means no confidence and + * white means complete confidence. + * + * Generated from protobuf field string confidence_mask = 2; + */ + protected $confidence_mask = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $category_mask + * A PNG image where each pixel in the mask represents the category in which + * the pixel in the original image was predicted to belong to. The size of + * this image will be the same as the original image. The mapping between the + * AnntoationSpec and the color can be found in model's metadata. The model + * will choose the most likely category and if none of the categories reach + * the confidence threshold, the pixel will be marked as background. + * @type string $confidence_mask + * A one channel image which is encoded as an 8bit lossless PNG. The size of + * the image will be the same as the original image. For a specific pixel, + * darker color means less confidence in correctness of the cateogry in the + * categoryMask for the corresponding pixel. Black means no confidence and + * white means complete confidence. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * A PNG image where each pixel in the mask represents the category in which + * the pixel in the original image was predicted to belong to. The size of + * this image will be the same as the original image. The mapping between the + * AnntoationSpec and the color can be found in model's metadata. The model + * will choose the most likely category and if none of the categories reach + * the confidence threshold, the pixel will be marked as background. + * + * Generated from protobuf field string category_mask = 1; + * @return string + */ + public function getCategoryMask() + { + return $this->category_mask; + } + + /** + * A PNG image where each pixel in the mask represents the category in which + * the pixel in the original image was predicted to belong to. The size of + * this image will be the same as the original image. The mapping between the + * AnntoationSpec and the color can be found in model's metadata. The model + * will choose the most likely category and if none of the categories reach + * the confidence threshold, the pixel will be marked as background. + * + * Generated from protobuf field string category_mask = 1; + * @param string $var + * @return $this + */ + public function setCategoryMask($var) + { + GPBUtil::checkString($var, True); + $this->category_mask = $var; + + return $this; + } + + /** + * A one channel image which is encoded as an 8bit lossless PNG. The size of + * the image will be the same as the original image. For a specific pixel, + * darker color means less confidence in correctness of the cateogry in the + * categoryMask for the corresponding pixel. Black means no confidence and + * white means complete confidence. + * + * Generated from protobuf field string confidence_mask = 2; + * @return string + */ + public function getConfidenceMask() + { + return $this->confidence_mask; + } + + /** + * A one channel image which is encoded as an 8bit lossless PNG. The size of + * the image will be the same as the original image. For a specific pixel, + * darker color means less confidence in correctness of the cateogry in the + * categoryMask for the corresponding pixel. Black means no confidence and + * white means complete confidence. + * + * Generated from protobuf field string confidence_mask = 2; + * @param string $var + * @return $this + */ + public function setConfidenceMask($var) + { + GPBUtil::checkString($var, True); + $this->confidence_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsMetadata.php new file mode 100644 index 000000000000..8aaf0aa7347e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsMetadata.php @@ -0,0 +1,125 @@ +google.cloud.visionai.v1.ImportAssetsMetadata + */ +class ImportAssetsMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The metadata of the operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata metadata = 1; + */ + protected $metadata = null; + /** + * The importing status including partial failures, if the implementation can + * provide such information during the progress of the ImportAssets. + * + * Generated from protobuf field .google.cloud.visionai.v1.BatchOperationStatus status = 2; + */ + protected $status = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\OperationMetadata $metadata + * The metadata of the operation. + * @type \Google\Cloud\VisionAI\V1\BatchOperationStatus $status + * The importing status including partial failures, if the implementation can + * provide such information during the progress of the ImportAssets. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The metadata of the operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata metadata = 1; + * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * The metadata of the operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata metadata = 1; + * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); + $this->metadata = $var; + + return $this; + } + + /** + * The importing status including partial failures, if the implementation can + * provide such information during the progress of the ImportAssets. + * + * Generated from protobuf field .google.cloud.visionai.v1.BatchOperationStatus status = 2; + * @return \Google\Cloud\VisionAI\V1\BatchOperationStatus|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * The importing status including partial failures, if the implementation can + * provide such information during the progress of the ImportAssets. + * + * Generated from protobuf field .google.cloud.visionai.v1.BatchOperationStatus status = 2; + * @param \Google\Cloud\VisionAI\V1\BatchOperationStatus $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\BatchOperationStatus::class); + $this->status = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsRequest.php new file mode 100644 index 000000000000..64d7ee2eaff4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsRequest.php @@ -0,0 +1,126 @@ +google.cloud.visionai.v1.ImportAssetsRequest + */ +class ImportAssetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent corpus resource where the assets will be imported. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + protected $source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $assets_gcs_uri + * The file contains all assets information to be imported. + * * The file is in JSONL format. + * * Each line corresponding to one asset. + * * Each line will be converted into InputImageAsset proto. + * @type string $parent + * Required. The parent corpus resource where the assets will be imported. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The file contains all assets information to be imported. + * * The file is in JSONL format. + * * Each line corresponding to one asset. + * * Each line will be converted into InputImageAsset proto. + * + * Generated from protobuf field string assets_gcs_uri = 2; + * @return string + */ + public function getAssetsGcsUri() + { + return $this->readOneof(2); + } + + public function hasAssetsGcsUri() + { + return $this->hasOneof(2); + } + + /** + * The file contains all assets information to be imported. + * * The file is in JSONL format. + * * Each line corresponding to one asset. + * * Each line will be converted into InputImageAsset proto. + * + * Generated from protobuf field string assets_gcs_uri = 2; + * @param string $var + * @return $this + */ + public function setAssetsGcsUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Required. The parent corpus resource where the assets will be imported. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent corpus resource where the assets will be imported. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * @return string + */ + public function getSource() + { + return $this->whichOneof("source"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsResponse.php new file mode 100644 index 000000000000..8eea5c5af0c2 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsResponse.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.ImportAssetsResponse + */ +class ImportAssetsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Index.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Index.php new file mode 100644 index 000000000000..58bfd604d84e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Index.php @@ -0,0 +1,455 @@ +google.cloud.visionai.v1.Index + */ +class Index extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Resource name of the Index resource. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Optional. Optional user-specified display name of the index. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Optional. Optional description of the index. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. State of the index. + * + * Generated from protobuf field .google.cloud.visionai.v1.Index.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. References to the deployed index instance. + * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index. + * Index of IMAGE corpus can have multiple deployed indexes. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $deployed_indexes; + /** + * Output only. This boolean field is only set for projects that have Physical + * Zone Separation enabled via an Org Policy constraint. It is set to true + * when the index is a valid zone separated index and false if it isn't. + * + * Generated from protobuf field optional bool satisfies_pzs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = null; + /** + * Output only. This boolean field is only set for projects that have Physical + * Zone Isolation enabled via an Org Policy constraint. It is set to true when + * the index is a valid zone isolated index and false if it isn't. + * + * Generated from protobuf field optional bool satisfies_pzi = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzi = null; + protected $asset_filter; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $entire_corpus + * Include all assets under the corpus. + * @type string $name + * Output only. Resource name of the Index resource. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}` + * @type string $display_name + * Optional. Optional user-specified display name of the index. + * @type string $description + * Optional. Optional description of the index. + * @type int $state + * Output only. State of the index. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The create timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update timestamp. + * @type \Google\Cloud\VisionAI\V1\DeployedIndexReference[] $deployed_indexes + * Output only. References to the deployed index instance. + * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index. + * Index of IMAGE corpus can have multiple deployed indexes. + * @type bool $satisfies_pzs + * Output only. This boolean field is only set for projects that have Physical + * Zone Separation enabled via an Org Policy constraint. It is set to true + * when the index is a valid zone separated index and false if it isn't. + * @type bool $satisfies_pzi + * Output only. This boolean field is only set for projects that have Physical + * Zone Isolation enabled via an Org Policy constraint. It is set to true when + * the index is a valid zone isolated index and false if it isn't. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Include all assets under the corpus. + * + * Generated from protobuf field bool entire_corpus = 9; + * @return bool + */ + public function getEntireCorpus() + { + return $this->readOneof(9); + } + + public function hasEntireCorpus() + { + return $this->hasOneof(9); + } + + /** + * Include all assets under the corpus. + * + * Generated from protobuf field bool entire_corpus = 9; + * @param bool $var + * @return $this + */ + public function setEntireCorpus($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Output only. Resource name of the Index resource. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Resource name of the Index resource. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Optional user-specified display name of the index. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. Optional user-specified display name of the index. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. Optional description of the index. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Optional description of the index. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. State of the index. + * + * Generated from protobuf field .google.cloud.visionai.v1.Index.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the index. + * + * Generated from protobuf field .google.cloud.visionai.v1.Index.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Index\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. References to the deployed index instance. + * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index. + * Index of IMAGE corpus can have multiple deployed indexes. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\DeployedIndexReference> + */ + public function getDeployedIndexes() + { + return $this->deployed_indexes; + } + + /** + * Output only. References to the deployed index instance. + * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index. + * Index of IMAGE corpus can have multiple deployed indexes. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VisionAI\V1\DeployedIndexReference[] $var + * @return $this + */ + public function setDeployedIndexes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\DeployedIndexReference::class); + $this->deployed_indexes = $arr; + + return $this; + } + + /** + * Output only. This boolean field is only set for projects that have Physical + * Zone Separation enabled via an Org Policy constraint. It is set to true + * when the index is a valid zone separated index and false if it isn't. + * + * Generated from protobuf field optional bool satisfies_pzs = 11 [(.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. This boolean field is only set for projects that have Physical + * Zone Separation enabled via an Org Policy constraint. It is set to true + * when the index is a valid zone separated index and false if it isn't. + * + * Generated from protobuf field optional bool satisfies_pzs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Output only. This boolean field is only set for projects that have Physical + * Zone Isolation enabled via an Org Policy constraint. It is set to true when + * the index is a valid zone isolated index and false if it isn't. + * + * Generated from protobuf field optional bool satisfies_pzi = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzi() + { + return isset($this->satisfies_pzi) ? $this->satisfies_pzi : false; + } + + public function hasSatisfiesPzi() + { + return isset($this->satisfies_pzi); + } + + public function clearSatisfiesPzi() + { + unset($this->satisfies_pzi); + } + + /** + * Output only. This boolean field is only set for projects that have Physical + * Zone Isolation enabled via an Org Policy constraint. It is set to true when + * the index is a valid zone isolated index and false if it isn't. + * + * Generated from protobuf field optional bool satisfies_pzi = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzi($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzi = $var; + + return $this; + } + + /** + * @return string + */ + public function getAssetFilter() + { + return $this->whichOneof("asset_filter"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Index/State.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Index/State.php new file mode 100644 index 000000000000..67fdc0fc7288 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Index/State.php @@ -0,0 +1,69 @@ +google.cloud.visionai.v1.Index.State + */ +class State +{ + /** + * The default value. Should not be used. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * State CREATING. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * State CREATED. + * + * Generated from protobuf enum CREATED = 2; + */ + const CREATED = 2; + /** + * State UPDATING. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::CREATED => 'CREATED', + self::UPDATING => 'UPDATING', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetMetadata.php new file mode 100644 index 000000000000..fb87db3b5bbb --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetMetadata.php @@ -0,0 +1,165 @@ +google.cloud.visionai.v1.IndexAssetMetadata + */ +class IndexAssetMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The status of indexing this asset. + * + * Generated from protobuf field .google.cloud.visionai.v1.IndexingStatus status = 4; + */ + protected $status = null; + /** + * The start time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + */ + protected $start_time = null; + /** + * The update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\IndexingStatus $status + * The status of indexing this asset. + * @type \Google\Protobuf\Timestamp $start_time + * The start time of the operation. + * @type \Google\Protobuf\Timestamp $update_time + * The update time of the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The status of indexing this asset. + * + * Generated from protobuf field .google.cloud.visionai.v1.IndexingStatus status = 4; + * @return \Google\Cloud\VisionAI\V1\IndexingStatus|null + */ + public function getStatus() + { + return $this->status; + } + + public function hasStatus() + { + return isset($this->status); + } + + public function clearStatus() + { + unset($this->status); + } + + /** + * The status of indexing this asset. + * + * Generated from protobuf field .google.cloud.visionai.v1.IndexingStatus status = 4; + * @param \Google\Cloud\VisionAI\V1\IndexingStatus $var + * @return $this + */ + public function setStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\IndexingStatus::class); + $this->status = $var; + + return $this; + } + + /** + * The start time of the operation. + * + * 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 of the operation. + * + * 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 update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * The update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetRequest.php new file mode 100644 index 000000000000..853e3d50ba1c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetRequest.php @@ -0,0 +1,117 @@ +google.cloud.visionai.v1.IndexAssetRequest + */ +class IndexAssetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the asset to index. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The name of the index. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * + * Generated from protobuf field string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $index = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the asset to index. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * @type string $index + * Optional. The name of the index. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the asset to index. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the asset to index. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The name of the index. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * + * Generated from protobuf field string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getIndex() + { + return $this->index; + } + + /** + * Optional. The name of the index. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * + * Generated from protobuf field string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkString($var, True); + $this->index = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetResponse.php new file mode 100644 index 000000000000..8cfb7c1e9eb6 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetResponse.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.IndexAssetResponse + */ +class IndexAssetResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexEndpoint.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexEndpoint.php new file mode 100644 index 000000000000..cfdc9cc63d2b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexEndpoint.php @@ -0,0 +1,523 @@ +google.cloud.visionai.v1.IndexEndpoint + */ +class IndexEndpoint extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Resource name of the IndexEndpoint. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Optional. Display name of the IndexEndpoint. Can be up to 32 characters + * long. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $display_name = ''; + /** + * Optional. Description of the IndexEndpoint. Can be up to 25000 characters + * long. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $description = ''; + /** + * Output only. The Index deployed in this IndexEndpoint. + * + * Generated from protobuf field .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $deployed_index = null; + /** + * Output only. IndexEndpoint state. + * + * Generated from protobuf field .google.cloud.visionai.v1.IndexEndpoint.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Optional. The labels applied to a resource must meet the following + * requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Google Cloud + * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $labels; + /** + * Output only. Create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. This boolean field is only set for projects that have Physical + * Zone Separation enabled via an Org Policy constraint. It is set to true + * when the index endpoint is a valid zone separated index endpoint and false + * if it isn't. + * + * Generated from protobuf field optional bool satisfies_pzs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzs = null; + /** + * Output only. This boolean field is only set for projects that have Physical + * Zone Isolation enabled via an Org Policy constraint. It is set to true when + * the index endpoint is a valid zone isolated index endpoint and false if it + * isn't. + * + * Generated from protobuf field optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $satisfies_pzi = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Resource name of the IndexEndpoint. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint_id}` + * @type string $display_name + * Optional. Display name of the IndexEndpoint. Can be up to 32 characters + * long. + * @type string $description + * Optional. Description of the IndexEndpoint. Can be up to 25000 characters + * long. + * @type \Google\Cloud\VisionAI\V1\DeployedIndex $deployed_index + * Output only. The Index deployed in this IndexEndpoint. + * @type int $state + * Output only. IndexEndpoint state. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Optional. The labels applied to a resource must meet the following + * requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Google Cloud + * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Create timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. Update timestamp. + * @type bool $satisfies_pzs + * Output only. This boolean field is only set for projects that have Physical + * Zone Separation enabled via an Org Policy constraint. It is set to true + * when the index endpoint is a valid zone separated index endpoint and false + * if it isn't. + * @type bool $satisfies_pzi + * Output only. This boolean field is only set for projects that have Physical + * Zone Isolation enabled via an Org Policy constraint. It is set to true when + * the index endpoint is a valid zone isolated index endpoint and false if it + * isn't. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Resource name of the IndexEndpoint. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Resource name of the IndexEndpoint. + * Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Display name of the IndexEndpoint. Can be up to 32 characters + * long. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Optional. Display name of the IndexEndpoint. Can be up to 32 characters + * long. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Optional. Description of the IndexEndpoint. Can be up to 25000 characters + * long. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. Description of the IndexEndpoint. Can be up to 25000 characters + * long. + * + * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. The Index deployed in this IndexEndpoint. + * + * Generated from protobuf field .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VisionAI\V1\DeployedIndex|null + */ + public function getDeployedIndex() + { + return $this->deployed_index; + } + + public function hasDeployedIndex() + { + return isset($this->deployed_index); + } + + public function clearDeployedIndex() + { + unset($this->deployed_index); + } + + /** + * Output only. The Index deployed in this IndexEndpoint. + * + * Generated from protobuf field .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VisionAI\V1\DeployedIndex $var + * @return $this + */ + public function setDeployedIndex($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DeployedIndex::class); + $this->deployed_index = $var; + + return $this; + } + + /** + * Output only. IndexEndpoint state. + * + * Generated from protobuf field .google.cloud.visionai.v1.IndexEndpoint.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. IndexEndpoint state. + * + * Generated from protobuf field .google.cloud.visionai.v1.IndexEndpoint.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\IndexEndpoint\State::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. The labels applied to a resource must meet the following + * requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Google Cloud + * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Optional. The labels applied to a resource must meet the following + * requirements: + * * Each resource can have multiple labels, up to a maximum of 64. + * * Each label must be a key-value pair. + * * Keys have a minimum length of 1 character and a maximum length of 63 + * characters and cannot be empty. Values can be empty and have a maximum + * length of 63 characters. + * * Keys and values can contain only lowercase letters, numeric characters, + * underscores, and dashes. All characters must use UTF-8 encoding, and + * international characters are allowed. + * * The key portion of a label must be unique. However, you can use the same + * key with multiple resources. + * * Keys must start with a lowercase letter or international character. + * See [Google Cloud + * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) + * for more details. + * + * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @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. Create timestamp. + * + * 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. Create timestamp. + * + * 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. Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Output only. This boolean field is only set for projects that have Physical + * Zone Separation enabled via an Org Policy constraint. It is set to true + * when the index endpoint is a valid zone separated index endpoint and false + * if it isn't. + * + * Generated from protobuf field optional bool satisfies_pzs = 10 [(.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. This boolean field is only set for projects that have Physical + * Zone Separation enabled via an Org Policy constraint. It is set to true + * when the index endpoint is a valid zone separated index endpoint and false + * if it isn't. + * + * Generated from protobuf field optional bool satisfies_pzs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzs($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzs = $var; + + return $this; + } + + /** + * Output only. This boolean field is only set for projects that have Physical + * Zone Isolation enabled via an Org Policy constraint. It is set to true when + * the index endpoint is a valid zone isolated index endpoint and false if it + * isn't. + * + * Generated from protobuf field optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getSatisfiesPzi() + { + return isset($this->satisfies_pzi) ? $this->satisfies_pzi : false; + } + + public function hasSatisfiesPzi() + { + return isset($this->satisfies_pzi); + } + + public function clearSatisfiesPzi() + { + unset($this->satisfies_pzi); + } + + /** + * Output only. This boolean field is only set for projects that have Physical + * Zone Isolation enabled via an Org Policy constraint. It is set to true when + * the index endpoint is a valid zone isolated index endpoint and false if it + * isn't. + * + * Generated from protobuf field optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setSatisfiesPzi($var) + { + GPBUtil::checkBool($var); + $this->satisfies_pzi = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexEndpoint/State.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexEndpoint/State.php new file mode 100644 index 000000000000..1b58f983772b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexEndpoint/State.php @@ -0,0 +1,75 @@ +google.cloud.visionai.v1.IndexEndpoint.State + */ +class State +{ + /** + * The default value. Should not be used. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * State CREATING. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * State CREATED. + * + * Generated from protobuf enum CREATED = 2; + */ + const CREATED = 2; + /** + * State UPDATING. + * + * Generated from protobuf enum UPDATING = 3; + */ + const UPDATING = 3; + /** + * State FAILED. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::CREATED => 'CREATED', + self::UPDATING => 'UPDATING', + self::FAILED => 'FAILED', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexedAsset.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexedAsset.php new file mode 100644 index 000000000000..8a9f8bb46eb1 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexedAsset.php @@ -0,0 +1,205 @@ +google.cloud.visionai.v1.IndexedAsset + */ +class IndexedAsset extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The index that this indexed asset belongs to. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * + * Generated from protobuf field string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $index = ''; + /** + * Required. The resource name of the asset. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string asset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $asset = ''; + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $index + * Required. The index that this indexed asset belongs to. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * @type string $asset + * Required. The resource name of the asset. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The create timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update timestamp. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The index that this indexed asset belongs to. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * + * Generated from protobuf field string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getIndex() + { + return $this->index; + } + + /** + * Required. The index that this indexed asset belongs to. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * + * Generated from protobuf field string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkString($var, True); + $this->index = $var; + + return $this; + } + + /** + * Required. The resource name of the asset. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string asset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAsset() + { + return $this->asset; + } + + /** + * Required. The resource name of the asset. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string asset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAsset($var) + { + GPBUtil::checkString($var, True); + $this->asset = $var; + + return $this; + } + + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexingStatus.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexingStatus.php new file mode 100644 index 000000000000..a90beed88f5d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexingStatus.php @@ -0,0 +1,101 @@ +google.cloud.visionai.v1.IndexingStatus + */ +class IndexingStatus extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. State of this asset's indexing. + * + * Generated from protobuf field .google.cloud.visionai.v1.IndexingStatus.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Detailed message describing the state. + * + * Generated from protobuf field string status_message = 3; + */ + protected $status_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * Output only. State of this asset's indexing. + * @type string $status_message + * Detailed message describing the state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Output only. State of this asset's indexing. + * + * Generated from protobuf field .google.cloud.visionai.v1.IndexingStatus.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of this asset's indexing. + * + * Generated from protobuf field .google.cloud.visionai.v1.IndexingStatus.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\IndexingStatus\State::class); + $this->state = $var; + + return $this; + } + + /** + * Detailed message describing the state. + * + * Generated from protobuf field string status_message = 3; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Detailed message describing the state. + * + * Generated from protobuf field string status_message = 3; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexingStatus/State.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexingStatus/State.php new file mode 100644 index 000000000000..c7c69699568e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexingStatus/State.php @@ -0,0 +1,68 @@ +google.cloud.visionai.v1.IndexingStatus.State + */ +class State +{ + /** + * The default process state should never happen. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The indexing is in progress. + * + * Generated from protobuf enum IN_PROGRESS = 1; + */ + const IN_PROGRESS = 1; + /** + * The process is successfully done. + * + * Generated from protobuf enum SUCCEEDED = 2; + */ + const SUCCEEDED = 2; + /** + * The process failed. + * + * Generated from protobuf enum FAILED = 3; + */ + const FAILED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::IN_PROGRESS => 'IN_PROGRESS', + self::SUCCEEDED => 'SUCCEEDED', + self::FAILED => 'FAILED', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest.php new file mode 100644 index 000000000000..deaaa5773486 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest.php @@ -0,0 +1,114 @@ +google.cloud.visionai.v1.IngestAssetRequest + */ +class IngestAssetRequest extends \Google\Protobuf\Internal\Message +{ + protected $streaming_request; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\IngestAssetRequest\Config $config + * Provides information for the data and the asset resource name that the + * data belongs to. The first `IngestAssetRequest` message must only contain + * a `Config` message. + * @type \Google\Cloud\VisionAI\V1\IngestAssetRequest\TimeIndexedData $time_indexed_data + * Data to be ingested. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Provides information for the data and the asset resource name that the + * data belongs to. The first `IngestAssetRequest` message must only contain + * a `Config` message. + * + * Generated from protobuf field .google.cloud.visionai.v1.IngestAssetRequest.Config config = 1; + * @return \Google\Cloud\VisionAI\V1\IngestAssetRequest\Config|null + */ + public function getConfig() + { + return $this->readOneof(1); + } + + public function hasConfig() + { + return $this->hasOneof(1); + } + + /** + * Provides information for the data and the asset resource name that the + * data belongs to. The first `IngestAssetRequest` message must only contain + * a `Config` message. + * + * Generated from protobuf field .google.cloud.visionai.v1.IngestAssetRequest.Config config = 1; + * @param \Google\Cloud\VisionAI\V1\IngestAssetRequest\Config $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\IngestAssetRequest\Config::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Data to be ingested. + * + * Generated from protobuf field .google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData time_indexed_data = 2; + * @return \Google\Cloud\VisionAI\V1\IngestAssetRequest\TimeIndexedData|null + */ + public function getTimeIndexedData() + { + return $this->readOneof(2); + } + + public function hasTimeIndexedData() + { + return $this->hasOneof(2); + } + + /** + * Data to be ingested. + * + * Generated from protobuf field .google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData time_indexed_data = 2; + * @param \Google\Cloud\VisionAI\V1\IngestAssetRequest\TimeIndexedData $var + * @return $this + */ + public function setTimeIndexedData($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\IngestAssetRequest\TimeIndexedData::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getStreamingRequest() + { + return $this->whichOneof("streaming_request"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config.php new file mode 100644 index 000000000000..6bac853c87ab --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config.php @@ -0,0 +1,113 @@ +google.cloud.visionai.v1.IngestAssetRequest.Config + */ +class Config extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the asset that the ingested data belongs + * to. + * + * Generated from protobuf field string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $asset = ''; + protected $data_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\IngestAssetRequest\Config\VideoType $video_type + * Type information for video data. + * @type string $asset + * Required. The resource name of the asset that the ingested data belongs + * to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Type information for video data. + * + * Generated from protobuf field .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType video_type = 2; + * @return \Google\Cloud\VisionAI\V1\IngestAssetRequest\Config\VideoType|null + */ + public function getVideoType() + { + return $this->readOneof(2); + } + + public function hasVideoType() + { + return $this->hasOneof(2); + } + + /** + * Type information for video data. + * + * Generated from protobuf field .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType video_type = 2; + * @param \Google\Cloud\VisionAI\V1\IngestAssetRequest\Config\VideoType $var + * @return $this + */ + public function setVideoType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\IngestAssetRequest\Config\VideoType::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Required. The resource name of the asset that the ingested data belongs + * to. + * + * Generated from protobuf field string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAsset() + { + return $this->asset; + } + + /** + * Required. The resource name of the asset that the ingested data belongs + * to. + * + * Generated from protobuf field string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAsset($var) + { + GPBUtil::checkString($var, True); + $this->asset = $var; + + return $this; + } + + /** + * @return string + */ + public function getDataType() + { + return $this->whichOneof("data_type"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config/VideoType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config/VideoType.php new file mode 100644 index 000000000000..2f413b08a2c1 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config/VideoType.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType + */ +class VideoType extends \Google\Protobuf\Internal\Message +{ + /** + * Container format of the video data. + * + * Generated from protobuf field .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat container_format = 1; + */ + protected $container_format = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $container_format + * Container format of the video data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Container format of the video data. + * + * Generated from protobuf field .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat container_format = 1; + * @return int + */ + public function getContainerFormat() + { + return $this->container_format; + } + + /** + * Container format of the video data. + * + * Generated from protobuf field .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat container_format = 1; + * @param int $var + * @return $this + */ + public function setContainerFormat($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\IngestAssetRequest\Config\VideoType\ContainerFormat::class); + $this->container_format = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config/VideoType/ContainerFormat.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config/VideoType/ContainerFormat.php new file mode 100644 index 000000000000..b8ecbe51dd8b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config/VideoType/ContainerFormat.php @@ -0,0 +1,54 @@ +google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat + */ +class ContainerFormat +{ + /** + * The default type, not supposed to be used. + * + * Generated from protobuf enum CONTAINER_FORMAT_UNSPECIFIED = 0; + */ + const CONTAINER_FORMAT_UNSPECIFIED = 0; + /** + * Mp4 container format. + * + * Generated from protobuf enum CONTAINER_FORMAT_MP4 = 1; + */ + const CONTAINER_FORMAT_MP4 = 1; + + private static $valueToName = [ + self::CONTAINER_FORMAT_UNSPECIFIED => 'CONTAINER_FORMAT_UNSPECIFIED', + self::CONTAINER_FORMAT_MP4 => 'CONTAINER_FORMAT_MP4', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/TimeIndexedData.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/TimeIndexedData.php new file mode 100644 index 000000000000..20ca4f5720a8 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/TimeIndexedData.php @@ -0,0 +1,111 @@ +google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData + */ +class TimeIndexedData extends \Google\Protobuf\Internal\Message +{ + /** + * Data to be ingested. + * + * Generated from protobuf field bytes data = 1; + */ + protected $data = ''; + /** + * Time range of the data. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; + */ + protected $temporal_partition = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $data + * Data to be ingested. + * @type \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $temporal_partition + * Time range of the data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Data to be ingested. + * + * Generated from protobuf field bytes data = 1; + * @return string + */ + public function getData() + { + return $this->data; + } + + /** + * Data to be ingested. + * + * Generated from protobuf field bytes data = 1; + * @param string $var + * @return $this + */ + public function setData($var) + { + GPBUtil::checkString($var, False); + $this->data = $var; + + return $this; + } + + /** + * Time range of the data. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; + * @return \Google\Cloud\VisionAI\V1\Partition\TemporalPartition|null + */ + public function getTemporalPartition() + { + return $this->temporal_partition; + } + + public function hasTemporalPartition() + { + return isset($this->temporal_partition); + } + + public function clearTemporalPartition() + { + unset($this->temporal_partition); + } + + /** + * Time range of the data. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; + * @param \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $var + * @return $this + */ + public function setTemporalPartition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Partition\TemporalPartition::class); + $this->temporal_partition = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetResponse.php new file mode 100644 index 000000000000..7ce9f6a61afc --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetResponse.php @@ -0,0 +1,77 @@ +google.cloud.visionai.v1.IngestAssetResponse + */ +class IngestAssetResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Time range of the data that has been successfully ingested. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; + */ + protected $successfully_ingested_partition = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $successfully_ingested_partition + * Time range of the data that has been successfully ingested. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Time range of the data that has been successfully ingested. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; + * @return \Google\Cloud\VisionAI\V1\Partition\TemporalPartition|null + */ + public function getSuccessfullyIngestedPartition() + { + return $this->successfully_ingested_partition; + } + + public function hasSuccessfullyIngestedPartition() + { + return isset($this->successfully_ingested_partition); + } + + public function clearSuccessfullyIngestedPartition() + { + unset($this->successfully_ingested_partition); + } + + /** + * Time range of the data that has been successfully ingested. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; + * @param \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $var + * @return $this + */ + public function setSuccessfullyIngestedPartition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Partition\TemporalPartition::class); + $this->successfully_ingested_partition = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance.php new file mode 100644 index 000000000000..45b543fb8b9a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance.php @@ -0,0 +1,406 @@ +google.cloud.visionai.v1.Instance + */ +class Instance extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. name of resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. [Output only] Create timestamp + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. [Output only] Update timestamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 3; + */ + private $labels; + /** + * Required. A user friendly display name for the solution. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * A description for this instance. + * + * Generated from protobuf field string description = 5; + */ + protected $description = ''; + /** + * The instance type for the current instance. + * + * Generated from protobuf field .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10; + */ + protected $instance_type = 0; + /** + * The input resources for the current application instance. + * For example: + * input_resources: + * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + */ + private $input_resources; + /** + * All the output resources associated to one application instance. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + */ + private $output_resources; + /** + * State of the instance. + * + * Generated from protobuf field .google.cloud.visionai.v1.Instance.State state = 9; + */ + protected $state = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. name of resource + * @type \Google\Protobuf\Timestamp $create_time + * Output only. [Output only] Create timestamp + * @type \Google\Protobuf\Timestamp $update_time + * Output only. [Output only] Update timestamp + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs + * @type string $display_name + * Required. A user friendly display name for the solution. + * @type string $description + * A description for this instance. + * @type int $instance_type + * The instance type for the current instance. + * @type \Google\Cloud\VisionAI\V1\Instance\InputResource[] $input_resources + * The input resources for the current application instance. + * For example: + * input_resources: + * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a + * @type \Google\Cloud\VisionAI\V1\Instance\OutputResource[] $output_resources + * All the output resources associated to one application instance. + * @type int $state + * State of the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Output only. name of resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. name of resource + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. [Output only] Create timestamp + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. [Output only] Create timestamp + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. [Output only] Update timestamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. [Output only] Update timestamp + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 3; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs + * + * Generated from protobuf field map labels = 3; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. A user friendly display name for the solution. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. A user friendly display name for the solution. + * + * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * A description for this instance. + * + * Generated from protobuf field string description = 5; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A description for this instance. + * + * 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; + } + + /** + * The instance type for the current instance. + * + * Generated from protobuf field .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10; + * @return int + */ + public function getInstanceType() + { + return $this->instance_type; + } + + /** + * The instance type for the current instance. + * + * Generated from protobuf field .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10; + * @param int $var + * @return $this + */ + public function setInstanceType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Instance\InstanceType::class); + $this->instance_type = $var; + + return $this; + } + + /** + * The input resources for the current application instance. + * For example: + * input_resources: + * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Instance\InputResource> + */ + public function getInputResources() + { + return $this->input_resources; + } + + /** + * The input resources for the current application instance. + * For example: + * input_resources: + * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; + * @param \Google\Cloud\VisionAI\V1\Instance\InputResource[] $var + * @return $this + */ + public function setInputResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Instance\InputResource::class); + $this->input_resources = $arr; + + return $this; + } + + /** + * All the output resources associated to one application instance. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Instance\OutputResource> + */ + public function getOutputResources() + { + return $this->output_resources; + } + + /** + * All the output resources associated to one application instance. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; + * @param \Google\Cloud\VisionAI\V1\Instance\OutputResource[] $var + * @return $this + */ + public function setOutputResources($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Instance\OutputResource::class); + $this->output_resources = $arr; + + return $this; + } + + /** + * State of the instance. + * + * Generated from protobuf field .google.cloud.visionai.v1.Instance.State state = 9; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * State of the instance. + * + * Generated from protobuf field .google.cloud.visionai.v1.Instance.State state = 9; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Instance\State::class); + $this->state = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/InputResource.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/InputResource.php new file mode 100644 index 000000000000..f82fdbbde7cb --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/InputResource.php @@ -0,0 +1,301 @@ +google.cloud.visionai.v1.Instance.InputResource + */ +class InputResource extends \Google\Protobuf\Internal\Message +{ + /** + * Data type for the current input resource. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataType data_type = 6; + */ + protected $data_type = 0; + /** + * The name of graph node who receives the input resource. + * For example: + * input_resource: + * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a + * consumer_node: stream-input + * + * Generated from protobuf field string consumer_node = 2; + */ + protected $consumer_node = ''; + /** + * The specific input resource binding which will consume the current Input + * Resource, can be ignored is there is only 1 input binding. + * + * Generated from protobuf field string input_resource_binding = 3; + */ + protected $input_resource_binding = ''; + /** + * Contains resource annotations. + * + * Generated from protobuf field .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; + */ + protected $annotations = null; + protected $input_resource_information; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $input_resource + * The direct input resource name. + * If the instance type is STREAMING_PREDICTION, the input resource is in + * format of + * "projects/123/locations/us-central1/clusters/456/streams/stream-a". + * If the instance type is BATCH_PREDICTION from Cloud Storage input + * container, the input resource is in format of "gs://bucket-a". + * @type \Google\Cloud\VisionAI\V1\StreamWithAnnotation $annotated_stream + * If the input resource is VisionAI Stream, the associated annotations + * can be specified using annotated_stream instead. + * @type int $data_type + * Data type for the current input resource. + * @type string $consumer_node + * The name of graph node who receives the input resource. + * For example: + * input_resource: + * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a + * consumer_node: stream-input + * @type string $input_resource_binding + * The specific input resource binding which will consume the current Input + * Resource, can be ignored is there is only 1 input binding. + * @type \Google\Cloud\VisionAI\V1\ResourceAnnotations $annotations + * Contains resource annotations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * The direct input resource name. + * If the instance type is STREAMING_PREDICTION, the input resource is in + * format of + * "projects/123/locations/us-central1/clusters/456/streams/stream-a". + * If the instance type is BATCH_PREDICTION from Cloud Storage input + * container, the input resource is in format of "gs://bucket-a". + * + * Generated from protobuf field string input_resource = 1; + * @return string + */ + public function getInputResource() + { + return $this->readOneof(1); + } + + public function hasInputResource() + { + return $this->hasOneof(1); + } + + /** + * The direct input resource name. + * If the instance type is STREAMING_PREDICTION, the input resource is in + * format of + * "projects/123/locations/us-central1/clusters/456/streams/stream-a". + * If the instance type is BATCH_PREDICTION from Cloud Storage input + * container, the input resource is in format of "gs://bucket-a". + * + * Generated from protobuf field string input_resource = 1; + * @param string $var + * @return $this + */ + public function setInputResource($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * If the input resource is VisionAI Stream, the associated annotations + * can be specified using annotated_stream instead. + * + * Generated from protobuf field .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true]; + * @return \Google\Cloud\VisionAI\V1\StreamWithAnnotation|null + * @deprecated + */ + public function getAnnotatedStream() + { + if ($this->hasOneof(4)) { + @trigger_error('annotated_stream is deprecated.', E_USER_DEPRECATED); + } + return $this->readOneof(4); + } + + public function hasAnnotatedStream() + { + if ($this->hasOneof(4)) { + @trigger_error('annotated_stream is deprecated.', E_USER_DEPRECATED); + } + return $this->hasOneof(4); + } + + /** + * If the input resource is VisionAI Stream, the associated annotations + * can be specified using annotated_stream instead. + * + * Generated from protobuf field .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true]; + * @param \Google\Cloud\VisionAI\V1\StreamWithAnnotation $var + * @return $this + * @deprecated + */ + public function setAnnotatedStream($var) + { + @trigger_error('annotated_stream is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\StreamWithAnnotation::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Data type for the current input resource. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataType data_type = 6; + * @return int + */ + public function getDataType() + { + return $this->data_type; + } + + /** + * Data type for the current input resource. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataType data_type = 6; + * @param int $var + * @return $this + */ + public function setDataType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\DataType::class); + $this->data_type = $var; + + return $this; + } + + /** + * The name of graph node who receives the input resource. + * For example: + * input_resource: + * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a + * consumer_node: stream-input + * + * Generated from protobuf field string consumer_node = 2; + * @return string + */ + public function getConsumerNode() + { + return $this->consumer_node; + } + + /** + * The name of graph node who receives the input resource. + * For example: + * input_resource: + * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a + * consumer_node: stream-input + * + * Generated from protobuf field string consumer_node = 2; + * @param string $var + * @return $this + */ + public function setConsumerNode($var) + { + GPBUtil::checkString($var, True); + $this->consumer_node = $var; + + return $this; + } + + /** + * The specific input resource binding which will consume the current Input + * Resource, can be ignored is there is only 1 input binding. + * + * Generated from protobuf field string input_resource_binding = 3; + * @return string + */ + public function getInputResourceBinding() + { + return $this->input_resource_binding; + } + + /** + * The specific input resource binding which will consume the current Input + * Resource, can be ignored is there is only 1 input binding. + * + * Generated from protobuf field string input_resource_binding = 3; + * @param string $var + * @return $this + */ + public function setInputResourceBinding($var) + { + GPBUtil::checkString($var, True); + $this->input_resource_binding = $var; + + return $this; + } + + /** + * Contains resource annotations. + * + * Generated from protobuf field .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; + * @return \Google\Cloud\VisionAI\V1\ResourceAnnotations|null + */ + public function getAnnotations() + { + return $this->annotations; + } + + public function hasAnnotations() + { + return isset($this->annotations); + } + + public function clearAnnotations() + { + unset($this->annotations); + } + + /** + * Contains resource annotations. + * + * Generated from protobuf field .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; + * @param \Google\Cloud\VisionAI\V1\ResourceAnnotations $var + * @return $this + */ + public function setAnnotations($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ResourceAnnotations::class); + $this->annotations = $var; + + return $this; + } + + /** + * @return string + */ + public function getInputResourceInformation() + { + return $this->whichOneof("input_resource_information"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/InstanceType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/InstanceType.php new file mode 100644 index 000000000000..a888a9c8f516 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/InstanceType.php @@ -0,0 +1,70 @@ +google.cloud.visionai.v1.Instance.InstanceType + */ +class InstanceType +{ + /** + * Unspecified instance type. + * If the instance type is not specified, the default one is + * STREAMING_PREDICTION. + * + * Generated from protobuf enum INSTANCE_TYPE_UNSPECIFIED = 0; + */ + const INSTANCE_TYPE_UNSPECIFIED = 0; + /** + * Instance type for streaming prediction. + * + * Generated from protobuf enum STREAMING_PREDICTION = 1; + */ + const STREAMING_PREDICTION = 1; + /** + * Instance type for batch prediction. + * + * Generated from protobuf enum BATCH_PREDICTION = 2; + */ + const BATCH_PREDICTION = 2; + /** + * Instance type for online prediction. + * + * Generated from protobuf enum ONLINE_PREDICTION = 3; + */ + const ONLINE_PREDICTION = 3; + + private static $valueToName = [ + self::INSTANCE_TYPE_UNSPECIFIED => 'INSTANCE_TYPE_UNSPECIFIED', + self::STREAMING_PREDICTION => 'STREAMING_PREDICTION', + self::BATCH_PREDICTION => 'BATCH_PREDICTION', + self::ONLINE_PREDICTION => 'ONLINE_PREDICTION', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/OutputResource.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/OutputResource.php new file mode 100644 index 000000000000..ebe88a0dce7d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/OutputResource.php @@ -0,0 +1,235 @@ +google.cloud.visionai.v1.Instance.OutputResource + */ +class OutputResource extends \Google\Protobuf\Internal\Message +{ + /** + * The output resource name for the current application instance. + * + * Generated from protobuf field string output_resource = 1; + */ + protected $output_resource = ''; + /** + * The name of graph node who produces the output resource name. + * For example: + * output_resource: + * /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting + * producer_node: occupancy-counting + * + * Generated from protobuf field string producer_node = 2; + */ + protected $producer_node = ''; + /** + * The specific output resource binding which produces the current + * OutputResource. + * + * Generated from protobuf field string output_resource_binding = 4; + */ + protected $output_resource_binding = ''; + /** + * Output only. Whether the output resource is temporary which means the + * resource is generated during the deployment of the application. Temporary + * resource will be deleted during the undeployment of the application. + * + * Generated from protobuf field bool is_temporary = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $is_temporary = false; + /** + * Output only. Whether the output resource is created automatically by the + * Vision AI App Platform. + * + * Generated from protobuf field bool autogen = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $autogen = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $output_resource + * The output resource name for the current application instance. + * @type string $producer_node + * The name of graph node who produces the output resource name. + * For example: + * output_resource: + * /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting + * producer_node: occupancy-counting + * @type string $output_resource_binding + * The specific output resource binding which produces the current + * OutputResource. + * @type bool $is_temporary + * Output only. Whether the output resource is temporary which means the + * resource is generated during the deployment of the application. Temporary + * resource will be deleted during the undeployment of the application. + * @type bool $autogen + * Output only. Whether the output resource is created automatically by the + * Vision AI App Platform. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * The output resource name for the current application instance. + * + * Generated from protobuf field string output_resource = 1; + * @return string + */ + public function getOutputResource() + { + return $this->output_resource; + } + + /** + * The output resource name for the current application instance. + * + * Generated from protobuf field string output_resource = 1; + * @param string $var + * @return $this + */ + public function setOutputResource($var) + { + GPBUtil::checkString($var, True); + $this->output_resource = $var; + + return $this; + } + + /** + * The name of graph node who produces the output resource name. + * For example: + * output_resource: + * /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting + * producer_node: occupancy-counting + * + * Generated from protobuf field string producer_node = 2; + * @return string + */ + public function getProducerNode() + { + return $this->producer_node; + } + + /** + * The name of graph node who produces the output resource name. + * For example: + * output_resource: + * /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting + * producer_node: occupancy-counting + * + * Generated from protobuf field string producer_node = 2; + * @param string $var + * @return $this + */ + public function setProducerNode($var) + { + GPBUtil::checkString($var, True); + $this->producer_node = $var; + + return $this; + } + + /** + * The specific output resource binding which produces the current + * OutputResource. + * + * Generated from protobuf field string output_resource_binding = 4; + * @return string + */ + public function getOutputResourceBinding() + { + return $this->output_resource_binding; + } + + /** + * The specific output resource binding which produces the current + * OutputResource. + * + * Generated from protobuf field string output_resource_binding = 4; + * @param string $var + * @return $this + */ + public function setOutputResourceBinding($var) + { + GPBUtil::checkString($var, True); + $this->output_resource_binding = $var; + + return $this; + } + + /** + * Output only. Whether the output resource is temporary which means the + * resource is generated during the deployment of the application. Temporary + * resource will be deleted during the undeployment of the application. + * + * Generated from protobuf field bool is_temporary = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getIsTemporary() + { + return $this->is_temporary; + } + + /** + * Output only. Whether the output resource is temporary which means the + * resource is generated during the deployment of the application. Temporary + * resource will be deleted during the undeployment of the application. + * + * Generated from protobuf field bool is_temporary = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setIsTemporary($var) + { + GPBUtil::checkBool($var); + $this->is_temporary = $var; + + return $this; + } + + /** + * Output only. Whether the output resource is created automatically by the + * Vision AI App Platform. + * + * Generated from protobuf field bool autogen = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getAutogen() + { + return $this->autogen; + } + + /** + * Output only. Whether the output resource is created automatically by the + * Vision AI App Platform. + * + * Generated from protobuf field bool autogen = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setAutogen($var) + { + GPBUtil::checkBool($var); + $this->autogen = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/State.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/State.php new file mode 100644 index 000000000000..0e70174e907b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/State.php @@ -0,0 +1,124 @@ +google.cloud.visionai.v1.Instance.State + */ +class State +{ + /** + * The default value. This value is used if the state is omitted. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * State CREATING. + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * State CREATED. + * + * Generated from protobuf enum CREATED = 2; + */ + const CREATED = 2; + /** + * State DEPLOYING. + * + * Generated from protobuf enum DEPLOYING = 3; + */ + const DEPLOYING = 3; + /** + * State DEPLOYED. + * + * Generated from protobuf enum DEPLOYED = 4; + */ + const DEPLOYED = 4; + /** + * State UNDEPLOYING. + * + * Generated from protobuf enum UNDEPLOYING = 5; + */ + const UNDEPLOYING = 5; + /** + * State DELETED. + * + * Generated from protobuf enum DELETED = 6; + */ + const DELETED = 6; + /** + * State ERROR. + * + * Generated from protobuf enum ERROR = 7; + */ + const ERROR = 7; + /** + * State Updating + * + * Generated from protobuf enum UPDATING = 8; + */ + const UPDATING = 8; + /** + * State Deleting. + * + * Generated from protobuf enum DELETING = 9; + */ + const DELETING = 9; + /** + * State Fixing. + * + * Generated from protobuf enum FIXING = 10; + */ + const FIXING = 10; + /** + * State Finished. + * + * Generated from protobuf enum FINISHED = 11; + */ + const FINISHED = 11; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::CREATED => 'CREATED', + self::DEPLOYING => 'DEPLOYING', + self::DEPLOYED => 'DEPLOYED', + self::UNDEPLOYING => 'UNDEPLOYING', + self::DELETED => 'DELETED', + self::ERROR => 'ERROR', + self::UPDATING => 'UPDATING', + self::DELETING => 'DELETING', + self::FIXING => 'FIXING', + self::FINISHED => 'FINISHED', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IntRange.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IntRange.php new file mode 100644 index 000000000000..0ac149676be8 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IntRange.php @@ -0,0 +1,121 @@ +google.cloud.visionai.v1.IntRange + */ +class IntRange extends \Google\Protobuf\Internal\Message +{ + /** + * Start of the int range. + * + * Generated from protobuf field optional int64 start = 1; + */ + protected $start = null; + /** + * End of the int range. + * + * Generated from protobuf field optional int64 end = 2; + */ + protected $end = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $start + * Start of the int range. + * @type int|string $end + * End of the int range. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Start of the int range. + * + * Generated from protobuf field optional int64 start = 1; + * @return int|string + */ + public function getStart() + { + return isset($this->start) ? $this->start : 0; + } + + public function hasStart() + { + return isset($this->start); + } + + public function clearStart() + { + unset($this->start); + } + + /** + * Start of the int range. + * + * Generated from protobuf field optional int64 start = 1; + * @param int|string $var + * @return $this + */ + public function setStart($var) + { + GPBUtil::checkInt64($var); + $this->start = $var; + + return $this; + } + + /** + * End of the int range. + * + * Generated from protobuf field optional int64 end = 2; + * @return int|string + */ + public function getEnd() + { + return isset($this->end) ? $this->end : 0; + } + + public function hasEnd() + { + return isset($this->end); + } + + public function clearEnd() + { + unset($this->end); + } + + /** + * End of the int range. + * + * Generated from protobuf field optional int64 end = 2; + * @param int|string $var + * @return $this + */ + public function setEnd($var) + { + GPBUtil::checkInt64($var); + $this->end = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IntRangeArray.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IntRangeArray.php new file mode 100644 index 000000000000..4849ac10542d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IntRangeArray.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.IntRangeArray + */ +class IntRangeArray extends \Google\Protobuf\Internal\Message +{ + /** + * Int range values. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + */ + private $int_ranges; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\IntRange[] $int_ranges + * Int range values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Int range values. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\IntRange> + */ + public function getIntRanges() + { + return $this->int_ranges; + } + + /** + * Int range values. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; + * @param \Google\Cloud\VisionAI\V1\IntRange[] $var + * @return $this + */ + public function setIntRanges($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\IntRange::class); + $this->int_ranges = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Lease.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Lease.php new file mode 100644 index 000000000000..b99527194d0a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Lease.php @@ -0,0 +1,213 @@ +google.cloud.visionai.v1.Lease + */ +class Lease extends \Google\Protobuf\Internal\Message +{ + /** + * The lease id. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * The series name. + * + * Generated from protobuf field string series = 2; + */ + protected $series = ''; + /** + * The owner name. + * + * Generated from protobuf field string owner = 3; + */ + protected $owner = ''; + /** + * The lease expire time. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4; + */ + protected $expire_time = null; + /** + * The lease type. + * + * Generated from protobuf field .google.cloud.visionai.v1.LeaseType lease_type = 5; + */ + protected $lease_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * The lease id. + * @type string $series + * The series name. + * @type string $owner + * The owner name. + * @type \Google\Protobuf\Timestamp $expire_time + * The lease expire time. + * @type int $lease_type + * The lease type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + + /** + * The lease id. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The lease id. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The series name. + * + * Generated from protobuf field string series = 2; + * @return string + */ + public function getSeries() + { + return $this->series; + } + + /** + * The series name. + * + * Generated from protobuf field string series = 2; + * @param string $var + * @return $this + */ + public function setSeries($var) + { + GPBUtil::checkString($var, True); + $this->series = $var; + + return $this; + } + + /** + * The owner name. + * + * Generated from protobuf field string owner = 3; + * @return string + */ + public function getOwner() + { + return $this->owner; + } + + /** + * The owner name. + * + * Generated from protobuf field string owner = 3; + * @param string $var + * @return $this + */ + public function setOwner($var) + { + GPBUtil::checkString($var, True); + $this->owner = $var; + + return $this; + } + + /** + * The lease expire time. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4; + * @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); + } + + /** + * The lease expire time. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * The lease type. + * + * Generated from protobuf field .google.cloud.visionai.v1.LeaseType lease_type = 5; + * @return int + */ + public function getLeaseType() + { + return $this->lease_type; + } + + /** + * The lease type. + * + * Generated from protobuf field .google.cloud.visionai.v1.LeaseType lease_type = 5; + * @param int $var + * @return $this + */ + public function setLeaseType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\LeaseType::class); + $this->lease_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/LeaseType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/LeaseType.php new file mode 100644 index 000000000000..2f9790f890f0 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/LeaseType.php @@ -0,0 +1,61 @@ +google.cloud.visionai.v1.LeaseType + */ +class LeaseType +{ + /** + * Lease type unspecified. + * + * Generated from protobuf enum LEASE_TYPE_UNSPECIFIED = 0; + */ + const LEASE_TYPE_UNSPECIFIED = 0; + /** + * Lease for stream reader. + * + * Generated from protobuf enum LEASE_TYPE_READER = 1; + */ + const LEASE_TYPE_READER = 1; + /** + * Lease for stream writer. + * + * Generated from protobuf enum LEASE_TYPE_WRITER = 2; + */ + const LEASE_TYPE_WRITER = 2; + + private static $valueToName = [ + self::LEASE_TYPE_UNSPECIFIED => 'LEASE_TYPE_UNSPECIFIED', + self::LEASE_TYPE_READER => 'LEASE_TYPE_READER', + self::LEASE_TYPE_WRITER => 'LEASE_TYPE_WRITER', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnalysesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnalysesRequest.php new file mode 100644 index 000000000000..fb697f920fdb --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnalysesRequest.php @@ -0,0 +1,221 @@ +google.cloud.visionai.v1.ListAnalysesRequest + */ +class ListAnalysesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListAnalysesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListAnalysesRequest + * Please see {@see LiveVideoAnalyticsClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ListAnalysesRequest + * + * @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. Parent value for ListAnalysesRequest + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results + * @type string $order_by + * Hint for how to order the results + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListAnalysesRequest + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListAnalysesRequest + * + * 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; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnalysesResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnalysesResponse.php new file mode 100644 index 000000000000..859a37b755ae --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnalysesResponse.php @@ -0,0 +1,135 @@ +google.cloud.visionai.v1.ListAnalysesResponse + */ +class ListAnalysesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Analysis + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Analysis analyses = 1; + */ + private $analyses; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Analysis[] $analyses + * The list of Analysis + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * The list of Analysis + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Analysis analyses = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Analysis> + */ + public function getAnalyses() + { + return $this->analyses; + } + + /** + * The list of Analysis + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Analysis analyses = 1; + * @param \Google\Cloud\VisionAI\V1\Analysis[] $var + * @return $this + */ + public function setAnalyses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Analysis::class); + $this->analyses = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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 that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnnotationsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnnotationsRequest.php new file mode 100644 index 000000000000..f8ebf8560dd8 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnnotationsRequest.php @@ -0,0 +1,268 @@ +google.cloud.visionai.v1.ListAnnotationsRequest + */ +class ListAnnotationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The parent, which owns this collection of annotations. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * + * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of annotations to return. The service may return fewer + * than this value. If unspecified, at most 50 annotations will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListAnnotations` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAnnotations` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The filter applied to the returned list. + * We only support filtering for the following fields: + * For corpus of STREAM_VIDEO type: + * `partition.temporal_partition.start_time`, + * `partition.temporal_partition.end_time`, and `key`. + * For corpus of VIDEO_ON_DEMAND type, + * `partition.relative_temporal_partition.start_offset`, + * `partition.relative_temporal_partition.end_offset`, and `key`. + * For corpus of IMAGE type, only `key` is supported. + * Timestamps are specified in the RFC-3339 format, and only one restriction + * may be applied per field, joined by conjunctions. + * Format: + * "partition.temporal_partition.start_time > "2012-04-21T11:30:00-04:00" AND + * partition.temporal_partition.end_time < "2012-04-22T11:30:00-04:00" AND + * key = "example_key"" + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * @param string $parent The parent, which owns this collection of annotations. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * + * @return \Google\Cloud\VisionAI\V1\ListAnnotationsRequest + * + * @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 + * The parent, which owns this collection of annotations. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * @type int $page_size + * The maximum number of annotations to return. The service may return fewer + * than this value. If unspecified, at most 50 annotations will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * A page token, received from a previous `ListAnnotations` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAnnotations` must + * match the call that provided the page token. + * @type string $filter + * The filter applied to the returned list. + * We only support filtering for the following fields: + * For corpus of STREAM_VIDEO type: + * `partition.temporal_partition.start_time`, + * `partition.temporal_partition.end_time`, and `key`. + * For corpus of VIDEO_ON_DEMAND type, + * `partition.relative_temporal_partition.start_offset`, + * `partition.relative_temporal_partition.end_offset`, and `key`. + * For corpus of IMAGE type, only `key` is supported. + * Timestamps are specified in the RFC-3339 format, and only one restriction + * may be applied per field, joined by conjunctions. + * Format: + * "partition.temporal_partition.start_time > "2012-04-21T11:30:00-04:00" AND + * partition.temporal_partition.end_time < "2012-04-22T11:30:00-04:00" AND + * key = "example_key"" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The parent, which owns this collection of annotations. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * + * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The parent, which owns this collection of annotations. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * + * Generated from protobuf field string parent = 1 [(.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 annotations to return. The service may return fewer + * than this value. If unspecified, at most 50 annotations will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of annotations to return. The service may return fewer + * than this value. If unspecified, at most 50 annotations will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListAnnotations` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAnnotations` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListAnnotations` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAnnotations` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The filter applied to the returned list. + * We only support filtering for the following fields: + * For corpus of STREAM_VIDEO type: + * `partition.temporal_partition.start_time`, + * `partition.temporal_partition.end_time`, and `key`. + * For corpus of VIDEO_ON_DEMAND type, + * `partition.relative_temporal_partition.start_offset`, + * `partition.relative_temporal_partition.end_offset`, and `key`. + * For corpus of IMAGE type, only `key` is supported. + * Timestamps are specified in the RFC-3339 format, and only one restriction + * may be applied per field, joined by conjunctions. + * Format: + * "partition.temporal_partition.start_time > "2012-04-21T11:30:00-04:00" AND + * partition.temporal_partition.end_time < "2012-04-22T11:30:00-04:00" AND + * key = "example_key"" + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter applied to the returned list. + * We only support filtering for the following fields: + * For corpus of STREAM_VIDEO type: + * `partition.temporal_partition.start_time`, + * `partition.temporal_partition.end_time`, and `key`. + * For corpus of VIDEO_ON_DEMAND type, + * `partition.relative_temporal_partition.start_offset`, + * `partition.relative_temporal_partition.end_offset`, and `key`. + * For corpus of IMAGE type, only `key` is supported. + * Timestamps are specified in the RFC-3339 format, and only one restriction + * may be applied per field, joined by conjunctions. + * Format: + * "partition.temporal_partition.start_time > "2012-04-21T11:30:00-04:00" AND + * partition.temporal_partition.end_time < "2012-04-22T11:30:00-04:00" AND + * key = "example_key"" + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnnotationsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnnotationsResponse.php new file mode 100644 index 000000000000..96825955ebf4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnnotationsResponse.php @@ -0,0 +1,105 @@ +google.cloud.visionai.v1.ListAnnotationsResponse + */ +class ListAnnotationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The annotations from the specified asset. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Annotation annotations = 1; + */ + private $annotations; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Annotation[] $annotations + * The annotations from the specified asset. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The annotations from the specified asset. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Annotation annotations = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Annotation> + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * The annotations from the specified asset. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Annotation annotations = 1; + * @param \Google\Cloud\VisionAI\V1\Annotation[] $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Annotation::class); + $this->annotations = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListApplicationsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListApplicationsRequest.php new file mode 100644 index 000000000000..bdbe1cff6b17 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListApplicationsRequest.php @@ -0,0 +1,221 @@ +google.cloud.visionai.v1.ListApplicationsRequest + */ +class ListApplicationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListApplicationsRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListApplicationsRequest. Please see + * {@see AppPlatformClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ListApplicationsRequest + * + * @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. Parent value for ListApplicationsRequest. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results. + * @type string $order_by + * Hint for how to order the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListApplicationsRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListApplicationsRequest. + * + * 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; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListApplicationsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListApplicationsResponse.php new file mode 100644 index 000000000000..e58e1107093c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListApplicationsResponse.php @@ -0,0 +1,135 @@ +google.cloud.visionai.v1.ListApplicationsResponse + */ +class ListApplicationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Application. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Application applications = 1; + */ + private $applications; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Application[] $applications + * The list of Application. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * The list of Application. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Application applications = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Application> + */ + public function getApplications() + { + return $this->applications; + } + + /** + * The list of Application. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Application applications = 1; + * @param \Google\Cloud\VisionAI\V1\Application[] $var + * @return $this + */ + public function setApplications($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Application::class); + $this->applications = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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 that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAssetsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAssetsRequest.php new file mode 100644 index 000000000000..02a3bd60fc49 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAssetsRequest.php @@ -0,0 +1,229 @@ +google.cloud.visionai.v1.ListAssetsRequest + */ +class ListAssetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of assets. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of assets to return. The service may return fewer than + * this value. + * If unspecified, at most 50 assets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListAssets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAssets` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The filter applied to the returned list. + * Only the following filterings are supported: + * "assets_with_contents = true", which returns assets with contents uploaded; + * "assets_with_contents = false", which returns assets without contents. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of assets. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * Please see {@see WarehouseClient::corpusName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ListAssetsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of assets. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @type int $page_size + * The maximum number of assets to return. The service may return fewer than + * this value. + * If unspecified, at most 50 assets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * A page token, received from a previous `ListAssets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAssets` must match + * the call that provided the page token. + * @type string $filter + * The filter applied to the returned list. + * Only the following filterings are supported: + * "assets_with_contents = true", which returns assets with contents uploaded; + * "assets_with_contents = false", which returns assets without contents. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of assets. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of assets. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * 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 assets to return. The service may return fewer than + * this value. + * If unspecified, at most 50 assets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of assets to return. The service may return fewer than + * this value. + * If unspecified, at most 50 assets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListAssets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAssets` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListAssets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListAssets` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The filter applied to the returned list. + * Only the following filterings are supported: + * "assets_with_contents = true", which returns assets with contents uploaded; + * "assets_with_contents = false", which returns assets without contents. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter applied to the returned list. + * Only the following filterings are supported: + * "assets_with_contents = true", which returns assets with contents uploaded; + * "assets_with_contents = false", which returns assets without contents. + * + * Generated from protobuf field string filter = 5; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAssetsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAssetsResponse.php new file mode 100644 index 000000000000..6d4c9d427d3b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAssetsResponse.php @@ -0,0 +1,105 @@ +google.cloud.visionai.v1.ListAssetsResponse + */ +class ListAssetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The assets from the specified corpus. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Asset assets = 1; + */ + private $assets; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Asset[] $assets + * The assets from the specified corpus. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The assets from the specified corpus. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Asset assets = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Asset> + */ + public function getAssets() + { + return $this->assets; + } + + /** + * The assets from the specified corpus. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Asset assets = 1; + * @param \Google\Cloud\VisionAI\V1\Asset[] $var + * @return $this + */ + public function setAssets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Asset::class); + $this->assets = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListClustersRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListClustersRequest.php new file mode 100644 index 000000000000..d58c7da5a38d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListClustersRequest.php @@ -0,0 +1,221 @@ +google.cloud.visionai.v1.ListClustersRequest + */ +class ListClustersRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListClustersRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListClustersRequest. Please see + * {@see StreamsServiceClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\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. Parent value for ListClustersRequest. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results. + * @type string $order_by + * Hint for how to order the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListClustersRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListClustersRequest. + * + * 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; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListClustersResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListClustersResponse.php new file mode 100644 index 000000000000..a7adf43c0e80 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListClustersResponse.php @@ -0,0 +1,135 @@ +google.cloud.visionai.v1.ListClustersResponse + */ +class ListClustersResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Cluster. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Cluster clusters = 1; + */ + private $clusters; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Cluster[] $clusters + * The list of Cluster. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * The list of Cluster. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Cluster clusters = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Cluster> + */ + public function getClusters() + { + return $this->clusters; + } + + /** + * The list of Cluster. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Cluster clusters = 1; + * @param \Google\Cloud\VisionAI\V1\Cluster[] $var + * @return $this + */ + public function setClusters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Cluster::class); + $this->clusters = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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 that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCollectionsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCollectionsRequest.php new file mode 100644 index 000000000000..7ec9b0adf3d2 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCollectionsRequest.php @@ -0,0 +1,174 @@ +google.cloud.visionai.v1.ListCollectionsRequest + */ +class ListCollectionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent corpus. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of collections to return. The service may return fewer + * than this value. If unspecified, at most 50 collections will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListCollectionsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCollectionsRequest` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent corpus. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * Please see {@see WarehouseClient::corpusName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ListCollectionsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent corpus. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @type int $page_size + * The maximum number of collections to return. The service may return fewer + * than this value. If unspecified, at most 50 collections will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * A page token, received from a previous `ListCollectionsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCollectionsRequest` + * must match the call that provided the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent corpus. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent corpus. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * 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 collections to return. The service may return fewer + * than this value. If unspecified, at most 50 collections will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of collections to return. The service may return fewer + * than this value. If unspecified, at most 50 collections will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListCollectionsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCollectionsRequest` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListCollectionsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListCollectionsRequest` + * must match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCollectionsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCollectionsResponse.php new file mode 100644 index 000000000000..275dc563c677 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCollectionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.visionai.v1.ListCollectionsResponse + */ +class ListCollectionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The collections from the specified corpus. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Collection collections = 1; + */ + private $collections; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Collection[] $collections + * The collections from the specified corpus. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The collections from the specified corpus. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Collection collections = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Collection> + */ + public function getCollections() + { + return $this->collections; + } + + /** + * The collections from the specified corpus. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Collection collections = 1; + * @param \Google\Cloud\VisionAI\V1\Collection[] $var + * @return $this + */ + public function setCollections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Collection::class); + $this->collections = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCorporaRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCorporaRequest.php new file mode 100644 index 000000000000..2641cca03488 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCorporaRequest.php @@ -0,0 +1,230 @@ +google.cloud.visionai.v1.ListCorporaRequest + */ +class ListCorporaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the project from which to list corpora. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $parent = ''; + /** + * Requested page size. API may return fewer results than requested. + * If negative, INVALID_ARGUMENT error will be returned. + * If unspecified or 0, API will pick a default size, which is 10. + * If the requested page size is larger than the maximum size, API will pick + * use the maximum size, which is 20. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results for the server to return. + * Typically obtained via + * [ListCorporaResponse.next_page_token][google.cloud.visionai.v1.ListCorporaResponse.next_page_token] + * of the previous + * [Warehouse.ListCorpora][google.cloud.visionai.v1.Warehouse.ListCorpora] + * call. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The filter applied to the returned corpora list. + * Only the following restrictions are supported: + * `type=`, + * `type!=`. + * + * Generated from protobuf field string filter = 5; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The resource name of the project from which to list corpora. + * + * @return \Google\Cloud\VisionAI\V1\ListCorporaRequest + * + * @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 resource name of the project from which to list corpora. + * @type int $page_size + * Requested page size. API may return fewer results than requested. + * If negative, INVALID_ARGUMENT error will be returned. + * If unspecified or 0, API will pick a default size, which is 10. + * If the requested page size is larger than the maximum size, API will pick + * use the maximum size, which is 20. + * @type string $page_token + * A token identifying a page of results for the server to return. + * Typically obtained via + * [ListCorporaResponse.next_page_token][google.cloud.visionai.v1.ListCorporaResponse.next_page_token] + * of the previous + * [Warehouse.ListCorpora][google.cloud.visionai.v1.Warehouse.ListCorpora] + * call. + * @type string $filter + * The filter applied to the returned corpora list. + * Only the following restrictions are supported: + * `type=`, + * `type!=`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the project from which to list corpora. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The resource name of the project from which to list corpora. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * Requested page size. API may return fewer results than requested. + * If negative, INVALID_ARGUMENT error will be returned. + * If unspecified or 0, API will pick a default size, which is 10. + * If the requested page size is larger than the maximum size, API will pick + * use the maximum size, which is 20. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. API may return fewer results than requested. + * If negative, INVALID_ARGUMENT error will be returned. + * If unspecified or 0, API will pick a default size, which is 10. + * If the requested page size is larger than the maximum size, API will pick + * use the maximum size, which is 20. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results for the server to return. + * Typically obtained via + * [ListCorporaResponse.next_page_token][google.cloud.visionai.v1.ListCorporaResponse.next_page_token] + * of the previous + * [Warehouse.ListCorpora][google.cloud.visionai.v1.Warehouse.ListCorpora] + * call. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results for the server to return. + * Typically obtained via + * [ListCorporaResponse.next_page_token][google.cloud.visionai.v1.ListCorporaResponse.next_page_token] + * of the previous + * [Warehouse.ListCorpora][google.cloud.visionai.v1.Warehouse.ListCorpora] + * 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; + } + + /** + * The filter applied to the returned corpora list. + * Only the following restrictions are supported: + * `type=`, + * `type!=`. + * + * Generated from protobuf field string filter = 5; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter applied to the returned corpora list. + * Only the following restrictions are supported: + * `type=`, + * `type!=`. + * + * Generated from protobuf field string filter = 5; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCorporaResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCorporaResponse.php new file mode 100644 index 000000000000..d5823dbd1d5c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCorporaResponse.php @@ -0,0 +1,113 @@ +google.cloud.visionai.v1.ListCorporaResponse + */ +class ListCorporaResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The corpora in the project. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Corpus corpora = 1; + */ + private $corpora; + /** + * A token to retrieve next page of results. + * Pass to + * [ListCorporaRequest.page_token][google.cloud.visionai.v1.ListCorporaRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Corpus[] $corpora + * The corpora in the project. + * @type string $next_page_token + * A token to retrieve next page of results. + * Pass to + * [ListCorporaRequest.page_token][google.cloud.visionai.v1.ListCorporaRequest.page_token] + * to obtain that page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The corpora in the project. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Corpus corpora = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Corpus> + */ + public function getCorpora() + { + return $this->corpora; + } + + /** + * The corpora in the project. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Corpus corpora = 1; + * @param \Google\Cloud\VisionAI\V1\Corpus[] $var + * @return $this + */ + public function setCorpora($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Corpus::class); + $this->corpora = $arr; + + return $this; + } + + /** + * A token to retrieve next page of results. + * Pass to + * [ListCorporaRequest.page_token][google.cloud.visionai.v1.ListCorporaRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve next page of results. + * Pass to + * [ListCorporaRequest.page_token][google.cloud.visionai.v1.ListCorporaRequest.page_token] + * to obtain that page. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDataSchemasRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDataSchemasRequest.php new file mode 100644 index 000000000000..5188f3a82c27 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDataSchemasRequest.php @@ -0,0 +1,179 @@ +google.cloud.visionai.v1.ListDataSchemasRequest + */ +class ListDataSchemasRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of data schemas. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of data schemas to return. The service may return fewer + * than this value. If unspecified, at most 50 data schemas will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListDataSchemas` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDataSchemas` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of data schemas. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * Please see {@see WarehouseClient::corpusName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ListDataSchemasRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of data schemas. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * @type int $page_size + * The maximum number of data schemas to return. The service may return fewer + * than this value. If unspecified, at most 50 data schemas will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * A page token, received from a previous `ListDataSchemas` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDataSchemas` must + * match the call that provided the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of data schemas. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of data schemas. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * The maximum number of data schemas to return. The service may return fewer + * than this value. If unspecified, at most 50 data schemas will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of data schemas to return. The service may return fewer + * than this value. If unspecified, at most 50 data schemas will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListDataSchemas` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDataSchemas` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListDataSchemas` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListDataSchemas` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDataSchemasResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDataSchemasResponse.php new file mode 100644 index 000000000000..8a2e6e294fd4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDataSchemasResponse.php @@ -0,0 +1,105 @@ +google.cloud.visionai.v1.ListDataSchemasResponse + */ +class ListDataSchemasResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The data schemas from the specified corpus. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + */ + private $data_schemas; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\DataSchema[] $data_schemas + * The data schemas from the specified corpus. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The data schemas from the specified corpus. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\DataSchema> + */ + public function getDataSchemas() + { + return $this->data_schemas; + } + + /** + * The data schemas from the specified corpus. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; + * @param \Google\Cloud\VisionAI\V1\DataSchema[] $var + * @return $this + */ + public function setDataSchemas($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\DataSchema::class); + $this->data_schemas = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDraftsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDraftsRequest.php new file mode 100644 index 000000000000..fe24d0820c1a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDraftsRequest.php @@ -0,0 +1,221 @@ +google.cloud.visionai.v1.ListDraftsRequest + */ +class ListDraftsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListDraftsRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListDraftsRequest. Please see + * {@see AppPlatformClient::applicationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ListDraftsRequest + * + * @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. Parent value for ListDraftsRequest. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results. + * @type string $order_by + * Hint for how to order the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListDraftsRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListDraftsRequest. + * + * 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; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDraftsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDraftsResponse.php new file mode 100644 index 000000000000..e29257059ad9 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDraftsResponse.php @@ -0,0 +1,135 @@ +google.cloud.visionai.v1.ListDraftsResponse + */ +class ListDraftsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Draft. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Draft drafts = 1; + */ + private $drafts; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Draft[] $drafts + * The list of Draft. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * The list of Draft. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Draft drafts = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Draft> + */ + public function getDrafts() + { + return $this->drafts; + } + + /** + * The list of Draft. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Draft drafts = 1; + * @param \Google\Cloud\VisionAI\V1\Draft[] $var + * @return $this + */ + public function setDrafts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Draft::class); + $this->drafts = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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 that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListEventsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListEventsRequest.php new file mode 100644 index 000000000000..16feac57a49b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListEventsRequest.php @@ -0,0 +1,221 @@ +google.cloud.visionai.v1.ListEventsRequest + */ +class ListEventsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListEventsRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListEventsRequest. Please see + * {@see StreamsServiceClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ListEventsRequest + * + * @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. Parent value for ListEventsRequest. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results. + * @type string $order_by + * Hint for how to order the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListEventsRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListEventsRequest. + * + * 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; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListEventsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListEventsResponse.php new file mode 100644 index 000000000000..b765242f83e3 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListEventsResponse.php @@ -0,0 +1,135 @@ +google.cloud.visionai.v1.ListEventsResponse + */ +class ListEventsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Event. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Event events = 1; + */ + private $events; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Event[] $events + * The list of Event. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * The list of Event. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Event events = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Event> + */ + public function getEvents() + { + return $this->events; + } + + /** + * The list of Event. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Event events = 1; + * @param \Google\Cloud\VisionAI\V1\Event[] $var + * @return $this + */ + public function setEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Event::class); + $this->events = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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 that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexEndpointsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexEndpointsRequest.php new file mode 100644 index 000000000000..a909bd850fa8 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexEndpointsRequest.php @@ -0,0 +1,235 @@ +google.cloud.visionai.v1.ListIndexEndpointsRequest + */ +class ListIndexEndpointsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: `projects/{project}/locations/{location}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Requested page size. Server may return fewer items than + * requested. The service may return fewer than this value. If unspecified, a + * page size of 50 will be used. The maximum value is 1000; values above 1000 + * will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. The filter applied to the returned list. + * We only support filtering for the `deployed_image_index.image_index` field. + * However, to filter by a corpus instead of an image index, simply use + * `deployed_image_index.corpus`, which will return all endpoints with + * `deployed_image_index.image_index` inside of the given corpus. + * A basic filter on image index would look like: + * deployed_image_index.image_index = + * "projects/123/locations/us-central1/corpora/my_corpus/imageIndexes/my_image_index" + * A basic filter on corpus would look like: + * deployed_image_index.corpus = + * "projects/123/locations/us-central1/corpora/my_corpus" + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. Format: `projects/{project}/locations/{location}` + * Please see {@see WarehouseClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ListIndexEndpointsRequest + * + * @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. Format: `projects/{project}/locations/{location}` + * @type int $page_size + * Optional. Requested page size. Server may return fewer items than + * requested. The service may return fewer than this value. If unspecified, a + * page size of 50 will be used. The maximum value is 1000; values above 1000 + * will be coerced to 1000. + * @type string $page_token + * Optional. A token identifying a page of results the server should return. + * @type string $filter + * Optional. The filter applied to the returned list. + * We only support filtering for the `deployed_image_index.image_index` field. + * However, to filter by a corpus instead of an image index, simply use + * `deployed_image_index.corpus`, which will return all endpoints with + * `deployed_image_index.image_index` inside of the given corpus. + * A basic filter on image index would look like: + * deployed_image_index.image_index = + * "projects/123/locations/us-central1/corpora/my_corpus/imageIndexes/my_image_index" + * A basic filter on corpus would look like: + * deployed_image_index.corpus = + * "projects/123/locations/us-central1/corpora/my_corpus" + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: `projects/{project}/locations/{location}` + * + * 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. Format: `projects/{project}/locations/{location}` + * + * 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; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. The service may return fewer than this value. If unspecified, a + * page size of 50 will be used. The maximum value is 1000; values above 1000 + * will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Requested page size. Server may return fewer items than + * requested. The service may return fewer than this value. If unspecified, a + * page size of 50 will be used. The maximum value is 1000; values above 1000 + * will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The filter applied to the returned list. + * We only support filtering for the `deployed_image_index.image_index` field. + * However, to filter by a corpus instead of an image index, simply use + * `deployed_image_index.corpus`, which will return all endpoints with + * `deployed_image_index.image_index` inside of the given corpus. + * A basic filter on image index would look like: + * deployed_image_index.image_index = + * "projects/123/locations/us-central1/corpora/my_corpus/imageIndexes/my_image_index" + * A basic filter on corpus would look like: + * deployed_image_index.corpus = + * "projects/123/locations/us-central1/corpora/my_corpus" + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. The filter applied to the returned list. + * We only support filtering for the `deployed_image_index.image_index` field. + * However, to filter by a corpus instead of an image index, simply use + * `deployed_image_index.corpus`, which will return all endpoints with + * `deployed_image_index.image_index` inside of the given corpus. + * A basic filter on image index would look like: + * deployed_image_index.image_index = + * "projects/123/locations/us-central1/corpora/my_corpus/imageIndexes/my_image_index" + * A basic filter on corpus would look like: + * deployed_image_index.corpus = + * "projects/123/locations/us-central1/corpora/my_corpus" + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexEndpointsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexEndpointsResponse.php new file mode 100644 index 000000000000..11781024e737 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexEndpointsResponse.php @@ -0,0 +1,101 @@ +google.cloud.visionai.v1.ListIndexEndpointsResponse + */ +class ListIndexEndpointsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of IndexEndpoints. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + */ + private $index_endpoints; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\IndexEndpoint[] $index_endpoints + * The list of IndexEndpoints. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The list of IndexEndpoints. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\IndexEndpoint> + */ + public function getIndexEndpoints() + { + return $this->index_endpoints; + } + + /** + * The list of IndexEndpoints. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; + * @param \Google\Cloud\VisionAI\V1\IndexEndpoint[] $var + * @return $this + */ + public function setIndexEndpoints($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\IndexEndpoint::class); + $this->index_endpoints = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexesRequest.php new file mode 100644 index 000000000000..a1eb5291572e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexesRequest.php @@ -0,0 +1,183 @@ +google.cloud.visionai.v1.ListIndexesRequest + */ +class ListIndexesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent corpus that owns this collection of indexes. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of indexes to return. The service may return fewer than + * this value. + * If unspecified, at most 50 indexes will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListIndexes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListIndexes` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent corpus that owns this collection of indexes. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * Please see {@see WarehouseClient::corpusName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ListIndexesRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent corpus that owns this collection of indexes. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @type int $page_size + * The maximum number of indexes to return. The service may return fewer than + * this value. + * If unspecified, at most 50 indexes will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * A page token, received from a previous `ListIndexes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListIndexes` must match + * the call that provided the page token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent corpus that owns this collection of indexes. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent corpus that owns this collection of indexes. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * 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 indexes to return. The service may return fewer than + * this value. + * If unspecified, at most 50 indexes will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of indexes to return. The service may return fewer than + * this value. + * If unspecified, at most 50 indexes will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListIndexes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListIndexes` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListIndexes` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListIndexes` must match + * the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexesResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexesResponse.php new file mode 100644 index 000000000000..4aa1ca56da82 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexesResponse.php @@ -0,0 +1,105 @@ +google.cloud.visionai.v1.ListIndexesResponse + */ +class ListIndexesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The indexes under the specified corpus. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Index indexes = 1; + */ + private $indexes; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Index[] $indexes + * The indexes under the specified corpus. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The indexes under the specified corpus. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Index indexes = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Index> + */ + public function getIndexes() + { + return $this->indexes; + } + + /** + * The indexes under the specified corpus. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Index indexes = 1; + * @param \Google\Cloud\VisionAI\V1\Index[] $var + * @return $this + */ + public function setIndexes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Index::class); + $this->indexes = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListInstancesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListInstancesRequest.php new file mode 100644 index 000000000000..2533b684c231 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListInstancesRequest.php @@ -0,0 +1,221 @@ +google.cloud.visionai.v1.ListInstancesRequest + */ +class ListInstancesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListInstancesRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListInstancesRequest. Please see + * {@see AppPlatformClient::applicationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\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. Parent value for ListInstancesRequest. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results. + * @type string $order_by + * Hint for how to order the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListInstancesRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListInstancesRequest. + * + * 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; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListInstancesResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListInstancesResponse.php new file mode 100644 index 000000000000..dfa7c80ac4af --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListInstancesResponse.php @@ -0,0 +1,135 @@ +google.cloud.visionai.v1.ListInstancesResponse + */ +class ListInstancesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Instance. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance instances = 1; + */ + private $instances; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Instance[] $instances + * The list of Instance. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * The list of Instance. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance instances = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Instance> + */ + public function getInstances() + { + return $this->instances; + } + + /** + * The list of Instance. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance instances = 1; + * @param \Google\Cloud\VisionAI\V1\Instance[] $var + * @return $this + */ + public function setInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Instance::class); + $this->instances = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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 that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListOperatorsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListOperatorsRequest.php new file mode 100644 index 000000000000..8248975dc97a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListOperatorsRequest.php @@ -0,0 +1,221 @@ +google.cloud.visionai.v1.ListOperatorsRequest + */ +class ListOperatorsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListOperatorsRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListOperatorsRequest. Please see + * {@see LiveVideoAnalyticsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ListOperatorsRequest + * + * @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. Parent value for ListOperatorsRequest. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results. + * @type string $order_by + * Hint for how to order the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListOperatorsRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListOperatorsRequest. + * + * 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; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListOperatorsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListOperatorsResponse.php new file mode 100644 index 000000000000..408959ce1d5d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListOperatorsResponse.php @@ -0,0 +1,135 @@ +google.cloud.visionai.v1.ListOperatorsResponse + */ +class ListOperatorsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Operator + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + private $operators; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Operator[] $operators + * The list of Operator + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * The list of Operator + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Operator operators = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Operator> + */ + public function getOperators() + { + return $this->operators; + } + + /** + * The list of Operator + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Operator operators = 1; + * @param \Google\Cloud\VisionAI\V1\Operator[] $var + * @return $this + */ + public function setOperators($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Operator::class); + $this->operators = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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 that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPrebuiltProcessorsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPrebuiltProcessorsRequest.php new file mode 100644 index 000000000000..e281eb19f5dc --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPrebuiltProcessorsRequest.php @@ -0,0 +1,81 @@ +google.cloud.visionai.v1.ListPrebuiltProcessorsRequest + */ +class ListPrebuiltProcessorsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent path. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + + /** + * @param string $parent Required. Parent path. Please see + * {@see AppPlatformClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ListPrebuiltProcessorsRequest + * + * @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. Parent path. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent path. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent path. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPrebuiltProcessorsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPrebuiltProcessorsResponse.php new file mode 100644 index 000000000000..ef472a2723af --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPrebuiltProcessorsResponse.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.ListPrebuiltProcessorsResponse + */ +class ListPrebuiltProcessorsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Processor. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + private $processors; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Processor[] $processors + * The list of Processor. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * The list of Processor. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Processor processors = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Processor> + */ + public function getProcessors() + { + return $this->processors; + } + + /** + * The list of Processor. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Processor processors = 1; + * @param \Google\Cloud\VisionAI\V1\Processor[] $var + * @return $this + */ + public function setProcessors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Processor::class); + $this->processors = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessesRequest.php new file mode 100644 index 000000000000..4d73c2503df2 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessesRequest.php @@ -0,0 +1,221 @@ +google.cloud.visionai.v1.ListProcessesRequest + */ +class ListProcessesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListProcessesRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListProcessesRequest. Please see + * {@see LiveVideoAnalyticsClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ListProcessesRequest + * + * @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. Parent value for ListProcessesRequest. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results + * @type string $order_by + * Hint for how to order the results + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListProcessesRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListProcessesRequest. + * + * 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; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessesResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessesResponse.php new file mode 100644 index 000000000000..087267126f94 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessesResponse.php @@ -0,0 +1,135 @@ +google.cloud.visionai.v1.ListProcessesResponse + */ +class ListProcessesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Processes. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Process processes = 1; + */ + private $processes; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Process[] $processes + * The list of Processes. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * The list of Processes. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Process processes = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Process> + */ + public function getProcesses() + { + return $this->processes; + } + + /** + * The list of Processes. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Process processes = 1; + * @param \Google\Cloud\VisionAI\V1\Process[] $var + * @return $this + */ + public function setProcesses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Process::class); + $this->processes = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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 that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessorsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessorsRequest.php new file mode 100644 index 000000000000..f79099ec7918 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessorsRequest.php @@ -0,0 +1,221 @@ +google.cloud.visionai.v1.ListProcessorsRequest + */ +class ListProcessorsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListProcessorsRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListProcessorsRequest. Please see + * {@see AppPlatformClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ListProcessorsRequest + * + * @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. Parent value for ListProcessorsRequest. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results. + * @type string $order_by + * Hint for how to order the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListProcessorsRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListProcessorsRequest. + * + * 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; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessorsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessorsResponse.php new file mode 100644 index 000000000000..04f01171026d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessorsResponse.php @@ -0,0 +1,135 @@ +google.cloud.visionai.v1.ListProcessorsResponse + */ +class ListProcessorsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Processor. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Processor processors = 1; + */ + private $processors; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Processor[] $processors + * The list of Processor. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * The list of Processor. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Processor processors = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Processor> + */ + public function getProcessors() + { + return $this->processors; + } + + /** + * The list of Processor. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Processor processors = 1; + * @param \Google\Cloud\VisionAI\V1\Processor[] $var + * @return $this + */ + public function setProcessors($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Processor::class); + $this->processors = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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 that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPublicOperatorsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPublicOperatorsRequest.php new file mode 100644 index 000000000000..fe575060e21c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPublicOperatorsRequest.php @@ -0,0 +1,221 @@ +google.cloud.visionai.v1.ListPublicOperatorsRequest + */ +class ListPublicOperatorsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListPublicOperatorsRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListPublicOperatorsRequest. Please see + * {@see LiveVideoAnalyticsClient::locationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ListPublicOperatorsRequest + * + * @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. Parent value for ListPublicOperatorsRequest. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results. + * @type string $order_by + * Hint for how to order the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListPublicOperatorsRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListPublicOperatorsRequest. + * + * 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; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPublicOperatorsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPublicOperatorsResponse.php new file mode 100644 index 000000000000..ee979ce3d4e1 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPublicOperatorsResponse.php @@ -0,0 +1,101 @@ +google.cloud.visionai.v1.ListPublicOperatorsResponse + */ +class ListPublicOperatorsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Operator + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + private $operators; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Operator[] $operators + * The list of Operator + * @type string $next_page_token + * A token identifying a page of results the server should return. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * The list of Operator + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Operator operators = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Operator> + */ + public function getOperators() + { + return $this->operators; + } + + /** + * The list of Operator + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Operator operators = 1; + * @param \Google\Cloud\VisionAI\V1\Operator[] $var + * @return $this + */ + public function setOperators($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Operator::class); + $this->operators = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchConfigsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchConfigsRequest.php new file mode 100644 index 000000000000..e0f2e9031307 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchConfigsRequest.php @@ -0,0 +1,183 @@ +google.cloud.visionai.v1.ListSearchConfigsRequest + */ +class ListSearchConfigsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of search configurations. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of search configurations to return. The service may + * return fewer than this value. If unspecified, a page size of 50 will be + * used. The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ListSearchConfigs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListSearchConfigs` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of search configurations. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * Please see {@see WarehouseClient::corpusName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ListSearchConfigsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of search configurations. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @type int $page_size + * The maximum number of search configurations to return. The service may + * return fewer than this value. If unspecified, a page size of 50 will be + * used. The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * A page token, received from a previous `ListSearchConfigs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListSearchConfigs` must match the call that provided the page + * token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of search configurations. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of search configurations. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * 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 search configurations to return. The service may + * return fewer than this value. If unspecified, a page size of 50 will be + * used. The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of search configurations to return. The service may + * return fewer than this value. If unspecified, a page size of 50 will be + * used. The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ListSearchConfigs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListSearchConfigs` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ListSearchConfigs` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListSearchConfigs` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchConfigsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchConfigsResponse.php new file mode 100644 index 000000000000..a3376cfd13cc --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchConfigsResponse.php @@ -0,0 +1,105 @@ +google.cloud.visionai.v1.ListSearchConfigsResponse + */ +class ListSearchConfigsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The search configurations from the specified corpus. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + */ + private $search_configs; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\SearchConfig[] $search_configs + * The search configurations from the specified corpus. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The search configurations from the specified corpus. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\SearchConfig> + */ + public function getSearchConfigs() + { + return $this->search_configs; + } + + /** + * The search configurations from the specified corpus. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; + * @param \Google\Cloud\VisionAI\V1\SearchConfig[] $var + * @return $this + */ + public function setSearchConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\SearchConfig::class); + $this->search_configs = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchHypernymsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchHypernymsRequest.php new file mode 100644 index 000000000000..6501a681a3df --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchHypernymsRequest.php @@ -0,0 +1,183 @@ +google.cloud.visionai.v1.ListSearchHypernymsRequest + */ +class ListSearchHypernymsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent, which owns this collection of SearchHypernyms. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of SearchHypernyms returned. The service may + * return fewer than this value. If unspecified, a page size of 50 will be + * used. The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `SearchHypernym` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `SearchHypernym` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The parent, which owns this collection of SearchHypernyms. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * Please see {@see WarehouseClient::corpusName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ListSearchHypernymsRequest + * + * @experimental + */ + public static function build(string $parent): self + { + return (new self()) + ->setParent($parent); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent, which owns this collection of SearchHypernyms. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * @type int $page_size + * The maximum number of SearchHypernyms returned. The service may + * return fewer than this value. If unspecified, a page size of 50 will be + * used. The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * A page token, received from a previous `SearchHypernym` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `SearchHypernym` must match the call that provided the page + * token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent, which owns this collection of SearchHypernyms. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. The parent, which owns this collection of SearchHypernyms. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}` + * + * 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 SearchHypernyms returned. The service may + * return fewer than this value. If unspecified, a page size of 50 will be + * used. The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of SearchHypernyms returned. The service may + * return fewer than this value. If unspecified, a page size of 50 will be + * used. The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `SearchHypernym` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `SearchHypernym` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `SearchHypernym` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `SearchHypernym` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchHypernymsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchHypernymsResponse.php new file mode 100644 index 000000000000..f3adb2d6225a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchHypernymsResponse.php @@ -0,0 +1,105 @@ +google.cloud.visionai.v1.ListSearchHypernymsResponse + */ +class ListSearchHypernymsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The SearchHypernyms from the specified corpus. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + */ + private $search_hypernyms; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\SearchHypernym[] $search_hypernyms + * The SearchHypernyms from the specified corpus. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The SearchHypernyms from the specified corpus. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\SearchHypernym> + */ + public function getSearchHypernyms() + { + return $this->search_hypernyms; + } + + /** + * The SearchHypernyms from the specified corpus. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; + * @param \Google\Cloud\VisionAI\V1\SearchHypernym[] $var + * @return $this + */ + public function setSearchHypernyms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\SearchHypernym::class); + $this->search_hypernyms = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSeriesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSeriesRequest.php new file mode 100644 index 000000000000..36ab4dca9a27 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSeriesRequest.php @@ -0,0 +1,221 @@ +google.cloud.visionai.v1.ListSeriesRequest + */ +class ListSeriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListSeriesRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListSeriesRequest. Please see + * {@see StreamsServiceClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ListSeriesRequest + * + * @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. Parent value for ListSeriesRequest. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results. + * @type string $order_by + * Hint for how to order the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListSeriesRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListSeriesRequest. + * + * 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; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSeriesResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSeriesResponse.php new file mode 100644 index 000000000000..0dd2c593fe6e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSeriesResponse.php @@ -0,0 +1,135 @@ +google.cloud.visionai.v1.ListSeriesResponse + */ +class ListSeriesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Series. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Series series = 1; + */ + private $series; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Series[] $series + * The list of Series. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * The list of Series. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Series series = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Series> + */ + public function getSeries() + { + return $this->series; + } + + /** + * The list of Series. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Series series = 1; + * @param \Google\Cloud\VisionAI\V1\Series[] $var + * @return $this + */ + public function setSeries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Series::class); + $this->series = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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 that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListStreamsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListStreamsRequest.php new file mode 100644 index 000000000000..ff5a69a8ae63 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListStreamsRequest.php @@ -0,0 +1,221 @@ +google.cloud.visionai.v1.ListStreamsRequest + */ +class ListStreamsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ListStreamsRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + + /** + * @param string $parent Required. Parent value for ListStreamsRequest. Please see + * {@see StreamsServiceClient::clusterName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ListStreamsRequest + * + * @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. Parent value for ListStreamsRequest. + * @type int $page_size + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * @type string $page_token + * A token identifying a page of results the server should return. + * @type string $filter + * Filtering results. + * @type string $order_by + * Hint for how to order the results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ListStreamsRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ListStreamsRequest. + * + * 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; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. Server may return fewer items than requested. + * If unspecified, server will pick an appropriate default. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Filtering results. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Hint for how to order the results. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListStreamsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListStreamsResponse.php new file mode 100644 index 000000000000..3a8d48527806 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListStreamsResponse.php @@ -0,0 +1,135 @@ +google.cloud.visionai.v1.ListStreamsResponse + */ +class ListStreamsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of Stream. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Stream streams = 1; + */ + private $streams; + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + */ + private $unreachable; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Stream[] $streams + * The list of Stream. + * @type string $next_page_token + * A token identifying a page of results the server should return. + * @type string[] $unreachable + * Locations that could not be reached. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * The list of Stream. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Stream streams = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Stream> + */ + public function getStreams() + { + return $this->streams; + } + + /** + * The list of Stream. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Stream streams = 1; + * @param \Google\Cloud\VisionAI\V1\Stream[] $var + * @return $this + */ + public function setStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Stream::class); + $this->streams = $arr; + + return $this; + } + + /** + * A token identifying a page of results the server should return. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token identifying a page of results the server should return. + * + * 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 that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @return RepeatedField + */ + public function getUnreachable() + { + return $this->unreachable; + } + + /** + * Locations that could not be reached. + * + * Generated from protobuf field repeated string unreachable = 3; + * @param string[] $var + * @return $this + */ + public function setUnreachable($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->unreachable = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MachineSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MachineSpec.php new file mode 100644 index 000000000000..ee014a3886a1 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MachineSpec.php @@ -0,0 +1,171 @@ +google.cloud.visionai.v1.MachineSpec + */ +class MachineSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. The type of the machine. + * See the [list of machine types supported for + * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) + * See the [list of machine types supported for custom + * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). + * For [DeployedModel][] this field is optional, and the default + * value is `n1-standard-2`. For [BatchPredictionJob][] or as part of + * [WorkerPoolSpec][] this field is required. + * + * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $machine_type = ''; + /** + * Immutable. The type of accelerator(s) that may be attached to the machine + * as per + * [accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]. + * + * Generated from protobuf field .google.cloud.visionai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $accelerator_type = 0; + /** + * The number of accelerators to attach to the machine. + * + * Generated from protobuf field int32 accelerator_count = 3; + */ + protected $accelerator_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $machine_type + * Immutable. The type of the machine. + * See the [list of machine types supported for + * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) + * See the [list of machine types supported for custom + * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). + * For [DeployedModel][] this field is optional, and the default + * value is `n1-standard-2`. For [BatchPredictionJob][] or as part of + * [WorkerPoolSpec][] this field is required. + * @type int $accelerator_type + * Immutable. The type of accelerator(s) that may be attached to the machine + * as per + * [accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]. + * @type int $accelerator_count + * The number of accelerators to attach to the machine. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. The type of the machine. + * See the [list of machine types supported for + * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) + * See the [list of machine types supported for custom + * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). + * For [DeployedModel][] this field is optional, and the default + * value is `n1-standard-2`. For [BatchPredictionJob][] or as part of + * [WorkerPoolSpec][] this field is required. + * + * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getMachineType() + { + return $this->machine_type; + } + + /** + * Immutable. The type of the machine. + * See the [list of machine types supported for + * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) + * See the [list of machine types supported for custom + * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). + * For [DeployedModel][] this field is optional, and the default + * value is `n1-standard-2`. For [BatchPredictionJob][] or as part of + * [WorkerPoolSpec][] this field is required. + * + * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setMachineType($var) + { + GPBUtil::checkString($var, True); + $this->machine_type = $var; + + return $this; + } + + /** + * Immutable. The type of accelerator(s) that may be attached to the machine + * as per + * [accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]. + * + * Generated from protobuf field .google.cloud.visionai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getAcceleratorType() + { + return $this->accelerator_type; + } + + /** + * Immutable. The type of accelerator(s) that may be attached to the machine + * as per + * [accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]. + * + * Generated from protobuf field .google.cloud.visionai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setAcceleratorType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\AcceleratorType::class); + $this->accelerator_type = $var; + + return $this; + } + + /** + * The number of accelerators to attach to the machine. + * + * Generated from protobuf field int32 accelerator_count = 3; + * @return int + */ + public function getAcceleratorCount() + { + return $this->accelerator_count; + } + + /** + * The number of accelerators to attach to the machine. + * + * Generated from protobuf field int32 accelerator_count = 3; + * @param int $var + * @return $this + */ + public function setAcceleratorCount($var) + { + GPBUtil::checkInt32($var); + $this->accelerator_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MaterializeChannelRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MaterializeChannelRequest.php new file mode 100644 index 000000000000..eb7a5ee9abac --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MaterializeChannelRequest.php @@ -0,0 +1,237 @@ +google.cloud.visionai.v1.MaterializeChannelRequest + */ +class MaterializeChannelRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Value for parent. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Id of the channel. + * + * Generated from protobuf field string channel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $channel_id = ''; + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $channel = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $parent Required. Value for parent. Please see + * {@see StreamsServiceClient::clusterName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\Channel $channel Required. The resource being created. + * @param string $channelId Required. Id of the channel. + * + * @return \Google\Cloud\VisionAI\V1\MaterializeChannelRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\VisionAI\V1\Channel $channel, string $channelId): self + { + return (new self()) + ->setParent($parent) + ->setChannel($channel) + ->setChannelId($channelId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Value for parent. + * @type string $channel_id + * Required. Id of the channel. + * @type \Google\Cloud\VisionAI\V1\Channel $channel + * Required. The resource being created. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Value for parent. + * + * 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. Value for parent. + * + * 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. Id of the channel. + * + * Generated from protobuf field string channel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getChannelId() + { + return $this->channel_id; + } + + /** + * Required. Id of the channel. + * + * Generated from protobuf field string channel_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setChannelId($var) + { + GPBUtil::checkString($var, True); + $this->channel_id = $var; + + return $this; + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Channel|null + */ + public function getChannel() + { + return $this->channel; + } + + public function hasChannel() + { + return isset($this->channel); + } + + public function clearChannel() + { + unset($this->channel); + } + + /** + * Required. The resource being created. + * + * Generated from protobuf field .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Channel $var + * @return $this + */ + public function setChannel($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Channel::class); + $this->channel = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MediaWarehouseConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MediaWarehouseConfig.php new file mode 100644 index 000000000000..429f87d15704 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MediaWarehouseConfig.php @@ -0,0 +1,164 @@ +google.cloud.visionai.v1.MediaWarehouseConfig + */ +class MediaWarehouseConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the Media Warehouse corpus. + * Format: + * projects/${project_id}/locations/${location_id}/corpora/${corpus_id} + * + * Generated from protobuf field string corpus = 1; + */ + protected $corpus = ''; + /** + * Deprecated. + * + * Generated from protobuf field string region = 2 [deprecated = true]; + * @deprecated + */ + protected $region = ''; + /** + * The duration for which all media assets, associated metadata, and search + * documents can exist. + * + * Generated from protobuf field .google.protobuf.Duration ttl = 3; + */ + protected $ttl = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $corpus + * Resource name of the Media Warehouse corpus. + * Format: + * projects/${project_id}/locations/${location_id}/corpora/${corpus_id} + * @type string $region + * Deprecated. + * @type \Google\Protobuf\Duration $ttl + * The duration for which all media assets, associated metadata, and search + * documents can exist. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the Media Warehouse corpus. + * Format: + * projects/${project_id}/locations/${location_id}/corpora/${corpus_id} + * + * Generated from protobuf field string corpus = 1; + * @return string + */ + public function getCorpus() + { + return $this->corpus; + } + + /** + * Resource name of the Media Warehouse corpus. + * Format: + * projects/${project_id}/locations/${location_id}/corpora/${corpus_id} + * + * Generated from protobuf field string corpus = 1; + * @param string $var + * @return $this + */ + public function setCorpus($var) + { + GPBUtil::checkString($var, True); + $this->corpus = $var; + + return $this; + } + + /** + * Deprecated. + * + * Generated from protobuf field string region = 2 [deprecated = true]; + * @return string + * @deprecated + */ + public function getRegion() + { + if ($this->region !== '') { + @trigger_error('region is deprecated.', E_USER_DEPRECATED); + } + return $this->region; + } + + /** + * Deprecated. + * + * Generated from protobuf field string region = 2 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setRegion($var) + { + @trigger_error('region is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->region = $var; + + return $this; + } + + /** + * The duration for which all media assets, associated metadata, and search + * documents can exist. + * + * Generated from protobuf field .google.protobuf.Duration ttl = 3; + * @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 duration for which all media assets, associated metadata, and search + * documents can exist. + * + * Generated from protobuf field .google.protobuf.Duration ttl = 3; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTtl($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->ttl = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ModelType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ModelType.php new file mode 100644 index 000000000000..64157f6e7274 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ModelType.php @@ -0,0 +1,124 @@ +google.cloud.visionai.v1.ModelType + */ +class ModelType +{ + /** + * Processor Type UNSPECIFIED. + * + * Generated from protobuf enum MODEL_TYPE_UNSPECIFIED = 0; + */ + const MODEL_TYPE_UNSPECIFIED = 0; + /** + * Model Type Image Classification. + * + * Generated from protobuf enum IMAGE_CLASSIFICATION = 1; + */ + const IMAGE_CLASSIFICATION = 1; + /** + * Model Type Object Detection. + * + * Generated from protobuf enum OBJECT_DETECTION = 2; + */ + const OBJECT_DETECTION = 2; + /** + * Model Type Video Classification. + * + * Generated from protobuf enum VIDEO_CLASSIFICATION = 3; + */ + const VIDEO_CLASSIFICATION = 3; + /** + * Model Type Object Tracking. + * + * Generated from protobuf enum VIDEO_OBJECT_TRACKING = 4; + */ + const VIDEO_OBJECT_TRACKING = 4; + /** + * Model Type Action Recognition. + * + * Generated from protobuf enum VIDEO_ACTION_RECOGNITION = 5; + */ + const VIDEO_ACTION_RECOGNITION = 5; + /** + * Model Type Occupancy Counting. + * + * Generated from protobuf enum OCCUPANCY_COUNTING = 6; + */ + const OCCUPANCY_COUNTING = 6; + /** + * Model Type Person Blur. + * + * Generated from protobuf enum PERSON_BLUR = 7; + */ + const PERSON_BLUR = 7; + /** + * Model Type Vertex Custom. + * + * Generated from protobuf enum VERTEX_CUSTOM = 8; + */ + const VERTEX_CUSTOM = 8; + /** + * Model Type Product Recognizer. + * + * Generated from protobuf enum PRODUCT_RECOGNIZER = 9; + */ + const PRODUCT_RECOGNIZER = 9; + /** + * Model Type Tag Recognizer. + * + * Generated from protobuf enum TAG_RECOGNIZER = 10; + */ + const TAG_RECOGNIZER = 10; + /** + * Model Type SynthID. + * + * Generated from protobuf enum SYNTH_ID = 15; + */ + const SYNTH_ID = 15; + + private static $valueToName = [ + self::MODEL_TYPE_UNSPECIFIED => 'MODEL_TYPE_UNSPECIFIED', + self::IMAGE_CLASSIFICATION => 'IMAGE_CLASSIFICATION', + self::OBJECT_DETECTION => 'OBJECT_DETECTION', + self::VIDEO_CLASSIFICATION => 'VIDEO_CLASSIFICATION', + self::VIDEO_OBJECT_TRACKING => 'VIDEO_OBJECT_TRACKING', + self::VIDEO_ACTION_RECOGNITION => 'VIDEO_ACTION_RECOGNITION', + self::OCCUPANCY_COUNTING => 'OCCUPANCY_COUNTING', + self::PERSON_BLUR => 'PERSON_BLUR', + self::VERTEX_CUSTOM => 'VERTEX_CUSTOM', + self::PRODUCT_RECOGNIZER => 'PRODUCT_RECOGNIZER', + self::TAG_RECOGNIZER => 'TAG_RECOGNIZER', + self::SYNTH_ID => 'SYNTH_ID', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Node.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Node.php new file mode 100644 index 000000000000..aa404f8ac2bd --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Node.php @@ -0,0 +1,305 @@ +google.cloud.visionai.v1.Node + */ +class Node extends \Google\Protobuf\Internal\Message +{ + /** + * Required. A unique name for the node. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + /** + * A user friendly display name for the node. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Node config. + * + * Generated from protobuf field .google.cloud.visionai.v1.ProcessorConfig node_config = 3; + */ + protected $node_config = null; + /** + * Processor name refer to the chosen processor resource. + * + * Generated from protobuf field string processor = 4; + */ + protected $processor = ''; + /** + * Parent node. Input node should not have parent node. For V1 Alpha1/Beta + * only media warehouse node can have multiple parents, other types of nodes + * will only have one parent. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + */ + private $parents; + protected $stream_output_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $output_all_output_channels_to_stream + * By default, the output of the node will only be available to downstream + * nodes. To consume the direct output from the application node, the output + * must be sent to Vision AI Streams at first. + * By setting output_all_output_channels_to_stream to true, App Platform + * will automatically send all the outputs of the current node to Vision AI + * Stream resources (one stream per output channel). The output stream + * resource will be created by App Platform automatically during deployment + * and deleted after application un-deployment. + * Note that this config applies to all the Application Instances. + * The output stream can be override at instance level by + * configuring the `output_resources` section of Instance resource. + * `producer_node` should be current node, `output_resource_binding` should + * be the output channel name (or leave it blank if there is only 1 output + * channel of the processor) and `output_resource` should be the target + * output stream. + * @type string $name + * Required. A unique name for the node. + * @type string $display_name + * A user friendly display name for the node. + * @type \Google\Cloud\VisionAI\V1\ProcessorConfig $node_config + * Node config. + * @type string $processor + * Processor name refer to the chosen processor resource. + * @type \Google\Cloud\VisionAI\V1\Node\InputEdge[] $parents + * Parent node. Input node should not have parent node. For V1 Alpha1/Beta + * only media warehouse node can have multiple parents, other types of nodes + * will only have one parent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * By default, the output of the node will only be available to downstream + * nodes. To consume the direct output from the application node, the output + * must be sent to Vision AI Streams at first. + * By setting output_all_output_channels_to_stream to true, App Platform + * will automatically send all the outputs of the current node to Vision AI + * Stream resources (one stream per output channel). The output stream + * resource will be created by App Platform automatically during deployment + * and deleted after application un-deployment. + * Note that this config applies to all the Application Instances. + * The output stream can be override at instance level by + * configuring the `output_resources` section of Instance resource. + * `producer_node` should be current node, `output_resource_binding` should + * be the output channel name (or leave it blank if there is only 1 output + * channel of the processor) and `output_resource` should be the target + * output stream. + * + * Generated from protobuf field bool output_all_output_channels_to_stream = 6; + * @return bool + */ + public function getOutputAllOutputChannelsToStream() + { + return $this->readOneof(6); + } + + public function hasOutputAllOutputChannelsToStream() + { + return $this->hasOneof(6); + } + + /** + * By default, the output of the node will only be available to downstream + * nodes. To consume the direct output from the application node, the output + * must be sent to Vision AI Streams at first. + * By setting output_all_output_channels_to_stream to true, App Platform + * will automatically send all the outputs of the current node to Vision AI + * Stream resources (one stream per output channel). The output stream + * resource will be created by App Platform automatically during deployment + * and deleted after application un-deployment. + * Note that this config applies to all the Application Instances. + * The output stream can be override at instance level by + * configuring the `output_resources` section of Instance resource. + * `producer_node` should be current node, `output_resource_binding` should + * be the output channel name (or leave it blank if there is only 1 output + * channel of the processor) and `output_resource` should be the target + * output stream. + * + * Generated from protobuf field bool output_all_output_channels_to_stream = 6; + * @param bool $var + * @return $this + */ + public function setOutputAllOutputChannelsToStream($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Required. A unique name for the node. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. A unique name for the node. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * A user friendly display name for the node. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * A user friendly display name for the node. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Node config. + * + * Generated from protobuf field .google.cloud.visionai.v1.ProcessorConfig node_config = 3; + * @return \Google\Cloud\VisionAI\V1\ProcessorConfig|null + */ + public function getNodeConfig() + { + return $this->node_config; + } + + public function hasNodeConfig() + { + return isset($this->node_config); + } + + public function clearNodeConfig() + { + unset($this->node_config); + } + + /** + * Node config. + * + * Generated from protobuf field .google.cloud.visionai.v1.ProcessorConfig node_config = 3; + * @param \Google\Cloud\VisionAI\V1\ProcessorConfig $var + * @return $this + */ + public function setNodeConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ProcessorConfig::class); + $this->node_config = $var; + + return $this; + } + + /** + * Processor name refer to the chosen processor resource. + * + * Generated from protobuf field string processor = 4; + * @return string + */ + public function getProcessor() + { + return $this->processor; + } + + /** + * Processor name refer to the chosen processor resource. + * + * Generated from protobuf field string processor = 4; + * @param string $var + * @return $this + */ + public function setProcessor($var) + { + GPBUtil::checkString($var, True); + $this->processor = $var; + + return $this; + } + + /** + * Parent node. Input node should not have parent node. For V1 Alpha1/Beta + * only media warehouse node can have multiple parents, other types of nodes + * will only have one parent. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Node\InputEdge> + */ + public function getParents() + { + return $this->parents; + } + + /** + * Parent node. Input node should not have parent node. For V1 Alpha1/Beta + * only media warehouse node can have multiple parents, other types of nodes + * will only have one parent. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; + * @param \Google\Cloud\VisionAI\V1\Node\InputEdge[] $var + * @return $this + */ + public function setParents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Node\InputEdge::class); + $this->parents = $arr; + + return $this; + } + + /** + * @return string + */ + public function getStreamOutputConfig() + { + return $this->whichOneof("stream_output_config"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Node/InputEdge.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Node/InputEdge.php new file mode 100644 index 000000000000..358ef861dcde --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Node/InputEdge.php @@ -0,0 +1,143 @@ +google.cloud.visionai.v1.Node.InputEdge + */ +class InputEdge extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the parent node. + * + * Generated from protobuf field string parent_node = 1; + */ + protected $parent_node = ''; + /** + * The connected output artifact of the parent node. + * It can be omitted if target processor only has 1 output artifact. + * + * Generated from protobuf field string parent_output_channel = 2; + */ + protected $parent_output_channel = ''; + /** + * The connected input channel of the current node's processor. + * It can be omitted if target processor only has 1 input channel. + * + * Generated from protobuf field string connected_input_channel = 3; + */ + protected $connected_input_channel = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent_node + * The name of the parent node. + * @type string $parent_output_channel + * The connected output artifact of the parent node. + * It can be omitted if target processor only has 1 output artifact. + * @type string $connected_input_channel + * The connected input channel of the current node's processor. + * It can be omitted if target processor only has 1 input channel. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * The name of the parent node. + * + * Generated from protobuf field string parent_node = 1; + * @return string + */ + public function getParentNode() + { + return $this->parent_node; + } + + /** + * The name of the parent node. + * + * Generated from protobuf field string parent_node = 1; + * @param string $var + * @return $this + */ + public function setParentNode($var) + { + GPBUtil::checkString($var, True); + $this->parent_node = $var; + + return $this; + } + + /** + * The connected output artifact of the parent node. + * It can be omitted if target processor only has 1 output artifact. + * + * Generated from protobuf field string parent_output_channel = 2; + * @return string + */ + public function getParentOutputChannel() + { + return $this->parent_output_channel; + } + + /** + * The connected output artifact of the parent node. + * It can be omitted if target processor only has 1 output artifact. + * + * Generated from protobuf field string parent_output_channel = 2; + * @param string $var + * @return $this + */ + public function setParentOutputChannel($var) + { + GPBUtil::checkString($var, True); + $this->parent_output_channel = $var; + + return $this; + } + + /** + * The connected input channel of the current node's processor. + * It can be omitted if target processor only has 1 input channel. + * + * Generated from protobuf field string connected_input_channel = 3; + * @return string + */ + public function getConnectedInputChannel() + { + return $this->connected_input_channel; + } + + /** + * The connected input channel of the current node's processor. + * It can be omitted if target processor only has 1 input channel. + * + * Generated from protobuf field string connected_input_channel = 3; + * @param string $var + * @return $this + */ + public function setConnectedInputChannel($var) + { + GPBUtil::checkString($var, True); + $this->connected_input_channel = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedPolygon.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedPolygon.php new file mode 100644 index 000000000000..da5b4df197be --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedPolygon.php @@ -0,0 +1,71 @@ +google.cloud.visionai.v1.NormalizedPolygon + */ +class NormalizedPolygon extends \Google\Protobuf\Internal\Message +{ + /** + * The bounding polygon normalized vertices. Top left corner of the image + * will be [0, 0]. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + private $normalized_vertices; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\NormalizedVertex[] $normalized_vertices + * The bounding polygon normalized vertices. Top left corner of the image + * will be [0, 0]. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * The bounding polygon normalized vertices. Top left corner of the image + * will be [0, 0]. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\NormalizedVertex> + */ + public function getNormalizedVertices() + { + return $this->normalized_vertices; + } + + /** + * The bounding polygon normalized vertices. Top left corner of the image + * will be [0, 0]. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + * @param \Google\Cloud\VisionAI\V1\NormalizedVertex[] $var + * @return $this + */ + public function setNormalizedVertices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\NormalizedVertex::class); + $this->normalized_vertices = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedPolyline.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedPolyline.php new file mode 100644 index 000000000000..16c09077f807 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedPolyline.php @@ -0,0 +1,68 @@ +google.cloud.visionai.v1.NormalizedPolyline + */ +class NormalizedPolyline extends \Google\Protobuf\Internal\Message +{ + /** + * A sequence of vertices connected by straight lines. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + */ + private $normalized_vertices; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\NormalizedVertex[] $normalized_vertices + * A sequence of vertices connected by straight lines. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * A sequence of vertices connected by straight lines. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\NormalizedVertex> + */ + public function getNormalizedVertices() + { + return $this->normalized_vertices; + } + + /** + * A sequence of vertices connected by straight lines. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; + * @param \Google\Cloud\VisionAI\V1\NormalizedVertex[] $var + * @return $this + */ + public function setNormalizedVertices($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\NormalizedVertex::class); + $this->normalized_vertices = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedVertex.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedVertex.php new file mode 100644 index 000000000000..570bede03536 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedVertex.php @@ -0,0 +1,103 @@ +google.cloud.visionai.v1.NormalizedVertex + */ +class NormalizedVertex extends \Google\Protobuf\Internal\Message +{ + /** + * X coordinate. + * + * Generated from protobuf field float x = 1; + */ + protected $x = 0.0; + /** + * Y coordinate. + * + * Generated from protobuf field float y = 2; + */ + protected $y = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $x + * X coordinate. + * @type float $y + * Y coordinate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * X coordinate. + * + * Generated from protobuf field float x = 1; + * @return float + */ + public function getX() + { + return $this->x; + } + + /** + * X coordinate. + * + * Generated from protobuf field float x = 1; + * @param float $var + * @return $this + */ + public function setX($var) + { + GPBUtil::checkFloat($var); + $this->x = $var; + + return $this; + } + + /** + * Y coordinate. + * + * Generated from protobuf field float y = 2; + * @return float + */ + public function getY() + { + return $this->y; + } + + /** + * Y coordinate. + * + * Generated from protobuf field float y = 2; + * @param float $var + * @return $this + */ + public function setY($var) + { + GPBUtil::checkFloat($var); + $this->y = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult.php new file mode 100644 index 000000000000..f7ef0f797244 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult.php @@ -0,0 +1,111 @@ +google.cloud.visionai.v1.ObjectDetectionPredictionResult + */ +class ObjectDetectionPredictionResult extends \Google\Protobuf\Internal\Message +{ + /** + * Current timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp current_time = 1; + */ + protected $current_time = null; + /** + * A list of identified boxes. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + */ + private $identified_boxes; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $current_time + * Current timestamp. + * @type \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\IdentifiedBox[] $identified_boxes + * A list of identified boxes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * Current timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp current_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCurrentTime() + { + return $this->current_time; + } + + public function hasCurrentTime() + { + return isset($this->current_time); + } + + public function clearCurrentTime() + { + unset($this->current_time); + } + + /** + * Current timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp current_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCurrentTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->current_time = $var; + + return $this; + } + + /** + * A list of identified boxes. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\IdentifiedBox> + */ + public function getIdentifiedBoxes() + { + return $this->identified_boxes; + } + + /** + * A list of identified boxes. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; + * @param \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\IdentifiedBox[] $var + * @return $this + */ + public function setIdentifiedBoxes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\IdentifiedBox::class); + $this->identified_boxes = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/Entity.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/Entity.php new file mode 100644 index 000000000000..a7ae797f24c4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/Entity.php @@ -0,0 +1,101 @@ +google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity + */ +class Entity extends \Google\Protobuf\Internal\Message +{ + /** + * Label id. + * + * Generated from protobuf field int64 label_id = 1; + */ + protected $label_id = 0; + /** + * Human readable string of the label. + * + * Generated from protobuf field string label_string = 2; + */ + protected $label_string = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $label_id + * Label id. + * @type string $label_string + * Human readable string of the label. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * Label id. + * + * Generated from protobuf field int64 label_id = 1; + * @return int|string + */ + public function getLabelId() + { + return $this->label_id; + } + + /** + * Label id. + * + * Generated from protobuf field int64 label_id = 1; + * @param int|string $var + * @return $this + */ + public function setLabelId($var) + { + GPBUtil::checkInt64($var); + $this->label_id = $var; + + return $this; + } + + /** + * Human readable string of the label. + * + * Generated from protobuf field string label_string = 2; + * @return string + */ + public function getLabelString() + { + return $this->label_string; + } + + /** + * Human readable string of the label. + * + * Generated from protobuf field string label_string = 2; + * @param string $var + * @return $this + */ + public function setLabelString($var) + { + GPBUtil::checkString($var, True); + $this->label_string = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/IdentifiedBox.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/IdentifiedBox.php new file mode 100644 index 000000000000..8379574a25f9 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/IdentifiedBox.php @@ -0,0 +1,189 @@ +google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox + */ +class IdentifiedBox extends \Google\Protobuf\Internal\Message +{ + /** + * An unique id for this box. + * + * Generated from protobuf field int64 box_id = 1; + */ + protected $box_id = 0; + /** + * Bounding Box in the normalized coordinates. + * + * Generated from protobuf field .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + */ + protected $normalized_bounding_box = null; + /** + * Confidence score associated with this box. + * + * Generated from protobuf field float confidence_score = 3; + */ + protected $confidence_score = 0.0; + /** + * Entity of this box. + * + * Generated from protobuf field .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; + */ + protected $entity = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $box_id + * An unique id for this box. + * @type \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\IdentifiedBox\NormalizedBoundingBox $normalized_bounding_box + * Bounding Box in the normalized coordinates. + * @type float $confidence_score + * Confidence score associated with this box. + * @type \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\Entity $entity + * Entity of this box. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * An unique id for this box. + * + * Generated from protobuf field int64 box_id = 1; + * @return int|string + */ + public function getBoxId() + { + return $this->box_id; + } + + /** + * An unique id for this box. + * + * Generated from protobuf field int64 box_id = 1; + * @param int|string $var + * @return $this + */ + public function setBoxId($var) + { + GPBUtil::checkInt64($var); + $this->box_id = $var; + + return $this; + } + + /** + * Bounding Box in the normalized coordinates. + * + * Generated from protobuf field .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * @return \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\IdentifiedBox\NormalizedBoundingBox|null + */ + public function getNormalizedBoundingBox() + { + return $this->normalized_bounding_box; + } + + public function hasNormalizedBoundingBox() + { + return isset($this->normalized_bounding_box); + } + + public function clearNormalizedBoundingBox() + { + unset($this->normalized_bounding_box); + } + + /** + * Bounding Box in the normalized coordinates. + * + * Generated from protobuf field .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * @param \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\IdentifiedBox\NormalizedBoundingBox $var + * @return $this + */ + public function setNormalizedBoundingBox($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\IdentifiedBox\NormalizedBoundingBox::class); + $this->normalized_bounding_box = $var; + + return $this; + } + + /** + * Confidence score associated with this box. + * + * Generated from protobuf field float confidence_score = 3; + * @return float + */ + public function getConfidenceScore() + { + return $this->confidence_score; + } + + /** + * Confidence score associated with this box. + * + * Generated from protobuf field float confidence_score = 3; + * @param float $var + * @return $this + */ + public function setConfidenceScore($var) + { + GPBUtil::checkFloat($var); + $this->confidence_score = $var; + + return $this; + } + + /** + * Entity of this box. + * + * Generated from protobuf field .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; + * @return \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\Entity|null + */ + public function getEntity() + { + return $this->entity; + } + + public function hasEntity() + { + return isset($this->entity); + } + + public function clearEntity() + { + unset($this->entity); + } + + /** + * Entity of this box. + * + * Generated from protobuf field .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; + * @param \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\Entity $var + * @return $this + */ + public function setEntity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\Entity::class); + $this->entity = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/IdentifiedBox/NormalizedBoundingBox.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/IdentifiedBox/NormalizedBoundingBox.php new file mode 100644 index 000000000000..29ee067c3105 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/IdentifiedBox/NormalizedBoundingBox.php @@ -0,0 +1,169 @@ +google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox + */ +class NormalizedBoundingBox extends \Google\Protobuf\Internal\Message +{ + /** + * Min in x coordinate. + * + * Generated from protobuf field float xmin = 1; + */ + protected $xmin = 0.0; + /** + * Min in y coordinate. + * + * Generated from protobuf field float ymin = 2; + */ + protected $ymin = 0.0; + /** + * Width of the bounding box. + * + * Generated from protobuf field float width = 3; + */ + protected $width = 0.0; + /** + * Height of the bounding box. + * + * Generated from protobuf field float height = 4; + */ + protected $height = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $xmin + * Min in x coordinate. + * @type float $ymin + * Min in y coordinate. + * @type float $width + * Width of the bounding box. + * @type float $height + * Height of the bounding box. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * Min in x coordinate. + * + * Generated from protobuf field float xmin = 1; + * @return float + */ + public function getXmin() + { + return $this->xmin; + } + + /** + * Min in x coordinate. + * + * Generated from protobuf field float xmin = 1; + * @param float $var + * @return $this + */ + public function setXmin($var) + { + GPBUtil::checkFloat($var); + $this->xmin = $var; + + return $this; + } + + /** + * Min in y coordinate. + * + * Generated from protobuf field float ymin = 2; + * @return float + */ + public function getYmin() + { + return $this->ymin; + } + + /** + * Min in y coordinate. + * + * Generated from protobuf field float ymin = 2; + * @param float $var + * @return $this + */ + public function setYmin($var) + { + GPBUtil::checkFloat($var); + $this->ymin = $var; + + return $this; + } + + /** + * Width of the bounding box. + * + * Generated from protobuf field float width = 3; + * @return float + */ + public function getWidth() + { + return $this->width; + } + + /** + * Width of the bounding box. + * + * Generated from protobuf field float width = 3; + * @param float $var + * @return $this + */ + public function setWidth($var) + { + GPBUtil::checkFloat($var); + $this->width = $var; + + return $this; + } + + /** + * Height of the bounding box. + * + * Generated from protobuf field float height = 4; + * @return float + */ + public function getHeight() + { + return $this->height; + } + + /** + * Height of the bounding box. + * + * Generated from protobuf field float height = 4; + * @param float $var + * @return $this + */ + public function setHeight($var) + { + GPBUtil::checkFloat($var); + $this->height = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountConfig.php new file mode 100644 index 000000000000..296fb4a9548d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountConfig.php @@ -0,0 +1,147 @@ +google.cloud.visionai.v1.OccupancyCountConfig + */ +class OccupancyCountConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Whether to count the appearances of people, output counts have 'people' as + * the key. + * + * Generated from protobuf field bool enable_people_counting = 1; + */ + protected $enable_people_counting = false; + /** + * Whether to count the appearances of vehicles, output counts will have + * 'vehicle' as the key. + * + * Generated from protobuf field bool enable_vehicle_counting = 2; + */ + protected $enable_vehicle_counting = false; + /** + * Whether to track each invidual object's loitering time inside the scene or + * specific zone. + * + * Generated from protobuf field bool enable_dwelling_time_tracking = 3; + */ + protected $enable_dwelling_time_tracking = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_people_counting + * Whether to count the appearances of people, output counts have 'people' as + * the key. + * @type bool $enable_vehicle_counting + * Whether to count the appearances of vehicles, output counts will have + * 'vehicle' as the key. + * @type bool $enable_dwelling_time_tracking + * Whether to track each invidual object's loitering time inside the scene or + * specific zone. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Whether to count the appearances of people, output counts have 'people' as + * the key. + * + * Generated from protobuf field bool enable_people_counting = 1; + * @return bool + */ + public function getEnablePeopleCounting() + { + return $this->enable_people_counting; + } + + /** + * Whether to count the appearances of people, output counts have 'people' as + * the key. + * + * Generated from protobuf field bool enable_people_counting = 1; + * @param bool $var + * @return $this + */ + public function setEnablePeopleCounting($var) + { + GPBUtil::checkBool($var); + $this->enable_people_counting = $var; + + return $this; + } + + /** + * Whether to count the appearances of vehicles, output counts will have + * 'vehicle' as the key. + * + * Generated from protobuf field bool enable_vehicle_counting = 2; + * @return bool + */ + public function getEnableVehicleCounting() + { + return $this->enable_vehicle_counting; + } + + /** + * Whether to count the appearances of vehicles, output counts will have + * 'vehicle' as the key. + * + * Generated from protobuf field bool enable_vehicle_counting = 2; + * @param bool $var + * @return $this + */ + public function setEnableVehicleCounting($var) + { + GPBUtil::checkBool($var); + $this->enable_vehicle_counting = $var; + + return $this; + } + + /** + * Whether to track each invidual object's loitering time inside the scene or + * specific zone. + * + * Generated from protobuf field bool enable_dwelling_time_tracking = 3; + * @return bool + */ + public function getEnableDwellingTimeTracking() + { + return $this->enable_dwelling_time_tracking; + } + + /** + * Whether to track each invidual object's loitering time inside the scene or + * specific zone. + * + * Generated from protobuf field bool enable_dwelling_time_tracking = 3; + * @param bool $var + * @return $this + */ + public function setEnableDwellingTimeTracking($var) + { + GPBUtil::checkBool($var); + $this->enable_dwelling_time_tracking = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult.php new file mode 100644 index 000000000000..cd5ce7a6cf95 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult.php @@ -0,0 +1,275 @@ +google.cloud.visionai.v1.OccupancyCountingPredictionResult + */ +class OccupancyCountingPredictionResult extends \Google\Protobuf\Internal\Message +{ + /** + * Current timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp current_time = 1; + */ + protected $current_time = null; + /** + * A list of identified boxes. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + */ + private $identified_boxes; + /** + * Detection statistics. + * + * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; + */ + protected $stats = null; + /** + * Track related information. All the tracks that are live at this timestamp. + * It only exists if tracking is enabled. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + */ + private $track_info; + /** + * Dwell time related information. All the tracks that are live in a given + * zone with a start and end dwell time timestamp + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + */ + private $dwell_time_info; + /** + * The presentation timestamp of the frame. + * + * Generated from protobuf field optional int64 pts = 6; + */ + protected $pts = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $current_time + * Current timestamp. + * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\IdentifiedBox[] $identified_boxes + * A list of identified boxes. + * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats $stats + * Detection statistics. + * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\TrackInfo[] $track_info + * Track related information. All the tracks that are live at this timestamp. + * It only exists if tracking is enabled. + * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\DwellTimeInfo[] $dwell_time_info + * Dwell time related information. All the tracks that are live in a given + * zone with a start and end dwell time timestamp + * @type int|string $pts + * The presentation timestamp of the frame. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * Current timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp current_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCurrentTime() + { + return $this->current_time; + } + + public function hasCurrentTime() + { + return isset($this->current_time); + } + + public function clearCurrentTime() + { + unset($this->current_time); + } + + /** + * Current timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp current_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCurrentTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->current_time = $var; + + return $this; + } + + /** + * A list of identified boxes. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\IdentifiedBox> + */ + public function getIdentifiedBoxes() + { + return $this->identified_boxes; + } + + /** + * A list of identified boxes. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; + * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\IdentifiedBox[] $var + * @return $this + */ + public function setIdentifiedBoxes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\IdentifiedBox::class); + $this->identified_boxes = $arr; + + return $this; + } + + /** + * Detection statistics. + * + * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; + * @return \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats|null + */ + public function getStats() + { + return $this->stats; + } + + public function hasStats() + { + return isset($this->stats); + } + + public function clearStats() + { + unset($this->stats); + } + + /** + * Detection statistics. + * + * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; + * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats $var + * @return $this + */ + public function setStats($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats::class); + $this->stats = $var; + + return $this; + } + + /** + * Track related information. All the tracks that are live at this timestamp. + * It only exists if tracking is enabled. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\TrackInfo> + */ + public function getTrackInfo() + { + return $this->track_info; + } + + /** + * Track related information. All the tracks that are live at this timestamp. + * It only exists if tracking is enabled. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; + * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\TrackInfo[] $var + * @return $this + */ + public function setTrackInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\TrackInfo::class); + $this->track_info = $arr; + + return $this; + } + + /** + * Dwell time related information. All the tracks that are live in a given + * zone with a start and end dwell time timestamp + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\DwellTimeInfo> + */ + public function getDwellTimeInfo() + { + return $this->dwell_time_info; + } + + /** + * Dwell time related information. All the tracks that are live in a given + * zone with a start and end dwell time timestamp + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; + * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\DwellTimeInfo[] $var + * @return $this + */ + public function setDwellTimeInfo($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\DwellTimeInfo::class); + $this->dwell_time_info = $arr; + + return $this; + } + + /** + * The presentation timestamp of the frame. + * + * Generated from protobuf field optional int64 pts = 6; + * @return int|string + */ + public function getPts() + { + return isset($this->pts) ? $this->pts : 0; + } + + public function hasPts() + { + return isset($this->pts); + } + + public function clearPts() + { + unset($this->pts); + } + + /** + * The presentation timestamp of the frame. + * + * Generated from protobuf field optional int64 pts = 6; + * @param int|string $var + * @return $this + */ + public function setPts($var) + { + GPBUtil::checkInt64($var); + $this->pts = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/DwellTimeInfo.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/DwellTimeInfo.php new file mode 100644 index 000000000000..be94ecca45e0 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/DwellTimeInfo.php @@ -0,0 +1,189 @@ +google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo + */ +class DwellTimeInfo extends \Google\Protobuf\Internal\Message +{ + /** + * An unique id to identify a track. It should be consistent across frames. + * + * Generated from protobuf field string track_id = 1; + */ + protected $track_id = ''; + /** + * The unique id for the zone in which the object is dwelling/waiting. + * + * Generated from protobuf field string zone_id = 2; + */ + protected $zone_id = ''; + /** + * The beginning time when a dwelling object has been identified in a zone. + * + * Generated from protobuf field .google.protobuf.Timestamp dwell_start_time = 3; + */ + protected $dwell_start_time = null; + /** + * The end time when a dwelling object has exited in a zone. + * + * Generated from protobuf field .google.protobuf.Timestamp dwell_end_time = 4; + */ + protected $dwell_end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $track_id + * An unique id to identify a track. It should be consistent across frames. + * @type string $zone_id + * The unique id for the zone in which the object is dwelling/waiting. + * @type \Google\Protobuf\Timestamp $dwell_start_time + * The beginning time when a dwelling object has been identified in a zone. + * @type \Google\Protobuf\Timestamp $dwell_end_time + * The end time when a dwelling object has exited in a zone. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * An unique id to identify a track. It should be consistent across frames. + * + * Generated from protobuf field string track_id = 1; + * @return string + */ + public function getTrackId() + { + return $this->track_id; + } + + /** + * An unique id to identify a track. It should be consistent across frames. + * + * Generated from protobuf field string track_id = 1; + * @param string $var + * @return $this + */ + public function setTrackId($var) + { + GPBUtil::checkString($var, True); + $this->track_id = $var; + + return $this; + } + + /** + * The unique id for the zone in which the object is dwelling/waiting. + * + * Generated from protobuf field string zone_id = 2; + * @return string + */ + public function getZoneId() + { + return $this->zone_id; + } + + /** + * The unique id for the zone in which the object is dwelling/waiting. + * + * Generated from protobuf field string zone_id = 2; + * @param string $var + * @return $this + */ + public function setZoneId($var) + { + GPBUtil::checkString($var, True); + $this->zone_id = $var; + + return $this; + } + + /** + * The beginning time when a dwelling object has been identified in a zone. + * + * Generated from protobuf field .google.protobuf.Timestamp dwell_start_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDwellStartTime() + { + return $this->dwell_start_time; + } + + public function hasDwellStartTime() + { + return isset($this->dwell_start_time); + } + + public function clearDwellStartTime() + { + unset($this->dwell_start_time); + } + + /** + * The beginning time when a dwelling object has been identified in a zone. + * + * Generated from protobuf field .google.protobuf.Timestamp dwell_start_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDwellStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->dwell_start_time = $var; + + return $this; + } + + /** + * The end time when a dwelling object has exited in a zone. + * + * Generated from protobuf field .google.protobuf.Timestamp dwell_end_time = 4; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDwellEndTime() + { + return $this->dwell_end_time; + } + + public function hasDwellEndTime() + { + return isset($this->dwell_end_time); + } + + public function clearDwellEndTime() + { + unset($this->dwell_end_time); + } + + /** + * The end time when a dwelling object has exited in a zone. + * + * Generated from protobuf field .google.protobuf.Timestamp dwell_end_time = 4; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDwellEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->dwell_end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Entity.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Entity.php new file mode 100644 index 000000000000..c60f5782ee8c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Entity.php @@ -0,0 +1,101 @@ +google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity + */ +class Entity extends \Google\Protobuf\Internal\Message +{ + /** + * Label id. + * + * Generated from protobuf field int64 label_id = 1; + */ + protected $label_id = 0; + /** + * Human readable string of the label. + * + * Generated from protobuf field string label_string = 2; + */ + protected $label_string = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $label_id + * Label id. + * @type string $label_string + * Human readable string of the label. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * Label id. + * + * Generated from protobuf field int64 label_id = 1; + * @return int|string + */ + public function getLabelId() + { + return $this->label_id; + } + + /** + * Label id. + * + * Generated from protobuf field int64 label_id = 1; + * @param int|string $var + * @return $this + */ + public function setLabelId($var) + { + GPBUtil::checkInt64($var); + $this->label_id = $var; + + return $this; + } + + /** + * Human readable string of the label. + * + * Generated from protobuf field string label_string = 2; + * @return string + */ + public function getLabelString() + { + return $this->label_string; + } + + /** + * Human readable string of the label. + * + * Generated from protobuf field string label_string = 2; + * @param string $var + * @return $this + */ + public function setLabelString($var) + { + GPBUtil::checkString($var, True); + $this->label_string = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/IdentifiedBox.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/IdentifiedBox.php new file mode 100644 index 000000000000..98bb80e6de9c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/IdentifiedBox.php @@ -0,0 +1,227 @@ +google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox + */ +class IdentifiedBox extends \Google\Protobuf\Internal\Message +{ + /** + * An unique id for this box. + * + * Generated from protobuf field int64 box_id = 1; + */ + protected $box_id = 0; + /** + * Bounding Box in the normalized coordinates. + * + * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + */ + protected $normalized_bounding_box = null; + /** + * Confidence score associated with this box. + * + * Generated from protobuf field float score = 3; + */ + protected $score = 0.0; + /** + * Entity of this box. + * + * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; + */ + protected $entity = null; + /** + * An unique id to identify a track. It should be consistent across frames. + * It only exists if tracking is enabled. + * + * Generated from protobuf field int64 track_id = 5; + */ + protected $track_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $box_id + * An unique id for this box. + * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\IdentifiedBox\NormalizedBoundingBox $normalized_bounding_box + * Bounding Box in the normalized coordinates. + * @type float $score + * Confidence score associated with this box. + * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Entity $entity + * Entity of this box. + * @type int|string $track_id + * An unique id to identify a track. It should be consistent across frames. + * It only exists if tracking is enabled. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * An unique id for this box. + * + * Generated from protobuf field int64 box_id = 1; + * @return int|string + */ + public function getBoxId() + { + return $this->box_id; + } + + /** + * An unique id for this box. + * + * Generated from protobuf field int64 box_id = 1; + * @param int|string $var + * @return $this + */ + public function setBoxId($var) + { + GPBUtil::checkInt64($var); + $this->box_id = $var; + + return $this; + } + + /** + * Bounding Box in the normalized coordinates. + * + * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * @return \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\IdentifiedBox\NormalizedBoundingBox|null + */ + public function getNormalizedBoundingBox() + { + return $this->normalized_bounding_box; + } + + public function hasNormalizedBoundingBox() + { + return isset($this->normalized_bounding_box); + } + + public function clearNormalizedBoundingBox() + { + unset($this->normalized_bounding_box); + } + + /** + * Bounding Box in the normalized coordinates. + * + * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; + * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\IdentifiedBox\NormalizedBoundingBox $var + * @return $this + */ + public function setNormalizedBoundingBox($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\IdentifiedBox\NormalizedBoundingBox::class); + $this->normalized_bounding_box = $var; + + return $this; + } + + /** + * Confidence score associated with this box. + * + * Generated from protobuf field float score = 3; + * @return float + */ + public function getScore() + { + return $this->score; + } + + /** + * Confidence score associated with this box. + * + * Generated from protobuf field float score = 3; + * @param float $var + * @return $this + */ + public function setScore($var) + { + GPBUtil::checkFloat($var); + $this->score = $var; + + return $this; + } + + /** + * Entity of this box. + * + * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; + * @return \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Entity|null + */ + public function getEntity() + { + return $this->entity; + } + + public function hasEntity() + { + return isset($this->entity); + } + + public function clearEntity() + { + unset($this->entity); + } + + /** + * Entity of this box. + * + * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; + * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Entity $var + * @return $this + */ + public function setEntity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Entity::class); + $this->entity = $var; + + return $this; + } + + /** + * An unique id to identify a track. It should be consistent across frames. + * It only exists if tracking is enabled. + * + * Generated from protobuf field int64 track_id = 5; + * @return int|string + */ + public function getTrackId() + { + return $this->track_id; + } + + /** + * An unique id to identify a track. It should be consistent across frames. + * It only exists if tracking is enabled. + * + * Generated from protobuf field int64 track_id = 5; + * @param int|string $var + * @return $this + */ + public function setTrackId($var) + { + GPBUtil::checkInt64($var); + $this->track_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/IdentifiedBox/NormalizedBoundingBox.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/IdentifiedBox/NormalizedBoundingBox.php new file mode 100644 index 000000000000..c0bf087d4415 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/IdentifiedBox/NormalizedBoundingBox.php @@ -0,0 +1,169 @@ +google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox + */ +class NormalizedBoundingBox extends \Google\Protobuf\Internal\Message +{ + /** + * Min in x coordinate. + * + * Generated from protobuf field float xmin = 1; + */ + protected $xmin = 0.0; + /** + * Min in y coordinate. + * + * Generated from protobuf field float ymin = 2; + */ + protected $ymin = 0.0; + /** + * Width of the bounding box. + * + * Generated from protobuf field float width = 3; + */ + protected $width = 0.0; + /** + * Height of the bounding box. + * + * Generated from protobuf field float height = 4; + */ + protected $height = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $xmin + * Min in x coordinate. + * @type float $ymin + * Min in y coordinate. + * @type float $width + * Width of the bounding box. + * @type float $height + * Height of the bounding box. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * Min in x coordinate. + * + * Generated from protobuf field float xmin = 1; + * @return float + */ + public function getXmin() + { + return $this->xmin; + } + + /** + * Min in x coordinate. + * + * Generated from protobuf field float xmin = 1; + * @param float $var + * @return $this + */ + public function setXmin($var) + { + GPBUtil::checkFloat($var); + $this->xmin = $var; + + return $this; + } + + /** + * Min in y coordinate. + * + * Generated from protobuf field float ymin = 2; + * @return float + */ + public function getYmin() + { + return $this->ymin; + } + + /** + * Min in y coordinate. + * + * Generated from protobuf field float ymin = 2; + * @param float $var + * @return $this + */ + public function setYmin($var) + { + GPBUtil::checkFloat($var); + $this->ymin = $var; + + return $this; + } + + /** + * Width of the bounding box. + * + * Generated from protobuf field float width = 3; + * @return float + */ + public function getWidth() + { + return $this->width; + } + + /** + * Width of the bounding box. + * + * Generated from protobuf field float width = 3; + * @param float $var + * @return $this + */ + public function setWidth($var) + { + GPBUtil::checkFloat($var); + $this->width = $var; + + return $this; + } + + /** + * Height of the bounding box. + * + * Generated from protobuf field float height = 4; + * @return float + */ + public function getHeight() + { + return $this->height; + } + + /** + * Height of the bounding box. + * + * Generated from protobuf field float height = 4; + * @param float $var + * @return $this + */ + public function setHeight($var) + { + GPBUtil::checkFloat($var); + $this->height = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats.php new file mode 100644 index 000000000000..4f80addc012b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats.php @@ -0,0 +1,135 @@ +google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats + */ +class Stats extends \Google\Protobuf\Internal\Message +{ + /** + * Counts of the full frame. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + */ + private $full_frame_count; + /** + * Crossing line counts. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + */ + private $crossing_line_counts; + /** + * Active zone counts. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + */ + private $active_zone_counts; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount[] $full_frame_count + * Counts of the full frame. + * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\CrossingLineCount[] $crossing_line_counts + * Crossing line counts. + * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ActiveZoneCount[] $active_zone_counts + * Active zone counts. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * Counts of the full frame. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount> + */ + public function getFullFrameCount() + { + return $this->full_frame_count; + } + + /** + * Counts of the full frame. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; + * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount[] $var + * @return $this + */ + public function setFullFrameCount($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount::class); + $this->full_frame_count = $arr; + + return $this; + } + + /** + * Crossing line counts. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\CrossingLineCount> + */ + public function getCrossingLineCounts() + { + return $this->crossing_line_counts; + } + + /** + * Crossing line counts. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; + * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\CrossingLineCount[] $var + * @return $this + */ + public function setCrossingLineCounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\CrossingLineCount::class); + $this->crossing_line_counts = $arr; + + return $this; + } + + /** + * Active zone counts. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ActiveZoneCount> + */ + public function getActiveZoneCounts() + { + return $this->active_zone_counts; + } + + /** + * Active zone counts. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; + * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ActiveZoneCount[] $var + * @return $this + */ + public function setActiveZoneCounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ActiveZoneCount::class); + $this->active_zone_counts = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/AccumulatedObjectCount.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/AccumulatedObjectCount.php new file mode 100644 index 000000000000..99a0fe51c4b3 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/AccumulatedObjectCount.php @@ -0,0 +1,122 @@ +google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount + */ +class AccumulatedObjectCount extends \Google\Protobuf\Internal\Message +{ + /** + * The start time of the accumulated count. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The object count for the accumulated count. + * + * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; + */ + protected $object_count = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The start time of the accumulated count. + * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount $object_count + * The object count for the accumulated count. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * The start time of the accumulated count. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The start time of the accumulated count. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The object count for the accumulated count. + * + * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; + * @return \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount|null + */ + public function getObjectCount() + { + return $this->object_count; + } + + public function hasObjectCount() + { + return isset($this->object_count); + } + + public function clearObjectCount() + { + unset($this->object_count); + } + + /** + * The object count for the accumulated count. + * + * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; + * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount $var + * @return $this + */ + public function setObjectCount($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount::class); + $this->object_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/ActiveZoneCount.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/ActiveZoneCount.php new file mode 100644 index 000000000000..32b6b9996576 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/ActiveZoneCount.php @@ -0,0 +1,111 @@ +google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount + */ +class ActiveZoneCount extends \Google\Protobuf\Internal\Message +{ + /** + * Active zone annotation from the user. + * + * Generated from protobuf field .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + protected $annotation = null; + /** + * Counts in the zone. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + */ + private $counts; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\StreamAnnotation $annotation + * Active zone annotation from the user. + * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount[] $counts + * Counts in the zone. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * Active zone annotation from the user. + * + * Generated from protobuf field .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + * @return \Google\Cloud\VisionAI\V1\StreamAnnotation|null + */ + public function getAnnotation() + { + return $this->annotation; + } + + public function hasAnnotation() + { + return isset($this->annotation); + } + + public function clearAnnotation() + { + unset($this->annotation); + } + + /** + * Active zone annotation from the user. + * + * Generated from protobuf field .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + * @param \Google\Cloud\VisionAI\V1\StreamAnnotation $var + * @return $this + */ + public function setAnnotation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\StreamAnnotation::class); + $this->annotation = $var; + + return $this; + } + + /** + * Counts in the zone. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount> + */ + public function getCounts() + { + return $this->counts; + } + + /** + * Counts in the zone. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; + * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount[] $var + * @return $this + */ + public function setCounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount::class); + $this->counts = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/CrossingLineCount.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/CrossingLineCount.php new file mode 100644 index 000000000000..59299acf3847 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/CrossingLineCount.php @@ -0,0 +1,213 @@ +google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount + */ +class CrossingLineCount extends \Google\Protobuf\Internal\Message +{ + /** + * Line annotation from the user. + * + * Generated from protobuf field .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + */ + protected $annotation = null; + /** + * The direction that follows the right hand rule. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + */ + private $positive_direction_counts; + /** + * The direction that is opposite to the right hand rule. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + */ + private $negative_direction_counts; + /** + * The accumulated positive count. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + */ + private $accumulated_positive_direction_counts; + /** + * The accumulated negative count. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + */ + private $accumulated_negative_direction_counts; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\StreamAnnotation $annotation + * Line annotation from the user. + * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount[] $positive_direction_counts + * The direction that follows the right hand rule. + * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount[] $negative_direction_counts + * The direction that is opposite to the right hand rule. + * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\AccumulatedObjectCount[] $accumulated_positive_direction_counts + * The accumulated positive count. + * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\AccumulatedObjectCount[] $accumulated_negative_direction_counts + * The accumulated negative count. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * Line annotation from the user. + * + * Generated from protobuf field .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + * @return \Google\Cloud\VisionAI\V1\StreamAnnotation|null + */ + public function getAnnotation() + { + return $this->annotation; + } + + public function hasAnnotation() + { + return isset($this->annotation); + } + + public function clearAnnotation() + { + unset($this->annotation); + } + + /** + * Line annotation from the user. + * + * Generated from protobuf field .google.cloud.visionai.v1.StreamAnnotation annotation = 1; + * @param \Google\Cloud\VisionAI\V1\StreamAnnotation $var + * @return $this + */ + public function setAnnotation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\StreamAnnotation::class); + $this->annotation = $var; + + return $this; + } + + /** + * The direction that follows the right hand rule. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount> + */ + public function getPositiveDirectionCounts() + { + return $this->positive_direction_counts; + } + + /** + * The direction that follows the right hand rule. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; + * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount[] $var + * @return $this + */ + public function setPositiveDirectionCounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount::class); + $this->positive_direction_counts = $arr; + + return $this; + } + + /** + * The direction that is opposite to the right hand rule. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount> + */ + public function getNegativeDirectionCounts() + { + return $this->negative_direction_counts; + } + + /** + * The direction that is opposite to the right hand rule. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; + * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount[] $var + * @return $this + */ + public function setNegativeDirectionCounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount::class); + $this->negative_direction_counts = $arr; + + return $this; + } + + /** + * The accumulated positive count. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\AccumulatedObjectCount> + */ + public function getAccumulatedPositiveDirectionCounts() + { + return $this->accumulated_positive_direction_counts; + } + + /** + * The accumulated positive count. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; + * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\AccumulatedObjectCount[] $var + * @return $this + */ + public function setAccumulatedPositiveDirectionCounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\AccumulatedObjectCount::class); + $this->accumulated_positive_direction_counts = $arr; + + return $this; + } + + /** + * The accumulated negative count. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\AccumulatedObjectCount> + */ + public function getAccumulatedNegativeDirectionCounts() + { + return $this->accumulated_negative_direction_counts; + } + + /** + * The accumulated negative count. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; + * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\AccumulatedObjectCount[] $var + * @return $this + */ + public function setAccumulatedNegativeDirectionCounts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\AccumulatedObjectCount::class); + $this->accumulated_negative_direction_counts = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/ObjectCount.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/ObjectCount.php new file mode 100644 index 000000000000..c5547eb02d7b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/ObjectCount.php @@ -0,0 +1,112 @@ +google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount + */ +class ObjectCount extends \Google\Protobuf\Internal\Message +{ + /** + * Entity of this object. + * + * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; + */ + protected $entity = null; + /** + * Count of the object. + * + * Generated from protobuf field int32 count = 2; + */ + protected $count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Entity $entity + * Entity of this object. + * @type int $count + * Count of the object. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * Entity of this object. + * + * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; + * @return \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Entity|null + */ + public function getEntity() + { + return $this->entity; + } + + public function hasEntity() + { + return isset($this->entity); + } + + public function clearEntity() + { + unset($this->entity); + } + + /** + * Entity of this object. + * + * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; + * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Entity $var + * @return $this + */ + public function setEntity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Entity::class); + $this->entity = $var; + + return $this; + } + + /** + * Count of the object. + * + * Generated from protobuf field int32 count = 2; + * @return int + */ + public function getCount() + { + return $this->count; + } + + /** + * Count of the object. + * + * Generated from protobuf field int32 count = 2; + * @param int $var + * @return $this + */ + public function setCount($var) + { + GPBUtil::checkInt32($var); + $this->count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/TrackInfo.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/TrackInfo.php new file mode 100644 index 000000000000..f643ed31937e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/TrackInfo.php @@ -0,0 +1,111 @@ +google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo + */ +class TrackInfo extends \Google\Protobuf\Internal\Message +{ + /** + * An unique id to identify a track. It should be consistent across frames. + * + * Generated from protobuf field string track_id = 1; + */ + protected $track_id = ''; + /** + * Start timestamp of this track. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + */ + protected $start_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $track_id + * An unique id to identify a track. It should be consistent across frames. + * @type \Google\Protobuf\Timestamp $start_time + * Start timestamp of this track. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * An unique id to identify a track. It should be consistent across frames. + * + * Generated from protobuf field string track_id = 1; + * @return string + */ + public function getTrackId() + { + return $this->track_id; + } + + /** + * An unique id to identify a track. It should be consistent across frames. + * + * Generated from protobuf field string track_id = 1; + * @param string $var + * @return $this + */ + public function setTrackId($var) + { + GPBUtil::checkString($var, True); + $this->track_id = $var; + + return $this; + } + + /** + * Start timestamp of this track. + * + * 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); + } + + /** + * Start timestamp of this track. + * + * 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; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperationMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperationMetadata.php new file mode 100644 index 000000000000..7e18c483aba4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperationMetadata.php @@ -0,0 +1,307 @@ +google.cloud.visionai.v1.OperationMetadata + */ +class OperationMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $target = ''; + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $verb = ''; + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $status_message = ''; + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $requested_cancellation = false; + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $api_version = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time the operation was created. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. The time the operation finished running. + * @type string $target + * Output only. Server-defined resource path for the target of the operation. + * @type string $verb + * Output only. Name of the verb executed by the operation. + * @type string $status_message + * Output only. Human-readable status of the operation, if any. + * @type bool $requested_cancellation + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * @type string $api_version + * Output only. API version used to start the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Common::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The time the operation was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. The time the operation finished running. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.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. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getTarget() + { + return $this->target; + } + + /** + * Output only. Server-defined resource path for the target of the operation. + * + * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setTarget($var) + { + GPBUtil::checkString($var, True); + $this->target = $var; + + return $this; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getVerb() + { + return $this->verb; + } + + /** + * Output only. Name of the verb executed by the operation. + * + * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setVerb($var) + { + GPBUtil::checkString($var, True); + $this->verb = $var; + + return $this; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getStatusMessage() + { + return $this->status_message; + } + + /** + * Output only. Human-readable status of the operation, if any. + * + * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setStatusMessage($var) + { + GPBUtil::checkString($var, True); + $this->status_message = $var; + + return $this; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getRequestedCancellation() + { + return $this->requested_cancellation; + } + + /** + * Output only. Identifies whether the user has requested cancellation + * of the operation. Operations that have successfully been cancelled + * have [Operation.error][] value with a + * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to + * `Code.CANCELLED`. + * + * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setRequestedCancellation($var) + { + GPBUtil::checkBool($var); + $this->requested_cancellation = $var; + + return $this; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getApiVersion() + { + return $this->api_version; + } + + /** + * Output only. API version used to start the operation. + * + * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setApiVersion($var) + { + GPBUtil::checkString($var, True); + $this->api_version = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Operator.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Operator.php new file mode 100644 index 000000000000..5b73591bb34f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Operator.php @@ -0,0 +1,267 @@ +google.cloud.visionai.v1.Operator + */ +class Operator extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the resource. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * The definition of the operator. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; + */ + protected $operator_definition = null; + /** + * The link to the docker image of the operator. + * + * Generated from protobuf field string docker_image = 6; + */ + protected $docker_image = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The create timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update timestamp. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs. + * @type \Google\Cloud\VisionAI\V1\OperatorDefinition $operator_definition + * The definition of the operator. + * @type string $docker_image + * The link to the docker image of the operator. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaResources::initOnce(); + parent::__construct($data); + } + + /** + * Name of the resource. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the resource. + * + * 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 create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * The definition of the operator. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; + * @return \Google\Cloud\VisionAI\V1\OperatorDefinition|null + */ + public function getOperatorDefinition() + { + return $this->operator_definition; + } + + public function hasOperatorDefinition() + { + return isset($this->operator_definition); + } + + public function clearOperatorDefinition() + { + unset($this->operator_definition); + } + + /** + * The definition of the operator. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; + * @param \Google\Cloud\VisionAI\V1\OperatorDefinition $var + * @return $this + */ + public function setOperatorDefinition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperatorDefinition::class); + $this->operator_definition = $var; + + return $this; + } + + /** + * The link to the docker image of the operator. + * + * Generated from protobuf field string docker_image = 6; + * @return string + */ + public function getDockerImage() + { + return $this->docker_image; + } + + /** + * The link to the docker image of the operator. + * + * Generated from protobuf field string docker_image = 6; + * @param string $var + * @return $this + */ + public function setDockerImage($var) + { + GPBUtil::checkString($var, True); + $this->docker_image = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition.php new file mode 100644 index 000000000000..23faac7707c2 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition.php @@ -0,0 +1,291 @@ +google.cloud.visionai.v1.OperatorDefinition + */ +class OperatorDefinition extends \Google\Protobuf\Internal\Message +{ + /** + * The name of this operator. + * Tentatively [A-Z][a-zA-Z0-9]*, e.g., BboxCounter, PetDetector, + * PetDetector1. + * + * Generated from protobuf field string operator = 1; + */ + protected $operator = ''; + /** + * Declares input arguments. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + */ + private $input_args; + /** + * Declares output arguments. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + */ + private $output_args; + /** + * Declares the attributes. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + */ + private $attributes; + /** + * The resources for running the operator. + * + * Generated from protobuf field .google.cloud.visionai.v1.ResourceSpecification resources = 5; + */ + protected $resources = null; + /** + * Short description of the operator. + * + * Generated from protobuf field string short_description = 6; + */ + protected $short_description = ''; + /** + * Full description of the operator. + * + * Generated from protobuf field string description = 7; + */ + protected $description = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operator + * The name of this operator. + * Tentatively [A-Z][a-zA-Z0-9]*, e.g., BboxCounter, PetDetector, + * PetDetector1. + * @type \Google\Cloud\VisionAI\V1\OperatorDefinition\ArgumentDefinition[] $input_args + * Declares input arguments. + * @type \Google\Cloud\VisionAI\V1\OperatorDefinition\ArgumentDefinition[] $output_args + * Declares output arguments. + * @type \Google\Cloud\VisionAI\V1\OperatorDefinition\AttributeDefinition[] $attributes + * Declares the attributes. + * @type \Google\Cloud\VisionAI\V1\ResourceSpecification $resources + * The resources for running the operator. + * @type string $short_description + * Short description of the operator. + * @type string $description + * Full description of the operator. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); + parent::__construct($data); + } + + /** + * The name of this operator. + * Tentatively [A-Z][a-zA-Z0-9]*, e.g., BboxCounter, PetDetector, + * PetDetector1. + * + * Generated from protobuf field string operator = 1; + * @return string + */ + public function getOperator() + { + return $this->operator; + } + + /** + * The name of this operator. + * Tentatively [A-Z][a-zA-Z0-9]*, e.g., BboxCounter, PetDetector, + * PetDetector1. + * + * Generated from protobuf field string operator = 1; + * @param string $var + * @return $this + */ + public function setOperator($var) + { + GPBUtil::checkString($var, True); + $this->operator = $var; + + return $this; + } + + /** + * Declares input arguments. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\OperatorDefinition\ArgumentDefinition> + */ + public function getInputArgs() + { + return $this->input_args; + } + + /** + * Declares input arguments. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; + * @param \Google\Cloud\VisionAI\V1\OperatorDefinition\ArgumentDefinition[] $var + * @return $this + */ + public function setInputArgs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OperatorDefinition\ArgumentDefinition::class); + $this->input_args = $arr; + + return $this; + } + + /** + * Declares output arguments. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\OperatorDefinition\ArgumentDefinition> + */ + public function getOutputArgs() + { + return $this->output_args; + } + + /** + * Declares output arguments. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; + * @param \Google\Cloud\VisionAI\V1\OperatorDefinition\ArgumentDefinition[] $var + * @return $this + */ + public function setOutputArgs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OperatorDefinition\ArgumentDefinition::class); + $this->output_args = $arr; + + return $this; + } + + /** + * Declares the attributes. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\OperatorDefinition\AttributeDefinition> + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Declares the attributes. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; + * @param \Google\Cloud\VisionAI\V1\OperatorDefinition\AttributeDefinition[] $var + * @return $this + */ + public function setAttributes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OperatorDefinition\AttributeDefinition::class); + $this->attributes = $arr; + + return $this; + } + + /** + * The resources for running the operator. + * + * Generated from protobuf field .google.cloud.visionai.v1.ResourceSpecification resources = 5; + * @return \Google\Cloud\VisionAI\V1\ResourceSpecification|null + */ + public function getResources() + { + return $this->resources; + } + + public function hasResources() + { + return isset($this->resources); + } + + public function clearResources() + { + unset($this->resources); + } + + /** + * The resources for running the operator. + * + * Generated from protobuf field .google.cloud.visionai.v1.ResourceSpecification resources = 5; + * @param \Google\Cloud\VisionAI\V1\ResourceSpecification $var + * @return $this + */ + public function setResources($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ResourceSpecification::class); + $this->resources = $var; + + return $this; + } + + /** + * Short description of the operator. + * + * Generated from protobuf field string short_description = 6; + * @return string + */ + public function getShortDescription() + { + return $this->short_description; + } + + /** + * Short description of the operator. + * + * Generated from protobuf field string short_description = 6; + * @param string $var + * @return $this + */ + public function setShortDescription($var) + { + GPBUtil::checkString($var, True); + $this->short_description = $var; + + return $this; + } + + /** + * Full description of the operator. + * + * Generated from protobuf field string description = 7; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Full description of the operator. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition/ArgumentDefinition.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition/ArgumentDefinition.php new file mode 100644 index 000000000000..349c5ff5b874 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition/ArgumentDefinition.php @@ -0,0 +1,114 @@ +google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition + */ +class ArgumentDefinition extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the argument. + * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., video, audio, + * high_fps_frame. + * + * Generated from protobuf field string argument = 1; + */ + protected $argument = ''; + /** + * The data type of the argument. + * This should match the textual representation of a stream/Packet type. + * + * Generated from protobuf field string type = 2; + */ + protected $type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $argument + * The name of the argument. + * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., video, audio, + * high_fps_frame. + * @type string $type + * The data type of the argument. + * This should match the textual representation of a stream/Packet type. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); + parent::__construct($data); + } + + /** + * The name of the argument. + * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., video, audio, + * high_fps_frame. + * + * Generated from protobuf field string argument = 1; + * @return string + */ + public function getArgument() + { + return $this->argument; + } + + /** + * The name of the argument. + * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., video, audio, + * high_fps_frame. + * + * Generated from protobuf field string argument = 1; + * @param string $var + * @return $this + */ + public function setArgument($var) + { + GPBUtil::checkString($var, True); + $this->argument = $var; + + return $this; + } + + /** + * The data type of the argument. + * This should match the textual representation of a stream/Packet type. + * + * Generated from protobuf field string type = 2; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The data type of the argument. + * This should match the textual representation of a stream/Packet type. + * + * Generated from protobuf field string type = 2; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition/AttributeDefinition.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition/AttributeDefinition.php new file mode 100644 index 000000000000..a5ee0aa08cbd --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition/AttributeDefinition.php @@ -0,0 +1,157 @@ +google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition + */ +class AttributeDefinition extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the attribute. + * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., max_frames_per_video, + * resize_height. + * + * Generated from protobuf field string attribute = 1; + */ + protected $attribute = ''; + /** + * The type of this attribute. + * See attribute_value.proto for possibilities. + * + * Generated from protobuf field string type = 2; + */ + protected $type = ''; + /** + * The default value for the attribute. + * + * Generated from protobuf field .google.cloud.visionai.v1.AttributeValue default_value = 3; + */ + protected $default_value = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $attribute + * The name of the attribute. + * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., max_frames_per_video, + * resize_height. + * @type string $type + * The type of this attribute. + * See attribute_value.proto for possibilities. + * @type \Google\Cloud\VisionAI\V1\AttributeValue $default_value + * The default value for the attribute. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); + parent::__construct($data); + } + + /** + * The name of the attribute. + * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., max_frames_per_video, + * resize_height. + * + * Generated from protobuf field string attribute = 1; + * @return string + */ + public function getAttribute() + { + return $this->attribute; + } + + /** + * The name of the attribute. + * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., max_frames_per_video, + * resize_height. + * + * Generated from protobuf field string attribute = 1; + * @param string $var + * @return $this + */ + public function setAttribute($var) + { + GPBUtil::checkString($var, True); + $this->attribute = $var; + + return $this; + } + + /** + * The type of this attribute. + * See attribute_value.proto for possibilities. + * + * Generated from protobuf field string type = 2; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The type of this attribute. + * See attribute_value.proto for possibilities. + * + * Generated from protobuf field string type = 2; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * The default value for the attribute. + * + * Generated from protobuf field .google.cloud.visionai.v1.AttributeValue default_value = 3; + * @return \Google\Cloud\VisionAI\V1\AttributeValue|null + */ + public function getDefaultValue() + { + return $this->default_value; + } + + public function hasDefaultValue() + { + return isset($this->default_value); + } + + public function clearDefaultValue() + { + unset($this->default_value); + } + + /** + * The default value for the attribute. + * + * Generated from protobuf field .google.cloud.visionai.v1.AttributeValue default_value = 3; + * @param \Google\Cloud\VisionAI\V1\AttributeValue $var + * @return $this + */ + public function setDefaultValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AttributeValue::class); + $this->default_value = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorQuery.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorQuery.php new file mode 100644 index 000000000000..5a2ad119813e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorQuery.php @@ -0,0 +1,135 @@ +google.cloud.visionai.v1.OperatorQuery + */ +class OperatorQuery extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The canonical Name of the operator. e.g. OccupancyCounting. + * + * Generated from protobuf field string operator = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $operator = ''; + /** + * Optional. Tag of the operator. + * + * Generated from protobuf field string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $tag = ''; + /** + * Optional. Registry of the operator. + * + * Generated from protobuf field .google.cloud.visionai.v1.Registry registry = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $registry = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $operator + * Required. The canonical Name of the operator. e.g. OccupancyCounting. + * @type string $tag + * Optional. Tag of the operator. + * @type int $registry + * Optional. Registry of the operator. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The canonical Name of the operator. e.g. OccupancyCounting. + * + * Generated from protobuf field string operator = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getOperator() + { + return $this->operator; + } + + /** + * Required. The canonical Name of the operator. e.g. OccupancyCounting. + * + * Generated from protobuf field string operator = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setOperator($var) + { + GPBUtil::checkString($var, True); + $this->operator = $var; + + return $this; + } + + /** + * Optional. Tag of the operator. + * + * Generated from protobuf field string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getTag() + { + return $this->tag; + } + + /** + * Optional. Tag of the operator. + * + * Generated from protobuf field string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setTag($var) + { + GPBUtil::checkString($var, True); + $this->tag = $var; + + return $this; + } + + /** + * Optional. Registry of the operator. + * + * Generated from protobuf field .google.cloud.visionai.v1.Registry registry = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getRegistry() + { + return $this->registry; + } + + /** + * Optional. Registry of the operator. + * + * Generated from protobuf field .google.cloud.visionai.v1.Registry registry = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setRegistry($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Registry::class); + $this->registry = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Packet.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Packet.php new file mode 100644 index 000000000000..afaf8e5c20d5 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Packet.php @@ -0,0 +1,111 @@ +google.cloud.visionai.v1.Packet + */ +class Packet extends \Google\Protobuf\Internal\Message +{ + /** + * The packet header. + * + * Generated from protobuf field .google.cloud.visionai.v1.PacketHeader header = 1; + */ + protected $header = null; + /** + * The payload of the packet. + * + * Generated from protobuf field bytes payload = 2; + */ + protected $payload = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\PacketHeader $header + * The packet header. + * @type string $payload + * The payload of the packet. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingResources::initOnce(); + parent::__construct($data); + } + + /** + * The packet header. + * + * Generated from protobuf field .google.cloud.visionai.v1.PacketHeader header = 1; + * @return \Google\Cloud\VisionAI\V1\PacketHeader|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * The packet header. + * + * Generated from protobuf field .google.cloud.visionai.v1.PacketHeader header = 1; + * @param \Google\Cloud\VisionAI\V1\PacketHeader $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PacketHeader::class); + $this->header = $var; + + return $this; + } + + /** + * The payload of the packet. + * + * Generated from protobuf field bytes payload = 2; + * @return string + */ + public function getPayload() + { + return $this->payload; + } + + /** + * The payload of the packet. + * + * Generated from protobuf field bytes payload = 2; + * @param string $var + * @return $this + */ + public function setPayload($var) + { + GPBUtil::checkString($var, False); + $this->payload = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketHeader.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketHeader.php new file mode 100644 index 000000000000..ad8c5d7fca14 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketHeader.php @@ -0,0 +1,369 @@ +google.cloud.visionai.v1.PacketHeader + */ +class PacketHeader extends \Google\Protobuf\Internal\Message +{ + /** + * Input only. The capture time of the packet. + * + * Generated from protobuf field .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $capture_time = null; + /** + * Input only. Immutable. The type of the payload. + * + * Generated from protobuf field .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $type = null; + /** + * Input only. This field is for users to attach user managed metadata. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $metadata = null; + /** + * Output only. Metadata that the server appends to each packet before sending + * it to receivers. You don't need to set a value for this field when sending + * packets. + * + * Generated from protobuf field .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $server_metadata = null; + /** + * Input only. Immutable. Metadata that the server needs to know where to + * write the packets to. It's only required for the first packet. + * + * Generated from protobuf field .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + */ + protected $series_metadata = null; + /** + * Immutable. Packet flag set. SDK will set the flag automatically. + * + * Generated from protobuf field int32 flags = 6 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $flags = 0; + /** + * Immutable. Header string for tracing across services. It should be set when + * the packet is first arrived in the stream server. + * The input format is a lowercase hex string: + * - version_id: 1 byte, currently must be zero - hex encoded (2 characters) + * - trace_id: 16 bytes (opaque blob) - hex encoded (32 characters) + * - span_id: 8 bytes (opaque blob) - hex encoded (16 characters) + * - trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2 + * characters) + * Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01" + * v trace_id span_id options + * + * Generated from protobuf field string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $trace_context = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $capture_time + * Input only. The capture time of the packet. + * @type \Google\Cloud\VisionAI\V1\PacketType $type + * Input only. Immutable. The type of the payload. + * @type \Google\Protobuf\Struct $metadata + * Input only. This field is for users to attach user managed metadata. + * @type \Google\Cloud\VisionAI\V1\ServerMetadata $server_metadata + * Output only. Metadata that the server appends to each packet before sending + * it to receivers. You don't need to set a value for this field when sending + * packets. + * @type \Google\Cloud\VisionAI\V1\SeriesMetadata $series_metadata + * Input only. Immutable. Metadata that the server needs to know where to + * write the packets to. It's only required for the first packet. + * @type int $flags + * Immutable. Packet flag set. SDK will set the flag automatically. + * @type string $trace_context + * Immutable. Header string for tracing across services. It should be set when + * the packet is first arrived in the stream server. + * The input format is a lowercase hex string: + * - version_id: 1 byte, currently must be zero - hex encoded (2 characters) + * - trace_id: 16 bytes (opaque blob) - hex encoded (32 characters) + * - span_id: 8 bytes (opaque blob) - hex encoded (16 characters) + * - trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2 + * characters) + * Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01" + * v trace_id span_id options + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingResources::initOnce(); + parent::__construct($data); + } + + /** + * Input only. The capture time of the packet. + * + * Generated from protobuf field .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCaptureTime() + { + return $this->capture_time; + } + + public function hasCaptureTime() + { + return isset($this->capture_time); + } + + public function clearCaptureTime() + { + unset($this->capture_time); + } + + /** + * Input only. The capture time of the packet. + * + * Generated from protobuf field .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCaptureTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->capture_time = $var; + + return $this; + } + + /** + * Input only. Immutable. The type of the payload. + * + * Generated from protobuf field .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\VisionAI\V1\PacketType|null + */ + public function getType() + { + return $this->type; + } + + public function hasType() + { + return isset($this->type); + } + + public function clearType() + { + unset($this->type); + } + + /** + * Input only. Immutable. The type of the payload. + * + * Generated from protobuf field .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\VisionAI\V1\PacketType $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PacketType::class); + $this->type = $var; + + return $this; + } + + /** + * Input only. This field is for users to attach user managed metadata. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Protobuf\Struct|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * Input only. This field is for users to attach user managed metadata. + * + * Generated from protobuf field .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->metadata = $var; + + return $this; + } + + /** + * Output only. Metadata that the server appends to each packet before sending + * it to receivers. You don't need to set a value for this field when sending + * packets. + * + * Generated from protobuf field .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VisionAI\V1\ServerMetadata|null + */ + public function getServerMetadata() + { + return $this->server_metadata; + } + + public function hasServerMetadata() + { + return isset($this->server_metadata); + } + + public function clearServerMetadata() + { + unset($this->server_metadata); + } + + /** + * Output only. Metadata that the server appends to each packet before sending + * it to receivers. You don't need to set a value for this field when sending + * packets. + * + * Generated from protobuf field .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VisionAI\V1\ServerMetadata $var + * @return $this + */ + public function setServerMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ServerMetadata::class); + $this->server_metadata = $var; + + return $this; + } + + /** + * Input only. Immutable. Metadata that the server needs to know where to + * write the packets to. It's only required for the first packet. + * + * Generated from protobuf field .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Cloud\VisionAI\V1\SeriesMetadata|null + */ + public function getSeriesMetadata() + { + return $this->series_metadata; + } + + public function hasSeriesMetadata() + { + return isset($this->series_metadata); + } + + public function clearSeriesMetadata() + { + unset($this->series_metadata); + } + + /** + * Input only. Immutable. Metadata that the server needs to know where to + * write the packets to. It's only required for the first packet. + * + * Generated from protobuf field .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Cloud\VisionAI\V1\SeriesMetadata $var + * @return $this + */ + public function setSeriesMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\SeriesMetadata::class); + $this->series_metadata = $var; + + return $this; + } + + /** + * Immutable. Packet flag set. SDK will set the flag automatically. + * + * Generated from protobuf field int32 flags = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @return int + */ + public function getFlags() + { + return $this->flags; + } + + /** + * Immutable. Packet flag set. SDK will set the flag automatically. + * + * Generated from protobuf field int32 flags = 6 [(.google.api.field_behavior) = IMMUTABLE]; + * @param int $var + * @return $this + */ + public function setFlags($var) + { + GPBUtil::checkInt32($var); + $this->flags = $var; + + return $this; + } + + /** + * Immutable. Header string for tracing across services. It should be set when + * the packet is first arrived in the stream server. + * The input format is a lowercase hex string: + * - version_id: 1 byte, currently must be zero - hex encoded (2 characters) + * - trace_id: 16 bytes (opaque blob) - hex encoded (32 characters) + * - span_id: 8 bytes (opaque blob) - hex encoded (16 characters) + * - trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2 + * characters) + * Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01" + * v trace_id span_id options + * + * Generated from protobuf field string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getTraceContext() + { + return $this->trace_context; + } + + /** + * Immutable. Header string for tracing across services. It should be set when + * the packet is first arrived in the stream server. + * The input format is a lowercase hex string: + * - version_id: 1 byte, currently must be zero - hex encoded (2 characters) + * - trace_id: 16 bytes (opaque blob) - hex encoded (32 characters) + * - span_id: 8 bytes (opaque blob) - hex encoded (16 characters) + * - trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2 + * characters) + * Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01" + * v trace_id span_id options + * + * Generated from protobuf field string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setTraceContext($var) + { + GPBUtil::checkString($var, True); + $this->trace_context = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketType.php new file mode 100644 index 000000000000..2bf52d3080f5 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketType.php @@ -0,0 +1,115 @@ +google.cloud.visionai.v1.PacketType + */ +class PacketType extends \Google\Protobuf\Internal\Message +{ + /** + * The type class of the packet. Its possible values are: + * "gst", "protobuf", and "string". + * + * Generated from protobuf field string type_class = 1; + */ + protected $type_class = ''; + /** + * The type descriptor. + * + * Generated from protobuf field .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; + */ + protected $type_descriptor = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $type_class + * The type class of the packet. Its possible values are: + * "gst", "protobuf", and "string". + * @type \Google\Cloud\VisionAI\V1\PacketType\TypeDescriptor $type_descriptor + * The type descriptor. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingResources::initOnce(); + parent::__construct($data); + } + + /** + * The type class of the packet. Its possible values are: + * "gst", "protobuf", and "string". + * + * Generated from protobuf field string type_class = 1; + * @return string + */ + public function getTypeClass() + { + return $this->type_class; + } + + /** + * The type class of the packet. Its possible values are: + * "gst", "protobuf", and "string". + * + * Generated from protobuf field string type_class = 1; + * @param string $var + * @return $this + */ + public function setTypeClass($var) + { + GPBUtil::checkString($var, True); + $this->type_class = $var; + + return $this; + } + + /** + * The type descriptor. + * + * Generated from protobuf field .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; + * @return \Google\Cloud\VisionAI\V1\PacketType\TypeDescriptor|null + */ + public function getTypeDescriptor() + { + return $this->type_descriptor; + } + + public function hasTypeDescriptor() + { + return isset($this->type_descriptor); + } + + public function clearTypeDescriptor() + { + unset($this->type_descriptor); + } + + /** + * The type descriptor. + * + * Generated from protobuf field .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; + * @param \Google\Cloud\VisionAI\V1\PacketType\TypeDescriptor $var + * @return $this + */ + public function setTypeDescriptor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PacketType\TypeDescriptor::class); + $this->type_descriptor = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketType/TypeDescriptor.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketType/TypeDescriptor.php new file mode 100644 index 000000000000..8e9f802853ee --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketType/TypeDescriptor.php @@ -0,0 +1,166 @@ +google.cloud.visionai.v1.PacketType.TypeDescriptor + */ +class TypeDescriptor extends \Google\Protobuf\Internal\Message +{ + /** + * The type of the packet. Its possible values is codec dependent. + * The fully qualified type name is always the concatenation of the + * value in `type_class` together with the value in `type`, separated by a + * '/'. + * Note that specific codecs can define their own type hierarchy, and so the + * type string here can in fact be separated by multiple '/'s of its own. + * Please see the open source SDK for specific codec documentation. + * + * Generated from protobuf field string type = 1; + */ + protected $type = ''; + protected $type_details; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\GstreamerBufferDescriptor $gstreamer_buffer_descriptor + * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type. + * @type \Google\Cloud\VisionAI\V1\RawImageDescriptor $raw_image_descriptor + * RawImageDescriptor is the descriptor for the raw image type. + * @type string $type + * The type of the packet. Its possible values is codec dependent. + * The fully qualified type name is always the concatenation of the + * value in `type_class` together with the value in `type`, separated by a + * '/'. + * Note that specific codecs can define their own type hierarchy, and so the + * type string here can in fact be separated by multiple '/'s of its own. + * Please see the open source SDK for specific codec documentation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingResources::initOnce(); + parent::__construct($data); + } + + /** + * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type. + * + * Generated from protobuf field .google.cloud.visionai.v1.GstreamerBufferDescriptor gstreamer_buffer_descriptor = 2; + * @return \Google\Cloud\VisionAI\V1\GstreamerBufferDescriptor|null + */ + public function getGstreamerBufferDescriptor() + { + return $this->readOneof(2); + } + + public function hasGstreamerBufferDescriptor() + { + return $this->hasOneof(2); + } + + /** + * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type. + * + * Generated from protobuf field .google.cloud.visionai.v1.GstreamerBufferDescriptor gstreamer_buffer_descriptor = 2; + * @param \Google\Cloud\VisionAI\V1\GstreamerBufferDescriptor $var + * @return $this + */ + public function setGstreamerBufferDescriptor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\GstreamerBufferDescriptor::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * RawImageDescriptor is the descriptor for the raw image type. + * + * Generated from protobuf field .google.cloud.visionai.v1.RawImageDescriptor raw_image_descriptor = 3; + * @return \Google\Cloud\VisionAI\V1\RawImageDescriptor|null + */ + public function getRawImageDescriptor() + { + return $this->readOneof(3); + } + + public function hasRawImageDescriptor() + { + return $this->hasOneof(3); + } + + /** + * RawImageDescriptor is the descriptor for the raw image type. + * + * Generated from protobuf field .google.cloud.visionai.v1.RawImageDescriptor raw_image_descriptor = 3; + * @param \Google\Cloud\VisionAI\V1\RawImageDescriptor $var + * @return $this + */ + public function setRawImageDescriptor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\RawImageDescriptor::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The type of the packet. Its possible values is codec dependent. + * The fully qualified type name is always the concatenation of the + * value in `type_class` together with the value in `type`, separated by a + * '/'. + * Note that specific codecs can define their own type hierarchy, and so the + * type string here can in fact be separated by multiple '/'s of its own. + * Please see the open source SDK for specific codec documentation. + * + * Generated from protobuf field string type = 1; + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * The type of the packet. Its possible values is codec dependent. + * The fully qualified type name is always the concatenation of the + * value in `type_class` together with the value in `type`, separated by a + * '/'. + * Note that specific codecs can define their own type hierarchy, and so the + * type string here can in fact be separated by multiple '/'s of its own. + * Please see the open source SDK for specific codec documentation. + * + * Generated from protobuf field string type = 1; + * @param string $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkString($var, True); + $this->type = $var; + + return $this; + } + + /** + * @return string + */ + public function getTypeDetails() + { + return $this->whichOneof("type_details"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition.php new file mode 100644 index 000000000000..60f40b17011f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition.php @@ -0,0 +1,166 @@ +google.cloud.visionai.v1.Partition + */ +class Partition extends \Google\Protobuf\Internal\Message +{ + /** + * Partition of asset in time. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + */ + protected $temporal_partition = null; + /** + * Partition of asset in space. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; + */ + protected $spatial_partition = null; + /** + * Partition of asset in time. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; + */ + protected $relative_temporal_partition = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $temporal_partition + * Partition of asset in time. + * @type \Google\Cloud\VisionAI\V1\Partition\SpatialPartition $spatial_partition + * Partition of asset in space. + * @type \Google\Cloud\VisionAI\V1\Partition\RelativeTemporalPartition $relative_temporal_partition + * Partition of asset in time. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Partition of asset in time. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + * @return \Google\Cloud\VisionAI\V1\Partition\TemporalPartition|null + */ + public function getTemporalPartition() + { + return $this->temporal_partition; + } + + public function hasTemporalPartition() + { + return isset($this->temporal_partition); + } + + public function clearTemporalPartition() + { + unset($this->temporal_partition); + } + + /** + * Partition of asset in time. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; + * @param \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $var + * @return $this + */ + public function setTemporalPartition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Partition\TemporalPartition::class); + $this->temporal_partition = $var; + + return $this; + } + + /** + * Partition of asset in space. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; + * @return \Google\Cloud\VisionAI\V1\Partition\SpatialPartition|null + */ + public function getSpatialPartition() + { + return $this->spatial_partition; + } + + public function hasSpatialPartition() + { + return isset($this->spatial_partition); + } + + public function clearSpatialPartition() + { + unset($this->spatial_partition); + } + + /** + * Partition of asset in space. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; + * @param \Google\Cloud\VisionAI\V1\Partition\SpatialPartition $var + * @return $this + */ + public function setSpatialPartition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Partition\SpatialPartition::class); + $this->spatial_partition = $var; + + return $this; + } + + /** + * Partition of asset in time. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; + * @return \Google\Cloud\VisionAI\V1\Partition\RelativeTemporalPartition|null + */ + public function getRelativeTemporalPartition() + { + return $this->relative_temporal_partition; + } + + public function hasRelativeTemporalPartition() + { + return isset($this->relative_temporal_partition); + } + + public function clearRelativeTemporalPartition() + { + unset($this->relative_temporal_partition); + } + + /** + * Partition of asset in time. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; + * @param \Google\Cloud\VisionAI\V1\Partition\RelativeTemporalPartition $var + * @return $this + */ + public function setRelativeTemporalPartition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Partition\RelativeTemporalPartition::class); + $this->relative_temporal_partition = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/RelativeTemporalPartition.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/RelativeTemporalPartition.php new file mode 100644 index 000000000000..e717a6195f8b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/RelativeTemporalPartition.php @@ -0,0 +1,122 @@ +google.cloud.visionai.v1.Partition.RelativeTemporalPartition + */ +class RelativeTemporalPartition extends \Google\Protobuf\Internal\Message +{ + /** + * Start time offset of the partition. + * + * Generated from protobuf field .google.protobuf.Duration start_offset = 1; + */ + protected $start_offset = null; + /** + * End time offset of the partition. + * + * Generated from protobuf field .google.protobuf.Duration end_offset = 2; + */ + protected $end_offset = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Duration $start_offset + * Start time offset of the partition. + * @type \Google\Protobuf\Duration $end_offset + * End time offset of the partition. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Start time offset of the partition. + * + * Generated from protobuf field .google.protobuf.Duration start_offset = 1; + * @return \Google\Protobuf\Duration|null + */ + public function getStartOffset() + { + return $this->start_offset; + } + + public function hasStartOffset() + { + return isset($this->start_offset); + } + + public function clearStartOffset() + { + unset($this->start_offset); + } + + /** + * Start time offset of the partition. + * + * Generated from protobuf field .google.protobuf.Duration start_offset = 1; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setStartOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->start_offset = $var; + + return $this; + } + + /** + * End time offset of the partition. + * + * Generated from protobuf field .google.protobuf.Duration end_offset = 2; + * @return \Google\Protobuf\Duration|null + */ + public function getEndOffset() + { + return $this->end_offset; + } + + public function hasEndOffset() + { + return isset($this->end_offset); + } + + public function clearEndOffset() + { + unset($this->end_offset); + } + + /** + * End time offset of the partition. + * + * Generated from protobuf field .google.protobuf.Duration end_offset = 2; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setEndOffset($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->end_offset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/SpatialPartition.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/SpatialPartition.php new file mode 100644 index 000000000000..e65d917c32a8 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/SpatialPartition.php @@ -0,0 +1,209 @@ +google.cloud.visionai.v1.Partition.SpatialPartition + */ +class SpatialPartition extends \Google\Protobuf\Internal\Message +{ + /** + * The minimum x coordinate value. + * + * Generated from protobuf field optional int64 x_min = 1; + */ + protected $x_min = null; + /** + * The minimum y coordinate value. + * + * Generated from protobuf field optional int64 y_min = 2; + */ + protected $y_min = null; + /** + * The maximum x coordinate value. + * + * Generated from protobuf field optional int64 x_max = 3; + */ + protected $x_max = null; + /** + * The maximum y coordinate value. + * + * Generated from protobuf field optional int64 y_max = 4; + */ + protected $y_max = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $x_min + * The minimum x coordinate value. + * @type int|string $y_min + * The minimum y coordinate value. + * @type int|string $x_max + * The maximum x coordinate value. + * @type int|string $y_max + * The maximum y coordinate value. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The minimum x coordinate value. + * + * Generated from protobuf field optional int64 x_min = 1; + * @return int|string + */ + public function getXMin() + { + return isset($this->x_min) ? $this->x_min : 0; + } + + public function hasXMin() + { + return isset($this->x_min); + } + + public function clearXMin() + { + unset($this->x_min); + } + + /** + * The minimum x coordinate value. + * + * Generated from protobuf field optional int64 x_min = 1; + * @param int|string $var + * @return $this + */ + public function setXMin($var) + { + GPBUtil::checkInt64($var); + $this->x_min = $var; + + return $this; + } + + /** + * The minimum y coordinate value. + * + * Generated from protobuf field optional int64 y_min = 2; + * @return int|string + */ + public function getYMin() + { + return isset($this->y_min) ? $this->y_min : 0; + } + + public function hasYMin() + { + return isset($this->y_min); + } + + public function clearYMin() + { + unset($this->y_min); + } + + /** + * The minimum y coordinate value. + * + * Generated from protobuf field optional int64 y_min = 2; + * @param int|string $var + * @return $this + */ + public function setYMin($var) + { + GPBUtil::checkInt64($var); + $this->y_min = $var; + + return $this; + } + + /** + * The maximum x coordinate value. + * + * Generated from protobuf field optional int64 x_max = 3; + * @return int|string + */ + public function getXMax() + { + return isset($this->x_max) ? $this->x_max : 0; + } + + public function hasXMax() + { + return isset($this->x_max); + } + + public function clearXMax() + { + unset($this->x_max); + } + + /** + * The maximum x coordinate value. + * + * Generated from protobuf field optional int64 x_max = 3; + * @param int|string $var + * @return $this + */ + public function setXMax($var) + { + GPBUtil::checkInt64($var); + $this->x_max = $var; + + return $this; + } + + /** + * The maximum y coordinate value. + * + * Generated from protobuf field optional int64 y_max = 4; + * @return int|string + */ + public function getYMax() + { + return isset($this->y_max) ? $this->y_max : 0; + } + + public function hasYMax() + { + return isset($this->y_max); + } + + public function clearYMax() + { + unset($this->y_max); + } + + /** + * The maximum y coordinate value. + * + * Generated from protobuf field optional int64 y_max = 4; + * @param int|string $var + * @return $this + */ + public function setYMax($var) + { + GPBUtil::checkInt64($var); + $this->y_max = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/TemporalPartition.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/TemporalPartition.php new file mode 100644 index 000000000000..9c8760a59dcf --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/TemporalPartition.php @@ -0,0 +1,122 @@ +google.cloud.visionai.v1.Partition.TemporalPartition + */ +class TemporalPartition extends \Google\Protobuf\Internal\Message +{ + /** + * Start time of the partition. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * End time of the partition. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * Start time of the partition. + * @type \Google\Protobuf\Timestamp $end_time + * End time of the partition. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Start time of the partition. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Start time of the partition. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * End time of the partition. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * End time of the partition. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonBlurConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonBlurConfig.php new file mode 100644 index 000000000000..ef69ac873438 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonBlurConfig.php @@ -0,0 +1,101 @@ +google.cloud.visionai.v1.PersonBlurConfig + */ +class PersonBlurConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Person blur type. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType person_blur_type = 1; + */ + protected $person_blur_type = 0; + /** + * Whether only blur faces other than the whole object in the processor. + * + * Generated from protobuf field bool faces_only = 2; + */ + protected $faces_only = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $person_blur_type + * Person blur type. + * @type bool $faces_only + * Whether only blur faces other than the whole object in the processor. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Person blur type. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType person_blur_type = 1; + * @return int + */ + public function getPersonBlurType() + { + return $this->person_blur_type; + } + + /** + * Person blur type. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType person_blur_type = 1; + * @param int $var + * @return $this + */ + public function setPersonBlurType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\PersonBlurConfig\PersonBlurType::class); + $this->person_blur_type = $var; + + return $this; + } + + /** + * Whether only blur faces other than the whole object in the processor. + * + * Generated from protobuf field bool faces_only = 2; + * @return bool + */ + public function getFacesOnly() + { + return $this->faces_only; + } + + /** + * Whether only blur faces other than the whole object in the processor. + * + * Generated from protobuf field bool faces_only = 2; + * @param bool $var + * @return $this + */ + public function setFacesOnly($var) + { + GPBUtil::checkBool($var); + $this->faces_only = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonBlurConfig/PersonBlurType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonBlurConfig/PersonBlurType.php new file mode 100644 index 000000000000..5d6ade6b08a0 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonBlurConfig/PersonBlurType.php @@ -0,0 +1,61 @@ +google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType + */ +class PersonBlurType +{ + /** + * PersonBlur Type UNSPECIFIED. + * + * Generated from protobuf enum PERSON_BLUR_TYPE_UNSPECIFIED = 0; + */ + const PERSON_BLUR_TYPE_UNSPECIFIED = 0; + /** + * FaceBlur Type full occlusion. + * + * Generated from protobuf enum FULL_OCCULUSION = 1; + */ + const FULL_OCCULUSION = 1; + /** + * FaceBlur Type blur filter. + * + * Generated from protobuf enum BLUR_FILTER = 2; + */ + const BLUR_FILTER = 2; + + private static $valueToName = [ + self::PERSON_BLUR_TYPE_UNSPECIFIED => 'PERSON_BLUR_TYPE_UNSPECIFIED', + self::FULL_OCCULUSION => 'FULL_OCCULUSION', + self::BLUR_FILTER => 'BLUR_FILTER', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonVehicleDetectionConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonVehicleDetectionConfig.php new file mode 100644 index 000000000000..43c0a9f7aa37 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonVehicleDetectionConfig.php @@ -0,0 +1,117 @@ +google.cloud.visionai.v1.PersonVehicleDetectionConfig + */ +class PersonVehicleDetectionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * At least one of enable_people_counting and enable_vehicle_counting fields + * must be set to true. + * Whether to count the appearances of people, output counts have 'people' as + * the key. + * + * Generated from protobuf field bool enable_people_counting = 1; + */ + protected $enable_people_counting = false; + /** + * Whether to count the appearances of vehicles, output counts will have + * 'vehicle' as the key. + * + * Generated from protobuf field bool enable_vehicle_counting = 2; + */ + protected $enable_vehicle_counting = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_people_counting + * At least one of enable_people_counting and enable_vehicle_counting fields + * must be set to true. + * Whether to count the appearances of people, output counts have 'people' as + * the key. + * @type bool $enable_vehicle_counting + * Whether to count the appearances of vehicles, output counts will have + * 'vehicle' as the key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * At least one of enable_people_counting and enable_vehicle_counting fields + * must be set to true. + * Whether to count the appearances of people, output counts have 'people' as + * the key. + * + * Generated from protobuf field bool enable_people_counting = 1; + * @return bool + */ + public function getEnablePeopleCounting() + { + return $this->enable_people_counting; + } + + /** + * At least one of enable_people_counting and enable_vehicle_counting fields + * must be set to true. + * Whether to count the appearances of people, output counts have 'people' as + * the key. + * + * Generated from protobuf field bool enable_people_counting = 1; + * @param bool $var + * @return $this + */ + public function setEnablePeopleCounting($var) + { + GPBUtil::checkBool($var); + $this->enable_people_counting = $var; + + return $this; + } + + /** + * Whether to count the appearances of vehicles, output counts will have + * 'vehicle' as the key. + * + * Generated from protobuf field bool enable_vehicle_counting = 2; + * @return bool + */ + public function getEnableVehicleCounting() + { + return $this->enable_vehicle_counting; + } + + /** + * Whether to count the appearances of vehicles, output counts will have + * 'vehicle' as the key. + * + * Generated from protobuf field bool enable_vehicle_counting = 2; + * @param bool $var + * @return $this + */ + public function setEnableVehicleCounting($var) + { + GPBUtil::checkBool($var); + $this->enable_vehicle_counting = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionConfig.php new file mode 100644 index 000000000000..0fa363255e32 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionConfig.php @@ -0,0 +1,135 @@ +google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig + */ +class PersonalProtectiveEquipmentDetectionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Whether to enable face coverage detection. + * + * Generated from protobuf field bool enable_face_coverage_detection = 1; + */ + protected $enable_face_coverage_detection = false; + /** + * Whether to enable head coverage detection. + * + * Generated from protobuf field bool enable_head_coverage_detection = 2; + */ + protected $enable_head_coverage_detection = false; + /** + * Whether to enable hands coverage detection. + * + * Generated from protobuf field bool enable_hands_coverage_detection = 3; + */ + protected $enable_hands_coverage_detection = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $enable_face_coverage_detection + * Whether to enable face coverage detection. + * @type bool $enable_head_coverage_detection + * Whether to enable head coverage detection. + * @type bool $enable_hands_coverage_detection + * Whether to enable hands coverage detection. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Whether to enable face coverage detection. + * + * Generated from protobuf field bool enable_face_coverage_detection = 1; + * @return bool + */ + public function getEnableFaceCoverageDetection() + { + return $this->enable_face_coverage_detection; + } + + /** + * Whether to enable face coverage detection. + * + * Generated from protobuf field bool enable_face_coverage_detection = 1; + * @param bool $var + * @return $this + */ + public function setEnableFaceCoverageDetection($var) + { + GPBUtil::checkBool($var); + $this->enable_face_coverage_detection = $var; + + return $this; + } + + /** + * Whether to enable head coverage detection. + * + * Generated from protobuf field bool enable_head_coverage_detection = 2; + * @return bool + */ + public function getEnableHeadCoverageDetection() + { + return $this->enable_head_coverage_detection; + } + + /** + * Whether to enable head coverage detection. + * + * Generated from protobuf field bool enable_head_coverage_detection = 2; + * @param bool $var + * @return $this + */ + public function setEnableHeadCoverageDetection($var) + { + GPBUtil::checkBool($var); + $this->enable_head_coverage_detection = $var; + + return $this; + } + + /** + * Whether to enable hands coverage detection. + * + * Generated from protobuf field bool enable_hands_coverage_detection = 3; + * @return bool + */ + public function getEnableHandsCoverageDetection() + { + return $this->enable_hands_coverage_detection; + } + + /** + * Whether to enable hands coverage detection. + * + * Generated from protobuf field bool enable_hands_coverage_detection = 3; + * @param bool $var + * @return $this + */ + public function setEnableHandsCoverageDetection($var) + { + GPBUtil::checkBool($var); + $this->enable_hands_coverage_detection = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput.php new file mode 100644 index 000000000000..8ef3843f8e22 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput.php @@ -0,0 +1,111 @@ +google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput + */ +class PersonalProtectiveEquipmentDetectionOutput extends \Google\Protobuf\Internal\Message +{ + /** + * Current timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp current_time = 1; + */ + protected $current_time = null; + /** + * A list of DetectedPersons. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + */ + private $detected_persons; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $current_time + * Current timestamp. + * @type \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\DetectedPerson[] $detected_persons + * A list of DetectedPersons. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * Current timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp current_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCurrentTime() + { + return $this->current_time; + } + + public function hasCurrentTime() + { + return isset($this->current_time); + } + + public function clearCurrentTime() + { + unset($this->current_time); + } + + /** + * Current timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp current_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCurrentTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->current_time = $var; + + return $this; + } + + /** + * A list of DetectedPersons. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\DetectedPerson> + */ + public function getDetectedPersons() + { + return $this->detected_persons; + } + + /** + * A list of DetectedPersons. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; + * @param \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\DetectedPerson[] $var + * @return $this + */ + public function setDetectedPersons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\DetectedPerson::class); + $this->detected_persons = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/DetectedPerson.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/DetectedPerson.php new file mode 100644 index 000000000000..4ebb72e54bf7 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/DetectedPerson.php @@ -0,0 +1,414 @@ +google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson + */ +class DetectedPerson extends \Google\Protobuf\Internal\Message +{ + /** + * The id of detected person. + * + * Generated from protobuf field int64 person_id = 1; + */ + protected $person_id = 0; + /** + * The info of detected person identified box. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; + */ + protected $detected_person_identified_box = null; + /** + * The info of detected person associated ppe identified boxes. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + */ + private $detected_ppe_identified_boxes; + /** + * Coverage score for each body part. + * Coverage score for face. + * + * Generated from protobuf field optional float face_coverage_score = 4; + */ + protected $face_coverage_score = null; + /** + * Coverage score for eyes. + * + * Generated from protobuf field optional float eyes_coverage_score = 5; + */ + protected $eyes_coverage_score = null; + /** + * Coverage score for head. + * + * Generated from protobuf field optional float head_coverage_score = 6; + */ + protected $head_coverage_score = null; + /** + * Coverage score for hands. + * + * Generated from protobuf field optional float hands_coverage_score = 7; + */ + protected $hands_coverage_score = null; + /** + * Coverage score for body. + * + * Generated from protobuf field optional float body_coverage_score = 8; + */ + protected $body_coverage_score = null; + /** + * Coverage score for feet. + * + * Generated from protobuf field optional float feet_coverage_score = 9; + */ + protected $feet_coverage_score = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $person_id + * The id of detected person. + * @type \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PersonIdentifiedBox $detected_person_identified_box + * The info of detected person identified box. + * @type \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PPEIdentifiedBox[] $detected_ppe_identified_boxes + * The info of detected person associated ppe identified boxes. + * @type float $face_coverage_score + * Coverage score for each body part. + * Coverage score for face. + * @type float $eyes_coverage_score + * Coverage score for eyes. + * @type float $head_coverage_score + * Coverage score for head. + * @type float $hands_coverage_score + * Coverage score for hands. + * @type float $body_coverage_score + * Coverage score for body. + * @type float $feet_coverage_score + * Coverage score for feet. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * The id of detected person. + * + * Generated from protobuf field int64 person_id = 1; + * @return int|string + */ + public function getPersonId() + { + return $this->person_id; + } + + /** + * The id of detected person. + * + * Generated from protobuf field int64 person_id = 1; + * @param int|string $var + * @return $this + */ + public function setPersonId($var) + { + GPBUtil::checkInt64($var); + $this->person_id = $var; + + return $this; + } + + /** + * The info of detected person identified box. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; + * @return \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PersonIdentifiedBox|null + */ + public function getDetectedPersonIdentifiedBox() + { + return $this->detected_person_identified_box; + } + + public function hasDetectedPersonIdentifiedBox() + { + return isset($this->detected_person_identified_box); + } + + public function clearDetectedPersonIdentifiedBox() + { + unset($this->detected_person_identified_box); + } + + /** + * The info of detected person identified box. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; + * @param \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PersonIdentifiedBox $var + * @return $this + */ + public function setDetectedPersonIdentifiedBox($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PersonIdentifiedBox::class); + $this->detected_person_identified_box = $var; + + return $this; + } + + /** + * The info of detected person associated ppe identified boxes. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PPEIdentifiedBox> + */ + public function getDetectedPpeIdentifiedBoxes() + { + return $this->detected_ppe_identified_boxes; + } + + /** + * The info of detected person associated ppe identified boxes. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; + * @param \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PPEIdentifiedBox[] $var + * @return $this + */ + public function setDetectedPpeIdentifiedBoxes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PPEIdentifiedBox::class); + $this->detected_ppe_identified_boxes = $arr; + + return $this; + } + + /** + * Coverage score for each body part. + * Coverage score for face. + * + * Generated from protobuf field optional float face_coverage_score = 4; + * @return float + */ + public function getFaceCoverageScore() + { + return isset($this->face_coverage_score) ? $this->face_coverage_score : 0.0; + } + + public function hasFaceCoverageScore() + { + return isset($this->face_coverage_score); + } + + public function clearFaceCoverageScore() + { + unset($this->face_coverage_score); + } + + /** + * Coverage score for each body part. + * Coverage score for face. + * + * Generated from protobuf field optional float face_coverage_score = 4; + * @param float $var + * @return $this + */ + public function setFaceCoverageScore($var) + { + GPBUtil::checkFloat($var); + $this->face_coverage_score = $var; + + return $this; + } + + /** + * Coverage score for eyes. + * + * Generated from protobuf field optional float eyes_coverage_score = 5; + * @return float + */ + public function getEyesCoverageScore() + { + return isset($this->eyes_coverage_score) ? $this->eyes_coverage_score : 0.0; + } + + public function hasEyesCoverageScore() + { + return isset($this->eyes_coverage_score); + } + + public function clearEyesCoverageScore() + { + unset($this->eyes_coverage_score); + } + + /** + * Coverage score for eyes. + * + * Generated from protobuf field optional float eyes_coverage_score = 5; + * @param float $var + * @return $this + */ + public function setEyesCoverageScore($var) + { + GPBUtil::checkFloat($var); + $this->eyes_coverage_score = $var; + + return $this; + } + + /** + * Coverage score for head. + * + * Generated from protobuf field optional float head_coverage_score = 6; + * @return float + */ + public function getHeadCoverageScore() + { + return isset($this->head_coverage_score) ? $this->head_coverage_score : 0.0; + } + + public function hasHeadCoverageScore() + { + return isset($this->head_coverage_score); + } + + public function clearHeadCoverageScore() + { + unset($this->head_coverage_score); + } + + /** + * Coverage score for head. + * + * Generated from protobuf field optional float head_coverage_score = 6; + * @param float $var + * @return $this + */ + public function setHeadCoverageScore($var) + { + GPBUtil::checkFloat($var); + $this->head_coverage_score = $var; + + return $this; + } + + /** + * Coverage score for hands. + * + * Generated from protobuf field optional float hands_coverage_score = 7; + * @return float + */ + public function getHandsCoverageScore() + { + return isset($this->hands_coverage_score) ? $this->hands_coverage_score : 0.0; + } + + public function hasHandsCoverageScore() + { + return isset($this->hands_coverage_score); + } + + public function clearHandsCoverageScore() + { + unset($this->hands_coverage_score); + } + + /** + * Coverage score for hands. + * + * Generated from protobuf field optional float hands_coverage_score = 7; + * @param float $var + * @return $this + */ + public function setHandsCoverageScore($var) + { + GPBUtil::checkFloat($var); + $this->hands_coverage_score = $var; + + return $this; + } + + /** + * Coverage score for body. + * + * Generated from protobuf field optional float body_coverage_score = 8; + * @return float + */ + public function getBodyCoverageScore() + { + return isset($this->body_coverage_score) ? $this->body_coverage_score : 0.0; + } + + public function hasBodyCoverageScore() + { + return isset($this->body_coverage_score); + } + + public function clearBodyCoverageScore() + { + unset($this->body_coverage_score); + } + + /** + * Coverage score for body. + * + * Generated from protobuf field optional float body_coverage_score = 8; + * @param float $var + * @return $this + */ + public function setBodyCoverageScore($var) + { + GPBUtil::checkFloat($var); + $this->body_coverage_score = $var; + + return $this; + } + + /** + * Coverage score for feet. + * + * Generated from protobuf field optional float feet_coverage_score = 9; + * @return float + */ + public function getFeetCoverageScore() + { + return isset($this->feet_coverage_score) ? $this->feet_coverage_score : 0.0; + } + + public function hasFeetCoverageScore() + { + return isset($this->feet_coverage_score); + } + + public function clearFeetCoverageScore() + { + unset($this->feet_coverage_score); + } + + /** + * Coverage score for feet. + * + * Generated from protobuf field optional float feet_coverage_score = 9; + * @param float $var + * @return $this + */ + public function setFeetCoverageScore($var) + { + GPBUtil::checkFloat($var); + $this->feet_coverage_score = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/NormalizedBoundingBox.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/NormalizedBoundingBox.php new file mode 100644 index 000000000000..548046f44657 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/NormalizedBoundingBox.php @@ -0,0 +1,169 @@ +google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox + */ +class NormalizedBoundingBox extends \Google\Protobuf\Internal\Message +{ + /** + * Min in x coordinate. + * + * Generated from protobuf field float xmin = 1; + */ + protected $xmin = 0.0; + /** + * Min in y coordinate. + * + * Generated from protobuf field float ymin = 2; + */ + protected $ymin = 0.0; + /** + * Width of the bounding box. + * + * Generated from protobuf field float width = 3; + */ + protected $width = 0.0; + /** + * Height of the bounding box. + * + * Generated from protobuf field float height = 4; + */ + protected $height = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $xmin + * Min in x coordinate. + * @type float $ymin + * Min in y coordinate. + * @type float $width + * Width of the bounding box. + * @type float $height + * Height of the bounding box. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * Min in x coordinate. + * + * Generated from protobuf field float xmin = 1; + * @return float + */ + public function getXmin() + { + return $this->xmin; + } + + /** + * Min in x coordinate. + * + * Generated from protobuf field float xmin = 1; + * @param float $var + * @return $this + */ + public function setXmin($var) + { + GPBUtil::checkFloat($var); + $this->xmin = $var; + + return $this; + } + + /** + * Min in y coordinate. + * + * Generated from protobuf field float ymin = 2; + * @return float + */ + public function getYmin() + { + return $this->ymin; + } + + /** + * Min in y coordinate. + * + * Generated from protobuf field float ymin = 2; + * @param float $var + * @return $this + */ + public function setYmin($var) + { + GPBUtil::checkFloat($var); + $this->ymin = $var; + + return $this; + } + + /** + * Width of the bounding box. + * + * Generated from protobuf field float width = 3; + * @return float + */ + public function getWidth() + { + return $this->width; + } + + /** + * Width of the bounding box. + * + * Generated from protobuf field float width = 3; + * @param float $var + * @return $this + */ + public function setWidth($var) + { + GPBUtil::checkFloat($var); + $this->width = $var; + + return $this; + } + + /** + * Height of the bounding box. + * + * Generated from protobuf field float height = 4; + * @return float + */ + public function getHeight() + { + return $this->height; + } + + /** + * Height of the bounding box. + * + * Generated from protobuf field float height = 4; + * @param float $var + * @return $this + */ + public function setHeight($var) + { + GPBUtil::checkFloat($var); + $this->height = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PPEEntity.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PPEEntity.php new file mode 100644 index 000000000000..8bf6bdc07c1f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PPEEntity.php @@ -0,0 +1,173 @@ +google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity + */ +class PPEEntity extends \Google\Protobuf\Internal\Message +{ + /** + * Label id. + * + * Generated from protobuf field int64 ppe_label_id = 1; + */ + protected $ppe_label_id = 0; + /** + * Human readable string of the label (Examples: helmet, glove, mask). + * + * Generated from protobuf field string ppe_label_string = 2; + */ + protected $ppe_label_string = ''; + /** + * Human readable string of the super category label (Examples: head_cover, + * hands_cover, face_cover). + * + * Generated from protobuf field string ppe_supercategory_label_string = 3; + */ + protected $ppe_supercategory_label_string = ''; + /** + * Entity id. + * + * Generated from protobuf field int64 ppe_entity_id = 4; + */ + protected $ppe_entity_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $ppe_label_id + * Label id. + * @type string $ppe_label_string + * Human readable string of the label (Examples: helmet, glove, mask). + * @type string $ppe_supercategory_label_string + * Human readable string of the super category label (Examples: head_cover, + * hands_cover, face_cover). + * @type int|string $ppe_entity_id + * Entity id. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * Label id. + * + * Generated from protobuf field int64 ppe_label_id = 1; + * @return int|string + */ + public function getPpeLabelId() + { + return $this->ppe_label_id; + } + + /** + * Label id. + * + * Generated from protobuf field int64 ppe_label_id = 1; + * @param int|string $var + * @return $this + */ + public function setPpeLabelId($var) + { + GPBUtil::checkInt64($var); + $this->ppe_label_id = $var; + + return $this; + } + + /** + * Human readable string of the label (Examples: helmet, glove, mask). + * + * Generated from protobuf field string ppe_label_string = 2; + * @return string + */ + public function getPpeLabelString() + { + return $this->ppe_label_string; + } + + /** + * Human readable string of the label (Examples: helmet, glove, mask). + * + * Generated from protobuf field string ppe_label_string = 2; + * @param string $var + * @return $this + */ + public function setPpeLabelString($var) + { + GPBUtil::checkString($var, True); + $this->ppe_label_string = $var; + + return $this; + } + + /** + * Human readable string of the super category label (Examples: head_cover, + * hands_cover, face_cover). + * + * Generated from protobuf field string ppe_supercategory_label_string = 3; + * @return string + */ + public function getPpeSupercategoryLabelString() + { + return $this->ppe_supercategory_label_string; + } + + /** + * Human readable string of the super category label (Examples: head_cover, + * hands_cover, face_cover). + * + * Generated from protobuf field string ppe_supercategory_label_string = 3; + * @param string $var + * @return $this + */ + public function setPpeSupercategoryLabelString($var) + { + GPBUtil::checkString($var, True); + $this->ppe_supercategory_label_string = $var; + + return $this; + } + + /** + * Entity id. + * + * Generated from protobuf field int64 ppe_entity_id = 4; + * @return int|string + */ + public function getPpeEntityId() + { + return $this->ppe_entity_id; + } + + /** + * Entity id. + * + * Generated from protobuf field int64 ppe_entity_id = 4; + * @param int|string $var + * @return $this + */ + public function setPpeEntityId($var) + { + GPBUtil::checkInt64($var); + $this->ppe_entity_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PPEIdentifiedBox.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PPEIdentifiedBox.php new file mode 100644 index 000000000000..773916621507 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PPEIdentifiedBox.php @@ -0,0 +1,189 @@ +google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox + */ +class PPEIdentifiedBox extends \Google\Protobuf\Internal\Message +{ + /** + * An unique id for this box. + * + * Generated from protobuf field int64 box_id = 1; + */ + protected $box_id = 0; + /** + * Bounding Box in the normalized coordinates. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + */ + protected $normalized_bounding_box = null; + /** + * Confidence score associated with this box. + * + * Generated from protobuf field float confidence_score = 3; + */ + protected $confidence_score = 0.0; + /** + * PPE entity info. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; + */ + protected $ppe_entity = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $box_id + * An unique id for this box. + * @type \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\NormalizedBoundingBox $normalized_bounding_box + * Bounding Box in the normalized coordinates. + * @type float $confidence_score + * Confidence score associated with this box. + * @type \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PPEEntity $ppe_entity + * PPE entity info. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * An unique id for this box. + * + * Generated from protobuf field int64 box_id = 1; + * @return int|string + */ + public function getBoxId() + { + return $this->box_id; + } + + /** + * An unique id for this box. + * + * Generated from protobuf field int64 box_id = 1; + * @param int|string $var + * @return $this + */ + public function setBoxId($var) + { + GPBUtil::checkInt64($var); + $this->box_id = $var; + + return $this; + } + + /** + * Bounding Box in the normalized coordinates. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * @return \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\NormalizedBoundingBox|null + */ + public function getNormalizedBoundingBox() + { + return $this->normalized_bounding_box; + } + + public function hasNormalizedBoundingBox() + { + return isset($this->normalized_bounding_box); + } + + public function clearNormalizedBoundingBox() + { + unset($this->normalized_bounding_box); + } + + /** + * Bounding Box in the normalized coordinates. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * @param \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\NormalizedBoundingBox $var + * @return $this + */ + public function setNormalizedBoundingBox($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\NormalizedBoundingBox::class); + $this->normalized_bounding_box = $var; + + return $this; + } + + /** + * Confidence score associated with this box. + * + * Generated from protobuf field float confidence_score = 3; + * @return float + */ + public function getConfidenceScore() + { + return $this->confidence_score; + } + + /** + * Confidence score associated with this box. + * + * Generated from protobuf field float confidence_score = 3; + * @param float $var + * @return $this + */ + public function setConfidenceScore($var) + { + GPBUtil::checkFloat($var); + $this->confidence_score = $var; + + return $this; + } + + /** + * PPE entity info. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; + * @return \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PPEEntity|null + */ + public function getPpeEntity() + { + return $this->ppe_entity; + } + + public function hasPpeEntity() + { + return isset($this->ppe_entity); + } + + public function clearPpeEntity() + { + unset($this->ppe_entity); + } + + /** + * PPE entity info. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; + * @param \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PPEEntity $var + * @return $this + */ + public function setPpeEntity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PPEEntity::class); + $this->ppe_entity = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PersonEntity.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PersonEntity.php new file mode 100644 index 000000000000..12e3a7000fd7 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PersonEntity.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity + */ +class PersonEntity extends \Google\Protobuf\Internal\Message +{ + /** + * Entity id. + * + * Generated from protobuf field int64 person_entity_id = 1; + */ + protected $person_entity_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $person_entity_id + * Entity id. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * Entity id. + * + * Generated from protobuf field int64 person_entity_id = 1; + * @return int|string + */ + public function getPersonEntityId() + { + return $this->person_entity_id; + } + + /** + * Entity id. + * + * Generated from protobuf field int64 person_entity_id = 1; + * @param int|string $var + * @return $this + */ + public function setPersonEntityId($var) + { + GPBUtil::checkInt64($var); + $this->person_entity_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PersonIdentifiedBox.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PersonIdentifiedBox.php new file mode 100644 index 000000000000..b638832d3ce8 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PersonIdentifiedBox.php @@ -0,0 +1,190 @@ +google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox + */ +class PersonIdentifiedBox extends \Google\Protobuf\Internal\Message +{ + /** + * An unique id for this box. + * + * Generated from protobuf field int64 box_id = 1; + */ + protected $box_id = 0; + /** + * Bounding Box in the normalized coordinates. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + */ + protected $normalized_bounding_box = null; + /** + * Confidence score associated with this box. + * + * Generated from protobuf field float confidence_score = 3; + */ + protected $confidence_score = 0.0; + /** + * Person entity info. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; + */ + protected $person_entity = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $box_id + * An unique id for this box. + * @type \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\NormalizedBoundingBox $normalized_bounding_box + * Bounding Box in the normalized coordinates. + * @type float $confidence_score + * Confidence score associated with this box. + * @type \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PersonEntity $person_entity + * Person entity info. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * An unique id for this box. + * + * Generated from protobuf field int64 box_id = 1; + * @return int|string + */ + public function getBoxId() + { + return $this->box_id; + } + + /** + * An unique id for this box. + * + * Generated from protobuf field int64 box_id = 1; + * @param int|string $var + * @return $this + */ + public function setBoxId($var) + { + GPBUtil::checkInt64($var); + $this->box_id = $var; + + return $this; + } + + /** + * Bounding Box in the normalized coordinates. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * @return \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\NormalizedBoundingBox|null + */ + public function getNormalizedBoundingBox() + { + return $this->normalized_bounding_box; + } + + public function hasNormalizedBoundingBox() + { + return isset($this->normalized_bounding_box); + } + + public function clearNormalizedBoundingBox() + { + unset($this->normalized_bounding_box); + } + + /** + * Bounding Box in the normalized coordinates. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; + * @param \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\NormalizedBoundingBox $var + * @return $this + */ + public function setNormalizedBoundingBox($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\NormalizedBoundingBox::class); + $this->normalized_bounding_box = $var; + + return $this; + } + + /** + * Confidence score associated with this box. + * + * Generated from protobuf field float confidence_score = 3; + * @return float + */ + public function getConfidenceScore() + { + return $this->confidence_score; + } + + /** + * Confidence score associated with this box. + * + * Generated from protobuf field float confidence_score = 3; + * @param float $var + * @return $this + */ + public function setConfidenceScore($var) + { + GPBUtil::checkFloat($var); + $this->confidence_score = $var; + + return $this; + } + + /** + * Person entity info. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; + * @return \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PersonEntity|null + */ + public function getPersonEntity() + { + return $this->person_entity; + } + + public function hasPersonEntity() + { + return isset($this->person_entity); + } + + public function clearPersonEntity() + { + unset($this->person_entity); + } + + /** + * Person entity info. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; + * @param \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PersonEntity $var + * @return $this + */ + public function setPersonEntity($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PersonEntity::class); + $this->person_entity = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Process.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Process.php new file mode 100644 index 000000000000..9d17aa91df8f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Process.php @@ -0,0 +1,427 @@ +google.cloud.visionai.v1.Process + */ +class Process extends \Google\Protobuf\Internal\Message +{ + /** + * The name of resource. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Required. Reference to an existing Analysis resource. + * + * Generated from protobuf field string analysis = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $analysis = ''; + /** + * Optional. Attribute overrides of the Analyzers. + * Format for each single override item: + * "{analyzer_name}:{attribute_key}={value}" + * + * Generated from protobuf field repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $attribute_overrides; + /** + * Optional. Status of the Process. + * + * Generated from protobuf field .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $run_status = null; + /** + * Optional. Run mode of the Process. + * + * Generated from protobuf field .google.cloud.visionai.v1.RunMode run_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $run_mode = 0; + /** + * Optional. Event ID of the input/output streams. + * This is useful when you have a StreamSource/StreamSink operator in the + * Analysis, and you want to manually specify the Event to read from/write to. + * + * Generated from protobuf field string event_id = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $event_id = ''; + /** + * Optional. Optional: Batch ID of the Process. + * + * Generated from protobuf field string batch_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $batch_id = ''; + /** + * Optional. Optional: The number of retries for a process in submission mode + * the system should try before declaring failure. By default, no retry will + * be performed. + * + * Generated from protobuf field int32 retry_count = 10 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $retry_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The create timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update timestamp. + * @type string $analysis + * Required. Reference to an existing Analysis resource. + * @type string[] $attribute_overrides + * Optional. Attribute overrides of the Analyzers. + * Format for each single override item: + * "{analyzer_name}:{attribute_key}={value}" + * @type \Google\Cloud\VisionAI\V1\RunStatus $run_status + * Optional. Status of the Process. + * @type int $run_mode + * Optional. Run mode of the Process. + * @type string $event_id + * Optional. Event ID of the input/output streams. + * This is useful when you have a StreamSource/StreamSink operator in the + * Analysis, and you want to manually specify the Event to read from/write to. + * @type string $batch_id + * Optional. Optional: Batch ID of the Process. + * @type int $retry_count + * Optional. Optional: The number of retries for a process in submission mode + * the system should try before declaring failure. By default, no retry will + * be performed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaResources::initOnce(); + parent::__construct($data); + } + + /** + * The name of resource. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of resource. + * + * 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 create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Required. Reference to an existing Analysis resource. + * + * Generated from protobuf field string analysis = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getAnalysis() + { + return $this->analysis; + } + + /** + * Required. Reference to an existing Analysis resource. + * + * Generated from protobuf field string analysis = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setAnalysis($var) + { + GPBUtil::checkString($var, True); + $this->analysis = $var; + + return $this; + } + + /** + * Optional. Attribute overrides of the Analyzers. + * Format for each single override item: + * "{analyzer_name}:{attribute_key}={value}" + * + * Generated from protobuf field repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getAttributeOverrides() + { + return $this->attribute_overrides; + } + + /** + * Optional. Attribute overrides of the Analyzers. + * Format for each single override item: + * "{analyzer_name}:{attribute_key}={value}" + * + * Generated from protobuf field repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setAttributeOverrides($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->attribute_overrides = $arr; + + return $this; + } + + /** + * Optional. Status of the Process. + * + * Generated from protobuf field .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\VisionAI\V1\RunStatus|null + */ + public function getRunStatus() + { + return $this->run_status; + } + + public function hasRunStatus() + { + return isset($this->run_status); + } + + public function clearRunStatus() + { + unset($this->run_status); + } + + /** + * Optional. Status of the Process. + * + * Generated from protobuf field .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\VisionAI\V1\RunStatus $var + * @return $this + */ + public function setRunStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\RunStatus::class); + $this->run_status = $var; + + return $this; + } + + /** + * Optional. Run mode of the Process. + * + * Generated from protobuf field .google.cloud.visionai.v1.RunMode run_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getRunMode() + { + return $this->run_mode; + } + + /** + * Optional. Run mode of the Process. + * + * Generated from protobuf field .google.cloud.visionai.v1.RunMode run_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setRunMode($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\RunMode::class); + $this->run_mode = $var; + + return $this; + } + + /** + * Optional. Event ID of the input/output streams. + * This is useful when you have a StreamSource/StreamSink operator in the + * Analysis, and you want to manually specify the Event to read from/write to. + * + * Generated from protobuf field string event_id = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getEventId() + { + return $this->event_id; + } + + /** + * Optional. Event ID of the input/output streams. + * This is useful when you have a StreamSource/StreamSink operator in the + * Analysis, and you want to manually specify the Event to read from/write to. + * + * Generated from protobuf field string event_id = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setEventId($var) + { + GPBUtil::checkString($var, True); + $this->event_id = $var; + + return $this; + } + + /** + * Optional. Optional: Batch ID of the Process. + * + * Generated from protobuf field string batch_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getBatchId() + { + return $this->batch_id; + } + + /** + * Optional. Optional: Batch ID of the Process. + * + * Generated from protobuf field string batch_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setBatchId($var) + { + GPBUtil::checkString($var, True); + $this->batch_id = $var; + + return $this; + } + + /** + * Optional. Optional: The number of retries for a process in submission mode + * the system should try before declaring failure. By default, no retry will + * be performed. + * + * Generated from protobuf field int32 retry_count = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getRetryCount() + { + return $this->retry_count; + } + + /** + * Optional. Optional: The number of retries for a process in submission mode + * the system should try before declaring failure. By default, no retry will + * be performed. + * + * Generated from protobuf field int32 retry_count = 10 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setRetryCount($var) + { + GPBUtil::checkInt32($var); + $this->retry_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor.php new file mode 100644 index 000000000000..4f20bf984362 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor.php @@ -0,0 +1,593 @@ +google.cloud.visionai.v1.Processor + */ +class Processor extends \Google\Protobuf\Internal\Message +{ + /** + * name of resource. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. [Output only] Create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. [Output only] Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Required. A user friendly display name for the processor. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $display_name = ''; + /** + * Illustrative sentences for describing the functionality of the processor. + * + * Generated from protobuf field string description = 10; + */ + protected $description = ''; + /** + * Output only. Processor Type. + * + * Generated from protobuf field .google.cloud.visionai.v1.Processor.ProcessorType processor_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $processor_type = 0; + /** + * Model Type. + * + * Generated from protobuf field .google.cloud.visionai.v1.ModelType model_type = 13; + */ + protected $model_type = 0; + /** + * Source info for customer created processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; + */ + protected $custom_processor_source_info = null; + /** + * Output only. State of the Processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.Processor.ProcessorState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. [Output only] The input / output specifications of a + * processor, each type of processor has fixed input / output specs which + * cannot be altered by customer. + * + * Generated from protobuf field .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $processor_io_spec = null; + /** + * Output only. The corresponding configuration can be used in the Application + * to customize the behavior of the processor. + * + * Generated from protobuf field string configuration_typeurl = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $configuration_typeurl = ''; + /** + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $supported_annotation_types; + /** + * Indicates if the processor supports post processing. + * + * Generated from protobuf field bool supports_post_processing = 17; + */ + protected $supports_post_processing = false; + /** + * Which instance types this processor supports; if empty, this default to + * STREAMING_PREDICTION. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + */ + private $supported_instance_types; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * name of resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. [Output only] Create timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. [Output only] Update timestamp. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs. + * @type string $display_name + * Required. A user friendly display name for the processor. + * @type string $description + * Illustrative sentences for describing the functionality of the processor. + * @type int $processor_type + * Output only. Processor Type. + * @type int $model_type + * Model Type. + * @type \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo $custom_processor_source_info + * Source info for customer created processor. + * @type int $state + * Output only. State of the Processor. + * @type \Google\Cloud\VisionAI\V1\ProcessorIOSpec $processor_io_spec + * Output only. [Output only] The input / output specifications of a + * processor, each type of processor has fixed input / output specs which + * cannot be altered by customer. + * @type string $configuration_typeurl + * Output only. The corresponding configuration can be used in the Application + * to customize the behavior of the processor. + * @type int[] $supported_annotation_types + * @type bool $supports_post_processing + * Indicates if the processor supports post processing. + * @type int[] $supported_instance_types + * Which instance types this processor supports; if empty, this default to + * STREAMING_PREDICTION. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * name of resource. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * name of resource. + * + * 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. [Output only] Create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. [Output only] Create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. [Output only] Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. [Output only] Update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Required. A user friendly display name for the processor. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Required. A user friendly display name for the processor. + * + * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Illustrative sentences for describing the functionality of the processor. + * + * Generated from protobuf field string description = 10; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Illustrative sentences for describing the functionality of the processor. + * + * Generated from protobuf field string description = 10; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Output only. Processor Type. + * + * Generated from protobuf field .google.cloud.visionai.v1.Processor.ProcessorType processor_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getProcessorType() + { + return $this->processor_type; + } + + /** + * Output only. Processor Type. + * + * Generated from protobuf field .google.cloud.visionai.v1.Processor.ProcessorType processor_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setProcessorType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Processor\ProcessorType::class); + $this->processor_type = $var; + + return $this; + } + + /** + * Model Type. + * + * Generated from protobuf field .google.cloud.visionai.v1.ModelType model_type = 13; + * @return int + */ + public function getModelType() + { + return $this->model_type; + } + + /** + * Model Type. + * + * Generated from protobuf field .google.cloud.visionai.v1.ModelType model_type = 13; + * @param int $var + * @return $this + */ + public function setModelType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\ModelType::class); + $this->model_type = $var; + + return $this; + } + + /** + * Source info for customer created processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; + * @return \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo|null + */ + public function getCustomProcessorSourceInfo() + { + return $this->custom_processor_source_info; + } + + public function hasCustomProcessorSourceInfo() + { + return isset($this->custom_processor_source_info); + } + + public function clearCustomProcessorSourceInfo() + { + unset($this->custom_processor_source_info); + } + + /** + * Source info for customer created processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; + * @param \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo $var + * @return $this + */ + public function setCustomProcessorSourceInfo($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo::class); + $this->custom_processor_source_info = $var; + + return $this; + } + + /** + * Output only. State of the Processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.Processor.ProcessorState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the Processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.Processor.ProcessorState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Processor\ProcessorState::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. [Output only] The input / output specifications of a + * processor, each type of processor has fixed input / output specs which + * cannot be altered by customer. + * + * Generated from protobuf field .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\VisionAI\V1\ProcessorIOSpec|null + */ + public function getProcessorIoSpec() + { + return $this->processor_io_spec; + } + + public function hasProcessorIoSpec() + { + return isset($this->processor_io_spec); + } + + public function clearProcessorIoSpec() + { + unset($this->processor_io_spec); + } + + /** + * Output only. [Output only] The input / output specifications of a + * processor, each type of processor has fixed input / output specs which + * cannot be altered by customer. + * + * Generated from protobuf field .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\VisionAI\V1\ProcessorIOSpec $var + * @return $this + */ + public function setProcessorIoSpec($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ProcessorIOSpec::class); + $this->processor_io_spec = $var; + + return $this; + } + + /** + * Output only. The corresponding configuration can be used in the Application + * to customize the behavior of the processor. + * + * Generated from protobuf field string configuration_typeurl = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getConfigurationTypeurl() + { + return $this->configuration_typeurl; + } + + /** + * Output only. The corresponding configuration can be used in the Application + * to customize the behavior of the processor. + * + * Generated from protobuf field string configuration_typeurl = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setConfigurationTypeurl($var) + { + GPBUtil::checkString($var, True); + $this->configuration_typeurl = $var; + + return $this; + } + + /** + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField + */ + public function getSupportedAnnotationTypes() + { + return $this->supported_annotation_types; + } + + /** + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int[] $var + * @return $this + */ + public function setSupportedAnnotationTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\VisionAI\V1\StreamAnnotationType::class); + $this->supported_annotation_types = $arr; + + return $this; + } + + /** + * Indicates if the processor supports post processing. + * + * Generated from protobuf field bool supports_post_processing = 17; + * @return bool + */ + public function getSupportsPostProcessing() + { + return $this->supports_post_processing; + } + + /** + * Indicates if the processor supports post processing. + * + * Generated from protobuf field bool supports_post_processing = 17; + * @param bool $var + * @return $this + */ + public function setSupportsPostProcessing($var) + { + GPBUtil::checkBool($var); + $this->supports_post_processing = $var; + + return $this; + } + + /** + * Which instance types this processor supports; if empty, this default to + * STREAMING_PREDICTION. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * @return RepeatedField + */ + public function getSupportedInstanceTypes() + { + return $this->supported_instance_types; + } + + /** + * Which instance types this processor supports; if empty, this default to + * STREAMING_PREDICTION. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; + * @param int[] $var + * @return $this + */ + public function setSupportedInstanceTypes($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\VisionAI\V1\Instance\InstanceType::class); + $this->supported_instance_types = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor/ProcessorState.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor/ProcessorState.php new file mode 100644 index 000000000000..e9bf8d9c2be1 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor/ProcessorState.php @@ -0,0 +1,73 @@ +google.cloud.visionai.v1.Processor.ProcessorState + */ +class ProcessorState +{ + /** + * Unspecified Processor state. + * + * Generated from protobuf enum PROCESSOR_STATE_UNSPECIFIED = 0; + */ + const PROCESSOR_STATE_UNSPECIFIED = 0; + /** + * Processor is being created (not ready for use). + * + * Generated from protobuf enum CREATING = 1; + */ + const CREATING = 1; + /** + * Processor is and ready for use. + * + * Generated from protobuf enum ACTIVE = 2; + */ + const ACTIVE = 2; + /** + * Processor is being deleted (not ready for use). + * + * Generated from protobuf enum DELETING = 3; + */ + const DELETING = 3; + /** + * Processor deleted or creation failed . + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + + private static $valueToName = [ + self::PROCESSOR_STATE_UNSPECIFIED => 'PROCESSOR_STATE_UNSPECIFIED', + self::CREATING => 'CREATING', + self::ACTIVE => 'ACTIVE', + self::DELETING => 'DELETING', + self::FAILED => 'FAILED', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor/ProcessorType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor/ProcessorType.php new file mode 100644 index 000000000000..dbb9777b2de7 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor/ProcessorType.php @@ -0,0 +1,78 @@ +google.cloud.visionai.v1.Processor.ProcessorType + */ +class ProcessorType +{ + /** + * Processor Type UNSPECIFIED. + * + * Generated from protobuf enum PROCESSOR_TYPE_UNSPECIFIED = 0; + */ + const PROCESSOR_TYPE_UNSPECIFIED = 0; + /** + * Processor Type PRETRAINED. + * Pretrained processor is developed by Vision AI App Platform with + * state-of-the-art vision data processing functionality, like occupancy + * counting or person blur. Pretrained processor is usually publicly + * available. + * + * Generated from protobuf enum PRETRAINED = 1; + */ + const PRETRAINED = 1; + /** + * Processor Type CUSTOM. + * Custom processors are specialized processors which are either uploaded by + * customers or imported from other GCP platform (for example Vertex AI). + * Custom processor is only visible to the creator. + * + * Generated from protobuf enum CUSTOM = 2; + */ + const CUSTOM = 2; + /** + * Processor Type CONNECTOR. + * Connector processors are special processors which perform I/O for the + * application, they do not processing the data but either deliver the data + * to other processors or receive data from other processors. + * + * Generated from protobuf enum CONNECTOR = 3; + */ + const CONNECTOR = 3; + + private static $valueToName = [ + self::PROCESSOR_TYPE_UNSPECIFIED => 'PROCESSOR_TYPE_UNSPECIFIED', + self::PRETRAINED => 'PRETRAINED', + self::CUSTOM => 'CUSTOM', + self::CONNECTOR => 'CONNECTOR', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorConfig.php new file mode 100644 index 000000000000..53cc688d65f8 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorConfig.php @@ -0,0 +1,618 @@ +google.cloud.visionai.v1.ProcessorConfig + */ +class ProcessorConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Experimental configurations. Structured object containing not-yet-stable + * processor parameters. + * + * Generated from protobuf field .google.protobuf.Struct experimental_config = 26; + */ + protected $experimental_config = null; + protected $processor_config; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\VideoStreamInputConfig $video_stream_input_config + * Configs of stream input processor. + * @type \Google\Cloud\VisionAI\V1\AIEnabledDevicesInputConfig $ai_enabled_devices_input_config + * Config of AI-enabled input devices. + * @type \Google\Cloud\VisionAI\V1\MediaWarehouseConfig $media_warehouse_config + * Configs of media warehouse processor. + * @type \Google\Cloud\VisionAI\V1\PersonBlurConfig $person_blur_config + * Configs of person blur processor. + * @type \Google\Cloud\VisionAI\V1\OccupancyCountConfig $occupancy_count_config + * Configs of occupancy count processor. + * @type \Google\Cloud\VisionAI\V1\PersonVehicleDetectionConfig $person_vehicle_detection_config + * Configs of Person Vehicle Detection processor. + * @type \Google\Cloud\VisionAI\V1\VertexAutoMLVisionConfig $vertex_automl_vision_config + * Configs of Vertex AutoML vision processor. + * @type \Google\Cloud\VisionAI\V1\VertexAutoMLVideoConfig $vertex_automl_video_config + * Configs of Vertex AutoML video processor. + * @type \Google\Cloud\VisionAI\V1\VertexCustomConfig $vertex_custom_config + * Configs of Vertex Custom processor. + * @type \Google\Cloud\VisionAI\V1\GeneralObjectDetectionConfig $general_object_detection_config + * Configs of General Object Detection processor. + * @type \Google\Cloud\VisionAI\V1\BigQueryConfig $big_query_config + * Configs of BigQuery processor. + * @type \Google\Cloud\VisionAI\V1\GcsOutputConfig $gcs_output_config + * Configs of Cloud Storage output processor. + * @type \Google\Cloud\VisionAI\V1\ProductRecognizerConfig $product_recognizer_config + * Runtime configs of Product Recognizer processor. + * @type \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionConfig $personal_protective_equipment_detection_config + * Configs of personal_protective_equipment_detection_config + * @type \Google\Cloud\VisionAI\V1\TagRecognizerConfig $tag_recognizer_config + * Runtime configs of Tag Recognizer processor. + * @type \Google\Cloud\VisionAI\V1\UniversalInputConfig $universal_input_config + * Runtime configs of UniversalInput processor. + * @type \Google\Protobuf\Struct $experimental_config + * Experimental configurations. Structured object containing not-yet-stable + * processor parameters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Configs of stream input processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.VideoStreamInputConfig video_stream_input_config = 9; + * @return \Google\Cloud\VisionAI\V1\VideoStreamInputConfig|null + */ + public function getVideoStreamInputConfig() + { + return $this->readOneof(9); + } + + public function hasVideoStreamInputConfig() + { + return $this->hasOneof(9); + } + + /** + * Configs of stream input processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.VideoStreamInputConfig video_stream_input_config = 9; + * @param \Google\Cloud\VisionAI\V1\VideoStreamInputConfig $var + * @return $this + */ + public function setVideoStreamInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\VideoStreamInputConfig::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Config of AI-enabled input devices. + * + * Generated from protobuf field .google.cloud.visionai.v1.AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20; + * @return \Google\Cloud\VisionAI\V1\AIEnabledDevicesInputConfig|null + */ + public function getAiEnabledDevicesInputConfig() + { + return $this->readOneof(20); + } + + public function hasAiEnabledDevicesInputConfig() + { + return $this->hasOneof(20); + } + + /** + * Config of AI-enabled input devices. + * + * Generated from protobuf field .google.cloud.visionai.v1.AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20; + * @param \Google\Cloud\VisionAI\V1\AIEnabledDevicesInputConfig $var + * @return $this + */ + public function setAiEnabledDevicesInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AIEnabledDevicesInputConfig::class); + $this->writeOneof(20, $var); + + return $this; + } + + /** + * Configs of media warehouse processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.MediaWarehouseConfig media_warehouse_config = 10; + * @return \Google\Cloud\VisionAI\V1\MediaWarehouseConfig|null + */ + public function getMediaWarehouseConfig() + { + return $this->readOneof(10); + } + + public function hasMediaWarehouseConfig() + { + return $this->hasOneof(10); + } + + /** + * Configs of media warehouse processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.MediaWarehouseConfig media_warehouse_config = 10; + * @param \Google\Cloud\VisionAI\V1\MediaWarehouseConfig $var + * @return $this + */ + public function setMediaWarehouseConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\MediaWarehouseConfig::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Configs of person blur processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonBlurConfig person_blur_config = 11; + * @return \Google\Cloud\VisionAI\V1\PersonBlurConfig|null + */ + public function getPersonBlurConfig() + { + return $this->readOneof(11); + } + + public function hasPersonBlurConfig() + { + return $this->hasOneof(11); + } + + /** + * Configs of person blur processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonBlurConfig person_blur_config = 11; + * @param \Google\Cloud\VisionAI\V1\PersonBlurConfig $var + * @return $this + */ + public function setPersonBlurConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PersonBlurConfig::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Configs of occupancy count processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountConfig occupancy_count_config = 12; + * @return \Google\Cloud\VisionAI\V1\OccupancyCountConfig|null + */ + public function getOccupancyCountConfig() + { + return $this->readOneof(12); + } + + public function hasOccupancyCountConfig() + { + return $this->hasOneof(12); + } + + /** + * Configs of occupancy count processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountConfig occupancy_count_config = 12; + * @param \Google\Cloud\VisionAI\V1\OccupancyCountConfig $var + * @return $this + */ + public function setOccupancyCountConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OccupancyCountConfig::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Configs of Person Vehicle Detection processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonVehicleDetectionConfig person_vehicle_detection_config = 15; + * @return \Google\Cloud\VisionAI\V1\PersonVehicleDetectionConfig|null + */ + public function getPersonVehicleDetectionConfig() + { + return $this->readOneof(15); + } + + public function hasPersonVehicleDetectionConfig() + { + return $this->hasOneof(15); + } + + /** + * Configs of Person Vehicle Detection processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonVehicleDetectionConfig person_vehicle_detection_config = 15; + * @param \Google\Cloud\VisionAI\V1\PersonVehicleDetectionConfig $var + * @return $this + */ + public function setPersonVehicleDetectionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PersonVehicleDetectionConfig::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * Configs of Vertex AutoML vision processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.VertexAutoMLVisionConfig vertex_automl_vision_config = 13; + * @return \Google\Cloud\VisionAI\V1\VertexAutoMLVisionConfig|null + */ + public function getVertexAutomlVisionConfig() + { + return $this->readOneof(13); + } + + public function hasVertexAutomlVisionConfig() + { + return $this->hasOneof(13); + } + + /** + * Configs of Vertex AutoML vision processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.VertexAutoMLVisionConfig vertex_automl_vision_config = 13; + * @param \Google\Cloud\VisionAI\V1\VertexAutoMLVisionConfig $var + * @return $this + */ + public function setVertexAutomlVisionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\VertexAutoMLVisionConfig::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Configs of Vertex AutoML video processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.VertexAutoMLVideoConfig vertex_automl_video_config = 14; + * @return \Google\Cloud\VisionAI\V1\VertexAutoMLVideoConfig|null + */ + public function getVertexAutomlVideoConfig() + { + return $this->readOneof(14); + } + + public function hasVertexAutomlVideoConfig() + { + return $this->hasOneof(14); + } + + /** + * Configs of Vertex AutoML video processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.VertexAutoMLVideoConfig vertex_automl_video_config = 14; + * @param \Google\Cloud\VisionAI\V1\VertexAutoMLVideoConfig $var + * @return $this + */ + public function setVertexAutomlVideoConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\VertexAutoMLVideoConfig::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * Configs of Vertex Custom processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.VertexCustomConfig vertex_custom_config = 17; + * @return \Google\Cloud\VisionAI\V1\VertexCustomConfig|null + */ + public function getVertexCustomConfig() + { + return $this->readOneof(17); + } + + public function hasVertexCustomConfig() + { + return $this->hasOneof(17); + } + + /** + * Configs of Vertex Custom processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.VertexCustomConfig vertex_custom_config = 17; + * @param \Google\Cloud\VisionAI\V1\VertexCustomConfig $var + * @return $this + */ + public function setVertexCustomConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\VertexCustomConfig::class); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * Configs of General Object Detection processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.GeneralObjectDetectionConfig general_object_detection_config = 18; + * @return \Google\Cloud\VisionAI\V1\GeneralObjectDetectionConfig|null + */ + public function getGeneralObjectDetectionConfig() + { + return $this->readOneof(18); + } + + public function hasGeneralObjectDetectionConfig() + { + return $this->hasOneof(18); + } + + /** + * Configs of General Object Detection processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.GeneralObjectDetectionConfig general_object_detection_config = 18; + * @param \Google\Cloud\VisionAI\V1\GeneralObjectDetectionConfig $var + * @return $this + */ + public function setGeneralObjectDetectionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\GeneralObjectDetectionConfig::class); + $this->writeOneof(18, $var); + + return $this; + } + + /** + * Configs of BigQuery processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.BigQueryConfig big_query_config = 19; + * @return \Google\Cloud\VisionAI\V1\BigQueryConfig|null + */ + public function getBigQueryConfig() + { + return $this->readOneof(19); + } + + public function hasBigQueryConfig() + { + return $this->hasOneof(19); + } + + /** + * Configs of BigQuery processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.BigQueryConfig big_query_config = 19; + * @param \Google\Cloud\VisionAI\V1\BigQueryConfig $var + * @return $this + */ + public function setBigQueryConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\BigQueryConfig::class); + $this->writeOneof(19, $var); + + return $this; + } + + /** + * Configs of Cloud Storage output processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.GcsOutputConfig gcs_output_config = 27; + * @return \Google\Cloud\VisionAI\V1\GcsOutputConfig|null + */ + public function getGcsOutputConfig() + { + return $this->readOneof(27); + } + + public function hasGcsOutputConfig() + { + return $this->hasOneof(27); + } + + /** + * Configs of Cloud Storage output processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.GcsOutputConfig gcs_output_config = 27; + * @param \Google\Cloud\VisionAI\V1\GcsOutputConfig $var + * @return $this + */ + public function setGcsOutputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\GcsOutputConfig::class); + $this->writeOneof(27, $var); + + return $this; + } + + /** + * Runtime configs of Product Recognizer processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.ProductRecognizerConfig product_recognizer_config = 21; + * @return \Google\Cloud\VisionAI\V1\ProductRecognizerConfig|null + */ + public function getProductRecognizerConfig() + { + return $this->readOneof(21); + } + + public function hasProductRecognizerConfig() + { + return $this->hasOneof(21); + } + + /** + * Runtime configs of Product Recognizer processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.ProductRecognizerConfig product_recognizer_config = 21; + * @param \Google\Cloud\VisionAI\V1\ProductRecognizerConfig $var + * @return $this + */ + public function setProductRecognizerConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ProductRecognizerConfig::class); + $this->writeOneof(21, $var); + + return $this; + } + + /** + * Configs of personal_protective_equipment_detection_config + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22; + * @return \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionConfig|null + */ + public function getPersonalProtectiveEquipmentDetectionConfig() + { + return $this->readOneof(22); + } + + public function hasPersonalProtectiveEquipmentDetectionConfig() + { + return $this->hasOneof(22); + } + + /** + * Configs of personal_protective_equipment_detection_config + * + * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22; + * @param \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionConfig $var + * @return $this + */ + public function setPersonalProtectiveEquipmentDetectionConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionConfig::class); + $this->writeOneof(22, $var); + + return $this; + } + + /** + * Runtime configs of Tag Recognizer processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.TagRecognizerConfig tag_recognizer_config = 25; + * @return \Google\Cloud\VisionAI\V1\TagRecognizerConfig|null + */ + public function getTagRecognizerConfig() + { + return $this->readOneof(25); + } + + public function hasTagRecognizerConfig() + { + return $this->hasOneof(25); + } + + /** + * Runtime configs of Tag Recognizer processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.TagRecognizerConfig tag_recognizer_config = 25; + * @param \Google\Cloud\VisionAI\V1\TagRecognizerConfig $var + * @return $this + */ + public function setTagRecognizerConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\TagRecognizerConfig::class); + $this->writeOneof(25, $var); + + return $this; + } + + /** + * Runtime configs of UniversalInput processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.UniversalInputConfig universal_input_config = 28; + * @return \Google\Cloud\VisionAI\V1\UniversalInputConfig|null + */ + public function getUniversalInputConfig() + { + return $this->readOneof(28); + } + + public function hasUniversalInputConfig() + { + return $this->hasOneof(28); + } + + /** + * Runtime configs of UniversalInput processor. + * + * Generated from protobuf field .google.cloud.visionai.v1.UniversalInputConfig universal_input_config = 28; + * @param \Google\Cloud\VisionAI\V1\UniversalInputConfig $var + * @return $this + */ + public function setUniversalInputConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\UniversalInputConfig::class); + $this->writeOneof(28, $var); + + return $this; + } + + /** + * Experimental configurations. Structured object containing not-yet-stable + * processor parameters. + * + * Generated from protobuf field .google.protobuf.Struct experimental_config = 26; + * @return \Google\Protobuf\Struct|null + */ + public function getExperimentalConfig() + { + return $this->experimental_config; + } + + public function hasExperimentalConfig() + { + return isset($this->experimental_config); + } + + public function clearExperimentalConfig() + { + unset($this->experimental_config); + } + + /** + * Experimental configurations. Structured object containing not-yet-stable + * processor parameters. + * + * Generated from protobuf field .google.protobuf.Struct experimental_config = 26; + * @param \Google\Protobuf\Struct $var + * @return $this + */ + public function setExperimentalConfig($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); + $this->experimental_config = $var; + + return $this; + } + + /** + * @return string + */ + public function getProcessorConfig() + { + return $this->whichOneof("processor_config"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec.php new file mode 100644 index 000000000000..3a0b389e50f9 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec.php @@ -0,0 +1,185 @@ +google.cloud.visionai.v1.ProcessorIOSpec + */ +class ProcessorIOSpec extends \Google\Protobuf\Internal\Message +{ + /** + * For processors with input_channel_specs, the processor must be explicitly + * connected to another processor. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + */ + private $graph_input_channel_specs; + /** + * The output artifact specifications for the current processor. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + */ + private $graph_output_channel_specs; + /** + * The input resource that needs to be fed from the application instance. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + */ + private $instance_resource_input_binding_specs; + /** + * The output resource that the processor will generate per instance. + * Other than the explicitly listed output bindings here, all the processors' + * GraphOutputChannels can be binded to stream resource. The bind name then is + * the same as the GraphOutputChannel's name. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + */ + private $instance_resource_output_binding_specs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\ProcessorIOSpec\GraphInputChannelSpec[] $graph_input_channel_specs + * For processors with input_channel_specs, the processor must be explicitly + * connected to another processor. + * @type \Google\Cloud\VisionAI\V1\ProcessorIOSpec\GraphOutputChannelSpec[] $graph_output_channel_specs + * The output artifact specifications for the current processor. + * @type \Google\Cloud\VisionAI\V1\ProcessorIOSpec\InstanceResourceInputBindingSpec[] $instance_resource_input_binding_specs + * The input resource that needs to be fed from the application instance. + * @type \Google\Cloud\VisionAI\V1\ProcessorIOSpec\InstanceResourceOutputBindingSpec[] $instance_resource_output_binding_specs + * The output resource that the processor will generate per instance. + * Other than the explicitly listed output bindings here, all the processors' + * GraphOutputChannels can be binded to stream resource. The bind name then is + * the same as the GraphOutputChannel's name. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * For processors with input_channel_specs, the processor must be explicitly + * connected to another processor. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\ProcessorIOSpec\GraphInputChannelSpec> + */ + public function getGraphInputChannelSpecs() + { + return $this->graph_input_channel_specs; + } + + /** + * For processors with input_channel_specs, the processor must be explicitly + * connected to another processor. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; + * @param \Google\Cloud\VisionAI\V1\ProcessorIOSpec\GraphInputChannelSpec[] $var + * @return $this + */ + public function setGraphInputChannelSpecs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ProcessorIOSpec\GraphInputChannelSpec::class); + $this->graph_input_channel_specs = $arr; + + return $this; + } + + /** + * The output artifact specifications for the current processor. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\ProcessorIOSpec\GraphOutputChannelSpec> + */ + public function getGraphOutputChannelSpecs() + { + return $this->graph_output_channel_specs; + } + + /** + * The output artifact specifications for the current processor. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; + * @param \Google\Cloud\VisionAI\V1\ProcessorIOSpec\GraphOutputChannelSpec[] $var + * @return $this + */ + public function setGraphOutputChannelSpecs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ProcessorIOSpec\GraphOutputChannelSpec::class); + $this->graph_output_channel_specs = $arr; + + return $this; + } + + /** + * The input resource that needs to be fed from the application instance. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\ProcessorIOSpec\InstanceResourceInputBindingSpec> + */ + public function getInstanceResourceInputBindingSpecs() + { + return $this->instance_resource_input_binding_specs; + } + + /** + * The input resource that needs to be fed from the application instance. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; + * @param \Google\Cloud\VisionAI\V1\ProcessorIOSpec\InstanceResourceInputBindingSpec[] $var + * @return $this + */ + public function setInstanceResourceInputBindingSpecs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ProcessorIOSpec\InstanceResourceInputBindingSpec::class); + $this->instance_resource_input_binding_specs = $arr; + + return $this; + } + + /** + * The output resource that the processor will generate per instance. + * Other than the explicitly listed output bindings here, all the processors' + * GraphOutputChannels can be binded to stream resource. The bind name then is + * the same as the GraphOutputChannel's name. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\ProcessorIOSpec\InstanceResourceOutputBindingSpec> + */ + public function getInstanceResourceOutputBindingSpecs() + { + return $this->instance_resource_output_binding_specs; + } + + /** + * The output resource that the processor will generate per instance. + * Other than the explicitly listed output bindings here, all the processors' + * GraphOutputChannels can be binded to stream resource. The bind name then is + * the same as the GraphOutputChannel's name. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; + * @param \Google\Cloud\VisionAI\V1\ProcessorIOSpec\InstanceResourceOutputBindingSpec[] $var + * @return $this + */ + public function setInstanceResourceOutputBindingSpecs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ProcessorIOSpec\InstanceResourceOutputBindingSpec::class); + $this->instance_resource_output_binding_specs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/GraphInputChannelSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/GraphInputChannelSpec.php new file mode 100644 index 000000000000..48cebf916fa0 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/GraphInputChannelSpec.php @@ -0,0 +1,235 @@ +google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec + */ +class GraphInputChannelSpec extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the current input channel. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The data types of the current input channel. + * When this field has more than 1 value, it means this input channel can be + * connected to either of these different data types. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataType data_type = 2; + */ + protected $data_type = 0; + /** + * If specified, only those detailed data types can be connected to the + * processor. For example, jpeg stream for MEDIA, or PredictionResult proto + * for PROTO type. If unspecified, then any proto is accepted. + * + * Generated from protobuf field repeated string accepted_data_type_uris = 5; + */ + private $accepted_data_type_uris; + /** + * Whether the current input channel is required by the processor. + * For example, for a processor with required video input and optional audio + * input, if video input is missing, the application will be rejected while + * the audio input can be missing as long as the video input exists. + * + * Generated from protobuf field bool required = 3; + */ + protected $required = false; + /** + * How many input edges can be connected to this input channel. 0 means + * unlimited. + * + * Generated from protobuf field int64 max_connection_allowed = 4; + */ + protected $max_connection_allowed = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the current input channel. + * @type int $data_type + * The data types of the current input channel. + * When this field has more than 1 value, it means this input channel can be + * connected to either of these different data types. + * @type string[] $accepted_data_type_uris + * If specified, only those detailed data types can be connected to the + * processor. For example, jpeg stream for MEDIA, or PredictionResult proto + * for PROTO type. If unspecified, then any proto is accepted. + * @type bool $required + * Whether the current input channel is required by the processor. + * For example, for a processor with required video input and optional audio + * input, if video input is missing, the application will be rejected while + * the audio input can be missing as long as the video input exists. + * @type int|string $max_connection_allowed + * How many input edges can be connected to this input channel. 0 means + * unlimited. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * The name of the current input channel. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the current input channel. + * + * 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 data types of the current input channel. + * When this field has more than 1 value, it means this input channel can be + * connected to either of these different data types. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataType data_type = 2; + * @return int + */ + public function getDataType() + { + return $this->data_type; + } + + /** + * The data types of the current input channel. + * When this field has more than 1 value, it means this input channel can be + * connected to either of these different data types. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataType data_type = 2; + * @param int $var + * @return $this + */ + public function setDataType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\DataType::class); + $this->data_type = $var; + + return $this; + } + + /** + * If specified, only those detailed data types can be connected to the + * processor. For example, jpeg stream for MEDIA, or PredictionResult proto + * for PROTO type. If unspecified, then any proto is accepted. + * + * Generated from protobuf field repeated string accepted_data_type_uris = 5; + * @return RepeatedField + */ + public function getAcceptedDataTypeUris() + { + return $this->accepted_data_type_uris; + } + + /** + * If specified, only those detailed data types can be connected to the + * processor. For example, jpeg stream for MEDIA, or PredictionResult proto + * for PROTO type. If unspecified, then any proto is accepted. + * + * Generated from protobuf field repeated string accepted_data_type_uris = 5; + * @param string[] $var + * @return $this + */ + public function setAcceptedDataTypeUris($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->accepted_data_type_uris = $arr; + + return $this; + } + + /** + * Whether the current input channel is required by the processor. + * For example, for a processor with required video input and optional audio + * input, if video input is missing, the application will be rejected while + * the audio input can be missing as long as the video input exists. + * + * Generated from protobuf field bool required = 3; + * @return bool + */ + public function getRequired() + { + return $this->required; + } + + /** + * Whether the current input channel is required by the processor. + * For example, for a processor with required video input and optional audio + * input, if video input is missing, the application will be rejected while + * the audio input can be missing as long as the video input exists. + * + * Generated from protobuf field bool required = 3; + * @param bool $var + * @return $this + */ + public function setRequired($var) + { + GPBUtil::checkBool($var); + $this->required = $var; + + return $this; + } + + /** + * How many input edges can be connected to this input channel. 0 means + * unlimited. + * + * Generated from protobuf field int64 max_connection_allowed = 4; + * @return int|string + */ + public function getMaxConnectionAllowed() + { + return $this->max_connection_allowed; + } + + /** + * How many input edges can be connected to this input channel. 0 means + * unlimited. + * + * Generated from protobuf field int64 max_connection_allowed = 4; + * @param int|string $var + * @return $this + */ + public function setMaxConnectionAllowed($var) + { + GPBUtil::checkInt64($var); + $this->max_connection_allowed = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/GraphOutputChannelSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/GraphOutputChannelSpec.php new file mode 100644 index 000000000000..b872059061b3 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/GraphOutputChannelSpec.php @@ -0,0 +1,128 @@ +google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec + */ +class GraphOutputChannelSpec extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the current output channel. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The data type of the current output channel. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataType data_type = 2; + */ + protected $data_type = 0; + /** + * Generated from protobuf field string data_type_uri = 3; + */ + protected $data_type_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name of the current output channel. + * @type int $data_type + * The data type of the current output channel. + * @type string $data_type_uri + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * The name of the current output channel. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of the current output channel. + * + * 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 data type of the current output channel. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataType data_type = 2; + * @return int + */ + public function getDataType() + { + return $this->data_type; + } + + /** + * The data type of the current output channel. + * + * Generated from protobuf field .google.cloud.visionai.v1.DataType data_type = 2; + * @param int $var + * @return $this + */ + public function setDataType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\DataType::class); + $this->data_type = $var; + + return $this; + } + + /** + * Generated from protobuf field string data_type_uri = 3; + * @return string + */ + public function getDataTypeUri() + { + return $this->data_type_uri; + } + + /** + * Generated from protobuf field string data_type_uri = 3; + * @param string $var + * @return $this + */ + public function setDataTypeUri($var) + { + GPBUtil::checkString($var, True); + $this->data_type_uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/InstanceResourceInputBindingSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/InstanceResourceInputBindingSpec.php new file mode 100644 index 000000000000..712aba19b1d2 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/InstanceResourceInputBindingSpec.php @@ -0,0 +1,151 @@ +google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec + */ +class InstanceResourceInputBindingSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the input binding, unique within the processor. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + protected $resource_type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $config_type_uri + * The configuration proto that includes the Googleapis resources. I.e. + * type.googleapis.com/google.cloud.vision.v1.StreamWithAnnotation + * @type string $resource_type_uri + * The direct type url of Googleapis resource. i.e. + * type.googleapis.com/google.cloud.vision.v1.Asset + * @type string $name + * Name of the input binding, unique within the processor. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * The configuration proto that includes the Googleapis resources. I.e. + * type.googleapis.com/google.cloud.vision.v1.StreamWithAnnotation + * + * Generated from protobuf field string config_type_uri = 2; + * @return string + */ + public function getConfigTypeUri() + { + return $this->readOneof(2); + } + + public function hasConfigTypeUri() + { + return $this->hasOneof(2); + } + + /** + * The configuration proto that includes the Googleapis resources. I.e. + * type.googleapis.com/google.cloud.vision.v1.StreamWithAnnotation + * + * Generated from protobuf field string config_type_uri = 2; + * @param string $var + * @return $this + */ + public function setConfigTypeUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The direct type url of Googleapis resource. i.e. + * type.googleapis.com/google.cloud.vision.v1.Asset + * + * Generated from protobuf field string resource_type_uri = 3; + * @return string + */ + public function getResourceTypeUri() + { + return $this->readOneof(3); + } + + public function hasResourceTypeUri() + { + return $this->hasOneof(3); + } + + /** + * The direct type url of Googleapis resource. i.e. + * type.googleapis.com/google.cloud.vision.v1.Asset + * + * Generated from protobuf field string resource_type_uri = 3; + * @param string $var + * @return $this + */ + public function setResourceTypeUri($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Name of the input binding, unique within the processor. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the input binding, unique within the processor. + * + * 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; + } + + /** + * @return string + */ + public function getResourceType() + { + return $this->whichOneof("resource_type"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/InstanceResourceOutputBindingSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/InstanceResourceOutputBindingSpec.php new file mode 100644 index 000000000000..4ef1721898b7 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/InstanceResourceOutputBindingSpec.php @@ -0,0 +1,137 @@ +google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec + */ +class InstanceResourceOutputBindingSpec extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the output binding, unique within the processor. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The resource type uri of the acceptable output resource. + * + * Generated from protobuf field string resource_type_uri = 2; + */ + protected $resource_type_uri = ''; + /** + * Whether the output resource needs to be explicitly set in the instance. + * If it is false, the processor will automatically generate it if required. + * + * Generated from protobuf field bool explicit = 3; + */ + protected $explicit = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the output binding, unique within the processor. + * @type string $resource_type_uri + * The resource type uri of the acceptable output resource. + * @type bool $explicit + * Whether the output resource needs to be explicitly set in the instance. + * If it is false, the processor will automatically generate it if required. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Name of the output binding, unique within the processor. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the output binding, unique within the processor. + * + * 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 resource type uri of the acceptable output resource. + * + * Generated from protobuf field string resource_type_uri = 2; + * @return string + */ + public function getResourceTypeUri() + { + return $this->resource_type_uri; + } + + /** + * The resource type uri of the acceptable output resource. + * + * Generated from protobuf field string resource_type_uri = 2; + * @param string $var + * @return $this + */ + public function setResourceTypeUri($var) + { + GPBUtil::checkString($var, True); + $this->resource_type_uri = $var; + + return $this; + } + + /** + * Whether the output resource needs to be explicitly set in the instance. + * If it is false, the processor will automatically generate it if required. + * + * Generated from protobuf field bool explicit = 3; + * @return bool + */ + public function getExplicit() + { + return $this->explicit; + } + + /** + * Whether the output resource needs to be explicitly set in the instance. + * If it is false, the processor will automatically generate it if required. + * + * Generated from protobuf field bool explicit = 3; + * @param bool $var + * @return $this + */ + public function setExplicit($var) + { + GPBUtil::checkBool($var); + $this->explicit = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProductRecognizerConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProductRecognizerConfig.php new file mode 100644 index 000000000000..64161af49bc3 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProductRecognizerConfig.php @@ -0,0 +1,105 @@ +google.cloud.visionai.v1.ProductRecognizerConfig + */ +class ProductRecognizerConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of retail endpoint to use. + * + * Generated from protobuf field string retail_endpoint = 1; + */ + protected $retail_endpoint = ''; + /** + * Confidence threshold to filter detection results. If not set, a system + * default value will be used. + * + * Generated from protobuf field float recognition_confidence_threshold = 2; + */ + protected $recognition_confidence_threshold = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $retail_endpoint + * The resource name of retail endpoint to use. + * @type float $recognition_confidence_threshold + * Confidence threshold to filter detection results. If not set, a system + * default value will be used. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of retail endpoint to use. + * + * Generated from protobuf field string retail_endpoint = 1; + * @return string + */ + public function getRetailEndpoint() + { + return $this->retail_endpoint; + } + + /** + * The resource name of retail endpoint to use. + * + * Generated from protobuf field string retail_endpoint = 1; + * @param string $var + * @return $this + */ + public function setRetailEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->retail_endpoint = $var; + + return $this; + } + + /** + * Confidence threshold to filter detection results. If not set, a system + * default value will be used. + * + * Generated from protobuf field float recognition_confidence_threshold = 2; + * @return float + */ + public function getRecognitionConfidenceThreshold() + { + return $this->recognition_confidence_threshold; + } + + /** + * Confidence threshold to filter detection results. If not set, a system + * default value will be used. + * + * Generated from protobuf field float recognition_confidence_threshold = 2; + * @param float $var + * @return $this + */ + public function setRecognitionConfidenceThreshold($var) + { + GPBUtil::checkFloat($var); + $this->recognition_confidence_threshold = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RawImageDescriptor.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RawImageDescriptor.php new file mode 100644 index 000000000000..9f450c543efc --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RawImageDescriptor.php @@ -0,0 +1,135 @@ +google.cloud.visionai.v1.RawImageDescriptor + */ +class RawImageDescriptor extends \Google\Protobuf\Internal\Message +{ + /** + * Raw image format. Its possible values are: "srgb". + * + * Generated from protobuf field string format = 1; + */ + protected $format = ''; + /** + * The height of the image. + * + * Generated from protobuf field int32 height = 2; + */ + protected $height = 0; + /** + * The width of the image. + * + * Generated from protobuf field int32 width = 3; + */ + protected $width = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $format + * Raw image format. Its possible values are: "srgb". + * @type int $height + * The height of the image. + * @type int $width + * The width of the image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingResources::initOnce(); + parent::__construct($data); + } + + /** + * Raw image format. Its possible values are: "srgb". + * + * Generated from protobuf field string format = 1; + * @return string + */ + public function getFormat() + { + return $this->format; + } + + /** + * Raw image format. Its possible values are: "srgb". + * + * Generated from protobuf field string format = 1; + * @param string $var + * @return $this + */ + public function setFormat($var) + { + GPBUtil::checkString($var, True); + $this->format = $var; + + return $this; + } + + /** + * The height of the image. + * + * Generated from protobuf field int32 height = 2; + * @return int + */ + public function getHeight() + { + return $this->height; + } + + /** + * The height of the image. + * + * Generated from protobuf field int32 height = 2; + * @param int $var + * @return $this + */ + public function setHeight($var) + { + GPBUtil::checkInt32($var); + $this->height = $var; + + return $this; + } + + /** + * The width of the image. + * + * Generated from protobuf field int32 width = 3; + * @return int + */ + public function getWidth() + { + return $this->width; + } + + /** + * The width of the image. + * + * Generated from protobuf field int32 width = 3; + * @param int $var + * @return $this + */ + public function setWidth($var) + { + GPBUtil::checkInt32($var); + $this->width = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsControlResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsControlResponse.php new file mode 100644 index 000000000000..7a43892f745e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsControlResponse.php @@ -0,0 +1,126 @@ +google.cloud.visionai.v1.ReceiveEventsControlResponse + */ +class ReceiveEventsControlResponse extends \Google\Protobuf\Internal\Message +{ + protected $control; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $heartbeat + * A server heartbeat. + * @type bool $writes_done_request + * A request to the receiver to complete any final writes followed by a + * `WritesDone`; e.g. issue any final `CommitRequest`s. + * May be ignored if `WritesDone` has already been issued at any point + * prior to receiving this message. + * If `WritesDone` does not get issued, then the server will forcefully + * cancel the connection, and the receiver will likely receive an + * uninformative after `Read` returns `false` and `Finish` is called. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + + /** + * A server heartbeat. + * + * Generated from protobuf field bool heartbeat = 1; + * @return bool + */ + public function getHeartbeat() + { + return $this->readOneof(1); + } + + public function hasHeartbeat() + { + return $this->hasOneof(1); + } + + /** + * A server heartbeat. + * + * Generated from protobuf field bool heartbeat = 1; + * @param bool $var + * @return $this + */ + public function setHeartbeat($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A request to the receiver to complete any final writes followed by a + * `WritesDone`; e.g. issue any final `CommitRequest`s. + * May be ignored if `WritesDone` has already been issued at any point + * prior to receiving this message. + * If `WritesDone` does not get issued, then the server will forcefully + * cancel the connection, and the receiver will likely receive an + * uninformative after `Read` returns `false` and `Finish` is called. + * + * Generated from protobuf field bool writes_done_request = 2; + * @return bool + */ + public function getWritesDoneRequest() + { + return $this->readOneof(2); + } + + public function hasWritesDoneRequest() + { + return $this->hasOneof(2); + } + + /** + * A request to the receiver to complete any final writes followed by a + * `WritesDone`; e.g. issue any final `CommitRequest`s. + * May be ignored if `WritesDone` has already been issued at any point + * prior to receiving this message. + * If `WritesDone` does not get issued, then the server will forcefully + * cancel the connection, and the receiver will likely receive an + * uninformative after `Read` returns `false` and `Finish` is called. + * + * Generated from protobuf field bool writes_done_request = 2; + * @param bool $var + * @return $this + */ + public function setWritesDoneRequest($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getControl() + { + return $this->whichOneof("control"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsRequest.php new file mode 100644 index 000000000000..70ec5bfd5edb --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsRequest.php @@ -0,0 +1,108 @@ +google.cloud.visionai.v1.ReceiveEventsRequest + */ +class ReceiveEventsRequest extends \Google\Protobuf\Internal\Message +{ + protected $request; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\ReceiveEventsRequest\SetupRequest $setup_request + * The setup request to setup the RPC connection. + * @type \Google\Cloud\VisionAI\V1\CommitRequest $commit_request + * This request checkpoints the consumer's read progress. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + + /** + * The setup request to setup the RPC connection. + * + * Generated from protobuf field .google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest setup_request = 1; + * @return \Google\Cloud\VisionAI\V1\ReceiveEventsRequest\SetupRequest|null + */ + public function getSetupRequest() + { + return $this->readOneof(1); + } + + public function hasSetupRequest() + { + return $this->hasOneof(1); + } + + /** + * The setup request to setup the RPC connection. + * + * Generated from protobuf field .google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest setup_request = 1; + * @param \Google\Cloud\VisionAI\V1\ReceiveEventsRequest\SetupRequest $var + * @return $this + */ + public function setSetupRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ReceiveEventsRequest\SetupRequest::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * This request checkpoints the consumer's read progress. + * + * Generated from protobuf field .google.cloud.visionai.v1.CommitRequest commit_request = 2; + * @return \Google\Cloud\VisionAI\V1\CommitRequest|null + */ + public function getCommitRequest() + { + return $this->readOneof(2); + } + + public function hasCommitRequest() + { + return $this->hasOneof(2); + } + + /** + * This request checkpoints the consumer's read progress. + * + * Generated from protobuf field .google.cloud.visionai.v1.CommitRequest commit_request = 2; + * @param \Google\Cloud\VisionAI\V1\CommitRequest $var + * @return $this + */ + public function setCommitRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\CommitRequest::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getRequest() + { + return $this->whichOneof("request"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsRequest/SetupRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsRequest/SetupRequest.php new file mode 100644 index 000000000000..901aa585652b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsRequest/SetupRequest.php @@ -0,0 +1,300 @@ +google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest + */ +class SetupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The cluster name. + * + * Generated from protobuf field string cluster = 1; + */ + protected $cluster = ''; + /** + * The stream name. The service will return the events for the given stream. + * + * Generated from protobuf field string stream = 2; + */ + protected $stream = ''; + /** + * A name for the receiver to self-identify. + * This is used to keep track of a receiver's read progress. + * + * Generated from protobuf field string receiver = 3; + */ + protected $receiver = ''; + /** + * Controller mode configuration for receiving events from the server. + * + * Generated from protobuf field .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; + */ + protected $controlled_mode = null; + /** + * The maximum duration of server silence before the client determines the + * server unreachable. + * The client must either receive an `Event` update or a heart beat message + * before this duration expires; otherwise, the client will automatically + * cancel the current connection and retry. + * + * Generated from protobuf field .google.protobuf.Duration heartbeat_interval = 5; + */ + protected $heartbeat_interval = null; + /** + * The grace period after which a `writes_done_request` is issued, that a + * `WritesDone` is expected from the client. + * The server is free to cancel the RPC should this expire. + * A system default will be chosen if unset. + * + * Generated from protobuf field .google.protobuf.Duration writes_done_grace_period = 6; + */ + protected $writes_done_grace_period = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cluster + * The cluster name. + * @type string $stream + * The stream name. The service will return the events for the given stream. + * @type string $receiver + * A name for the receiver to self-identify. + * This is used to keep track of a receiver's read progress. + * @type \Google\Cloud\VisionAI\V1\ControlledMode $controlled_mode + * Controller mode configuration for receiving events from the server. + * @type \Google\Protobuf\Duration $heartbeat_interval + * The maximum duration of server silence before the client determines the + * server unreachable. + * The client must either receive an `Event` update or a heart beat message + * before this duration expires; otherwise, the client will automatically + * cancel the current connection and retry. + * @type \Google\Protobuf\Duration $writes_done_grace_period + * The grace period after which a `writes_done_request` is issued, that a + * `WritesDone` is expected from the client. + * The server is free to cancel the RPC should this expire. + * A system default will be chosen if unset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + + /** + * The cluster name. + * + * Generated from protobuf field string cluster = 1; + * @return string + */ + public function getCluster() + { + return $this->cluster; + } + + /** + * The cluster name. + * + * Generated from protobuf field string cluster = 1; + * @param string $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkString($var, True); + $this->cluster = $var; + + return $this; + } + + /** + * The stream name. The service will return the events for the given stream. + * + * Generated from protobuf field string stream = 2; + * @return string + */ + public function getStream() + { + return $this->stream; + } + + /** + * The stream name. The service will return the events for the given stream. + * + * Generated from protobuf field string stream = 2; + * @param string $var + * @return $this + */ + public function setStream($var) + { + GPBUtil::checkString($var, True); + $this->stream = $var; + + return $this; + } + + /** + * A name for the receiver to self-identify. + * This is used to keep track of a receiver's read progress. + * + * Generated from protobuf field string receiver = 3; + * @return string + */ + public function getReceiver() + { + return $this->receiver; + } + + /** + * A name for the receiver to self-identify. + * This is used to keep track of a receiver's read progress. + * + * Generated from protobuf field string receiver = 3; + * @param string $var + * @return $this + */ + public function setReceiver($var) + { + GPBUtil::checkString($var, True); + $this->receiver = $var; + + return $this; + } + + /** + * Controller mode configuration for receiving events from the server. + * + * Generated from protobuf field .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; + * @return \Google\Cloud\VisionAI\V1\ControlledMode|null + */ + public function getControlledMode() + { + return $this->controlled_mode; + } + + public function hasControlledMode() + { + return isset($this->controlled_mode); + } + + public function clearControlledMode() + { + unset($this->controlled_mode); + } + + /** + * Controller mode configuration for receiving events from the server. + * + * Generated from protobuf field .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; + * @param \Google\Cloud\VisionAI\V1\ControlledMode $var + * @return $this + */ + public function setControlledMode($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ControlledMode::class); + $this->controlled_mode = $var; + + return $this; + } + + /** + * The maximum duration of server silence before the client determines the + * server unreachable. + * The client must either receive an `Event` update or a heart beat message + * before this duration expires; otherwise, the client will automatically + * cancel the current connection and retry. + * + * Generated from protobuf field .google.protobuf.Duration heartbeat_interval = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getHeartbeatInterval() + { + return $this->heartbeat_interval; + } + + public function hasHeartbeatInterval() + { + return isset($this->heartbeat_interval); + } + + public function clearHeartbeatInterval() + { + unset($this->heartbeat_interval); + } + + /** + * The maximum duration of server silence before the client determines the + * server unreachable. + * The client must either receive an `Event` update or a heart beat message + * before this duration expires; otherwise, the client will automatically + * cancel the current connection and retry. + * + * Generated from protobuf field .google.protobuf.Duration heartbeat_interval = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setHeartbeatInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->heartbeat_interval = $var; + + return $this; + } + + /** + * The grace period after which a `writes_done_request` is issued, that a + * `WritesDone` is expected from the client. + * The server is free to cancel the RPC should this expire. + * A system default will be chosen if unset. + * + * Generated from protobuf field .google.protobuf.Duration writes_done_grace_period = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getWritesDoneGracePeriod() + { + return $this->writes_done_grace_period; + } + + public function hasWritesDoneGracePeriod() + { + return isset($this->writes_done_grace_period); + } + + public function clearWritesDoneGracePeriod() + { + unset($this->writes_done_grace_period); + } + + /** + * The grace period after which a `writes_done_request` is issued, that a + * `WritesDone` is expected from the client. + * The server is free to cancel the RPC should this expire. + * A system default will be chosen if unset. + * + * Generated from protobuf field .google.protobuf.Duration writes_done_grace_period = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWritesDoneGracePeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writes_done_grace_period = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsResponse.php new file mode 100644 index 000000000000..06944e249e64 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsResponse.php @@ -0,0 +1,108 @@ +google.cloud.visionai.v1.ReceiveEventsResponse + */ +class ReceiveEventsResponse extends \Google\Protobuf\Internal\Message +{ + protected $response; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\EventUpdate $event_update + * The event update message. + * @type \Google\Cloud\VisionAI\V1\ReceiveEventsControlResponse $control + * A control message from the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + + /** + * The event update message. + * + * Generated from protobuf field .google.cloud.visionai.v1.EventUpdate event_update = 1; + * @return \Google\Cloud\VisionAI\V1\EventUpdate|null + */ + public function getEventUpdate() + { + return $this->readOneof(1); + } + + public function hasEventUpdate() + { + return $this->hasOneof(1); + } + + /** + * The event update message. + * + * Generated from protobuf field .google.cloud.visionai.v1.EventUpdate event_update = 1; + * @param \Google\Cloud\VisionAI\V1\EventUpdate $var + * @return $this + */ + public function setEventUpdate($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\EventUpdate::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A control message from the server. + * + * Generated from protobuf field .google.cloud.visionai.v1.ReceiveEventsControlResponse control = 2; + * @return \Google\Cloud\VisionAI\V1\ReceiveEventsControlResponse|null + */ + public function getControl() + { + return $this->readOneof(2); + } + + public function hasControl() + { + return $this->hasOneof(2); + } + + /** + * A control message from the server. + * + * Generated from protobuf field .google.cloud.visionai.v1.ReceiveEventsControlResponse control = 2; + * @param \Google\Cloud\VisionAI\V1\ReceiveEventsControlResponse $var + * @return $this + */ + public function setControl($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ReceiveEventsControlResponse::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getResponse() + { + return $this->whichOneof("response"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsControlResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsControlResponse.php new file mode 100644 index 000000000000..f1f935e72e77 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsControlResponse.php @@ -0,0 +1,126 @@ +google.cloud.visionai.v1.ReceivePacketsControlResponse + */ +class ReceivePacketsControlResponse extends \Google\Protobuf\Internal\Message +{ + protected $control; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $heartbeat + * A server heartbeat. + * @type bool $writes_done_request + * A request to the receiver to complete any final writes followed by a + * `WritesDone`; e.g. issue any final `CommitRequest`s. + * May be ignored if `WritesDone` has already been issued at any point + * prior to receiving this message. + * If `WritesDone` does not get issued, then the server will forcefully + * cancel the connection, and the receiver will likely receive an + * uninformative after `Read` returns `false` and `Finish` is called. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + + /** + * A server heartbeat. + * + * Generated from protobuf field bool heartbeat = 1; + * @return bool + */ + public function getHeartbeat() + { + return $this->readOneof(1); + } + + public function hasHeartbeat() + { + return $this->hasOneof(1); + } + + /** + * A server heartbeat. + * + * Generated from protobuf field bool heartbeat = 1; + * @param bool $var + * @return $this + */ + public function setHeartbeat($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A request to the receiver to complete any final writes followed by a + * `WritesDone`; e.g. issue any final `CommitRequest`s. + * May be ignored if `WritesDone` has already been issued at any point + * prior to receiving this message. + * If `WritesDone` does not get issued, then the server will forcefully + * cancel the connection, and the receiver will likely receive an + * uninformative after `Read` returns `false` and `Finish` is called. + * + * Generated from protobuf field bool writes_done_request = 2; + * @return bool + */ + public function getWritesDoneRequest() + { + return $this->readOneof(2); + } + + public function hasWritesDoneRequest() + { + return $this->hasOneof(2); + } + + /** + * A request to the receiver to complete any final writes followed by a + * `WritesDone`; e.g. issue any final `CommitRequest`s. + * May be ignored if `WritesDone` has already been issued at any point + * prior to receiving this message. + * If `WritesDone` does not get issued, then the server will forcefully + * cancel the connection, and the receiver will likely receive an + * uninformative after `Read` returns `false` and `Finish` is called. + * + * Generated from protobuf field bool writes_done_request = 2; + * @param bool $var + * @return $this + */ + public function setWritesDoneRequest($var) + { + GPBUtil::checkBool($var); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getControl() + { + return $this->whichOneof("control"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsRequest.php new file mode 100644 index 000000000000..2eb3c07681c1 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsRequest.php @@ -0,0 +1,111 @@ +google.cloud.visionai.v1.ReceivePacketsRequest + */ +class ReceivePacketsRequest extends \Google\Protobuf\Internal\Message +{ + protected $request; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\ReceivePacketsRequest\SetupRequest $setup_request + * The request to setup the initial state of session. + * The client must send and only send this as the first message. + * @type \Google\Cloud\VisionAI\V1\CommitRequest $commit_request + * This request checkpoints the consumer's read progress. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + + /** + * The request to setup the initial state of session. + * The client must send and only send this as the first message. + * + * Generated from protobuf field .google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest setup_request = 6; + * @return \Google\Cloud\VisionAI\V1\ReceivePacketsRequest\SetupRequest|null + */ + public function getSetupRequest() + { + return $this->readOneof(6); + } + + public function hasSetupRequest() + { + return $this->hasOneof(6); + } + + /** + * The request to setup the initial state of session. + * The client must send and only send this as the first message. + * + * Generated from protobuf field .google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest setup_request = 6; + * @param \Google\Cloud\VisionAI\V1\ReceivePacketsRequest\SetupRequest $var + * @return $this + */ + public function setSetupRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ReceivePacketsRequest\SetupRequest::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * This request checkpoints the consumer's read progress. + * + * Generated from protobuf field .google.cloud.visionai.v1.CommitRequest commit_request = 7; + * @return \Google\Cloud\VisionAI\V1\CommitRequest|null + */ + public function getCommitRequest() + { + return $this->readOneof(7); + } + + public function hasCommitRequest() + { + return $this->hasOneof(7); + } + + /** + * This request checkpoints the consumer's read progress. + * + * Generated from protobuf field .google.cloud.visionai.v1.CommitRequest commit_request = 7; + * @param \Google\Cloud\VisionAI\V1\CommitRequest $var + * @return $this + */ + public function setCommitRequest($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\CommitRequest::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getRequest() + { + return $this->whichOneof("request"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsRequest/SetupRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsRequest/SetupRequest.php new file mode 100644 index 000000000000..fb31baf633c7 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsRequest/SetupRequest.php @@ -0,0 +1,306 @@ +google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest + */ +class SetupRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The configurations that specify where packets are retrieved. + * + * Generated from protobuf field .google.cloud.visionai.v1.RequestMetadata metadata = 1; + */ + protected $metadata = null; + /** + * A name for the receiver to self-identify. + * This is used to keep track of a receiver's read progress. + * + * Generated from protobuf field string receiver = 2; + */ + protected $receiver = ''; + /** + * The maximum duration of server silence before the client determines the + * server unreachable. + * The client must either receive a `Packet` or a heart beat message before + * this duration expires; otherwise, the client will automatically cancel + * the current connection and retry. + * + * Generated from protobuf field .google.protobuf.Duration heartbeat_interval = 5; + */ + protected $heartbeat_interval = null; + /** + * The grace period after which a `writes_done_request` is issued, that a + * `WritesDone` is expected from the client. + * The server is free to cancel the RPC should this expire. + * A system default will be chosen if unset. + * + * Generated from protobuf field .google.protobuf.Duration writes_done_grace_period = 6; + */ + protected $writes_done_grace_period = null; + protected $consumer_mode; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\EagerMode $eager_receive_mode + * Options for configuring eager mode. + * @type \Google\Cloud\VisionAI\V1\ControlledMode $controlled_receive_mode + * Options for configuring controlled mode. + * @type \Google\Cloud\VisionAI\V1\RequestMetadata $metadata + * The configurations that specify where packets are retrieved. + * @type string $receiver + * A name for the receiver to self-identify. + * This is used to keep track of a receiver's read progress. + * @type \Google\Protobuf\Duration $heartbeat_interval + * The maximum duration of server silence before the client determines the + * server unreachable. + * The client must either receive a `Packet` or a heart beat message before + * this duration expires; otherwise, the client will automatically cancel + * the current connection and retry. + * @type \Google\Protobuf\Duration $writes_done_grace_period + * The grace period after which a `writes_done_request` is issued, that a + * `WritesDone` is expected from the client. + * The server is free to cancel the RPC should this expire. + * A system default will be chosen if unset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + + /** + * Options for configuring eager mode. + * + * Generated from protobuf field .google.cloud.visionai.v1.EagerMode eager_receive_mode = 3; + * @return \Google\Cloud\VisionAI\V1\EagerMode|null + */ + public function getEagerReceiveMode() + { + return $this->readOneof(3); + } + + public function hasEagerReceiveMode() + { + return $this->hasOneof(3); + } + + /** + * Options for configuring eager mode. + * + * Generated from protobuf field .google.cloud.visionai.v1.EagerMode eager_receive_mode = 3; + * @param \Google\Cloud\VisionAI\V1\EagerMode $var + * @return $this + */ + public function setEagerReceiveMode($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\EagerMode::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Options for configuring controlled mode. + * + * Generated from protobuf field .google.cloud.visionai.v1.ControlledMode controlled_receive_mode = 4; + * @return \Google\Cloud\VisionAI\V1\ControlledMode|null + */ + public function getControlledReceiveMode() + { + return $this->readOneof(4); + } + + public function hasControlledReceiveMode() + { + return $this->hasOneof(4); + } + + /** + * Options for configuring controlled mode. + * + * Generated from protobuf field .google.cloud.visionai.v1.ControlledMode controlled_receive_mode = 4; + * @param \Google\Cloud\VisionAI\V1\ControlledMode $var + * @return $this + */ + public function setControlledReceiveMode($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ControlledMode::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The configurations that specify where packets are retrieved. + * + * Generated from protobuf field .google.cloud.visionai.v1.RequestMetadata metadata = 1; + * @return \Google\Cloud\VisionAI\V1\RequestMetadata|null + */ + public function getMetadata() + { + return $this->metadata; + } + + public function hasMetadata() + { + return isset($this->metadata); + } + + public function clearMetadata() + { + unset($this->metadata); + } + + /** + * The configurations that specify where packets are retrieved. + * + * Generated from protobuf field .google.cloud.visionai.v1.RequestMetadata metadata = 1; + * @param \Google\Cloud\VisionAI\V1\RequestMetadata $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\RequestMetadata::class); + $this->metadata = $var; + + return $this; + } + + /** + * A name for the receiver to self-identify. + * This is used to keep track of a receiver's read progress. + * + * Generated from protobuf field string receiver = 2; + * @return string + */ + public function getReceiver() + { + return $this->receiver; + } + + /** + * A name for the receiver to self-identify. + * This is used to keep track of a receiver's read progress. + * + * Generated from protobuf field string receiver = 2; + * @param string $var + * @return $this + */ + public function setReceiver($var) + { + GPBUtil::checkString($var, True); + $this->receiver = $var; + + return $this; + } + + /** + * The maximum duration of server silence before the client determines the + * server unreachable. + * The client must either receive a `Packet` or a heart beat message before + * this duration expires; otherwise, the client will automatically cancel + * the current connection and retry. + * + * Generated from protobuf field .google.protobuf.Duration heartbeat_interval = 5; + * @return \Google\Protobuf\Duration|null + */ + public function getHeartbeatInterval() + { + return $this->heartbeat_interval; + } + + public function hasHeartbeatInterval() + { + return isset($this->heartbeat_interval); + } + + public function clearHeartbeatInterval() + { + unset($this->heartbeat_interval); + } + + /** + * The maximum duration of server silence before the client determines the + * server unreachable. + * The client must either receive a `Packet` or a heart beat message before + * this duration expires; otherwise, the client will automatically cancel + * the current connection and retry. + * + * Generated from protobuf field .google.protobuf.Duration heartbeat_interval = 5; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setHeartbeatInterval($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->heartbeat_interval = $var; + + return $this; + } + + /** + * The grace period after which a `writes_done_request` is issued, that a + * `WritesDone` is expected from the client. + * The server is free to cancel the RPC should this expire. + * A system default will be chosen if unset. + * + * Generated from protobuf field .google.protobuf.Duration writes_done_grace_period = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getWritesDoneGracePeriod() + { + return $this->writes_done_grace_period; + } + + public function hasWritesDoneGracePeriod() + { + return isset($this->writes_done_grace_period); + } + + public function clearWritesDoneGracePeriod() + { + unset($this->writes_done_grace_period); + } + + /** + * The grace period after which a `writes_done_request` is issued, that a + * `WritesDone` is expected from the client. + * The server is free to cancel the RPC should this expire. + * A system default will be chosen if unset. + * + * Generated from protobuf field .google.protobuf.Duration writes_done_grace_period = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setWritesDoneGracePeriod($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->writes_done_grace_period = $var; + + return $this; + } + + /** + * @return string + */ + public function getConsumerMode() + { + return $this->whichOneof("consumer_mode"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsResponse.php new file mode 100644 index 000000000000..a52bf71879bd --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsResponse.php @@ -0,0 +1,108 @@ +google.cloud.visionai.v1.ReceivePacketsResponse + */ +class ReceivePacketsResponse extends \Google\Protobuf\Internal\Message +{ + protected $response; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Packet $packet + * A genuine data payload originating from the sender. + * @type \Google\Cloud\VisionAI\V1\ReceivePacketsControlResponse $control + * A control message from the server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + + /** + * A genuine data payload originating from the sender. + * + * Generated from protobuf field .google.cloud.visionai.v1.Packet packet = 1; + * @return \Google\Cloud\VisionAI\V1\Packet|null + */ + public function getPacket() + { + return $this->readOneof(1); + } + + public function hasPacket() + { + return $this->hasOneof(1); + } + + /** + * A genuine data payload originating from the sender. + * + * Generated from protobuf field .google.cloud.visionai.v1.Packet packet = 1; + * @param \Google\Cloud\VisionAI\V1\Packet $var + * @return $this + */ + public function setPacket($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Packet::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A control message from the server. + * + * Generated from protobuf field .google.cloud.visionai.v1.ReceivePacketsControlResponse control = 3; + * @return \Google\Cloud\VisionAI\V1\ReceivePacketsControlResponse|null + */ + public function getControl() + { + return $this->readOneof(3); + } + + public function hasControl() + { + return $this->hasOneof(3); + } + + /** + * A control message from the server. + * + * Generated from protobuf field .google.cloud.visionai.v1.ReceivePacketsControlResponse control = 3; + * @param \Google\Cloud\VisionAI\V1\ReceivePacketsControlResponse $var + * @return $this + */ + public function setControl($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ReceivePacketsControlResponse::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * @return string + */ + public function getResponse() + { + return $this->whichOneof("response"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Registry.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Registry.php new file mode 100644 index 000000000000..4111d60cb3e4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Registry.php @@ -0,0 +1,65 @@ +google.cloud.visionai.v1.Registry + */ +class Registry +{ + /** + * Registry is unspecified. + * + * Generated from protobuf enum REGISTRY_UNSPECIFIED = 0; + */ + const REGISTRY_UNSPECIFIED = 0; + /** + * Public Registry containing the public Operators released by Google. + * + * Generated from protobuf enum PUBLIC = 1; + */ + const PBPUBLIC = 1; + /** + * Private Registry containing the local registered operators. + * + * Generated from protobuf enum PRIVATE = 2; + */ + const PBPRIVATE = 2; + + private static $valueToName = [ + self::REGISTRY_UNSPECIFIED => 'REGISTRY_UNSPECIFIED', + self::PBPUBLIC => 'PUBLIC', + self::PBPRIVATE => 'PRIVATE', + ]; + + public static function name($value) + { + if (!isset(self::$valueToName[$value])) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no name defined for value %s', __CLASS__, $value)); + } + return self::$valueToName[$value]; + } + + + public static function value($name) + { + $const = __CLASS__ . '::' . strtoupper($name); + if (!defined($const)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReleaseLeaseRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReleaseLeaseRequest.php new file mode 100644 index 000000000000..4be280c04833 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReleaseLeaseRequest.php @@ -0,0 +1,135 @@ +google.cloud.visionai.v1.ReleaseLeaseRequest + */ +class ReleaseLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Lease id. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Series name. + * + * Generated from protobuf field string series = 2; + */ + protected $series = ''; + /** + * Lease owner. + * + * Generated from protobuf field string owner = 3; + */ + protected $owner = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Lease id. + * @type string $series + * Series name. + * @type string $owner + * Lease owner. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + + /** + * Lease id. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Lease id. + * + * 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; + } + + /** + * Series name. + * + * Generated from protobuf field string series = 2; + * @return string + */ + public function getSeries() + { + return $this->series; + } + + /** + * Series name. + * + * Generated from protobuf field string series = 2; + * @param string $var + * @return $this + */ + public function setSeries($var) + { + GPBUtil::checkString($var, True); + $this->series = $var; + + return $this; + } + + /** + * Lease owner. + * + * Generated from protobuf field string owner = 3; + * @return string + */ + public function getOwner() + { + return $this->owner; + } + + /** + * Lease owner. + * + * Generated from protobuf field string owner = 3; + * @param string $var + * @return $this + */ + public function setOwner($var) + { + GPBUtil::checkString($var, True); + $this->owner = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReleaseLeaseResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReleaseLeaseResponse.php new file mode 100644 index 000000000000..52cdd04d46d4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReleaseLeaseResponse.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.ReleaseLeaseResponse + */ +class ReleaseLeaseResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputRequest.php new file mode 100644 index 000000000000..aa744a3bc09c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputRequest.php @@ -0,0 +1,199 @@ +google.cloud.visionai.v1.RemoveApplicationStreamInputRequest + */ +class RemoveApplicationStreamInputRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The target stream to remove. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + */ + private $target_stream_inputs; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * Please see {@see AppPlatformClient::applicationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\RemoveApplicationStreamInputRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @type \Google\Cloud\VisionAI\V1\RemoveApplicationStreamInputRequest\TargetStreamInput[] $target_stream_inputs + * The target stream to remove. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * 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 target stream to remove. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\RemoveApplicationStreamInputRequest\TargetStreamInput> + */ + public function getTargetStreamInputs() + { + return $this->target_stream_inputs; + } + + /** + * The target stream to remove. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; + * @param \Google\Cloud\VisionAI\V1\RemoveApplicationStreamInputRequest\TargetStreamInput[] $var + * @return $this + */ + public function setTargetStreamInputs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\RemoveApplicationStreamInputRequest\TargetStreamInput::class); + $this->target_stream_inputs = $arr; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputRequest/TargetStreamInput.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputRequest/TargetStreamInput.php new file mode 100644 index 000000000000..ba1e30f536b4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputRequest/TargetStreamInput.php @@ -0,0 +1,60 @@ +google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput + */ +class TargetStreamInput extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string stream = 1 [(.google.api.resource_reference) = { + */ + protected $stream = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $stream + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string stream = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getStream() + { + return $this->stream; + } + + /** + * Generated from protobuf field string stream = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setStream($var) + { + GPBUtil::checkString($var, True); + $this->stream = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputResponse.php new file mode 100644 index 000000000000..4feb4f9ce02f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputResponse.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.RemoveApplicationStreamInputResponse + */ +class RemoveApplicationStreamInputResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveCollectionItemRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveCollectionItemRequest.php new file mode 100644 index 000000000000..71adf6246716 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveCollectionItemRequest.php @@ -0,0 +1,90 @@ +google.cloud.visionai.v1.RemoveCollectionItemRequest + */ +class RemoveCollectionItemRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The item to be removed. + * + * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $item = null; + + /** + * @param \Google\Cloud\VisionAI\V1\CollectionItem $item Required. The item to be removed. + * + * @return \Google\Cloud\VisionAI\V1\RemoveCollectionItemRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\CollectionItem $item): self + { + return (new self()) + ->setItem($item); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\CollectionItem $item + * Required. The item to be removed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The item to be removed. + * + * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\CollectionItem|null + */ + public function getItem() + { + return $this->item; + } + + public function hasItem() + { + return isset($this->item); + } + + public function clearItem() + { + unset($this->item); + } + + /** + * Required. The item to be removed. + * + * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\CollectionItem $var + * @return $this + */ + public function setItem($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\CollectionItem::class); + $this->item = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveCollectionItemResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveCollectionItemResponse.php new file mode 100644 index 000000000000..acf4616e8162 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveCollectionItemResponse.php @@ -0,0 +1,77 @@ +google.cloud.visionai.v1.RemoveCollectionItemResponse + */ +class RemoveCollectionItemResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The item that has already been removed. + * + * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1; + */ + protected $item = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\CollectionItem $item + * The item that has already been removed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The item that has already been removed. + * + * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1; + * @return \Google\Cloud\VisionAI\V1\CollectionItem|null + */ + public function getItem() + { + return $this->item; + } + + public function hasItem() + { + return isset($this->item); + } + + public function clearItem() + { + unset($this->item); + } + + /** + * The item that has already been removed. + * + * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1; + * @param \Google\Cloud\VisionAI\V1\CollectionItem $var + * @return $this + */ + public function setItem($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\CollectionItem::class); + $this->item = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetMetadata.php new file mode 100644 index 000000000000..7699d78bd05f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetMetadata.php @@ -0,0 +1,165 @@ +google.cloud.visionai.v1.RemoveIndexAssetMetadata + */ +class RemoveIndexAssetMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The status of indexing this asset. + * + * Generated from protobuf field .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; + */ + protected $indexing_status = null; + /** + * The start time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; + */ + protected $start_time = null; + /** + * The update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\IndexingStatus $indexing_status + * The status of indexing this asset. + * @type \Google\Protobuf\Timestamp $start_time + * The start time of the operation. + * @type \Google\Protobuf\Timestamp $update_time + * The update time of the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The status of indexing this asset. + * + * Generated from protobuf field .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; + * @return \Google\Cloud\VisionAI\V1\IndexingStatus|null + */ + public function getIndexingStatus() + { + return $this->indexing_status; + } + + public function hasIndexingStatus() + { + return isset($this->indexing_status); + } + + public function clearIndexingStatus() + { + unset($this->indexing_status); + } + + /** + * The status of indexing this asset. + * + * Generated from protobuf field .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; + * @param \Google\Cloud\VisionAI\V1\IndexingStatus $var + * @return $this + */ + public function setIndexingStatus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\IndexingStatus::class); + $this->indexing_status = $var; + + return $this; + } + + /** + * The start time of the operation. + * + * 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 of the operation. + * + * 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 update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * The update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetRequest.php new file mode 100644 index 000000000000..5b5f85327568 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetRequest.php @@ -0,0 +1,117 @@ +google.cloud.visionai.v1.RemoveIndexAssetRequest + */ +class RemoveIndexAssetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the asset to index. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. The name of the index. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * + * Generated from protobuf field string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + */ + protected $index = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the asset to index. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * @type string $index + * Optional. The name of the index. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the asset to index. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the asset to index. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The name of the index. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * + * Generated from protobuf field string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @return string + */ + public function getIndex() + { + return $this->index; + } + + /** + * Optional. The name of the index. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * + * Generated from protobuf field string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkString($var, True); + $this->index = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetResponse.php new file mode 100644 index 000000000000..ea18c294c1c2 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetResponse.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.RemoveIndexAssetResponse + */ +class RemoveIndexAssetResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RenewLeaseRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RenewLeaseRequest.php new file mode 100644 index 000000000000..067dc619bd56 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RenewLeaseRequest.php @@ -0,0 +1,179 @@ +google.cloud.visionai.v1.RenewLeaseRequest + */ +class RenewLeaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Lease id. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * Series name. + * + * Generated from protobuf field string series = 2; + */ + protected $series = ''; + /** + * Lease owner. + * + * Generated from protobuf field string owner = 3; + */ + protected $owner = ''; + /** + * Lease term. + * + * Generated from protobuf field .google.protobuf.Duration term = 4; + */ + protected $term = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * Lease id. + * @type string $series + * Series name. + * @type string $owner + * Lease owner. + * @type \Google\Protobuf\Duration $term + * Lease term. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + + /** + * Lease id. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * Lease id. + * + * 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; + } + + /** + * Series name. + * + * Generated from protobuf field string series = 2; + * @return string + */ + public function getSeries() + { + return $this->series; + } + + /** + * Series name. + * + * Generated from protobuf field string series = 2; + * @param string $var + * @return $this + */ + public function setSeries($var) + { + GPBUtil::checkString($var, True); + $this->series = $var; + + return $this; + } + + /** + * Lease owner. + * + * Generated from protobuf field string owner = 3; + * @return string + */ + public function getOwner() + { + return $this->owner; + } + + /** + * Lease owner. + * + * Generated from protobuf field string owner = 3; + * @param string $var + * @return $this + */ + public function setOwner($var) + { + GPBUtil::checkString($var, True); + $this->owner = $var; + + return $this; + } + + /** + * Lease term. + * + * Generated from protobuf field .google.protobuf.Duration term = 4; + * @return \Google\Protobuf\Duration|null + */ + public function getTerm() + { + return $this->term; + } + + public function hasTerm() + { + return isset($this->term); + } + + public function clearTerm() + { + unset($this->term); + } + + /** + * Lease term. + * + * Generated from protobuf field .google.protobuf.Duration term = 4; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setTerm($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->term = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RequestMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RequestMetadata.php new file mode 100644 index 000000000000..b2f03fdc99ef --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RequestMetadata.php @@ -0,0 +1,259 @@ +google.cloud.visionai.v1.RequestMetadata + */ +class RequestMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Stream name. + * + * Generated from protobuf field string stream = 1; + */ + protected $stream = ''; + /** + * Evevt name. + * + * Generated from protobuf field string event = 2; + */ + protected $event = ''; + /** + * Series name. + * + * Generated from protobuf field string series = 3; + */ + protected $series = ''; + /** + * Lease id. + * + * Generated from protobuf field string lease_id = 4; + */ + protected $lease_id = ''; + /** + * Owner name. + * + * Generated from protobuf field string owner = 5; + */ + protected $owner = ''; + /** + * Lease term specifies how long the client wants the session to be maintained + * by the server after the client leaves. If the lease term is not set, the + * server will release the session immediately and the client cannot reconnect + * to the same session later. + * + * Generated from protobuf field .google.protobuf.Duration lease_term = 6; + */ + protected $lease_term = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $stream + * Stream name. + * @type string $event + * Evevt name. + * @type string $series + * Series name. + * @type string $lease_id + * Lease id. + * @type string $owner + * Owner name. + * @type \Google\Protobuf\Duration $lease_term + * Lease term specifies how long the client wants the session to be maintained + * by the server after the client leaves. If the lease term is not set, the + * server will release the session immediately and the client cannot reconnect + * to the same session later. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + + /** + * Stream name. + * + * Generated from protobuf field string stream = 1; + * @return string + */ + public function getStream() + { + return $this->stream; + } + + /** + * Stream name. + * + * Generated from protobuf field string stream = 1; + * @param string $var + * @return $this + */ + public function setStream($var) + { + GPBUtil::checkString($var, True); + $this->stream = $var; + + return $this; + } + + /** + * Evevt name. + * + * Generated from protobuf field string event = 2; + * @return string + */ + public function getEvent() + { + return $this->event; + } + + /** + * Evevt name. + * + * Generated from protobuf field string event = 2; + * @param string $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkString($var, True); + $this->event = $var; + + return $this; + } + + /** + * Series name. + * + * Generated from protobuf field string series = 3; + * @return string + */ + public function getSeries() + { + return $this->series; + } + + /** + * Series name. + * + * Generated from protobuf field string series = 3; + * @param string $var + * @return $this + */ + public function setSeries($var) + { + GPBUtil::checkString($var, True); + $this->series = $var; + + return $this; + } + + /** + * Lease id. + * + * Generated from protobuf field string lease_id = 4; + * @return string + */ + public function getLeaseId() + { + return $this->lease_id; + } + + /** + * Lease id. + * + * Generated from protobuf field string lease_id = 4; + * @param string $var + * @return $this + */ + public function setLeaseId($var) + { + GPBUtil::checkString($var, True); + $this->lease_id = $var; + + return $this; + } + + /** + * Owner name. + * + * Generated from protobuf field string owner = 5; + * @return string + */ + public function getOwner() + { + return $this->owner; + } + + /** + * Owner name. + * + * Generated from protobuf field string owner = 5; + * @param string $var + * @return $this + */ + public function setOwner($var) + { + GPBUtil::checkString($var, True); + $this->owner = $var; + + return $this; + } + + /** + * Lease term specifies how long the client wants the session to be maintained + * by the server after the client leaves. If the lease term is not set, the + * server will release the session immediately and the client cannot reconnect + * to the same session later. + * + * Generated from protobuf field .google.protobuf.Duration lease_term = 6; + * @return \Google\Protobuf\Duration|null + */ + public function getLeaseTerm() + { + return $this->lease_term; + } + + public function hasLeaseTerm() + { + return isset($this->lease_term); + } + + public function clearLeaseTerm() + { + unset($this->lease_term); + } + + /** + * Lease term specifies how long the client wants the session to be maintained + * by the server after the client leaves. If the lease term is not set, the + * server will release the session immediately and the client cannot reconnect + * to the same session later. + * + * Generated from protobuf field .google.protobuf.Duration lease_term = 6; + * @param \Google\Protobuf\Duration $var + * @return $this + */ + public function setLeaseTerm($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); + $this->lease_term = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResolveOperatorInfoRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResolveOperatorInfoRequest.php new file mode 100644 index 000000000000..bae045771649 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResolveOperatorInfoRequest.php @@ -0,0 +1,117 @@ +google.cloud.visionai.v1.ResolveOperatorInfoRequest + */ +class ResolveOperatorInfoRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Parent value for ResolveOperatorInfoRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The operator queries. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + private $queries; + + /** + * @param string $parent Required. Parent value for ResolveOperatorInfoRequest. Please see + * {@see LiveVideoAnalyticsClient::locationName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\OperatorQuery[] $queries Required. The operator queries. + * + * @return \Google\Cloud\VisionAI\V1\ResolveOperatorInfoRequest + * + * @experimental + */ + public static function build(string $parent, array $queries): self + { + return (new self()) + ->setParent($parent) + ->setQueries($queries); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Parent value for ResolveOperatorInfoRequest. + * @type \Google\Cloud\VisionAI\V1\OperatorQuery[] $queries + * Required. The operator queries. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Parent value for ResolveOperatorInfoRequest. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * Required. Parent value for ResolveOperatorInfoRequest. + * + * 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 operator queries. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\OperatorQuery> + */ + public function getQueries() + { + return $this->queries; + } + + /** + * Required. The operator queries. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\OperatorQuery[] $var + * @return $this + */ + public function setQueries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OperatorQuery::class); + $this->queries = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResolveOperatorInfoResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResolveOperatorInfoResponse.php new file mode 100644 index 000000000000..3c57c9a05a3b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResolveOperatorInfoResponse.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.ResolveOperatorInfoResponse + */ +class ResolveOperatorInfoResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Operators with detailed information. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Operator operators = 1; + */ + private $operators; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Operator[] $operators + * Operators with detailed information. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Operators with detailed information. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Operator operators = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Operator> + */ + public function getOperators() + { + return $this->operators; + } + + /** + * Operators with detailed information. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Operator operators = 1; + * @param \Google\Cloud\VisionAI\V1\Operator[] $var + * @return $this + */ + public function setOperators($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Operator::class); + $this->operators = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResourceAnnotations.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResourceAnnotations.php new file mode 100644 index 000000000000..fa83b487bc47 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResourceAnnotations.php @@ -0,0 +1,129 @@ +google.cloud.visionai.v1.ResourceAnnotations + */ +class ResourceAnnotations extends \Google\Protobuf\Internal\Message +{ + /** + * Annotations that will be applied to the whole application. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + */ + private $application_annotations; + /** + * Annotations that will be applied to the specific node of the application. + * If the same type of the annotations is applied to both application and + * node, the node annotation will be added in addition to the global + * application one. + * For example, if there is one active zone annotation for the whole + * application and one active zone annotation for the Occupancy Analytic + * processor, then the Occupancy Analytic processor will have two active zones + * defined. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + */ + private $node_annotations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\StreamAnnotation[] $application_annotations + * Annotations that will be applied to the whole application. + * @type \Google\Cloud\VisionAI\V1\ApplicationNodeAnnotation[] $node_annotations + * Annotations that will be applied to the specific node of the application. + * If the same type of the annotations is applied to both application and + * node, the node annotation will be added in addition to the global + * application one. + * For example, if there is one active zone annotation for the whole + * application and one active zone annotation for the Occupancy Analytic + * processor, then the Occupancy Analytic processor will have two active zones + * defined. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Annotations that will be applied to the whole application. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\StreamAnnotation> + */ + public function getApplicationAnnotations() + { + return $this->application_annotations; + } + + /** + * Annotations that will be applied to the whole application. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; + * @param \Google\Cloud\VisionAI\V1\StreamAnnotation[] $var + * @return $this + */ + public function setApplicationAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\StreamAnnotation::class); + $this->application_annotations = $arr; + + return $this; + } + + /** + * Annotations that will be applied to the specific node of the application. + * If the same type of the annotations is applied to both application and + * node, the node annotation will be added in addition to the global + * application one. + * For example, if there is one active zone annotation for the whole + * application and one active zone annotation for the Occupancy Analytic + * processor, then the Occupancy Analytic processor will have two active zones + * defined. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\ApplicationNodeAnnotation> + */ + public function getNodeAnnotations() + { + return $this->node_annotations; + } + + /** + * Annotations that will be applied to the specific node of the application. + * If the same type of the annotations is applied to both application and + * node, the node annotation will be added in addition to the global + * application one. + * For example, if there is one active zone annotation for the whole + * application and one active zone annotation for the Occupancy Analytic + * processor, then the Occupancy Analytic processor will have two active zones + * defined. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; + * @param \Google\Cloud\VisionAI\V1\ApplicationNodeAnnotation[] $var + * @return $this + */ + public function setNodeAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ApplicationNodeAnnotation::class); + $this->node_annotations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResourceSpecification.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResourceSpecification.php new file mode 100644 index 000000000000..9c1222c4fde9 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResourceSpecification.php @@ -0,0 +1,337 @@ +google.cloud.visionai.v1.ResourceSpecification + */ +class ResourceSpecification extends \Google\Protobuf\Internal\Message +{ + /** + * CPU specification. + * Examples: + * "100m", "0.5", "1", "2", ... correspond to + * 0.1, half, 1, or 2 cpus. + * Leave empty to let the system decide. + * Note that this does *not* determine the cpu vender/make, + * or its underlying clock speed and specific SIMD features. + * It is only the amount time it requires in timeslicing. + * + * Generated from protobuf field string cpu = 1; + */ + protected $cpu = ''; + /** + * CPU limit. + * Examples: + * "100m", "0.5", "1", "2", ... correspond to + * 0.1, half, 1, or 2 cpus. + * Leave empty to indicate no limit. + * + * Generated from protobuf field string cpu_limits = 5; + */ + protected $cpu_limits = ''; + /** + * Memory specification (in bytes). + * Examples: + * "128974848", "129e6", "129M", "123Mi", ... correspond to + * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes. + * Leave empty to let the system decide. + * + * Generated from protobuf field string memory = 2; + */ + protected $memory = ''; + /** + * Memory usage limits. + * Examples: + * "128974848", "129e6", "129M", "123Mi", ... correspond to + * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes. + * Leave empty to indicate no limit. + * + * Generated from protobuf field string memory_limits = 6; + */ + protected $memory_limits = ''; + /** + * Number of gpus. + * + * Generated from protobuf field int32 gpus = 3; + */ + protected $gpus = 0; + /** + * The maximum latency that this operator may use to process an element. + * If non positive, then a system default will be used. + * Operator developers should arrange for the system compute resources to be + * aligned with this latency budget; e.g. if you want a ML model to produce + * results within 500ms, then you should make sure you request enough + * cpu/gpu/memory to achieve that. + * + * Generated from protobuf field int32 latency_budget_ms = 4; + */ + protected $latency_budget_ms = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $cpu + * CPU specification. + * Examples: + * "100m", "0.5", "1", "2", ... correspond to + * 0.1, half, 1, or 2 cpus. + * Leave empty to let the system decide. + * Note that this does *not* determine the cpu vender/make, + * or its underlying clock speed and specific SIMD features. + * It is only the amount time it requires in timeslicing. + * @type string $cpu_limits + * CPU limit. + * Examples: + * "100m", "0.5", "1", "2", ... correspond to + * 0.1, half, 1, or 2 cpus. + * Leave empty to indicate no limit. + * @type string $memory + * Memory specification (in bytes). + * Examples: + * "128974848", "129e6", "129M", "123Mi", ... correspond to + * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes. + * Leave empty to let the system decide. + * @type string $memory_limits + * Memory usage limits. + * Examples: + * "128974848", "129e6", "129M", "123Mi", ... correspond to + * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes. + * Leave empty to indicate no limit. + * @type int $gpus + * Number of gpus. + * @type int $latency_budget_ms + * The maximum latency that this operator may use to process an element. + * If non positive, then a system default will be used. + * Operator developers should arrange for the system compute resources to be + * aligned with this latency budget; e.g. if you want a ML model to produce + * results within 500ms, then you should make sure you request enough + * cpu/gpu/memory to achieve that. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); + parent::__construct($data); + } + + /** + * CPU specification. + * Examples: + * "100m", "0.5", "1", "2", ... correspond to + * 0.1, half, 1, or 2 cpus. + * Leave empty to let the system decide. + * Note that this does *not* determine the cpu vender/make, + * or its underlying clock speed and specific SIMD features. + * It is only the amount time it requires in timeslicing. + * + * Generated from protobuf field string cpu = 1; + * @return string + */ + public function getCpu() + { + return $this->cpu; + } + + /** + * CPU specification. + * Examples: + * "100m", "0.5", "1", "2", ... correspond to + * 0.1, half, 1, or 2 cpus. + * Leave empty to let the system decide. + * Note that this does *not* determine the cpu vender/make, + * or its underlying clock speed and specific SIMD features. + * It is only the amount time it requires in timeslicing. + * + * Generated from protobuf field string cpu = 1; + * @param string $var + * @return $this + */ + public function setCpu($var) + { + GPBUtil::checkString($var, True); + $this->cpu = $var; + + return $this; + } + + /** + * CPU limit. + * Examples: + * "100m", "0.5", "1", "2", ... correspond to + * 0.1, half, 1, or 2 cpus. + * Leave empty to indicate no limit. + * + * Generated from protobuf field string cpu_limits = 5; + * @return string + */ + public function getCpuLimits() + { + return $this->cpu_limits; + } + + /** + * CPU limit. + * Examples: + * "100m", "0.5", "1", "2", ... correspond to + * 0.1, half, 1, or 2 cpus. + * Leave empty to indicate no limit. + * + * Generated from protobuf field string cpu_limits = 5; + * @param string $var + * @return $this + */ + public function setCpuLimits($var) + { + GPBUtil::checkString($var, True); + $this->cpu_limits = $var; + + return $this; + } + + /** + * Memory specification (in bytes). + * Examples: + * "128974848", "129e6", "129M", "123Mi", ... correspond to + * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes. + * Leave empty to let the system decide. + * + * Generated from protobuf field string memory = 2; + * @return string + */ + public function getMemory() + { + return $this->memory; + } + + /** + * Memory specification (in bytes). + * Examples: + * "128974848", "129e6", "129M", "123Mi", ... correspond to + * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes. + * Leave empty to let the system decide. + * + * Generated from protobuf field string memory = 2; + * @param string $var + * @return $this + */ + public function setMemory($var) + { + GPBUtil::checkString($var, True); + $this->memory = $var; + + return $this; + } + + /** + * Memory usage limits. + * Examples: + * "128974848", "129e6", "129M", "123Mi", ... correspond to + * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes. + * Leave empty to indicate no limit. + * + * Generated from protobuf field string memory_limits = 6; + * @return string + */ + public function getMemoryLimits() + { + return $this->memory_limits; + } + + /** + * Memory usage limits. + * Examples: + * "128974848", "129e6", "129M", "123Mi", ... correspond to + * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes. + * Leave empty to indicate no limit. + * + * Generated from protobuf field string memory_limits = 6; + * @param string $var + * @return $this + */ + public function setMemoryLimits($var) + { + GPBUtil::checkString($var, True); + $this->memory_limits = $var; + + return $this; + } + + /** + * Number of gpus. + * + * Generated from protobuf field int32 gpus = 3; + * @return int + */ + public function getGpus() + { + return $this->gpus; + } + + /** + * Number of gpus. + * + * Generated from protobuf field int32 gpus = 3; + * @param int $var + * @return $this + */ + public function setGpus($var) + { + GPBUtil::checkInt32($var); + $this->gpus = $var; + + return $this; + } + + /** + * The maximum latency that this operator may use to process an element. + * If non positive, then a system default will be used. + * Operator developers should arrange for the system compute resources to be + * aligned with this latency budget; e.g. if you want a ML model to produce + * results within 500ms, then you should make sure you request enough + * cpu/gpu/memory to achieve that. + * + * Generated from protobuf field int32 latency_budget_ms = 4; + * @return int + */ + public function getLatencyBudgetMs() + { + return $this->latency_budget_ms; + } + + /** + * The maximum latency that this operator may use to process an element. + * If non positive, then a system default will be used. + * Operator developers should arrange for the system compute resources to be + * aligned with this latency budget; e.g. if you want a ML model to produce + * results within 500ms, then you should make sure you request enough + * cpu/gpu/memory to achieve that. + * + * Generated from protobuf field int32 latency_budget_ms = 4; + * @param int $var + * @return $this + */ + public function setLatencyBudgetMs($var) + { + GPBUtil::checkInt32($var); + $this->latency_budget_ms = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunMode.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunMode.php new file mode 100644 index 000000000000..c61010e18051 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunMode.php @@ -0,0 +1,63 @@ +google.cloud.visionai.v1.RunMode + */ +class RunMode +{ + /** + * Mode is unspecified. + * + * Generated from protobuf enum RUN_MODE_UNSPECIFIED = 0; + */ + const RUN_MODE_UNSPECIFIED = 0; + /** + * Live mode. Meaning the Process is launched to handle live video + * source, and possible packet drops are expected. + * + * Generated from protobuf enum LIVE = 1; + */ + const LIVE = 1; + /** + * Submission mode. Meaning the Process is launched to handle bounded video + * files, with no packet drop. Completion status is tracked. + * + * Generated from protobuf enum SUBMISSION = 2; + */ + const SUBMISSION = 2; + + private static $valueToName = [ + self::RUN_MODE_UNSPECIFIED => 'RUN_MODE_UNSPECIFIED', + self::LIVE => 'LIVE', + self::SUBMISSION => 'SUBMISSION', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunStatus.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunStatus.php new file mode 100644 index 000000000000..69dd5f260a67 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunStatus.php @@ -0,0 +1,101 @@ +google.cloud.visionai.v1.RunStatus + */ +class RunStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The state of the Process. + * + * Generated from protobuf field .google.cloud.visionai.v1.RunStatus.State state = 1; + */ + protected $state = 0; + /** + * The reason of becoming the state. + * + * Generated from protobuf field string reason = 2; + */ + protected $reason = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $state + * The state of the Process. + * @type string $reason + * The reason of becoming the state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); + parent::__construct($data); + } + + /** + * The state of the Process. + * + * Generated from protobuf field .google.cloud.visionai.v1.RunStatus.State state = 1; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * The state of the Process. + * + * Generated from protobuf field .google.cloud.visionai.v1.RunStatus.State state = 1; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\RunStatus\State::class); + $this->state = $var; + + return $this; + } + + /** + * The reason of becoming the state. + * + * Generated from protobuf field string reason = 2; + * @return string + */ + public function getReason() + { + return $this->reason; + } + + /** + * The reason of becoming the state. + * + * Generated from protobuf field string reason = 2; + * @param string $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkString($var, True); + $this->reason = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunStatus/State.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunStatus/State.php new file mode 100644 index 000000000000..40a59412f07f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunStatus/State.php @@ -0,0 +1,84 @@ +google.cloud.visionai.v1.RunStatus.State + */ +class State +{ + /** + * State is unspecified. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * INITIALIZING means the Process is scheduled but yet ready to handle + * real traffic. + * + * Generated from protobuf enum INITIALIZING = 1; + */ + const INITIALIZING = 1; + /** + * RUNNING means the Process is up running and handling traffic. + * + * Generated from protobuf enum RUNNING = 2; + */ + const RUNNING = 2; + /** + * COMPLETED means the Process has completed the processing, especially + * for non-streaming use case. + * + * Generated from protobuf enum COMPLETED = 3; + */ + const COMPLETED = 3; + /** + * FAILED means the Process failed to complete the processing. + * + * Generated from protobuf enum FAILED = 4; + */ + const FAILED = 4; + /** + * PENDING means the Process is created but yet to be scheduled. + * + * Generated from protobuf enum PENDING = 5; + */ + const PENDING = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::INITIALIZING => 'INITIALIZING', + self::RUNNING => 'RUNNING', + self::COMPLETED => 'COMPLETED', + self::FAILED => 'FAILED', + self::PENDING => 'PENDING', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy.php new file mode 100644 index 000000000000..a69907ba44b7 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.SchemaKeySortingStrategy + */ +class SchemaKeySortingStrategy extends \Google\Protobuf\Internal\Message +{ + /** + * Options in the front have high priority than those in the back. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option options = 1; + */ + private $options; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\SchemaKeySortingStrategy\Option[] $options + * Options in the front have high priority than those in the back. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Options in the front have high priority than those in the back. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option options = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\SchemaKeySortingStrategy\Option> + */ + public function getOptions() + { + return $this->options; + } + + /** + * Options in the front have high priority than those in the back. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option options = 1; + * @param \Google\Cloud\VisionAI\V1\SchemaKeySortingStrategy\Option[] $var + * @return $this + */ + public function setOptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\SchemaKeySortingStrategy\Option::class); + $this->options = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy/Option.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy/Option.php new file mode 100644 index 000000000000..5d6cd242a852 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy/Option.php @@ -0,0 +1,149 @@ +google.cloud.visionai.v1.SchemaKeySortingStrategy.Option + */ +class Option extends \Google\Protobuf\Internal\Message +{ + /** + * The data used to sort. + * + * Generated from protobuf field string data_schema_key = 1; + */ + protected $data_schema_key = ''; + /** + * Whether to sort in decreasing order or increasing order. + * By default, results are sorted in incresing order. + * + * Generated from protobuf field bool sort_decreasing = 2; + */ + protected $sort_decreasing = false; + /** + * Aggregate method for the current data schema key. + * + * Generated from protobuf field optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; + */ + protected $aggregate_method = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $data_schema_key + * The data used to sort. + * @type bool $sort_decreasing + * Whether to sort in decreasing order or increasing order. + * By default, results are sorted in incresing order. + * @type int $aggregate_method + * Aggregate method for the current data schema key. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The data used to sort. + * + * Generated from protobuf field string data_schema_key = 1; + * @return string + */ + public function getDataSchemaKey() + { + return $this->data_schema_key; + } + + /** + * The data used to sort. + * + * Generated from protobuf field string data_schema_key = 1; + * @param string $var + * @return $this + */ + public function setDataSchemaKey($var) + { + GPBUtil::checkString($var, True); + $this->data_schema_key = $var; + + return $this; + } + + /** + * Whether to sort in decreasing order or increasing order. + * By default, results are sorted in incresing order. + * + * Generated from protobuf field bool sort_decreasing = 2; + * @return bool + */ + public function getSortDecreasing() + { + return $this->sort_decreasing; + } + + /** + * Whether to sort in decreasing order or increasing order. + * By default, results are sorted in incresing order. + * + * Generated from protobuf field bool sort_decreasing = 2; + * @param bool $var + * @return $this + */ + public function setSortDecreasing($var) + { + GPBUtil::checkBool($var); + $this->sort_decreasing = $var; + + return $this; + } + + /** + * Aggregate method for the current data schema key. + * + * Generated from protobuf field optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; + * @return int + */ + public function getAggregateMethod() + { + return isset($this->aggregate_method) ? $this->aggregate_method : 0; + } + + public function hasAggregateMethod() + { + return isset($this->aggregate_method); + } + + public function clearAggregateMethod() + { + unset($this->aggregate_method); + } + + /** + * Aggregate method for the current data schema key. + * + * Generated from protobuf field optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; + * @param int $var + * @return $this + */ + public function setAggregateMethod($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\SchemaKeySortingStrategy\Option\AggregateMethod::class); + $this->aggregate_method = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy/Option/AggregateMethod.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy/Option/AggregateMethod.php new file mode 100644 index 000000000000..946e6bb6714a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy/Option/AggregateMethod.php @@ -0,0 +1,66 @@ +google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod + */ +class AggregateMethod +{ + /** + * The unspecified aggregate method will be overwritten as mentioned + * above. + * + * Generated from protobuf enum AGGREGATE_METHOD_UNSPECIFIED = 0; + */ + const AGGREGATE_METHOD_UNSPECIFIED = 0; + /** + * Take the (lexicographical or numerical) largest value to sort. + * + * Generated from protobuf enum AGGREGATE_METHOD_LARGEST = 1; + */ + const AGGREGATE_METHOD_LARGEST = 1; + /** + * Take the (lexicographical or numerical) smallest value to sort. + * + * Generated from protobuf enum AGGREGATE_METHOD_SMALLEST = 2; + */ + const AGGREGATE_METHOD_SMALLEST = 2; + + private static $valueToName = [ + self::AGGREGATE_METHOD_UNSPECIFIED => 'AGGREGATE_METHOD_UNSPECIFIED', + self::AGGREGATE_METHOD_LARGEST => 'AGGREGATE_METHOD_LARGEST', + self::AGGREGATE_METHOD_SMALLEST => 'AGGREGATE_METHOD_SMALLEST', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchAssetsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchAssetsRequest.php new file mode 100644 index 000000000000..58bd4b7d79cc --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchAssetsRequest.php @@ -0,0 +1,409 @@ +google.cloud.visionai.v1.SearchAssetsRequest + */ +class SearchAssetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent corpus to search. + * Format: `projects/{project_id}/locations/{location_id}/corpora/{corpus_id}' + * + * Generated from protobuf field string corpus = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $corpus = ''; + /** + * The number of results to be returned in this page. If it's 0, the server + * will decide the appropriate page_size. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * The continuation token to fetch the next page. If empty, it means it is + * fetching the first page. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Time ranges that matching video content must fall within. If no ranges are + * provided, there will be no time restriction. This field is treated just + * like the criteria below, but defined separately for convenience as it is + * used frequently. Note that if the end_time is in the future, it will be + * clamped to the time the request was received. + * + * Generated from protobuf field .google.cloud.visionai.v1.DateTimeRangeArray content_time_ranges = 5; + */ + protected $content_time_ranges = null; + /** + * Criteria applied to search results. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Criteria criteria = 4; + */ + private $criteria; + /** + * Stores most recent facet selection state. Only facet groups with user's + * selection will be presented here. Selection state is either selected or + * unselected. Only selected facet buckets will be used as search criteria. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6; + */ + private $facet_selections; + /** + * A list of annotation keys to specify the annotations to be retrieved and + * returned with each search result. + * Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search + * strategy must not be NO_SEARCH. + * + * Generated from protobuf field repeated string result_annotation_keys = 8; + */ + private $result_annotation_keys; + /** + * Global search query. Allows user to search assets without needing to + * specify which field the value belongs to. + * + * Generated from protobuf field string search_query = 10; + */ + protected $search_query = ''; + protected $sort_spec; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\SchemaKeySortingStrategy $schema_key_sorting_strategy + * Sort by the value under the data schema key. + * @type string $corpus + * Required. The parent corpus to search. + * Format: `projects/{project_id}/locations/{location_id}/corpora/{corpus_id}' + * @type int $page_size + * The number of results to be returned in this page. If it's 0, the server + * will decide the appropriate page_size. + * @type string $page_token + * The continuation token to fetch the next page. If empty, it means it is + * fetching the first page. + * @type \Google\Cloud\VisionAI\V1\DateTimeRangeArray $content_time_ranges + * Time ranges that matching video content must fall within. If no ranges are + * provided, there will be no time restriction. This field is treated just + * like the criteria below, but defined separately for convenience as it is + * used frequently. Note that if the end_time is in the future, it will be + * clamped to the time the request was received. + * @type \Google\Cloud\VisionAI\V1\Criteria[] $criteria + * Criteria applied to search results. + * @type \Google\Cloud\VisionAI\V1\FacetGroup[] $facet_selections + * Stores most recent facet selection state. Only facet groups with user's + * selection will be presented here. Selection state is either selected or + * unselected. Only selected facet buckets will be used as search criteria. + * @type string[] $result_annotation_keys + * A list of annotation keys to specify the annotations to be retrieved and + * returned with each search result. + * Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search + * strategy must not be NO_SEARCH. + * @type string $search_query + * Global search query. Allows user to search assets without needing to + * specify which field the value belongs to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Sort by the value under the data schema key. + * + * Generated from protobuf field .google.cloud.visionai.v1.SchemaKeySortingStrategy schema_key_sorting_strategy = 9; + * @return \Google\Cloud\VisionAI\V1\SchemaKeySortingStrategy|null + */ + public function getSchemaKeySortingStrategy() + { + return $this->readOneof(9); + } + + public function hasSchemaKeySortingStrategy() + { + return $this->hasOneof(9); + } + + /** + * Sort by the value under the data schema key. + * + * Generated from protobuf field .google.cloud.visionai.v1.SchemaKeySortingStrategy schema_key_sorting_strategy = 9; + * @param \Google\Cloud\VisionAI\V1\SchemaKeySortingStrategy $var + * @return $this + */ + public function setSchemaKeySortingStrategy($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\SchemaKeySortingStrategy::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Required. The parent corpus to search. + * Format: `projects/{project_id}/locations/{location_id}/corpora/{corpus_id}' + * + * Generated from protobuf field string corpus = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getCorpus() + { + return $this->corpus; + } + + /** + * Required. The parent corpus to search. + * Format: `projects/{project_id}/locations/{location_id}/corpora/{corpus_id}' + * + * Generated from protobuf field string corpus = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCorpus($var) + { + GPBUtil::checkString($var, True); + $this->corpus = $var; + + return $this; + } + + /** + * The number of results to be returned in this page. If it's 0, the server + * will decide the appropriate page_size. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The number of results to be returned in this page. If it's 0, the server + * will decide the appropriate page_size. + * + * 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 continuation token to fetch the next page. If empty, it means it is + * fetching the first page. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The continuation token to fetch the next page. If empty, it means it is + * fetching the first page. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Time ranges that matching video content must fall within. If no ranges are + * provided, there will be no time restriction. This field is treated just + * like the criteria below, but defined separately for convenience as it is + * used frequently. Note that if the end_time is in the future, it will be + * clamped to the time the request was received. + * + * Generated from protobuf field .google.cloud.visionai.v1.DateTimeRangeArray content_time_ranges = 5; + * @return \Google\Cloud\VisionAI\V1\DateTimeRangeArray|null + */ + public function getContentTimeRanges() + { + return $this->content_time_ranges; + } + + public function hasContentTimeRanges() + { + return isset($this->content_time_ranges); + } + + public function clearContentTimeRanges() + { + unset($this->content_time_ranges); + } + + /** + * Time ranges that matching video content must fall within. If no ranges are + * provided, there will be no time restriction. This field is treated just + * like the criteria below, but defined separately for convenience as it is + * used frequently. Note that if the end_time is in the future, it will be + * clamped to the time the request was received. + * + * Generated from protobuf field .google.cloud.visionai.v1.DateTimeRangeArray content_time_ranges = 5; + * @param \Google\Cloud\VisionAI\V1\DateTimeRangeArray $var + * @return $this + */ + public function setContentTimeRanges($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DateTimeRangeArray::class); + $this->content_time_ranges = $var; + + return $this; + } + + /** + * Criteria applied to search results. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Criteria criteria = 4; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Criteria> + */ + public function getCriteria() + { + return $this->criteria; + } + + /** + * Criteria applied to search results. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Criteria criteria = 4; + * @param \Google\Cloud\VisionAI\V1\Criteria[] $var + * @return $this + */ + public function setCriteria($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Criteria::class); + $this->criteria = $arr; + + return $this; + } + + /** + * Stores most recent facet selection state. Only facet groups with user's + * selection will be presented here. Selection state is either selected or + * unselected. Only selected facet buckets will be used as search criteria. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\FacetGroup> + */ + public function getFacetSelections() + { + return $this->facet_selections; + } + + /** + * Stores most recent facet selection state. Only facet groups with user's + * selection will be presented here. Selection state is either selected or + * unselected. Only selected facet buckets will be used as search criteria. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6; + * @param \Google\Cloud\VisionAI\V1\FacetGroup[] $var + * @return $this + */ + public function setFacetSelections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\FacetGroup::class); + $this->facet_selections = $arr; + + return $this; + } + + /** + * A list of annotation keys to specify the annotations to be retrieved and + * returned with each search result. + * Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search + * strategy must not be NO_SEARCH. + * + * Generated from protobuf field repeated string result_annotation_keys = 8; + * @return RepeatedField + */ + public function getResultAnnotationKeys() + { + return $this->result_annotation_keys; + } + + /** + * A list of annotation keys to specify the annotations to be retrieved and + * returned with each search result. + * Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search + * strategy must not be NO_SEARCH. + * + * Generated from protobuf field repeated string result_annotation_keys = 8; + * @param string[] $var + * @return $this + */ + public function setResultAnnotationKeys($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->result_annotation_keys = $arr; + + return $this; + } + + /** + * Global search query. Allows user to search assets without needing to + * specify which field the value belongs to. + * + * Generated from protobuf field string search_query = 10; + * @return string + */ + public function getSearchQuery() + { + return $this->search_query; + } + + /** + * Global search query. Allows user to search assets without needing to + * specify which field the value belongs to. + * + * Generated from protobuf field string search_query = 10; + * @param string $var + * @return $this + */ + public function setSearchQuery($var) + { + GPBUtil::checkString($var, True); + $this->search_query = $var; + + return $this; + } + + /** + * @return string + */ + public function getSortSpec() + { + return $this->whichOneof("sort_spec"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchAssetsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchAssetsResponse.php new file mode 100644 index 000000000000..56c1b3e6ce8b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchAssetsResponse.php @@ -0,0 +1,139 @@ +google.cloud.visionai.v1.SearchAssetsResponse + */ +class SearchAssetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Returned search results. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchResultItem search_result_items = 1; + */ + private $search_result_items; + /** + * The next-page continuation token. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Facet search results of a given query, which contains user's + * already-selected facet values and updated facet search results. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetGroup facet_results = 3; + */ + private $facet_results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\SearchResultItem[] $search_result_items + * Returned search results. + * @type string $next_page_token + * The next-page continuation token. + * @type \Google\Cloud\VisionAI\V1\FacetGroup[] $facet_results + * Facet search results of a given query, which contains user's + * already-selected facet values and updated facet search results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Returned search results. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchResultItem search_result_items = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\SearchResultItem> + */ + public function getSearchResultItems() + { + return $this->search_result_items; + } + + /** + * Returned search results. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchResultItem search_result_items = 1; + * @param \Google\Cloud\VisionAI\V1\SearchResultItem[] $var + * @return $this + */ + public function setSearchResultItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\SearchResultItem::class); + $this->search_result_items = $arr; + + return $this; + } + + /** + * The next-page continuation token. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The next-page continuation token. + * + * 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; + } + + /** + * Facet search results of a given query, which contains user's + * already-selected facet values and updated facet search results. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetGroup facet_results = 3; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\FacetGroup> + */ + public function getFacetResults() + { + return $this->facet_results; + } + + /** + * Facet search results of a given query, which contains user's + * already-selected facet values and updated facet search results. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetGroup facet_results = 3; + * @param \Google\Cloud\VisionAI\V1\FacetGroup[] $var + * @return $this + */ + public function setFacetResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\FacetGroup::class); + $this->facet_results = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapability.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapability.php new file mode 100644 index 000000000000..6d64cd2fa932 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapability.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.SearchCapability + */ +class SearchCapability extends \Google\Protobuf\Internal\Message +{ + /** + * The search capability to enable. + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchCapability.Type type = 1; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The search capability to enable. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The search capability to enable. + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchCapability.Type type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The search capability to enable. + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchCapability.Type type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\SearchCapability\Type::class); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapability/Type.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapability/Type.php new file mode 100644 index 000000000000..c12cf9696972 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapability/Type.php @@ -0,0 +1,54 @@ +google.cloud.visionai.v1.SearchCapability.Type + */ +class Type +{ + /** + * Unspecified search capability, should never be used. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Embedding search. + * + * Generated from protobuf enum EMBEDDING_SEARCH = 1; + */ + const EMBEDDING_SEARCH = 1; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::EMBEDDING_SEARCH => 'EMBEDDING_SEARCH', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapabilitySetting.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapabilitySetting.php new file mode 100644 index 000000000000..ad0d5d92cc47 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapabilitySetting.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.SearchCapabilitySetting + */ +class SearchCapabilitySetting extends \Google\Protobuf\Internal\Message +{ + /** + * The metadata of search capability to enable. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchCapability search_capabilities = 1; + */ + private $search_capabilities; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\SearchCapability[] $search_capabilities + * The metadata of search capability to enable. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The metadata of search capability to enable. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchCapability search_capabilities = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\SearchCapability> + */ + public function getSearchCapabilities() + { + return $this->search_capabilities; + } + + /** + * The metadata of search capability to enable. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchCapability search_capabilities = 1; + * @param \Google\Cloud\VisionAI\V1\SearchCapability[] $var + * @return $this + */ + public function setSearchCapabilities($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\SearchCapability::class); + $this->search_capabilities = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchConfig.php new file mode 100644 index 000000000000..3eb521fa1fe5 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchConfig.php @@ -0,0 +1,176 @@ +google.cloud.visionai.v1.SearchConfig + */ +class SearchConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the search configuration. + * For CustomSearchCriteria, search_config would be the search + * operator name. For Facets, search_config would be the facet + * dimension name. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Establishes a FacetDimension and associated specifications. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty facet_property = 2; + */ + protected $facet_property = null; + /** + * Creates a mapping between a custom SearchCriteria and one or more UGA keys. + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchCriteriaProperty search_criteria_property = 3; + */ + protected $search_criteria_property = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the search configuration. + * For CustomSearchCriteria, search_config would be the search + * operator name. For Facets, search_config would be the facet + * dimension name. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * @type \Google\Cloud\VisionAI\V1\FacetProperty $facet_property + * Establishes a FacetDimension and associated specifications. + * @type \Google\Cloud\VisionAI\V1\SearchCriteriaProperty $search_criteria_property + * Creates a mapping between a custom SearchCriteria and one or more UGA keys. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the search configuration. + * For CustomSearchCriteria, search_config would be the search + * operator name. For Facets, search_config would be the facet + * dimension name. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the search configuration. + * For CustomSearchCriteria, search_config would be the search + * operator name. For Facets, search_config would be the facet + * dimension name. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * + * 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; + } + + /** + * Establishes a FacetDimension and associated specifications. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty facet_property = 2; + * @return \Google\Cloud\VisionAI\V1\FacetProperty|null + */ + public function getFacetProperty() + { + return $this->facet_property; + } + + public function hasFacetProperty() + { + return isset($this->facet_property); + } + + public function clearFacetProperty() + { + unset($this->facet_property); + } + + /** + * Establishes a FacetDimension and associated specifications. + * + * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty facet_property = 2; + * @param \Google\Cloud\VisionAI\V1\FacetProperty $var + * @return $this + */ + public function setFacetProperty($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetProperty::class); + $this->facet_property = $var; + + return $this; + } + + /** + * Creates a mapping between a custom SearchCriteria and one or more UGA keys. + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchCriteriaProperty search_criteria_property = 3; + * @return \Google\Cloud\VisionAI\V1\SearchCriteriaProperty|null + */ + public function getSearchCriteriaProperty() + { + return $this->search_criteria_property; + } + + public function hasSearchCriteriaProperty() + { + return isset($this->search_criteria_property); + } + + public function clearSearchCriteriaProperty() + { + unset($this->search_criteria_property); + } + + /** + * Creates a mapping between a custom SearchCriteria and one or more UGA keys. + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchCriteriaProperty search_criteria_property = 3; + * @param \Google\Cloud\VisionAI\V1\SearchCriteriaProperty $var + * @return $this + */ + public function setSearchCriteriaProperty($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\SearchCriteriaProperty::class); + $this->search_criteria_property = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCriteriaProperty.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCriteriaProperty.php new file mode 100644 index 000000000000..daf1ea0d24bb --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCriteriaProperty.php @@ -0,0 +1,143 @@ +google.cloud.visionai.v1.SearchCriteriaProperty + */ +class SearchCriteriaProperty extends \Google\Protobuf\Internal\Message +{ + /** + * Each mapped_field corresponds to a UGA key. To understand how this property + * works, take the following example. In the SearchConfig table, the + * user adds this entry: + * search_config { + * name: "person" + * search_criteria_property { + * mapped_fields: "player" + * mapped_fields: "coach" + * } + * } + * Now, when a user issues a query like: + * criteria { + * field: "person" + * text_array { + * txt_values: "Tom Brady" + * txt_values: "Bill Belichick" + * } + * } + * MWH search will return search documents where (player=Tom Brady || + * coach=Tom Brady || player=Bill Belichick || coach=Bill Belichick). + * + * Generated from protobuf field repeated string mapped_fields = 1; + */ + private $mapped_fields; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $mapped_fields + * Each mapped_field corresponds to a UGA key. To understand how this property + * works, take the following example. In the SearchConfig table, the + * user adds this entry: + * search_config { + * name: "person" + * search_criteria_property { + * mapped_fields: "player" + * mapped_fields: "coach" + * } + * } + * Now, when a user issues a query like: + * criteria { + * field: "person" + * text_array { + * txt_values: "Tom Brady" + * txt_values: "Bill Belichick" + * } + * } + * MWH search will return search documents where (player=Tom Brady || + * coach=Tom Brady || player=Bill Belichick || coach=Bill Belichick). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Each mapped_field corresponds to a UGA key. To understand how this property + * works, take the following example. In the SearchConfig table, the + * user adds this entry: + * search_config { + * name: "person" + * search_criteria_property { + * mapped_fields: "player" + * mapped_fields: "coach" + * } + * } + * Now, when a user issues a query like: + * criteria { + * field: "person" + * text_array { + * txt_values: "Tom Brady" + * txt_values: "Bill Belichick" + * } + * } + * MWH search will return search documents where (player=Tom Brady || + * coach=Tom Brady || player=Bill Belichick || coach=Bill Belichick). + * + * Generated from protobuf field repeated string mapped_fields = 1; + * @return RepeatedField + */ + public function getMappedFields() + { + return $this->mapped_fields; + } + + /** + * Each mapped_field corresponds to a UGA key. To understand how this property + * works, take the following example. In the SearchConfig table, the + * user adds this entry: + * search_config { + * name: "person" + * search_criteria_property { + * mapped_fields: "player" + * mapped_fields: "coach" + * } + * } + * Now, when a user issues a query like: + * criteria { + * field: "person" + * text_array { + * txt_values: "Tom Brady" + * txt_values: "Bill Belichick" + * } + * } + * MWH search will return search documents where (player=Tom Brady || + * coach=Tom Brady || player=Bill Belichick || coach=Bill Belichick). + * + * Generated from protobuf field repeated string mapped_fields = 1; + * @param string[] $var + * @return $this + */ + public function setMappedFields($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->mapped_fields = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchHypernym.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchHypernym.php new file mode 100644 index 000000000000..30d67e2db570 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchHypernym.php @@ -0,0 +1,148 @@ +google.cloud.visionai.v1.SearchHypernym + */ +class SearchHypernym extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the SearchHypernym. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Optional. The hypernym. + * + * Generated from protobuf field string hypernym = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $hypernym = ''; + /** + * Optional. Hyponyms that the hypernym is mapped to. + * + * Generated from protobuf field repeated string hyponyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $hyponyms; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the SearchHypernym. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * @type string $hypernym + * Optional. The hypernym. + * @type string[] $hyponyms + * Optional. Hyponyms that the hypernym is mapped to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the SearchHypernym. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the SearchHypernym. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * + * 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; + } + + /** + * Optional. The hypernym. + * + * Generated from protobuf field string hypernym = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getHypernym() + { + return $this->hypernym; + } + + /** + * Optional. The hypernym. + * + * Generated from protobuf field string hypernym = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setHypernym($var) + { + GPBUtil::checkString($var, True); + $this->hypernym = $var; + + return $this; + } + + /** + * Optional. Hyponyms that the hypernym is mapped to. + * + * Generated from protobuf field repeated string hyponyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return RepeatedField + */ + public function getHyponyms() + { + return $this->hyponyms; + } + + /** + * Optional. Hyponyms that the hypernym is mapped to. + * + * Generated from protobuf field repeated string hyponyms = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string[] $var + * @return $this + */ + public function setHyponyms($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->hyponyms = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchIndexEndpointRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchIndexEndpointRequest.php new file mode 100644 index 000000000000..b56bcc9b5a15 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchIndexEndpointRequest.php @@ -0,0 +1,310 @@ +google.cloud.visionai.v1.SearchIndexEndpointRequest + */ +class SearchIndexEndpointRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The index endpoint to search. + * Format: + * `projects/{project_id}/locations/{location_id}/indexEndpoints/{index_endpoint_id}' + * + * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $index_endpoint = ''; + /** + * Criteria applied to search results. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Criteria criteria = 4; + */ + private $criteria; + /** + * Criteria to exclude from search results. + * Note that `fetch_matched_annotations` will be ignored. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Criteria exclusion_criteria = 7; + */ + private $exclusion_criteria; + /** + * Requested page size. API may return fewer results than requested. + * If negative, INVALID_ARGUMENT error will be returned. + * If unspecified or 0, API will pick a default size, which is 10. + * If the requested page size is larger than the maximum size, API will pick + * the maximum size, which is 200. + * + * Generated from protobuf field int32 page_size = 5; + */ + protected $page_size = 0; + /** + * The continuation token to fetch the next page. If empty, it means it is + * fetching the first page. + * + * Generated from protobuf field string page_token = 6; + */ + protected $page_token = ''; + protected $query; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\ImageQuery $image_query + * An image-only query. + * @type string $text_query + * A text-only query. + * @type string $index_endpoint + * Required. The index endpoint to search. + * Format: + * `projects/{project_id}/locations/{location_id}/indexEndpoints/{index_endpoint_id}' + * @type \Google\Cloud\VisionAI\V1\Criteria[] $criteria + * Criteria applied to search results. + * @type \Google\Cloud\VisionAI\V1\Criteria[] $exclusion_criteria + * Criteria to exclude from search results. + * Note that `fetch_matched_annotations` will be ignored. + * @type int $page_size + * Requested page size. API may return fewer results than requested. + * If negative, INVALID_ARGUMENT error will be returned. + * If unspecified or 0, API will pick a default size, which is 10. + * If the requested page size is larger than the maximum size, API will pick + * the maximum size, which is 200. + * @type string $page_token + * The continuation token to fetch the next page. If empty, it means it is + * fetching the first page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * An image-only query. + * + * Generated from protobuf field .google.cloud.visionai.v1.ImageQuery image_query = 2; + * @return \Google\Cloud\VisionAI\V1\ImageQuery|null + */ + public function getImageQuery() + { + return $this->readOneof(2); + } + + public function hasImageQuery() + { + return $this->hasOneof(2); + } + + /** + * An image-only query. + * + * Generated from protobuf field .google.cloud.visionai.v1.ImageQuery image_query = 2; + * @param \Google\Cloud\VisionAI\V1\ImageQuery $var + * @return $this + */ + public function setImageQuery($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ImageQuery::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * A text-only query. + * + * Generated from protobuf field string text_query = 3; + * @return string + */ + public function getTextQuery() + { + return $this->readOneof(3); + } + + public function hasTextQuery() + { + return $this->hasOneof(3); + } + + /** + * A text-only query. + * + * Generated from protobuf field string text_query = 3; + * @param string $var + * @return $this + */ + public function setTextQuery($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Required. The index endpoint to search. + * Format: + * `projects/{project_id}/locations/{location_id}/indexEndpoints/{index_endpoint_id}' + * + * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getIndexEndpoint() + { + return $this->index_endpoint; + } + + /** + * Required. The index endpoint to search. + * Format: + * `projects/{project_id}/locations/{location_id}/indexEndpoints/{index_endpoint_id}' + * + * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setIndexEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->index_endpoint = $var; + + return $this; + } + + /** + * Criteria applied to search results. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Criteria criteria = 4; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Criteria> + */ + public function getCriteria() + { + return $this->criteria; + } + + /** + * Criteria applied to search results. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Criteria criteria = 4; + * @param \Google\Cloud\VisionAI\V1\Criteria[] $var + * @return $this + */ + public function setCriteria($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Criteria::class); + $this->criteria = $arr; + + return $this; + } + + /** + * Criteria to exclude from search results. + * Note that `fetch_matched_annotations` will be ignored. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Criteria exclusion_criteria = 7; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Criteria> + */ + public function getExclusionCriteria() + { + return $this->exclusion_criteria; + } + + /** + * Criteria to exclude from search results. + * Note that `fetch_matched_annotations` will be ignored. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Criteria exclusion_criteria = 7; + * @param \Google\Cloud\VisionAI\V1\Criteria[] $var + * @return $this + */ + public function setExclusionCriteria($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Criteria::class); + $this->exclusion_criteria = $arr; + + return $this; + } + + /** + * Requested page size. API may return fewer results than requested. + * If negative, INVALID_ARGUMENT error will be returned. + * If unspecified or 0, API will pick a default size, which is 10. + * If the requested page size is larger than the maximum size, API will pick + * the maximum size, which is 200. + * + * Generated from protobuf field int32 page_size = 5; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Requested page size. API may return fewer results than requested. + * If negative, INVALID_ARGUMENT error will be returned. + * If unspecified or 0, API will pick a default size, which is 10. + * If the requested page size is larger than the maximum size, API will pick + * the maximum size, which is 200. + * + * Generated from protobuf field int32 page_size = 5; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * The continuation token to fetch the next page. If empty, it means it is + * fetching the first page. + * + * Generated from protobuf field string page_token = 6; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * The continuation token to fetch the next page. If empty, it means it is + * fetching the first page. + * + * Generated from protobuf field string page_token = 6; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * @return string + */ + public function getQuery() + { + return $this->whichOneof("query"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchIndexEndpointResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchIndexEndpointResponse.php new file mode 100644 index 000000000000..11e7d5b83e02 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchIndexEndpointResponse.php @@ -0,0 +1,105 @@ +google.cloud.visionai.v1.SearchIndexEndpointResponse + */ +class SearchIndexEndpointResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Returned search results. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchResultItem search_result_items = 1; + */ + private $search_result_items; + /** + * The next-page continuation token. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\SearchResultItem[] $search_result_items + * Returned search results. + * @type string $next_page_token + * The next-page continuation token. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Returned search results. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchResultItem search_result_items = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\SearchResultItem> + */ + public function getSearchResultItems() + { + return $this->search_result_items; + } + + /** + * Returned search results. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchResultItem search_result_items = 1; + * @param \Google\Cloud\VisionAI\V1\SearchResultItem[] $var + * @return $this + */ + public function setSearchResultItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\SearchResultItem::class); + $this->search_result_items = $arr; + + return $this; + } + + /** + * The next-page continuation token. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * The next-page continuation token. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchResultItem.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchResultItem.php new file mode 100644 index 000000000000..9913836cdd08 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchResultItem.php @@ -0,0 +1,304 @@ +google.cloud.visionai.v1.SearchResultItem + */ +class SearchResultItem extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the asset. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string asset = 1; + */ + protected $asset = ''; + /** + * The matched asset segments. + * Deprecated: please use singular `segment` field. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Partition.TemporalPartition segments = 2 [deprecated = true]; + * @deprecated + */ + private $segments; + /** + * The matched asset segment. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition segment = 5; + */ + protected $segment = null; + /** + * Available to IMAGE corpus types. + * Relevance of this `SearchResultItem` to user search query (text query or + * image query). + * By default this represents cosine similarity between the query and the + * retrieved media content. The value is in the range of [-1, 1]. + * Note that search ranking is not only decided by this relevance score, but + * also other factors such as the match of annotations. + * + * Generated from protobuf field double relevance = 6; + */ + protected $relevance = 0.0; + /** + * Search result annotations specified by result_annotation_keys in search + * request. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Annotation requested_annotations = 3; + */ + private $requested_annotations; + /** + * Criteria or facet-selection based annotation matching results associated to + * this search result item. Only contains results for criteria or + * facet_selections with fetch_matched_annotations=true. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AnnotationMatchingResult annotation_matching_results = 4; + */ + private $annotation_matching_results; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $asset + * The resource name of the asset. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * @type \Google\Cloud\VisionAI\V1\Partition\TemporalPartition[] $segments + * The matched asset segments. + * Deprecated: please use singular `segment` field. + * @type \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $segment + * The matched asset segment. + * @type float $relevance + * Available to IMAGE corpus types. + * Relevance of this `SearchResultItem` to user search query (text query or + * image query). + * By default this represents cosine similarity between the query and the + * retrieved media content. The value is in the range of [-1, 1]. + * Note that search ranking is not only decided by this relevance score, but + * also other factors such as the match of annotations. + * @type \Google\Cloud\VisionAI\V1\Annotation[] $requested_annotations + * Search result annotations specified by result_annotation_keys in search + * request. + * @type \Google\Cloud\VisionAI\V1\AnnotationMatchingResult[] $annotation_matching_results + * Criteria or facet-selection based annotation matching results associated to + * this search result item. Only contains results for criteria or + * facet_selections with fetch_matched_annotations=true. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the asset. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string asset = 1; + * @return string + */ + public function getAsset() + { + return $this->asset; + } + + /** + * The resource name of the asset. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string asset = 1; + * @param string $var + * @return $this + */ + public function setAsset($var) + { + GPBUtil::checkString($var, True); + $this->asset = $var; + + return $this; + } + + /** + * The matched asset segments. + * Deprecated: please use singular `segment` field. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Partition.TemporalPartition segments = 2 [deprecated = true]; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Partition\TemporalPartition> + * @deprecated + */ + public function getSegments() + { + if ($this->segments->count() !== 0) { + @trigger_error('segments is deprecated.', E_USER_DEPRECATED); + } + return $this->segments; + } + + /** + * The matched asset segments. + * Deprecated: please use singular `segment` field. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Partition.TemporalPartition segments = 2 [deprecated = true]; + * @param \Google\Cloud\VisionAI\V1\Partition\TemporalPartition[] $var + * @return $this + * @deprecated + */ + public function setSegments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Partition\TemporalPartition::class); + if ($arr->count() !== 0) { + @trigger_error('segments is deprecated.', E_USER_DEPRECATED); + } + $this->segments = $arr; + + return $this; + } + + /** + * The matched asset segment. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition segment = 5; + * @return \Google\Cloud\VisionAI\V1\Partition\TemporalPartition|null + */ + public function getSegment() + { + return $this->segment; + } + + public function hasSegment() + { + return isset($this->segment); + } + + public function clearSegment() + { + unset($this->segment); + } + + /** + * The matched asset segment. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition segment = 5; + * @param \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $var + * @return $this + */ + public function setSegment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Partition\TemporalPartition::class); + $this->segment = $var; + + return $this; + } + + /** + * Available to IMAGE corpus types. + * Relevance of this `SearchResultItem` to user search query (text query or + * image query). + * By default this represents cosine similarity between the query and the + * retrieved media content. The value is in the range of [-1, 1]. + * Note that search ranking is not only decided by this relevance score, but + * also other factors such as the match of annotations. + * + * Generated from protobuf field double relevance = 6; + * @return float + */ + public function getRelevance() + { + return $this->relevance; + } + + /** + * Available to IMAGE corpus types. + * Relevance of this `SearchResultItem` to user search query (text query or + * image query). + * By default this represents cosine similarity between the query and the + * retrieved media content. The value is in the range of [-1, 1]. + * Note that search ranking is not only decided by this relevance score, but + * also other factors such as the match of annotations. + * + * Generated from protobuf field double relevance = 6; + * @param float $var + * @return $this + */ + public function setRelevance($var) + { + GPBUtil::checkDouble($var); + $this->relevance = $var; + + return $this; + } + + /** + * Search result annotations specified by result_annotation_keys in search + * request. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Annotation requested_annotations = 3; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\Annotation> + */ + public function getRequestedAnnotations() + { + return $this->requested_annotations; + } + + /** + * Search result annotations specified by result_annotation_keys in search + * request. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.Annotation requested_annotations = 3; + * @param \Google\Cloud\VisionAI\V1\Annotation[] $var + * @return $this + */ + public function setRequestedAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Annotation::class); + $this->requested_annotations = $arr; + + return $this; + } + + /** + * Criteria or facet-selection based annotation matching results associated to + * this search result item. Only contains results for criteria or + * facet_selections with fetch_matched_annotations=true. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AnnotationMatchingResult annotation_matching_results = 4; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\AnnotationMatchingResult> + */ + public function getAnnotationMatchingResults() + { + return $this->annotation_matching_results; + } + + /** + * Criteria or facet-selection based annotation matching results associated to + * this search result item. Only contains results for criteria or + * facet_selections with fetch_matched_annotations=true. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.AnnotationMatchingResult annotation_matching_results = 4; + * @param \Google\Cloud\VisionAI\V1\AnnotationMatchingResult[] $var + * @return $this + */ + public function setAnnotationMatchingResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AnnotationMatchingResult::class); + $this->annotation_matching_results = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SendPacketsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SendPacketsRequest.php new file mode 100644 index 000000000000..d16b3fdf2f59 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SendPacketsRequest.php @@ -0,0 +1,108 @@ +google.cloud.visionai.v1.SendPacketsRequest + */ +class SendPacketsRequest extends \Google\Protobuf\Internal\Message +{ + protected $request; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Packet $packet + * Packets sent over the streaming rpc. + * @type \Google\Cloud\VisionAI\V1\RequestMetadata $metadata + * The first message of the streaming rpc including the request metadata. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + + /** + * Packets sent over the streaming rpc. + * + * Generated from protobuf field .google.cloud.visionai.v1.Packet packet = 1; + * @return \Google\Cloud\VisionAI\V1\Packet|null + */ + public function getPacket() + { + return $this->readOneof(1); + } + + public function hasPacket() + { + return $this->hasOneof(1); + } + + /** + * Packets sent over the streaming rpc. + * + * Generated from protobuf field .google.cloud.visionai.v1.Packet packet = 1; + * @param \Google\Cloud\VisionAI\V1\Packet $var + * @return $this + */ + public function setPacket($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Packet::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The first message of the streaming rpc including the request metadata. + * + * Generated from protobuf field .google.cloud.visionai.v1.RequestMetadata metadata = 2; + * @return \Google\Cloud\VisionAI\V1\RequestMetadata|null + */ + public function getMetadata() + { + return $this->readOneof(2); + } + + public function hasMetadata() + { + return $this->hasOneof(2); + } + + /** + * The first message of the streaming rpc including the request metadata. + * + * Generated from protobuf field .google.cloud.visionai.v1.RequestMetadata metadata = 2; + * @param \Google\Cloud\VisionAI\V1\RequestMetadata $var + * @return $this + */ + public function setMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\RequestMetadata::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getRequest() + { + return $this->whichOneof("request"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SendPacketsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SendPacketsResponse.php new file mode 100644 index 000000000000..1cb06952b4e3 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SendPacketsResponse.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.SendPacketsResponse + */ +class SendPacketsResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Series.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Series.php new file mode 100644 index 000000000000..b0627f93bcaf --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Series.php @@ -0,0 +1,291 @@ +google.cloud.visionai.v1.Series + */ +class Series extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the resource. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Annotations to allow clients to store small amounts of arbitrary data. + * + * Generated from protobuf field map annotations = 5; + */ + private $annotations; + /** + * Required. Stream that is associated with this series. + * + * Generated from protobuf field string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $stream = ''; + /** + * Required. Event that is associated with this series. + * + * Generated from protobuf field string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $event = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The create timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update timestamp. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Annotations to allow clients to store small amounts of arbitrary data. + * @type string $stream + * Required. Stream that is associated with this series. + * @type string $event + * Required. Event that is associated with this series. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsResources::initOnce(); + parent::__construct($data); + } + + /** + * Name of the resource. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the resource. + * + * 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 create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Annotations to allow clients to store small amounts of arbitrary data. + * + * Generated from protobuf field map annotations = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Annotations to allow clients to store small amounts of arbitrary data. + * + * Generated from protobuf field map annotations = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * Required. Stream that is associated with this series. + * + * Generated from protobuf field string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getStream() + { + return $this->stream; + } + + /** + * Required. Stream that is associated with this series. + * + * Generated from protobuf field string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setStream($var) + { + GPBUtil::checkString($var, True); + $this->stream = $var; + + return $this; + } + + /** + * Required. Event that is associated with this series. + * + * Generated from protobuf field string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getEvent() + { + return $this->event; + } + + /** + * Required. Event that is associated with this series. + * + * Generated from protobuf field string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkString($var, True); + $this->event = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SeriesMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SeriesMetadata.php new file mode 100644 index 000000000000..a8e4d2177b23 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SeriesMetadata.php @@ -0,0 +1,71 @@ +google.cloud.visionai.v1.SeriesMetadata + */ +class SeriesMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Series name. It's in the format of + * "projects/{project}/locations/{location}/clusters/{cluster}/series/{stream}". + * + * Generated from protobuf field string series = 1 [(.google.api.resource_reference) = { + */ + protected $series = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $series + * Series name. It's in the format of + * "projects/{project}/locations/{location}/clusters/{cluster}/series/{stream}". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingResources::initOnce(); + parent::__construct($data); + } + + /** + * Series name. It's in the format of + * "projects/{project}/locations/{location}/clusters/{cluster}/series/{stream}". + * + * Generated from protobuf field string series = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getSeries() + { + return $this->series; + } + + /** + * Series name. It's in the format of + * "projects/{project}/locations/{location}/clusters/{cluster}/series/{stream}". + * + * Generated from protobuf field string series = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSeries($var) + { + GPBUtil::checkString($var, True); + $this->series = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ServerMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ServerMetadata.php new file mode 100644 index 000000000000..b0768498a1dd --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ServerMetadata.php @@ -0,0 +1,131 @@ +google.cloud.visionai.v1.ServerMetadata + */ +class ServerMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The offset position for the packet in its stream. + * + * Generated from protobuf field int64 offset = 1; + */ + protected $offset = 0; + /** + * The timestamp at which the stream server receives this packet. This is + * based on the local clock of on the server side. It is guaranteed to be + * monotonically increasing for the packets within each session; however + * this timestamp is not comparable across packets sent to the same stream + * different sessions. Session here refers to one individual gRPC streaming + * request to the stream server. + * + * Generated from protobuf field .google.protobuf.Timestamp ingest_time = 2; + */ + protected $ingest_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $offset + * The offset position for the packet in its stream. + * @type \Google\Protobuf\Timestamp $ingest_time + * The timestamp at which the stream server receives this packet. This is + * based on the local clock of on the server side. It is guaranteed to be + * monotonically increasing for the packets within each session; however + * this timestamp is not comparable across packets sent to the same stream + * different sessions. Session here refers to one individual gRPC streaming + * request to the stream server. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamingResources::initOnce(); + parent::__construct($data); + } + + /** + * The offset position for the packet in its stream. + * + * Generated from protobuf field int64 offset = 1; + * @return int|string + */ + public function getOffset() + { + return $this->offset; + } + + /** + * The offset position for the packet in its stream. + * + * Generated from protobuf field int64 offset = 1; + * @param int|string $var + * @return $this + */ + public function setOffset($var) + { + GPBUtil::checkInt64($var); + $this->offset = $var; + + return $this; + } + + /** + * The timestamp at which the stream server receives this packet. This is + * based on the local clock of on the server side. It is guaranteed to be + * monotonically increasing for the packets within each session; however + * this timestamp is not comparable across packets sent to the same stream + * different sessions. Session here refers to one individual gRPC streaming + * request to the stream server. + * + * Generated from protobuf field .google.protobuf.Timestamp ingest_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getIngestTime() + { + return $this->ingest_time; + } + + public function hasIngestTime() + { + return isset($this->ingest_time); + } + + public function clearIngestTime() + { + unset($this->ingest_time); + } + + /** + * The timestamp at which the stream server receives this packet. This is + * based on the local clock of on the server side. It is guaranteed to be + * monotonically increasing for the packets within each session; however + * this timestamp is not comparable across packets sent to the same stream + * different sessions. Session here refers to one individual gRPC streaming + * request to the stream server. + * + * Generated from protobuf field .google.protobuf.Timestamp ingest_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setIngestTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->ingest_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Stream.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Stream.php new file mode 100644 index 000000000000..517430c04f4b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Stream.php @@ -0,0 +1,335 @@ +google.cloud.visionai.v1.Stream + */ +class Stream extends \Google\Protobuf\Internal\Message +{ + /** + * Name of the resource. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + */ + private $labels; + /** + * Annotations to allow clients to store small amounts of arbitrary data. + * + * Generated from protobuf field map annotations = 5; + */ + private $annotations; + /** + * The display name for the stream resource. + * + * Generated from protobuf field string display_name = 6; + */ + protected $display_name = ''; + /** + * Whether to enable the HLS playback service on this stream. + * + * Generated from protobuf field bool enable_hls_playback = 7; + */ + protected $enable_hls_playback = false; + /** + * The name of the media warehouse asset for long term storage of stream data. + * Format: projects/${p_id}/locations/${l_id}/corpora/${c_id}/assets/${a_id} + * Remain empty if the media warehouse storage is not needed for the stream. + * + * Generated from protobuf field string media_warehouse_asset = 8; + */ + protected $media_warehouse_asset = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Name of the resource. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The create timestamp. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The update timestamp. + * @type array|\Google\Protobuf\Internal\MapField $labels + * Labels as key value pairs. + * @type array|\Google\Protobuf\Internal\MapField $annotations + * Annotations to allow clients to store small amounts of arbitrary data. + * @type string $display_name + * The display name for the stream resource. + * @type bool $enable_hls_playback + * Whether to enable the HLS playback service on this stream. + * @type string $media_warehouse_asset + * The name of the media warehouse asset for long term storage of stream data. + * Format: projects/${p_id}/locations/${l_id}/corpora/${c_id}/assets/${a_id} + * Remain empty if the media warehouse storage is not needed for the stream. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsResources::initOnce(); + parent::__construct($data); + } + + /** + * Name of the resource. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the resource. + * + * 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 create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getCreateTime() + { + return $this->create_time; + } + + public function hasCreateTime() + { + return isset($this->create_time); + } + + public function clearCreateTime() + { + unset($this->create_time); + } + + /** + * Output only. The create timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * Output only. The update timestamp. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + * @return \Google\Protobuf\Internal\MapField + */ + public function getLabels() + { + return $this->labels; + } + + /** + * Labels as key value pairs. + * + * Generated from protobuf field map labels = 4; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setLabels($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->labels = $arr; + + return $this; + } + + /** + * Annotations to allow clients to store small amounts of arbitrary data. + * + * Generated from protobuf field map annotations = 5; + * @return \Google\Protobuf\Internal\MapField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Annotations to allow clients to store small amounts of arbitrary data. + * + * Generated from protobuf field map annotations = 5; + * @param array|\Google\Protobuf\Internal\MapField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); + $this->annotations = $arr; + + return $this; + } + + /** + * The display name for the stream resource. + * + * Generated from protobuf field string display_name = 6; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name for the stream resource. + * + * Generated from protobuf field string display_name = 6; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Whether to enable the HLS playback service on this stream. + * + * Generated from protobuf field bool enable_hls_playback = 7; + * @return bool + */ + public function getEnableHlsPlayback() + { + return $this->enable_hls_playback; + } + + /** + * Whether to enable the HLS playback service on this stream. + * + * Generated from protobuf field bool enable_hls_playback = 7; + * @param bool $var + * @return $this + */ + public function setEnableHlsPlayback($var) + { + GPBUtil::checkBool($var); + $this->enable_hls_playback = $var; + + return $this; + } + + /** + * The name of the media warehouse asset for long term storage of stream data. + * Format: projects/${p_id}/locations/${l_id}/corpora/${c_id}/assets/${a_id} + * Remain empty if the media warehouse storage is not needed for the stream. + * + * Generated from protobuf field string media_warehouse_asset = 8; + * @return string + */ + public function getMediaWarehouseAsset() + { + return $this->media_warehouse_asset; + } + + /** + * The name of the media warehouse asset for long term storage of stream data. + * Format: projects/${p_id}/locations/${l_id}/corpora/${c_id}/assets/${a_id} + * Remain empty if the media warehouse storage is not needed for the stream. + * + * Generated from protobuf field string media_warehouse_asset = 8; + * @param string $var + * @return $this + */ + public function setMediaWarehouseAsset($var) + { + GPBUtil::checkString($var, True); + $this->media_warehouse_asset = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotation.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotation.php new file mode 100644 index 000000000000..08c771d5f215 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotation.php @@ -0,0 +1,252 @@ +google.cloud.visionai.v1.StreamAnnotation + */ +class StreamAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * ID of the annotation. It must be unique when used in the certain context. + * For example, all the annotations to one input streams of a Vision AI + * application. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * User-friendly name for the annotation. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * The Vision AI stream resource name. + * + * Generated from protobuf field string source_stream = 3; + */ + protected $source_stream = ''; + /** + * The actual type of Annotation. + * + * Generated from protobuf field .google.cloud.visionai.v1.StreamAnnotationType type = 4; + */ + protected $type = 0; + protected $annotation_payload; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\NormalizedPolygon $active_zone + * Annotation for type ACTIVE_ZONE + * @type \Google\Cloud\VisionAI\V1\NormalizedPolyline $crossing_line + * Annotation for type CROSSING_LINE + * @type string $id + * ID of the annotation. It must be unique when used in the certain context. + * For example, all the annotations to one input streams of a Vision AI + * application. + * @type string $display_name + * User-friendly name for the annotation. + * @type string $source_stream + * The Vision AI stream resource name. + * @type int $type + * The actual type of Annotation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * Annotation for type ACTIVE_ZONE + * + * Generated from protobuf field .google.cloud.visionai.v1.NormalizedPolygon active_zone = 5; + * @return \Google\Cloud\VisionAI\V1\NormalizedPolygon|null + */ + public function getActiveZone() + { + return $this->readOneof(5); + } + + public function hasActiveZone() + { + return $this->hasOneof(5); + } + + /** + * Annotation for type ACTIVE_ZONE + * + * Generated from protobuf field .google.cloud.visionai.v1.NormalizedPolygon active_zone = 5; + * @param \Google\Cloud\VisionAI\V1\NormalizedPolygon $var + * @return $this + */ + public function setActiveZone($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\NormalizedPolygon::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Annotation for type CROSSING_LINE + * + * Generated from protobuf field .google.cloud.visionai.v1.NormalizedPolyline crossing_line = 6; + * @return \Google\Cloud\VisionAI\V1\NormalizedPolyline|null + */ + public function getCrossingLine() + { + return $this->readOneof(6); + } + + public function hasCrossingLine() + { + return $this->hasOneof(6); + } + + /** + * Annotation for type CROSSING_LINE + * + * Generated from protobuf field .google.cloud.visionai.v1.NormalizedPolyline crossing_line = 6; + * @param \Google\Cloud\VisionAI\V1\NormalizedPolyline $var + * @return $this + */ + public function setCrossingLine($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\NormalizedPolyline::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * ID of the annotation. It must be unique when used in the certain context. + * For example, all the annotations to one input streams of a Vision AI + * application. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * ID of the annotation. It must be unique when used in the certain context. + * For example, all the annotations to one input streams of a Vision AI + * application. + * + * 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; + } + + /** + * User-friendly name for the annotation. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * User-friendly name for the annotation. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The Vision AI stream resource name. + * + * Generated from protobuf field string source_stream = 3; + * @return string + */ + public function getSourceStream() + { + return $this->source_stream; + } + + /** + * The Vision AI stream resource name. + * + * Generated from protobuf field string source_stream = 3; + * @param string $var + * @return $this + */ + public function setSourceStream($var) + { + GPBUtil::checkString($var, True); + $this->source_stream = $var; + + return $this; + } + + /** + * The actual type of Annotation. + * + * Generated from protobuf field .google.cloud.visionai.v1.StreamAnnotationType type = 4; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The actual type of Annotation. + * + * Generated from protobuf field .google.cloud.visionai.v1.StreamAnnotationType type = 4; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\StreamAnnotationType::class); + $this->type = $var; + + return $this; + } + + /** + * @return string + */ + public function getAnnotationPayload() + { + return $this->whichOneof("annotation_payload"); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotationType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotationType.php new file mode 100644 index 000000000000..e208472c012e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotationType.php @@ -0,0 +1,66 @@ +google.cloud.visionai.v1.StreamAnnotationType + */ +class StreamAnnotationType +{ + /** + * Type UNSPECIFIED. + * + * Generated from protobuf enum STREAM_ANNOTATION_TYPE_UNSPECIFIED = 0; + */ + const STREAM_ANNOTATION_TYPE_UNSPECIFIED = 0; + /** + * active_zone annotation defines a polygon on top of the content from an + * image/video based stream, following processing will only focus on the + * content inside the active zone. + * + * Generated from protobuf enum STREAM_ANNOTATION_TYPE_ACTIVE_ZONE = 1; + */ + const STREAM_ANNOTATION_TYPE_ACTIVE_ZONE = 1; + /** + * crossing_line annotation defines a polyline on top of the content from an + * image/video based Vision AI stream, events happening across the line will + * be captured. For example, the counts of people who goes acroos the line + * in Occupancy Analytic Processor. + * + * Generated from protobuf enum STREAM_ANNOTATION_TYPE_CROSSING_LINE = 2; + */ + const STREAM_ANNOTATION_TYPE_CROSSING_LINE = 2; + + private static $valueToName = [ + self::STREAM_ANNOTATION_TYPE_UNSPECIFIED => 'STREAM_ANNOTATION_TYPE_UNSPECIFIED', + self::STREAM_ANNOTATION_TYPE_ACTIVE_ZONE => 'STREAM_ANNOTATION_TYPE_ACTIVE_ZONE', + self::STREAM_ANNOTATION_TYPE_CROSSING_LINE => 'STREAM_ANNOTATION_TYPE_CROSSING_LINE', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotations.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotations.php new file mode 100644 index 000000000000..04a1ff95fb15 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotations.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.StreamAnnotations + */ +class StreamAnnotations extends \Google\Protobuf\Internal\Message +{ + /** + * Multiple annotations. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation stream_annotations = 1; + */ + private $stream_annotations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\StreamAnnotation[] $stream_annotations + * Multiple annotations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * Multiple annotations. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation stream_annotations = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\StreamAnnotation> + */ + public function getStreamAnnotations() + { + return $this->stream_annotations; + } + + /** + * Multiple annotations. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation stream_annotations = 1; + * @param \Google\Cloud\VisionAI\V1\StreamAnnotation[] $var + * @return $this + */ + public function setStreamAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\StreamAnnotation::class); + $this->stream_annotations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamWithAnnotation.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamWithAnnotation.php new file mode 100644 index 000000000000..d7a321403fbf --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamWithAnnotation.php @@ -0,0 +1,164 @@ +google.cloud.visionai.v1.StreamWithAnnotation + */ +class StreamWithAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * Vision AI Stream resource name. + * + * Generated from protobuf field string stream = 1 [(.google.api.resource_reference) = { + */ + protected $stream = ''; + /** + * Annotations that will be applied to the whole application. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 2; + */ + private $application_annotations; + /** + * Annotations that will be applied to the specific node of the application. + * If the same type of the annotations is applied to both application and + * node, the node annotation will be added in addition to the global + * application one. + * For example, if there is one active zone annotation for the whole + * application and one active zone annotation for the Occupancy Analytic + * processor, then the Occupancy Analytic processor will have two active zones + * defined. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamWithAnnotation.NodeAnnotation node_annotations = 3; + */ + private $node_annotations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $stream + * Vision AI Stream resource name. + * @type \Google\Cloud\VisionAI\V1\StreamAnnotation[] $application_annotations + * Annotations that will be applied to the whole application. + * @type \Google\Cloud\VisionAI\V1\StreamWithAnnotation\NodeAnnotation[] $node_annotations + * Annotations that will be applied to the specific node of the application. + * If the same type of the annotations is applied to both application and + * node, the node annotation will be added in addition to the global + * application one. + * For example, if there is one active zone annotation for the whole + * application and one active zone annotation for the Occupancy Analytic + * processor, then the Occupancy Analytic processor will have two active zones + * defined. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Vision AI Stream resource name. + * + * Generated from protobuf field string stream = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getStream() + { + return $this->stream; + } + + /** + * Vision AI Stream resource name. + * + * Generated from protobuf field string stream = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setStream($var) + { + GPBUtil::checkString($var, True); + $this->stream = $var; + + return $this; + } + + /** + * Annotations that will be applied to the whole application. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\StreamAnnotation> + */ + public function getApplicationAnnotations() + { + return $this->application_annotations; + } + + /** + * Annotations that will be applied to the whole application. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 2; + * @param \Google\Cloud\VisionAI\V1\StreamAnnotation[] $var + * @return $this + */ + public function setApplicationAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\StreamAnnotation::class); + $this->application_annotations = $arr; + + return $this; + } + + /** + * Annotations that will be applied to the specific node of the application. + * If the same type of the annotations is applied to both application and + * node, the node annotation will be added in addition to the global + * application one. + * For example, if there is one active zone annotation for the whole + * application and one active zone annotation for the Occupancy Analytic + * processor, then the Occupancy Analytic processor will have two active zones + * defined. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamWithAnnotation.NodeAnnotation node_annotations = 3; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\StreamWithAnnotation\NodeAnnotation> + */ + public function getNodeAnnotations() + { + return $this->node_annotations; + } + + /** + * Annotations that will be applied to the specific node of the application. + * If the same type of the annotations is applied to both application and + * node, the node annotation will be added in addition to the global + * application one. + * For example, if there is one active zone annotation for the whole + * application and one active zone annotation for the Occupancy Analytic + * processor, then the Occupancy Analytic processor will have two active zones + * defined. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamWithAnnotation.NodeAnnotation node_annotations = 3; + * @param \Google\Cloud\VisionAI\V1\StreamWithAnnotation\NodeAnnotation[] $var + * @return $this + */ + public function setNodeAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\StreamWithAnnotation\NodeAnnotation::class); + $this->node_annotations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamWithAnnotation/NodeAnnotation.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamWithAnnotation/NodeAnnotation.php new file mode 100644 index 000000000000..47f8c1096442 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamWithAnnotation/NodeAnnotation.php @@ -0,0 +1,101 @@ +google.cloud.visionai.v1.StreamWithAnnotation.NodeAnnotation + */ +class NodeAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * The node name of the application graph. + * + * Generated from protobuf field string node = 1; + */ + protected $node = ''; + /** + * The node specific stream annotations. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + */ + private $annotations; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $node + * The node name of the application graph. + * @type \Google\Cloud\VisionAI\V1\StreamAnnotation[] $annotations + * The node specific stream annotations. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * The node name of the application graph. + * + * Generated from protobuf field string node = 1; + * @return string + */ + public function getNode() + { + return $this->node; + } + + /** + * The node name of the application graph. + * + * Generated from protobuf field string node = 1; + * @param string $var + * @return $this + */ + public function setNode($var) + { + GPBUtil::checkString($var, True); + $this->node = $var; + + return $this; + } + + /** + * The node specific stream annotations. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\StreamAnnotation> + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * The node specific stream annotations. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; + * @param \Google\Cloud\VisionAI\V1\StreamAnnotation[] $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\StreamAnnotation::class); + $this->annotations = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StringArray.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StringArray.php new file mode 100644 index 000000000000..1ba902fdc0b9 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StringArray.php @@ -0,0 +1,67 @@ +google.cloud.visionai.v1.StringArray + */ +class StringArray extends \Google\Protobuf\Internal\Message +{ + /** + * String type values. + * + * Generated from protobuf field repeated string txt_values = 1; + */ + private $txt_values; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $txt_values + * String type values. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * String type values. + * + * Generated from protobuf field repeated string txt_values = 1; + * @return RepeatedField + */ + public function getTxtValues() + { + return $this->txt_values; + } + + /** + * String type values. + * + * Generated from protobuf field repeated string txt_values = 1; + * @param string[] $var + * @return $this + */ + public function setTxtValues($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->txt_values = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig.php new file mode 100644 index 000000000000..f5604f051e83 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig.php @@ -0,0 +1,71 @@ +google.cloud.visionai.v1.TagParsingConfig + */ +class TagParsingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Each tag entity class may have an optional EntityParsingConfig which is + * used to help parse the entities of the class. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig entity_parsing_configs = 1; + */ + private $entity_parsing_configs; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\TagParsingConfig\EntityParsingConfig[] $entity_parsing_configs + * Each tag entity class may have an optional EntityParsingConfig which is + * used to help parse the entities of the class. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Each tag entity class may have an optional EntityParsingConfig which is + * used to help parse the entities of the class. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig entity_parsing_configs = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\TagParsingConfig\EntityParsingConfig> + */ + public function getEntityParsingConfigs() + { + return $this->entity_parsing_configs; + } + + /** + * Each tag entity class may have an optional EntityParsingConfig which is + * used to help parse the entities of the class. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig entity_parsing_configs = 1; + * @param \Google\Cloud\VisionAI\V1\TagParsingConfig\EntityParsingConfig[] $var + * @return $this + */ + public function setEntityParsingConfigs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\TagParsingConfig\EntityParsingConfig::class); + $this->entity_parsing_configs = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig/EntityParsingConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig/EntityParsingConfig.php new file mode 100644 index 000000000000..e0c4bdffebc3 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig/EntityParsingConfig.php @@ -0,0 +1,139 @@ +google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig + */ +class EntityParsingConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The tag entity class name. This should match the class name + * produced by the tag entity detection model. + * + * Generated from protobuf field string entity_class = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $entity_class = ''; + /** + * Optional. An regular expression hint. + * + * Generated from protobuf field string regex = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $regex = ''; + /** + * Optional. Entity matching strategy. + * + * Generated from protobuf field .google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig.EntityMatchingStrategy entity_matching_strategy = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $entity_matching_strategy = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $entity_class + * Required. The tag entity class name. This should match the class name + * produced by the tag entity detection model. + * @type string $regex + * Optional. An regular expression hint. + * @type int $entity_matching_strategy + * Optional. Entity matching strategy. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. The tag entity class name. This should match the class name + * produced by the tag entity detection model. + * + * Generated from protobuf field string entity_class = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getEntityClass() + { + return $this->entity_class; + } + + /** + * Required. The tag entity class name. This should match the class name + * produced by the tag entity detection model. + * + * Generated from protobuf field string entity_class = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setEntityClass($var) + { + GPBUtil::checkString($var, True); + $this->entity_class = $var; + + return $this; + } + + /** + * Optional. An regular expression hint. + * + * Generated from protobuf field string regex = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRegex() + { + return $this->regex; + } + + /** + * Optional. An regular expression hint. + * + * Generated from protobuf field string regex = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRegex($var) + { + GPBUtil::checkString($var, True); + $this->regex = $var; + + return $this; + } + + /** + * Optional. Entity matching strategy. + * + * Generated from protobuf field .google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig.EntityMatchingStrategy entity_matching_strategy = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getEntityMatchingStrategy() + { + return $this->entity_matching_strategy; + } + + /** + * Optional. Entity matching strategy. + * + * Generated from protobuf field .google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig.EntityMatchingStrategy entity_matching_strategy = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setEntityMatchingStrategy($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\TagParsingConfig\EntityParsingConfig\EntityMatchingStrategy::class); + $this->entity_matching_strategy = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig/EntityParsingConfig/EntityMatchingStrategy.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig/EntityParsingConfig/EntityMatchingStrategy.php new file mode 100644 index 000000000000..b3caae3ca68a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig/EntityParsingConfig/EntityMatchingStrategy.php @@ -0,0 +1,62 @@ +google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig.EntityMatchingStrategy + */ +class EntityMatchingStrategy +{ + /** + * If unspecified, multi-line matching will be used by default. + * + * Generated from protobuf enum ENTITY_MATCHING_STRATEGY_UNSPECIFIED = 0; + */ + const ENTITY_MATCHING_STRATEGY_UNSPECIFIED = 0; + /** + * Matches multiple lines of text. + * + * Generated from protobuf enum MULTI_LINE_MATCHING = 1; + */ + const MULTI_LINE_MATCHING = 1; + /** + * Matches the line with the maximum overlap area with entity bounding + * box. + * + * Generated from protobuf enum MAX_OVERLAP_AREA = 2; + */ + const MAX_OVERLAP_AREA = 2; + + private static $valueToName = [ + self::ENTITY_MATCHING_STRATEGY_UNSPECIFIED => 'ENTITY_MATCHING_STRATEGY_UNSPECIFIED', + self::MULTI_LINE_MATCHING => 'MULTI_LINE_MATCHING', + self::MAX_OVERLAP_AREA => 'MAX_OVERLAP_AREA', + ]; + + 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagRecognizerConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagRecognizerConfig.php new file mode 100644 index 000000000000..cc3512cbd514 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagRecognizerConfig.php @@ -0,0 +1,115 @@ +google.cloud.visionai.v1.TagRecognizerConfig + */ +class TagRecognizerConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Confidence threshold to filter detection results. If not set, a system + * default value will be used. + * + * Generated from protobuf field float entity_detection_confidence_threshold = 1; + */ + protected $entity_detection_confidence_threshold = 0.0; + /** + * Configuration to customize how tags are parsed. + * + * Generated from protobuf field .google.cloud.visionai.v1.TagParsingConfig tag_parsing_config = 2; + */ + protected $tag_parsing_config = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $entity_detection_confidence_threshold + * Confidence threshold to filter detection results. If not set, a system + * default value will be used. + * @type \Google\Cloud\VisionAI\V1\TagParsingConfig $tag_parsing_config + * Configuration to customize how tags are parsed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Confidence threshold to filter detection results. If not set, a system + * default value will be used. + * + * Generated from protobuf field float entity_detection_confidence_threshold = 1; + * @return float + */ + public function getEntityDetectionConfidenceThreshold() + { + return $this->entity_detection_confidence_threshold; + } + + /** + * Confidence threshold to filter detection results. If not set, a system + * default value will be used. + * + * Generated from protobuf field float entity_detection_confidence_threshold = 1; + * @param float $var + * @return $this + */ + public function setEntityDetectionConfidenceThreshold($var) + { + GPBUtil::checkFloat($var); + $this->entity_detection_confidence_threshold = $var; + + return $this; + } + + /** + * Configuration to customize how tags are parsed. + * + * Generated from protobuf field .google.cloud.visionai.v1.TagParsingConfig tag_parsing_config = 2; + * @return \Google\Cloud\VisionAI\V1\TagParsingConfig|null + */ + public function getTagParsingConfig() + { + return $this->tag_parsing_config; + } + + public function hasTagParsingConfig() + { + return isset($this->tag_parsing_config); + } + + public function clearTagParsingConfig() + { + unset($this->tag_parsing_config); + } + + /** + * Configuration to customize how tags are parsed. + * + * Generated from protobuf field .google.cloud.visionai.v1.TagParsingConfig tag_parsing_config = 2; + * @param \Google\Cloud\VisionAI\V1\TagParsingConfig $var + * @return $this + */ + public function setTagParsingConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\TagParsingConfig::class); + $this->tag_parsing_config = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployApplicationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployApplicationRequest.php new file mode 100644 index 000000000000..007b4aa5ddfe --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployApplicationRequest.php @@ -0,0 +1,165 @@ +google.cloud.visionai.v1.UndeployApplicationRequest + */ +class UndeployApplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param string $name Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * Please see {@see AppPlatformClient::applicationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\UndeployApplicationRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployApplicationResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployApplicationResponse.php new file mode 100644 index 000000000000..fd6a1bacf294 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployApplicationResponse.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.UndeployApplicationResponse + */ +class UndeployApplicationResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexMetadata.php new file mode 100644 index 000000000000..1d0b658a74a5 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexMetadata.php @@ -0,0 +1,111 @@ +google.cloud.visionai.v1.UndeployIndexMetadata + */ +class UndeployIndexMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + protected $operation_metadata = null; + /** + * Output only. The index being undeployed. + * + * Generated from protobuf field string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $deployed_index = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\OperationMetadata $operation_metadata + * Common metadata of the long-running operation. + * @type string $deployed_index + * Output only. The index being undeployed. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null + */ + public function getOperationMetadata() + { + return $this->operation_metadata; + } + + public function hasOperationMetadata() + { + return isset($this->operation_metadata); + } + + public function clearOperationMetadata() + { + unset($this->operation_metadata); + } + + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var + * @return $this + */ + public function setOperationMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); + $this->operation_metadata = $var; + + return $this; + } + + /** + * Output only. The index being undeployed. + * + * Generated from protobuf field string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getDeployedIndex() + { + return $this->deployed_index; + } + + /** + * Output only. The index being undeployed. + * + * Generated from protobuf field string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setDeployedIndex($var) + { + GPBUtil::checkString($var, True); + $this->deployed_index = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexRequest.php new file mode 100644 index 000000000000..5d7e376f190f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexRequest.php @@ -0,0 +1,75 @@ +google.cloud.visionai.v1.UndeployIndexRequest + */ +class UndeployIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the IndexEndpoint resource on which the + * undeployment will act. Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + * + * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $index_endpoint = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $index_endpoint + * Required. Resource name of the IndexEndpoint resource on which the + * undeployment will act. Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the IndexEndpoint resource on which the + * undeployment will act. Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + * + * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getIndexEndpoint() + { + return $this->index_endpoint; + } + + /** + * Required. Resource name of the IndexEndpoint resource on which the + * undeployment will act. Format: + * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` + * + * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setIndexEndpoint($var) + { + GPBUtil::checkString($var, True); + $this->index_endpoint = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexResponse.php new file mode 100644 index 000000000000..81244592ac59 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexResponse.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.UndeployIndexResponse + */ +class UndeployIndexResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UniversalInputConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UniversalInputConfig.php new file mode 100644 index 000000000000..01d619b140fb --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UniversalInputConfig.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.UniversalInputConfig + */ +class UniversalInputConfig extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAnalysisRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAnalysisRequest.php new file mode 100644 index 000000000000..08f8caa811ef --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAnalysisRequest.php @@ -0,0 +1,230 @@ +google.cloud.visionai.v1.UpdateAnalysisRequest + */ +class UpdateAnalysisRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Analysis resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Analysis analysis = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $analysis = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VisionAI\V1\Analysis $analysis Required. The resource being updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Analysis resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\VisionAI\V1\UpdateAnalysisRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\Analysis $analysis, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAnalysis($analysis) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * Analysis resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\VisionAI\V1\Analysis $analysis + * Required. The resource being updated. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Analysis resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Field mask is used to specify the fields to be overwritten in the + * Analysis resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Analysis analysis = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Analysis|null + */ + public function getAnalysis() + { + return $this->analysis; + } + + public function hasAnalysis() + { + return isset($this->analysis); + } + + public function clearAnalysis() + { + unset($this->analysis); + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Analysis analysis = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Analysis $var + * @return $this + */ + public function setAnalysis($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Analysis::class); + $this->analysis = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAnnotationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAnnotationRequest.php new file mode 100644 index 000000000000..07bfbdc8410d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAnnotationRequest.php @@ -0,0 +1,151 @@ +google.cloud.visionai.v1.UpdateAnnotationRequest + */ +class UpdateAnnotationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The annotation to update. + * The annotation's `name` field is used to identify the annotation to be + * updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * + * Generated from protobuf field .google.cloud.visionai.v1.Annotation annotation = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $annotation = null; + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\VisionAI\V1\Annotation $annotation Required. The annotation to update. + * The annotation's `name` field is used to identify the annotation to be + * updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. + * + * @return \Google\Cloud\VisionAI\V1\UpdateAnnotationRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\Annotation $annotation, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAnnotation($annotation) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Annotation $annotation + * Required. The annotation to update. + * The annotation's `name` field is used to identify the annotation to be + * updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The annotation to update. + * The annotation's `name` field is used to identify the annotation to be + * updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * + * Generated from protobuf field .google.cloud.visionai.v1.Annotation annotation = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Annotation|null + */ + public function getAnnotation() + { + return $this->annotation; + } + + public function hasAnnotation() + { + return isset($this->annotation); + } + + public function clearAnnotation() + { + unset($this->annotation); + } + + /** + * Required. The annotation to update. + * The annotation's `name` field is used to identify the annotation to be + * updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` + * + * Generated from protobuf field .google.cloud.visionai.v1.Annotation annotation = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Annotation $var + * @return $this + */ + public function setAnnotation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Annotation::class); + $this->annotation = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesRequest.php new file mode 100644 index 000000000000..67bfe9bc4a6b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesRequest.php @@ -0,0 +1,232 @@ +google.cloud.visionai.v1.UpdateApplicationInstancesRequest + */ +class UpdateApplicationInstancesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Generated from protobuf field repeated .google.cloud.visionai.v1.UpdateApplicationInstancesRequest.UpdateApplicationInstance application_instances = 2; + */ + private $application_instances; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * If true, Update Request will create one resource if the target resource + * doesn't exist, this time, the field_mask will be ignored. + * + * Generated from protobuf field bool allow_missing = 4; + */ + protected $allow_missing = false; + + /** + * @param string $name Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * Please see {@see AppPlatformClient::applicationName()} for help formatting this field. + * @param \Google\Cloud\VisionAI\V1\UpdateApplicationInstancesRequest\UpdateApplicationInstance[] $applicationInstances + * + * @return \Google\Cloud\VisionAI\V1\UpdateApplicationInstancesRequest + * + * @experimental + */ + public static function build(string $name, array $applicationInstances): self + { + return (new self()) + ->setName($name) + ->setApplicationInstances($applicationInstances); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @type \Google\Cloud\VisionAI\V1\UpdateApplicationInstancesRequest\UpdateApplicationInstance[] $application_instances + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $allow_missing + * If true, Update Request will create one resource if the target resource + * doesn't exist, this time, the field_mask will be ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * 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; + } + + /** + * Generated from protobuf field repeated .google.cloud.visionai.v1.UpdateApplicationInstancesRequest.UpdateApplicationInstance application_instances = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\UpdateApplicationInstancesRequest\UpdateApplicationInstance> + */ + public function getApplicationInstances() + { + return $this->application_instances; + } + + /** + * Generated from protobuf field repeated .google.cloud.visionai.v1.UpdateApplicationInstancesRequest.UpdateApplicationInstance application_instances = 2; + * @param \Google\Cloud\VisionAI\V1\UpdateApplicationInstancesRequest\UpdateApplicationInstance[] $var + * @return $this + */ + public function setApplicationInstances($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\UpdateApplicationInstancesRequest\UpdateApplicationInstance::class); + $this->application_instances = $arr; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * If true, Update Request will create one resource if the target resource + * doesn't exist, this time, the field_mask will be ignored. + * + * Generated from protobuf field bool allow_missing = 4; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * If true, Update Request will create one resource if the target resource + * doesn't exist, this time, the field_mask will be ignored. + * + * Generated from protobuf field bool allow_missing = 4; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesRequest/UpdateApplicationInstance.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesRequest/UpdateApplicationInstance.php new file mode 100644 index 000000000000..c2c385ebc9d2 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesRequest/UpdateApplicationInstance.php @@ -0,0 +1,169 @@ +google.cloud.visionai.v1.UpdateApplicationInstancesRequest.UpdateApplicationInstance + */ +class UpdateApplicationInstance extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in + * the Draft resource by the update. The fields specified in the update_mask + * are relative to the resource, not the full request. A field will be + * overwritten if it is in the mask. If the user does not provide a mask + * then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance = null; + /** + * Required. The id of the instance. + * + * Generated from protobuf field string instance_id = 3 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $instance_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in + * the Draft resource by the update. The fields specified in the update_mask + * are relative to the resource, not the full request. A field will be + * overwritten if it is in the mask. If the user does not provide a mask + * then all fields will be overwritten. + * @type \Google\Cloud\VisionAI\V1\Instance $instance + * Required. The resource being updated. + * @type string $instance_id + * Required. The id of the instance. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in + * the Draft resource by the update. The fields specified in the update_mask + * are relative to the resource, not the full request. A field will be + * overwritten if it is in the mask. If the user does not provide a mask + * then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in + * the Draft resource by the update. The fields specified in the update_mask + * are relative to the resource, not the full request. A field will be + * overwritten if it is in the mask. If the user does not provide a mask + * then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Instance|null + */ + public function getInstance() + { + return $this->instance; + } + + public function hasInstance() + { + return isset($this->instance); + } + + public function clearInstance() + { + unset($this->instance); + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Instance $var + * @return $this + */ + public function setInstance($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Instance::class); + $this->instance = $var; + + return $this; + } + + /** + * Required. The id of the instance. + * + * Generated from protobuf field string instance_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getInstanceId() + { + return $this->instance_id; + } + + /** + * Required. The id of the instance. + * + * Generated from protobuf field string instance_id = 3 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setInstanceId($var) + { + GPBUtil::checkString($var, True); + $this->instance_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesResponse.php new file mode 100644 index 000000000000..a4ff01346eee --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesResponse.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.UpdateApplicationInstancesResponse + */ +class UpdateApplicationInstancesResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationRequest.php new file mode 100644 index 000000000000..9c429a9830ab --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationRequest.php @@ -0,0 +1,230 @@ +google.cloud.visionai.v1.UpdateApplicationRequest + */ +class UpdateApplicationRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * Application resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Application application = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $application = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VisionAI\V1\Application $application Required. The resource being updated. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * Application resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\VisionAI\V1\UpdateApplicationRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\Application $application, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setApplication($application) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * Application resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\VisionAI\V1\Application $application + * Required. The resource being updated. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * Application resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * Application resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Application application = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Application|null + */ + public function getApplication() + { + return $this->application; + } + + public function hasApplication() + { + return isset($this->application); + } + + public function clearApplication() + { + unset($this->application); + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Application application = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Application $var + * @return $this + */ + public function setApplication($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Application::class); + $this->application = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationStreamInputRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationStreamInputRequest.php new file mode 100644 index 000000000000..fa0914e3e5e6 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationStreamInputRequest.php @@ -0,0 +1,241 @@ +google.cloud.visionai.v1.UpdateApplicationStreamInputRequest + */ +class UpdateApplicationStreamInputRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The stream inputs to update, the stream resource name is the key of each + * StreamInput, and it must be unique within each application. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + */ + private $application_stream_inputs; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * If true, UpdateApplicationStreamInput will insert stream input to + * application even if the target stream is not included in the application. + * + * Generated from protobuf field bool allow_missing = 4; + */ + protected $allow_missing = false; + + /** + * @param string $name Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * Please see {@see AppPlatformClient::applicationName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\UpdateApplicationStreamInputRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * @type \Google\Cloud\VisionAI\V1\ApplicationStreamInput[] $application_stream_inputs + * The stream inputs to update, the stream resource name is the key of each + * StreamInput, and it must be unique within each application. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $allow_missing + * If true, UpdateApplicationStreamInput will insert stream input to + * application even if the target stream is not included in the application. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. the name of the application to retrieve. + * Format: + * "projects/{project}/locations/{location}/applications/{application}" + * + * 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 stream inputs to update, the stream resource name is the key of each + * StreamInput, and it must be unique within each application. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\ApplicationStreamInput> + */ + public function getApplicationStreamInputs() + { + return $this->application_stream_inputs; + } + + /** + * The stream inputs to update, the stream resource name is the key of each + * StreamInput, and it must be unique within each application. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; + * @param \Google\Cloud\VisionAI\V1\ApplicationStreamInput[] $var + * @return $this + */ + public function setApplicationStreamInputs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ApplicationStreamInput::class); + $this->application_stream_inputs = $arr; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * If true, UpdateApplicationStreamInput will insert stream input to + * application even if the target stream is not included in the application. + * + * Generated from protobuf field bool allow_missing = 4; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * If true, UpdateApplicationStreamInput will insert stream input to + * application even if the target stream is not included in the application. + * + * Generated from protobuf field bool allow_missing = 4; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationStreamInputResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationStreamInputResponse.php new file mode 100644 index 000000000000..ba050f1642fe --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationStreamInputResponse.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.UpdateApplicationStreamInputResponse + */ +class UpdateApplicationStreamInputResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAssetRequest.php new file mode 100644 index 000000000000..c0a37db5988f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAssetRequest.php @@ -0,0 +1,152 @@ +google.cloud.visionai.v1.UpdateAssetRequest + */ +class UpdateAssetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The asset to update. + * The asset's `name` field is used to identify the asset to be updated. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * + * Generated from protobuf field .google.cloud.visionai.v1.Asset asset = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $asset = null; + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\VisionAI\V1\Asset $asset Required. The asset to update. + * + * The asset's `name` field is used to identify the asset to be updated. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. + * + * @return \Google\Cloud\VisionAI\V1\UpdateAssetRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\Asset $asset, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setAsset($asset) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Asset $asset + * Required. The asset to update. + * The asset's `name` field is used to identify the asset to be updated. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The asset to update. + * The asset's `name` field is used to identify the asset to be updated. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * + * Generated from protobuf field .google.cloud.visionai.v1.Asset asset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Asset|null + */ + public function getAsset() + { + return $this->asset; + } + + public function hasAsset() + { + return isset($this->asset); + } + + public function clearAsset() + { + unset($this->asset); + } + + /** + * Required. The asset to update. + * The asset's `name` field is used to identify the asset to be updated. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` + * + * Generated from protobuf field .google.cloud.visionai.v1.Asset asset = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Asset $var + * @return $this + */ + public function setAsset($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Asset::class); + $this->asset = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateClusterRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateClusterRequest.php new file mode 100644 index 000000000000..097cdc1fa1c1 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateClusterRequest.php @@ -0,0 +1,230 @@ +google.cloud.visionai.v1.UpdateClusterRequest + */ +class UpdateClusterRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Cluster resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.visionai.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $cluster = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VisionAI\V1\Cluster $cluster Required. The resource being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Cluster resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\VisionAI\V1\UpdateClusterRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\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\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * Cluster resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\VisionAI\V1\Cluster $cluster + * Required. The resource being updated + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Cluster resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Field mask is used to specify the fields to be overwritten in the + * Cluster resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; + } + + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.visionai.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Cluster|null + */ + public function getCluster() + { + return $this->cluster; + } + + public function hasCluster() + { + return isset($this->cluster); + } + + public function clearCluster() + { + unset($this->cluster); + } + + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.visionai.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Cluster $var + * @return $this + */ + public function setCluster($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Cluster::class); + $this->cluster = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateCollectionRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateCollectionRequest.php new file mode 100644 index 000000000000..ea2fa74ba2c4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateCollectionRequest.php @@ -0,0 +1,182 @@ +google.cloud.visionai.v1.UpdateCollectionRequest + */ +class UpdateCollectionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The collection to update. + * The collection's `name` field is used to identify the collection to be + * updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * + * Generated from protobuf field .google.cloud.visionai.v1.Collection collection = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $collection = null; + /** + * The list of fields to be updated. + * - Unset `update_mask` or set `update_mask` to be a single "*" only will + * update all updatable fields with the value provided in `collection`. + * - To update `display_name` value to empty string, set it in the + * `collection` + * to empty string, and set `update_mask` with "display_name". Same applies + * to other updatable string fields in the `collection`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\VisionAI\V1\Collection $collection Required. The collection to update. + * + * The collection's `name` field is used to identify the collection to be + * updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. + * - Unset `update_mask` or set `update_mask` to be a single "*" only will + * update all updatable fields with the value provided in `collection`. + * - To update `display_name` value to empty string, set it in the + * `collection` + * to empty string, and set `update_mask` with "display_name". Same applies + * to other updatable string fields in the `collection`. + * + * @return \Google\Cloud\VisionAI\V1\UpdateCollectionRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\Collection $collection, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCollection($collection) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Collection $collection + * Required. The collection to update. + * The collection's `name` field is used to identify the collection to be + * updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. + * - Unset `update_mask` or set `update_mask` to be a single "*" only will + * update all updatable fields with the value provided in `collection`. + * - To update `display_name` value to empty string, set it in the + * `collection` + * to empty string, and set `update_mask` with "display_name". Same applies + * to other updatable string fields in the `collection`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The collection to update. + * The collection's `name` field is used to identify the collection to be + * updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * + * Generated from protobuf field .google.cloud.visionai.v1.Collection collection = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Collection|null + */ + public function getCollection() + { + return $this->collection; + } + + public function hasCollection() + { + return isset($this->collection); + } + + public function clearCollection() + { + unset($this->collection); + } + + /** + * Required. The collection to update. + * The collection's `name` field is used to identify the collection to be + * updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * + * Generated from protobuf field .google.cloud.visionai.v1.Collection collection = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Collection $var + * @return $this + */ + public function setCollection($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Collection::class); + $this->collection = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * - Unset `update_mask` or set `update_mask` to be a single "*" only will + * update all updatable fields with the value provided in `collection`. + * - To update `display_name` value to empty string, set it in the + * `collection` + * to empty string, and set `update_mask` with "display_name". Same applies + * to other updatable string fields in the `collection`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. + * - Unset `update_mask` or set `update_mask` to be a single "*" only will + * update all updatable fields with the value provided in `collection`. + * - To update `display_name` value to empty string, set it in the + * `collection` + * to empty string, and set `update_mask` with "display_name". Same applies + * to other updatable string fields in the `collection`. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateCorpusRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateCorpusRequest.php new file mode 100644 index 000000000000..8d9ec6423687 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateCorpusRequest.php @@ -0,0 +1,136 @@ +google.cloud.visionai.v1.UpdateCorpusRequest + */ +class UpdateCorpusRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The corpus which replaces the resource on the server. + * + * Generated from protobuf field .google.cloud.visionai.v1.Corpus corpus = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $corpus = null; + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\VisionAI\V1\Corpus $corpus Required. The corpus which replaces the resource on the server. + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. + * + * @return \Google\Cloud\VisionAI\V1\UpdateCorpusRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\Corpus $corpus, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCorpus($corpus) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Corpus $corpus + * Required. The corpus which replaces the resource on the server. + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The corpus which replaces the resource on the server. + * + * Generated from protobuf field .google.cloud.visionai.v1.Corpus corpus = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Corpus|null + */ + public function getCorpus() + { + return $this->corpus; + } + + public function hasCorpus() + { + return isset($this->corpus); + } + + public function clearCorpus() + { + unset($this->corpus); + } + + /** + * Required. The corpus which replaces the resource on the server. + * + * Generated from protobuf field .google.cloud.visionai.v1.Corpus corpus = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Corpus $var + * @return $this + */ + public function setCorpus($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Corpus::class); + $this->corpus = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateDataSchemaRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateDataSchemaRequest.php new file mode 100644 index 000000000000..01cb58b6ebaf --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateDataSchemaRequest.php @@ -0,0 +1,146 @@ +google.cloud.visionai.v1.UpdateDataSchemaRequest + */ +class UpdateDataSchemaRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The data schema's `name` field is used to identify the data + * schema to be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchema data_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $data_schema = null; + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\VisionAI\V1\DataSchema $dataSchema Required. The data schema's `name` field is used to identify the data + * schema to be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. + * + * @return \Google\Cloud\VisionAI\V1\UpdateDataSchemaRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\DataSchema $dataSchema, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDataSchema($dataSchema) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\DataSchema $data_schema + * Required. The data schema's `name` field is used to identify the data + * schema to be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The data schema's `name` field is used to identify the data + * schema to be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchema data_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\DataSchema|null + */ + public function getDataSchema() + { + return $this->data_schema; + } + + public function hasDataSchema() + { + return isset($this->data_schema); + } + + public function clearDataSchema() + { + unset($this->data_schema); + } + + /** + * Required. The data schema's `name` field is used to identify the data + * schema to be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` + * + * Generated from protobuf field .google.cloud.visionai.v1.DataSchema data_schema = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\DataSchema $var + * @return $this + */ + public function setDataSchema($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DataSchema::class); + $this->data_schema = $var; + + return $this; + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateDraftRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateDraftRequest.php new file mode 100644 index 000000000000..4a99efb1d058 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateDraftRequest.php @@ -0,0 +1,268 @@ +google.cloud.visionai.v1.UpdateDraftRequest + */ +class UpdateDraftRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * Draft resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Draft draft = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $draft = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * If true, UpdateDraftRequest will create one resource if the target resource + * doesn't exist, this time, the field_mask will be ignored. + * + * Generated from protobuf field bool allow_missing = 4; + */ + protected $allow_missing = false; + + /** + * @param \Google\Cloud\VisionAI\V1\Draft $draft Required. The resource being updated. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * Draft resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\VisionAI\V1\UpdateDraftRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\Draft $draft, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setDraft($draft) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * Draft resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\VisionAI\V1\Draft $draft + * Required. The resource being updated. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @type bool $allow_missing + * If true, UpdateDraftRequest will create one resource if the target resource + * doesn't exist, this time, the field_mask will be ignored. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * Draft resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * Draft resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Draft draft = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Draft|null + */ + public function getDraft() + { + return $this->draft; + } + + public function hasDraft() + { + return isset($this->draft); + } + + public function clearDraft() + { + unset($this->draft); + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Draft draft = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Draft $var + * @return $this + */ + public function setDraft($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Draft::class); + $this->draft = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * If true, UpdateDraftRequest will create one resource if the target resource + * doesn't exist, this time, the field_mask will be ignored. + * + * Generated from protobuf field bool allow_missing = 4; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * If true, UpdateDraftRequest will create one resource if the target resource + * doesn't exist, this time, the field_mask will be ignored. + * + * Generated from protobuf field bool allow_missing = 4; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateEventRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateEventRequest.php new file mode 100644 index 000000000000..97dbf644c2c4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateEventRequest.php @@ -0,0 +1,230 @@ +google.cloud.visionai.v1.UpdateEventRequest + */ +class UpdateEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Event resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $event = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VisionAI\V1\Event $event Required. The resource being updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Event resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\VisionAI\V1\UpdateEventRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\Event $event, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setEvent($event) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * Event resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\VisionAI\V1\Event $event + * Required. The resource being updated. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Event resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Field mask is used to specify the fields to be overwritten in the + * Event resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Event|null + */ + public function getEvent() + { + return $this->event; + } + + public function hasEvent() + { + return isset($this->event); + } + + public function clearEvent() + { + unset($this->event); + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Event $var + * @return $this + */ + public function setEvent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Event::class); + $this->event = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexEndpointMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexEndpointMetadata.php new file mode 100644 index 000000000000..fe0b86ea98e6 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexEndpointMetadata.php @@ -0,0 +1,77 @@ +google.cloud.visionai.v1.UpdateIndexEndpointMetadata + */ +class UpdateIndexEndpointMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + protected $operation_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\OperationMetadata $operation_metadata + * Common metadata of the long-running operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null + */ + public function getOperationMetadata() + { + return $this->operation_metadata; + } + + public function hasOperationMetadata() + { + return isset($this->operation_metadata); + } + + public function clearOperationMetadata() + { + unset($this->operation_metadata); + } + + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var + * @return $this + */ + public function setOperationMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); + $this->operation_metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexEndpointRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexEndpointRequest.php new file mode 100644 index 000000000000..c71496f82e53 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexEndpointRequest.php @@ -0,0 +1,166 @@ +google.cloud.visionai.v1.UpdateIndexEndpointRequest + */ +class UpdateIndexEndpointRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $index_endpoint = null; + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * IndexEndpoint resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. + * A field of the resource will be overwritten if it is in the mask. + * Empty field mask is not allowed. + * If the mask is "*", then this is a full replacement of the resource. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\VisionAI\V1\IndexEndpoint $indexEndpoint Required. The resource being updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * IndexEndpoint resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. + * A field of the resource will be overwritten if it is in the mask. + * Empty field mask is not allowed. + * If the mask is "*", then this is a full replacement of the resource. + * + * @return \Google\Cloud\VisionAI\V1\UpdateIndexEndpointRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\IndexEndpoint $indexEndpoint, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setIndexEndpoint($indexEndpoint) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\IndexEndpoint $index_endpoint + * Required. The resource being updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * IndexEndpoint resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. + * A field of the resource will be overwritten if it is in the mask. + * Empty field mask is not allowed. + * If the mask is "*", then this is a full replacement of the resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\IndexEndpoint|null + */ + public function getIndexEndpoint() + { + return $this->index_endpoint; + } + + public function hasIndexEndpoint() + { + return isset($this->index_endpoint); + } + + public function clearIndexEndpoint() + { + unset($this->index_endpoint); + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\IndexEndpoint $var + * @return $this + */ + public function setIndexEndpoint($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\IndexEndpoint::class); + $this->index_endpoint = $var; + + return $this; + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * IndexEndpoint resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. + * A field of the resource will be overwritten if it is in the mask. + * Empty field mask is not allowed. + * If the mask is "*", then this is a full replacement of the resource. + * + * 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. Field mask is used to specify the fields to be overwritten in the + * IndexEndpoint resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. + * A field of the resource will be overwritten if it is in the mask. + * Empty field mask is not allowed. + * If the mask is "*", then this is a full replacement of the resource. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexMetadata.php new file mode 100644 index 000000000000..298f2d59bd2c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexMetadata.php @@ -0,0 +1,77 @@ +google.cloud.visionai.v1.UpdateIndexMetadata + */ +class UpdateIndexMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + */ + protected $operation_metadata = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\OperationMetadata $operation_metadata + * Common metadata of the long-running operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null + */ + public function getOperationMetadata() + { + return $this->operation_metadata; + } + + public function hasOperationMetadata() + { + return isset($this->operation_metadata); + } + + public function clearOperationMetadata() + { + unset($this->operation_metadata); + } + + /** + * Common metadata of the long-running operation. + * + * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; + * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var + * @return $this + */ + public function setOperationMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); + $this->operation_metadata = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexRequest.php new file mode 100644 index 000000000000..11492af2ed4c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexRequest.php @@ -0,0 +1,161 @@ +google.cloud.visionai.v1.UpdateIndexRequest + */ +class UpdateIndexRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Index index = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $index = null; + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Index resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field of the resource + * will be overwritten if it is in the mask. Empty field mask is not allowed. + * If the mask is "*", it triggers a full update of the index, and also a + * whole rebuild of index data. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\VisionAI\V1\Index $index Required. The resource being updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Index resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field of the resource + * will be overwritten if it is in the mask. Empty field mask is not allowed. + * If the mask is "*", it triggers a full update of the index, and also a + * whole rebuild of index data. + * + * @return \Google\Cloud\VisionAI\V1\UpdateIndexRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\Index $index, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setIndex($index) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\Index $index + * Required. The resource being updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * Index resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field of the resource + * will be overwritten if it is in the mask. Empty field mask is not allowed. + * If the mask is "*", it triggers a full update of the index, and also a + * whole rebuild of index data. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Index index = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Index|null + */ + public function getIndex() + { + return $this->index; + } + + public function hasIndex() + { + return isset($this->index); + } + + public function clearIndex() + { + unset($this->index); + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Index index = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Index $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Index::class); + $this->index = $var; + + return $this; + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Index resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field of the resource + * will be overwritten if it is in the mask. Empty field mask is not allowed. + * If the mask is "*", it triggers a full update of the index, and also a + * whole rebuild of index data. + * + * 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. Field mask is used to specify the fields to be overwritten in the + * Index resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field of the resource + * will be overwritten if it is in the mask. Empty field mask is not allowed. + * If the mask is "*", it triggers a full update of the index, and also a + * whole rebuild of index data. + * + * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateOperatorRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateOperatorRequest.php new file mode 100644 index 000000000000..eeb3e48c5322 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateOperatorRequest.php @@ -0,0 +1,230 @@ +google.cloud.visionai.v1.UpdateOperatorRequest + */ +class UpdateOperatorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Operator resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.visionai.v1.Operator operator = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $operator = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VisionAI\V1\Operator $operator Required. The resource being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Operator resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\VisionAI\V1\UpdateOperatorRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\Operator $operator, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setOperator($operator) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * Operator resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\VisionAI\V1\Operator $operator + * Required. The resource being updated + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Operator resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Field mask is used to specify the fields to be overwritten in the + * Operator resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; + } + + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.visionai.v1.Operator operator = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Operator|null + */ + public function getOperator() + { + return $this->operator; + } + + public function hasOperator() + { + return isset($this->operator); + } + + public function clearOperator() + { + unset($this->operator); + } + + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.visionai.v1.Operator operator = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Operator $var + * @return $this + */ + public function setOperator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Operator::class); + $this->operator = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateProcessRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateProcessRequest.php new file mode 100644 index 000000000000..7e6e5003a52c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateProcessRequest.php @@ -0,0 +1,230 @@ +google.cloud.visionai.v1.UpdateProcessRequest + */ +class UpdateProcessRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Process resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $process = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VisionAI\V1\Process $process Required. The resource being updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Process resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\VisionAI\V1\UpdateProcessRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\Process $process, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setProcess($process) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * Process resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\VisionAI\V1\Process $process + * Required. The resource being updated. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Process resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Field mask is used to specify the fields to be overwritten in the + * Process resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Process|null + */ + public function getProcess() + { + return $this->process; + } + + public function hasProcess() + { + return isset($this->process); + } + + public function clearProcess() + { + unset($this->process); + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Process $var + * @return $this + */ + public function setProcess($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Process::class); + $this->process = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateProcessorRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateProcessorRequest.php new file mode 100644 index 000000000000..94ea27b9de76 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateProcessorRequest.php @@ -0,0 +1,230 @@ +google.cloud.visionai.v1.UpdateProcessorRequest + */ +class UpdateProcessorRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * Processor resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $processor = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VisionAI\V1\Processor $processor Required. The resource being updated. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the + * Processor resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\VisionAI\V1\UpdateProcessorRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\Processor $processor, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setProcessor($processor) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask is used to specify the fields to be overwritten in the + * Processor resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\VisionAI\V1\Processor $processor + * Required. The resource being updated. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * Processor resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Field mask is used to specify the fields to be overwritten in the + * Processor resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Processor|null + */ + public function getProcessor() + { + return $this->processor; + } + + public function hasProcessor() + { + return isset($this->processor); + } + + public function clearProcessor() + { + unset($this->processor); + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Processor $var + * @return $this + */ + public function setProcessor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Processor::class); + $this->processor = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSearchConfigRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSearchConfigRequest.php new file mode 100644 index 000000000000..e3d0ec8fed55 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSearchConfigRequest.php @@ -0,0 +1,157 @@ +google.cloud.visionai.v1.UpdateSearchConfigRequest + */ +class UpdateSearchConfigRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The search configuration to update. + * The search configuration's `name` field is used to identify the resource to + * be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchConfig search_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $search_config = null; + /** + * The list of fields to be updated. If left unset, all field paths will be + * updated/overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\VisionAI\V1\SearchConfig $searchConfig Required. The search configuration to update. + * + * The search configuration's `name` field is used to identify the resource to + * be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. If left unset, all field paths will be + * updated/overwritten. + * + * @return \Google\Cloud\VisionAI\V1\UpdateSearchConfigRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\SearchConfig $searchConfig, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSearchConfig($searchConfig) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\SearchConfig $search_config + * Required. The search configuration to update. + * The search configuration's `name` field is used to identify the resource to + * be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. If left unset, all field paths will be + * updated/overwritten. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The search configuration to update. + * The search configuration's `name` field is used to identify the resource to + * be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchConfig search_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\SearchConfig|null + */ + public function getSearchConfig() + { + return $this->search_config; + } + + public function hasSearchConfig() + { + return isset($this->search_config); + } + + public function clearSearchConfig() + { + unset($this->search_config); + } + + /** + * Required. The search configuration to update. + * The search configuration's `name` field is used to identify the resource to + * be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchConfig search_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\SearchConfig $var + * @return $this + */ + public function setSearchConfig($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\SearchConfig::class); + $this->search_config = $var; + + return $this; + } + + /** + * The list of fields to be updated. If left unset, all field paths will be + * updated/overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. If left unset, all field paths will be + * updated/overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSearchHypernymRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSearchHypernymRequest.php new file mode 100644 index 000000000000..eb217af11969 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSearchHypernymRequest.php @@ -0,0 +1,156 @@ +google.cloud.visionai.v1.UpdateSearchHypernymRequest + */ +class UpdateSearchHypernymRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The SearchHypernym to update. + * The search hypernym's `name` field is used to identify the search hypernym + * to be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchHypernym search_hypernym = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $search_hypernym = null; + /** + * The list of fields to be updated. If left unset, all field paths will be + * updated/overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\VisionAI\V1\SearchHypernym $searchHypernym Required. The SearchHypernym to update. + * The search hypernym's `name` field is used to identify the search hypernym + * to be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. If left unset, all field paths will be + * updated/overwritten. + * + * @return \Google\Cloud\VisionAI\V1\UpdateSearchHypernymRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\SearchHypernym $searchHypernym, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSearchHypernym($searchHypernym) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\SearchHypernym $search_hypernym + * Required. The SearchHypernym to update. + * The search hypernym's `name` field is used to identify the search hypernym + * to be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * @type \Google\Protobuf\FieldMask $update_mask + * The list of fields to be updated. If left unset, all field paths will be + * updated/overwritten. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The SearchHypernym to update. + * The search hypernym's `name` field is used to identify the search hypernym + * to be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchHypernym search_hypernym = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\SearchHypernym|null + */ + public function getSearchHypernym() + { + return $this->search_hypernym; + } + + public function hasSearchHypernym() + { + return isset($this->search_hypernym); + } + + public function clearSearchHypernym() + { + unset($this->search_hypernym); + } + + /** + * Required. The SearchHypernym to update. + * The search hypernym's `name` field is used to identify the search hypernym + * to be updated. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` + * + * Generated from protobuf field .google.cloud.visionai.v1.SearchHypernym search_hypernym = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\SearchHypernym $var + * @return $this + */ + public function setSearchHypernym($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\SearchHypernym::class); + $this->search_hypernym = $var; + + return $this; + } + + /** + * The list of fields to be updated. If left unset, all field paths will be + * updated/overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * The list of fields to be updated. If left unset, all field paths will be + * updated/overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSeriesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSeriesRequest.php new file mode 100644 index 000000000000..00e8e1a8711a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSeriesRequest.php @@ -0,0 +1,230 @@ +google.cloud.visionai.v1.UpdateSeriesRequest + */ +class UpdateSeriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Series resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten + * if it is in the mask. If the user does not provide a mask then all fields + * will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.visionai.v1.Series series = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $series = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VisionAI\V1\Series $series Required. The resource being updated + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Series resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten + * if it is in the mask. If the user does not provide a mask then all fields + * will be overwritten. + * + * @return \Google\Cloud\VisionAI\V1\UpdateSeriesRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\Series $series, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSeries($series) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * Series resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten + * if it is in the mask. If the user does not provide a mask then all fields + * will be overwritten. + * @type \Google\Cloud\VisionAI\V1\Series $series + * Required. The resource being updated + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Series resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten + * if it is in the mask. If the user does not provide a mask then all fields + * will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Field mask is used to specify the fields to be overwritten in the + * Series resource by the update. The fields specified in the update_mask are + * relative to the resource, not the full request. A field will be overwritten + * if it is in the mask. If the user does not provide a mask then all fields + * will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; + } + + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.visionai.v1.Series series = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Series|null + */ + public function getSeries() + { + return $this->series; + } + + public function hasSeries() + { + return isset($this->series); + } + + public function clearSeries() + { + unset($this->series); + } + + /** + * Required. The resource being updated + * + * Generated from protobuf field .google.cloud.visionai.v1.Series series = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Series $var + * @return $this + */ + public function setSeries($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Series::class); + $this->series = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateStreamRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateStreamRequest.php new file mode 100644 index 000000000000..87ca07d05322 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateStreamRequest.php @@ -0,0 +1,230 @@ +google.cloud.visionai.v1.UpdateStreamRequest + */ +class UpdateStreamRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Stream resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Stream stream = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $stream = null; + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Cloud\VisionAI\V1\Stream $stream Required. The resource being updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the + * Stream resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * @return \Google\Cloud\VisionAI\V1\UpdateStreamRequest + * + * @experimental + */ + public static function build(\Google\Cloud\VisionAI\V1\Stream $stream, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setStream($stream) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\FieldMask $update_mask + * Required. Field mask is used to specify the fields to be overwritten in the + * Stream resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * @type \Google\Cloud\VisionAI\V1\Stream $stream + * Required. The resource being updated. + * @type string $request_id + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); + parent::__construct($data); + } + + /** + * Required. Field mask is used to specify the fields to be overwritten in the + * Stream resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Field mask is used to specify the fields to be overwritten in the + * Stream resource by the update. + * The fields specified in the update_mask are relative to the resource, not + * the full request. A field will be overwritten if it is in the mask. If the + * user does not provide a mask then all fields will be overwritten. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Stream stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\VisionAI\V1\Stream|null + */ + public function getStream() + { + return $this->stream; + } + + public function hasStream() + { + return isset($this->stream); + } + + public function clearStream() + { + unset($this->stream); + } + + /** + * Required. The resource being updated. + * + * Generated from protobuf field .google.cloud.visionai.v1.Stream stream = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\VisionAI\V1\Stream $var + * @return $this + */ + public function setStream($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Stream::class); + $this->stream = $var; + + return $this; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. An optional request ID to identify requests. Specify a unique + * request ID so that if you must retry your request, the server will know to + * ignore the request if it has already been completed. The server will + * guarantee that for at least 60 minutes since the first request. + * For example, consider a situation where you make an initial request and the + * request times out. If you make the request again with the same request ID, + * the server can check if original operation with the same request ID was + * received, and if so, will ignore the second request. This prevents clients + * from accidentally creating duplicate commitments. + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * + * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetMetadata.php new file mode 100644 index 000000000000..e478856726ec --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetMetadata.php @@ -0,0 +1,121 @@ +google.cloud.visionai.v1.UploadAssetMetadata + */ +class UploadAssetMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The start time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + */ + protected $start_time = null; + /** + * The update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + */ + protected $update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $start_time + * The start time of the operation. + * @type \Google\Protobuf\Timestamp $update_time + * The update time of the operation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The start time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * The start time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * The update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getUpdateTime() + { + return $this->update_time; + } + + public function hasUpdateTime() + { + return isset($this->update_time); + } + + public function clearUpdateTime() + { + unset($this->update_time); + } + + /** + * The update time of the operation. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetRequest.php new file mode 100644 index 000000000000..308f74eb14c6 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetRequest.php @@ -0,0 +1,119 @@ +google.cloud.visionai.v1.UploadAssetRequest + */ +class UploadAssetRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the asset to upload. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The source of the asset. + * + * Generated from protobuf field .google.cloud.visionai.v1.AssetSource asset_source = 2; + */ + protected $asset_source = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The resource name of the asset to upload. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * @type \Google\Cloud\VisionAI\V1\AssetSource $asset_source + * The source of the asset. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the asset to upload. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. The resource name of the asset to upload. + * Format: + * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The source of the asset. + * + * Generated from protobuf field .google.cloud.visionai.v1.AssetSource asset_source = 2; + * @return \Google\Cloud\VisionAI\V1\AssetSource|null + */ + public function getAssetSource() + { + return $this->asset_source; + } + + public function hasAssetSource() + { + return isset($this->asset_source); + } + + public function clearAssetSource() + { + unset($this->asset_source); + } + + /** + * The source of the asset. + * + * Generated from protobuf field .google.cloud.visionai.v1.AssetSource asset_source = 2; + * @param \Google\Cloud\VisionAI\V1\AssetSource $var + * @return $this + */ + public function setAssetSource($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AssetSource::class); + $this->asset_source = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetResponse.php new file mode 100644 index 000000000000..76582fb83be4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetResponse.php @@ -0,0 +1,33 @@ +google.cloud.visionai.v1.UploadAssetResponse + */ +class UploadAssetResponse extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UserSpecifiedAnnotation.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UserSpecifiedAnnotation.php new file mode 100644 index 000000000000..0af0bf076fbe --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UserSpecifiedAnnotation.php @@ -0,0 +1,163 @@ +google.cloud.visionai.v1.UserSpecifiedAnnotation + */ +class UserSpecifiedAnnotation extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Key of the annotation. The key must be set with type by + * CreateDataSchema. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $key = ''; + /** + * Value of the annotation. The value must be able to convert + * to the type according to the data schema. + * + * Generated from protobuf field .google.cloud.visionai.v1.AnnotationValue value = 2; + */ + protected $value = null; + /** + * Partition information in time and space for the sub-asset level annotation. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition partition = 3; + */ + protected $partition = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * Required. Key of the annotation. The key must be set with type by + * CreateDataSchema. + * @type \Google\Cloud\VisionAI\V1\AnnotationValue $value + * Value of the annotation. The value must be able to convert + * to the type according to the data schema. + * @type \Google\Cloud\VisionAI\V1\Partition $partition + * Partition information in time and space for the sub-asset level annotation. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. Key of the annotation. The key must be set with type by + * CreateDataSchema. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * Required. Key of the annotation. The key must be set with type by + * CreateDataSchema. + * + * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * Value of the annotation. The value must be able to convert + * to the type according to the data schema. + * + * Generated from protobuf field .google.cloud.visionai.v1.AnnotationValue value = 2; + * @return \Google\Cloud\VisionAI\V1\AnnotationValue|null + */ + public function getValue() + { + return $this->value; + } + + public function hasValue() + { + return isset($this->value); + } + + public function clearValue() + { + unset($this->value); + } + + /** + * Value of the annotation. The value must be able to convert + * to the type according to the data schema. + * + * Generated from protobuf field .google.cloud.visionai.v1.AnnotationValue value = 2; + * @param \Google\Cloud\VisionAI\V1\AnnotationValue $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AnnotationValue::class); + $this->value = $var; + + return $this; + } + + /** + * Partition information in time and space for the sub-asset level annotation. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition partition = 3; + * @return \Google\Cloud\VisionAI\V1\Partition|null + */ + public function getPartition() + { + return $this->partition; + } + + public function hasPartition() + { + return isset($this->partition); + } + + public function clearPartition() + { + unset($this->partition); + } + + /** + * Partition information in time and space for the sub-asset level annotation. + * + * Generated from protobuf field .google.cloud.visionai.v1.Partition partition = 3; + * @param \Google\Cloud\VisionAI\V1\Partition $var + * @return $this + */ + public function setPartition($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Partition::class); + $this->partition = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexAutoMLVideoConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexAutoMLVideoConfig.php new file mode 100644 index 000000000000..ef4d65a85010 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexAutoMLVideoConfig.php @@ -0,0 +1,185 @@ +google.cloud.visionai.v1.VertexAutoMLVideoConfig + */ +class VertexAutoMLVideoConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Only entities with higher score than the threshold will be returned. + * Value 0.0 means returns all the detected entities. + * + * Generated from protobuf field float confidence_threshold = 1; + */ + protected $confidence_threshold = 0.0; + /** + * Labels specified in this field won't be returned. + * + * Generated from protobuf field repeated string blocked_labels = 2; + */ + private $blocked_labels; + /** + * At most this many predictions will be returned per output frame. + * Value 0 means to return all the detected entities. + * + * Generated from protobuf field int32 max_predictions = 3; + */ + protected $max_predictions = 0; + /** + * Only Bounding Box whose size is larger than this limit will be returned. + * Object Tracking only. + * Value 0.0 means to return all the detected entities. + * + * Generated from protobuf field float bounding_box_size_limit = 4; + */ + protected $bounding_box_size_limit = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $confidence_threshold + * Only entities with higher score than the threshold will be returned. + * Value 0.0 means returns all the detected entities. + * @type string[] $blocked_labels + * Labels specified in this field won't be returned. + * @type int $max_predictions + * At most this many predictions will be returned per output frame. + * Value 0 means to return all the detected entities. + * @type float $bounding_box_size_limit + * Only Bounding Box whose size is larger than this limit will be returned. + * Object Tracking only. + * Value 0.0 means to return all the detected entities. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Only entities with higher score than the threshold will be returned. + * Value 0.0 means returns all the detected entities. + * + * Generated from protobuf field float confidence_threshold = 1; + * @return float + */ + public function getConfidenceThreshold() + { + return $this->confidence_threshold; + } + + /** + * Only entities with higher score than the threshold will be returned. + * Value 0.0 means returns all the detected entities. + * + * Generated from protobuf field float confidence_threshold = 1; + * @param float $var + * @return $this + */ + public function setConfidenceThreshold($var) + { + GPBUtil::checkFloat($var); + $this->confidence_threshold = $var; + + return $this; + } + + /** + * Labels specified in this field won't be returned. + * + * Generated from protobuf field repeated string blocked_labels = 2; + * @return RepeatedField + */ + public function getBlockedLabels() + { + return $this->blocked_labels; + } + + /** + * Labels specified in this field won't be returned. + * + * Generated from protobuf field repeated string blocked_labels = 2; + * @param string[] $var + * @return $this + */ + public function setBlockedLabels($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->blocked_labels = $arr; + + return $this; + } + + /** + * At most this many predictions will be returned per output frame. + * Value 0 means to return all the detected entities. + * + * Generated from protobuf field int32 max_predictions = 3; + * @return int + */ + public function getMaxPredictions() + { + return $this->max_predictions; + } + + /** + * At most this many predictions will be returned per output frame. + * Value 0 means to return all the detected entities. + * + * Generated from protobuf field int32 max_predictions = 3; + * @param int $var + * @return $this + */ + public function setMaxPredictions($var) + { + GPBUtil::checkInt32($var); + $this->max_predictions = $var; + + return $this; + } + + /** + * Only Bounding Box whose size is larger than this limit will be returned. + * Object Tracking only. + * Value 0.0 means to return all the detected entities. + * + * Generated from protobuf field float bounding_box_size_limit = 4; + * @return float + */ + public function getBoundingBoxSizeLimit() + { + return $this->bounding_box_size_limit; + } + + /** + * Only Bounding Box whose size is larger than this limit will be returned. + * Object Tracking only. + * Value 0.0 means to return all the detected entities. + * + * Generated from protobuf field float bounding_box_size_limit = 4; + * @param float $var + * @return $this + */ + public function setBoundingBoxSizeLimit($var) + { + GPBUtil::checkFloat($var); + $this->bounding_box_size_limit = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexAutoMLVisionConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexAutoMLVisionConfig.php new file mode 100644 index 000000000000..efc46084f96c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexAutoMLVisionConfig.php @@ -0,0 +1,109 @@ +google.cloud.visionai.v1.VertexAutoMLVisionConfig + */ +class VertexAutoMLVisionConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Only entities with higher score than the threshold will be returned. + * Value 0.0 means to return all the detected entities. + * + * Generated from protobuf field float confidence_threshold = 1; + */ + protected $confidence_threshold = 0.0; + /** + * At most this many predictions will be returned per output frame. + * Value 0 means to return all the detected entities. + * + * Generated from protobuf field int32 max_predictions = 2; + */ + protected $max_predictions = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $confidence_threshold + * Only entities with higher score than the threshold will be returned. + * Value 0.0 means to return all the detected entities. + * @type int $max_predictions + * At most this many predictions will be returned per output frame. + * Value 0 means to return all the detected entities. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Only entities with higher score than the threshold will be returned. + * Value 0.0 means to return all the detected entities. + * + * Generated from protobuf field float confidence_threshold = 1; + * @return float + */ + public function getConfidenceThreshold() + { + return $this->confidence_threshold; + } + + /** + * Only entities with higher score than the threshold will be returned. + * Value 0.0 means to return all the detected entities. + * + * Generated from protobuf field float confidence_threshold = 1; + * @param float $var + * @return $this + */ + public function setConfidenceThreshold($var) + { + GPBUtil::checkFloat($var); + $this->confidence_threshold = $var; + + return $this; + } + + /** + * At most this many predictions will be returned per output frame. + * Value 0 means to return all the detected entities. + * + * Generated from protobuf field int32 max_predictions = 2; + * @return int + */ + public function getMaxPredictions() + { + return $this->max_predictions; + } + + /** + * At most this many predictions will be returned per output frame. + * Value 0 means to return all the detected entities. + * + * Generated from protobuf field int32 max_predictions = 2; + * @param int $var + * @return $this + */ + public function setMaxPredictions($var) + { + GPBUtil::checkInt32($var); + $this->max_predictions = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexCustomConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexCustomConfig.php new file mode 100644 index 000000000000..25af76fc7a99 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexCustomConfig.php @@ -0,0 +1,351 @@ +google.cloud.visionai.v1.VertexCustomConfig + */ +class VertexCustomConfig extends \Google\Protobuf\Internal\Message +{ + /** + * The max prediction frame per second. This attribute sets how fast the + * operator sends prediction requests to Vertex AI endpoint. Default value is + * 0, which means there is no max prediction fps limit. The operator sends + * prediction requests at input fps. + * + * Generated from protobuf field int32 max_prediction_fps = 1; + */ + protected $max_prediction_fps = 0; + /** + * A description of resources that are dedicated to the DeployedModel, and + * that need a higher degree of manual configuration. + * + * Generated from protobuf field .google.cloud.visionai.v1.DedicatedResources dedicated_resources = 2; + */ + protected $dedicated_resources = null; + /** + * If not empty, the prediction result will be sent to the specified cloud + * function for post processing. + * * The cloud function will receive AppPlatformCloudFunctionRequest where + * the annotations field will be the json format of proto PredictResponse. + * * The cloud function should return AppPlatformCloudFunctionResponse with + * PredictResponse stored in the annotations field. + * * To drop the prediction output, simply clear the payload field in the + * returned AppPlatformCloudFunctionResponse. + * + * Generated from protobuf field string post_processing_cloud_function = 3; + */ + protected $post_processing_cloud_function = ''; + /** + * If true, the prediction request received by custom model will also contain + * metadata with the following schema: + * 'appPlatformMetadata': { + * 'ingestionTime': DOUBLE; (UNIX timestamp) + * 'application': STRING; + * 'instanceId': STRING; + * 'node': STRING; + * 'processor': STRING; + * } + * + * Generated from protobuf field bool attach_application_metadata = 4; + */ + protected $attach_application_metadata = false; + /** + * Optional. By setting the configuration_input_topic, processor will + * subscribe to given topic, only pub/sub topic is supported now. Example + * channel: + * //pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic + * message schema should be: + * message Message { + * // The ID of the stream that associates with the application instance. + * string stream_id = 1; + * // The target fps. By default, the custom processor will *not* send any + * data to the Vertex Prediction container. Note that once the + * dynamic_config_input_topic is set, max_prediction_fps will not work and be + * preceded by the fps set inside the topic. + * int32 fps = 2; + * } + * + * Generated from protobuf field optional string dynamic_config_input_topic = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $dynamic_config_input_topic = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $max_prediction_fps + * The max prediction frame per second. This attribute sets how fast the + * operator sends prediction requests to Vertex AI endpoint. Default value is + * 0, which means there is no max prediction fps limit. The operator sends + * prediction requests at input fps. + * @type \Google\Cloud\VisionAI\V1\DedicatedResources $dedicated_resources + * A description of resources that are dedicated to the DeployedModel, and + * that need a higher degree of manual configuration. + * @type string $post_processing_cloud_function + * If not empty, the prediction result will be sent to the specified cloud + * function for post processing. + * * The cloud function will receive AppPlatformCloudFunctionRequest where + * the annotations field will be the json format of proto PredictResponse. + * * The cloud function should return AppPlatformCloudFunctionResponse with + * PredictResponse stored in the annotations field. + * * To drop the prediction output, simply clear the payload field in the + * returned AppPlatformCloudFunctionResponse. + * @type bool $attach_application_metadata + * If true, the prediction request received by custom model will also contain + * metadata with the following schema: + * 'appPlatformMetadata': { + * 'ingestionTime': DOUBLE; (UNIX timestamp) + * 'application': STRING; + * 'instanceId': STRING; + * 'node': STRING; + * 'processor': STRING; + * } + * @type string $dynamic_config_input_topic + * Optional. By setting the configuration_input_topic, processor will + * subscribe to given topic, only pub/sub topic is supported now. Example + * channel: + * //pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic + * message schema should be: + * message Message { + * // The ID of the stream that associates with the application instance. + * string stream_id = 1; + * // The target fps. By default, the custom processor will *not* send any + * data to the Vertex Prediction container. Note that once the + * dynamic_config_input_topic is set, max_prediction_fps will not work and be + * preceded by the fps set inside the topic. + * int32 fps = 2; + * } + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * The max prediction frame per second. This attribute sets how fast the + * operator sends prediction requests to Vertex AI endpoint. Default value is + * 0, which means there is no max prediction fps limit. The operator sends + * prediction requests at input fps. + * + * Generated from protobuf field int32 max_prediction_fps = 1; + * @return int + */ + public function getMaxPredictionFps() + { + return $this->max_prediction_fps; + } + + /** + * The max prediction frame per second. This attribute sets how fast the + * operator sends prediction requests to Vertex AI endpoint. Default value is + * 0, which means there is no max prediction fps limit. The operator sends + * prediction requests at input fps. + * + * Generated from protobuf field int32 max_prediction_fps = 1; + * @param int $var + * @return $this + */ + public function setMaxPredictionFps($var) + { + GPBUtil::checkInt32($var); + $this->max_prediction_fps = $var; + + return $this; + } + + /** + * A description of resources that are dedicated to the DeployedModel, and + * that need a higher degree of manual configuration. + * + * Generated from protobuf field .google.cloud.visionai.v1.DedicatedResources dedicated_resources = 2; + * @return \Google\Cloud\VisionAI\V1\DedicatedResources|null + */ + public function getDedicatedResources() + { + return $this->dedicated_resources; + } + + public function hasDedicatedResources() + { + return isset($this->dedicated_resources); + } + + public function clearDedicatedResources() + { + unset($this->dedicated_resources); + } + + /** + * A description of resources that are dedicated to the DeployedModel, and + * that need a higher degree of manual configuration. + * + * Generated from protobuf field .google.cloud.visionai.v1.DedicatedResources dedicated_resources = 2; + * @param \Google\Cloud\VisionAI\V1\DedicatedResources $var + * @return $this + */ + public function setDedicatedResources($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DedicatedResources::class); + $this->dedicated_resources = $var; + + return $this; + } + + /** + * If not empty, the prediction result will be sent to the specified cloud + * function for post processing. + * * The cloud function will receive AppPlatformCloudFunctionRequest where + * the annotations field will be the json format of proto PredictResponse. + * * The cloud function should return AppPlatformCloudFunctionResponse with + * PredictResponse stored in the annotations field. + * * To drop the prediction output, simply clear the payload field in the + * returned AppPlatformCloudFunctionResponse. + * + * Generated from protobuf field string post_processing_cloud_function = 3; + * @return string + */ + public function getPostProcessingCloudFunction() + { + return $this->post_processing_cloud_function; + } + + /** + * If not empty, the prediction result will be sent to the specified cloud + * function for post processing. + * * The cloud function will receive AppPlatformCloudFunctionRequest where + * the annotations field will be the json format of proto PredictResponse. + * * The cloud function should return AppPlatformCloudFunctionResponse with + * PredictResponse stored in the annotations field. + * * To drop the prediction output, simply clear the payload field in the + * returned AppPlatformCloudFunctionResponse. + * + * Generated from protobuf field string post_processing_cloud_function = 3; + * @param string $var + * @return $this + */ + public function setPostProcessingCloudFunction($var) + { + GPBUtil::checkString($var, True); + $this->post_processing_cloud_function = $var; + + return $this; + } + + /** + * If true, the prediction request received by custom model will also contain + * metadata with the following schema: + * 'appPlatformMetadata': { + * 'ingestionTime': DOUBLE; (UNIX timestamp) + * 'application': STRING; + * 'instanceId': STRING; + * 'node': STRING; + * 'processor': STRING; + * } + * + * Generated from protobuf field bool attach_application_metadata = 4; + * @return bool + */ + public function getAttachApplicationMetadata() + { + return $this->attach_application_metadata; + } + + /** + * If true, the prediction request received by custom model will also contain + * metadata with the following schema: + * 'appPlatformMetadata': { + * 'ingestionTime': DOUBLE; (UNIX timestamp) + * 'application': STRING; + * 'instanceId': STRING; + * 'node': STRING; + * 'processor': STRING; + * } + * + * Generated from protobuf field bool attach_application_metadata = 4; + * @param bool $var + * @return $this + */ + public function setAttachApplicationMetadata($var) + { + GPBUtil::checkBool($var); + $this->attach_application_metadata = $var; + + return $this; + } + + /** + * Optional. By setting the configuration_input_topic, processor will + * subscribe to given topic, only pub/sub topic is supported now. Example + * channel: + * //pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic + * message schema should be: + * message Message { + * // The ID of the stream that associates with the application instance. + * string stream_id = 1; + * // The target fps. By default, the custom processor will *not* send any + * data to the Vertex Prediction container. Note that once the + * dynamic_config_input_topic is set, max_prediction_fps will not work and be + * preceded by the fps set inside the topic. + * int32 fps = 2; + * } + * + * Generated from protobuf field optional string dynamic_config_input_topic = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getDynamicConfigInputTopic() + { + return isset($this->dynamic_config_input_topic) ? $this->dynamic_config_input_topic : ''; + } + + public function hasDynamicConfigInputTopic() + { + return isset($this->dynamic_config_input_topic); + } + + public function clearDynamicConfigInputTopic() + { + unset($this->dynamic_config_input_topic); + } + + /** + * Optional. By setting the configuration_input_topic, processor will + * subscribe to given topic, only pub/sub topic is supported now. Example + * channel: + * //pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic + * message schema should be: + * message Message { + * // The ID of the stream that associates with the application instance. + * string stream_id = 1; + * // The target fps. By default, the custom processor will *not* send any + * data to the Vertex Prediction container. Note that once the + * dynamic_config_input_topic is set, max_prediction_fps will not work and be + * preceded by the fps set inside the topic. + * int32 fps = 2; + * } + * + * Generated from protobuf field optional string dynamic_config_input_topic = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setDynamicConfigInputTopic($var) + { + GPBUtil::checkString($var, True); + $this->dynamic_config_input_topic = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoActionRecognitionPredictionResult.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoActionRecognitionPredictionResult.php new file mode 100644 index 000000000000..d686effc8957 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoActionRecognitionPredictionResult.php @@ -0,0 +1,167 @@ +google.cloud.visionai.v1.VideoActionRecognitionPredictionResult + */ +class VideoActionRecognitionPredictionResult extends \Google\Protobuf\Internal\Message +{ + /** + * The beginning, inclusive, of the video's time segment in which the + * actions have been identified. + * + * Generated from protobuf field .google.protobuf.Timestamp segment_start_time = 1; + */ + protected $segment_start_time = null; + /** + * The end, inclusive, of the video's time segment in which the actions have + * been identified. Particularly, if the end is the same as the start, it + * means the identification happens on a specific video frame. + * + * Generated from protobuf field .google.protobuf.Timestamp segment_end_time = 2; + */ + protected $segment_end_time = null; + /** + * All of the actions identified in the time range. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.VideoActionRecognitionPredictionResult.IdentifiedAction actions = 3; + */ + private $actions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $segment_start_time + * The beginning, inclusive, of the video's time segment in which the + * actions have been identified. + * @type \Google\Protobuf\Timestamp $segment_end_time + * The end, inclusive, of the video's time segment in which the actions have + * been identified. Particularly, if the end is the same as the start, it + * means the identification happens on a specific video frame. + * @type \Google\Cloud\VisionAI\V1\VideoActionRecognitionPredictionResult\IdentifiedAction[] $actions + * All of the actions identified in the time range. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * The beginning, inclusive, of the video's time segment in which the + * actions have been identified. + * + * Generated from protobuf field .google.protobuf.Timestamp segment_start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSegmentStartTime() + { + return $this->segment_start_time; + } + + public function hasSegmentStartTime() + { + return isset($this->segment_start_time); + } + + public function clearSegmentStartTime() + { + unset($this->segment_start_time); + } + + /** + * The beginning, inclusive, of the video's time segment in which the + * actions have been identified. + * + * Generated from protobuf field .google.protobuf.Timestamp segment_start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSegmentStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->segment_start_time = $var; + + return $this; + } + + /** + * The end, inclusive, of the video's time segment in which the actions have + * been identified. Particularly, if the end is the same as the start, it + * means the identification happens on a specific video frame. + * + * Generated from protobuf field .google.protobuf.Timestamp segment_end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSegmentEndTime() + { + return $this->segment_end_time; + } + + public function hasSegmentEndTime() + { + return isset($this->segment_end_time); + } + + public function clearSegmentEndTime() + { + unset($this->segment_end_time); + } + + /** + * The end, inclusive, of the video's time segment in which the actions have + * been identified. Particularly, if the end is the same as the start, it + * means the identification happens on a specific video frame. + * + * Generated from protobuf field .google.protobuf.Timestamp segment_end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSegmentEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->segment_end_time = $var; + + return $this; + } + + /** + * All of the actions identified in the time range. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.VideoActionRecognitionPredictionResult.IdentifiedAction actions = 3; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\VideoActionRecognitionPredictionResult\IdentifiedAction> + */ + public function getActions() + { + return $this->actions; + } + + /** + * All of the actions identified in the time range. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.VideoActionRecognitionPredictionResult.IdentifiedAction actions = 3; + * @param \Google\Cloud\VisionAI\V1\VideoActionRecognitionPredictionResult\IdentifiedAction[] $var + * @return $this + */ + public function setActions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\VideoActionRecognitionPredictionResult\IdentifiedAction::class); + $this->actions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoActionRecognitionPredictionResult/IdentifiedAction.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoActionRecognitionPredictionResult/IdentifiedAction.php new file mode 100644 index 000000000000..2a758ed563f6 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoActionRecognitionPredictionResult/IdentifiedAction.php @@ -0,0 +1,141 @@ +google.cloud.visionai.v1.VideoActionRecognitionPredictionResult.IdentifiedAction + */ +class IdentifiedAction extends \Google\Protobuf\Internal\Message +{ + /** + * The resource ID of the AnnotationSpec that had been identified. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * The display name of the AnnotationSpec that had been identified. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * The Model's confidence in correction of this identification, higher + * value means higher confidence. + * + * Generated from protobuf field float confidence = 3; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * The resource ID of the AnnotationSpec that had been identified. + * @type string $display_name + * The display name of the AnnotationSpec that had been identified. + * @type float $confidence + * The Model's confidence in correction of this identification, higher + * value means higher confidence. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * The resource ID of the AnnotationSpec that had been identified. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The resource ID of the AnnotationSpec that had been identified. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The display name of the AnnotationSpec that had been identified. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the AnnotationSpec that had been identified. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The Model's confidence in correction of this identification, higher + * value means higher confidence. + * + * Generated from protobuf field float confidence = 3; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * The Model's confidence in correction of this identification, higher + * value means higher confidence. + * + * Generated from protobuf field float confidence = 3; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoClassificationPredictionResult.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoClassificationPredictionResult.php new file mode 100644 index 000000000000..41236f0febbf --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoClassificationPredictionResult.php @@ -0,0 +1,171 @@ +google.cloud.visionai.v1.VideoClassificationPredictionResult + */ +class VideoClassificationPredictionResult extends \Google\Protobuf\Internal\Message +{ + /** + * The beginning, inclusive, of the video's time segment in which the + * classifications have been identified. + * + * Generated from protobuf field .google.protobuf.Timestamp segment_start_time = 1; + */ + protected $segment_start_time = null; + /** + * The end, inclusive, of the video's time segment in which the + * classifications have been identified. Particularly, if the end is the same + * as the start, it means the identification happens on a specific video + * frame. + * + * Generated from protobuf field .google.protobuf.Timestamp segment_end_time = 2; + */ + protected $segment_end_time = null; + /** + * All of the classifications identified in the time range. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.VideoClassificationPredictionResult.IdentifiedClassification classifications = 3; + */ + private $classifications; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $segment_start_time + * The beginning, inclusive, of the video's time segment in which the + * classifications have been identified. + * @type \Google\Protobuf\Timestamp $segment_end_time + * The end, inclusive, of the video's time segment in which the + * classifications have been identified. Particularly, if the end is the same + * as the start, it means the identification happens on a specific video + * frame. + * @type \Google\Cloud\VisionAI\V1\VideoClassificationPredictionResult\IdentifiedClassification[] $classifications + * All of the classifications identified in the time range. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * The beginning, inclusive, of the video's time segment in which the + * classifications have been identified. + * + * Generated from protobuf field .google.protobuf.Timestamp segment_start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSegmentStartTime() + { + return $this->segment_start_time; + } + + public function hasSegmentStartTime() + { + return isset($this->segment_start_time); + } + + public function clearSegmentStartTime() + { + unset($this->segment_start_time); + } + + /** + * The beginning, inclusive, of the video's time segment in which the + * classifications have been identified. + * + * Generated from protobuf field .google.protobuf.Timestamp segment_start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSegmentStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->segment_start_time = $var; + + return $this; + } + + /** + * The end, inclusive, of the video's time segment in which the + * classifications have been identified. Particularly, if the end is the same + * as the start, it means the identification happens on a specific video + * frame. + * + * Generated from protobuf field .google.protobuf.Timestamp segment_end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSegmentEndTime() + { + return $this->segment_end_time; + } + + public function hasSegmentEndTime() + { + return isset($this->segment_end_time); + } + + public function clearSegmentEndTime() + { + unset($this->segment_end_time); + } + + /** + * The end, inclusive, of the video's time segment in which the + * classifications have been identified. Particularly, if the end is the same + * as the start, it means the identification happens on a specific video + * frame. + * + * Generated from protobuf field .google.protobuf.Timestamp segment_end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSegmentEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->segment_end_time = $var; + + return $this; + } + + /** + * All of the classifications identified in the time range. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.VideoClassificationPredictionResult.IdentifiedClassification classifications = 3; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\VideoClassificationPredictionResult\IdentifiedClassification> + */ + public function getClassifications() + { + return $this->classifications; + } + + /** + * All of the classifications identified in the time range. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.VideoClassificationPredictionResult.IdentifiedClassification classifications = 3; + * @param \Google\Cloud\VisionAI\V1\VideoClassificationPredictionResult\IdentifiedClassification[] $var + * @return $this + */ + public function setClassifications($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\VideoClassificationPredictionResult\IdentifiedClassification::class); + $this->classifications = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoClassificationPredictionResult/IdentifiedClassification.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoClassificationPredictionResult/IdentifiedClassification.php new file mode 100644 index 000000000000..ddb8f49abd55 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoClassificationPredictionResult/IdentifiedClassification.php @@ -0,0 +1,141 @@ +google.cloud.visionai.v1.VideoClassificationPredictionResult.IdentifiedClassification + */ +class IdentifiedClassification extends \Google\Protobuf\Internal\Message +{ + /** + * The resource ID of the AnnotationSpec that had been identified. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * The display name of the AnnotationSpec that had been identified. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * The Model's confidence in correction of this identification, higher + * value means higher confidence. + * + * Generated from protobuf field float confidence = 3; + */ + protected $confidence = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * The resource ID of the AnnotationSpec that had been identified. + * @type string $display_name + * The display name of the AnnotationSpec that had been identified. + * @type float $confidence + * The Model's confidence in correction of this identification, higher + * value means higher confidence. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * The resource ID of the AnnotationSpec that had been identified. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The resource ID of the AnnotationSpec that had been identified. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The display name of the AnnotationSpec that had been identified. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the AnnotationSpec that had been identified. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The Model's confidence in correction of this identification, higher + * value means higher confidence. + * + * Generated from protobuf field float confidence = 3; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * The Model's confidence in correction of this identification, higher + * value means higher confidence. + * + * Generated from protobuf field float confidence = 3; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult.php new file mode 100644 index 000000000000..e4dd8ccee5bc --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult.php @@ -0,0 +1,167 @@ +google.cloud.visionai.v1.VideoObjectTrackingPredictionResult + */ +class VideoObjectTrackingPredictionResult extends \Google\Protobuf\Internal\Message +{ + /** + * The beginning, inclusive, of the video's time segment in which the + * current identifications happens. + * + * Generated from protobuf field .google.protobuf.Timestamp segment_start_time = 1; + */ + protected $segment_start_time = null; + /** + * The end, inclusive, of the video's time segment in which the current + * identifications happen. Particularly, if the end is the same as the start, + * it means the identifications happen on a specific video frame. + * + * Generated from protobuf field .google.protobuf.Timestamp segment_end_time = 2; + */ + protected $segment_end_time = null; + /** + * All of the objects detected in the specified time range. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.DetectedObject objects = 3; + */ + private $objects; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Protobuf\Timestamp $segment_start_time + * The beginning, inclusive, of the video's time segment in which the + * current identifications happens. + * @type \Google\Protobuf\Timestamp $segment_end_time + * The end, inclusive, of the video's time segment in which the current + * identifications happen. Particularly, if the end is the same as the start, + * it means the identifications happen on a specific video frame. + * @type \Google\Cloud\VisionAI\V1\VideoObjectTrackingPredictionResult\DetectedObject[] $objects + * All of the objects detected in the specified time range. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * The beginning, inclusive, of the video's time segment in which the + * current identifications happens. + * + * Generated from protobuf field .google.protobuf.Timestamp segment_start_time = 1; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSegmentStartTime() + { + return $this->segment_start_time; + } + + public function hasSegmentStartTime() + { + return isset($this->segment_start_time); + } + + public function clearSegmentStartTime() + { + unset($this->segment_start_time); + } + + /** + * The beginning, inclusive, of the video's time segment in which the + * current identifications happens. + * + * Generated from protobuf field .google.protobuf.Timestamp segment_start_time = 1; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSegmentStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->segment_start_time = $var; + + return $this; + } + + /** + * The end, inclusive, of the video's time segment in which the current + * identifications happen. Particularly, if the end is the same as the start, + * it means the identifications happen on a specific video frame. + * + * Generated from protobuf field .google.protobuf.Timestamp segment_end_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getSegmentEndTime() + { + return $this->segment_end_time; + } + + public function hasSegmentEndTime() + { + return isset($this->segment_end_time); + } + + public function clearSegmentEndTime() + { + unset($this->segment_end_time); + } + + /** + * The end, inclusive, of the video's time segment in which the current + * identifications happen. Particularly, if the end is the same as the start, + * it means the identifications happen on a specific video frame. + * + * Generated from protobuf field .google.protobuf.Timestamp segment_end_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setSegmentEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->segment_end_time = $var; + + return $this; + } + + /** + * All of the objects detected in the specified time range. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.DetectedObject objects = 3; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\VideoObjectTrackingPredictionResult\DetectedObject> + */ + public function getObjects() + { + return $this->objects; + } + + /** + * All of the objects detected in the specified time range. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.DetectedObject objects = 3; + * @param \Google\Cloud\VisionAI\V1\VideoObjectTrackingPredictionResult\DetectedObject[] $var + * @return $this + */ + public function setObjects($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\VideoObjectTrackingPredictionResult\DetectedObject::class); + $this->objects = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult/BoundingBox.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult/BoundingBox.php new file mode 100644 index 000000000000..2c4a5db021fb --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult/BoundingBox.php @@ -0,0 +1,171 @@ +google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.BoundingBox + */ +class BoundingBox extends \Google\Protobuf\Internal\Message +{ + /** + * The leftmost coordinate of the bounding box. + * + * Generated from protobuf field float x_min = 1; + */ + protected $x_min = 0.0; + /** + * The rightmost coordinate of the bounding box. + * + * Generated from protobuf field float x_max = 2; + */ + protected $x_max = 0.0; + /** + * The topmost coordinate of the bounding box. + * + * Generated from protobuf field float y_min = 3; + */ + protected $y_min = 0.0; + /** + * The bottommost coordinate of the bounding box. + * + * Generated from protobuf field float y_max = 4; + */ + protected $y_max = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type float $x_min + * The leftmost coordinate of the bounding box. + * @type float $x_max + * The rightmost coordinate of the bounding box. + * @type float $y_min + * The topmost coordinate of the bounding box. + * @type float $y_max + * The bottommost coordinate of the bounding box. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * The leftmost coordinate of the bounding box. + * + * Generated from protobuf field float x_min = 1; + * @return float + */ + public function getXMin() + { + return $this->x_min; + } + + /** + * The leftmost coordinate of the bounding box. + * + * Generated from protobuf field float x_min = 1; + * @param float $var + * @return $this + */ + public function setXMin($var) + { + GPBUtil::checkFloat($var); + $this->x_min = $var; + + return $this; + } + + /** + * The rightmost coordinate of the bounding box. + * + * Generated from protobuf field float x_max = 2; + * @return float + */ + public function getXMax() + { + return $this->x_max; + } + + /** + * The rightmost coordinate of the bounding box. + * + * Generated from protobuf field float x_max = 2; + * @param float $var + * @return $this + */ + public function setXMax($var) + { + GPBUtil::checkFloat($var); + $this->x_max = $var; + + return $this; + } + + /** + * The topmost coordinate of the bounding box. + * + * Generated from protobuf field float y_min = 3; + * @return float + */ + public function getYMin() + { + return $this->y_min; + } + + /** + * The topmost coordinate of the bounding box. + * + * Generated from protobuf field float y_min = 3; + * @param float $var + * @return $this + */ + public function setYMin($var) + { + GPBUtil::checkFloat($var); + $this->y_min = $var; + + return $this; + } + + /** + * The bottommost coordinate of the bounding box. + * + * Generated from protobuf field float y_max = 4; + * @return float + */ + public function getYMax() + { + return $this->y_max; + } + + /** + * The bottommost coordinate of the bounding box. + * + * Generated from protobuf field float y_max = 4; + * @param float $var + * @return $this + */ + public function setYMax($var) + { + GPBUtil::checkFloat($var); + $this->y_max = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult/DetectedObject.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult/DetectedObject.php new file mode 100644 index 000000000000..9dc8d4bd9447 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult/DetectedObject.php @@ -0,0 +1,231 @@ +google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.DetectedObject + */ +class DetectedObject extends \Google\Protobuf\Internal\Message +{ + /** + * The resource ID of the AnnotationSpec that had been identified. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * The display name of the AnnotationSpec that had been identified. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * Boundingbox. + * + * Generated from protobuf field .google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.BoundingBox bounding_box = 3; + */ + protected $bounding_box = null; + /** + * The Model's confidence in correction of this identification, higher + * value means higher confidence. + * + * Generated from protobuf field float confidence = 4; + */ + protected $confidence = 0.0; + /** + * The same object may be identified on muitiple frames which are typical + * adjacent. The set of frames where a particular object has been detected + * form a track. This track_id can be used to trace down all frames for an + * detected object. + * + * Generated from protobuf field int64 track_id = 5; + */ + protected $track_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * The resource ID of the AnnotationSpec that had been identified. + * @type string $display_name + * The display name of the AnnotationSpec that had been identified. + * @type \Google\Cloud\VisionAI\V1\VideoObjectTrackingPredictionResult\BoundingBox $bounding_box + * Boundingbox. + * @type float $confidence + * The Model's confidence in correction of this identification, higher + * value means higher confidence. + * @type int|string $track_id + * The same object may be identified on muitiple frames which are typical + * adjacent. The set of frames where a particular object has been detected + * form a track. This track_id can be used to trace down all frames for an + * detected object. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); + parent::__construct($data); + } + + /** + * The resource ID of the AnnotationSpec that had been identified. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The resource ID of the AnnotationSpec that had been identified. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The display name of the AnnotationSpec that had been identified. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The display name of the AnnotationSpec that had been identified. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Boundingbox. + * + * Generated from protobuf field .google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.BoundingBox bounding_box = 3; + * @return \Google\Cloud\VisionAI\V1\VideoObjectTrackingPredictionResult\BoundingBox|null + */ + public function getBoundingBox() + { + return $this->bounding_box; + } + + public function hasBoundingBox() + { + return isset($this->bounding_box); + } + + public function clearBoundingBox() + { + unset($this->bounding_box); + } + + /** + * Boundingbox. + * + * Generated from protobuf field .google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.BoundingBox bounding_box = 3; + * @param \Google\Cloud\VisionAI\V1\VideoObjectTrackingPredictionResult\BoundingBox $var + * @return $this + */ + public function setBoundingBox($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\VideoObjectTrackingPredictionResult\BoundingBox::class); + $this->bounding_box = $var; + + return $this; + } + + /** + * The Model's confidence in correction of this identification, higher + * value means higher confidence. + * + * Generated from protobuf field float confidence = 4; + * @return float + */ + public function getConfidence() + { + return $this->confidence; + } + + /** + * The Model's confidence in correction of this identification, higher + * value means higher confidence. + * + * Generated from protobuf field float confidence = 4; + * @param float $var + * @return $this + */ + public function setConfidence($var) + { + GPBUtil::checkFloat($var); + $this->confidence = $var; + + return $this; + } + + /** + * The same object may be identified on muitiple frames which are typical + * adjacent. The set of frames where a particular object has been detected + * form a track. This track_id can be used to trace down all frames for an + * detected object. + * + * Generated from protobuf field int64 track_id = 5; + * @return int|string + */ + public function getTrackId() + { + return $this->track_id; + } + + /** + * The same object may be identified on muitiple frames which are typical + * adjacent. The set of frames where a particular object has been detected + * form a track. This track_id can be used to trace down all frames for an + * detected object. + * + * Generated from protobuf field int64 track_id = 5; + * @param int|string $var + * @return $this + */ + public function setTrackId($var) + { + GPBUtil::checkInt64($var); + $this->track_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoStreamInputConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoStreamInputConfig.php new file mode 100644 index 000000000000..80b657d61e47 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoStreamInputConfig.php @@ -0,0 +1,108 @@ +google.cloud.visionai.v1.VideoStreamInputConfig + */ +class VideoStreamInputConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field repeated string streams = 1 [deprecated = true]; + * @deprecated + */ + private $streams; + /** + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamWithAnnotation streams_with_annotation = 2 [deprecated = true]; + * @deprecated + */ + private $streams_with_annotation; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string[] $streams + * @type \Google\Cloud\VisionAI\V1\StreamWithAnnotation[] $streams_with_annotation + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field repeated string streams = 1 [deprecated = true]; + * @return RepeatedField + * @deprecated + */ + public function getStreams() + { + if ($this->streams->count() !== 0) { + @trigger_error('streams is deprecated.', E_USER_DEPRECATED); + } + return $this->streams; + } + + /** + * Generated from protobuf field repeated string streams = 1 [deprecated = true]; + * @param string[] $var + * @return $this + * @deprecated + */ + public function setStreams($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + if ($arr->count() !== 0) { + @trigger_error('streams is deprecated.', E_USER_DEPRECATED); + } + $this->streams = $arr; + + return $this; + } + + /** + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamWithAnnotation streams_with_annotation = 2 [deprecated = true]; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\StreamWithAnnotation> + * @deprecated + */ + public function getStreamsWithAnnotation() + { + if ($this->streams_with_annotation->count() !== 0) { + @trigger_error('streams_with_annotation is deprecated.', E_USER_DEPRECATED); + } + return $this->streams_with_annotation; + } + + /** + * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamWithAnnotation streams_with_annotation = 2 [deprecated = true]; + * @param \Google\Cloud\VisionAI\V1\StreamWithAnnotation[] $var + * @return $this + * @deprecated + */ + public function setStreamsWithAnnotation($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\StreamWithAnnotation::class); + if ($arr->count() !== 0) { + @trigger_error('streams_with_annotation is deprecated.', E_USER_DEPRECATED); + } + $this->streams_with_annotation = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewCollectionItemsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewCollectionItemsRequest.php new file mode 100644 index 000000000000..65b2b971e949 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewCollectionItemsRequest.php @@ -0,0 +1,178 @@ +google.cloud.visionai.v1.ViewCollectionItemsRequest + */ +class ViewCollectionItemsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The collection to view. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * + * Generated from protobuf field string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $collection = ''; + /** + * The maximum number of collections to return. The service may return fewer + * than this value. If unspecified, at most 50 collections will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ViewCollectionItemsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ViewCollectionItemsRequest` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $collection Required. The collection to view. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * Please see {@see WarehouseClient::collectionName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ViewCollectionItemsRequest + * + * @experimental + */ + public static function build(string $collection): self + { + return (new self()) + ->setCollection($collection); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $collection + * Required. The collection to view. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * @type int $page_size + * The maximum number of collections to return. The service may return fewer + * than this value. If unspecified, at most 50 collections will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * A page token, received from a previous `ViewCollectionItemsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ViewCollectionItemsRequest` must match the call that provided the page + * token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The collection to view. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * + * Generated from protobuf field string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getCollection() + { + return $this->collection; + } + + /** + * Required. The collection to view. Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` + * + * Generated from protobuf field string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setCollection($var) + { + GPBUtil::checkString($var, True); + $this->collection = $var; + + return $this; + } + + /** + * The maximum number of collections to return. The service may return fewer + * than this value. If unspecified, at most 50 collections will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of collections to return. The service may return fewer + * than this value. If unspecified, at most 50 collections will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ViewCollectionItemsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ViewCollectionItemsRequest` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ViewCollectionItemsRequest` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ViewCollectionItemsRequest` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewCollectionItemsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewCollectionItemsResponse.php new file mode 100644 index 000000000000..ef4793dded76 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewCollectionItemsResponse.php @@ -0,0 +1,105 @@ +google.cloud.visionai.v1.ViewCollectionItemsResponse + */ +class ViewCollectionItemsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The items from the specified collection. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.CollectionItem items = 1; + */ + private $items; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\CollectionItem[] $items + * The items from the specified collection. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The items from the specified collection. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.CollectionItem items = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\CollectionItem> + */ + public function getItems() + { + return $this->items; + } + + /** + * The items from the specified collection. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.CollectionItem items = 1; + * @param \Google\Cloud\VisionAI\V1\CollectionItem[] $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\CollectionItem::class); + $this->items = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewIndexedAssetsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewIndexedAssetsRequest.php new file mode 100644 index 000000000000..d8bfeb6fd205 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewIndexedAssetsRequest.php @@ -0,0 +1,229 @@ +google.cloud.visionai.v1.ViewIndexedAssetsRequest + */ +class ViewIndexedAssetsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The index that owns this collection of assets. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * + * Generated from protobuf field string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $index = ''; + /** + * The maximum number of assets to return. The service may return fewer than + * this value. + * If unspecified, at most 50 assets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A page token, received from a previous `ViewIndexedAssets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ViewIndexedAssets` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * The filter applied to the returned list. + * Only the following filterings are supported: + * "asset_id = xxxx", which returns asset with specified id. + * "asset_id = xxxx, yyyy, zzzz", which returns assets with specified ids. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + + /** + * @param string $index Required. The index that owns this collection of assets. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * Please see {@see WarehouseClient::indexName()} for help formatting this field. + * + * @return \Google\Cloud\VisionAI\V1\ViewIndexedAssetsRequest + * + * @experimental + */ + public static function build(string $index): self + { + return (new self()) + ->setIndex($index); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $index + * Required. The index that owns this collection of assets. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * @type int $page_size + * The maximum number of assets to return. The service may return fewer than + * this value. + * If unspecified, at most 50 assets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @type string $page_token + * A page token, received from a previous `ViewIndexedAssets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ViewIndexedAssets` must + * match the call that provided the page token. + * @type string $filter + * The filter applied to the returned list. + * Only the following filterings are supported: + * "asset_id = xxxx", which returns asset with specified id. + * "asset_id = xxxx, yyyy, zzzz", which returns assets with specified ids. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * Required. The index that owns this collection of assets. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * + * Generated from protobuf field string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getIndex() + { + return $this->index; + } + + /** + * Required. The index that owns this collection of assets. + * Format: + * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` + * + * Generated from protobuf field string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setIndex($var) + { + GPBUtil::checkString($var, True); + $this->index = $var; + + return $this; + } + + /** + * The maximum number of assets to return. The service may return fewer than + * this value. + * If unspecified, at most 50 assets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of assets to return. The service may return fewer than + * this value. + * If unspecified, at most 50 assets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous `ViewIndexedAssets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ViewIndexedAssets` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous `ViewIndexedAssets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ViewIndexedAssets` must + * match the call that provided the page token. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The filter applied to the returned list. + * Only the following filterings are supported: + * "asset_id = xxxx", which returns asset with specified id. + * "asset_id = xxxx, yyyy, zzzz", which returns assets with specified ids. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * The filter applied to the returned list. + * Only the following filterings are supported: + * "asset_id = xxxx", which returns asset with specified id. + * "asset_id = xxxx, yyyy, zzzz", which returns assets with specified ids. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewIndexedAssetsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewIndexedAssetsResponse.php new file mode 100644 index 000000000000..d036ba002b67 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewIndexedAssetsResponse.php @@ -0,0 +1,105 @@ +google.cloud.visionai.v1.ViewIndexedAssetsResponse + */ +class ViewIndexedAssetsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The assets from the specified index. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.IndexedAsset indexed_assets = 1; + */ + private $indexed_assets; + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\VisionAI\V1\IndexedAsset[] $indexed_assets + * The assets from the specified index. + * @type string $next_page_token + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); + parent::__construct($data); + } + + /** + * The assets from the specified index. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.IndexedAsset indexed_assets = 1; + * @return RepeatedField<\Google\Cloud\VisionAI\V1\IndexedAsset> + */ + public function getIndexedAssets() + { + return $this->indexed_assets; + } + + /** + * The assets from the specified index. + * + * Generated from protobuf field repeated .google.cloud.visionai.v1.IndexedAsset indexed_assets = 1; + * @param \Google\Cloud\VisionAI\V1\IndexedAsset[] $var + * @return $this + */ + public function setIndexedAssets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\IndexedAsset::class); + $this->indexed_assets = $arr; + + return $this; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token, which can be sent as `page_token` to retrieve the next page. + * If this field is omitted, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @param string $var + * @return $this + */ + public function setNextPageToken($var) + { + GPBUtil::checkString($var, True); + $this->next_page_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/add_application_stream_input.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/add_application_stream_input.php new file mode 100644 index 000000000000..dd56a1b4657a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/add_application_stream_input.php @@ -0,0 +1,88 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appPlatformClient->addApplicationStreamInput($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AddApplicationStreamInputResponse $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + + add_application_stream_input_sample($formattedName); +} +// [END visionai_v1_generated_AppPlatform_AddApplicationStreamInput_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_application.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_application.php new file mode 100644 index 000000000000..5aed9aae6629 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_application.php @@ -0,0 +1,94 @@ +setDisplayName($applicationDisplayName); + $request = (new CreateApplicationRequest()) + ->setParent($formattedParent) + ->setApplicationId($applicationId) + ->setApplication($application); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appPlatformClient->createApplication($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Application $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 = AppPlatformClient::locationName('[PROJECT]', '[LOCATION]'); + $applicationId = '[APPLICATION_ID]'; + $applicationDisplayName = '[DISPLAY_NAME]'; + + create_application_sample($formattedParent, $applicationId, $applicationDisplayName); +} +// [END visionai_v1_generated_AppPlatform_CreateApplication_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_application_instances.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_application_instances.php new file mode 100644 index 000000000000..486c6912f55f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_application_instances.php @@ -0,0 +1,108 @@ +setDisplayName($applicationInstancesInstanceDisplayName); + $applicationInstance = (new ApplicationInstance()) + ->setInstanceId($applicationInstancesInstanceId) + ->setInstance($applicationInstancesInstance); + $applicationInstances = [$applicationInstance,]; + $request = (new CreateApplicationInstancesRequest()) + ->setName($formattedName) + ->setApplicationInstances($applicationInstances); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appPlatformClient->createApplicationInstances($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var CreateApplicationInstancesResponse $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $applicationInstancesInstanceId = '[INSTANCE_ID]'; + $applicationInstancesInstanceDisplayName = '[DISPLAY_NAME]'; + + create_application_instances_sample( + $formattedName, + $applicationInstancesInstanceId, + $applicationInstancesInstanceDisplayName + ); +} +// [END visionai_v1_generated_AppPlatform_CreateApplicationInstances_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_draft.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_draft.php new file mode 100644 index 000000000000..7c5a4aa0cd7f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_draft.php @@ -0,0 +1,94 @@ +setDisplayName($draftDisplayName); + $request = (new CreateDraftRequest()) + ->setParent($formattedParent) + ->setDraftId($draftId) + ->setDraft($draft); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appPlatformClient->createDraft($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Draft $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $draftId = '[DRAFT_ID]'; + $draftDisplayName = '[DISPLAY_NAME]'; + + create_draft_sample($formattedParent, $draftId, $draftDisplayName); +} +// [END visionai_v1_generated_AppPlatform_CreateDraft_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_processor.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_processor.php new file mode 100644 index 000000000000..c16201248aec --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_processor.php @@ -0,0 +1,94 @@ +setDisplayName($processorDisplayName); + $request = (new CreateProcessorRequest()) + ->setParent($formattedParent) + ->setProcessorId($processorId) + ->setProcessor($processor); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appPlatformClient->createProcessor($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Processor $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 = AppPlatformClient::locationName('[PROJECT]', '[LOCATION]'); + $processorId = '[PROCESSOR_ID]'; + $processorDisplayName = '[DISPLAY_NAME]'; + + create_processor_sample($formattedParent, $processorId, $processorDisplayName); +} +// [END visionai_v1_generated_AppPlatform_CreateProcessor_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_application.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_application.php new file mode 100644 index 000000000000..be0802bb65e4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_application.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appPlatformClient->deleteApplication($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + + delete_application_sample($formattedName); +} +// [END visionai_v1_generated_AppPlatform_DeleteApplication_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_application_instances.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_application_instances.php new file mode 100644 index 000000000000..7c5ba7783947 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_application_instances.php @@ -0,0 +1,99 @@ +setName($formattedName) + ->setInstanceIds($formattedInstanceIds); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appPlatformClient->deleteApplicationInstances($request); + $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 +{ + $formattedName = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $formattedInstanceIdsElement = AppPlatformClient::instanceName( + '[PROJECT]', + '[LOCATION]', + '[APPLICATION]', + '[INSTANCE]' + ); + + delete_application_instances_sample($formattedName, $formattedInstanceIdsElement); +} +// [END visionai_v1_generated_AppPlatform_DeleteApplicationInstances_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_draft.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_draft.php new file mode 100644 index 000000000000..130b169b3291 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_draft.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appPlatformClient->deleteDraft($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AppPlatformClient::draftName( + '[PROJECT]', + '[LOCATION]', + '[APPLICATION]', + '[DRAFT]' + ); + + delete_draft_sample($formattedName); +} +// [END visionai_v1_generated_AppPlatform_DeleteDraft_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_processor.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_processor.php new file mode 100644 index 000000000000..5bca684444bf --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_processor.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appPlatformClient->deleteProcessor($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AppPlatformClient::processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + + delete_processor_sample($formattedName); +} +// [END visionai_v1_generated_AppPlatform_DeleteProcessor_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/deploy_application.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/deploy_application.php new file mode 100644 index 000000000000..a9f91e693700 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/deploy_application.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appPlatformClient->deployApplication($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DeployApplicationResponse $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + + deploy_application_sample($formattedName); +} +// [END visionai_v1_generated_AppPlatform_DeployApplication_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_application.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_application.php new file mode 100644 index 000000000000..d11903ba1108 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_application.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Application $response */ + $response = $appPlatformClient->getApplication($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + + get_application_sample($formattedName); +} +// [END visionai_v1_generated_AppPlatform_GetApplication_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_draft.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_draft.php new file mode 100644 index 000000000000..aeb8d3e9fcd1 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_draft.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Draft $response */ + $response = $appPlatformClient->getDraft($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AppPlatformClient::draftName( + '[PROJECT]', + '[LOCATION]', + '[APPLICATION]', + '[DRAFT]' + ); + + get_draft_sample($formattedName); +} +// [END visionai_v1_generated_AppPlatform_GetDraft_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_instance.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_instance.php new file mode 100644 index 000000000000..e9c8fc0bb266 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_instance.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Instance $response */ + $response = $appPlatformClient->getInstance($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AppPlatformClient::instanceName( + '[PROJECT]', + '[LOCATION]', + '[APPLICATION]', + '[INSTANCE]' + ); + + get_instance_sample($formattedName); +} +// [END visionai_v1_generated_AppPlatform_GetInstance_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_location.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_location.php new file mode 100644 index 000000000000..2f72cf60f261 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_AppPlatform_GetLocation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_processor.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_processor.php new file mode 100644 index 000000000000..9839b49a67d7 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_processor.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Processor $response */ + $response = $appPlatformClient->getProcessor($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = AppPlatformClient::processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + + get_processor_sample($formattedName); +} +// [END visionai_v1_generated_AppPlatform_GetProcessor_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_applications.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_applications.php new file mode 100644 index 000000000000..dd907d117125 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_applications.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $appPlatformClient->listApplications($request); + + /** @var Application $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 = AppPlatformClient::locationName('[PROJECT]', '[LOCATION]'); + + list_applications_sample($formattedParent); +} +// [END visionai_v1_generated_AppPlatform_ListApplications_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_drafts.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_drafts.php new file mode 100644 index 000000000000..c1dbeed51d3f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_drafts.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $appPlatformClient->listDrafts($request); + + /** @var Draft $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + + list_drafts_sample($formattedParent); +} +// [END visionai_v1_generated_AppPlatform_ListDrafts_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_instances.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_instances.php new file mode 100644 index 000000000000..dc90d36034ab --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_instances.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $appPlatformClient->listInstances($request); + + /** @var Instance $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + + list_instances_sample($formattedParent); +} +// [END visionai_v1_generated_AppPlatform_ListInstances_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_locations.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_locations.php new file mode 100644 index 000000000000..dd4eb9ceefd0 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_AppPlatform_ListLocations_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_prebuilt_processors.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_prebuilt_processors.php new file mode 100644 index 000000000000..adbb59ca7d20 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_prebuilt_processors.php @@ -0,0 +1,72 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var ListPrebuiltProcessorsResponse $response */ + $response = $appPlatformClient->listPrebuiltProcessors($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = AppPlatformClient::locationName('[PROJECT]', '[LOCATION]'); + + list_prebuilt_processors_sample($formattedParent); +} +// [END visionai_v1_generated_AppPlatform_ListPrebuiltProcessors_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_processors.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_processors.php new file mode 100644 index 000000000000..0a2e6b1829a7 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_processors.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $appPlatformClient->listProcessors($request); + + /** @var Processor $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 = AppPlatformClient::locationName('[PROJECT]', '[LOCATION]'); + + list_processors_sample($formattedParent); +} +// [END visionai_v1_generated_AppPlatform_ListProcessors_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/remove_application_stream_input.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/remove_application_stream_input.php new file mode 100644 index 000000000000..638f7b3c0cc5 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/remove_application_stream_input.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appPlatformClient->removeApplicationStreamInput($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RemoveApplicationStreamInputResponse $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + + remove_application_stream_input_sample($formattedName); +} +// [END visionai_v1_generated_AppPlatform_RemoveApplicationStreamInput_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/undeploy_application.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/undeploy_application.php new file mode 100644 index 000000000000..dc6dd023d975 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/undeploy_application.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appPlatformClient->undeployApplication($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var UndeployApplicationResponse $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + + undeploy_application_sample($formattedName); +} +// [END visionai_v1_generated_AppPlatform_UndeployApplication_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application.php new file mode 100644 index 000000000000..5b1371d65bc0 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application.php @@ -0,0 +1,84 @@ +setDisplayName($applicationDisplayName); + $request = (new UpdateApplicationRequest()) + ->setApplication($application); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appPlatformClient->updateApplication($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Application $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 +{ + $applicationDisplayName = '[DISPLAY_NAME]'; + + update_application_sample($applicationDisplayName); +} +// [END visionai_v1_generated_AppPlatform_UpdateApplication_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application_instances.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application_instances.php new file mode 100644 index 000000000000..9acb0acccff9 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application_instances.php @@ -0,0 +1,88 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appPlatformClient->updateApplicationInstances($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var UpdateApplicationInstancesResponse $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + + update_application_instances_sample($formattedName); +} +// [END visionai_v1_generated_AppPlatform_UpdateApplicationInstances_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application_stream_input.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application_stream_input.php new file mode 100644 index 000000000000..a90413cf4b5a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application_stream_input.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appPlatformClient->updateApplicationStreamInput($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var UpdateApplicationStreamInputResponse $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + + update_application_stream_input_sample($formattedName); +} +// [END visionai_v1_generated_AppPlatform_UpdateApplicationStreamInput_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_draft.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_draft.php new file mode 100644 index 000000000000..0a38e66b3ec3 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_draft.php @@ -0,0 +1,84 @@ +setDisplayName($draftDisplayName); + $request = (new UpdateDraftRequest()) + ->setDraft($draft); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appPlatformClient->updateDraft($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Draft $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 +{ + $draftDisplayName = '[DISPLAY_NAME]'; + + update_draft_sample($draftDisplayName); +} +// [END visionai_v1_generated_AppPlatform_UpdateDraft_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_processor.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_processor.php new file mode 100644 index 000000000000..a838d5f53263 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_processor.php @@ -0,0 +1,84 @@ +setDisplayName($processorDisplayName); + $request = (new UpdateProcessorRequest()) + ->setProcessor($processor); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $appPlatformClient->updateProcessor($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Processor $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 +{ + $processorDisplayName = '[DISPLAY_NAME]'; + + update_processor_sample($processorDisplayName); +} +// [END visionai_v1_generated_AppPlatform_UpdateProcessor_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/get_location.php b/owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/get_location.php new file mode 100644 index 000000000000..390fd6ae708a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_HealthCheckService_GetLocation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/health_check.php b/owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/health_check.php new file mode 100644 index 000000000000..0781f697b971 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/health_check.php @@ -0,0 +1,57 @@ +healthCheck($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_HealthCheckService_HealthCheck_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/list_locations.php b/owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/list_locations.php new file mode 100644 index 000000000000..15bbaed7bfe0 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_HealthCheckService_ListLocations_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/batch_run_process.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/batch_run_process.php new file mode 100644 index 000000000000..ebfffcce734b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/batch_run_process.php @@ -0,0 +1,120 @@ +setAnalysis($formattedRequestsProcessAnalysis); + $createProcessRequest = (new CreateProcessRequest()) + ->setParent($formattedRequestsParent) + ->setProcessId($requestsProcessId) + ->setProcess($requestsProcess); + $requests = [$createProcessRequest,]; + $request = (new BatchRunProcessRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $liveVideoAnalyticsClient->batchRunProcess($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var BatchRunProcessResponse $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 = LiveVideoAnalyticsClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $formattedRequestsParent = LiveVideoAnalyticsClient::clusterName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]' + ); + $requestsProcessId = '[PROCESS_ID]'; + $formattedRequestsProcessAnalysis = LiveVideoAnalyticsClient::analysisName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]', + '[ANALYSIS]' + ); + + batch_run_process_sample( + $formattedParent, + $formattedRequestsParent, + $requestsProcessId, + $formattedRequestsProcessAnalysis + ); +} +// [END visionai_v1_generated_LiveVideoAnalytics_BatchRunProcess_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_analysis.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_analysis.php new file mode 100644 index 000000000000..4703d663973b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_analysis.php @@ -0,0 +1,88 @@ +setParent($formattedParent) + ->setAnalysisId($analysisId) + ->setAnalysis($analysis); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $liveVideoAnalyticsClient->createAnalysis($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Analysis $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 = LiveVideoAnalyticsClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $analysisId = '[ANALYSIS_ID]'; + + create_analysis_sample($formattedParent, $analysisId); +} +// [END visionai_v1_generated_LiveVideoAnalytics_CreateAnalysis_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_operator.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_operator.php new file mode 100644 index 000000000000..582f864c2dc7 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_operator.php @@ -0,0 +1,88 @@ +setParent($formattedParent) + ->setOperatorId($operatorId) + ->setOperator($operator); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $liveVideoAnalyticsClient->createOperator($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Operator $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 = LiveVideoAnalyticsClient::locationName('[PROJECT]', '[LOCATION]'); + $operatorId = '[OPERATOR_ID]'; + + create_operator_sample($formattedParent, $operatorId); +} +// [END visionai_v1_generated_LiveVideoAnalytics_CreateOperator_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_process.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_process.php new file mode 100644 index 000000000000..792fdf354c52 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_process.php @@ -0,0 +1,100 @@ +setAnalysis($formattedProcessAnalysis); + $request = (new CreateProcessRequest()) + ->setParent($formattedParent) + ->setProcessId($processId) + ->setProcess($process); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $liveVideoAnalyticsClient->createProcess($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Process $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 = LiveVideoAnalyticsClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $processId = '[PROCESS_ID]'; + $formattedProcessAnalysis = LiveVideoAnalyticsClient::analysisName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]', + '[ANALYSIS]' + ); + + create_process_sample($formattedParent, $processId, $formattedProcessAnalysis); +} +// [END visionai_v1_generated_LiveVideoAnalytics_CreateProcess_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_analysis.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_analysis.php new file mode 100644 index 000000000000..5e64d59b0374 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_analysis.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $liveVideoAnalyticsClient->deleteAnalysis($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = LiveVideoAnalyticsClient::analysisName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]', + '[ANALYSIS]' + ); + + delete_analysis_sample($formattedName); +} +// [END visionai_v1_generated_LiveVideoAnalytics_DeleteAnalysis_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_operator.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_operator.php new file mode 100644 index 000000000000..2e17d7a6f3bb --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_operator.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $liveVideoAnalyticsClient->deleteOperator($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = LiveVideoAnalyticsClient::operatorName('[PROJECT]', '[LOCATION]', '[OPERATOR]'); + + delete_operator_sample($formattedName); +} +// [END visionai_v1_generated_LiveVideoAnalytics_DeleteOperator_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_process.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_process.php new file mode 100644 index 000000000000..ebd07c95d747 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_process.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $liveVideoAnalyticsClient->deleteProcess($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = LiveVideoAnalyticsClient::processName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]', + '[PROCESS]' + ); + + delete_process_sample($formattedName); +} +// [END visionai_v1_generated_LiveVideoAnalytics_DeleteProcess_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_analysis.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_analysis.php new file mode 100644 index 000000000000..444a8b2b47a4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_analysis.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Analysis $response */ + $response = $liveVideoAnalyticsClient->getAnalysis($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = LiveVideoAnalyticsClient::analysisName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]', + '[ANALYSIS]' + ); + + get_analysis_sample($formattedName); +} +// [END visionai_v1_generated_LiveVideoAnalytics_GetAnalysis_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_location.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_location.php new file mode 100644 index 000000000000..0ce63e469c98 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_LiveVideoAnalytics_GetLocation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_operator.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_operator.php new file mode 100644 index 000000000000..0effb2efeb25 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_operator.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Operator $response */ + $response = $liveVideoAnalyticsClient->getOperator($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = LiveVideoAnalyticsClient::operatorName('[PROJECT]', '[LOCATION]', '[OPERATOR]'); + + get_operator_sample($formattedName); +} +// [END visionai_v1_generated_LiveVideoAnalytics_GetOperator_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_process.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_process.php new file mode 100644 index 000000000000..f89a8e8e4407 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_process.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Process $response */ + $response = $liveVideoAnalyticsClient->getProcess($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = LiveVideoAnalyticsClient::processName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]', + '[PROCESS]' + ); + + get_process_sample($formattedName); +} +// [END visionai_v1_generated_LiveVideoAnalytics_GetProcess_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_analyses.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_analyses.php new file mode 100644 index 000000000000..bfdc9cc2a546 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_analyses.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $liveVideoAnalyticsClient->listAnalyses($request); + + /** @var Analysis $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 = LiveVideoAnalyticsClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + + list_analyses_sample($formattedParent); +} +// [END visionai_v1_generated_LiveVideoAnalytics_ListAnalyses_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_locations.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_locations.php new file mode 100644 index 000000000000..ca3e8dcce026 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_LiveVideoAnalytics_ListLocations_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_operators.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_operators.php new file mode 100644 index 000000000000..ca9416ccba45 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_operators.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $liveVideoAnalyticsClient->listOperators($request); + + /** @var Operator $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 = LiveVideoAnalyticsClient::locationName('[PROJECT]', '[LOCATION]'); + + list_operators_sample($formattedParent); +} +// [END visionai_v1_generated_LiveVideoAnalytics_ListOperators_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_processes.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_processes.php new file mode 100644 index 000000000000..02cce1710502 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_processes.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $liveVideoAnalyticsClient->listProcesses($request); + + /** @var Process $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 = LiveVideoAnalyticsClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + + list_processes_sample($formattedParent); +} +// [END visionai_v1_generated_LiveVideoAnalytics_ListProcesses_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_public_operators.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_public_operators.php new file mode 100644 index 000000000000..b57de4a629de --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_public_operators.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $liveVideoAnalyticsClient->listPublicOperators($request); + + /** @var Operator $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 = LiveVideoAnalyticsClient::locationName('[PROJECT]', '[LOCATION]'); + + list_public_operators_sample($formattedParent); +} +// [END visionai_v1_generated_LiveVideoAnalytics_ListPublicOperators_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/resolve_operator_info.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/resolve_operator_info.php new file mode 100644 index 000000000000..715e12222e4d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/resolve_operator_info.php @@ -0,0 +1,78 @@ +setOperator($queriesOperator); + $queries = [$operatorQuery,]; + $request = (new ResolveOperatorInfoRequest()) + ->setParent($formattedParent) + ->setQueries($queries); + + // Call the API and handle any network failures. + try { + /** @var ResolveOperatorInfoResponse $response */ + $response = $liveVideoAnalyticsClient->resolveOperatorInfo($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = LiveVideoAnalyticsClient::locationName('[PROJECT]', '[LOCATION]'); + $queriesOperator = '[OPERATOR]'; + + resolve_operator_info_sample($formattedParent, $queriesOperator); +} +// [END visionai_v1_generated_LiveVideoAnalytics_ResolveOperatorInfo_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_analysis.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_analysis.php new file mode 100644 index 000000000000..1e671ca5da76 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_analysis.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setAnalysis($analysis); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $liveVideoAnalyticsClient->updateAnalysis($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Analysis $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 visionai_v1_generated_LiveVideoAnalytics_UpdateAnalysis_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_operator.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_operator.php new file mode 100644 index 000000000000..b095358c5716 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_operator.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setOperator($operator); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $liveVideoAnalyticsClient->updateOperator($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Operator $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 visionai_v1_generated_LiveVideoAnalytics_UpdateOperator_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_process.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_process.php new file mode 100644 index 000000000000..04b84327a76f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_process.php @@ -0,0 +1,93 @@ +setAnalysis($formattedProcessAnalysis); + $request = (new UpdateProcessRequest()) + ->setUpdateMask($updateMask) + ->setProcess($process); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $liveVideoAnalyticsClient->updateProcess($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Process $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 +{ + $formattedProcessAnalysis = LiveVideoAnalyticsClient::analysisName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]', + '[ANALYSIS]' + ); + + update_process_sample($formattedProcessAnalysis); +} +// [END visionai_v1_generated_LiveVideoAnalytics_UpdateProcess_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/acquire_lease.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/acquire_lease.php new file mode 100644 index 000000000000..010295edec89 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/acquire_lease.php @@ -0,0 +1,57 @@ +acquireLease($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_StreamingService_AcquireLease_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/get_location.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/get_location.php new file mode 100644 index 000000000000..ea3ab01257be --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_StreamingService_GetLocation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/list_locations.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/list_locations.php new file mode 100644 index 000000000000..e560653219ef --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_StreamingService_ListLocations_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/receive_events.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/receive_events.php new file mode 100644 index 000000000000..275626173d7e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/receive_events.php @@ -0,0 +1,63 @@ +receiveEvents(); + $stream->writeAll([$request,]); + + /** @var ReceiveEventsResponse $element */ + foreach ($stream->closeWriteAndReadAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_StreamingService_ReceiveEvents_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/receive_packets.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/receive_packets.php new file mode 100644 index 000000000000..bb08b45c377d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/receive_packets.php @@ -0,0 +1,63 @@ +receivePackets(); + $stream->writeAll([$request,]); + + /** @var ReceivePacketsResponse $element */ + foreach ($stream->closeWriteAndReadAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_StreamingService_ReceivePackets_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/release_lease.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/release_lease.php new file mode 100644 index 000000000000..6e2968fbc08d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/release_lease.php @@ -0,0 +1,57 @@ +releaseLease($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_StreamingService_ReleaseLease_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/renew_lease.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/renew_lease.php new file mode 100644 index 000000000000..58964d400e39 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/renew_lease.php @@ -0,0 +1,57 @@ +renewLease($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_StreamingService_RenewLease_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/send_packets.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/send_packets.php new file mode 100644 index 000000000000..8f38ad3e0fae --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/send_packets.php @@ -0,0 +1,63 @@ +sendPackets(); + $stream->writeAll([$request,]); + + /** @var SendPacketsResponse $element */ + foreach ($stream->closeWriteAndReadAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_StreamingService_SendPackets_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_cluster.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_cluster.php new file mode 100644 index 000000000000..c61c4025cabc --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_cluster.php @@ -0,0 +1,88 @@ +setParent($formattedParent) + ->setClusterId($clusterId) + ->setCluster($cluster); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $streamsServiceClient->createCluster($request); + $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 = StreamsServiceClient::locationName('[PROJECT]', '[LOCATION]'); + $clusterId = '[CLUSTER_ID]'; + + create_cluster_sample($formattedParent, $clusterId); +} +// [END visionai_v1_generated_StreamsService_CreateCluster_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_event.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_event.php new file mode 100644 index 000000000000..f8f447fbb2ba --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_event.php @@ -0,0 +1,88 @@ +setParent($formattedParent) + ->setEventId($eventId) + ->setEvent($event); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $streamsServiceClient->createEvent($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Event $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 = StreamsServiceClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $eventId = '[EVENT_ID]'; + + create_event_sample($formattedParent, $eventId); +} +// [END visionai_v1_generated_StreamsService_CreateEvent_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_series.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_series.php new file mode 100644 index 000000000000..1f0dc3dafc87 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_series.php @@ -0,0 +1,110 @@ +setStream($formattedSeriesStream) + ->setEvent($formattedSeriesEvent); + $request = (new CreateSeriesRequest()) + ->setParent($formattedParent) + ->setSeriesId($seriesId) + ->setSeries($series); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $streamsServiceClient->createSeries($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Series $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 = StreamsServiceClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $seriesId = '[SERIES_ID]'; + $formattedSeriesStream = StreamsServiceClient::streamName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]', + '[STREAM]' + ); + $formattedSeriesEvent = StreamsServiceClient::eventName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]', + '[EVENT]' + ); + + create_series_sample($formattedParent, $seriesId, $formattedSeriesStream, $formattedSeriesEvent); +} +// [END visionai_v1_generated_StreamsService_CreateSeries_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_stream.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_stream.php new file mode 100644 index 000000000000..e5a9249bc876 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_stream.php @@ -0,0 +1,88 @@ +setParent($formattedParent) + ->setStreamId($streamId) + ->setStream($stream); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $streamsServiceClient->createStream($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Stream $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 = StreamsServiceClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $streamId = '[STREAM_ID]'; + + create_stream_sample($formattedParent, $streamId); +} +// [END visionai_v1_generated_StreamsService_CreateStream_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_cluster.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_cluster.php new file mode 100644 index 000000000000..68588949ec65 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_cluster.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $streamsServiceClient->deleteCluster($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StreamsServiceClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + + delete_cluster_sample($formattedName); +} +// [END visionai_v1_generated_StreamsService_DeleteCluster_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_event.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_event.php new file mode 100644 index 000000000000..10ffaa142459 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_event.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $streamsServiceClient->deleteEvent($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StreamsServiceClient::eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); + + delete_event_sample($formattedName); +} +// [END visionai_v1_generated_StreamsService_DeleteEvent_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_series.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_series.php new file mode 100644 index 000000000000..cc1ea000f2ac --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_series.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $streamsServiceClient->deleteSeries($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StreamsServiceClient::seriesName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]', + '[SERIES]' + ); + + delete_series_sample($formattedName); +} +// [END visionai_v1_generated_StreamsService_DeleteSeries_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_stream.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_stream.php new file mode 100644 index 000000000000..a0e01e63b5d4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_stream.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $streamsServiceClient->deleteStream($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StreamsServiceClient::streamName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]', + '[STREAM]' + ); + + delete_stream_sample($formattedName); +} +// [END visionai_v1_generated_StreamsService_DeleteStream_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/generate_stream_hls_token.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/generate_stream_hls_token.php new file mode 100644 index 000000000000..5b52706aea34 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/generate_stream_hls_token.php @@ -0,0 +1,70 @@ +setStream($stream); + + // Call the API and handle any network failures. + try { + /** @var GenerateStreamHlsTokenResponse $response */ + $response = $streamsServiceClient->generateStreamHlsToken($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $stream = '[STREAM]'; + + generate_stream_hls_token_sample($stream); +} +// [END visionai_v1_generated_StreamsService_GenerateStreamHlsToken_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_cluster.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_cluster.php new file mode 100644 index 000000000000..2d4e5d62bb9f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_cluster.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Cluster $response */ + $response = $streamsServiceClient->getCluster($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StreamsServiceClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + + get_cluster_sample($formattedName); +} +// [END visionai_v1_generated_StreamsService_GetCluster_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_event.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_event.php new file mode 100644 index 000000000000..dd737c5e646f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_event.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Event $response */ + $response = $streamsServiceClient->getEvent($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StreamsServiceClient::eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); + + get_event_sample($formattedName); +} +// [END visionai_v1_generated_StreamsService_GetEvent_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_location.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_location.php new file mode 100644 index 000000000000..e85b7b27dcb8 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_StreamsService_GetLocation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_series.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_series.php new file mode 100644 index 000000000000..1cc004e107be --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_series.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Series $response */ + $response = $streamsServiceClient->getSeries($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StreamsServiceClient::seriesName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]', + '[SERIES]' + ); + + get_series_sample($formattedName); +} +// [END visionai_v1_generated_StreamsService_GetSeries_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_stream.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_stream.php new file mode 100644 index 000000000000..143f3e0ff55d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_stream.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Stream $response */ + $response = $streamsServiceClient->getStream($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = StreamsServiceClient::streamName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]', + '[STREAM]' + ); + + get_stream_sample($formattedName); +} +// [END visionai_v1_generated_StreamsService_GetStream_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_stream_thumbnail.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_stream_thumbnail.php new file mode 100644 index 000000000000..908c6d5f5258 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_stream_thumbnail.php @@ -0,0 +1,85 @@ +setStream($stream) + ->setGcsObjectName($gcsObjectName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $streamsServiceClient->getStreamThumbnail($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var GetStreamThumbnailResponse $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 +{ + $stream = '[STREAM]'; + $gcsObjectName = '[GCS_OBJECT_NAME]'; + + get_stream_thumbnail_sample($stream, $gcsObjectName); +} +// [END visionai_v1_generated_StreamsService_GetStreamThumbnail_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_clusters.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_clusters.php new file mode 100644 index 000000000000..0c1103f1fc20 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_clusters.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $streamsServiceClient->listClusters($request); + + /** @var Cluster $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 = StreamsServiceClient::locationName('[PROJECT]', '[LOCATION]'); + + list_clusters_sample($formattedParent); +} +// [END visionai_v1_generated_StreamsService_ListClusters_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_events.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_events.php new file mode 100644 index 000000000000..5f04748b5318 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_events.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $streamsServiceClient->listEvents($request); + + /** @var Event $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 = StreamsServiceClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + + list_events_sample($formattedParent); +} +// [END visionai_v1_generated_StreamsService_ListEvents_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_locations.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_locations.php new file mode 100644 index 000000000000..6795225018fb --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_StreamsService_ListLocations_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_series.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_series.php new file mode 100644 index 000000000000..afb3504f1824 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_series.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $streamsServiceClient->listSeries($request); + + /** @var Series $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 = StreamsServiceClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + + list_series_sample($formattedParent); +} +// [END visionai_v1_generated_StreamsService_ListSeries_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_streams.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_streams.php new file mode 100644 index 000000000000..8a184d8f084a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_streams.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $streamsServiceClient->listStreams($request); + + /** @var Stream $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 = StreamsServiceClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + + list_streams_sample($formattedParent); +} +// [END visionai_v1_generated_StreamsService_ListStreams_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/materialize_channel.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/materialize_channel.php new file mode 100644 index 000000000000..4a4fa4651feb --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/materialize_channel.php @@ -0,0 +1,115 @@ +setStream($formattedChannelStream) + ->setEvent($formattedChannelEvent); + $request = (new MaterializeChannelRequest()) + ->setParent($formattedParent) + ->setChannelId($channelId) + ->setChannel($channel); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $streamsServiceClient->materializeChannel($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Channel $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 = StreamsServiceClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $channelId = '[CHANNEL_ID]'; + $formattedChannelStream = StreamsServiceClient::streamName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]', + '[STREAM]' + ); + $formattedChannelEvent = StreamsServiceClient::eventName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]', + '[EVENT]' + ); + + materialize_channel_sample( + $formattedParent, + $channelId, + $formattedChannelStream, + $formattedChannelEvent + ); +} +// [END visionai_v1_generated_StreamsService_MaterializeChannel_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_cluster.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_cluster.php new file mode 100644 index 000000000000..d0a799c6c5f2 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_cluster.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setCluster($cluster); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $streamsServiceClient->updateCluster($request); + $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 visionai_v1_generated_StreamsService_UpdateCluster_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_event.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_event.php new file mode 100644 index 000000000000..39f2184be6ba --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_event.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setEvent($event); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $streamsServiceClient->updateEvent($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Event $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 visionai_v1_generated_StreamsService_UpdateEvent_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_series.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_series.php new file mode 100644 index 000000000000..2c04f25d9cd2 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_series.php @@ -0,0 +1,102 @@ +setStream($formattedSeriesStream) + ->setEvent($formattedSeriesEvent); + $request = (new UpdateSeriesRequest()) + ->setUpdateMask($updateMask) + ->setSeries($series); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $streamsServiceClient->updateSeries($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Series $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 +{ + $formattedSeriesStream = StreamsServiceClient::streamName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]', + '[STREAM]' + ); + $formattedSeriesEvent = StreamsServiceClient::eventName( + '[PROJECT]', + '[LOCATION]', + '[CLUSTER]', + '[EVENT]' + ); + + update_series_sample($formattedSeriesStream, $formattedSeriesEvent); +} +// [END visionai_v1_generated_StreamsService_UpdateSeries_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_stream.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_stream.php new file mode 100644 index 000000000000..a7ed5d56d707 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_stream.php @@ -0,0 +1,74 @@ +setUpdateMask($updateMask) + ->setStream($stream); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $streamsServiceClient->updateStream($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Stream $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 visionai_v1_generated_StreamsService_UpdateStream_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/add_collection_item.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/add_collection_item.php new file mode 100644 index 000000000000..a6cea93de292 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/add_collection_item.php @@ -0,0 +1,92 @@ +setCollection($formattedItemCollection) + ->setType($itemType) + ->setItemResource($itemItemResource); + $request = (new AddCollectionItemRequest()) + ->setItem($item); + + // Call the API and handle any network failures. + try { + /** @var AddCollectionItemResponse $response */ + $response = $warehouseClient->addCollectionItem($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedItemCollection = WarehouseClient::collectionName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[COLLECTION]' + ); + $itemType = Type::TYPE_UNSPECIFIED; + $itemItemResource = '[ITEM_RESOURCE]'; + + add_collection_item_sample($formattedItemCollection, $itemType, $itemItemResource); +} +// [END visionai_v1_generated_Warehouse_AddCollectionItem_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/analyze_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/analyze_asset.php new file mode 100644 index 000000000000..4cf744cf67b7 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/analyze_asset.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $warehouseClient->analyzeAsset($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AnalyzeAssetResponse $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 = WarehouseClient::assetName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[ASSET]' + ); + + analyze_asset_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_AnalyzeAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/analyze_corpus.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/analyze_corpus.php new file mode 100644 index 000000000000..eaf35eabb280 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/analyze_corpus.php @@ -0,0 +1,85 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $warehouseClient->analyzeCorpus($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var AnalyzeCorpusResponse $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 = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + + analyze_corpus_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_AnalyzeCorpus_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/clip_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/clip_asset.php new file mode 100644 index 000000000000..26c3b1dcba92 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/clip_asset.php @@ -0,0 +1,86 @@ +setName($formattedName) + ->setTemporalPartition($temporalPartition); + + // Call the API and handle any network failures. + try { + /** @var ClipAssetResponse $response */ + $response = $warehouseClient->clipAsset($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::assetName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[ASSET]' + ); + + clip_asset_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_ClipAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_annotation.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_annotation.php new file mode 100644 index 000000000000..489be36522f6 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_annotation.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setAnnotation($annotation); + + // Call the API and handle any network failures. + try { + /** @var Annotation $response */ + $response = $warehouseClient->createAnnotation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WarehouseClient::assetName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[ASSET]' + ); + + create_annotation_sample($formattedParent); +} +// [END visionai_v1_generated_Warehouse_CreateAnnotation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_asset.php new file mode 100644 index 000000000000..eb1178924c25 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_asset.php @@ -0,0 +1,75 @@ +setParent($formattedParent) + ->setAsset($asset); + + // Call the API and handle any network failures. + try { + /** @var Asset $response */ + $response = $warehouseClient->createAsset($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + + create_asset_sample($formattedParent); +} +// [END visionai_v1_generated_Warehouse_CreateAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_collection.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_collection.php new file mode 100644 index 000000000000..85d642dc501a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_collection.php @@ -0,0 +1,86 @@ +setParent($formattedParent) + ->setCollection($collection); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $warehouseClient->createCollection($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Collection $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 = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + + create_collection_sample($formattedParent); +} +// [END visionai_v1_generated_Warehouse_CreateCollection_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_corpus.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_corpus.php new file mode 100644 index 000000000000..541e7b41d6f1 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_corpus.php @@ -0,0 +1,88 @@ +setDisplayName($corpusDisplayName); + $request = (new CreateCorpusRequest()) + ->setParent($parent) + ->setCorpus($corpus); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $warehouseClient->createCorpus($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Corpus $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 +{ + $parent = '[PARENT]'; + $corpusDisplayName = '[DISPLAY_NAME]'; + + create_corpus_sample($parent, $corpusDisplayName); +} +// [END visionai_v1_generated_Warehouse_CreateCorpus_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_data_schema.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_data_schema.php new file mode 100644 index 000000000000..18ff16bd913a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_data_schema.php @@ -0,0 +1,81 @@ +setKey($dataSchemaKey); + $request = (new CreateDataSchemaRequest()) + ->setParent($formattedParent) + ->setDataSchema($dataSchema); + + // Call the API and handle any network failures. + try { + /** @var DataSchema $response */ + $response = $warehouseClient->createDataSchema($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $dataSchemaKey = '[KEY]'; + + create_data_schema_sample($formattedParent, $dataSchemaKey); +} +// [END visionai_v1_generated_Warehouse_CreateDataSchema_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_index.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_index.php new file mode 100644 index 000000000000..5a4d82c69f17 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_index.php @@ -0,0 +1,87 @@ +setParent($formattedParent) + ->setIndex($index); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $warehouseClient->createIndex($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Index $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + + create_index_sample($formattedParent); +} +// [END visionai_v1_generated_Warehouse_CreateIndex_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_index_endpoint.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_index_endpoint.php new file mode 100644 index 000000000000..227c7f404242 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_index_endpoint.php @@ -0,0 +1,85 @@ +setParent($formattedParent) + ->setIndexEndpoint($indexEndpoint); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $warehouseClient->createIndexEndpoint($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var IndexEndpoint $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 = WarehouseClient::locationName('[PROJECT]', '[LOCATION]'); + + create_index_endpoint_sample($formattedParent); +} +// [END visionai_v1_generated_Warehouse_CreateIndexEndpoint_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_search_config.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_search_config.php new file mode 100644 index 000000000000..3aa0b98a303b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_search_config.php @@ -0,0 +1,95 @@ +setParent($formattedParent) + ->setSearchConfig($searchConfig) + ->setSearchConfigId($searchConfigId); + + // Call the API and handle any network failures. + try { + /** @var SearchConfig $response */ + $response = $warehouseClient->createSearchConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $searchConfigId = '[SEARCH_CONFIG_ID]'; + + create_search_config_sample($formattedParent, $searchConfigId); +} +// [END visionai_v1_generated_Warehouse_CreateSearchConfig_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_search_hypernym.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_search_hypernym.php new file mode 100644 index 000000000000..23e64fad4ae2 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_search_hypernym.php @@ -0,0 +1,74 @@ +setParent($formattedParent) + ->setSearchHypernym($searchHypernym); + + // Call the API and handle any network failures. + try { + /** @var SearchHypernym $response */ + $response = $warehouseClient->createSearchHypernym($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + + create_search_hypernym_sample($formattedParent); +} +// [END visionai_v1_generated_Warehouse_CreateSearchHypernym_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_annotation.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_annotation.php new file mode 100644 index 000000000000..af98ce93bd3f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_annotation.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $warehouseClient->deleteAnnotation($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::annotationName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[ASSET]', + '[ANNOTATION]' + ); + + delete_annotation_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_DeleteAnnotation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_asset.php new file mode 100644 index 000000000000..68fd359198f3 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_asset.php @@ -0,0 +1,87 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $warehouseClient->deleteAsset($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::assetName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[ASSET]' + ); + + delete_asset_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_DeleteAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_collection.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_collection.php new file mode 100644 index 000000000000..97e826258e60 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_collection.php @@ -0,0 +1,86 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $warehouseClient->deleteCollection($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::collectionName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[COLLECTION]' + ); + + delete_collection_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_DeleteCollection_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_corpus.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_corpus.php new file mode 100644 index 000000000000..e56a86c494dd --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_corpus.php @@ -0,0 +1,70 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $warehouseClient->deleteCorpus($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + + delete_corpus_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_DeleteCorpus_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_data_schema.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_data_schema.php new file mode 100644 index 000000000000..d49554c51a92 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_data_schema.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $warehouseClient->deleteDataSchema($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::dataSchemaName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[DATA_SCHEMA]' + ); + + delete_data_schema_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_DeleteDataSchema_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_index.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_index.php new file mode 100644 index 000000000000..d52f094b6979 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_index.php @@ -0,0 +1,88 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $warehouseClient->deleteIndex($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::indexName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[INDEX]' + ); + + delete_index_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_DeleteIndex_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_index_endpoint.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_index_endpoint.php new file mode 100644 index 000000000000..e495ad597a1c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_index_endpoint.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $warehouseClient->deleteIndexEndpoint($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + printf('Operation completed successfully.' . PHP_EOL); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); + + delete_index_endpoint_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_DeleteIndexEndpoint_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_search_config.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_search_config.php new file mode 100644 index 000000000000..e01198f4c6c1 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_search_config.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $warehouseClient->deleteSearchConfig($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::searchConfigName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[SEARCH_CONFIG]' + ); + + delete_search_config_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_DeleteSearchConfig_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_search_hypernym.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_search_hypernym.php new file mode 100644 index 000000000000..5c8057763663 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_search_hypernym.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $warehouseClient->deleteSearchHypernym($request); + printf('Call completed successfully.' . PHP_EOL); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::searchHypernymName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[SEARCH_HYPERNYM]' + ); + + delete_search_hypernym_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_DeleteSearchHypernym_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/deploy_index.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/deploy_index.php new file mode 100644 index 000000000000..de234fa5d6bc --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/deploy_index.php @@ -0,0 +1,105 @@ +setIndex($formattedDeployedIndexIndex); + $request = (new DeployIndexRequest()) + ->setIndexEndpoint($formattedIndexEndpoint) + ->setDeployedIndex($deployedIndex); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $warehouseClient->deployIndex($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var DeployIndexResponse $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 +{ + $formattedIndexEndpoint = WarehouseClient::indexEndpointName( + '[PROJECT]', + '[LOCATION]', + '[INDEX_ENDPOINT]' + ); + $formattedDeployedIndexIndex = WarehouseClient::indexName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[INDEX]' + ); + + deploy_index_sample($formattedIndexEndpoint, $formattedDeployedIndexIndex); +} +// [END visionai_v1_generated_Warehouse_DeployIndex_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/generate_hls_uri.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/generate_hls_uri.php new file mode 100644 index 000000000000..b2c209506383 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/generate_hls_uri.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var GenerateHlsUriResponse $response */ + $response = $warehouseClient->generateHlsUri($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::assetName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[ASSET]' + ); + + generate_hls_uri_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_GenerateHlsUri_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/generate_retrieval_url.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/generate_retrieval_url.php new file mode 100644 index 000000000000..ec77778d908e --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/generate_retrieval_url.php @@ -0,0 +1,80 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var GenerateRetrievalUrlResponse $response */ + $response = $warehouseClient->generateRetrievalUrl($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::assetName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[ASSET]' + ); + + generate_retrieval_url_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_GenerateRetrievalUrl_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_annotation.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_annotation.php new file mode 100644 index 000000000000..02b67df2c4fd --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_annotation.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Annotation $response */ + $response = $warehouseClient->getAnnotation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::annotationName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[ASSET]', + '[ANNOTATION]' + ); + + get_annotation_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_GetAnnotation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_asset.php new file mode 100644 index 000000000000..c5c461774b24 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_asset.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Asset $response */ + $response = $warehouseClient->getAsset($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::assetName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[ASSET]' + ); + + get_asset_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_GetAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_collection.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_collection.php new file mode 100644 index 000000000000..84d0802e8a25 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_collection.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Collection $response */ + $response = $warehouseClient->getCollection($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::collectionName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[COLLECTION]' + ); + + get_collection_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_GetCollection_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_corpus.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_corpus.php new file mode 100644 index 000000000000..8876c6e038e9 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_corpus.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Corpus $response */ + $response = $warehouseClient->getCorpus($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + + get_corpus_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_GetCorpus_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_data_schema.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_data_schema.php new file mode 100644 index 000000000000..89f584ef7fee --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_data_schema.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var DataSchema $response */ + $response = $warehouseClient->getDataSchema($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::dataSchemaName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[DATA_SCHEMA]' + ); + + get_data_schema_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_GetDataSchema_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_index.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_index.php new file mode 100644 index 000000000000..751c1ffc2888 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_index.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Index $response */ + $response = $warehouseClient->getIndex($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::indexName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[INDEX]' + ); + + get_index_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_GetIndex_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_index_endpoint.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_index_endpoint.php new file mode 100644 index 000000000000..d77fc83dc760 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_index_endpoint.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var IndexEndpoint $response */ + $response = $warehouseClient->getIndexEndpoint($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); + + get_index_endpoint_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_GetIndexEndpoint_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_location.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_location.php new file mode 100644 index 000000000000..227fce7a1c5a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_location.php @@ -0,0 +1,57 @@ +getLocation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_Warehouse_GetLocation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_search_config.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_search_config.php new file mode 100644 index 000000000000..a463c6592944 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_search_config.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SearchConfig $response */ + $response = $warehouseClient->getSearchConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::searchConfigName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[SEARCH_CONFIG]' + ); + + get_search_config_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_GetSearchConfig_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_search_hypernym.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_search_hypernym.php new file mode 100644 index 000000000000..c7f2dbf381e1 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_search_hypernym.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SearchHypernym $response */ + $response = $warehouseClient->getSearchHypernym($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedName = WarehouseClient::searchHypernymName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[SEARCH_HYPERNYM]' + ); + + get_search_hypernym_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_GetSearchHypernym_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/import_assets.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/import_assets.php new file mode 100644 index 000000000000..287dcb71d77f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/import_assets.php @@ -0,0 +1,87 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $warehouseClient->importAssets($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var ImportAssetsResponse $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 = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + + import_assets_sample($formattedParent); +} +// [END visionai_v1_generated_Warehouse_ImportAssets_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/index_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/index_asset.php new file mode 100644 index 000000000000..aea82348820d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/index_asset.php @@ -0,0 +1,91 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $warehouseClient->indexAsset($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var IndexAssetResponse $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 = WarehouseClient::assetName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[ASSET]' + ); + + index_asset_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_IndexAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/ingest_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/ingest_asset.php new file mode 100644 index 000000000000..33f1d07e7982 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/ingest_asset.php @@ -0,0 +1,66 @@ +ingestAsset(); + $stream->writeAll([$request,]); + + /** @var IngestAssetResponse $element */ + foreach ($stream->closeWriteAndReadAll() as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_Warehouse_IngestAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_annotations.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_annotations.php new file mode 100644 index 000000000000..b4d177fa07ae --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_annotations.php @@ -0,0 +1,62 @@ +listAnnotations($request); + + /** @var Annotation $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_Warehouse_ListAnnotations_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_assets.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_assets.php new file mode 100644 index 000000000000..820c78d09514 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_assets.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $warehouseClient->listAssets($request); + + /** @var Asset $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 = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + + list_assets_sample($formattedParent); +} +// [END visionai_v1_generated_Warehouse_ListAssets_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_collections.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_collections.php new file mode 100644 index 000000000000..a3ccc98cd615 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_collections.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $warehouseClient->listCollections($request); + + /** @var Collection $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 = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + + list_collections_sample($formattedParent); +} +// [END visionai_v1_generated_Warehouse_ListCollections_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_corpora.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_corpora.php new file mode 100644 index 000000000000..299dce544274 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_corpora.php @@ -0,0 +1,75 @@ +setParent($parent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $warehouseClient->listCorpora($request); + + /** @var Corpus $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $parent = '[PARENT]'; + + list_corpora_sample($parent); +} +// [END visionai_v1_generated_Warehouse_ListCorpora_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_data_schemas.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_data_schemas.php new file mode 100644 index 000000000000..8542b6ad92d8 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_data_schemas.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $warehouseClient->listDataSchemas($request); + + /** @var DataSchema $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 = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + + list_data_schemas_sample($formattedParent); +} +// [END visionai_v1_generated_Warehouse_ListDataSchemas_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_index_endpoints.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_index_endpoints.php new file mode 100644 index 000000000000..5df9a7324c8d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_index_endpoints.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $warehouseClient->listIndexEndpoints($request); + + /** @var IndexEndpoint $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 = WarehouseClient::locationName('[PROJECT]', '[LOCATION]'); + + list_index_endpoints_sample($formattedParent); +} +// [END visionai_v1_generated_Warehouse_ListIndexEndpoints_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_indexes.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_indexes.php new file mode 100644 index 000000000000..9edaeae47654 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_indexes.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $warehouseClient->listIndexes($request); + + /** @var Index $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedParent = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + + list_indexes_sample($formattedParent); +} +// [END visionai_v1_generated_Warehouse_ListIndexes_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_locations.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_locations.php new file mode 100644 index 000000000000..cbdd1c9b3f35 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_locations.php @@ -0,0 +1,62 @@ +listLocations($request); + + /** @var Location $element */ + foreach ($response as $element) { + printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_Warehouse_ListLocations_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_search_configs.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_search_configs.php new file mode 100644 index 000000000000..7915b0730877 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_search_configs.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $warehouseClient->listSearchConfigs($request); + + /** @var SearchConfig $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 = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + + list_search_configs_sample($formattedParent); +} +// [END visionai_v1_generated_Warehouse_ListSearchConfigs_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_search_hypernyms.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_search_hypernyms.php new file mode 100644 index 000000000000..908b82001d0f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_search_hypernyms.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $warehouseClient->listSearchHypernyms($request); + + /** @var SearchHypernym $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 = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + + list_search_hypernyms_sample($formattedParent); +} +// [END visionai_v1_generated_Warehouse_ListSearchHypernyms_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/remove_collection_item.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/remove_collection_item.php new file mode 100644 index 000000000000..2726bfd4ef07 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/remove_collection_item.php @@ -0,0 +1,92 @@ +setCollection($formattedItemCollection) + ->setType($itemType) + ->setItemResource($itemItemResource); + $request = (new RemoveCollectionItemRequest()) + ->setItem($item); + + // Call the API and handle any network failures. + try { + /** @var RemoveCollectionItemResponse $response */ + $response = $warehouseClient->removeCollectionItem($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $formattedItemCollection = WarehouseClient::collectionName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[COLLECTION]' + ); + $itemType = Type::TYPE_UNSPECIFIED; + $itemItemResource = '[ITEM_RESOURCE]'; + + remove_collection_item_sample($formattedItemCollection, $itemType, $itemItemResource); +} +// [END visionai_v1_generated_Warehouse_RemoveCollectionItem_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/remove_index_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/remove_index_asset.php new file mode 100644 index 000000000000..b25427581cf5 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/remove_index_asset.php @@ -0,0 +1,91 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $warehouseClient->removeIndexAsset($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var RemoveIndexAssetResponse $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 = WarehouseClient::assetName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[ASSET]' + ); + + remove_index_asset_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_RemoveIndexAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/search_assets.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/search_assets.php new file mode 100644 index 000000000000..c82afae4bbb4 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/search_assets.php @@ -0,0 +1,77 @@ +setCorpus($formattedCorpus); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $warehouseClient->searchAssets($request); + + /** @var SearchResultItem $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 +{ + $formattedCorpus = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + + search_assets_sample($formattedCorpus); +} +// [END visionai_v1_generated_Warehouse_SearchAssets_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/search_index_endpoint.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/search_index_endpoint.php new file mode 100644 index 000000000000..0b63dad50a9a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/search_index_endpoint.php @@ -0,0 +1,82 @@ +setIndexEndpoint($formattedIndexEndpoint); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $warehouseClient->searchIndexEndpoint($request); + + /** @var SearchResultItem $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 +{ + $formattedIndexEndpoint = WarehouseClient::indexEndpointName( + '[PROJECT]', + '[LOCATION]', + '[INDEX_ENDPOINT]' + ); + + search_index_endpoint_sample($formattedIndexEndpoint); +} +// [END visionai_v1_generated_Warehouse_SearchIndexEndpoint_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/undeploy_index.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/undeploy_index.php new file mode 100644 index 000000000000..c90e9fd3515d --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/undeploy_index.php @@ -0,0 +1,89 @@ +setIndexEndpoint($formattedIndexEndpoint); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $warehouseClient->undeployIndex($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var UndeployIndexResponse $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 +{ + $formattedIndexEndpoint = WarehouseClient::indexEndpointName( + '[PROJECT]', + '[LOCATION]', + '[INDEX_ENDPOINT]' + ); + + undeploy_index_sample($formattedIndexEndpoint); +} +// [END visionai_v1_generated_Warehouse_UndeployIndex_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_annotation.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_annotation.php new file mode 100644 index 000000000000..0cd6615617d8 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_annotation.php @@ -0,0 +1,59 @@ +setAnnotation($annotation); + + // Call the API and handle any network failures. + try { + /** @var Annotation $response */ + $response = $warehouseClient->updateAnnotation($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_Warehouse_UpdateAnnotation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_asset.php new file mode 100644 index 000000000000..1b3a268048c8 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_asset.php @@ -0,0 +1,59 @@ +setAsset($asset); + + // Call the API and handle any network failures. + try { + /** @var Asset $response */ + $response = $warehouseClient->updateAsset($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_Warehouse_UpdateAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_collection.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_collection.php new file mode 100644 index 000000000000..25d2e0530ea1 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_collection.php @@ -0,0 +1,59 @@ +setCollection($collection); + + // Call the API and handle any network failures. + try { + /** @var Collection $response */ + $response = $warehouseClient->updateCollection($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_Warehouse_UpdateCollection_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_corpus.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_corpus.php new file mode 100644 index 000000000000..03026323d620 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_corpus.php @@ -0,0 +1,73 @@ +setDisplayName($corpusDisplayName); + $request = (new UpdateCorpusRequest()) + ->setCorpus($corpus); + + // Call the API and handle any network failures. + try { + /** @var Corpus $response */ + $response = $warehouseClient->updateCorpus($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $corpusDisplayName = '[DISPLAY_NAME]'; + + update_corpus_sample($corpusDisplayName); +} +// [END visionai_v1_generated_Warehouse_UpdateCorpus_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_data_schema.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_data_schema.php new file mode 100644 index 000000000000..61c6cf3120ce --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_data_schema.php @@ -0,0 +1,75 @@ +setKey($dataSchemaKey); + $request = (new UpdateDataSchemaRequest()) + ->setDataSchema($dataSchema); + + // Call the API and handle any network failures. + try { + /** @var DataSchema $response */ + $response = $warehouseClient->updateDataSchema($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} + +/** + * Helper to execute the sample. + * + * This sample has been automatically generated and should be regarded as a code + * template only. It will require modifications to work: + * - It may require correct/in-range values for request initialization. + * - It may require specifying regional endpoints when creating the service client, + * please see the apiEndpoint client configuration option for more details. + */ +function callSample(): void +{ + $dataSchemaKey = '[KEY]'; + + update_data_schema_sample($dataSchemaKey); +} +// [END visionai_v1_generated_Warehouse_UpdateDataSchema_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_index.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_index.php new file mode 100644 index 000000000000..b945f64f5945 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_index.php @@ -0,0 +1,76 @@ +setIndex($index) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $warehouseClient->updateIndex($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var Index $result */ + $result = $response->getResult(); + printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); + } else { + /** @var Status $error */ + $error = $response->getError(); + printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); + } + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_Warehouse_UpdateIndex_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_index_endpoint.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_index_endpoint.php new file mode 100644 index 000000000000..1bf57b9537b5 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_index_endpoint.php @@ -0,0 +1,74 @@ +setIndexEndpoint($indexEndpoint) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $warehouseClient->updateIndexEndpoint($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var IndexEndpoint $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 visionai_v1_generated_Warehouse_UpdateIndexEndpoint_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_search_config.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_search_config.php new file mode 100644 index 000000000000..f2c758ad1b9b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_search_config.php @@ -0,0 +1,72 @@ +setSearchConfig($searchConfig); + + // Call the API and handle any network failures. + try { + /** @var SearchConfig $response */ + $response = $warehouseClient->updateSearchConfig($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_Warehouse_UpdateSearchConfig_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_search_hypernym.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_search_hypernym.php new file mode 100644 index 000000000000..56efb5c6cbed --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_search_hypernym.php @@ -0,0 +1,59 @@ +setSearchHypernym($searchHypernym); + + // Call the API and handle any network failures. + try { + /** @var SearchHypernym $response */ + $response = $warehouseClient->updateSearchHypernym($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END visionai_v1_generated_Warehouse_UpdateSearchHypernym_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/upload_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/upload_asset.php new file mode 100644 index 000000000000..95d38353d345 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/upload_asset.php @@ -0,0 +1,99 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var OperationResponse $response */ + $response = $warehouseClient->uploadAsset($request); + $response->pollUntilComplete(); + + if ($response->operationSucceeded()) { + /** @var UploadAssetResponse $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 = WarehouseClient::assetName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[ASSET]' + ); + + upload_asset_sample($formattedName); +} +// [END visionai_v1_generated_Warehouse_UploadAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/view_collection_items.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/view_collection_items.php new file mode 100644 index 000000000000..ad210365825b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/view_collection_items.php @@ -0,0 +1,82 @@ +setCollection($formattedCollection); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $warehouseClient->viewCollectionItems($request); + + /** @var CollectionItem $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 +{ + $formattedCollection = WarehouseClient::collectionName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[COLLECTION]' + ); + + view_collection_items_sample($formattedCollection); +} +// [END visionai_v1_generated_Warehouse_ViewCollectionItems_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/view_indexed_assets.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/view_indexed_assets.php new file mode 100644 index 000000000000..859d1ff27a7f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/view_indexed_assets.php @@ -0,0 +1,83 @@ +setIndex($formattedIndex); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $warehouseClient->viewIndexedAssets($request); + + /** @var IndexedAsset $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 +{ + $formattedIndex = WarehouseClient::indexName( + '[PROJECT_NUMBER]', + '[LOCATION]', + '[CORPUS]', + '[INDEX]' + ); + + view_indexed_assets_sample($formattedIndex); +} +// [END visionai_v1_generated_Warehouse_ViewIndexedAssets_sync] diff --git a/owl-bot-staging/VisionAi/v1/src/V1/Client/AppPlatformClient.php b/owl-bot-staging/VisionAi/v1/src/V1/Client/AppPlatformClient.php new file mode 100644 index 000000000000..11347dd7b817 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/Client/AppPlatformClient.php @@ -0,0 +1,1204 @@ + addApplicationStreamInputAsync(AddApplicationStreamInputRequest $request, array $optionalArgs = []) + * @method PromiseInterface createApplicationAsync(CreateApplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface createApplicationInstancesAsync(CreateApplicationInstancesRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDraftAsync(CreateDraftRequest $request, array $optionalArgs = []) + * @method PromiseInterface createProcessorAsync(CreateProcessorRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteApplicationAsync(DeleteApplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteApplicationInstancesAsync(DeleteApplicationInstancesRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDraftAsync(DeleteDraftRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteProcessorAsync(DeleteProcessorRequest $request, array $optionalArgs = []) + * @method PromiseInterface deployApplicationAsync(DeployApplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getApplicationAsync(GetApplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDraftAsync(GetDraftRequest $request, array $optionalArgs = []) + * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getProcessorAsync(GetProcessorRequest $request, array $optionalArgs = []) + * @method PromiseInterface listApplicationsAsync(ListApplicationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDraftsAsync(ListDraftsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPrebuiltProcessorsAsync(ListPrebuiltProcessorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listProcessorsAsync(ListProcessorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface removeApplicationStreamInputAsync(RemoveApplicationStreamInputRequest $request, array $optionalArgs = []) + * @method PromiseInterface undeployApplicationAsync(UndeployApplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateApplicationAsync(UpdateApplicationRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateApplicationInstancesAsync(UpdateApplicationInstancesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateApplicationStreamInputAsync(UpdateApplicationStreamInputRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDraftAsync(UpdateDraftRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateProcessorAsync(UpdateProcessorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class AppPlatformClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.visionai.v1.AppPlatform'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'visionai.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'visionai.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/app_platform_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/app_platform_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/app_platform_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/app_platform_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a application + * resource. + * + * @param string $project + * @param string $location + * @param string $application + * + * @return string The formatted application resource. + */ + public static function applicationName(string $project, string $location, string $application): string + { + return self::getPathTemplate('application')->render([ + 'project' => $project, + 'location' => $location, + 'application' => $application, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a draft + * resource. + * + * @param string $project + * @param string $location + * @param string $application + * @param string $draft + * + * @return string The formatted draft resource. + */ + public static function draftName(string $project, string $location, string $application, string $draft): string + { + return self::getPathTemplate('draft')->render([ + 'project' => $project, + 'location' => $location, + 'application' => $application, + 'draft' => $draft, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a instance + * resource. + * + * @param string $project + * @param string $location + * @param string $application + * @param string $instance + * + * @return string The formatted instance resource. + */ + public static function instanceName(string $project, string $location, string $application, string $instance): string + { + return self::getPathTemplate('instance')->render([ + 'project' => $project, + 'location' => $location, + 'application' => $application, + '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 processor + * resource. + * + * @param string $project + * @param string $location + * @param string $processor + * + * @return string The formatted processor resource. + */ + public static function processorName(string $project, string $location, string $processor): string + { + return self::getPathTemplate('processor')->render([ + 'project' => $project, + 'location' => $location, + 'processor' => $processor, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a stream + * resource. + * + * @param string $project + * @param string $location + * @param string $cluster + * @param string $stream + * + * @return string The formatted stream resource. + */ + public static function streamName(string $project, string $location, string $cluster, string $stream): string + { + return self::getPathTemplate('stream')->render([ + 'project' => $project, + 'location' => $location, + 'cluster' => $cluster, + 'stream' => $stream, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - application: projects/{project}/locations/{location}/applications/{application} + * - draft: projects/{project}/locations/{location}/applications/{application}/drafts/{draft} + * - instance: projects/{project}/locations/{location}/applications/{application}/instances/{instance} + * - location: projects/{project}/locations/{location} + * - processor: projects/{project}/locations/{location}/processors/{processor} + * - stream: projects/{project}/locations/{location}/clusters/{cluster}/streams/{stream} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'visionai.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\VisionAI\V1\AppPlatformClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new AppPlatformClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Adds target stream input to the Application. + * If the Application is deployed, the corresponding new Application instance + * will be created. If the stream has already been in the Application, the RPC + * will fail. + * + * The async variant is {@see AppPlatformClient::addApplicationStreamInputAsync()} + * . + * + * @example samples/V1/AppPlatformClient/add_application_stream_input.php + * + * @param AddApplicationStreamInputRequest $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 addApplicationStreamInput(AddApplicationStreamInputRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('AddApplicationStreamInput', $request, $callOptions)->wait(); + } + + /** + * Creates a new Application in a given project and location. + * + * The async variant is {@see AppPlatformClient::createApplicationAsync()} . + * + * @example samples/V1/AppPlatformClient/create_application.php + * + * @param CreateApplicationRequest $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 createApplication(CreateApplicationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateApplication', $request, $callOptions)->wait(); + } + + /** + * Adds target stream input to the Application. + * If the Application is deployed, the corresponding new Application instance + * will be created. If the stream has already been in the Application, the RPC + * will fail. + * + * The async variant is {@see AppPlatformClient::createApplicationInstancesAsync()} + * . + * + * @example samples/V1/AppPlatformClient/create_application_instances.php + * + * @param CreateApplicationInstancesRequest $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 createApplicationInstances(CreateApplicationInstancesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateApplicationInstances', $request, $callOptions)->wait(); + } + + /** + * Creates a new Draft in a given project and location. + * + * The async variant is {@see AppPlatformClient::createDraftAsync()} . + * + * @example samples/V1/AppPlatformClient/create_draft.php + * + * @param CreateDraftRequest $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 createDraft(CreateDraftRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateDraft', $request, $callOptions)->wait(); + } + + /** + * Creates a new Processor in a given project and location. + * + * The async variant is {@see AppPlatformClient::createProcessorAsync()} . + * + * @example samples/V1/AppPlatformClient/create_processor.php + * + * @param CreateProcessorRequest $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 createProcessor(CreateProcessorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateProcessor', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Application. + * + * The async variant is {@see AppPlatformClient::deleteApplicationAsync()} . + * + * @example samples/V1/AppPlatformClient/delete_application.php + * + * @param DeleteApplicationRequest $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 deleteApplication(DeleteApplicationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteApplication', $request, $callOptions)->wait(); + } + + /** + * Remove target stream input to the Application, if the Application is + * deployed, the corresponding instance based will be deleted. If the stream + * is not in the Application, the RPC will fail. + * + * The async variant is {@see AppPlatformClient::deleteApplicationInstancesAsync()} + * . + * + * @example samples/V1/AppPlatformClient/delete_application_instances.php + * + * @param DeleteApplicationInstancesRequest $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 deleteApplicationInstances(DeleteApplicationInstancesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteApplicationInstances', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Draft. + * + * The async variant is {@see AppPlatformClient::deleteDraftAsync()} . + * + * @example samples/V1/AppPlatformClient/delete_draft.php + * + * @param DeleteDraftRequest $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 deleteDraft(DeleteDraftRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteDraft', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Processor. + * + * The async variant is {@see AppPlatformClient::deleteProcessorAsync()} . + * + * @example samples/V1/AppPlatformClient/delete_processor.php + * + * @param DeleteProcessorRequest $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 deleteProcessor(DeleteProcessorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteProcessor', $request, $callOptions)->wait(); + } + + /** + * Deploys a single Application. + * + * The async variant is {@see AppPlatformClient::deployApplicationAsync()} . + * + * @example samples/V1/AppPlatformClient/deploy_application.php + * + * @param DeployApplicationRequest $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 deployApplication(DeployApplicationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeployApplication', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Application. + * + * The async variant is {@see AppPlatformClient::getApplicationAsync()} . + * + * @example samples/V1/AppPlatformClient/get_application.php + * + * @param GetApplicationRequest $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 Application + * + * @throws ApiException Thrown if the API call fails. + */ + public function getApplication(GetApplicationRequest $request, array $callOptions = []): Application + { + return $this->startApiCall('GetApplication', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Draft. + * + * The async variant is {@see AppPlatformClient::getDraftAsync()} . + * + * @example samples/V1/AppPlatformClient/get_draft.php + * + * @param GetDraftRequest $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 Draft + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDraft(GetDraftRequest $request, array $callOptions = []): Draft + { + return $this->startApiCall('GetDraft', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Instance. + * + * The async variant is {@see AppPlatformClient::getInstanceAsync()} . + * + * @example samples/V1/AppPlatformClient/get_instance.php + * + * @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(); + } + + /** + * Gets details of a single Processor. + * + * The async variant is {@see AppPlatformClient::getProcessorAsync()} . + * + * @example samples/V1/AppPlatformClient/get_processor.php + * + * @param GetProcessorRequest $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 Processor + * + * @throws ApiException Thrown if the API call fails. + */ + public function getProcessor(GetProcessorRequest $request, array $callOptions = []): Processor + { + return $this->startApiCall('GetProcessor', $request, $callOptions)->wait(); + } + + /** + * Lists Applications in a given project and location. + * + * The async variant is {@see AppPlatformClient::listApplicationsAsync()} . + * + * @example samples/V1/AppPlatformClient/list_applications.php + * + * @param ListApplicationsRequest $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 listApplications(ListApplicationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListApplications', $request, $callOptions); + } + + /** + * Lists Drafts in a given project and location. + * + * The async variant is {@see AppPlatformClient::listDraftsAsync()} . + * + * @example samples/V1/AppPlatformClient/list_drafts.php + * + * @param ListDraftsRequest $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 listDrafts(ListDraftsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDrafts', $request, $callOptions); + } + + /** + * Lists Instances in a given project and location. + * + * The async variant is {@see AppPlatformClient::listInstancesAsync()} . + * + * @example samples/V1/AppPlatformClient/list_instances.php + * + * @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 PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListInstances', $request, $callOptions); + } + + /** + * ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt + * Processors. + * + * The async variant is {@see AppPlatformClient::listPrebuiltProcessorsAsync()} . + * + * @example samples/V1/AppPlatformClient/list_prebuilt_processors.php + * + * @param ListPrebuiltProcessorsRequest $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 ListPrebuiltProcessorsResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listPrebuiltProcessors(ListPrebuiltProcessorsRequest $request, array $callOptions = []): ListPrebuiltProcessorsResponse + { + return $this->startApiCall('ListPrebuiltProcessors', $request, $callOptions)->wait(); + } + + /** + * Lists Processors in a given project and location. + * + * The async variant is {@see AppPlatformClient::listProcessorsAsync()} . + * + * @example samples/V1/AppPlatformClient/list_processors.php + * + * @param ListProcessorsRequest $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 listProcessors(ListProcessorsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListProcessors', $request, $callOptions); + } + + /** + * Remove target stream input to the Application, if the Application is + * deployed, the corresponding instance based will be deleted. If the stream + * is not in the Application, the RPC will fail. + * + * The async variant is + * {@see AppPlatformClient::removeApplicationStreamInputAsync()} . + * + * @example samples/V1/AppPlatformClient/remove_application_stream_input.php + * + * @param RemoveApplicationStreamInputRequest $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 removeApplicationStreamInput(RemoveApplicationStreamInputRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RemoveApplicationStreamInput', $request, $callOptions)->wait(); + } + + /** + * Undeploys a single Application. + * + * The async variant is {@see AppPlatformClient::undeployApplicationAsync()} . + * + * @example samples/V1/AppPlatformClient/undeploy_application.php + * + * @param UndeployApplicationRequest $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 undeployApplication(UndeployApplicationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UndeployApplication', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Application. + * + * The async variant is {@see AppPlatformClient::updateApplicationAsync()} . + * + * @example samples/V1/AppPlatformClient/update_application.php + * + * @param UpdateApplicationRequest $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 updateApplication(UpdateApplicationRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateApplication', $request, $callOptions)->wait(); + } + + /** + * Adds target stream input to the Application. + * If the Application is deployed, the corresponding new Application instance + * will be created. If the stream has already been in the Application, the RPC + * will fail. + * + * The async variant is {@see AppPlatformClient::updateApplicationInstancesAsync()} + * . + * + * @example samples/V1/AppPlatformClient/update_application_instances.php + * + * @param UpdateApplicationInstancesRequest $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 updateApplicationInstances(UpdateApplicationInstancesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateApplicationInstances', $request, $callOptions)->wait(); + } + + /** + * Update target stream input to the Application, if the Application is + * deployed, the corresponding instance based will be deployed. For + * CreateOrUpdate behavior, set allow_missing to true. + * + * The async variant is + * {@see AppPlatformClient::updateApplicationStreamInputAsync()} . + * + * @example samples/V1/AppPlatformClient/update_application_stream_input.php + * + * @param UpdateApplicationStreamInputRequest $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 updateApplicationStreamInput(UpdateApplicationStreamInputRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateApplicationStreamInput', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Draft. + * + * The async variant is {@see AppPlatformClient::updateDraftAsync()} . + * + * @example samples/V1/AppPlatformClient/update_draft.php + * + * @param UpdateDraftRequest $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 updateDraft(UpdateDraftRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateDraft', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Processor. + * + * The async variant is {@see AppPlatformClient::updateProcessorAsync()} . + * + * @example samples/V1/AppPlatformClient/update_processor.php + * + * @param UpdateProcessorRequest $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 updateProcessor(UpdateProcessorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateProcessor', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see AppPlatformClient::getLocationAsync()} . + * + * @example samples/V1/AppPlatformClient/get_location.php + * + * @param GetLocationRequest $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 Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see AppPlatformClient::listLocationsAsync()} . + * + * @example samples/V1/AppPlatformClient/list_locations.php + * + * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/Client/HealthCheckServiceClient.php b/owl-bot-staging/VisionAi/v1/src/V1/Client/HealthCheckServiceClient.php new file mode 100644 index 000000000000..2d0542d1870f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/Client/HealthCheckServiceClient.php @@ -0,0 +1,314 @@ + healthCheckAsync(HealthCheckRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class HealthCheckServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.visionai.v1.HealthCheckService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'visionai.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'visionai.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/health_check_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/health_check_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/health_check_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/health_check_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a cluster + * resource. + * + * @param string $project + * @param string $location + * @param string $cluster + * + * @return string The formatted cluster resource. + */ + public static function clusterName(string $project, string $location, string $cluster): string + { + return self::getPathTemplate('cluster')->render([ + 'project' => $project, + 'location' => $location, + 'cluster' => $cluster, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - cluster: projects/{project}/locations/{location}/clusters/{cluster} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'visionai.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\VisionAI\V1\HealthCheckServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new HealthCheckServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * HealthCheck method checks the health status of the cluster. + * + * The async variant is {@see HealthCheckServiceClient::healthCheckAsync()} . + * + * @example samples/V1/HealthCheckServiceClient/health_check.php + * + * @param HealthCheckRequest $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 HealthCheckResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function healthCheck(HealthCheckRequest $request, array $callOptions = []): HealthCheckResponse + { + return $this->startApiCall('HealthCheck', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see HealthCheckServiceClient::getLocationAsync()} . + * + * @example samples/V1/HealthCheckServiceClient/get_location.php + * + * @param GetLocationRequest $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 Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see HealthCheckServiceClient::listLocationsAsync()} . + * + * @example samples/V1/HealthCheckServiceClient/list_locations.php + * + * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/Client/LiveVideoAnalyticsClient.php b/owl-bot-staging/VisionAi/v1/src/V1/Client/LiveVideoAnalyticsClient.php new file mode 100644 index 000000000000..7a73ff65995a --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/Client/LiveVideoAnalyticsClient.php @@ -0,0 +1,933 @@ + batchRunProcessAsync(BatchRunProcessRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAnalysisAsync(CreateAnalysisRequest $request, array $optionalArgs = []) + * @method PromiseInterface createOperatorAsync(CreateOperatorRequest $request, array $optionalArgs = []) + * @method PromiseInterface createProcessAsync(CreateProcessRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAnalysisAsync(DeleteAnalysisRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteOperatorAsync(DeleteOperatorRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteProcessAsync(DeleteProcessRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAnalysisAsync(GetAnalysisRequest $request, array $optionalArgs = []) + * @method PromiseInterface getOperatorAsync(GetOperatorRequest $request, array $optionalArgs = []) + * @method PromiseInterface getProcessAsync(GetProcessRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAnalysesAsync(ListAnalysesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listOperatorsAsync(ListOperatorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listProcessesAsync(ListProcessesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listPublicOperatorsAsync(ListPublicOperatorsRequest $request, array $optionalArgs = []) + * @method PromiseInterface resolveOperatorInfoAsync(ResolveOperatorInfoRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAnalysisAsync(UpdateAnalysisRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateOperatorAsync(UpdateOperatorRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateProcessAsync(UpdateProcessRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class LiveVideoAnalyticsClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.visionai.v1.LiveVideoAnalytics'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'visionai.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'visionai.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/live_video_analytics_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/live_video_analytics_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/live_video_analytics_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/live_video_analytics_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a analysis + * resource. + * + * @param string $project + * @param string $location + * @param string $cluster + * @param string $analysis + * + * @return string The formatted analysis resource. + */ + public static function analysisName(string $project, string $location, string $cluster, string $analysis): string + { + return self::getPathTemplate('analysis')->render([ + 'project' => $project, + 'location' => $location, + 'cluster' => $cluster, + 'analysis' => $analysis, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a cluster + * resource. + * + * @param string $project + * @param string $location + * @param string $cluster + * + * @return string The formatted cluster resource. + */ + public static function clusterName(string $project, string $location, string $cluster): string + { + return self::getPathTemplate('cluster')->render([ + 'project' => $project, + 'location' => $location, + 'cluster' => $cluster, + ]); + } + + /** + * 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 operator + * resource. + * + * @param string $project + * @param string $location + * @param string $operator + * + * @return string The formatted operator resource. + */ + public static function operatorName(string $project, string $location, string $operator): string + { + return self::getPathTemplate('operator')->render([ + 'project' => $project, + 'location' => $location, + 'operator' => $operator, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a process + * resource. + * + * @param string $project + * @param string $location + * @param string $cluster + * @param string $process + * + * @return string The formatted process resource. + */ + public static function processName(string $project, string $location, string $cluster, string $process): string + { + return self::getPathTemplate('process')->render([ + 'project' => $project, + 'location' => $location, + 'cluster' => $cluster, + 'process' => $process, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - analysis: projects/{project}/locations/{location}/clusters/{cluster}/analyses/{analysis} + * - cluster: projects/{project}/locations/{location}/clusters/{cluster} + * - location: projects/{project}/locations/{location} + * - operator: projects/{project}/locations/{location}/operators/{operator} + * - process: projects/{project}/locations/{location}/clusters/{cluster}/processes/{process} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'visionai.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\VisionAI\V1\LiveVideoAnalyticsClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new LiveVideoAnalyticsClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Run all of the processes to "completion". Max time for each process is + * the LRO time limit. + * + * The async variant is {@see LiveVideoAnalyticsClient::batchRunProcessAsync()} . + * + * @example samples/V1/LiveVideoAnalyticsClient/batch_run_process.php + * + * @param BatchRunProcessRequest $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 batchRunProcess(BatchRunProcessRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('BatchRunProcess', $request, $callOptions)->wait(); + } + + /** + * Creates a new Analysis in a given project and location. + * + * The async variant is {@see LiveVideoAnalyticsClient::createAnalysisAsync()} . + * + * @example samples/V1/LiveVideoAnalyticsClient/create_analysis.php + * + * @param CreateAnalysisRequest $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 createAnalysis(CreateAnalysisRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateAnalysis', $request, $callOptions)->wait(); + } + + /** + * Creates a new Operator in a given project and location. + * + * The async variant is {@see LiveVideoAnalyticsClient::createOperatorAsync()} . + * + * @example samples/V1/LiveVideoAnalyticsClient/create_operator.php + * + * @param CreateOperatorRequest $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 createOperator(CreateOperatorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateOperator', $request, $callOptions)->wait(); + } + + /** + * Creates a new Process in a given project and location. + * + * The async variant is {@see LiveVideoAnalyticsClient::createProcessAsync()} . + * + * @example samples/V1/LiveVideoAnalyticsClient/create_process.php + * + * @param CreateProcessRequest $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 createProcess(CreateProcessRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateProcess', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Analysis. + * + * The async variant is {@see LiveVideoAnalyticsClient::deleteAnalysisAsync()} . + * + * @example samples/V1/LiveVideoAnalyticsClient/delete_analysis.php + * + * @param DeleteAnalysisRequest $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 deleteAnalysis(DeleteAnalysisRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteAnalysis', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Operator. + * + * The async variant is {@see LiveVideoAnalyticsClient::deleteOperatorAsync()} . + * + * @example samples/V1/LiveVideoAnalyticsClient/delete_operator.php + * + * @param DeleteOperatorRequest $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 deleteOperator(DeleteOperatorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteOperator', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Process. + * + * The async variant is {@see LiveVideoAnalyticsClient::deleteProcessAsync()} . + * + * @example samples/V1/LiveVideoAnalyticsClient/delete_process.php + * + * @param DeleteProcessRequest $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 deleteProcess(DeleteProcessRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteProcess', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Analysis. + * + * The async variant is {@see LiveVideoAnalyticsClient::getAnalysisAsync()} . + * + * @example samples/V1/LiveVideoAnalyticsClient/get_analysis.php + * + * @param GetAnalysisRequest $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 Analysis + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAnalysis(GetAnalysisRequest $request, array $callOptions = []): Analysis + { + return $this->startApiCall('GetAnalysis', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Operator. + * + * The async variant is {@see LiveVideoAnalyticsClient::getOperatorAsync()} . + * + * @example samples/V1/LiveVideoAnalyticsClient/get_operator.php + * + * @param GetOperatorRequest $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 Operator + * + * @throws ApiException Thrown if the API call fails. + */ + public function getOperator(GetOperatorRequest $request, array $callOptions = []): Operator + { + return $this->startApiCall('GetOperator', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Process. + * + * The async variant is {@see LiveVideoAnalyticsClient::getProcessAsync()} . + * + * @example samples/V1/LiveVideoAnalyticsClient/get_process.php + * + * @param GetProcessRequest $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 Process + * + * @throws ApiException Thrown if the API call fails. + */ + public function getProcess(GetProcessRequest $request, array $callOptions = []): Process + { + return $this->startApiCall('GetProcess', $request, $callOptions)->wait(); + } + + /** + * Lists Analyses in a given project and location. + * + * The async variant is {@see LiveVideoAnalyticsClient::listAnalysesAsync()} . + * + * @example samples/V1/LiveVideoAnalyticsClient/list_analyses.php + * + * @param ListAnalysesRequest $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 listAnalyses(ListAnalysesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAnalyses', $request, $callOptions); + } + + /** + * Lists Operators in a given project and location. + * + * The async variant is {@see LiveVideoAnalyticsClient::listOperatorsAsync()} . + * + * @example samples/V1/LiveVideoAnalyticsClient/list_operators.php + * + * @param ListOperatorsRequest $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 listOperators(ListOperatorsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListOperators', $request, $callOptions); + } + + /** + * Lists Processes in a given project and location. + * + * The async variant is {@see LiveVideoAnalyticsClient::listProcessesAsync()} . + * + * @example samples/V1/LiveVideoAnalyticsClient/list_processes.php + * + * @param ListProcessesRequest $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 listProcesses(ListProcessesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListProcesses', $request, $callOptions); + } + + /** + * ListPublicOperators returns all the operators in public registry. + * + * The async variant is {@see LiveVideoAnalyticsClient::listPublicOperatorsAsync()} + * . + * + * @example samples/V1/LiveVideoAnalyticsClient/list_public_operators.php + * + * @param ListPublicOperatorsRequest $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 listPublicOperators(ListPublicOperatorsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListPublicOperators', $request, $callOptions); + } + + /** + * ResolveOperatorInfo returns the operator information based on the request. + * + * The async variant is {@see LiveVideoAnalyticsClient::resolveOperatorInfoAsync()} + * . + * + * @example samples/V1/LiveVideoAnalyticsClient/resolve_operator_info.php + * + * @param ResolveOperatorInfoRequest $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 ResolveOperatorInfoResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function resolveOperatorInfo(ResolveOperatorInfoRequest $request, array $callOptions = []): ResolveOperatorInfoResponse + { + return $this->startApiCall('ResolveOperatorInfo', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Analysis. + * + * The async variant is {@see LiveVideoAnalyticsClient::updateAnalysisAsync()} . + * + * @example samples/V1/LiveVideoAnalyticsClient/update_analysis.php + * + * @param UpdateAnalysisRequest $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 updateAnalysis(UpdateAnalysisRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateAnalysis', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Operator. + * + * The async variant is {@see LiveVideoAnalyticsClient::updateOperatorAsync()} . + * + * @example samples/V1/LiveVideoAnalyticsClient/update_operator.php + * + * @param UpdateOperatorRequest $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 updateOperator(UpdateOperatorRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateOperator', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Process. + * + * The async variant is {@see LiveVideoAnalyticsClient::updateProcessAsync()} . + * + * @example samples/V1/LiveVideoAnalyticsClient/update_process.php + * + * @param UpdateProcessRequest $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 updateProcess(UpdateProcessRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateProcess', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see LiveVideoAnalyticsClient::getLocationAsync()} . + * + * @example samples/V1/LiveVideoAnalyticsClient/get_location.php + * + * @param GetLocationRequest $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 Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see LiveVideoAnalyticsClient::listLocationsAsync()} . + * + * @example samples/V1/LiveVideoAnalyticsClient/list_locations.php + * + * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/Client/StreamingServiceClient.php b/owl-bot-staging/VisionAi/v1/src/V1/Client/StreamingServiceClient.php new file mode 100644 index 000000000000..ac585968892b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/Client/StreamingServiceClient.php @@ -0,0 +1,436 @@ + acquireLeaseAsync(AcquireLeaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface releaseLeaseAsync(ReleaseLeaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface renewLeaseAsync(RenewLeaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class StreamingServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.visionai.v1.StreamingService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'visionai.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'visionai.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/streaming_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/streaming_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/streaming_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/streaming_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a series + * resource. + * + * @param string $project + * @param string $location + * @param string $cluster + * @param string $series + * + * @return string The formatted series resource. + */ + public static function seriesName(string $project, string $location, string $cluster, string $series): string + { + return self::getPathTemplate('series')->render([ + 'project' => $project, + 'location' => $location, + 'cluster' => $cluster, + 'series' => $series, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - series: projects/{project}/locations/{location}/clusters/{cluster}/series/{series} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'visionai.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\VisionAI\V1\StreamingServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new StreamingServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * AcquireLease acquires a lease. + * + * The async variant is {@see StreamingServiceClient::acquireLeaseAsync()} . + * + * @example samples/V1/StreamingServiceClient/acquire_lease.php + * + * @param AcquireLeaseRequest $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 Lease + * + * @throws ApiException Thrown if the API call fails. + */ + public function acquireLease(AcquireLeaseRequest $request, array $callOptions = []): Lease + { + return $this->startApiCall('AcquireLease', $request, $callOptions)->wait(); + } + + /** + * Receive events given the stream name. + * + * @example samples/V1/StreamingServiceClient/receive_events.php + * + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return BidiStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function receiveEvents(array $callOptions = []): BidiStream + { + return $this->startApiCall('ReceiveEvents', null, $callOptions); + } + + /** + * Receive packets from the series. + * + * @example samples/V1/StreamingServiceClient/receive_packets.php + * + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return BidiStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function receivePackets(array $callOptions = []): BidiStream + { + return $this->startApiCall('ReceivePackets', null, $callOptions); + } + + /** + * RleaseLease releases a lease. + * + * The async variant is {@see StreamingServiceClient::releaseLeaseAsync()} . + * + * @example samples/V1/StreamingServiceClient/release_lease.php + * + * @param ReleaseLeaseRequest $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 ReleaseLeaseResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function releaseLease(ReleaseLeaseRequest $request, array $callOptions = []): ReleaseLeaseResponse + { + return $this->startApiCall('ReleaseLease', $request, $callOptions)->wait(); + } + + /** + * RenewLease renews a lease. + * + * The async variant is {@see StreamingServiceClient::renewLeaseAsync()} . + * + * @example samples/V1/StreamingServiceClient/renew_lease.php + * + * @param RenewLeaseRequest $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 Lease + * + * @throws ApiException Thrown if the API call fails. + */ + public function renewLease(RenewLeaseRequest $request, array $callOptions = []): Lease + { + return $this->startApiCall('RenewLease', $request, $callOptions)->wait(); + } + + /** + * Send packets to the series. + * + * @example samples/V1/StreamingServiceClient/send_packets.php + * + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return BidiStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function sendPackets(array $callOptions = []): BidiStream + { + return $this->startApiCall('SendPackets', null, $callOptions); + } + + /** + * Gets information about a location. + * + * The async variant is {@see StreamingServiceClient::getLocationAsync()} . + * + * @example samples/V1/StreamingServiceClient/get_location.php + * + * @param GetLocationRequest $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 Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see StreamingServiceClient::listLocationsAsync()} . + * + * @example samples/V1/StreamingServiceClient/list_locations.php + * + * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/Client/StreamsServiceClient.php b/owl-bot-staging/VisionAi/v1/src/V1/Client/StreamsServiceClient.php new file mode 100644 index 000000000000..a4c045cc89c8 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/Client/StreamsServiceClient.php @@ -0,0 +1,1099 @@ + createClusterAsync(CreateClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface createEventAsync(CreateEventRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSeriesAsync(CreateSeriesRequest $request, array $optionalArgs = []) + * @method PromiseInterface createStreamAsync(CreateStreamRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteClusterAsync(DeleteClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteEventAsync(DeleteEventRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSeriesAsync(DeleteSeriesRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteStreamAsync(DeleteStreamRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateStreamHlsTokenAsync(GenerateStreamHlsTokenRequest $request, array $optionalArgs = []) + * @method PromiseInterface getClusterAsync(GetClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface getEventAsync(GetEventRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSeriesAsync(GetSeriesRequest $request, array $optionalArgs = []) + * @method PromiseInterface getStreamAsync(GetStreamRequest $request, array $optionalArgs = []) + * @method PromiseInterface getStreamThumbnailAsync(GetStreamThumbnailRequest $request, array $optionalArgs = []) + * @method PromiseInterface listClustersAsync(ListClustersRequest $request, array $optionalArgs = []) + * @method PromiseInterface listEventsAsync(ListEventsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSeriesAsync(ListSeriesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listStreamsAsync(ListStreamsRequest $request, array $optionalArgs = []) + * @method PromiseInterface materializeChannelAsync(MaterializeChannelRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateClusterAsync(UpdateClusterRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateEventAsync(UpdateEventRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSeriesAsync(UpdateSeriesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateStreamAsync(UpdateStreamRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class StreamsServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.visionai.v1.StreamsService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'visionai.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'visionai.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/streams_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/streams_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/streams_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/streams_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a channel + * resource. + * + * @param string $project + * @param string $location + * @param string $cluster + * @param string $channel + * + * @return string The formatted channel resource. + */ + public static function channelName(string $project, string $location, string $cluster, string $channel): string + { + return self::getPathTemplate('channel')->render([ + 'project' => $project, + 'location' => $location, + 'cluster' => $cluster, + 'channel' => $channel, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a cluster + * resource. + * + * @param string $project + * @param string $location + * @param string $cluster + * + * @return string The formatted cluster resource. + */ + public static function clusterName(string $project, string $location, string $cluster): string + { + return self::getPathTemplate('cluster')->render([ + 'project' => $project, + 'location' => $location, + 'cluster' => $cluster, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a event + * resource. + * + * @param string $project + * @param string $location + * @param string $cluster + * @param string $event + * + * @return string The formatted event resource. + */ + public static function eventName(string $project, string $location, string $cluster, string $event): string + { + return self::getPathTemplate('event')->render([ + 'project' => $project, + 'location' => $location, + 'cluster' => $cluster, + 'event' => $event, + ]); + } + + /** + * 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 series + * resource. + * + * @param string $project + * @param string $location + * @param string $cluster + * @param string $series + * + * @return string The formatted series resource. + */ + public static function seriesName(string $project, string $location, string $cluster, string $series): string + { + return self::getPathTemplate('series')->render([ + 'project' => $project, + 'location' => $location, + 'cluster' => $cluster, + 'series' => $series, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a stream + * resource. + * + * @param string $project + * @param string $location + * @param string $cluster + * @param string $stream + * + * @return string The formatted stream resource. + */ + public static function streamName(string $project, string $location, string $cluster, string $stream): string + { + return self::getPathTemplate('stream')->render([ + 'project' => $project, + 'location' => $location, + 'cluster' => $cluster, + 'stream' => $stream, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - channel: projects/{project}/locations/{location}/clusters/{cluster}/channels/{channel} + * - cluster: projects/{project}/locations/{location}/clusters/{cluster} + * - event: projects/{project}/locations/{location}/clusters/{cluster}/events/{event} + * - location: projects/{project}/locations/{location} + * - series: projects/{project}/locations/{location}/clusters/{cluster}/series/{series} + * - stream: projects/{project}/locations/{location}/clusters/{cluster}/streams/{stream} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'visionai.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\VisionAI\V1\StreamsServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new StreamsServiceClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Creates a new Cluster in a given project and location. + * + * The async variant is {@see StreamsServiceClient::createClusterAsync()} . + * + * @example samples/V1/StreamsServiceClient/create_cluster.php + * + * @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(); + } + + /** + * Creates a new Event in a given project and location. + * + * The async variant is {@see StreamsServiceClient::createEventAsync()} . + * + * @example samples/V1/StreamsServiceClient/create_event.php + * + * @param CreateEventRequest $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 createEvent(CreateEventRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateEvent', $request, $callOptions)->wait(); + } + + /** + * Creates a new Series in a given project and location. + * + * The async variant is {@see StreamsServiceClient::createSeriesAsync()} . + * + * @example samples/V1/StreamsServiceClient/create_series.php + * + * @param CreateSeriesRequest $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 createSeries(CreateSeriesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateSeries', $request, $callOptions)->wait(); + } + + /** + * Creates a new Stream in a given project and location. + * + * The async variant is {@see StreamsServiceClient::createStreamAsync()} . + * + * @example samples/V1/StreamsServiceClient/create_stream.php + * + * @param CreateStreamRequest $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 createStream(CreateStreamRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateStream', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Cluster. + * + * The async variant is {@see StreamsServiceClient::deleteClusterAsync()} . + * + * @example samples/V1/StreamsServiceClient/delete_cluster.php + * + * @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. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteCluster(DeleteClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteCluster', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Event. + * + * The async variant is {@see StreamsServiceClient::deleteEventAsync()} . + * + * @example samples/V1/StreamsServiceClient/delete_event.php + * + * @param DeleteEventRequest $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 deleteEvent(DeleteEventRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteEvent', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Series. + * + * The async variant is {@see StreamsServiceClient::deleteSeriesAsync()} . + * + * @example samples/V1/StreamsServiceClient/delete_series.php + * + * @param DeleteSeriesRequest $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 deleteSeries(DeleteSeriesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteSeries', $request, $callOptions)->wait(); + } + + /** + * Deletes a single Stream. + * + * The async variant is {@see StreamsServiceClient::deleteStreamAsync()} . + * + * @example samples/V1/StreamsServiceClient/delete_stream.php + * + * @param DeleteStreamRequest $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 deleteStream(DeleteStreamRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteStream', $request, $callOptions)->wait(); + } + + /** + * Generate the JWT auth token required to get the stream HLS contents. + * + * The async variant is {@see StreamsServiceClient::generateStreamHlsTokenAsync()} + * . + * + * @example samples/V1/StreamsServiceClient/generate_stream_hls_token.php + * + * @param GenerateStreamHlsTokenRequest $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 GenerateStreamHlsTokenResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateStreamHlsToken(GenerateStreamHlsTokenRequest $request, array $callOptions = []): GenerateStreamHlsTokenResponse + { + return $this->startApiCall('GenerateStreamHlsToken', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Cluster. + * + * The async variant is {@see StreamsServiceClient::getClusterAsync()} . + * + * @example samples/V1/StreamsServiceClient/get_cluster.php + * + * @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 details of a single Event. + * + * The async variant is {@see StreamsServiceClient::getEventAsync()} . + * + * @example samples/V1/StreamsServiceClient/get_event.php + * + * @param GetEventRequest $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 Event + * + * @throws ApiException Thrown if the API call fails. + */ + public function getEvent(GetEventRequest $request, array $callOptions = []): Event + { + return $this->startApiCall('GetEvent', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Series. + * + * The async variant is {@see StreamsServiceClient::getSeriesAsync()} . + * + * @example samples/V1/StreamsServiceClient/get_series.php + * + * @param GetSeriesRequest $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 Series + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSeries(GetSeriesRequest $request, array $callOptions = []): Series + { + return $this->startApiCall('GetSeries', $request, $callOptions)->wait(); + } + + /** + * Gets details of a single Stream. + * + * The async variant is {@see StreamsServiceClient::getStreamAsync()} . + * + * @example samples/V1/StreamsServiceClient/get_stream.php + * + * @param GetStreamRequest $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 Stream + * + * @throws ApiException Thrown if the API call fails. + */ + public function getStream(GetStreamRequest $request, array $callOptions = []): Stream + { + return $this->startApiCall('GetStream', $request, $callOptions)->wait(); + } + + /** + * Gets the thumbnail (image snapshot) of a single Stream. + * + * The async variant is {@see StreamsServiceClient::getStreamThumbnailAsync()} . + * + * @example samples/V1/StreamsServiceClient/get_stream_thumbnail.php + * + * @param GetStreamThumbnailRequest $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 getStreamThumbnail(GetStreamThumbnailRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('GetStreamThumbnail', $request, $callOptions)->wait(); + } + + /** + * Lists Clusters in a given project and location. + * + * The async variant is {@see StreamsServiceClient::listClustersAsync()} . + * + * @example samples/V1/StreamsServiceClient/list_clusters.php + * + * @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 PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listClusters(ListClustersRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListClusters', $request, $callOptions); + } + + /** + * Lists Events in a given project and location. + * + * The async variant is {@see StreamsServiceClient::listEventsAsync()} . + * + * @example samples/V1/StreamsServiceClient/list_events.php + * + * @param ListEventsRequest $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 listEvents(ListEventsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListEvents', $request, $callOptions); + } + + /** + * Lists Series in a given project and location. + * + * The async variant is {@see StreamsServiceClient::listSeriesAsync()} . + * + * @example samples/V1/StreamsServiceClient/list_series.php + * + * @param ListSeriesRequest $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 listSeries(ListSeriesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSeries', $request, $callOptions); + } + + /** + * Lists Streams in a given project and location. + * + * The async variant is {@see StreamsServiceClient::listStreamsAsync()} . + * + * @example samples/V1/StreamsServiceClient/list_streams.php + * + * @param ListStreamsRequest $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 listStreams(ListStreamsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListStreams', $request, $callOptions); + } + + /** + * Materialize a channel. + * + * The async variant is {@see StreamsServiceClient::materializeChannelAsync()} . + * + * @example samples/V1/StreamsServiceClient/materialize_channel.php + * + * @param MaterializeChannelRequest $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 materializeChannel(MaterializeChannelRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('MaterializeChannel', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Cluster. + * + * The async variant is {@see StreamsServiceClient::updateClusterAsync()} . + * + * @example samples/V1/StreamsServiceClient/update_cluster.php + * + * @param UpdateClusterRequest $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(UpdateClusterRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateCluster', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Event. + * + * The async variant is {@see StreamsServiceClient::updateEventAsync()} . + * + * @example samples/V1/StreamsServiceClient/update_event.php + * + * @param UpdateEventRequest $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 updateEvent(UpdateEventRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateEvent', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Event. + * + * The async variant is {@see StreamsServiceClient::updateSeriesAsync()} . + * + * @example samples/V1/StreamsServiceClient/update_series.php + * + * @param UpdateSeriesRequest $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 updateSeries(UpdateSeriesRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateSeries', $request, $callOptions)->wait(); + } + + /** + * Updates the parameters of a single Stream. + * + * The async variant is {@see StreamsServiceClient::updateStreamAsync()} . + * + * @example samples/V1/StreamsServiceClient/update_stream.php + * + * @param UpdateStreamRequest $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 updateStream(UpdateStreamRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateStream', $request, $callOptions)->wait(); + } + + /** + * Gets information about a location. + * + * The async variant is {@see StreamsServiceClient::getLocationAsync()} . + * + * @example samples/V1/StreamsServiceClient/get_location.php + * + * @param GetLocationRequest $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 Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see StreamsServiceClient::listLocationsAsync()} . + * + * @example samples/V1/StreamsServiceClient/list_locations.php + * + * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/Client/WarehouseClient.php b/owl-bot-staging/VisionAi/v1/src/V1/Client/WarehouseClient.php new file mode 100644 index 000000000000..4000dfb3f499 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/Client/WarehouseClient.php @@ -0,0 +1,2361 @@ + addCollectionItemAsync(AddCollectionItemRequest $request, array $optionalArgs = []) + * @method PromiseInterface analyzeAssetAsync(AnalyzeAssetRequest $request, array $optionalArgs = []) + * @method PromiseInterface analyzeCorpusAsync(AnalyzeCorpusRequest $request, array $optionalArgs = []) + * @method PromiseInterface clipAssetAsync(ClipAssetRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAnnotationAsync(CreateAnnotationRequest $request, array $optionalArgs = []) + * @method PromiseInterface createAssetAsync(CreateAssetRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCollectionAsync(CreateCollectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCorpusAsync(CreateCorpusRequest $request, array $optionalArgs = []) + * @method PromiseInterface createDataSchemaAsync(CreateDataSchemaRequest $request, array $optionalArgs = []) + * @method PromiseInterface createIndexAsync(CreateIndexRequest $request, array $optionalArgs = []) + * @method PromiseInterface createIndexEndpointAsync(CreateIndexEndpointRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSearchConfigAsync(CreateSearchConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSearchHypernymAsync(CreateSearchHypernymRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAnnotationAsync(DeleteAnnotationRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteAssetAsync(DeleteAssetRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCollectionAsync(DeleteCollectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteCorpusAsync(DeleteCorpusRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteDataSchemaAsync(DeleteDataSchemaRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteIndexAsync(DeleteIndexRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteIndexEndpointAsync(DeleteIndexEndpointRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSearchConfigAsync(DeleteSearchConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSearchHypernymAsync(DeleteSearchHypernymRequest $request, array $optionalArgs = []) + * @method PromiseInterface deployIndexAsync(DeployIndexRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateHlsUriAsync(GenerateHlsUriRequest $request, array $optionalArgs = []) + * @method PromiseInterface generateRetrievalUrlAsync(GenerateRetrievalUrlRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAnnotationAsync(GetAnnotationRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAssetAsync(GetAssetRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCollectionAsync(GetCollectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCorpusAsync(GetCorpusRequest $request, array $optionalArgs = []) + * @method PromiseInterface getDataSchemaAsync(GetDataSchemaRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIndexAsync(GetIndexRequest $request, array $optionalArgs = []) + * @method PromiseInterface getIndexEndpointAsync(GetIndexEndpointRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSearchConfigAsync(GetSearchConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSearchHypernymAsync(GetSearchHypernymRequest $request, array $optionalArgs = []) + * @method PromiseInterface importAssetsAsync(ImportAssetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface indexAssetAsync(IndexAssetRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAnnotationsAsync(ListAnnotationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAssetsAsync(ListAssetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCollectionsAsync(ListCollectionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCorporaAsync(ListCorporaRequest $request, array $optionalArgs = []) + * @method PromiseInterface listDataSchemasAsync(ListDataSchemasRequest $request, array $optionalArgs = []) + * @method PromiseInterface listIndexEndpointsAsync(ListIndexEndpointsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listIndexesAsync(ListIndexesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSearchConfigsAsync(ListSearchConfigsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSearchHypernymsAsync(ListSearchHypernymsRequest $request, array $optionalArgs = []) + * @method PromiseInterface removeCollectionItemAsync(RemoveCollectionItemRequest $request, array $optionalArgs = []) + * @method PromiseInterface removeIndexAssetAsync(RemoveIndexAssetRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchAssetsAsync(SearchAssetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchIndexEndpointAsync(SearchIndexEndpointRequest $request, array $optionalArgs = []) + * @method PromiseInterface undeployIndexAsync(UndeployIndexRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAnnotationAsync(UpdateAnnotationRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateAssetAsync(UpdateAssetRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCollectionAsync(UpdateCollectionRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCorpusAsync(UpdateCorpusRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateDataSchemaAsync(UpdateDataSchemaRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateIndexAsync(UpdateIndexRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateIndexEndpointAsync(UpdateIndexEndpointRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSearchConfigAsync(UpdateSearchConfigRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSearchHypernymAsync(UpdateSearchHypernymRequest $request, array $optionalArgs = []) + * @method PromiseInterface uploadAssetAsync(UploadAssetRequest $request, array $optionalArgs = []) + * @method PromiseInterface viewCollectionItemsAsync(ViewCollectionItemsRequest $request, array $optionalArgs = []) + * @method PromiseInterface viewIndexedAssetsAsync(ViewIndexedAssetsRequest $request, array $optionalArgs = []) + * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) + * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) + */ +final class WarehouseClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.visionai.v1.Warehouse'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'warehouse-visionai.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'warehouse-visionai.UNIVERSE_DOMAIN'; + + /** The default port of the service. */ + private const DEFAULT_SERVICE_PORT = 443; + + /** The name of the code generator, to be included in the agent header. */ + private const CODEGEN_NAME = 'gapic'; + + /** The default scopes required by the service. */ + public static $serviceScopes = [ + 'https://www.googleapis.com/auth/cloud-platform', + ]; + + private $operationsClient; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/warehouse_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/warehouse_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/warehouse_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/warehouse_rest_client_config.php', + ], + ], + ]; + } + + /** + * Return an OperationsClient object with the same endpoint as $this. + * + * @return OperationsClient + */ + public function getOperationsClient() + { + return $this->operationsClient; + } + + /** + * Resume an existing long running operation that was previously started by a long + * running API method. If $methodName is not provided, or does not match a long + * running API method, then the operation can still be resumed, but the + * OperationResponse object will not deserialize the final response. + * + * @param string $operationName The name of the long running operation + * @param string $methodName The name of the method used to start the operation + * + * @return OperationResponse + */ + public function resumeOperation($operationName, $methodName = null) + { + $options = $this->descriptors[$methodName]['longRunning'] ?? []; + $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); + $operation->reload(); + return $operation; + } + + /** + * Create the default operation client for the service. + * + * @param array $options ClientOptions for the client. + * + * @return OperationsClient + */ + private function createOperationsClient(array $options) + { + // Unset client-specific configuration options + unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); + + if (isset($options['operationsClient'])) { + return $options['operationsClient']; + } + + return new OperationsClient($options); + } + + /** + * Formats a string containing the fully-qualified path to represent a annotation + * resource. + * + * @param string $projectNumber + * @param string $location + * @param string $corpus + * @param string $asset + * @param string $annotation + * + * @return string The formatted annotation resource. + */ + public static function annotationName(string $projectNumber, string $location, string $corpus, string $asset, string $annotation): string + { + return self::getPathTemplate('annotation')->render([ + 'project_number' => $projectNumber, + 'location' => $location, + 'corpus' => $corpus, + 'asset' => $asset, + 'annotation' => $annotation, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a asset + * resource. + * + * @param string $projectNumber + * @param string $location + * @param string $corpus + * @param string $asset + * + * @return string The formatted asset resource. + */ + public static function assetName(string $projectNumber, string $location, string $corpus, string $asset): string + { + return self::getPathTemplate('asset')->render([ + 'project_number' => $projectNumber, + 'location' => $location, + 'corpus' => $corpus, + 'asset' => $asset, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a collection + * resource. + * + * @param string $projectNumber + * @param string $location + * @param string $corpus + * @param string $collection + * + * @return string The formatted collection resource. + */ + public static function collectionName(string $projectNumber, string $location, string $corpus, string $collection): string + { + return self::getPathTemplate('collection')->render([ + 'project_number' => $projectNumber, + 'location' => $location, + 'corpus' => $corpus, + 'collection' => $collection, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a corpus + * resource. + * + * @param string $projectNumber + * @param string $location + * @param string $corpus + * + * @return string The formatted corpus resource. + */ + public static function corpusName(string $projectNumber, string $location, string $corpus): string + { + return self::getPathTemplate('corpus')->render([ + 'project_number' => $projectNumber, + 'location' => $location, + 'corpus' => $corpus, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a data_schema + * resource. + * + * @param string $projectNumber + * @param string $location + * @param string $corpus + * @param string $dataSchema + * + * @return string The formatted data_schema resource. + */ + public static function dataSchemaName(string $projectNumber, string $location, string $corpus, string $dataSchema): string + { + return self::getPathTemplate('dataSchema')->render([ + 'project_number' => $projectNumber, + 'location' => $location, + 'corpus' => $corpus, + 'data_schema' => $dataSchema, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a index + * resource. + * + * @param string $projectNumber + * @param string $location + * @param string $corpus + * @param string $index + * + * @return string The formatted index resource. + */ + public static function indexName(string $projectNumber, string $location, string $corpus, string $index): string + { + return self::getPathTemplate('index')->render([ + 'project_number' => $projectNumber, + 'location' => $location, + 'corpus' => $corpus, + 'index' => $index, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * index_endpoint resource. + * + * @param string $project + * @param string $location + * @param string $indexEndpoint + * + * @return string The formatted index_endpoint resource. + */ + public static function indexEndpointName(string $project, string $location, string $indexEndpoint): string + { + return self::getPathTemplate('indexEndpoint')->render([ + 'project' => $project, + 'location' => $location, + 'index_endpoint' => $indexEndpoint, + ]); + } + + /** + * 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 + * search_config resource. + * + * @param string $projectNumber + * @param string $location + * @param string $corpus + * @param string $searchConfig + * + * @return string The formatted search_config resource. + */ + public static function searchConfigName(string $projectNumber, string $location, string $corpus, string $searchConfig): string + { + return self::getPathTemplate('searchConfig')->render([ + 'project_number' => $projectNumber, + 'location' => $location, + 'corpus' => $corpus, + 'search_config' => $searchConfig, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * search_hypernym resource. + * + * @param string $projectNumber + * @param string $location + * @param string $corpus + * @param string $searchHypernym + * + * @return string The formatted search_hypernym resource. + */ + public static function searchHypernymName(string $projectNumber, string $location, string $corpus, string $searchHypernym): string + { + return self::getPathTemplate('searchHypernym')->render([ + 'project_number' => $projectNumber, + 'location' => $location, + 'corpus' => $corpus, + 'search_hypernym' => $searchHypernym, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - annotation: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation} + * - asset: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} + * - collection: projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection} + * - corpus: projects/{project_number}/locations/{location}/corpora/{corpus} + * - dataSchema: projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema} + * - index: projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index} + * - indexEndpoint: projects/{project}/locations/{location}/indexEndpoints/{index_endpoint} + * - location: projects/{project}/locations/{location} + * - searchConfig: projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config} + * - searchHypernym: projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym} + * + * The optional $template argument can be supplied to specify a particular pattern, + * and must match one of the templates listed above. If no $template argument is + * provided, or if the $template argument does not match one of the templates + * listed, then parseName will check each of the supported templates, and return + * the first match. + * + * @param string $formattedName The formatted name string + * @param ?string $template Optional name of template to match + * + * @return array An associative array from name component IDs to component values. + * + * @throws ValidationException If $formattedName could not be matched. + */ + public static function parseName(string $formattedName, ?string $template = null): array + { + return self::parseFormattedName($formattedName, $template); + } + + /** + * Constructor. + * + * @param array|ClientOptions $options { + * Optional. Options for configuring the service API wrapper. + * + * @type string $apiEndpoint + * The address of the API remote host. May optionally include the port, formatted + * as ":". Default 'warehouse-visionai.googleapis.com:443'. + * @type FetchAuthTokenInterface|CredentialsWrapper $credentials + * This option should only be used with a pre-constructed + * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that + * when one of these objects are provided, any settings in $credentialsConfig will + * be ignored. + * **Important**: If you are providing a path to a credentials file, or a decoded + * credentials file as a PHP array, this usage is now DEPRECATED. Providing an + * unvalidated credential configuration to Google APIs can compromise the security + * of your systems and data. It is recommended to create the credentials explicitly + * ``` + * use Google\Auth\Credentials\ServiceAccountCredentials; + * use Google\Cloud\VisionAI\V1\WarehouseClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new WarehouseClient(['credentials' => $creds]); + * ``` + * {@see + * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} + * @type array $credentialsConfig + * Options used to configure credentials, including auth token caching, for the + * client. For a full list of supporting configuration options, see + * {@see \Google\ApiCore\CredentialsWrapper::build()} . + * @type bool $disableRetries + * Determines whether or not retries defined by the client configuration should be + * disabled. Defaults to `false`. + * @type string|array $clientConfig + * Client method configuration, including retry settings. This option can be either + * a path to a JSON file, or a PHP array containing the decoded JSON data. By + * default this settings points to the default client config file, which is + * provided in the resources folder. + * @type string|TransportInterface $transport + * The transport used for executing network requests. May be either the string + * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. + * *Advanced usage*: Additionally, it is possible to pass in an already + * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note + * that when this object is provided, any settings in $transportConfig, and any + * $apiEndpoint setting, will be ignored. + * @type array $transportConfig + * Configuration options that will be used to construct the transport. Options for + * each supported transport type should be passed in a key for that transport. For + * example: + * $transportConfig = [ + * 'grpc' => [...], + * 'rest' => [...], + * ]; + * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and + * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the + * supported options. + * @type callable $clientCertSource + * A callable which returns the client cert as a string. This can be used to + * provide a certificate and private key to the transport layer for mTLS. + * @type false|LoggerInterface $logger + * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the + * 'GOOGLE_SDK_PHP_LOGGING' environment flag + * @type string $universeDomain + * The service domain for the client. Defaults to 'googleapis.com'. + * } + * + * @throws ValidationException + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($clientOptions); + $this->operationsClient = $this->createOperationsClient($clientOptions); + } + + /** Handles execution of the async variants for each documented method. */ + public function __call($method, $args) + { + if (substr($method, -5) !== 'Async') { + trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); + } + + array_unshift($args, substr($method, 0, -5)); + return call_user_func_array([$this, 'startAsyncCall'], $args); + } + + /** + * Adds an item into a Collection. + * + * The async variant is {@see WarehouseClient::addCollectionItemAsync()} . + * + * @example samples/V1/WarehouseClient/add_collection_item.php + * + * @param AddCollectionItemRequest $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 AddCollectionItemResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function addCollectionItem(AddCollectionItemRequest $request, array $callOptions = []): AddCollectionItemResponse + { + return $this->startApiCall('AddCollectionItem', $request, $callOptions)->wait(); + } + + /** + * Analyze asset to power search capability. + * + * The async variant is {@see WarehouseClient::analyzeAssetAsync()} . + * + * @example samples/V1/WarehouseClient/analyze_asset.php + * + * @param AnalyzeAssetRequest $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 analyzeAsset(AnalyzeAssetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('AnalyzeAsset', $request, $callOptions)->wait(); + } + + /** + * Analyzes a corpus. + * + * The async variant is {@see WarehouseClient::analyzeCorpusAsync()} . + * + * @example samples/V1/WarehouseClient/analyze_corpus.php + * + * @param AnalyzeCorpusRequest $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 analyzeCorpus(AnalyzeCorpusRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('AnalyzeCorpus', $request, $callOptions)->wait(); + } + + /** + * Supported by STREAM_VIDEO corpus type. + * Generates clips for downloading. The api takes in a time range, and + * generates a clip of the first content available after start_time and + * before end_time, which may overflow beyond these bounds. + * Returned clips are truncated if the total size of the clips are larger + * than 100MB. + * + * The async variant is {@see WarehouseClient::clipAssetAsync()} . + * + * @example samples/V1/WarehouseClient/clip_asset.php + * + * @param ClipAssetRequest $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 ClipAssetResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function clipAsset(ClipAssetRequest $request, array $callOptions = []): ClipAssetResponse + { + return $this->startApiCall('ClipAsset', $request, $callOptions)->wait(); + } + + /** + * Creates annotation inside asset. + * + * The async variant is {@see WarehouseClient::createAnnotationAsync()} . + * + * @example samples/V1/WarehouseClient/create_annotation.php + * + * @param CreateAnnotationRequest $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 Annotation + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAnnotation(CreateAnnotationRequest $request, array $callOptions = []): Annotation + { + return $this->startApiCall('CreateAnnotation', $request, $callOptions)->wait(); + } + + /** + * Creates an asset inside corpus. + * + * The async variant is {@see WarehouseClient::createAssetAsync()} . + * + * @example samples/V1/WarehouseClient/create_asset.php + * + * @param CreateAssetRequest $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 Asset + * + * @throws ApiException Thrown if the API call fails. + */ + public function createAsset(CreateAssetRequest $request, array $callOptions = []): Asset + { + return $this->startApiCall('CreateAsset', $request, $callOptions)->wait(); + } + + /** + * Creates a collection. + * + * The async variant is {@see WarehouseClient::createCollectionAsync()} . + * + * @example samples/V1/WarehouseClient/create_collection.php + * + * @param CreateCollectionRequest $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 createCollection(CreateCollectionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateCollection', $request, $callOptions)->wait(); + } + + /** + * Creates a corpus inside a project. + * + * The async variant is {@see WarehouseClient::createCorpusAsync()} . + * + * @example samples/V1/WarehouseClient/create_corpus.php + * + * @param CreateCorpusRequest $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 createCorpus(CreateCorpusRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateCorpus', $request, $callOptions)->wait(); + } + + /** + * Creates data schema inside corpus. + * + * The async variant is {@see WarehouseClient::createDataSchemaAsync()} . + * + * @example samples/V1/WarehouseClient/create_data_schema.php + * + * @param CreateDataSchemaRequest $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 DataSchema + * + * @throws ApiException Thrown if the API call fails. + */ + public function createDataSchema(CreateDataSchemaRequest $request, array $callOptions = []): DataSchema + { + return $this->startApiCall('CreateDataSchema', $request, $callOptions)->wait(); + } + + /** + * Creates an Index under the corpus. + * + * The async variant is {@see WarehouseClient::createIndexAsync()} . + * + * @example samples/V1/WarehouseClient/create_index.php + * + * @param CreateIndexRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function createIndex(CreateIndexRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateIndex', $request, $callOptions)->wait(); + } + + /** + * Creates an IndexEndpoint. + * + * The async variant is {@see WarehouseClient::createIndexEndpointAsync()} . + * + * @example samples/V1/WarehouseClient/create_index_endpoint.php + * + * @param CreateIndexEndpointRequest $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 createIndexEndpoint(CreateIndexEndpointRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('CreateIndexEndpoint', $request, $callOptions)->wait(); + } + + /** + * Creates a search configuration inside a corpus. + * + * Please follow the rules below to create a valid CreateSearchConfigRequest. + * --- General Rules --- + * 1. Request.search_config_id must not be associated with an existing + * SearchConfig. + * 2. Request must contain at least one non-empty search_criteria_property or + * facet_property. + * 3. mapped_fields must not be empty, and must map to existing UGA keys. + * 4. All mapped_fields must be of the same type. + * 5. All mapped_fields must share the same granularity. + * 6. All mapped_fields must share the same semantic SearchConfig match + * options. + * For property-specific rules, please reference the comments for + * FacetProperty and SearchCriteriaProperty. + * + * The async variant is {@see WarehouseClient::createSearchConfigAsync()} . + * + * @example samples/V1/WarehouseClient/create_search_config.php + * + * @param CreateSearchConfigRequest $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 SearchConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSearchConfig(CreateSearchConfigRequest $request, array $callOptions = []): SearchConfig + { + return $this->startApiCall('CreateSearchConfig', $request, $callOptions)->wait(); + } + + /** + * Creates a SearchHypernym inside a corpus. + * + * The async variant is {@see WarehouseClient::createSearchHypernymAsync()} . + * + * @example samples/V1/WarehouseClient/create_search_hypernym.php + * + * @param CreateSearchHypernymRequest $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 SearchHypernym + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSearchHypernym(CreateSearchHypernymRequest $request, array $callOptions = []): SearchHypernym + { + return $this->startApiCall('CreateSearchHypernym', $request, $callOptions)->wait(); + } + + /** + * Deletes annotation inside asset. + * + * The async variant is {@see WarehouseClient::deleteAnnotationAsync()} . + * + * @example samples/V1/WarehouseClient/delete_annotation.php + * + * @param DeleteAnnotationRequest $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 deleteAnnotation(DeleteAnnotationRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteAnnotation', $request, $callOptions)->wait(); + } + + /** + * Deletes asset inside corpus. + * + * The async variant is {@see WarehouseClient::deleteAssetAsync()} . + * + * @example samples/V1/WarehouseClient/delete_asset.php + * + * @param DeleteAssetRequest $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 deleteAsset(DeleteAssetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteAsset', $request, $callOptions)->wait(); + } + + /** + * Deletes a collection. + * + * The async variant is {@see WarehouseClient::deleteCollectionAsync()} . + * + * @example samples/V1/WarehouseClient/delete_collection.php + * + * @param DeleteCollectionRequest $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 deleteCollection(DeleteCollectionRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteCollection', $request, $callOptions)->wait(); + } + + /** + * Deletes a corpus only if its empty. + * Returns empty response. + * + * The async variant is {@see WarehouseClient::deleteCorpusAsync()} . + * + * @example samples/V1/WarehouseClient/delete_corpus.php + * + * @param DeleteCorpusRequest $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 deleteCorpus(DeleteCorpusRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteCorpus', $request, $callOptions)->wait(); + } + + /** + * Deletes data schema inside corpus. + * + * The async variant is {@see WarehouseClient::deleteDataSchemaAsync()} . + * + * @example samples/V1/WarehouseClient/delete_data_schema.php + * + * @param DeleteDataSchemaRequest $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 deleteDataSchema(DeleteDataSchemaRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteDataSchema', $request, $callOptions)->wait(); + } + + /** + * Delete a single Index. In order to delete an index, the caller must + * make sure that it is not deployed to any index endpoint. + * + * The async variant is {@see WarehouseClient::deleteIndexAsync()} . + * + * @example samples/V1/WarehouseClient/delete_index.php + * + * @param DeleteIndexRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return OperationResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteIndex(DeleteIndexRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteIndex', $request, $callOptions)->wait(); + } + + /** + * Deletes an IndexEndpoint. + * + * The async variant is {@see WarehouseClient::deleteIndexEndpointAsync()} . + * + * @example samples/V1/WarehouseClient/delete_index_endpoint.php + * + * @param DeleteIndexEndpointRequest $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 deleteIndexEndpoint(DeleteIndexEndpointRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeleteIndexEndpoint', $request, $callOptions)->wait(); + } + + /** + * Deletes a search configuration inside a corpus. + * + * For a DeleteSearchConfigRequest to be valid, + * Request.search_configuration.name must already exist. + * + * The async variant is {@see WarehouseClient::deleteSearchConfigAsync()} . + * + * @example samples/V1/WarehouseClient/delete_search_config.php + * + * @param DeleteSearchConfigRequest $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 deleteSearchConfig(DeleteSearchConfigRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteSearchConfig', $request, $callOptions)->wait(); + } + + /** + * Deletes a SearchHypernym inside a corpus. + * + * The async variant is {@see WarehouseClient::deleteSearchHypernymAsync()} . + * + * @example samples/V1/WarehouseClient/delete_search_hypernym.php + * + * @param DeleteSearchHypernymRequest $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 deleteSearchHypernym(DeleteSearchHypernymRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteSearchHypernym', $request, $callOptions)->wait(); + } + + /** + * Deploys an Index to IndexEndpoint. + * + * The async variant is {@see WarehouseClient::deployIndexAsync()} . + * + * @example samples/V1/WarehouseClient/deploy_index.php + * + * @param DeployIndexRequest $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 deployIndex(DeployIndexRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('DeployIndex', $request, $callOptions)->wait(); + } + + /** + * Generates a uri for an HLS manifest. The api takes in a collection of time + * ranges, and generates a URI for an HLS manifest that covers all the + * requested time ranges. + * + * The async variant is {@see WarehouseClient::generateHlsUriAsync()} . + * + * @example samples/V1/WarehouseClient/generate_hls_uri.php + * + * @param GenerateHlsUriRequest $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 GenerateHlsUriResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateHlsUri(GenerateHlsUriRequest $request, array $callOptions = []): GenerateHlsUriResponse + { + return $this->startApiCall('GenerateHlsUri', $request, $callOptions)->wait(); + } + + /** + * Generates a signed url for downloading the asset. + * For video warehouse, please see comment of UploadAsset about how to allow + * retrieval of cloud storage files in a different project. + * + * The async variant is {@see WarehouseClient::generateRetrievalUrlAsync()} . + * + * @example samples/V1/WarehouseClient/generate_retrieval_url.php + * + * @param GenerateRetrievalUrlRequest $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 GenerateRetrievalUrlResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function generateRetrievalUrl(GenerateRetrievalUrlRequest $request, array $callOptions = []): GenerateRetrievalUrlResponse + { + return $this->startApiCall('GenerateRetrievalUrl', $request, $callOptions)->wait(); + } + + /** + * Reads annotation inside asset. + * + * The async variant is {@see WarehouseClient::getAnnotationAsync()} . + * + * @example samples/V1/WarehouseClient/get_annotation.php + * + * @param GetAnnotationRequest $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 Annotation + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAnnotation(GetAnnotationRequest $request, array $callOptions = []): Annotation + { + return $this->startApiCall('GetAnnotation', $request, $callOptions)->wait(); + } + + /** + * Reads an asset inside corpus. + * + * The async variant is {@see WarehouseClient::getAssetAsync()} . + * + * @example samples/V1/WarehouseClient/get_asset.php + * + * @param GetAssetRequest $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 Asset + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAsset(GetAssetRequest $request, array $callOptions = []): Asset + { + return $this->startApiCall('GetAsset', $request, $callOptions)->wait(); + } + + /** + * Gets a collection. + * + * The async variant is {@see WarehouseClient::getCollectionAsync()} . + * + * @example samples/V1/WarehouseClient/get_collection.php + * + * @param GetCollectionRequest $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 Collection + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCollection(GetCollectionRequest $request, array $callOptions = []): Collection + { + return $this->startApiCall('GetCollection', $request, $callOptions)->wait(); + } + + /** + * Gets corpus details inside a project. + * + * The async variant is {@see WarehouseClient::getCorpusAsync()} . + * + * @example samples/V1/WarehouseClient/get_corpus.php + * + * @param GetCorpusRequest $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 Corpus + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCorpus(GetCorpusRequest $request, array $callOptions = []): Corpus + { + return $this->startApiCall('GetCorpus', $request, $callOptions)->wait(); + } + + /** + * Gets data schema inside corpus. + * + * The async variant is {@see WarehouseClient::getDataSchemaAsync()} . + * + * @example samples/V1/WarehouseClient/get_data_schema.php + * + * @param GetDataSchemaRequest $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 DataSchema + * + * @throws ApiException Thrown if the API call fails. + */ + public function getDataSchema(GetDataSchemaRequest $request, array $callOptions = []): DataSchema + { + return $this->startApiCall('GetDataSchema', $request, $callOptions)->wait(); + } + + /** + * Gets the details of a single Index under a Corpus. + * + * The async variant is {@see WarehouseClient::getIndexAsync()} . + * + * @example samples/V1/WarehouseClient/get_index.php + * + * @param GetIndexRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Index + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIndex(GetIndexRequest $request, array $callOptions = []): Index + { + return $this->startApiCall('GetIndex', $request, $callOptions)->wait(); + } + + /** + * Gets an IndexEndpoint. + * + * The async variant is {@see WarehouseClient::getIndexEndpointAsync()} . + * + * @example samples/V1/WarehouseClient/get_index_endpoint.php + * + * @param GetIndexEndpointRequest $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 IndexEndpoint + * + * @throws ApiException Thrown if the API call fails. + */ + public function getIndexEndpoint(GetIndexEndpointRequest $request, array $callOptions = []): IndexEndpoint + { + return $this->startApiCall('GetIndexEndpoint', $request, $callOptions)->wait(); + } + + /** + * Gets a search configuration inside a corpus. + * + * The async variant is {@see WarehouseClient::getSearchConfigAsync()} . + * + * @example samples/V1/WarehouseClient/get_search_config.php + * + * @param GetSearchConfigRequest $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 SearchConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSearchConfig(GetSearchConfigRequest $request, array $callOptions = []): SearchConfig + { + return $this->startApiCall('GetSearchConfig', $request, $callOptions)->wait(); + } + + /** + * Gets a SearchHypernym inside a corpus. + * + * The async variant is {@see WarehouseClient::getSearchHypernymAsync()} . + * + * @example samples/V1/WarehouseClient/get_search_hypernym.php + * + * @param GetSearchHypernymRequest $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 SearchHypernym + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSearchHypernym(GetSearchHypernymRequest $request, array $callOptions = []): SearchHypernym + { + return $this->startApiCall('GetSearchHypernym', $request, $callOptions)->wait(); + } + + /** + * Imports assets (images plus annotations) from a meta file on cloud storage. + * Each row in the meta file is corresponding to an image (specified by a + * cloud storage uri) and its annotations. + * + * The async variant is {@see WarehouseClient::importAssetsAsync()} . + * + * @example samples/V1/WarehouseClient/import_assets.php + * + * @param ImportAssetsRequest $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 importAssets(ImportAssetsRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('ImportAssets', $request, $callOptions)->wait(); + } + + /** + * Index one asset for search. + * Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND + * + * The async variant is {@see WarehouseClient::indexAssetAsync()} . + * + * @example samples/V1/WarehouseClient/index_asset.php + * + * @param IndexAssetRequest $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 indexAsset(IndexAssetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('IndexAsset', $request, $callOptions)->wait(); + } + + /** + * Ingests data for the asset. It is not allowed to ingest a data chunk which + * is already expired according to TTL. + * This method is only available via the gRPC API (not HTTP since + * bi-directional streaming is not supported via HTTP). + * + * @example samples/V1/WarehouseClient/ingest_asset.php + * + * @param array $callOptions { + * Optional. + * + * @type int $timeoutMillis + * Timeout to use for this call. + * } + * + * @return BidiStream + * + * @throws ApiException Thrown if the API call fails. + */ + public function ingestAsset(array $callOptions = []): BidiStream + { + return $this->startApiCall('IngestAsset', null, $callOptions); + } + + /** + * Lists a list of annotations inside asset. + * + * The async variant is {@see WarehouseClient::listAnnotationsAsync()} . + * + * @example samples/V1/WarehouseClient/list_annotations.php + * + * @param ListAnnotationsRequest $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 listAnnotations(ListAnnotationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAnnotations', $request, $callOptions); + } + + /** + * Lists an list of assets inside corpus. + * + * The async variant is {@see WarehouseClient::listAssetsAsync()} . + * + * @example samples/V1/WarehouseClient/list_assets.php + * + * @param ListAssetsRequest $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 listAssets(ListAssetsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAssets', $request, $callOptions); + } + + /** + * Lists collections inside a corpus. + * + * The async variant is {@see WarehouseClient::listCollectionsAsync()} . + * + * @example samples/V1/WarehouseClient/list_collections.php + * + * @param ListCollectionsRequest $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 listCollections(ListCollectionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCollections', $request, $callOptions); + } + + /** + * Lists all corpora in a project. + * + * The async variant is {@see WarehouseClient::listCorporaAsync()} . + * + * @example samples/V1/WarehouseClient/list_corpora.php + * + * @param ListCorporaRequest $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 listCorpora(ListCorporaRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCorpora', $request, $callOptions); + } + + /** + * Lists a list of data schemas inside corpus. + * + * The async variant is {@see WarehouseClient::listDataSchemasAsync()} . + * + * @example samples/V1/WarehouseClient/list_data_schemas.php + * + * @param ListDataSchemasRequest $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 listDataSchemas(ListDataSchemasRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListDataSchemas', $request, $callOptions); + } + + /** + * Lists all IndexEndpoints in a project. + * + * The async variant is {@see WarehouseClient::listIndexEndpointsAsync()} . + * + * @example samples/V1/WarehouseClient/list_index_endpoints.php + * + * @param ListIndexEndpointsRequest $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 listIndexEndpoints(ListIndexEndpointsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListIndexEndpoints', $request, $callOptions); + } + + /** + * List all Indexes in a given Corpus. + * + * The async variant is {@see WarehouseClient::listIndexesAsync()} . + * + * @example samples/V1/WarehouseClient/list_indexes.php + * + * @param ListIndexesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return PagedListResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function listIndexes(ListIndexesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListIndexes', $request, $callOptions); + } + + /** + * Lists all search configurations inside a corpus. + * + * The async variant is {@see WarehouseClient::listSearchConfigsAsync()} . + * + * @example samples/V1/WarehouseClient/list_search_configs.php + * + * @param ListSearchConfigsRequest $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 listSearchConfigs(ListSearchConfigsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSearchConfigs', $request, $callOptions); + } + + /** + * Lists SearchHypernyms inside a corpus. + * + * The async variant is {@see WarehouseClient::listSearchHypernymsAsync()} . + * + * @example samples/V1/WarehouseClient/list_search_hypernyms.php + * + * @param ListSearchHypernymsRequest $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 listSearchHypernyms(ListSearchHypernymsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSearchHypernyms', $request, $callOptions); + } + + /** + * Removes an item from a collection. + * + * The async variant is {@see WarehouseClient::removeCollectionItemAsync()} . + * + * @example samples/V1/WarehouseClient/remove_collection_item.php + * + * @param RemoveCollectionItemRequest $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 RemoveCollectionItemResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function removeCollectionItem(RemoveCollectionItemRequest $request, array $callOptions = []): RemoveCollectionItemResponse + { + return $this->startApiCall('RemoveCollectionItem', $request, $callOptions)->wait(); + } + + /** + * Remove one asset's index data for search. + * Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND + * + * The async variant is {@see WarehouseClient::removeIndexAssetAsync()} . + * + * @example samples/V1/WarehouseClient/remove_index_asset.php + * + * @param RemoveIndexAssetRequest $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 removeIndexAsset(RemoveIndexAssetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('RemoveIndexAsset', $request, $callOptions)->wait(); + } + + /** + * Search media asset. + * + * The async variant is {@see WarehouseClient::searchAssetsAsync()} . + * + * @example samples/V1/WarehouseClient/search_assets.php + * + * @param SearchAssetsRequest $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 searchAssets(SearchAssetsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchAssets', $request, $callOptions); + } + + /** + * Search a deployed index endpoint (IMAGE corpus type only). + * + * The async variant is {@see WarehouseClient::searchIndexEndpointAsync()} . + * + * @example samples/V1/WarehouseClient/search_index_endpoint.php + * + * @param SearchIndexEndpointRequest $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 searchIndexEndpoint(SearchIndexEndpointRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchIndexEndpoint', $request, $callOptions); + } + + /** + * Undeploys an Index from IndexEndpoint. + * + * The async variant is {@see WarehouseClient::undeployIndexAsync()} . + * + * @example samples/V1/WarehouseClient/undeploy_index.php + * + * @param UndeployIndexRequest $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 undeployIndex(UndeployIndexRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UndeployIndex', $request, $callOptions)->wait(); + } + + /** + * Updates annotation inside asset. + * + * The async variant is {@see WarehouseClient::updateAnnotationAsync()} . + * + * @example samples/V1/WarehouseClient/update_annotation.php + * + * @param UpdateAnnotationRequest $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 Annotation + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAnnotation(UpdateAnnotationRequest $request, array $callOptions = []): Annotation + { + return $this->startApiCall('UpdateAnnotation', $request, $callOptions)->wait(); + } + + /** + * Updates an asset inside corpus. + * + * The async variant is {@see WarehouseClient::updateAssetAsync()} . + * + * @example samples/V1/WarehouseClient/update_asset.php + * + * @param UpdateAssetRequest $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 Asset + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateAsset(UpdateAssetRequest $request, array $callOptions = []): Asset + { + return $this->startApiCall('UpdateAsset', $request, $callOptions)->wait(); + } + + /** + * Updates a collection. + * + * The async variant is {@see WarehouseClient::updateCollectionAsync()} . + * + * @example samples/V1/WarehouseClient/update_collection.php + * + * @param UpdateCollectionRequest $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 Collection + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateCollection(UpdateCollectionRequest $request, array $callOptions = []): Collection + { + return $this->startApiCall('UpdateCollection', $request, $callOptions)->wait(); + } + + /** + * Updates a corpus in a project. + * + * The async variant is {@see WarehouseClient::updateCorpusAsync()} . + * + * @example samples/V1/WarehouseClient/update_corpus.php + * + * @param UpdateCorpusRequest $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 Corpus + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateCorpus(UpdateCorpusRequest $request, array $callOptions = []): Corpus + { + return $this->startApiCall('UpdateCorpus', $request, $callOptions)->wait(); + } + + /** + * Updates data schema inside corpus. + * + * The async variant is {@see WarehouseClient::updateDataSchemaAsync()} . + * + * @example samples/V1/WarehouseClient/update_data_schema.php + * + * @param UpdateDataSchemaRequest $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 DataSchema + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateDataSchema(UpdateDataSchemaRequest $request, array $callOptions = []): DataSchema + { + return $this->startApiCall('UpdateDataSchema', $request, $callOptions)->wait(); + } + + /** + * Updates an Index under the corpus. + * Users can perform a metadata-only update or trigger a full index rebuild + * with different update_mask values. + * + * The async variant is {@see WarehouseClient::updateIndexAsync()} . + * + * @example samples/V1/WarehouseClient/update_index.php + * + * @param UpdateIndexRequest $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 updateIndex(UpdateIndexRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateIndex', $request, $callOptions)->wait(); + } + + /** + * Updates an IndexEndpoint. + * + * The async variant is {@see WarehouseClient::updateIndexEndpointAsync()} . + * + * @example samples/V1/WarehouseClient/update_index_endpoint.php + * + * @param UpdateIndexEndpointRequest $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 updateIndexEndpoint(UpdateIndexEndpointRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UpdateIndexEndpoint', $request, $callOptions)->wait(); + } + + /** + * Updates a search configuration inside a corpus. + * + * Please follow the rules below to create a valid UpdateSearchConfigRequest. + * --- General Rules --- + * 1. Request.search_configuration.name must already exist. + * 2. Request must contain at least one non-empty search_criteria_property or + * facet_property. + * 3. mapped_fields must not be empty, and must map to existing UGA keys. + * 4. All mapped_fields must be of the same type. + * 5. All mapped_fields must share the same granularity. + * 6. All mapped_fields must share the same semantic SearchConfig match + * options. + * For property-specific rules, please reference the comments for + * FacetProperty and SearchCriteriaProperty. + * + * The async variant is {@see WarehouseClient::updateSearchConfigAsync()} . + * + * @example samples/V1/WarehouseClient/update_search_config.php + * + * @param UpdateSearchConfigRequest $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 SearchConfig + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSearchConfig(UpdateSearchConfigRequest $request, array $callOptions = []): SearchConfig + { + return $this->startApiCall('UpdateSearchConfig', $request, $callOptions)->wait(); + } + + /** + * Updates a SearchHypernym inside a corpus. + * + * The async variant is {@see WarehouseClient::updateSearchHypernymAsync()} . + * + * @example samples/V1/WarehouseClient/update_search_hypernym.php + * + * @param UpdateSearchHypernymRequest $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 SearchHypernym + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSearchHypernym(UpdateSearchHypernymRequest $request, array $callOptions = []): SearchHypernym + { + return $this->startApiCall('UpdateSearchHypernym', $request, $callOptions)->wait(); + } + + /** + * Upload asset by specifing the asset Cloud Storage uri. + * For video warehouse, it requires users who call this API have read access + * to the cloud storage file. Once it is uploaded, it can be retrieved by + * GenerateRetrievalUrl API which by default, only can retrieve cloud storage + * files from the same project of the warehouse. To allow retrieval cloud + * storage files that are in a separate project, it requires to find the + * vision ai service account (Go to IAM, check checkbox to show "Include + * Google-provided role grants", search for "Cloud Vision AI Service Agent") + * and grant the read access of the cloud storage files to that service + * account. + * + * The async variant is {@see WarehouseClient::uploadAssetAsync()} . + * + * @example samples/V1/WarehouseClient/upload_asset.php + * + * @param UploadAssetRequest $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 uploadAsset(UploadAssetRequest $request, array $callOptions = []): OperationResponse + { + return $this->startApiCall('UploadAsset', $request, $callOptions)->wait(); + } + + /** + * View items inside a collection. + * + * The async variant is {@see WarehouseClient::viewCollectionItemsAsync()} . + * + * @example samples/V1/WarehouseClient/view_collection_items.php + * + * @param ViewCollectionItemsRequest $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 viewCollectionItems(ViewCollectionItemsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ViewCollectionItems', $request, $callOptions); + } + + /** + * Lists assets inside an index. + * + * The async variant is {@see WarehouseClient::viewIndexedAssetsAsync()} . + * + * @example samples/V1/WarehouseClient/view_indexed_assets.php + * + * @param ViewIndexedAssetsRequest $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 viewIndexedAssets(ViewIndexedAssetsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ViewIndexedAssets', $request, $callOptions); + } + + /** + * Gets information about a location. + * + * The async variant is {@see WarehouseClient::getLocationAsync()} . + * + * @example samples/V1/WarehouseClient/get_location.php + * + * @param GetLocationRequest $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 Location + * + * @throws ApiException Thrown if the API call fails. + */ + public function getLocation(GetLocationRequest $request, array $callOptions = []): Location + { + return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); + } + + /** + * Lists information about the supported locations for this service. + * + * The async variant is {@see WarehouseClient::listLocationsAsync()} . + * + * @example samples/V1/WarehouseClient/list_locations.php + * + * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListLocations', $request, $callOptions); + } +} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/gapic_metadata.json b/owl-bot-staging/VisionAi/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..71820dca81da --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/gapic_metadata.json @@ -0,0 +1,808 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.visionai.v1", + "libraryPackage": "Google\\Cloud\\VisionAI\\V1", + "services": { + "LiveVideoAnalytics": { + "clients": { + "grpc": { + "libraryClient": "LiveVideoAnalyticsGapicClient", + "rpcs": { + "BatchRunProcess": { + "methods": [ + "batchRunProcess" + ] + }, + "CreateAnalysis": { + "methods": [ + "createAnalysis" + ] + }, + "CreateOperator": { + "methods": [ + "createOperator" + ] + }, + "CreateProcess": { + "methods": [ + "createProcess" + ] + }, + "DeleteAnalysis": { + "methods": [ + "deleteAnalysis" + ] + }, + "DeleteOperator": { + "methods": [ + "deleteOperator" + ] + }, + "DeleteProcess": { + "methods": [ + "deleteProcess" + ] + }, + "GetAnalysis": { + "methods": [ + "getAnalysis" + ] + }, + "GetOperator": { + "methods": [ + "getOperator" + ] + }, + "GetProcess": { + "methods": [ + "getProcess" + ] + }, + "ListAnalyses": { + "methods": [ + "listAnalyses" + ] + }, + "ListOperators": { + "methods": [ + "listOperators" + ] + }, + "ListProcesses": { + "methods": [ + "listProcesses" + ] + }, + "ListPublicOperators": { + "methods": [ + "listPublicOperators" + ] + }, + "ResolveOperatorInfo": { + "methods": [ + "resolveOperatorInfo" + ] + }, + "UpdateAnalysis": { + "methods": [ + "updateAnalysis" + ] + }, + "UpdateOperator": { + "methods": [ + "updateOperator" + ] + }, + "UpdateProcess": { + "methods": [ + "updateProcess" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "AppPlatform": { + "clients": { + "grpc": { + "libraryClient": "AppPlatformGapicClient", + "rpcs": { + "AddApplicationStreamInput": { + "methods": [ + "addApplicationStreamInput" + ] + }, + "CreateApplication": { + "methods": [ + "createApplication" + ] + }, + "CreateApplicationInstances": { + "methods": [ + "createApplicationInstances" + ] + }, + "CreateDraft": { + "methods": [ + "createDraft" + ] + }, + "CreateProcessor": { + "methods": [ + "createProcessor" + ] + }, + "DeleteApplication": { + "methods": [ + "deleteApplication" + ] + }, + "DeleteApplicationInstances": { + "methods": [ + "deleteApplicationInstances" + ] + }, + "DeleteDraft": { + "methods": [ + "deleteDraft" + ] + }, + "DeleteProcessor": { + "methods": [ + "deleteProcessor" + ] + }, + "DeployApplication": { + "methods": [ + "deployApplication" + ] + }, + "GetApplication": { + "methods": [ + "getApplication" + ] + }, + "GetDraft": { + "methods": [ + "getDraft" + ] + }, + "GetInstance": { + "methods": [ + "getInstance" + ] + }, + "GetProcessor": { + "methods": [ + "getProcessor" + ] + }, + "ListApplications": { + "methods": [ + "listApplications" + ] + }, + "ListDrafts": { + "methods": [ + "listDrafts" + ] + }, + "ListInstances": { + "methods": [ + "listInstances" + ] + }, + "ListPrebuiltProcessors": { + "methods": [ + "listPrebuiltProcessors" + ] + }, + "ListProcessors": { + "methods": [ + "listProcessors" + ] + }, + "RemoveApplicationStreamInput": { + "methods": [ + "removeApplicationStreamInput" + ] + }, + "UndeployApplication": { + "methods": [ + "undeployApplication" + ] + }, + "UpdateApplication": { + "methods": [ + "updateApplication" + ] + }, + "UpdateApplicationInstances": { + "methods": [ + "updateApplicationInstances" + ] + }, + "UpdateApplicationStreamInput": { + "methods": [ + "updateApplicationStreamInput" + ] + }, + "UpdateDraft": { + "methods": [ + "updateDraft" + ] + }, + "UpdateProcessor": { + "methods": [ + "updateProcessor" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "StreamingService": { + "clients": { + "grpc": { + "libraryClient": "StreamingServiceGapicClient", + "rpcs": { + "AcquireLease": { + "methods": [ + "acquireLease" + ] + }, + "ReceiveEvents": { + "methods": [ + "receiveEvents" + ] + }, + "ReceivePackets": { + "methods": [ + "receivePackets" + ] + }, + "ReleaseLease": { + "methods": [ + "releaseLease" + ] + }, + "RenewLease": { + "methods": [ + "renewLease" + ] + }, + "SendPackets": { + "methods": [ + "sendPackets" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "StreamsService": { + "clients": { + "grpc": { + "libraryClient": "StreamsServiceGapicClient", + "rpcs": { + "CreateCluster": { + "methods": [ + "createCluster" + ] + }, + "CreateEvent": { + "methods": [ + "createEvent" + ] + }, + "CreateSeries": { + "methods": [ + "createSeries" + ] + }, + "CreateStream": { + "methods": [ + "createStream" + ] + }, + "DeleteCluster": { + "methods": [ + "deleteCluster" + ] + }, + "DeleteEvent": { + "methods": [ + "deleteEvent" + ] + }, + "DeleteSeries": { + "methods": [ + "deleteSeries" + ] + }, + "DeleteStream": { + "methods": [ + "deleteStream" + ] + }, + "GenerateStreamHlsToken": { + "methods": [ + "generateStreamHlsToken" + ] + }, + "GetCluster": { + "methods": [ + "getCluster" + ] + }, + "GetEvent": { + "methods": [ + "getEvent" + ] + }, + "GetSeries": { + "methods": [ + "getSeries" + ] + }, + "GetStream": { + "methods": [ + "getStream" + ] + }, + "GetStreamThumbnail": { + "methods": [ + "getStreamThumbnail" + ] + }, + "ListClusters": { + "methods": [ + "listClusters" + ] + }, + "ListEvents": { + "methods": [ + "listEvents" + ] + }, + "ListSeries": { + "methods": [ + "listSeries" + ] + }, + "ListStreams": { + "methods": [ + "listStreams" + ] + }, + "MaterializeChannel": { + "methods": [ + "materializeChannel" + ] + }, + "UpdateCluster": { + "methods": [ + "updateCluster" + ] + }, + "UpdateEvent": { + "methods": [ + "updateEvent" + ] + }, + "UpdateSeries": { + "methods": [ + "updateSeries" + ] + }, + "UpdateStream": { + "methods": [ + "updateStream" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "Warehouse": { + "clients": { + "grpc": { + "libraryClient": "WarehouseGapicClient", + "rpcs": { + "AddCollectionItem": { + "methods": [ + "addCollectionItem" + ] + }, + "AnalyzeAsset": { + "methods": [ + "analyzeAsset" + ] + }, + "AnalyzeCorpus": { + "methods": [ + "analyzeCorpus" + ] + }, + "ClipAsset": { + "methods": [ + "clipAsset" + ] + }, + "CreateAnnotation": { + "methods": [ + "createAnnotation" + ] + }, + "CreateAsset": { + "methods": [ + "createAsset" + ] + }, + "CreateCollection": { + "methods": [ + "createCollection" + ] + }, + "CreateCorpus": { + "methods": [ + "createCorpus" + ] + }, + "CreateDataSchema": { + "methods": [ + "createDataSchema" + ] + }, + "CreateIndex": { + "methods": [ + "createIndex" + ] + }, + "CreateIndexEndpoint": { + "methods": [ + "createIndexEndpoint" + ] + }, + "CreateSearchConfig": { + "methods": [ + "createSearchConfig" + ] + }, + "CreateSearchHypernym": { + "methods": [ + "createSearchHypernym" + ] + }, + "DeleteAnnotation": { + "methods": [ + "deleteAnnotation" + ] + }, + "DeleteAsset": { + "methods": [ + "deleteAsset" + ] + }, + "DeleteCollection": { + "methods": [ + "deleteCollection" + ] + }, + "DeleteCorpus": { + "methods": [ + "deleteCorpus" + ] + }, + "DeleteDataSchema": { + "methods": [ + "deleteDataSchema" + ] + }, + "DeleteIndex": { + "methods": [ + "deleteIndex" + ] + }, + "DeleteIndexEndpoint": { + "methods": [ + "deleteIndexEndpoint" + ] + }, + "DeleteSearchConfig": { + "methods": [ + "deleteSearchConfig" + ] + }, + "DeleteSearchHypernym": { + "methods": [ + "deleteSearchHypernym" + ] + }, + "DeployIndex": { + "methods": [ + "deployIndex" + ] + }, + "GenerateHlsUri": { + "methods": [ + "generateHlsUri" + ] + }, + "GenerateRetrievalUrl": { + "methods": [ + "generateRetrievalUrl" + ] + }, + "GetAnnotation": { + "methods": [ + "getAnnotation" + ] + }, + "GetAsset": { + "methods": [ + "getAsset" + ] + }, + "GetCollection": { + "methods": [ + "getCollection" + ] + }, + "GetCorpus": { + "methods": [ + "getCorpus" + ] + }, + "GetDataSchema": { + "methods": [ + "getDataSchema" + ] + }, + "GetIndex": { + "methods": [ + "getIndex" + ] + }, + "GetIndexEndpoint": { + "methods": [ + "getIndexEndpoint" + ] + }, + "GetSearchConfig": { + "methods": [ + "getSearchConfig" + ] + }, + "GetSearchHypernym": { + "methods": [ + "getSearchHypernym" + ] + }, + "ImportAssets": { + "methods": [ + "importAssets" + ] + }, + "IndexAsset": { + "methods": [ + "indexAsset" + ] + }, + "IngestAsset": { + "methods": [ + "ingestAsset" + ] + }, + "ListAnnotations": { + "methods": [ + "listAnnotations" + ] + }, + "ListAssets": { + "methods": [ + "listAssets" + ] + }, + "ListCollections": { + "methods": [ + "listCollections" + ] + }, + "ListCorpora": { + "methods": [ + "listCorpora" + ] + }, + "ListDataSchemas": { + "methods": [ + "listDataSchemas" + ] + }, + "ListIndexEndpoints": { + "methods": [ + "listIndexEndpoints" + ] + }, + "ListIndexes": { + "methods": [ + "listIndexes" + ] + }, + "ListSearchConfigs": { + "methods": [ + "listSearchConfigs" + ] + }, + "ListSearchHypernyms": { + "methods": [ + "listSearchHypernyms" + ] + }, + "RemoveCollectionItem": { + "methods": [ + "removeCollectionItem" + ] + }, + "RemoveIndexAsset": { + "methods": [ + "removeIndexAsset" + ] + }, + "SearchAssets": { + "methods": [ + "searchAssets" + ] + }, + "SearchIndexEndpoint": { + "methods": [ + "searchIndexEndpoint" + ] + }, + "UndeployIndex": { + "methods": [ + "undeployIndex" + ] + }, + "UpdateAnnotation": { + "methods": [ + "updateAnnotation" + ] + }, + "UpdateAsset": { + "methods": [ + "updateAsset" + ] + }, + "UpdateCollection": { + "methods": [ + "updateCollection" + ] + }, + "UpdateCorpus": { + "methods": [ + "updateCorpus" + ] + }, + "UpdateDataSchema": { + "methods": [ + "updateDataSchema" + ] + }, + "UpdateIndex": { + "methods": [ + "updateIndex" + ] + }, + "UpdateIndexEndpoint": { + "methods": [ + "updateIndexEndpoint" + ] + }, + "UpdateSearchConfig": { + "methods": [ + "updateSearchConfig" + ] + }, + "UpdateSearchHypernym": { + "methods": [ + "updateSearchHypernym" + ] + }, + "UploadAsset": { + "methods": [ + "uploadAsset" + ] + }, + "ViewCollectionItems": { + "methods": [ + "viewCollectionItems" + ] + }, + "ViewIndexedAssets": { + "methods": [ + "viewIndexedAssets" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + }, + "HealthCheckService": { + "clients": { + "grpc": { + "libraryClient": "HealthCheckServiceGapicClient", + "rpcs": { + "HealthCheck": { + "methods": [ + "healthCheck" + ] + }, + "GetLocation": { + "methods": [ + "getLocation" + ] + }, + "ListLocations": { + "methods": [ + "listLocations" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_client_config.json b/owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_client_config.json new file mode 100644 index 000000000000..084950364e9b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_client_config.json @@ -0,0 +1,162 @@ +{ + "interfaces": { + "google.cloud.visionai.v1.AppPlatform": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "AddApplicationStreamInput": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateApplication": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateApplicationInstances": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateDraft": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateProcessor": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteApplication": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteApplicationInstances": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteDraft": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteProcessor": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeployApplication": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetApplication": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetDraft": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetInstance": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetProcessor": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListApplications": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListDrafts": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListInstances": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListPrebuiltProcessors": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListProcessors": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RemoveApplicationStreamInput": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UndeployApplication": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateApplication": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateApplicationInstances": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateApplicationStreamInput": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateDraft": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateProcessor": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_descriptor_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_descriptor_config.php new file mode 100644 index 000000000000..a67f3985e097 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_descriptor_config.php @@ -0,0 +1,536 @@ + [ + 'google.cloud.visionai.v1.AppPlatform' => [ + 'AddApplicationStreamInput' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\AddApplicationStreamInputResponse', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateApplication' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Application', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateApplicationInstances' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\CreateApplicationInstancesResponse', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateDraft' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Draft', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateProcessor' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Processor', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteApplication' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteApplicationInstances' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Instance', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteDraft' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteProcessor' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeployApplication' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\DeployApplicationResponse', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RemoveApplicationStreamInput' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\RemoveApplicationStreamInputResponse', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UndeployApplication' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\UndeployApplicationResponse', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateApplication' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Application', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'application.name', + 'fieldAccessors' => [ + 'getApplication', + 'getName', + ], + ], + ], + ], + 'UpdateApplicationInstances' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\UpdateApplicationInstancesResponse', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateApplicationStreamInput' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\UpdateApplicationStreamInputResponse', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateDraft' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Draft', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'draft.name', + 'fieldAccessors' => [ + 'getDraft', + 'getName', + ], + ], + ], + ], + 'UpdateProcessor' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Processor', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'processor.name', + 'fieldAccessors' => [ + 'getProcessor', + 'getName', + ], + ], + ], + ], + 'GetApplication' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Application', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDraft' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Draft', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Instance', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetProcessor' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Processor', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListApplications' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getApplications', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListApplicationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDrafts' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDrafts', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListDraftsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListInstances' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getInstances', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListInstancesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPrebuiltProcessors' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListPrebuiltProcessorsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListProcessors' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getProcessors', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListProcessorsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'application' => 'projects/{project}/locations/{location}/applications/{application}', + 'draft' => 'projects/{project}/locations/{location}/applications/{application}/drafts/{draft}', + 'instance' => 'projects/{project}/locations/{location}/applications/{application}/instances/{instance}', + 'location' => 'projects/{project}/locations/{location}', + 'processor' => 'projects/{project}/locations/{location}/processors/{processor}', + 'stream' => 'projects/{project}/locations/{location}/clusters/{cluster}/streams/{stream}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_rest_client_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_rest_client_config.php new file mode 100644 index 000000000000..ac9056e937fa --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_rest_client_config.php @@ -0,0 +1,443 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.visionai.v1.AppPlatform' => [ + 'AddApplicationStreamInput' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}:addStreamInput', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateApplication' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/applications', + 'body' => 'application', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'application_id', + ], + ], + 'CreateApplicationInstances' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}:createApplicationInstances', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateDraft' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/applications/*}/drafts', + 'body' => 'draft', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'draft_id', + ], + ], + 'CreateProcessor' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/processors', + 'body' => 'processor', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'processor_id', + ], + ], + 'DeleteApplication' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteApplicationInstances' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}:deleteApplicationInstances', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteDraft' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*/drafts/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteProcessor' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeployApplication' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}:deploy', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetApplication' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDraft' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*/drafts/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetInstance' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*/instances/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetProcessor' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListApplications' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/applications', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDrafts' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/applications/*}/drafts', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListInstances' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/applications/*}/instances', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPrebuiltProcessors' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/processors:prebuilt', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListProcessors' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/processors', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RemoveApplicationStreamInput' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}:removeStreamInput', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UndeployApplication' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}:undeploy', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateApplication' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{application.name=projects/*/locations/*/applications/*}', + 'body' => 'application', + 'placeholders' => [ + 'application.name' => [ + 'getters' => [ + 'getApplication', + 'getName', + ], + ], + ], + ], + 'UpdateApplicationInstances' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}:updateApplicationInstances', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateApplicationStreamInput' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}:updateStreamInput', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateDraft' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{draft.name=projects/*/locations/*/applications/*/drafts/*}', + 'body' => 'draft', + 'placeholders' => [ + 'draft.name' => [ + 'getters' => [ + 'getDraft', + 'getName', + ], + ], + ], + ], + 'UpdateProcessor' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{processor.name=projects/*/locations/*/processors/*}', + 'body' => 'processor', + 'placeholders' => [ + 'processor.name' => [ + 'getters' => [ + 'getProcessor', + 'getName', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/warehouseOperations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/imageIndexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/indexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_client_config.json b/owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_client_config.json new file mode 100644 index 000000000000..f970b482c726 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_client_config.json @@ -0,0 +1,37 @@ +{ + "interfaces": { + "google.cloud.visionai.v1.HealthCheckService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "HealthCheck": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_descriptor_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_descriptor_config.php new file mode 100644 index 000000000000..f443149bde46 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_descriptor_config.php @@ -0,0 +1,77 @@ + [ + 'google.cloud.visionai.v1.HealthCheckService' => [ + 'HealthCheck' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\HealthCheckResponse', + 'headerParams' => [ + [ + 'keyName' => 'cluster', + 'fieldAccessors' => [ + 'getCluster', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'cluster' => 'projects/{project}/locations/{location}/clusters/{cluster}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_rest_client_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_rest_client_config.php new file mode 100644 index 000000000000..c5feeb2a7cf5 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_rest_client_config.php @@ -0,0 +1,141 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.visionai.v1.HealthCheckService' => [ + 'HealthCheck' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{cluster=projects/*/locations/*/clusters/*}:healthCheck', + 'placeholders' => [ + 'cluster' => [ + 'getters' => [ + 'getCluster', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/warehouseOperations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/imageIndexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/indexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_client_config.json b/owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_client_config.json new file mode 100644 index 000000000000..f501637b755f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_client_config.json @@ -0,0 +1,174 @@ +{ + "interfaces": { + "google.cloud.visionai.v1.LiveVideoAnalytics": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_5_codes": [], + "no_retry_6_codes": [], + "no_retry_7_codes": [], + "no_retry_8_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_5_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 300000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 300000, + "total_timeout_millis": 300000 + }, + "no_retry_6_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 300000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 300000, + "total_timeout_millis": 300000 + }, + "no_retry_7_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 300000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 300000, + "total_timeout_millis": 300000 + }, + "no_retry_8_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "BatchRunProcess": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateAnalysis": { + "timeout_millis": 300000, + "retry_codes_name": "no_retry_7_codes", + "retry_params_name": "no_retry_7_params" + }, + "CreateOperator": { + "timeout_millis": 300000, + "retry_codes_name": "no_retry_5_codes", + "retry_params_name": "no_retry_5_params" + }, + "CreateProcess": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteAnalysis": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_8_codes", + "retry_params_name": "no_retry_8_params" + }, + "DeleteOperator": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_8_codes", + "retry_params_name": "no_retry_8_params" + }, + "DeleteProcess": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAnalysis": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_8_codes", + "retry_params_name": "no_retry_8_params" + }, + "GetOperator": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_8_codes", + "retry_params_name": "no_retry_8_params" + }, + "GetProcess": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAnalyses": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_8_codes", + "retry_params_name": "no_retry_8_params" + }, + "ListOperators": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_8_codes", + "retry_params_name": "no_retry_8_params" + }, + "ListProcesses": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListPublicOperators": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ResolveOperatorInfo": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateAnalysis": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_8_codes", + "retry_params_name": "no_retry_8_params" + }, + "UpdateOperator": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_8_codes", + "retry_params_name": "no_retry_8_params" + }, + "UpdateProcess": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_descriptor_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_descriptor_config.php new file mode 100644 index 000000000000..655e224af82c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_descriptor_config.php @@ -0,0 +1,390 @@ + [ + 'google.cloud.visionai.v1.LiveVideoAnalytics' => [ + 'BatchRunProcess' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\BatchRunProcessResponse', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateAnalysis' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Analysis', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateOperator' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Operator', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateProcess' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Process', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAnalysis' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperator' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteProcess' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateAnalysis' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Analysis', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'analysis.name', + 'fieldAccessors' => [ + 'getAnalysis', + 'getName', + ], + ], + ], + ], + 'UpdateOperator' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Operator', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'operator.name', + 'fieldAccessors' => [ + 'getOperator', + 'getName', + ], + ], + ], + ], + 'UpdateProcess' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Process', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'process.name', + 'fieldAccessors' => [ + 'getProcess', + 'getName', + ], + ], + ], + ], + 'GetAnalysis' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Analysis', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetOperator' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Operator', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetProcess' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Process', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAnalyses' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAnalyses', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListAnalysesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListOperators' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getOperators', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListOperatorsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListProcesses' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getProcesses', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListProcessesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListPublicOperators' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getOperators', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListPublicOperatorsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ResolveOperatorInfo' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ResolveOperatorInfoResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'analysis' => 'projects/{project}/locations/{location}/clusters/{cluster}/analyses/{analysis}', + 'cluster' => 'projects/{project}/locations/{location}/clusters/{cluster}', + 'location' => 'projects/{project}/locations/{location}', + 'operator' => 'projects/{project}/locations/{location}/operators/{operator}', + 'process' => 'projects/{project}/locations/{location}/clusters/{cluster}/processes/{process}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_rest_client_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_rest_client_config.php new file mode 100644 index 000000000000..256fd0496286 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_rest_client_config.php @@ -0,0 +1,357 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.visionai.v1.LiveVideoAnalytics' => [ + 'BatchRunProcess' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/processes:batchRun', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateAnalysis' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/analyses', + 'body' => 'analysis', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'analysis_id', + ], + ], + 'CreateOperator' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/operators', + 'body' => 'operator', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'operator_id', + ], + ], + 'CreateProcess' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/processes', + 'body' => 'process', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'process_id', + ], + ], + 'DeleteAnalysis' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/analyses/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperator' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operators/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteProcess' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/processes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAnalysis' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/analyses/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperator' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operators/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetProcess' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/processes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAnalyses' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/analyses', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListOperators' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/operators', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListProcesses' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/processes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListPublicOperators' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:listPublicOperators', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ResolveOperatorInfo' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:resolveOperatorInfo', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateAnalysis' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{analysis.name=projects/*/locations/*/clusters/*/analyses/*}', + 'body' => 'analysis', + 'placeholders' => [ + 'analysis.name' => [ + 'getters' => [ + 'getAnalysis', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateOperator' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{operator.name=projects/*/locations/*/operators/*}', + 'body' => 'operator', + 'placeholders' => [ + 'operator.name' => [ + 'getters' => [ + 'getOperator', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateProcess' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{process.name=projects/*/locations/*/clusters/*/processes/*}', + 'body' => 'process', + 'placeholders' => [ + 'process.name' => [ + 'getters' => [ + 'getProcess', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/warehouseOperations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/imageIndexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/indexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_client_config.json b/owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_client_config.json new file mode 100644 index 000000000000..2cbad19092bc --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_client_config.json @@ -0,0 +1,56 @@ +{ + "interfaces": { + "google.cloud.visionai.v1.StreamingService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "AcquireLease": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ReceiveEvents": { + "timeout_millis": 60000 + }, + "ReceivePackets": { + "timeout_millis": 60000 + }, + "ReleaseLease": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "RenewLease": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "SendPackets": { + "timeout_millis": 60000 + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_descriptor_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_descriptor_config.php new file mode 100644 index 000000000000..043b1e8727d9 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_descriptor_config.php @@ -0,0 +1,122 @@ + [ + 'google.cloud.visionai.v1.StreamingService' => [ + 'AcquireLease' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Lease', + 'headerParams' => [ + [ + 'keyName' => 'series', + 'fieldAccessors' => [ + 'getSeries', + ], + ], + ], + ], + 'ReceiveEvents' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'BidiStreaming', + ], + 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ReceiveEventsResponse', + ], + 'ReceivePackets' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'BidiStreaming', + ], + 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ReceivePacketsResponse', + ], + 'ReleaseLease' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ReleaseLeaseResponse', + 'headerParams' => [ + [ + 'keyName' => 'series', + 'fieldAccessors' => [ + 'getSeries', + ], + ], + ], + ], + 'RenewLease' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Lease', + 'headerParams' => [ + [ + 'keyName' => 'series', + 'fieldAccessors' => [ + 'getSeries', + ], + ], + ], + ], + 'SendPackets' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'BidiStreaming', + ], + 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\SendPacketsResponse', + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'series' => 'projects/{project}/locations/{location}/clusters/{cluster}/series/{series}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_rest_client_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_rest_client_config.php new file mode 100644 index 000000000000..bc4a9ad4d344 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_rest_client_config.php @@ -0,0 +1,166 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.visionai.v1.StreamingService' => [ + 'AcquireLease' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{series=projects/*/locations/*/clusters/*/series/*}:acquireLease', + 'body' => '*', + 'placeholders' => [ + 'series' => [ + 'getters' => [ + 'getSeries', + ], + ], + ], + ], + 'ReleaseLease' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{series=projects/*/locations/*/clusters/*/series/*}:releaseLease', + 'body' => '*', + 'placeholders' => [ + 'series' => [ + 'getters' => [ + 'getSeries', + ], + ], + ], + ], + 'RenewLease' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{series=projects/*/locations/*/clusters/*/series/*}:renewLease', + 'body' => '*', + 'placeholders' => [ + 'series' => [ + 'getters' => [ + 'getSeries', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/warehouseOperations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/imageIndexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/indexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_client_config.json b/owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_client_config.json new file mode 100644 index 000000000000..f28b50dbc88b --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_client_config.json @@ -0,0 +1,147 @@ +{ + "interfaces": { + "google.cloud.visionai.v1.StreamsService": { + "retry_codes": { + "no_retry_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + } + }, + "methods": { + "CreateCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateEvent": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateSeries": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "CreateStream": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteEvent": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteSeries": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteStream": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GenerateStreamHlsToken": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetEvent": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetSeries": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetStream": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetStreamThumbnail": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListClusters": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListEvents": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListSeries": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListStreams": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "MaterializeChannel": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateCluster": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateEvent": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateSeries": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateStream": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_descriptor_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_descriptor_config.php new file mode 100644 index 000000000000..b784acc6cc5c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_descriptor_config.php @@ -0,0 +1,480 @@ + [ + 'google.cloud.visionai.v1.StreamsService' => [ + 'CreateCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Cluster', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateEvent' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Event', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSeries' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Series', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateStream' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Stream', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteEvent' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSeries' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteStream' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetStreamThumbnail' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\GetStreamThumbnailResponse', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'stream', + 'fieldAccessors' => [ + 'getStream', + ], + ], + ], + ], + 'MaterializeChannel' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Channel', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCluster' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Cluster', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'cluster.name', + 'fieldAccessors' => [ + 'getCluster', + 'getName', + ], + ], + ], + ], + 'UpdateEvent' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Event', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'event.name', + 'fieldAccessors' => [ + 'getEvent', + 'getName', + ], + ], + ], + ], + 'UpdateSeries' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Series', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'series.name', + 'fieldAccessors' => [ + 'getSeries', + 'getName', + ], + ], + ], + ], + 'UpdateStream' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Stream', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'stream.name', + 'fieldAccessors' => [ + 'getStream', + 'getName', + ], + ], + ], + ], + 'GenerateStreamHlsToken' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\GenerateStreamHlsTokenResponse', + 'headerParams' => [ + [ + 'keyName' => 'stream', + 'fieldAccessors' => [ + 'getStream', + ], + ], + ], + ], + 'GetCluster' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Cluster', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetEvent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Event', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSeries' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Series', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetStream' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Stream', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListClusters' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getClusters', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListClustersResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListEvents' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getEvents', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListEventsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSeries' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSeries', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListSeriesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListStreams' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getStreams', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListStreamsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'channel' => 'projects/{project}/locations/{location}/clusters/{cluster}/channels/{channel}', + 'cluster' => 'projects/{project}/locations/{location}/clusters/{cluster}', + 'event' => 'projects/{project}/locations/{location}/clusters/{cluster}/events/{event}', + 'location' => 'projects/{project}/locations/{location}', + 'series' => 'projects/{project}/locations/{location}/clusters/{cluster}/series/{series}', + 'stream' => 'projects/{project}/locations/{location}/clusters/{cluster}/streams/{stream}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_rest_client_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_rest_client_config.php new file mode 100644 index 000000000000..260e717ba04f --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_rest_client_config.php @@ -0,0 +1,425 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.visionai.v1.StreamsService' => [ + 'CreateCluster' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clusters', + 'body' => 'cluster', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'cluster_id', + ], + ], + 'CreateEvent' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/events', + 'body' => 'event', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'event_id', + ], + ], + 'CreateSeries' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/series', + 'body' => 'series', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'series_id', + ], + ], + 'CreateStream' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/streams', + 'body' => 'stream', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'stream_id', + ], + ], + 'DeleteCluster' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteEvent' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/events/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSeries' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/series/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteStream' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/streams/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GenerateStreamHlsToken' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{stream=projects/*/locations/*/clusters/*/streams/*}:generateStreamHlsToken', + 'body' => '*', + 'placeholders' => [ + 'stream' => [ + 'getters' => [ + 'getStream', + ], + ], + ], + ], + 'GetCluster' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetEvent' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/events/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSeries' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/series/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetStream' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/streams/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetStreamThumbnail' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{stream=projects/*/locations/*/clusters/*/streams/*}:getThumbnail', + 'body' => '*', + 'placeholders' => [ + 'stream' => [ + 'getters' => [ + 'getStream', + ], + ], + ], + ], + 'ListClusters' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clusters', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListEvents' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/events', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSeries' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/series', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListStreams' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/streams', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'MaterializeChannel' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/channels', + 'body' => 'channel', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'channel_id', + ], + ], + 'UpdateCluster' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{cluster.name=projects/*/locations/*/clusters/*}', + 'body' => 'cluster', + 'placeholders' => [ + 'cluster.name' => [ + 'getters' => [ + 'getCluster', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateEvent' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{event.name=projects/*/locations/*/clusters/*/events/*}', + 'body' => 'event', + 'placeholders' => [ + 'event.name' => [ + 'getters' => [ + 'getEvent', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateSeries' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{series.name=projects/*/locations/*/clusters/*/series/*}', + 'body' => 'series', + 'placeholders' => [ + 'series.name' => [ + 'getters' => [ + 'getSeries', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateStream' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{stream.name=projects/*/locations/*/clusters/*/streams/*}', + 'body' => 'stream', + 'placeholders' => [ + 'stream.name' => [ + 'getters' => [ + 'getStream', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/warehouseOperations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/imageIndexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/indexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_client_config.json b/owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_client_config.json new file mode 100644 index 000000000000..175cc5790575 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_client_config.json @@ -0,0 +1,369 @@ +{ + "interfaces": { + "google.cloud.visionai.v1.Warehouse": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "retry_policy_2_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "retry_policy_2_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 2.5, + "max_retry_delay_millis": 120000, + "initial_rpc_timeout_millis": 120000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 120000, + "total_timeout_millis": 120000 + } + }, + "methods": { + "AddCollectionItem": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "AnalyzeAsset": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "AnalyzeCorpus": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ClipAsset": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateAnnotation": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "CreateAsset": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "CreateCollection": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateCorpus": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "CreateDataSchema": { + "timeout_millis": 120000, + "retry_codes_name": "retry_policy_2_codes", + "retry_params_name": "retry_policy_2_params" + }, + "CreateIndex": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateIndexEndpoint": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateSearchConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateSearchHypernym": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteAnnotation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteAsset": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteCollection": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteCorpus": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteDataSchema": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteIndex": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteIndexEndpoint": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteSearchConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteSearchHypernym": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeployIndex": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GenerateHlsUri": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GenerateRetrievalUrl": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAnnotation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAsset": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetCollection": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetCorpus": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetDataSchema": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIndex": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetIndexEndpoint": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSearchConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSearchHypernym": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ImportAssets": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "IndexAsset": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "IngestAsset": { + "timeout_millis": 120000 + }, + "ListAnnotations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListAssets": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListCollections": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListCorpora": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListDataSchemas": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListIndexEndpoints": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListIndexes": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListSearchConfigs": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListSearchHypernyms": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RemoveCollectionItem": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "RemoveIndexAsset": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SearchAssets": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SearchIndexEndpoint": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UndeployIndex": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateAnnotation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateAsset": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateCollection": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateCorpus": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateDataSchema": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateIndex": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateIndexEndpoint": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateSearchConfig": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateSearchHypernym": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UploadAsset": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ViewCollectionItems": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ViewIndexedAssets": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetLocation": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListLocations": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_descriptor_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_descriptor_config.php new file mode 100644 index 000000000000..186e82ddf8e0 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_descriptor_config.php @@ -0,0 +1,1066 @@ + [ + 'google.cloud.visionai.v1.Warehouse' => [ + 'AnalyzeAsset' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\AnalyzeAssetResponse', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\AnalyzeAssetMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'AnalyzeCorpus' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\AnalyzeCorpusResponse', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\AnalyzeCorpusMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateCollection' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Collection', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\CreateCollectionMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateCorpus' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Corpus', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\CreateCorpusMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateIndex' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Index', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\CreateIndexMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateIndexEndpoint' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\IndexEndpoint', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\CreateIndexEndpointMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAsset' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\DeleteAssetMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCollection' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\DeleteCollectionMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteIndex' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\DeleteIndexMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteIndexEndpoint' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Protobuf\GPBEmpty', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\DeleteIndexEndpointMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeployIndex' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\DeployIndexResponse', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\DeployIndexMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'index_endpoint', + 'fieldAccessors' => [ + 'getIndexEndpoint', + ], + ], + ], + ], + 'ImportAssets' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\ImportAssetsResponse', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\ImportAssetsMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'IndexAsset' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\IndexAssetResponse', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\IndexAssetMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'RemoveIndexAsset' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\RemoveIndexAssetResponse', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\RemoveIndexAssetMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UndeployIndex' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\UndeployIndexResponse', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\UndeployIndexMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'index_endpoint', + 'fieldAccessors' => [ + 'getIndexEndpoint', + ], + ], + ], + ], + 'UpdateIndex' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Index', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\UpdateIndexMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'index.name', + 'fieldAccessors' => [ + 'getIndex', + 'getName', + ], + ], + ], + ], + 'UpdateIndexEndpoint' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\IndexEndpoint', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\UpdateIndexEndpointMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'index_endpoint.name', + 'fieldAccessors' => [ + 'getIndexEndpoint', + 'getName', + ], + ], + ], + ], + 'UploadAsset' => [ + 'longRunning' => [ + 'operationReturnType' => '\Google\Cloud\VisionAI\V1\UploadAssetResponse', + 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\UploadAssetMetadata', + 'initialPollDelayMillis' => '500', + 'pollDelayMultiplier' => '1.5', + 'maxPollDelayMillis' => '5000', + 'totalPollTimeoutMillis' => '300000', + ], + 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'AddCollectionItem' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\AddCollectionItemResponse', + 'headerParams' => [ + [ + 'keyName' => 'item.collection', + 'fieldAccessors' => [ + 'getItem', + 'getCollection', + ], + ], + ], + ], + 'ClipAsset' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ClipAssetResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateAnnotation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Annotation', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateAsset' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Asset', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDataSchema' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\DataSchema', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSearchConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\SearchConfig', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSearchHypernym' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\SearchHypernym', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAnnotation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCorpus' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteDataSchema' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSearchConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSearchHypernym' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GenerateHlsUri' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\GenerateHlsUriResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GenerateRetrievalUrl' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\GenerateRetrievalUrlResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAnnotation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Annotation', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetAsset' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Asset', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCollection' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Collection', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCorpus' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Corpus', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetDataSchema' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\DataSchema', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIndex' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Index', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetIndexEndpoint' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\IndexEndpoint', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSearchConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\SearchConfig', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSearchHypernym' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\SearchHypernym', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'IngestAsset' => [ + 'grpcStreaming' => [ + 'grpcStreamingType' => 'BidiStreaming', + ], + 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\IngestAssetResponse', + ], + 'ListAnnotations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAnnotations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListAnnotationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListAssets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAssets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListAssetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListCollections' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCollections', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListCollectionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListCorpora' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCorpora', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListCorporaResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListDataSchemas' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getDataSchemas', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListDataSchemasResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListIndexEndpoints' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getIndexEndpoints', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListIndexEndpointsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListIndexes' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getIndexes', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListIndexesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSearchConfigs' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSearchConfigs', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListSearchConfigsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSearchHypernyms' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSearchHypernyms', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ListSearchHypernymsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'RemoveCollectionItem' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\RemoveCollectionItemResponse', + 'headerParams' => [ + [ + 'keyName' => 'item.collection', + 'fieldAccessors' => [ + 'getItem', + 'getCollection', + ], + ], + ], + ], + 'SearchAssets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSearchResultItems', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\SearchAssetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'corpus', + 'fieldAccessors' => [ + 'getCorpus', + ], + ], + ], + ], + 'SearchIndexEndpoint' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSearchResultItems', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\SearchIndexEndpointResponse', + 'headerParams' => [ + [ + 'keyName' => 'index_endpoint', + 'fieldAccessors' => [ + 'getIndexEndpoint', + ], + ], + ], + ], + 'UpdateAnnotation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Annotation', + 'headerParams' => [ + [ + 'keyName' => 'annotation.name', + 'fieldAccessors' => [ + 'getAnnotation', + 'getName', + ], + ], + ], + ], + 'UpdateAsset' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Asset', + 'headerParams' => [ + [ + 'keyName' => 'asset.name', + 'fieldAccessors' => [ + 'getAsset', + 'getName', + ], + ], + ], + ], + 'UpdateCollection' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Collection', + 'headerParams' => [ + [ + 'keyName' => 'collection.name', + 'fieldAccessors' => [ + 'getCollection', + 'getName', + ], + ], + ], + ], + 'UpdateCorpus' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\Corpus', + 'headerParams' => [ + [ + 'keyName' => 'corpus.name', + 'fieldAccessors' => [ + 'getCorpus', + 'getName', + ], + ], + ], + ], + 'UpdateDataSchema' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\DataSchema', + 'headerParams' => [ + [ + 'keyName' => 'data_schema.name', + 'fieldAccessors' => [ + 'getDataSchema', + 'getName', + ], + ], + ], + ], + 'UpdateSearchConfig' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\SearchConfig', + 'headerParams' => [ + [ + 'keyName' => 'search_config.name', + 'fieldAccessors' => [ + 'getSearchConfig', + 'getName', + ], + ], + ], + ], + 'UpdateSearchHypernym' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\SearchHypernym', + 'headerParams' => [ + [ + 'keyName' => 'search_hypernym.name', + 'fieldAccessors' => [ + 'getSearchHypernym', + 'getName', + ], + ], + ], + ], + 'ViewCollectionItems' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getItems', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ViewCollectionItemsResponse', + 'headerParams' => [ + [ + 'keyName' => 'collection', + 'fieldAccessors' => [ + 'getCollection', + ], + ], + ], + ], + 'ViewIndexedAssets' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getIndexedAssets', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\VisionAI\V1\ViewIndexedAssetsResponse', + 'headerParams' => [ + [ + 'keyName' => 'index', + 'fieldAccessors' => [ + 'getIndex', + ], + ], + ], + ], + 'GetLocation' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Location\Location', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'ListLocations' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getLocations', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + 'interfaceOverride' => 'google.cloud.location.Locations', + ], + 'templateMap' => [ + 'annotation' => 'projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}', + 'asset' => 'projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}', + 'collection' => 'projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}', + 'corpus' => 'projects/{project_number}/locations/{location}/corpora/{corpus}', + 'dataSchema' => 'projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}', + 'index' => 'projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}', + 'indexEndpoint' => 'projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}', + 'location' => 'projects/{project}/locations/{location}', + 'searchConfig' => 'projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}', + 'searchHypernym' => 'projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}', + ], + ], + ], +]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_rest_client_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_rest_client_config.php new file mode 100644 index 000000000000..71ebb103a480 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_rest_client_config.php @@ -0,0 +1,865 @@ + [ + 'google.cloud.location.Locations' => [ + 'GetLocation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListLocations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*}/locations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + 'google.cloud.visionai.v1.Warehouse' => [ + 'AddCollectionItem' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{item.collection=projects/*/locations/*/corpora/*/collections/*}:addCollectionItem', + 'body' => '*', + 'placeholders' => [ + 'item.collection' => [ + 'getters' => [ + 'getItem', + 'getCollection', + ], + ], + ], + ], + 'AnalyzeAsset' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*}:analyze', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'AnalyzeCorpus' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*}:analyze', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ClipAsset' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*}:clip', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateAnnotation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*/assets/*}/annotations', + 'body' => 'annotation', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateAsset' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/assets', + 'body' => 'asset', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateCollection' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/collections', + 'body' => 'collection', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateCorpus' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/corpora', + 'body' => 'corpus', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateDataSchema' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/dataSchemas', + 'body' => 'data_schema', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateIndex' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/indexes', + 'body' => 'index', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateIndexEndpoint' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/indexEndpoints', + 'body' => 'index_endpoint', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSearchConfig' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/searchConfigs', + 'body' => 'search_config', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'search_config_id', + ], + ], + 'CreateSearchHypernym' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/searchHypernyms', + 'body' => 'search_hypernym', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteAnnotation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*/annotations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteAsset' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCollection' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/collections/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteCorpus' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteDataSchema' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/dataSchemas/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteIndex' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/indexes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteIndexEndpoint' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSearchConfig' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/searchConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSearchHypernym' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/searchHypernyms/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeployIndex' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:deployIndex', + 'body' => '*', + 'placeholders' => [ + 'index_endpoint' => [ + 'getters' => [ + 'getIndexEndpoint', + ], + ], + ], + ], + 'GenerateHlsUri' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*}:generateHlsUri', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GenerateRetrievalUrl' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*}:generateRetrievalUrl', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAnnotation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*/annotations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetAsset' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCollection' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/collections/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCorpus' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetDataSchema' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/dataSchemas/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIndex' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/indexes/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetIndexEndpoint' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSearchConfig' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/searchConfigs/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSearchHypernym' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/searchHypernyms/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ImportAssets' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/assets:import', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'IndexAsset' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*}:index', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAnnotations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*/assets/*}/annotations', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListAssets' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/assets', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListCollections' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/collections', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListCorpora' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/corpora', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListDataSchemas' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/dataSchemas', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListIndexEndpoints' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/indexEndpoints', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListIndexes' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/indexes', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSearchConfigs' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/searchConfigs', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSearchHypernyms' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/searchHypernyms', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'RemoveCollectionItem' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{item.collection=projects/*/locations/*/corpora/*/collections/*}:removeCollectionItem', + 'body' => '*', + 'placeholders' => [ + 'item.collection' => [ + 'getters' => [ + 'getItem', + 'getCollection', + ], + ], + ], + ], + 'RemoveIndexAsset' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*}:removeIndex', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'SearchAssets' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{corpus=projects/*/locations/*/corpora/*}:searchAssets', + 'body' => '*', + 'placeholders' => [ + 'corpus' => [ + 'getters' => [ + 'getCorpus', + ], + ], + ], + ], + 'SearchIndexEndpoint' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:searchIndexEndpoint', + 'body' => '*', + 'placeholders' => [ + 'index_endpoint' => [ + 'getters' => [ + 'getIndexEndpoint', + ], + ], + ], + ], + 'UndeployIndex' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:undeployIndex', + 'body' => '*', + 'placeholders' => [ + 'index_endpoint' => [ + 'getters' => [ + 'getIndexEndpoint', + ], + ], + ], + ], + 'UpdateAnnotation' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{annotation.name=projects/*/locations/*/corpora/*/assets/*/annotations/*}', + 'body' => 'annotation', + 'placeholders' => [ + 'annotation.name' => [ + 'getters' => [ + 'getAnnotation', + 'getName', + ], + ], + ], + ], + 'UpdateAsset' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{asset.name=projects/*/locations/*/corpora/*/assets/*}', + 'body' => 'asset', + 'placeholders' => [ + 'asset.name' => [ + 'getters' => [ + 'getAsset', + 'getName', + ], + ], + ], + ], + 'UpdateCollection' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{collection.name=projects/*/locations/*/corpora/*/collections/*}', + 'body' => 'collection', + 'placeholders' => [ + 'collection.name' => [ + 'getters' => [ + 'getCollection', + 'getName', + ], + ], + ], + ], + 'UpdateCorpus' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{corpus.name=projects/*/locations/*/corpora/*}', + 'body' => 'corpus', + 'placeholders' => [ + 'corpus.name' => [ + 'getters' => [ + 'getCorpus', + 'getName', + ], + ], + ], + ], + 'UpdateDataSchema' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{data_schema.name=projects/*/locations/*/corpora/*/dataSchemas/*}', + 'body' => 'data_schema', + 'placeholders' => [ + 'data_schema.name' => [ + 'getters' => [ + 'getDataSchema', + 'getName', + ], + ], + ], + ], + 'UpdateIndex' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{index.name=projects/*/locations/*/corpora/*/indexes/*}', + 'body' => 'index', + 'placeholders' => [ + 'index.name' => [ + 'getters' => [ + 'getIndex', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateIndexEndpoint' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{index_endpoint.name=projects/*/locations/*/indexEndpoints/*}', + 'body' => 'index_endpoint', + 'placeholders' => [ + 'index_endpoint.name' => [ + 'getters' => [ + 'getIndexEndpoint', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateSearchConfig' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{search_config.name=projects/*/locations/*/corpora/*/searchConfigs/*}', + 'body' => 'search_config', + 'placeholders' => [ + 'search_config.name' => [ + 'getters' => [ + 'getSearchConfig', + 'getName', + ], + ], + ], + ], + 'UpdateSearchHypernym' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{search_hypernym.name=projects/*/locations/*/corpora/*/searchHypernyms/*}', + 'body' => 'search_hypernym', + 'placeholders' => [ + 'search_hypernym.name' => [ + 'getters' => [ + 'getSearchHypernym', + 'getName', + ], + ], + ], + ], + 'UploadAsset' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*}:upload', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ViewCollectionItems' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{collection=projects/*/locations/*/corpora/*/collections/*}:viewCollectionItems', + 'placeholders' => [ + 'collection' => [ + 'getters' => [ + 'getCollection', + ], + ], + ], + ], + 'ViewIndexedAssets' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{index=projects/*/locations/*/corpora/*/indexes/*}:viewAssets', + 'placeholders' => [ + 'index' => [ + 'getters' => [ + 'getIndex', + ], + ], + ], + ], + ], + 'google.longrunning.Operations' => [ + 'CancelOperation' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteOperation' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetOperation' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/warehouseOperations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/collections/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/imageIndexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/indexes/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/operations/*}', + ], + [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListOperations' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/AppPlatformClientTest.php b/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/AppPlatformClientTest.php new file mode 100644 index 000000000000..73c36aa7f5bf --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/AppPlatformClientTest.php @@ -0,0 +1,3108 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return AppPlatformClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new AppPlatformClient($options); + } + + /** @test */ + public function addApplicationStreamInputTest() + { + $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/addApplicationStreamInputTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AddApplicationStreamInputResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/addApplicationStreamInputTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new AddApplicationStreamInputRequest()) + ->setName($formattedName); + $response = $gapicClient->addApplicationStreamInput($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/AddApplicationStreamInput', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addApplicationStreamInputTest'); + $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 addApplicationStreamInputExceptionTest() + { + $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/addApplicationStreamInputTest'); + $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new AddApplicationStreamInputRequest()) + ->setName($formattedName); + $response = $gapicClient->addApplicationStreamInput($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addApplicationStreamInputTest'); + 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 createApplicationTest() + { + $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/createApplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Application(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createApplicationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $applicationId = 'applicationId-1287148950'; + $application = new Application(); + $applicationDisplayName = 'applicationDisplayName-1104148739'; + $application->setDisplayName($applicationDisplayName); + $request = (new CreateApplicationRequest()) + ->setParent($formattedParent) + ->setApplicationId($applicationId) + ->setApplication($application); + $response = $gapicClient->createApplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/CreateApplication', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getApplicationId(); + $this->assertProtobufEquals($applicationId, $actualValue); + $actualValue = $actualApiRequestObject->getApplication(); + $this->assertProtobufEquals($application, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createApplicationTest'); + $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 createApplicationExceptionTest() + { + $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/createApplicationTest'); + $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->locationName('[PROJECT]', '[LOCATION]'); + $applicationId = 'applicationId-1287148950'; + $application = new Application(); + $applicationDisplayName = 'applicationDisplayName-1104148739'; + $application->setDisplayName($applicationDisplayName); + $request = (new CreateApplicationRequest()) + ->setParent($formattedParent) + ->setApplicationId($applicationId) + ->setApplication($application); + $response = $gapicClient->createApplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createApplicationTest'); + 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 createApplicationInstancesTest() + { + $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/createApplicationInstancesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new CreateApplicationInstancesResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createApplicationInstancesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $applicationInstances = []; + $request = (new CreateApplicationInstancesRequest()) + ->setName($formattedName) + ->setApplicationInstances($applicationInstances); + $response = $gapicClient->createApplicationInstances($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/CreateApplicationInstances', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getApplicationInstances(); + $this->assertProtobufEquals($applicationInstances, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createApplicationInstancesTest'); + $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 createApplicationInstancesExceptionTest() + { + $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/createApplicationInstancesTest'); + $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $applicationInstances = []; + $request = (new CreateApplicationInstancesRequest()) + ->setName($formattedName) + ->setApplicationInstances($applicationInstances); + $response = $gapicClient->createApplicationInstances($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createApplicationInstancesTest'); + 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 createDraftTest() + { + $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/createDraftTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Draft(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createDraftTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $draftId = 'draftId-841643911'; + $draft = new Draft(); + $draftDisplayName = 'draftDisplayName67266060'; + $draft->setDisplayName($draftDisplayName); + $request = (new CreateDraftRequest()) + ->setParent($formattedParent) + ->setDraftId($draftId) + ->setDraft($draft); + $response = $gapicClient->createDraft($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/CreateDraft', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getDraftId(); + $this->assertProtobufEquals($draftId, $actualValue); + $actualValue = $actualApiRequestObject->getDraft(); + $this->assertProtobufEquals($draft, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDraftTest'); + $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 createDraftExceptionTest() + { + $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/createDraftTest'); + $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $draftId = 'draftId-841643911'; + $draft = new Draft(); + $draftDisplayName = 'draftDisplayName67266060'; + $draft->setDisplayName($draftDisplayName); + $request = (new CreateDraftRequest()) + ->setParent($formattedParent) + ->setDraftId($draftId) + ->setDraft($draft); + $response = $gapicClient->createDraft($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createDraftTest'); + 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 createProcessorTest() + { + $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/createProcessorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $configurationTypeurl = 'configurationTypeurl1710815660'; + $supportsPostProcessing = false; + $expectedResponse = new Processor(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setConfigurationTypeurl($configurationTypeurl); + $expectedResponse->setSupportsPostProcessing($supportsPostProcessing); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createProcessorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $processorId = 'processorId2008089576'; + $processor = new Processor(); + $processorDisplayName = 'processorDisplayName-841022853'; + $processor->setDisplayName($processorDisplayName); + $request = (new CreateProcessorRequest()) + ->setParent($formattedParent) + ->setProcessorId($processorId) + ->setProcessor($processor); + $response = $gapicClient->createProcessor($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/CreateProcessor', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getProcessorId(); + $this->assertProtobufEquals($processorId, $actualValue); + $actualValue = $actualApiRequestObject->getProcessor(); + $this->assertProtobufEquals($processor, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createProcessorTest'); + $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 createProcessorExceptionTest() + { + $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/createProcessorTest'); + $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->locationName('[PROJECT]', '[LOCATION]'); + $processorId = 'processorId2008089576'; + $processor = new Processor(); + $processorDisplayName = 'processorDisplayName-841022853'; + $processor->setDisplayName($processorDisplayName); + $request = (new CreateProcessorRequest()) + ->setParent($formattedParent) + ->setProcessorId($processorId) + ->setProcessor($processor); + $response = $gapicClient->createProcessor($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createProcessorTest'); + 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 deleteApplicationTest() + { + $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/deleteApplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteApplicationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new DeleteApplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteApplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/DeleteApplication', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteApplicationTest'); + $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 deleteApplicationExceptionTest() + { + $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/deleteApplicationTest'); + $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new DeleteApplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteApplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteApplicationTest'); + 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 deleteApplicationInstancesTest() + { + $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/deleteApplicationInstancesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteApplicationInstancesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $formattedInstanceIds = [ + $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[APPLICATION]', '[INSTANCE]'), + ]; + $request = (new DeleteApplicationInstancesRequest()) + ->setName($formattedName) + ->setInstanceIds($formattedInstanceIds); + $response = $gapicClient->deleteApplicationInstances($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/DeleteApplicationInstances', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualApiRequestObject->getInstanceIds(); + $this->assertProtobufEquals($formattedInstanceIds, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteApplicationInstancesTest'); + $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 deleteApplicationInstancesExceptionTest() + { + $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/deleteApplicationInstancesTest'); + $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $formattedInstanceIds = [ + $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[APPLICATION]', '[INSTANCE]'), + ]; + $request = (new DeleteApplicationInstancesRequest()) + ->setName($formattedName) + ->setInstanceIds($formattedInstanceIds); + $response = $gapicClient->deleteApplicationInstances($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteApplicationInstancesTest'); + 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 deleteDraftTest() + { + $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/deleteDraftTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteDraftTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->draftName('[PROJECT]', '[LOCATION]', '[APPLICATION]', '[DRAFT]'); + $request = (new DeleteDraftRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDraft($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/DeleteDraft', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDraftTest'); + $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 deleteDraftExceptionTest() + { + $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/deleteDraftTest'); + $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->draftName('[PROJECT]', '[LOCATION]', '[APPLICATION]', '[DRAFT]'); + $request = (new DeleteDraftRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteDraft($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteDraftTest'); + 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 deleteProcessorTest() + { + $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/deleteProcessorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteProcessorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $request = (new DeleteProcessorRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteProcessor($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/DeleteProcessor', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteProcessorTest'); + $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 deleteProcessorExceptionTest() + { + $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/deleteProcessorTest'); + $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->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $request = (new DeleteProcessorRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteProcessor($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteProcessorTest'); + 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 deployApplicationTest() + { + $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/deployApplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new DeployApplicationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deployApplicationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new DeployApplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->deployApplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/DeployApplication', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deployApplicationTest'); + $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 deployApplicationExceptionTest() + { + $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/deployApplicationTest'); + $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new DeployApplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->deployApplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deployApplicationTest'); + 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 getApplicationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Application(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new GetApplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->getApplication($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/GetApplication', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getApplicationExceptionTest() + { + $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new GetApplicationRequest()) + ->setName($formattedName); + try { + $gapicClient->getApplication($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 getDraftTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Draft(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->draftName('[PROJECT]', '[LOCATION]', '[APPLICATION]', '[DRAFT]'); + $request = (new GetDraftRequest()) + ->setName($formattedName); + $response = $gapicClient->getDraft($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/GetDraft', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDraftExceptionTest() + { + $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->draftName('[PROJECT]', '[LOCATION]', '[APPLICATION]', '[DRAFT]'); + $request = (new GetDraftRequest()) + ->setName($formattedName); + try { + $gapicClient->getDraft($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'; + $description = 'description-1724546052'; + $expectedResponse = new Instance(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[APPLICATION]', '[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.cloud.visionai.v1.AppPlatform/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]', '[LOCATION]', '[APPLICATION]', '[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 getProcessorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $configurationTypeurl = 'configurationTypeurl1710815660'; + $supportsPostProcessing = false; + $expectedResponse = new Processor(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setConfigurationTypeurl($configurationTypeurl); + $expectedResponse->setSupportsPostProcessing($supportsPostProcessing); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $request = (new GetProcessorRequest()) + ->setName($formattedName); + $response = $gapicClient->getProcessor($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/GetProcessor', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProcessorExceptionTest() + { + $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->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); + $request = (new GetProcessorRequest()) + ->setName($formattedName); + try { + $gapicClient->getProcessor($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 listApplicationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $applicationsElement = new Application(); + $applications = [ + $applicationsElement, + ]; + $expectedResponse = new ListApplicationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setApplications($applications); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListApplicationsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listApplications($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getApplications()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/ListApplications', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listApplicationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListApplicationsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listApplications($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 listDraftsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $draftsElement = new Draft(); + $drafts = [ + $draftsElement, + ]; + $expectedResponse = new ListDraftsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDrafts($drafts); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new ListDraftsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDrafts($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDrafts()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/ListDrafts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDraftsExceptionTest() + { + $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new ListDraftsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDrafts($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 = ''; + $instancesElement = new Instance(); + $instances = [ + $instancesElement, + ]; + $expectedResponse = new ListInstancesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setInstances($instances); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new ListInstancesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listInstances($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $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 listPrebuiltProcessorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ListPrebuiltProcessorsResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPrebuiltProcessorsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPrebuiltProcessors($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/ListPrebuiltProcessors', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPrebuiltProcessorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPrebuiltProcessorsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPrebuiltProcessors($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 listProcessorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $processorsElement = new Processor(); + $processors = [ + $processorsElement, + ]; + $expectedResponse = new ListProcessorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProcessors($processors); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListProcessorsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listProcessors($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProcessors()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/ListProcessors', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProcessorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListProcessorsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listProcessors($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 removeApplicationStreamInputTest() + { + $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/removeApplicationStreamInputTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new RemoveApplicationStreamInputResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/removeApplicationStreamInputTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new RemoveApplicationStreamInputRequest()) + ->setName($formattedName); + $response = $gapicClient->removeApplicationStreamInput($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/RemoveApplicationStreamInput', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/removeApplicationStreamInputTest'); + $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 removeApplicationStreamInputExceptionTest() + { + $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/removeApplicationStreamInputTest'); + $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new RemoveApplicationStreamInputRequest()) + ->setName($formattedName); + $response = $gapicClient->removeApplicationStreamInput($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/removeApplicationStreamInputTest'); + 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 undeployApplicationTest() + { + $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/undeployApplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new UndeployApplicationResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/undeployApplicationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new UndeployApplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->undeployApplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/UndeployApplication', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeployApplicationTest'); + $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 undeployApplicationExceptionTest() + { + $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/undeployApplicationTest'); + $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new UndeployApplicationRequest()) + ->setName($formattedName); + $response = $gapicClient->undeployApplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeployApplicationTest'); + 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 updateApplicationTest() + { + $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/updateApplicationTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Application(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateApplicationTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $application = new Application(); + $applicationDisplayName = 'applicationDisplayName-1104148739'; + $application->setDisplayName($applicationDisplayName); + $request = (new UpdateApplicationRequest()) + ->setApplication($application); + $response = $gapicClient->updateApplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/UpdateApplication', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getApplication(); + $this->assertProtobufEquals($application, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateApplicationTest'); + $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 updateApplicationExceptionTest() + { + $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/updateApplicationTest'); + $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 + $application = new Application(); + $applicationDisplayName = 'applicationDisplayName-1104148739'; + $application->setDisplayName($applicationDisplayName); + $request = (new UpdateApplicationRequest()) + ->setApplication($application); + $response = $gapicClient->updateApplication($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateApplicationTest'); + 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 updateApplicationInstancesTest() + { + $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/updateApplicationInstancesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new UpdateApplicationInstancesResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateApplicationInstancesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new UpdateApplicationInstancesRequest()) + ->setName($formattedName); + $response = $gapicClient->updateApplicationInstances($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/UpdateApplicationInstances', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateApplicationInstancesTest'); + $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 updateApplicationInstancesExceptionTest() + { + $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/updateApplicationInstancesTest'); + $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new UpdateApplicationInstancesRequest()) + ->setName($formattedName); + $response = $gapicClient->updateApplicationInstances($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateApplicationInstancesTest'); + 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 updateApplicationStreamInputTest() + { + $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/updateApplicationStreamInputTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new UpdateApplicationStreamInputResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateApplicationStreamInputTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new UpdateApplicationStreamInputRequest()) + ->setName($formattedName); + $response = $gapicClient->updateApplicationStreamInput($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/UpdateApplicationStreamInput', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateApplicationStreamInputTest'); + $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 updateApplicationStreamInputExceptionTest() + { + $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/updateApplicationStreamInputTest'); + $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new UpdateApplicationStreamInputRequest()) + ->setName($formattedName); + $response = $gapicClient->updateApplicationStreamInput($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateApplicationStreamInputTest'); + 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 updateDraftTest() + { + $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/updateDraftTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Draft(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateDraftTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $draft = new Draft(); + $draftDisplayName = 'draftDisplayName67266060'; + $draft->setDisplayName($draftDisplayName); + $request = (new UpdateDraftRequest()) + ->setDraft($draft); + $response = $gapicClient->updateDraft($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/UpdateDraft', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getDraft(); + $this->assertProtobufEquals($draft, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDraftTest'); + $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 updateDraftExceptionTest() + { + $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/updateDraftTest'); + $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 + $draft = new Draft(); + $draftDisplayName = 'draftDisplayName67266060'; + $draft->setDisplayName($draftDisplayName); + $request = (new UpdateDraftRequest()) + ->setDraft($draft); + $response = $gapicClient->updateDraft($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateDraftTest'); + 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 updateProcessorTest() + { + $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/updateProcessorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $configurationTypeurl = 'configurationTypeurl1710815660'; + $supportsPostProcessing = false; + $expectedResponse = new Processor(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setConfigurationTypeurl($configurationTypeurl); + $expectedResponse->setSupportsPostProcessing($supportsPostProcessing); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateProcessorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $processor = new Processor(); + $processorDisplayName = 'processorDisplayName-841022853'; + $processor->setDisplayName($processorDisplayName); + $request = (new UpdateProcessorRequest()) + ->setProcessor($processor); + $response = $gapicClient->updateProcessor($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/UpdateProcessor', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getProcessor(); + $this->assertProtobufEquals($processor, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateProcessorTest'); + $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 updateProcessorExceptionTest() + { + $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/updateProcessorTest'); + $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 + $processor = new Processor(); + $processorDisplayName = 'processorDisplayName-841022853'; + $processor->setDisplayName($processorDisplayName); + $request = (new UpdateProcessorRequest()) + ->setProcessor($processor); + $response = $gapicClient->updateProcessor($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateProcessorTest'); + 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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($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 addApplicationStreamInputAsyncTest() + { + $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/addApplicationStreamInputTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AddApplicationStreamInputResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/addApplicationStreamInputTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); + $request = (new AddApplicationStreamInputRequest()) + ->setName($formattedName); + $response = $gapicClient->addApplicationStreamInputAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.AppPlatform/AddApplicationStreamInput', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/addApplicationStreamInputTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/HealthCheckServiceClientTest.php b/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/HealthCheckServiceClientTest.php new file mode 100644 index 000000000000..0d9884c7c31c --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/HealthCheckServiceClientTest.php @@ -0,0 +1,274 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return HealthCheckServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new HealthCheckServiceClient($options); + } + + /** @test */ + public function healthCheckTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $healthy = false; + $reason = 'reason-934964668'; + $expectedResponse = new HealthCheckResponse(); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setReason($reason); + $transport->addResponse($expectedResponse); + $request = new HealthCheckRequest(); + $response = $gapicClient->healthCheck($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.HealthCheckService/HealthCheck', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function healthCheckExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new HealthCheckRequest(); + try { + $gapicClient->healthCheck($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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($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 healthCheckAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $healthy = false; + $reason = 'reason-934964668'; + $expectedResponse = new HealthCheckResponse(); + $expectedResponse->setHealthy($healthy); + $expectedResponse->setReason($reason); + $transport->addResponse($expectedResponse); + $request = new HealthCheckRequest(); + $response = $gapicClient->healthCheckAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.HealthCheckService/HealthCheck', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/LiveVideoAnalyticsClientTest.php b/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/LiveVideoAnalyticsClientTest.php new file mode 100644 index 000000000000..db47981fd6c9 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/LiveVideoAnalyticsClientTest.php @@ -0,0 +1,2167 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return LiveVideoAnalyticsClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new LiveVideoAnalyticsClient($options); + } + + /** @test */ + public function batchRunProcessTest() + { + $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/batchRunProcessTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $batchId2 = 'batchId2-268397581'; + $expectedResponse = new BatchRunProcessResponse(); + $expectedResponse->setBatchId($batchId2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchRunProcessTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $requests = []; + $request = (new BatchRunProcessRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + $response = $gapicClient->batchRunProcess($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/BatchRunProcess', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchRunProcessTest'); + $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 batchRunProcessExceptionTest() + { + $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/batchRunProcessTest'); + $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]', '[LOCATION]', '[CLUSTER]'); + $requests = []; + $request = (new BatchRunProcessRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + $response = $gapicClient->batchRunProcess($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchRunProcessTest'); + 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 createAnalysisTest() + { + $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/createAnalysisTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $disableEventWatch = false; + $expectedResponse = new Analysis(); + $expectedResponse->setName($name); + $expectedResponse->setDisableEventWatch($disableEventWatch); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createAnalysisTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $analysisId = 'analysisId774898014'; + $analysis = new Analysis(); + $request = (new CreateAnalysisRequest()) + ->setParent($formattedParent) + ->setAnalysisId($analysisId) + ->setAnalysis($analysis); + $response = $gapicClient->createAnalysis($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/CreateAnalysis', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getAnalysisId(); + $this->assertProtobufEquals($analysisId, $actualValue); + $actualValue = $actualApiRequestObject->getAnalysis(); + $this->assertProtobufEquals($analysis, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAnalysisTest'); + $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 createAnalysisExceptionTest() + { + $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/createAnalysisTest'); + $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]', '[LOCATION]', '[CLUSTER]'); + $analysisId = 'analysisId774898014'; + $analysis = new Analysis(); + $request = (new CreateAnalysisRequest()) + ->setParent($formattedParent) + ->setAnalysisId($analysisId) + ->setAnalysis($analysis); + $response = $gapicClient->createAnalysis($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createAnalysisTest'); + 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 createOperatorTest() + { + $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/createOperatorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $dockerImage = 'dockerImage872637052'; + $expectedResponse = new Operator(); + $expectedResponse->setName($name); + $expectedResponse->setDockerImage($dockerImage); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createOperatorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $operatorId = 'operatorId135321238'; + $operator = new Operator(); + $request = (new CreateOperatorRequest()) + ->setParent($formattedParent) + ->setOperatorId($operatorId) + ->setOperator($operator); + $response = $gapicClient->createOperator($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/CreateOperator', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getOperatorId(); + $this->assertProtobufEquals($operatorId, $actualValue); + $actualValue = $actualApiRequestObject->getOperator(); + $this->assertProtobufEquals($operator, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createOperatorTest'); + $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 createOperatorExceptionTest() + { + $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/createOperatorTest'); + $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->locationName('[PROJECT]', '[LOCATION]'); + $operatorId = 'operatorId135321238'; + $operator = new Operator(); + $request = (new CreateOperatorRequest()) + ->setParent($formattedParent) + ->setOperatorId($operatorId) + ->setOperator($operator); + $response = $gapicClient->createOperator($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createOperatorTest'); + 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 createProcessTest() + { + $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/createProcessTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $analysis = 'analysis-1024445732'; + $eventId = 'eventId278118624'; + $batchId = 'batchId-1694132160'; + $retryCount = 928040776; + $expectedResponse = new Process(); + $expectedResponse->setName($name); + $expectedResponse->setAnalysis($analysis); + $expectedResponse->setEventId($eventId); + $expectedResponse->setBatchId($batchId); + $expectedResponse->setRetryCount($retryCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createProcessTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $processId = 'processId422185195'; + $process = new Process(); + $processAnalysis = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[ANALYSIS]'); + $process->setAnalysis($processAnalysis); + $request = (new CreateProcessRequest()) + ->setParent($formattedParent) + ->setProcessId($processId) + ->setProcess($process); + $response = $gapicClient->createProcess($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/CreateProcess', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getProcessId(); + $this->assertProtobufEquals($processId, $actualValue); + $actualValue = $actualApiRequestObject->getProcess(); + $this->assertProtobufEquals($process, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createProcessTest'); + $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 createProcessExceptionTest() + { + $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/createProcessTest'); + $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]', '[LOCATION]', '[CLUSTER]'); + $processId = 'processId422185195'; + $process = new Process(); + $processAnalysis = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[ANALYSIS]'); + $process->setAnalysis($processAnalysis); + $request = (new CreateProcessRequest()) + ->setParent($formattedParent) + ->setProcessId($processId) + ->setProcess($process); + $response = $gapicClient->createProcess($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createProcessTest'); + 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 deleteAnalysisTest() + { + $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/deleteAnalysisTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAnalysisTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[ANALYSIS]'); + $request = (new DeleteAnalysisRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAnalysis($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/DeleteAnalysis', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAnalysisTest'); + $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 deleteAnalysisExceptionTest() + { + $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/deleteAnalysisTest'); + $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->analysisName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[ANALYSIS]'); + $request = (new DeleteAnalysisRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAnalysis($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAnalysisTest'); + 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 deleteOperatorTest() + { + $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/deleteOperatorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteOperatorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->operatorName('[PROJECT]', '[LOCATION]', '[OPERATOR]'); + $request = (new DeleteOperatorRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteOperator($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/DeleteOperator', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteOperatorTest'); + $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 deleteOperatorExceptionTest() + { + $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/deleteOperatorTest'); + $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->operatorName('[PROJECT]', '[LOCATION]', '[OPERATOR]'); + $request = (new DeleteOperatorRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteOperator($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteOperatorTest'); + 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 deleteProcessTest() + { + $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/deleteProcessTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteProcessTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->processName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[PROCESS]'); + $request = (new DeleteProcessRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteProcess($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/DeleteProcess', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteProcessTest'); + $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 deleteProcessExceptionTest() + { + $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/deleteProcessTest'); + $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->processName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[PROCESS]'); + $request = (new DeleteProcessRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteProcess($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteProcessTest'); + 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 getAnalysisTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $disableEventWatch = false; + $expectedResponse = new Analysis(); + $expectedResponse->setName($name2); + $expectedResponse->setDisableEventWatch($disableEventWatch); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[ANALYSIS]'); + $request = (new GetAnalysisRequest()) + ->setName($formattedName); + $response = $gapicClient->getAnalysis($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/GetAnalysis', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAnalysisExceptionTest() + { + $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->analysisName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[ANALYSIS]'); + $request = (new GetAnalysisRequest()) + ->setName($formattedName); + try { + $gapicClient->getAnalysis($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 getOperatorTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $dockerImage = 'dockerImage872637052'; + $expectedResponse = new Operator(); + $expectedResponse->setName($name2); + $expectedResponse->setDockerImage($dockerImage); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->operatorName('[PROJECT]', '[LOCATION]', '[OPERATOR]'); + $request = (new GetOperatorRequest()) + ->setName($formattedName); + $response = $gapicClient->getOperator($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/GetOperator', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getOperatorExceptionTest() + { + $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->operatorName('[PROJECT]', '[LOCATION]', '[OPERATOR]'); + $request = (new GetOperatorRequest()) + ->setName($formattedName); + try { + $gapicClient->getOperator($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 getProcessTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $analysis = 'analysis-1024445732'; + $eventId = 'eventId278118624'; + $batchId = 'batchId-1694132160'; + $retryCount = 928040776; + $expectedResponse = new Process(); + $expectedResponse->setName($name2); + $expectedResponse->setAnalysis($analysis); + $expectedResponse->setEventId($eventId); + $expectedResponse->setBatchId($batchId); + $expectedResponse->setRetryCount($retryCount); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->processName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[PROCESS]'); + $request = (new GetProcessRequest()) + ->setName($formattedName); + $response = $gapicClient->getProcess($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/GetProcess', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getProcessExceptionTest() + { + $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->processName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[PROCESS]'); + $request = (new GetProcessRequest()) + ->setName($formattedName); + try { + $gapicClient->getProcess($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 listAnalysesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $analysesElement = new Analysis(); + $analyses = [ + $analysesElement, + ]; + $expectedResponse = new ListAnalysesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAnalyses($analyses); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new ListAnalysesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAnalyses($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAnalyses()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/ListAnalyses', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAnalysesExceptionTest() + { + $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]', '[LOCATION]', '[CLUSTER]'); + $request = (new ListAnalysesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAnalyses($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 listOperatorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $operatorsElement = new Operator(); + $operators = [ + $operatorsElement, + ]; + $expectedResponse = new ListOperatorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setOperators($operators); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListOperatorsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listOperators($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getOperators()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/ListOperators', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listOperatorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListOperatorsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listOperators($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 listProcessesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $processesElement = new Process(); + $processes = [ + $processesElement, + ]; + $expectedResponse = new ListProcessesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setProcesses($processes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new ListProcessesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listProcesses($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getProcesses()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/ListProcesses', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listProcessesExceptionTest() + { + $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]', '[LOCATION]', '[CLUSTER]'); + $request = (new ListProcessesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listProcesses($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 listPublicOperatorsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $operatorsElement = new Operator(); + $operators = [ + $operatorsElement, + ]; + $expectedResponse = new ListPublicOperatorsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setOperators($operators); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPublicOperatorsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listPublicOperators($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getOperators()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/ListPublicOperators', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listPublicOperatorsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListPublicOperatorsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listPublicOperators($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 resolveOperatorInfoTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ResolveOperatorInfoResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $queries = []; + $request = (new ResolveOperatorInfoRequest()) + ->setParent($formattedParent) + ->setQueries($queries); + $response = $gapicClient->resolveOperatorInfo($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/ResolveOperatorInfo', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getQueries(); + $this->assertProtobufEquals($queries, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function resolveOperatorInfoExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $queries = []; + $request = (new ResolveOperatorInfoRequest()) + ->setParent($formattedParent) + ->setQueries($queries); + try { + $gapicClient->resolveOperatorInfo($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 updateAnalysisTest() + { + $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/updateAnalysisTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $disableEventWatch = false; + $expectedResponse = new Analysis(); + $expectedResponse->setName($name); + $expectedResponse->setDisableEventWatch($disableEventWatch); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateAnalysisTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $analysis = new Analysis(); + $request = (new UpdateAnalysisRequest()) + ->setUpdateMask($updateMask) + ->setAnalysis($analysis); + $response = $gapicClient->updateAnalysis($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/UpdateAnalysis', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getAnalysis(); + $this->assertProtobufEquals($analysis, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAnalysisTest'); + $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 updateAnalysisExceptionTest() + { + $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/updateAnalysisTest'); + $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 + $updateMask = new FieldMask(); + $analysis = new Analysis(); + $request = (new UpdateAnalysisRequest()) + ->setUpdateMask($updateMask) + ->setAnalysis($analysis); + $response = $gapicClient->updateAnalysis($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateAnalysisTest'); + 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 updateOperatorTest() + { + $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/updateOperatorTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $dockerImage = 'dockerImage872637052'; + $expectedResponse = new Operator(); + $expectedResponse->setName($name); + $expectedResponse->setDockerImage($dockerImage); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateOperatorTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $operator = new Operator(); + $request = (new UpdateOperatorRequest()) + ->setUpdateMask($updateMask) + ->setOperator($operator); + $response = $gapicClient->updateOperator($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/UpdateOperator', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getOperator(); + $this->assertProtobufEquals($operator, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateOperatorTest'); + $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 updateOperatorExceptionTest() + { + $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/updateOperatorTest'); + $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 + $updateMask = new FieldMask(); + $operator = new Operator(); + $request = (new UpdateOperatorRequest()) + ->setUpdateMask($updateMask) + ->setOperator($operator); + $response = $gapicClient->updateOperator($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateOperatorTest'); + 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 updateProcessTest() + { + $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/updateProcessTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $analysis = 'analysis-1024445732'; + $eventId = 'eventId278118624'; + $batchId = 'batchId-1694132160'; + $retryCount = 928040776; + $expectedResponse = new Process(); + $expectedResponse->setName($name); + $expectedResponse->setAnalysis($analysis); + $expectedResponse->setEventId($eventId); + $expectedResponse->setBatchId($batchId); + $expectedResponse->setRetryCount($retryCount); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateProcessTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $process = new Process(); + $processAnalysis = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[ANALYSIS]'); + $process->setAnalysis($processAnalysis); + $request = (new UpdateProcessRequest()) + ->setUpdateMask($updateMask) + ->setProcess($process); + $response = $gapicClient->updateProcess($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/UpdateProcess', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getProcess(); + $this->assertProtobufEquals($process, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateProcessTest'); + $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 updateProcessExceptionTest() + { + $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/updateProcessTest'); + $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 + $updateMask = new FieldMask(); + $process = new Process(); + $processAnalysis = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[ANALYSIS]'); + $process->setAnalysis($processAnalysis); + $request = (new UpdateProcessRequest()) + ->setUpdateMask($updateMask) + ->setProcess($process); + $response = $gapicClient->updateProcess($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateProcessTest'); + 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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($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 batchRunProcessAsyncTest() + { + $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/batchRunProcessTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $batchId2 = 'batchId2-268397581'; + $expectedResponse = new BatchRunProcessResponse(); + $expectedResponse->setBatchId($batchId2); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/batchRunProcessTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $requests = []; + $request = (new BatchRunProcessRequest()) + ->setParent($formattedParent) + ->setRequests($requests); + $response = $gapicClient->batchRunProcessAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/BatchRunProcess', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getRequests(); + $this->assertProtobufEquals($requests, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/batchRunProcessTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } +} diff --git a/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/StreamingServiceClientTest.php b/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/StreamingServiceClientTest.php new file mode 100644 index 000000000000..a1b3e13e1629 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/StreamingServiceClientTest.php @@ -0,0 +1,666 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return StreamingServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new StreamingServiceClient($options); + } + + /** @test */ + public function acquireLeaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $id = 'id3355'; + $series2 = 'series21367099498'; + $owner2 = 'owner2-1054728794'; + $expectedResponse = new Lease(); + $expectedResponse->setId($id); + $expectedResponse->setSeries($series2); + $expectedResponse->setOwner($owner2); + $transport->addResponse($expectedResponse); + $request = new AcquireLeaseRequest(); + $response = $gapicClient->acquireLease($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamingService/AcquireLease', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function acquireLeaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new AcquireLeaseRequest(); + try { + $gapicClient->acquireLease($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 receiveEventsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ReceiveEventsResponse(); + $transport->addResponse($expectedResponse); + $expectedResponse2 = new ReceiveEventsResponse(); + $transport->addResponse($expectedResponse2); + $expectedResponse3 = new ReceiveEventsResponse(); + $transport->addResponse($expectedResponse3); + // Mock request + $request = new ReceiveEventsRequest(); + $request2 = new ReceiveEventsRequest(); + $request3 = new ReceiveEventsRequest(); + $bidi = $gapicClient->receiveEvents(); + $this->assertInstanceOf(BidiStream::class, $bidi); + $bidi->write($request); + $responses = []; + $responses[] = $bidi->read(); + $bidi->writeAll([ + $request2, + $request3, + ]); + foreach ($bidi->closeWriteAndReadAll() as $response) { + $responses[] = $response; + } + + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $createStreamRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($createStreamRequests)); + $streamFuncCall = $createStreamRequests[0]->getFuncCall(); + $streamRequestObject = $createStreamRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamingService/ReceiveEvents', $streamFuncCall); + $this->assertNull($streamRequestObject); + $callObjects = $transport->popCallObjects(); + $this->assertSame(1, count($callObjects)); + $bidiCall = $callObjects[0]; + $writeRequests = $bidiCall->popReceivedCalls(); + $expectedRequests = []; + $expectedRequests[] = $request; + $expectedRequests[] = $request2; + $expectedRequests[] = $request3; + $this->assertEquals($expectedRequests, $writeRequests); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function receiveEventsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + $bidi = $gapicClient->receiveEvents(); + $results = $bidi->closeWriteAndReadAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function receivePacketsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ReceivePacketsResponse(); + $transport->addResponse($expectedResponse); + $expectedResponse2 = new ReceivePacketsResponse(); + $transport->addResponse($expectedResponse2); + $expectedResponse3 = new ReceivePacketsResponse(); + $transport->addResponse($expectedResponse3); + // Mock request + $request = new ReceivePacketsRequest(); + $request2 = new ReceivePacketsRequest(); + $request3 = new ReceivePacketsRequest(); + $bidi = $gapicClient->receivePackets(); + $this->assertInstanceOf(BidiStream::class, $bidi); + $bidi->write($request); + $responses = []; + $responses[] = $bidi->read(); + $bidi->writeAll([ + $request2, + $request3, + ]); + foreach ($bidi->closeWriteAndReadAll() as $response) { + $responses[] = $response; + } + + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $createStreamRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($createStreamRequests)); + $streamFuncCall = $createStreamRequests[0]->getFuncCall(); + $streamRequestObject = $createStreamRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamingService/ReceivePackets', $streamFuncCall); + $this->assertNull($streamRequestObject); + $callObjects = $transport->popCallObjects(); + $this->assertSame(1, count($callObjects)); + $bidiCall = $callObjects[0]; + $writeRequests = $bidiCall->popReceivedCalls(); + $expectedRequests = []; + $expectedRequests[] = $request; + $expectedRequests[] = $request2; + $expectedRequests[] = $request3; + $this->assertEquals($expectedRequests, $writeRequests); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function receivePacketsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + $bidi = $gapicClient->receivePackets(); + $results = $bidi->closeWriteAndReadAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function releaseLeaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ReleaseLeaseResponse(); + $transport->addResponse($expectedResponse); + $request = new ReleaseLeaseRequest(); + $response = $gapicClient->releaseLease($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamingService/ReleaseLease', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function releaseLeaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ReleaseLeaseRequest(); + try { + $gapicClient->releaseLease($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 renewLeaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $id2 = 'id23227150'; + $series2 = 'series21367099498'; + $owner2 = 'owner2-1054728794'; + $expectedResponse = new Lease(); + $expectedResponse->setId($id2); + $expectedResponse->setSeries($series2); + $expectedResponse->setOwner($owner2); + $transport->addResponse($expectedResponse); + $request = new RenewLeaseRequest(); + $response = $gapicClient->renewLease($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamingService/RenewLease', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function renewLeaseExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new RenewLeaseRequest(); + try { + $gapicClient->renewLease($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 sendPacketsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new SendPacketsResponse(); + $transport->addResponse($expectedResponse); + $expectedResponse2 = new SendPacketsResponse(); + $transport->addResponse($expectedResponse2); + $expectedResponse3 = new SendPacketsResponse(); + $transport->addResponse($expectedResponse3); + // Mock request + $request = new SendPacketsRequest(); + $request2 = new SendPacketsRequest(); + $request3 = new SendPacketsRequest(); + $bidi = $gapicClient->sendPackets(); + $this->assertInstanceOf(BidiStream::class, $bidi); + $bidi->write($request); + $responses = []; + $responses[] = $bidi->read(); + $bidi->writeAll([ + $request2, + $request3, + ]); + foreach ($bidi->closeWriteAndReadAll() as $response) { + $responses[] = $response; + } + + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $createStreamRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($createStreamRequests)); + $streamFuncCall = $createStreamRequests[0]->getFuncCall(); + $streamRequestObject = $createStreamRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamingService/SendPackets', $streamFuncCall); + $this->assertNull($streamRequestObject); + $callObjects = $transport->popCallObjects(); + $this->assertSame(1, count($callObjects)); + $bidiCall = $callObjects[0]; + $writeRequests = $bidiCall->popReceivedCalls(); + $expectedRequests = []; + $expectedRequests[] = $request; + $expectedRequests[] = $request2; + $expectedRequests[] = $request3; + $this->assertEquals($expectedRequests, $writeRequests); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function sendPacketsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + $bidi = $gapicClient->sendPackets(); + $results = $bidi->closeWriteAndReadAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($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 acquireLeaseAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $id = 'id3355'; + $series2 = 'series21367099498'; + $owner2 = 'owner2-1054728794'; + $expectedResponse = new Lease(); + $expectedResponse->setId($id); + $expectedResponse->setSeries($series2); + $expectedResponse->setOwner($owner2); + $transport->addResponse($expectedResponse); + $request = new AcquireLeaseRequest(); + $response = $gapicClient->acquireLeaseAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamingService/AcquireLease', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/StreamsServiceClientTest.php b/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/StreamsServiceClientTest.php new file mode 100644 index 000000000000..060367825a77 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/StreamsServiceClientTest.php @@ -0,0 +1,2786 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return StreamsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new StreamsServiceClient($options); + } + + /** @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'; + $dataplaneServiceEndpoint = 'dataplaneServiceEndpoint-1081162868'; + $pscTarget = 'pscTarget333587440'; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name); + $expectedResponse->setDataplaneServiceEndpoint($dataplaneServiceEndpoint); + $expectedResponse->setPscTarget($pscTarget); + $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->locationName('[PROJECT]', '[LOCATION]'); + $clusterId = 'clusterId240280960'; + $cluster = new Cluster(); + $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.cloud.visionai.v1.StreamsService/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->locationName('[PROJECT]', '[LOCATION]'); + $clusterId = 'clusterId240280960'; + $cluster = new Cluster(); + $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 createEventTest() + { + $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/createEventTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new Event(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createEventTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $eventId = 'eventId278118624'; + $event = new Event(); + $request = (new CreateEventRequest()) + ->setParent($formattedParent) + ->setEventId($eventId) + ->setEvent($event); + $response = $gapicClient->createEvent($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/CreateEvent', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getEventId(); + $this->assertProtobufEquals($eventId, $actualValue); + $actualValue = $actualApiRequestObject->getEvent(); + $this->assertProtobufEquals($event, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEventTest'); + $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 createEventExceptionTest() + { + $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/createEventTest'); + $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]', '[LOCATION]', '[CLUSTER]'); + $eventId = 'eventId278118624'; + $event = new Event(); + $request = (new CreateEventRequest()) + ->setParent($formattedParent) + ->setEventId($eventId) + ->setEvent($event); + $response = $gapicClient->createEvent($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createEventTest'); + 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 createSeriesTest() + { + $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/createSeriesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $stream = 'stream-891990144'; + $event = 'event96891546'; + $expectedResponse = new Series(); + $expectedResponse->setName($name); + $expectedResponse->setStream($stream); + $expectedResponse->setEvent($event); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createSeriesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $seriesId = 'seriesId-569586717'; + $series = new Series(); + $seriesStream = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); + $series->setStream($seriesStream); + $seriesEvent = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); + $series->setEvent($seriesEvent); + $request = (new CreateSeriesRequest()) + ->setParent($formattedParent) + ->setSeriesId($seriesId) + ->setSeries($series); + $response = $gapicClient->createSeries($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/CreateSeries', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getSeriesId(); + $this->assertProtobufEquals($seriesId, $actualValue); + $actualValue = $actualApiRequestObject->getSeries(); + $this->assertProtobufEquals($series, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSeriesTest'); + $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 createSeriesExceptionTest() + { + $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/createSeriesTest'); + $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]', '[LOCATION]', '[CLUSTER]'); + $seriesId = 'seriesId-569586717'; + $series = new Series(); + $seriesStream = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); + $series->setStream($seriesStream); + $seriesEvent = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); + $series->setEvent($seriesEvent); + $request = (new CreateSeriesRequest()) + ->setParent($formattedParent) + ->setSeriesId($seriesId) + ->setSeries($series); + $response = $gapicClient->createSeries($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createSeriesTest'); + 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 createStreamTest() + { + $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/createStreamTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $enableHlsPlayback = false; + $mediaWarehouseAsset = 'mediaWarehouseAsset-234837991'; + $expectedResponse = new Stream(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEnableHlsPlayback($enableHlsPlayback); + $expectedResponse->setMediaWarehouseAsset($mediaWarehouseAsset); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createStreamTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $streamId = 'streamId-315624902'; + $stream = new Stream(); + $request = (new CreateStreamRequest()) + ->setParent($formattedParent) + ->setStreamId($streamId) + ->setStream($stream); + $response = $gapicClient->createStream($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/CreateStream', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getStreamId(); + $this->assertProtobufEquals($streamId, $actualValue); + $actualValue = $actualApiRequestObject->getStream(); + $this->assertProtobufEquals($stream, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createStreamTest'); + $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 createStreamExceptionTest() + { + $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/createStreamTest'); + $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]', '[LOCATION]', '[CLUSTER]'); + $streamId = 'streamId-315624902'; + $stream = new Stream(); + $request = (new CreateStreamRequest()) + ->setParent($formattedParent) + ->setStreamId($streamId) + ->setStream($stream); + $response = $gapicClient->createStream($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createStreamTest'); + 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 deleteClusterTest() + { + $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/deleteClusterTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteClusterTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new DeleteClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/DeleteCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); + $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 deleteClusterExceptionTest() + { + $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/deleteClusterTest'); + $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->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new DeleteClusterRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCluster($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); + 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 deleteEventTest() + { + $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/deleteEventTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteEventTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); + $request = (new DeleteEventRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteEvent($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/DeleteEvent', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteEventTest'); + $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 deleteEventExceptionTest() + { + $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/deleteEventTest'); + $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->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); + $request = (new DeleteEventRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteEvent($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteEventTest'); + 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 deleteSeriesTest() + { + $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/deleteSeriesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteSeriesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->seriesName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[SERIES]'); + $request = (new DeleteSeriesRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSeries($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/DeleteSeries', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSeriesTest'); + $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 deleteSeriesExceptionTest() + { + $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/deleteSeriesTest'); + $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->seriesName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[SERIES]'); + $request = (new DeleteSeriesRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSeries($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteSeriesTest'); + 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 deleteStreamTest() + { + $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/deleteStreamTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteStreamTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); + $request = (new DeleteStreamRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteStream($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/DeleteStream', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteStreamTest'); + $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 deleteStreamExceptionTest() + { + $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/deleteStreamTest'); + $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->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); + $request = (new DeleteStreamRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteStream($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteStreamTest'); + 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 generateStreamHlsTokenTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $token = 'token110541305'; + $expectedResponse = new GenerateStreamHlsTokenResponse(); + $expectedResponse->setToken($token); + $transport->addResponse($expectedResponse); + // Mock request + $stream = 'stream-891990144'; + $request = (new GenerateStreamHlsTokenRequest()) + ->setStream($stream); + $response = $gapicClient->generateStreamHlsToken($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/GenerateStreamHlsToken', $actualFuncCall); + $actualValue = $actualRequestObject->getStream(); + $this->assertProtobufEquals($stream, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateStreamHlsTokenExceptionTest() + { + $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 + $stream = 'stream-891990144'; + $request = (new GenerateStreamHlsTokenRequest()) + ->setStream($stream); + try { + $gapicClient->generateStreamHlsToken($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'; + $dataplaneServiceEndpoint = 'dataplaneServiceEndpoint-1081162868'; + $pscTarget = 'pscTarget333587440'; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name2); + $expectedResponse->setDataplaneServiceEndpoint($dataplaneServiceEndpoint); + $expectedResponse->setPscTarget($pscTarget); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[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.cloud.visionai.v1.StreamsService/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]', '[LOCATION]', '[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 getEventTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Event(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); + $request = (new GetEventRequest()) + ->setName($formattedName); + $response = $gapicClient->getEvent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/GetEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getEventExceptionTest() + { + $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->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); + $request = (new GetEventRequest()) + ->setName($formattedName); + try { + $gapicClient->getEvent($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 getSeriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $stream = 'stream-891990144'; + $event = 'event96891546'; + $expectedResponse = new Series(); + $expectedResponse->setName($name2); + $expectedResponse->setStream($stream); + $expectedResponse->setEvent($event); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->seriesName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[SERIES]'); + $request = (new GetSeriesRequest()) + ->setName($formattedName); + $response = $gapicClient->getSeries($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/GetSeries', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSeriesExceptionTest() + { + $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->seriesName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[SERIES]'); + $request = (new GetSeriesRequest()) + ->setName($formattedName); + try { + $gapicClient->getSeries($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 getStreamTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $enableHlsPlayback = false; + $mediaWarehouseAsset = 'mediaWarehouseAsset-234837991'; + $expectedResponse = new Stream(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEnableHlsPlayback($enableHlsPlayback); + $expectedResponse->setMediaWarehouseAsset($mediaWarehouseAsset); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); + $request = (new GetStreamRequest()) + ->setName($formattedName); + $response = $gapicClient->getStream($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/GetStream', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getStreamExceptionTest() + { + $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->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); + $request = (new GetStreamRequest()) + ->setName($formattedName); + try { + $gapicClient->getStream($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 getStreamThumbnailTest() + { + $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/getStreamThumbnailTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GetStreamThumbnailResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/getStreamThumbnailTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $stream = 'stream-891990144'; + $gcsObjectName = 'gcsObjectName867287651'; + $request = (new GetStreamThumbnailRequest()) + ->setStream($stream) + ->setGcsObjectName($gcsObjectName); + $response = $gapicClient->getStreamThumbnail($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/GetStreamThumbnail', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getStream(); + $this->assertProtobufEquals($stream, $actualValue); + $actualValue = $actualApiRequestObject->getGcsObjectName(); + $this->assertProtobufEquals($gcsObjectName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/getStreamThumbnailTest'); + $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 getStreamThumbnailExceptionTest() + { + $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/getStreamThumbnailTest'); + $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 + $stream = 'stream-891990144'; + $gcsObjectName = 'gcsObjectName867287651'; + $request = (new GetStreamThumbnailRequest()) + ->setStream($stream) + ->setGcsObjectName($gcsObjectName); + $response = $gapicClient->getStreamThumbnail($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/getStreamThumbnailTest'); + 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 listClustersTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $clustersElement = new Cluster(); + $clusters = [ + $clustersElement, + ]; + $expectedResponse = new ListClustersResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setClusters($clusters); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListClustersRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listClusters($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getClusters()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/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->locationName('[PROJECT]', '[LOCATION]'); + $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 listEventsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $eventsElement = new Event(); + $events = [ + $eventsElement, + ]; + $expectedResponse = new ListEventsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setEvents($events); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new ListEventsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listEvents($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getEvents()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/ListEvents', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listEventsExceptionTest() + { + $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]', '[LOCATION]', '[CLUSTER]'); + $request = (new ListEventsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listEvents($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 listSeriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $seriesElement = new Series(); + $series = [ + $seriesElement, + ]; + $expectedResponse = new ListSeriesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSeries($series); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new ListSeriesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSeries($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSeries()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/ListSeries', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSeriesExceptionTest() + { + $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]', '[LOCATION]', '[CLUSTER]'); + $request = (new ListSeriesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSeries($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 listStreamsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $streamsElement = new Stream(); + $streams = [ + $streamsElement, + ]; + $expectedResponse = new ListStreamsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setStreams($streams); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $request = (new ListStreamsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listStreams($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getStreams()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/ListStreams', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listStreamsExceptionTest() + { + $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]', '[LOCATION]', '[CLUSTER]'); + $request = (new ListStreamsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listStreams($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 materializeChannelTest() + { + $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/materializeChannelTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $stream = 'stream-891990144'; + $event = 'event96891546'; + $expectedResponse = new Channel(); + $expectedResponse->setName($name); + $expectedResponse->setStream($stream); + $expectedResponse->setEvent($event); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/materializeChannelTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); + $channelId = 'channelId-1930808873'; + $channel = new Channel(); + $channelStream = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); + $channel->setStream($channelStream); + $channelEvent = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); + $channel->setEvent($channelEvent); + $request = (new MaterializeChannelRequest()) + ->setParent($formattedParent) + ->setChannelId($channelId) + ->setChannel($channel); + $response = $gapicClient->materializeChannel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/MaterializeChannel', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getChannelId(); + $this->assertProtobufEquals($channelId, $actualValue); + $actualValue = $actualApiRequestObject->getChannel(); + $this->assertProtobufEquals($channel, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/materializeChannelTest'); + $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 materializeChannelExceptionTest() + { + $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/materializeChannelTest'); + $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]', '[LOCATION]', '[CLUSTER]'); + $channelId = 'channelId-1930808873'; + $channel = new Channel(); + $channelStream = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); + $channel->setStream($channelStream); + $channelEvent = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); + $channel->setEvent($channelEvent); + $request = (new MaterializeChannelRequest()) + ->setParent($formattedParent) + ->setChannelId($channelId) + ->setChannel($channel); + $response = $gapicClient->materializeChannel($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/materializeChannelTest'); + 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); + $name = 'name3373707'; + $dataplaneServiceEndpoint = 'dataplaneServiceEndpoint-1081162868'; + $pscTarget = 'pscTarget333587440'; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name); + $expectedResponse->setDataplaneServiceEndpoint($dataplaneServiceEndpoint); + $expectedResponse->setPscTarget($pscTarget); + $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 + $updateMask = new FieldMask(); + $cluster = new Cluster(); + $request = (new UpdateClusterRequest()) + ->setUpdateMask($updateMask) + ->setCluster($cluster); + $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.cloud.visionai.v1.StreamsService/UpdateCluster', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getCluster(); + $this->assertProtobufEquals($cluster, $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 + $updateMask = new FieldMask(); + $cluster = new Cluster(); + $request = (new UpdateClusterRequest()) + ->setUpdateMask($updateMask) + ->setCluster($cluster); + $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 updateEventTest() + { + $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/updateEventTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $expectedResponse = new Event(); + $expectedResponse->setName($name); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateEventTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $event = new Event(); + $request = (new UpdateEventRequest()) + ->setUpdateMask($updateMask) + ->setEvent($event); + $response = $gapicClient->updateEvent($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/UpdateEvent', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getEvent(); + $this->assertProtobufEquals($event, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateEventTest'); + $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 updateEventExceptionTest() + { + $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/updateEventTest'); + $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 + $updateMask = new FieldMask(); + $event = new Event(); + $request = (new UpdateEventRequest()) + ->setUpdateMask($updateMask) + ->setEvent($event); + $response = $gapicClient->updateEvent($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateEventTest'); + 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 updateSeriesTest() + { + $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/updateSeriesTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $stream = 'stream-891990144'; + $event = 'event96891546'; + $expectedResponse = new Series(); + $expectedResponse->setName($name); + $expectedResponse->setStream($stream); + $expectedResponse->setEvent($event); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateSeriesTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $series = new Series(); + $seriesStream = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); + $series->setStream($seriesStream); + $seriesEvent = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); + $series->setEvent($seriesEvent); + $request = (new UpdateSeriesRequest()) + ->setUpdateMask($updateMask) + ->setSeries($series); + $response = $gapicClient->updateSeries($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/UpdateSeries', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getSeries(); + $this->assertProtobufEquals($series, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSeriesTest'); + $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 updateSeriesExceptionTest() + { + $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/updateSeriesTest'); + $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 + $updateMask = new FieldMask(); + $series = new Series(); + $seriesStream = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); + $series->setStream($seriesStream); + $seriesEvent = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); + $series->setEvent($seriesEvent); + $request = (new UpdateSeriesRequest()) + ->setUpdateMask($updateMask) + ->setSeries($series); + $response = $gapicClient->updateSeries($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateSeriesTest'); + 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 updateStreamTest() + { + $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/updateStreamTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $enableHlsPlayback = false; + $mediaWarehouseAsset = 'mediaWarehouseAsset-234837991'; + $expectedResponse = new Stream(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setEnableHlsPlayback($enableHlsPlayback); + $expectedResponse->setMediaWarehouseAsset($mediaWarehouseAsset); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateStreamTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $updateMask = new FieldMask(); + $stream = new Stream(); + $request = (new UpdateStreamRequest()) + ->setUpdateMask($updateMask) + ->setStream($stream); + $response = $gapicClient->updateStream($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/UpdateStream', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $actualValue = $actualApiRequestObject->getStream(); + $this->assertProtobufEquals($stream, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateStreamTest'); + $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 updateStreamExceptionTest() + { + $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/updateStreamTest'); + $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 + $updateMask = new FieldMask(); + $stream = new Stream(); + $request = (new UpdateStreamRequest()) + ->setUpdateMask($updateMask) + ->setStream($stream); + $response = $gapicClient->updateStream($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateStreamTest'); + 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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($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 createClusterAsyncTest() + { + $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'; + $dataplaneServiceEndpoint = 'dataplaneServiceEndpoint-1081162868'; + $pscTarget = 'pscTarget333587440'; + $expectedResponse = new Cluster(); + $expectedResponse->setName($name); + $expectedResponse->setDataplaneServiceEndpoint($dataplaneServiceEndpoint); + $expectedResponse->setPscTarget($pscTarget); + $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->locationName('[PROJECT]', '[LOCATION]'); + $clusterId = 'clusterId240280960'; + $cluster = new Cluster(); + $request = (new CreateClusterRequest()) + ->setParent($formattedParent) + ->setClusterId($clusterId) + ->setCluster($cluster); + $response = $gapicClient->createClusterAsync($request)->wait(); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.StreamsService/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()); + } +} diff --git a/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/WarehouseClientTest.php b/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/WarehouseClientTest.php new file mode 100644 index 000000000000..3815efbeb373 --- /dev/null +++ b/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/WarehouseClientTest.php @@ -0,0 +1,5732 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return WarehouseClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new WarehouseClient($options); + } + + /** @test */ + public function addCollectionItemTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AddCollectionItemResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $item = new CollectionItem(); + $itemCollection = $gapicClient->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); + $item->setCollection($itemCollection); + $itemType = Type::TYPE_UNSPECIFIED; + $item->setType($itemType); + $itemItemResource = 'itemItemResource24554228'; + $item->setItemResource($itemItemResource); + $request = (new AddCollectionItemRequest()) + ->setItem($item); + $response = $gapicClient->addCollectionItem($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/AddCollectionItem', $actualFuncCall); + $actualValue = $actualRequestObject->getItem(); + $this->assertProtobufEquals($item, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function addCollectionItemExceptionTest() + { + $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 + $item = new CollectionItem(); + $itemCollection = $gapicClient->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); + $item->setCollection($itemCollection); + $itemType = Type::TYPE_UNSPECIFIED; + $item->setType($itemType); + $itemItemResource = 'itemItemResource24554228'; + $item->setItemResource($itemItemResource); + $request = (new AddCollectionItemRequest()) + ->setItem($item); + try { + $gapicClient->addCollectionItem($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 analyzeAssetTest() + { + $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/analyzeAssetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AnalyzeAssetResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/analyzeAssetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $request = (new AnalyzeAssetRequest()) + ->setName($formattedName); + $response = $gapicClient->analyzeAsset($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/AnalyzeAsset', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/analyzeAssetTest'); + $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 analyzeAssetExceptionTest() + { + $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/analyzeAssetTest'); + $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $request = (new AnalyzeAssetRequest()) + ->setName($formattedName); + $response = $gapicClient->analyzeAsset($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/analyzeAssetTest'); + 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 analyzeCorpusTest() + { + $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/analyzeCorpusTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new AnalyzeCorpusResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/analyzeCorpusTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new AnalyzeCorpusRequest()) + ->setName($formattedName); + $response = $gapicClient->analyzeCorpus($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/AnalyzeCorpus', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/analyzeCorpusTest'); + $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 analyzeCorpusExceptionTest() + { + $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/analyzeCorpusTest'); + $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new AnalyzeCorpusRequest()) + ->setName($formattedName); + $response = $gapicClient->analyzeCorpus($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/analyzeCorpusTest'); + 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 clipAssetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new ClipAssetResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $temporalPartition = new TemporalPartition(); + $request = (new ClipAssetRequest()) + ->setName($formattedName) + ->setTemporalPartition($temporalPartition); + $response = $gapicClient->clipAsset($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/ClipAsset', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $actualValue = $actualRequestObject->getTemporalPartition(); + $this->assertProtobufEquals($temporalPartition, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function clipAssetExceptionTest() + { + $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $temporalPartition = new TemporalPartition(); + $request = (new ClipAssetRequest()) + ->setName($formattedName) + ->setTemporalPartition($temporalPartition); + try { + $gapicClient->clipAsset($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 createAnnotationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Annotation(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $annotation = new Annotation(); + $request = (new CreateAnnotationRequest()) + ->setParent($formattedParent) + ->setAnnotation($annotation); + $response = $gapicClient->createAnnotation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/CreateAnnotation', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAnnotation(); + $this->assertProtobufEquals($annotation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAnnotationExceptionTest() + { + $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $annotation = new Annotation(); + $request = (new CreateAnnotationRequest()) + ->setParent($formattedParent) + ->setAnnotation($annotation); + try { + $gapicClient->createAnnotation($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 createAssetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Asset(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $asset = new Asset(); + $request = (new CreateAssetRequest()) + ->setParent($formattedParent) + ->setAsset($asset); + $response = $gapicClient->createAsset($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/CreateAsset', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getAsset(); + $this->assertProtobufEquals($asset, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createAssetExceptionTest() + { + $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $asset = new Asset(); + $request = (new CreateAssetRequest()) + ->setParent($formattedParent) + ->setAsset($asset); + try { + $gapicClient->createAsset($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 createCollectionTest() + { + $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/createCollectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Collection(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCollectionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $collection = new Collection(); + $request = (new CreateCollectionRequest()) + ->setParent($formattedParent) + ->setCollection($collection); + $response = $gapicClient->createCollection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/CreateCollection', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getCollection(); + $this->assertProtobufEquals($collection, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCollectionTest'); + $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 createCollectionExceptionTest() + { + $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/createCollectionTest'); + $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $collection = new Collection(); + $request = (new CreateCollectionRequest()) + ->setParent($formattedParent) + ->setCollection($collection); + $response = $gapicClient->createCollection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCollectionTest'); + 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 createCorpusTest() + { + $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/createCorpusTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new Corpus(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createCorpusTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $parent = 'parent-995424086'; + $corpus = new Corpus(); + $corpusDisplayName = 'corpusDisplayName351425925'; + $corpus->setDisplayName($corpusDisplayName); + $request = (new CreateCorpusRequest()) + ->setParent($parent) + ->setCorpus($corpus); + $response = $gapicClient->createCorpus($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/CreateCorpus', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $actualValue = $actualApiRequestObject->getCorpus(); + $this->assertProtobufEquals($corpus, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCorpusTest'); + $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 createCorpusExceptionTest() + { + $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/createCorpusTest'); + $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 + $parent = 'parent-995424086'; + $corpus = new Corpus(); + $corpusDisplayName = 'corpusDisplayName351425925'; + $corpus->setDisplayName($corpusDisplayName); + $request = (new CreateCorpusRequest()) + ->setParent($parent) + ->setCorpus($corpus); + $response = $gapicClient->createCorpus($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createCorpusTest'); + 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 createDataSchemaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $key = 'key106079'; + $expectedResponse = new DataSchema(); + $expectedResponse->setName($name); + $expectedResponse->setKey($key); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $dataSchema = new DataSchema(); + $dataSchemaKey = 'dataSchemaKey-1958334348'; + $dataSchema->setKey($dataSchemaKey); + $request = (new CreateDataSchemaRequest()) + ->setParent($formattedParent) + ->setDataSchema($dataSchema); + $response = $gapicClient->createDataSchema($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/CreateDataSchema', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getDataSchema(); + $this->assertProtobufEquals($dataSchema, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createDataSchemaExceptionTest() + { + $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $dataSchema = new DataSchema(); + $dataSchemaKey = 'dataSchemaKey-1958334348'; + $dataSchema->setKey($dataSchemaKey); + $request = (new CreateDataSchemaRequest()) + ->setParent($formattedParent) + ->setDataSchema($dataSchema); + try { + $gapicClient->createDataSchema($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 createIndexTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createIndexTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $entireCorpus = true; + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new Index(); + $expectedResponse->setEntireCorpus($entireCorpus); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createIndexTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $index = new Index(); + $request = (new CreateIndexRequest()) + ->setParent($formattedParent) + ->setIndex($index); + $response = $gapicClient->createIndex($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/CreateIndex', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getIndex(); + $this->assertProtobufEquals($index, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIndexTest'); + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + $this->assertTrue($response->isDone()); + $this->assertEquals($expectedResponse, $response->getResult()); + $apiRequestsEmpty = $transport->popReceivedCalls(); + $this->assertSame(0, count($apiRequestsEmpty)); + $operationsRequests = $operationsTransport->popReceivedCalls(); + $this->assertSame(1, count($operationsRequests)); + $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); + $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); + $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); + $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createIndexExceptionTest() + { + $operationsTransport = $this->createTransport(); + $operationsClient = new OperationsClient([ + 'apiEndpoint' => '', + 'transport' => $operationsTransport, + 'credentials' => $this->createCredentials(), + ]); + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + 'operationsClient' => $operationsClient, + ]); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + // Mock response + $incompleteOperation = new Operation(); + $incompleteOperation->setName('operations/createIndexTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $operationsTransport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $index = new Index(); + $request = (new CreateIndexRequest()) + ->setParent($formattedParent) + ->setIndex($index); + $response = $gapicClient->createIndex($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIndexTest'); + try { + $response->pollUntilComplete([ + 'initialPollDelayMillis' => 1, + ]); + // If the pollUntilComplete() method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stubs are exhausted + $transport->popReceivedCalls(); + $operationsTransport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + $this->assertTrue($operationsTransport->isExhausted()); + } + + /** @test */ + public function createIndexEndpointTest() + { + $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/createIndexEndpointTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new IndexEndpoint(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/createIndexEndpointTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $indexEndpoint = new IndexEndpoint(); + $request = (new CreateIndexEndpointRequest()) + ->setParent($formattedParent) + ->setIndexEndpoint($indexEndpoint); + $response = $gapicClient->createIndexEndpoint($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/CreateIndexEndpoint', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualApiRequestObject->getIndexEndpoint(); + $this->assertProtobufEquals($indexEndpoint, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIndexEndpointTest'); + $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 createIndexEndpointExceptionTest() + { + $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/createIndexEndpointTest'); + $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->locationName('[PROJECT]', '[LOCATION]'); + $indexEndpoint = new IndexEndpoint(); + $request = (new CreateIndexEndpointRequest()) + ->setParent($formattedParent) + ->setIndexEndpoint($indexEndpoint); + $response = $gapicClient->createIndexEndpoint($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/createIndexEndpointTest'); + 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 createSearchConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new SearchConfig(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $searchConfig = new SearchConfig(); + $searchConfigId = 'searchConfigId-2124186271'; + $request = (new CreateSearchConfigRequest()) + ->setParent($formattedParent) + ->setSearchConfig($searchConfig) + ->setSearchConfigId($searchConfigId); + $response = $gapicClient->createSearchConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/CreateSearchConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSearchConfig(); + $this->assertProtobufEquals($searchConfig, $actualValue); + $actualValue = $actualRequestObject->getSearchConfigId(); + $this->assertProtobufEquals($searchConfigId, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSearchConfigExceptionTest() + { + $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $searchConfig = new SearchConfig(); + $searchConfigId = 'searchConfigId-2124186271'; + $request = (new CreateSearchConfigRequest()) + ->setParent($formattedParent) + ->setSearchConfig($searchConfig) + ->setSearchConfigId($searchConfigId); + try { + $gapicClient->createSearchConfig($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 createSearchHypernymTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $hypernym = 'hypernym-114309610'; + $expectedResponse = new SearchHypernym(); + $expectedResponse->setName($name); + $expectedResponse->setHypernym($hypernym); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $searchHypernym = new SearchHypernym(); + $request = (new CreateSearchHypernymRequest()) + ->setParent($formattedParent) + ->setSearchHypernym($searchHypernym); + $response = $gapicClient->createSearchHypernym($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/CreateSearchHypernym', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSearchHypernym(); + $this->assertProtobufEquals($searchHypernym, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSearchHypernymExceptionTest() + { + $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $searchHypernym = new SearchHypernym(); + $request = (new CreateSearchHypernymRequest()) + ->setParent($formattedParent) + ->setSearchHypernym($searchHypernym); + try { + $gapicClient->createSearchHypernym($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 deleteAnnotationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->annotationName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]', '[ANNOTATION]'); + $request = (new DeleteAnnotationRequest()) + ->setName($formattedName); + $gapicClient->deleteAnnotation($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeleteAnnotation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteAnnotationExceptionTest() + { + $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->annotationName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]', '[ANNOTATION]'); + $request = (new DeleteAnnotationRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteAnnotation($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 deleteAssetTest() + { + $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/deleteAssetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteAssetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $request = (new DeleteAssetRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAsset($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeleteAsset', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAssetTest'); + $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 deleteAssetExceptionTest() + { + $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/deleteAssetTest'); + $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $request = (new DeleteAssetRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteAsset($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteAssetTest'); + 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 deleteCollectionTest() + { + $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/deleteCollectionTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteCollectionTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); + $request = (new DeleteCollectionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCollection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeleteCollection', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCollectionTest'); + $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 deleteCollectionExceptionTest() + { + $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/deleteCollectionTest'); + $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->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); + $request = (new DeleteCollectionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteCollection($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteCollectionTest'); + 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 deleteCorpusTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new DeleteCorpusRequest()) + ->setName($formattedName); + $gapicClient->deleteCorpus($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeleteCorpus', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteCorpusExceptionTest() + { + $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new DeleteCorpusRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteCorpus($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 deleteDataSchemaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataSchemaName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[DATA_SCHEMA]'); + $request = (new DeleteDataSchemaRequest()) + ->setName($formattedName); + $gapicClient->deleteDataSchema($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeleteDataSchema', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteDataSchemaExceptionTest() + { + $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->dataSchemaName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[DATA_SCHEMA]'); + $request = (new DeleteDataSchemaRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteDataSchema($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 deleteIndexTest() + { + $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/deleteIndexTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteIndexTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->indexName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[INDEX]'); + $request = (new DeleteIndexRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteIndex($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeleteIndex', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteIndexTest'); + $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 deleteIndexExceptionTest() + { + $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/deleteIndexTest'); + $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->indexName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[INDEX]'); + $request = (new DeleteIndexRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteIndex($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteIndexTest'); + 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 deleteIndexEndpointTest() + { + $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/deleteIndexEndpointTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new GPBEmpty(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deleteIndexEndpointTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); + $request = (new DeleteIndexEndpointRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteIndexEndpoint($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeleteIndexEndpoint', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteIndexEndpointTest'); + $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 deleteIndexEndpointExceptionTest() + { + $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/deleteIndexEndpointTest'); + $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->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); + $request = (new DeleteIndexEndpointRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteIndexEndpoint($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deleteIndexEndpointTest'); + 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 deleteSearchConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->searchConfigName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[SEARCH_CONFIG]'); + $request = (new DeleteSearchConfigRequest()) + ->setName($formattedName); + $gapicClient->deleteSearchConfig($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeleteSearchConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSearchConfigExceptionTest() + { + $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->searchConfigName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[SEARCH_CONFIG]'); + $request = (new DeleteSearchConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteSearchConfig($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 deleteSearchHypernymTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->searchHypernymName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[SEARCH_HYPERNYM]'); + $request = (new DeleteSearchHypernymRequest()) + ->setName($formattedName); + $gapicClient->deleteSearchHypernym($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeleteSearchHypernym', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSearchHypernymExceptionTest() + { + $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->searchHypernymName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[SEARCH_HYPERNYM]'); + $request = (new DeleteSearchHypernymRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteSearchHypernym($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 deployIndexTest() + { + $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/deployIndexTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new DeployIndexResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/deployIndexTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedIndexEndpoint = $gapicClient->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); + $deployedIndex = new DeployedIndex(); + $deployedIndexIndex = $gapicClient->indexName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[INDEX]'); + $deployedIndex->setIndex($deployedIndexIndex); + $request = (new DeployIndexRequest()) + ->setIndexEndpoint($formattedIndexEndpoint) + ->setDeployedIndex($deployedIndex); + $response = $gapicClient->deployIndex($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeployIndex', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getIndexEndpoint(); + $this->assertProtobufEquals($formattedIndexEndpoint, $actualValue); + $actualValue = $actualApiRequestObject->getDeployedIndex(); + $this->assertProtobufEquals($deployedIndex, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deployIndexTest'); + $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 deployIndexExceptionTest() + { + $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/deployIndexTest'); + $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 + $formattedIndexEndpoint = $gapicClient->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); + $deployedIndex = new DeployedIndex(); + $deployedIndexIndex = $gapicClient->indexName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[INDEX]'); + $deployedIndex->setIndex($deployedIndexIndex); + $request = (new DeployIndexRequest()) + ->setIndexEndpoint($formattedIndexEndpoint) + ->setDeployedIndex($deployedIndex); + $response = $gapicClient->deployIndex($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/deployIndexTest'); + 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 generateHlsUriTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $uri = 'uri116076'; + $expectedResponse = new GenerateHlsUriResponse(); + $expectedResponse->setUri($uri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $request = (new GenerateHlsUriRequest()) + ->setName($formattedName); + $response = $gapicClient->generateHlsUri($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/GenerateHlsUri', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateHlsUriExceptionTest() + { + $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $request = (new GenerateHlsUriRequest()) + ->setName($formattedName); + try { + $gapicClient->generateHlsUri($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 generateRetrievalUrlTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $signedUri = 'signedUri-979536439'; + $expectedResponse = new GenerateRetrievalUrlResponse(); + $expectedResponse->setSignedUri($signedUri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $request = (new GenerateRetrievalUrlRequest()) + ->setName($formattedName); + $response = $gapicClient->generateRetrievalUrl($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/GenerateRetrievalUrl', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function generateRetrievalUrlExceptionTest() + { + $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $request = (new GenerateRetrievalUrlRequest()) + ->setName($formattedName); + try { + $gapicClient->generateRetrievalUrl($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 getAnnotationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Annotation(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->annotationName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]', '[ANNOTATION]'); + $request = (new GetAnnotationRequest()) + ->setName($formattedName); + $response = $gapicClient->getAnnotation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/GetAnnotation', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAnnotationExceptionTest() + { + $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->annotationName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]', '[ANNOTATION]'); + $request = (new GetAnnotationRequest()) + ->setName($formattedName); + try { + $gapicClient->getAnnotation($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 getAssetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Asset(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $request = (new GetAssetRequest()) + ->setName($formattedName); + $response = $gapicClient->getAsset($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/GetAsset', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAssetExceptionTest() + { + $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $request = (new GetAssetRequest()) + ->setName($formattedName); + try { + $gapicClient->getAsset($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 getCollectionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Collection(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); + $request = (new GetCollectionRequest()) + ->setName($formattedName); + $response = $gapicClient->getCollection($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/GetCollection', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCollectionExceptionTest() + { + $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->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); + $request = (new GetCollectionRequest()) + ->setName($formattedName); + try { + $gapicClient->getCollection($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 getCorpusTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new Corpus(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new GetCorpusRequest()) + ->setName($formattedName); + $response = $gapicClient->getCorpus($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/GetCorpus', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCorpusExceptionTest() + { + $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new GetCorpusRequest()) + ->setName($formattedName); + try { + $gapicClient->getCorpus($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 getDataSchemaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $key = 'key106079'; + $expectedResponse = new DataSchema(); + $expectedResponse->setName($name2); + $expectedResponse->setKey($key); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->dataSchemaName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[DATA_SCHEMA]'); + $request = (new GetDataSchemaRequest()) + ->setName($formattedName); + $response = $gapicClient->getDataSchema($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/GetDataSchema', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getDataSchemaExceptionTest() + { + $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->dataSchemaName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[DATA_SCHEMA]'); + $request = (new GetDataSchemaRequest()) + ->setName($formattedName); + try { + $gapicClient->getDataSchema($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIndexTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $entireCorpus = true; + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new Index(); + $expectedResponse->setEntireCorpus($entireCorpus); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->indexName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[INDEX]'); + $request = (new GetIndexRequest()) + ->setName($formattedName); + $response = $gapicClient->getIndex($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/GetIndex', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIndexExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedName = $gapicClient->indexName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[INDEX]'); + $request = (new GetIndexRequest()) + ->setName($formattedName); + try { + $gapicClient->getIndex($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIndexEndpointTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new IndexEndpoint(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); + $request = (new GetIndexEndpointRequest()) + ->setName($formattedName); + $response = $gapicClient->getIndexEndpoint($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/GetIndexEndpoint', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getIndexEndpointExceptionTest() + { + $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->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); + $request = (new GetIndexEndpointRequest()) + ->setName($formattedName); + try { + $gapicClient->getIndexEndpoint($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 getSearchConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new SearchConfig(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->searchConfigName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[SEARCH_CONFIG]'); + $request = (new GetSearchConfigRequest()) + ->setName($formattedName); + $response = $gapicClient->getSearchConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/GetSearchConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSearchConfigExceptionTest() + { + $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->searchConfigName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[SEARCH_CONFIG]'); + $request = (new GetSearchConfigRequest()) + ->setName($formattedName); + try { + $gapicClient->getSearchConfig($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 getSearchHypernymTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $hypernym = 'hypernym-114309610'; + $expectedResponse = new SearchHypernym(); + $expectedResponse->setName($name2); + $expectedResponse->setHypernym($hypernym); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->searchHypernymName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[SEARCH_HYPERNYM]'); + $request = (new GetSearchHypernymRequest()) + ->setName($formattedName); + $response = $gapicClient->getSearchHypernym($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/GetSearchHypernym', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSearchHypernymExceptionTest() + { + $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->searchHypernymName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[SEARCH_HYPERNYM]'); + $request = (new GetSearchHypernymRequest()) + ->setName($formattedName); + try { + $gapicClient->getSearchHypernym($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 importAssetsTest() + { + $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/importAssetsTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new ImportAssetsResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/importAssetsTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new ImportAssetsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importAssets($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/ImportAssets', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importAssetsTest'); + $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 importAssetsExceptionTest() + { + $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/importAssetsTest'); + $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new ImportAssetsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->importAssets($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/importAssetsTest'); + 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 indexAssetTest() + { + $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/indexAssetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new IndexAssetResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/indexAssetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $request = (new IndexAssetRequest()) + ->setName($formattedName); + $response = $gapicClient->indexAsset($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/IndexAsset', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/indexAssetTest'); + $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 indexAssetExceptionTest() + { + $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/indexAssetTest'); + $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $request = (new IndexAssetRequest()) + ->setName($formattedName); + $response = $gapicClient->indexAsset($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/indexAssetTest'); + 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 ingestAssetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new IngestAssetResponse(); + $transport->addResponse($expectedResponse); + $expectedResponse2 = new IngestAssetResponse(); + $transport->addResponse($expectedResponse2); + $expectedResponse3 = new IngestAssetResponse(); + $transport->addResponse($expectedResponse3); + // Mock request + $request = new IngestAssetRequest(); + $request2 = new IngestAssetRequest(); + $request3 = new IngestAssetRequest(); + $bidi = $gapicClient->ingestAsset(); + $this->assertInstanceOf(BidiStream::class, $bidi); + $bidi->write($request); + $responses = []; + $responses[] = $bidi->read(); + $bidi->writeAll([ + $request2, + $request3, + ]); + foreach ($bidi->closeWriteAndReadAll() as $response) { + $responses[] = $response; + } + + $expectedResponses = []; + $expectedResponses[] = $expectedResponse; + $expectedResponses[] = $expectedResponse2; + $expectedResponses[] = $expectedResponse3; + $this->assertEquals($expectedResponses, $responses); + $createStreamRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($createStreamRequests)); + $streamFuncCall = $createStreamRequests[0]->getFuncCall(); + $streamRequestObject = $createStreamRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/IngestAsset', $streamFuncCall); + $this->assertNull($streamRequestObject); + $callObjects = $transport->popCallObjects(); + $this->assertSame(1, count($callObjects)); + $bidiCall = $callObjects[0]; + $writeRequests = $bidiCall->popReceivedCalls(); + $expectedRequests = []; + $expectedRequests[] = $request; + $expectedRequests[] = $request2; + $expectedRequests[] = $request3; + $this->assertEquals($expectedRequests, $writeRequests); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function ingestAssetExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->setStreamingStatus($status); + $this->assertTrue($transport->isExhausted()); + $bidi = $gapicClient->ingestAsset(); + $results = $bidi->closeWriteAndReadAll(); + try { + iterator_to_array($results); + // If the close stream method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAnnotationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $annotationsElement = new Annotation(); + $annotations = [ + $annotationsElement, + ]; + $expectedResponse = new ListAnnotationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAnnotations($annotations); + $transport->addResponse($expectedResponse); + $request = new ListAnnotationsRequest(); + $response = $gapicClient->listAnnotations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAnnotations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/ListAnnotations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAnnotationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListAnnotationsRequest(); + try { + $gapicClient->listAnnotations($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 listAssetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $assetsElement = new Asset(); + $assets = [ + $assetsElement, + ]; + $expectedResponse = new ListAssetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAssets($assets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new ListAssetsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAssets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAssets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/ListAssets', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAssetsExceptionTest() + { + $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new ListAssetsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAssets($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 listCollectionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $collectionsElement = new Collection(); + $collections = [ + $collectionsElement, + ]; + $expectedResponse = new ListCollectionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCollections($collections); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new ListCollectionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCollections($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCollections()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/ListCollections', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCollectionsExceptionTest() + { + $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new ListCollectionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCollections($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 listCorporaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $corporaElement = new Corpus(); + $corpora = [ + $corporaElement, + ]; + $expectedResponse = new ListCorporaResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCorpora($corpora); + $transport->addResponse($expectedResponse); + // Mock request + $parent = 'parent-995424086'; + $request = (new ListCorporaRequest()) + ->setParent($parent); + $response = $gapicClient->listCorpora($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCorpora()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/ListCorpora', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($parent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCorporaExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $parent = 'parent-995424086'; + $request = (new ListCorporaRequest()) + ->setParent($parent); + try { + $gapicClient->listCorpora($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 listDataSchemasTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $dataSchemasElement = new DataSchema(); + $dataSchemas = [ + $dataSchemasElement, + ]; + $expectedResponse = new ListDataSchemasResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setDataSchemas($dataSchemas); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new ListDataSchemasRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listDataSchemas($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getDataSchemas()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/ListDataSchemas', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listDataSchemasExceptionTest() + { + $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new ListDataSchemasRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listDataSchemas($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 listIndexEndpointsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $indexEndpointsElement = new IndexEndpoint(); + $indexEndpoints = [ + $indexEndpointsElement, + ]; + $expectedResponse = new ListIndexEndpointsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setIndexEndpoints($indexEndpoints); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListIndexEndpointsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listIndexEndpoints($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getIndexEndpoints()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/ListIndexEndpoints', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIndexEndpointsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); + $request = (new ListIndexEndpointsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listIndexEndpoints($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIndexesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $indexesElement = new Index(); + $indexes = [ + $indexesElement, + ]; + $expectedResponse = new ListIndexesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setIndexes($indexes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new ListIndexesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listIndexes($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getIndexes()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/ListIndexes', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listIndexesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + // Mock request + $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new ListIndexesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listIndexes($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSearchConfigsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $searchConfigsElement = new SearchConfig(); + $searchConfigs = [ + $searchConfigsElement, + ]; + $expectedResponse = new ListSearchConfigsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSearchConfigs($searchConfigs); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new ListSearchConfigsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSearchConfigs($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSearchConfigs()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/ListSearchConfigs', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSearchConfigsExceptionTest() + { + $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new ListSearchConfigsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSearchConfigs($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 listSearchHypernymsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $searchHypernymsElement = new SearchHypernym(); + $searchHypernyms = [ + $searchHypernymsElement, + ]; + $expectedResponse = new ListSearchHypernymsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSearchHypernyms($searchHypernyms); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new ListSearchHypernymsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSearchHypernyms($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSearchHypernyms()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/ListSearchHypernyms', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSearchHypernymsExceptionTest() + { + $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new ListSearchHypernymsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSearchHypernyms($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 removeCollectionItemTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new RemoveCollectionItemResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $item = new CollectionItem(); + $itemCollection = $gapicClient->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); + $item->setCollection($itemCollection); + $itemType = Type::TYPE_UNSPECIFIED; + $item->setType($itemType); + $itemItemResource = 'itemItemResource24554228'; + $item->setItemResource($itemItemResource); + $request = (new RemoveCollectionItemRequest()) + ->setItem($item); + $response = $gapicClient->removeCollectionItem($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/RemoveCollectionItem', $actualFuncCall); + $actualValue = $actualRequestObject->getItem(); + $this->assertProtobufEquals($item, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function removeCollectionItemExceptionTest() + { + $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 + $item = new CollectionItem(); + $itemCollection = $gapicClient->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); + $item->setCollection($itemCollection); + $itemType = Type::TYPE_UNSPECIFIED; + $item->setType($itemType); + $itemItemResource = 'itemItemResource24554228'; + $item->setItemResource($itemItemResource); + $request = (new RemoveCollectionItemRequest()) + ->setItem($item); + try { + $gapicClient->removeCollectionItem($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 removeIndexAssetTest() + { + $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/removeIndexAssetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new RemoveIndexAssetResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/removeIndexAssetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $request = (new RemoveIndexAssetRequest()) + ->setName($formattedName); + $response = $gapicClient->removeIndexAsset($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/RemoveIndexAsset', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/removeIndexAssetTest'); + $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 removeIndexAssetExceptionTest() + { + $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/removeIndexAssetTest'); + $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $request = (new RemoveIndexAssetRequest()) + ->setName($formattedName); + $response = $gapicClient->removeIndexAsset($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/removeIndexAssetTest'); + 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 searchAssetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $searchResultItemsElement = new SearchResultItem(); + $searchResultItems = [ + $searchResultItemsElement, + ]; + $expectedResponse = new SearchAssetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSearchResultItems($searchResultItems); + $transport->addResponse($expectedResponse); + // Mock request + $formattedCorpus = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new SearchAssetsRequest()) + ->setCorpus($formattedCorpus); + $response = $gapicClient->searchAssets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSearchResultItems()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/SearchAssets', $actualFuncCall); + $actualValue = $actualRequestObject->getCorpus(); + $this->assertProtobufEquals($formattedCorpus, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchAssetsExceptionTest() + { + $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 + $formattedCorpus = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); + $request = (new SearchAssetsRequest()) + ->setCorpus($formattedCorpus); + try { + $gapicClient->searchAssets($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 searchIndexEndpointTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $searchResultItemsElement = new SearchResultItem(); + $searchResultItems = [ + $searchResultItemsElement, + ]; + $expectedResponse = new SearchIndexEndpointResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSearchResultItems($searchResultItems); + $transport->addResponse($expectedResponse); + // Mock request + $formattedIndexEndpoint = $gapicClient->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); + $request = (new SearchIndexEndpointRequest()) + ->setIndexEndpoint($formattedIndexEndpoint); + $response = $gapicClient->searchIndexEndpoint($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSearchResultItems()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/SearchIndexEndpoint', $actualFuncCall); + $actualValue = $actualRequestObject->getIndexEndpoint(); + $this->assertProtobufEquals($formattedIndexEndpoint, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchIndexEndpointExceptionTest() + { + $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 + $formattedIndexEndpoint = $gapicClient->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); + $request = (new SearchIndexEndpointRequest()) + ->setIndexEndpoint($formattedIndexEndpoint); + try { + $gapicClient->searchIndexEndpoint($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 undeployIndexTest() + { + $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/undeployIndexTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new UndeployIndexResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/undeployIndexTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedIndexEndpoint = $gapicClient->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); + $request = (new UndeployIndexRequest()) + ->setIndexEndpoint($formattedIndexEndpoint); + $response = $gapicClient->undeployIndex($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/UndeployIndex', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getIndexEndpoint(); + $this->assertProtobufEquals($formattedIndexEndpoint, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeployIndexTest'); + $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 undeployIndexExceptionTest() + { + $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/undeployIndexTest'); + $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 + $formattedIndexEndpoint = $gapicClient->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); + $request = (new UndeployIndexRequest()) + ->setIndexEndpoint($formattedIndexEndpoint); + $response = $gapicClient->undeployIndex($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/undeployIndexTest'); + 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 updateAnnotationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Annotation(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $annotation = new Annotation(); + $request = (new UpdateAnnotationRequest()) + ->setAnnotation($annotation); + $response = $gapicClient->updateAnnotation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/UpdateAnnotation', $actualFuncCall); + $actualValue = $actualRequestObject->getAnnotation(); + $this->assertProtobufEquals($annotation, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAnnotationExceptionTest() + { + $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 + $annotation = new Annotation(); + $request = (new UpdateAnnotationRequest()) + ->setAnnotation($annotation); + try { + $gapicClient->updateAnnotation($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 updateAssetTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Asset(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $asset = new Asset(); + $request = (new UpdateAssetRequest()) + ->setAsset($asset); + $response = $gapicClient->updateAsset($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/UpdateAsset', $actualFuncCall); + $actualValue = $actualRequestObject->getAsset(); + $this->assertProtobufEquals($asset, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateAssetExceptionTest() + { + $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 + $asset = new Asset(); + $request = (new UpdateAssetRequest()) + ->setAsset($asset); + try { + $gapicClient->updateAsset($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 updateCollectionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $expectedResponse = new Collection(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $transport->addResponse($expectedResponse); + // Mock request + $collection = new Collection(); + $request = (new UpdateCollectionRequest()) + ->setCollection($collection); + $response = $gapicClient->updateCollection($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/UpdateCollection', $actualFuncCall); + $actualValue = $actualRequestObject->getCollection(); + $this->assertProtobufEquals($collection, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCollectionExceptionTest() + { + $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 + $collection = new Collection(); + $request = (new UpdateCollectionRequest()) + ->setCollection($collection); + try { + $gapicClient->updateCollection($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 updateCorpusTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new Corpus(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $transport->addResponse($expectedResponse); + // Mock request + $corpus = new Corpus(); + $corpusDisplayName = 'corpusDisplayName351425925'; + $corpus->setDisplayName($corpusDisplayName); + $request = (new UpdateCorpusRequest()) + ->setCorpus($corpus); + $response = $gapicClient->updateCorpus($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/UpdateCorpus', $actualFuncCall); + $actualValue = $actualRequestObject->getCorpus(); + $this->assertProtobufEquals($corpus, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCorpusExceptionTest() + { + $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 + $corpus = new Corpus(); + $corpusDisplayName = 'corpusDisplayName351425925'; + $corpus->setDisplayName($corpusDisplayName); + $request = (new UpdateCorpusRequest()) + ->setCorpus($corpus); + try { + $gapicClient->updateCorpus($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 updateDataSchemaTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $key = 'key106079'; + $expectedResponse = new DataSchema(); + $expectedResponse->setName($name); + $expectedResponse->setKey($key); + $transport->addResponse($expectedResponse); + // Mock request + $dataSchema = new DataSchema(); + $dataSchemaKey = 'dataSchemaKey-1958334348'; + $dataSchema->setKey($dataSchemaKey); + $request = (new UpdateDataSchemaRequest()) + ->setDataSchema($dataSchema); + $response = $gapicClient->updateDataSchema($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/UpdateDataSchema', $actualFuncCall); + $actualValue = $actualRequestObject->getDataSchema(); + $this->assertProtobufEquals($dataSchema, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateDataSchemaExceptionTest() + { + $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 + $dataSchema = new DataSchema(); + $dataSchemaKey = 'dataSchemaKey-1958334348'; + $dataSchema->setKey($dataSchemaKey); + $request = (new UpdateDataSchemaRequest()) + ->setDataSchema($dataSchema); + try { + $gapicClient->updateDataSchema($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 updateIndexTest() + { + $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/updateIndexTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $entireCorpus = true; + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new Index(); + $expectedResponse->setEntireCorpus($entireCorpus); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateIndexTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $index = new Index(); + $updateMask = new FieldMask(); + $request = (new UpdateIndexRequest()) + ->setIndex($index) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateIndex($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/UpdateIndex', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getIndex(); + $this->assertProtobufEquals($index, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateIndexTest'); + $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 updateIndexExceptionTest() + { + $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/updateIndexTest'); + $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 + $index = new Index(); + $updateMask = new FieldMask(); + $request = (new UpdateIndexRequest()) + ->setIndex($index) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateIndex($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateIndexTest'); + 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 updateIndexEndpointTest() + { + $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/updateIndexEndpointTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $satisfiesPzs = false; + $satisfiesPzi = false; + $expectedResponse = new IndexEndpoint(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setSatisfiesPzs($satisfiesPzs); + $expectedResponse->setSatisfiesPzi($satisfiesPzi); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/updateIndexEndpointTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $indexEndpoint = new IndexEndpoint(); + $updateMask = new FieldMask(); + $request = (new UpdateIndexEndpointRequest()) + ->setIndexEndpoint($indexEndpoint) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateIndexEndpoint($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/UpdateIndexEndpoint', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getIndexEndpoint(); + $this->assertProtobufEquals($indexEndpoint, $actualValue); + $actualValue = $actualApiRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateIndexEndpointTest'); + $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 updateIndexEndpointExceptionTest() + { + $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/updateIndexEndpointTest'); + $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 + $indexEndpoint = new IndexEndpoint(); + $updateMask = new FieldMask(); + $request = (new UpdateIndexEndpointRequest()) + ->setIndexEndpoint($indexEndpoint) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateIndexEndpoint($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/updateIndexEndpointTest'); + 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 updateSearchConfigTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new SearchConfig(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $searchConfig = new SearchConfig(); + $request = (new UpdateSearchConfigRequest()) + ->setSearchConfig($searchConfig); + $response = $gapicClient->updateSearchConfig($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/UpdateSearchConfig', $actualFuncCall); + $actualValue = $actualRequestObject->getSearchConfig(); + $this->assertProtobufEquals($searchConfig, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSearchConfigExceptionTest() + { + $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 + $searchConfig = new SearchConfig(); + $request = (new UpdateSearchConfigRequest()) + ->setSearchConfig($searchConfig); + try { + $gapicClient->updateSearchConfig($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 updateSearchHypernymTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $hypernym = 'hypernym-114309610'; + $expectedResponse = new SearchHypernym(); + $expectedResponse->setName($name); + $expectedResponse->setHypernym($hypernym); + $transport->addResponse($expectedResponse); + // Mock request + $searchHypernym = new SearchHypernym(); + $request = (new UpdateSearchHypernymRequest()) + ->setSearchHypernym($searchHypernym); + $response = $gapicClient->updateSearchHypernym($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/UpdateSearchHypernym', $actualFuncCall); + $actualValue = $actualRequestObject->getSearchHypernym(); + $this->assertProtobufEquals($searchHypernym, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSearchHypernymExceptionTest() + { + $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 + $searchHypernym = new SearchHypernym(); + $request = (new UpdateSearchHypernymRequest()) + ->setSearchHypernym($searchHypernym); + try { + $gapicClient->updateSearchHypernym($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 uploadAssetTest() + { + $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/uploadAssetTest'); + $incompleteOperation->setDone(false); + $transport->addResponse($incompleteOperation); + $expectedResponse = new UploadAssetResponse(); + $anyResponse = new Any(); + $anyResponse->setValue($expectedResponse->serializeToString()); + $completeOperation = new Operation(); + $completeOperation->setName('operations/uploadAssetTest'); + $completeOperation->setDone(true); + $completeOperation->setResponse($anyResponse); + $operationsTransport->addResponse($completeOperation); + // Mock request + $formattedName = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $request = (new UploadAssetRequest()) + ->setName($formattedName); + $response = $gapicClient->uploadAsset($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $apiRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($apiRequests)); + $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); + $this->assertSame(0, count($operationsRequestsEmpty)); + $actualApiFuncCall = $apiRequests[0]->getFuncCall(); + $actualApiRequestObject = $apiRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/UploadAsset', $actualApiFuncCall); + $actualValue = $actualApiRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/uploadAssetTest'); + $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 uploadAssetExceptionTest() + { + $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/uploadAssetTest'); + $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); + $request = (new UploadAssetRequest()) + ->setName($formattedName); + $response = $gapicClient->uploadAsset($request); + $this->assertFalse($response->isDone()); + $this->assertNull($response->getResult()); + $expectedOperationsRequestObject = new GetOperationRequest(); + $expectedOperationsRequestObject->setName('operations/uploadAssetTest'); + 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 viewCollectionItemsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $itemsElement = new CollectionItem(); + $items = [ + $itemsElement, + ]; + $expectedResponse = new ViewCollectionItemsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setItems($items); + $transport->addResponse($expectedResponse); + // Mock request + $formattedCollection = $gapicClient->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); + $request = (new ViewCollectionItemsRequest()) + ->setCollection($formattedCollection); + $response = $gapicClient->viewCollectionItems($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getItems()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/ViewCollectionItems', $actualFuncCall); + $actualValue = $actualRequestObject->getCollection(); + $this->assertProtobufEquals($formattedCollection, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function viewCollectionItemsExceptionTest() + { + $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 + $formattedCollection = $gapicClient->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); + $request = (new ViewCollectionItemsRequest()) + ->setCollection($formattedCollection); + try { + $gapicClient->viewCollectionItems($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 viewIndexedAssetsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $indexedAssetsElement = new IndexedAsset(); + $indexedAssets = [ + $indexedAssetsElement, + ]; + $expectedResponse = new ViewIndexedAssetsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setIndexedAssets($indexedAssets); + $transport->addResponse($expectedResponse); + // Mock request + $formattedIndex = $gapicClient->indexName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[INDEX]'); + $request = (new ViewIndexedAssetsRequest()) + ->setIndex($formattedIndex); + $response = $gapicClient->viewIndexedAssets($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getIndexedAssets()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/ViewIndexedAssets', $actualFuncCall); + $actualValue = $actualRequestObject->getIndex(); + $this->assertProtobufEquals($formattedIndex, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function viewIndexedAssetsExceptionTest() + { + $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 + $formattedIndex = $gapicClient->indexName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[INDEX]'); + $request = (new ViewIndexedAssetsRequest()) + ->setIndex($formattedIndex); + try { + $gapicClient->viewIndexedAssets($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 getLocationTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $locationId = 'locationId552319461'; + $displayName = 'displayName1615086568'; + $expectedResponse = new Location(); + $expectedResponse->setName($name2); + $expectedResponse->setLocationId($locationId); + $expectedResponse->setDisplayName($displayName); + $transport->addResponse($expectedResponse); + $request = new GetLocationRequest(); + $response = $gapicClient->getLocation($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getLocationExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new GetLocationRequest(); + try { + $gapicClient->getLocation($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 listLocationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $locationsElement = new Location(); + $locations = [ + $locationsElement, + ]; + $expectedResponse = new ListLocationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setLocations($locations); + $transport->addResponse($expectedResponse); + $request = new ListLocationsRequest(); + $response = $gapicClient->listLocations($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listLocationsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->details = 'internal error'; + $expectedExceptionMessage = json_encode([ + 'message' => 'internal error', + 'code' => Code::DATA_LOSS, + 'status' => 'DATA_LOSS', + 'details' => [], + ], JSON_PRETTY_PRINT); + $transport->addResponse(null, $status); + $request = new ListLocationsRequest(); + try { + $gapicClient->listLocations($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 addCollectionItemAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new AddCollectionItemResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $item = new CollectionItem(); + $itemCollection = $gapicClient->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); + $item->setCollection($itemCollection); + $itemType = Type::TYPE_UNSPECIFIED; + $item->setType($itemType); + $itemItemResource = 'itemItemResource24554228'; + $item->setItemResource($itemItemResource); + $request = (new AddCollectionItemRequest()) + ->setItem($item); + $response = $gapicClient->addCollectionItemAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.visionai.v1.Warehouse/AddCollectionItem', $actualFuncCall); + $actualValue = $actualRequestObject->getItem(); + $this->assertProtobufEquals($item, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} From 32c12fb40ee8df7bc320f6c3b0697ce5e738f63b Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Tue, 31 Mar 2026 17:38:22 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../Unit/Client/OperationsClientTest.php | 5 +- .../Clouderrorreporting/V1Beta1/Common.php | 26 - .../V1Beta1/ErrorGroupService.php | 29 - .../V1Beta1/ErrorStatsService.php | 31 - .../V1Beta1/ReportErrorsService.php | 30 - .../V1beta1/DeleteEventsRequest.php | 128 - .../V1beta1/DeleteEventsResponse.php | 33 - .../ErrorReporting/V1beta1/ErrorContext.php | 206 - .../ErrorReporting/V1beta1/ErrorEvent.php | 207 - .../ErrorReporting/V1beta1/ErrorGroup.php | 245 - .../V1beta1/ErrorGroupOrder.php | 76 - .../V1beta1/ErrorGroupStats.php | 492 -- .../V1beta1/GetGroupRequest.php | 159 - .../V1beta1/HttpRequestContext.php | 252 - .../V1beta1/ListEventsRequest.php | 361 -- .../V1beta1/ListEventsResponse.php | 153 - .../V1beta1/ListGroupStatsRequest.php | 638 -- .../V1beta1/ListGroupStatsResponse.php | 165 - .../ErrorReporting/V1beta1/QueryTimeRange.php | 73 - .../V1beta1/QueryTimeRange/Period.php | 87 - .../V1beta1/ReportErrorEventRequest.php | 148 - .../V1beta1/ReportErrorEventResponse.php | 34 - .../V1beta1/ReportedErrorEvent.php | 311 - .../V1beta1/ResolutionStatus.php | 78 - .../ErrorReporting/V1beta1/ServiceContext.php | 180 - .../V1beta1/ServiceContextFilter.php | 150 - .../ErrorReporting/V1beta1/SourceLocation.php | 150 - .../ErrorReporting/V1beta1/TimedCount.php | 157 - .../V1beta1/TimedCountAlignment.php | 74 - .../ErrorReporting/V1beta1/TrackingIssue.php | 71 - .../V1beta1/UpdateGroupRequest.php | 90 - .../ErrorGroupServiceClient/get_group.php | 89 - .../ErrorGroupServiceClient/update_group.php | 60 - .../ErrorStatsServiceClient/delete_events.php | 82 - .../ErrorStatsServiceClient/list_events.php | 95 - .../list_group_stats.php | 91 - .../report_error_event.php | 127 - .../Client/ErrorGroupServiceClient.php | 296 - .../Client/ErrorStatsServiceClient.php | 325 - .../Client/ReportErrorsServiceClient.php | 282 - .../v1beta1/src/V1beta1/gapic_metadata.json | 66 - .../error_group_service_client_config.json | 45 - .../error_group_service_descriptor_config.php | 56 - ...error_group_service_rest_client_config.php | 66 - .../error_stats_service_client_config.json | 50 - .../error_stats_service_descriptor_config.php | 83 - ...error_stats_service_rest_client_config.php | 86 - .../report_errors_service_client_config.json | 37 - ...eport_errors_service_descriptor_config.php | 43 - ...port_errors_service_rest_client_config.php | 41 - .../Client/ErrorGroupServiceClientTest.php | 226 - .../Client/ErrorStatsServiceClientTest.php | 307 - .../Client/ReportErrorsServiceClientTest.php | 175 - .../Google/Firestore/Admin/V1/Backup.php | 27 - .../Google/Firestore/Admin/V1/Database.php | 29 - .../Google/Firestore/Admin/V1/Field.php | 28 - .../Firestore/Admin/V1/FirestoreAdmin.php | 41 - .../Google/Firestore/Admin/V1/Index.php | 26 - .../Google/Firestore/Admin/V1/Location.php | 24 - .../Google/Firestore/Admin/V1/Operation.php | 29 - .../Firestore/Admin/V1/RealtimeUpdates.php | 24 - .../Google/Firestore/Admin/V1/Schedule.php | 29 - .../Google/Firestore/Admin/V1/Snapshot.php | 27 - .../Google/Firestore/Admin/V1/UserCreds.php | 27 - .../Cloud/Firestore/Admin/V1/Backup.php | 327 - .../Cloud/Firestore/Admin/V1/Backup/State.php | 69 - .../Cloud/Firestore/Admin/V1/Backup/Stats.php | 139 - .../Firestore/Admin/V1/BackupSchedule.php | 316 - .../Admin/V1/BulkDeleteDocumentsMetadata.php | 373 -- .../Admin/V1/BulkDeleteDocumentsRequest.php | 193 - .../Admin/V1/BulkDeleteDocumentsResponse.php | 34 - .../Admin/V1/CloneDatabaseMetadata.php | 278 - .../Admin/V1/CloneDatabaseRequest.php | 284 - .../Admin/V1/CreateBackupScheduleRequest.php | 134 - .../Admin/V1/CreateDatabaseMetadata.php | 33 - .../Admin/V1/CreateDatabaseRequest.php | 196 - .../Firestore/Admin/V1/CreateIndexRequest.php | 133 - .../Admin/V1/CreateUserCredsRequest.php | 190 - .../Firestore/Admin/V1/DailyRecurrence.php | 34 - .../Cloud/Firestore/Admin/V1/Database.php | 1125 ---- .../V1/Database/AppEngineIntegrationMode.php | 66 - .../Admin/V1/Database/CmekConfig.php | 151 - .../Admin/V1/Database/ConcurrencyMode.php | 78 - .../Admin/V1/Database/DataAccessMode.php | 61 - .../Admin/V1/Database/DatabaseEdition.php | 62 - .../Admin/V1/Database/DatabaseType.php | 64 - .../V1/Database/DeleteProtectionState.php | 61 - .../Admin/V1/Database/EncryptionConfig.php | 144 - .../CustomerManagedEncryptionOptions.php | 96 - .../GoogleDefaultEncryptionOptions.php | 33 - .../SourceEncryptionOptions.php | 34 - .../PointInTimeRecoveryEnablement.php | 67 - .../Admin/V1/Database/SourceInfo.php | 120 - .../V1/Database/SourceInfo/BackupSource.php | 75 - .../Admin/V1/DeleteBackupRequest.php | 88 - .../Admin/V1/DeleteBackupScheduleRequest.php | 92 - .../Admin/V1/DeleteDatabaseMetadata.php | 33 - .../Admin/V1/DeleteDatabaseRequest.php | 129 - .../Firestore/Admin/V1/DeleteIndexRequest.php | 87 - .../Admin/V1/DeleteUserCredsRequest.php | 87 - .../Admin/V1/DisableUserCredsRequest.php | 87 - .../Admin/V1/EnableUserCredsRequest.php | 87 - .../Admin/V1/ExportDocumentsMetadata.php | 403 -- .../Admin/V1/ExportDocumentsRequest.php | 305 - .../Admin/V1/ExportDocumentsResponse.php | 76 - .../Google/Cloud/Firestore/Admin/V1/Field.php | 253 - .../Firestore/Admin/V1/Field/IndexConfig.php | 205 - .../Firestore/Admin/V1/Field/TtlConfig.php | 140 - .../Admin/V1/Field/TtlConfig/State.php | 75 - .../Admin/V1/FieldOperationMetadata.php | 373 -- .../IndexConfigDelta.php | 111 - .../IndexConfigDelta/ChangeType.php | 61 - .../FieldOperationMetadata/TtlConfigDelta.php | 115 - .../TtlConfigDelta/ChangeType.php | 61 - .../Firestore/Admin/V1/GetBackupRequest.php | 88 - .../Admin/V1/GetBackupScheduleRequest.php | 93 - .../Firestore/Admin/V1/GetDatabaseRequest.php | 87 - .../Firestore/Admin/V1/GetFieldRequest.php | 87 - .../Firestore/Admin/V1/GetIndexRequest.php | 87 - .../Admin/V1/GetUserCredsRequest.php | 87 - .../Admin/V1/ImportDocumentsMetadata.php | 351 - .../Admin/V1/ImportDocumentsRequest.php | 229 - .../Google/Cloud/Firestore/Admin/V1/Index.php | 432 -- .../Firestore/Admin/V1/Index/ApiScope.php | 63 - .../Firestore/Admin/V1/Index/Density.php | 109 - .../Firestore/Admin/V1/Index/IndexField.php | 191 - .../Admin/V1/Index/IndexField/ArrayConfig.php | 54 - .../Admin/V1/Index/IndexField/Order.php | 61 - .../V1/Index/IndexField/VectorConfig.php | 117 - .../IndexField/VectorConfig/FlatIndex.php | 34 - .../Firestore/Admin/V1/Index/QueryScope.php | 74 - .../Cloud/Firestore/Admin/V1/Index/State.php | 83 - .../Admin/V1/IndexOperationMetadata.php | 287 - .../Admin/V1/ListBackupSchedulesRequest.php | 88 - .../Admin/V1/ListBackupSchedulesResponse.php | 68 - .../Firestore/Admin/V1/ListBackupsRequest.php | 169 - .../Admin/V1/ListBackupsResponse.php | 118 - .../Admin/V1/ListDatabasesRequest.php | 120 - .../Admin/V1/ListDatabasesResponse.php | 129 - .../Firestore/Admin/V1/ListFieldsRequest.php | 221 - .../Firestore/Admin/V1/ListFieldsResponse.php | 106 - .../Firestore/Admin/V1/ListIndexesRequest.php | 197 - .../Admin/V1/ListIndexesResponse.php | 106 - .../Admin/V1/ListUserCredsRequest.php | 87 - .../Admin/V1/ListUserCredsResponse.php | 68 - .../Firestore/Admin/V1/LocationMetadata.php | 34 - .../Firestore/Admin/V1/OperationState.php | 98 - .../Cloud/Firestore/Admin/V1/PitrSnapshot.php | 153 - .../Cloud/Firestore/Admin/V1/Progress.php | 103 - .../Admin/V1/RealtimeUpdatesMode.php | 62 - .../Admin/V1/ResetUserPasswordRequest.php | 87 - .../Admin/V1/RestoreDatabaseMetadata.php | 268 - .../Admin/V1/RestoreDatabaseRequest.php | 278 - .../Admin/V1/UpdateBackupScheduleRequest.php | 137 - .../Admin/V1/UpdateDatabaseMetadata.php | 33 - .../Admin/V1/UpdateDatabaseRequest.php | 137 - .../Firestore/Admin/V1/UpdateFieldRequest.php | 139 - .../Cloud/Firestore/Admin/V1/UserCreds.php | 281 - .../Admin/V1/UserCreds/ResourceIdentity.php | 71 - .../Firestore/Admin/V1/UserCreds/State.php | 61 - .../Firestore/Admin/V1/WeeklyRecurrence.php | 72 - .../bulk_delete_documents.php | 91 - .../FirestoreAdminClient/clone_database.php | 125 - .../create_backup_schedule.php | 77 - .../FirestoreAdminClient/create_database.php | 96 - .../V1/FirestoreAdminClient/create_index.php | 94 - .../create_user_creds.php | 82 - .../V1/FirestoreAdminClient/delete_backup.php | 71 - .../delete_backup_schedule.php | 76 - .../FirestoreAdminClient/delete_database.php | 84 - .../V1/FirestoreAdminClient/delete_index.php | 75 - .../delete_user_creds.php | 70 - .../disable_user_creds.php | 72 - .../enable_user_creds.php | 72 - .../FirestoreAdminClient/export_documents.php | 94 - .../V1/FirestoreAdminClient/get_backup.php | 73 - .../get_backup_schedule.php | 78 - .../V1/FirestoreAdminClient/get_database.php | 72 - .../V1/FirestoreAdminClient/get_field.php | 77 - .../V1/FirestoreAdminClient/get_index.php | 77 - .../FirestoreAdminClient/get_user_creds.php | 73 - .../FirestoreAdminClient/import_documents.php | 85 - .../list_backup_schedules.php | 73 - .../V1/FirestoreAdminClient/list_backups.php | 76 - .../FirestoreAdminClient/list_databases.php | 72 - .../V1/FirestoreAdminClient/list_fields.php | 89 - .../V1/FirestoreAdminClient/list_indexes.php | 81 - .../FirestoreAdminClient/list_user_creds.php | 73 - .../reset_user_password.php | 72 - .../FirestoreAdminClient/restore_database.php | 124 - .../update_backup_schedule.php | 59 - .../FirestoreAdminClient/update_database.php | 71 - .../V1/FirestoreAdminClient/update_field.php | 122 - .../src/V1/Client/FirestoreAdminClient.php | 1473 ----- .../v1/Admin/src/V1/gapic_metadata.json | 178 - .../firestore_admin_client_config.json | 226 - .../firestore_admin_descriptor_config.php | 523 -- .../firestore_admin_rest_client_config.php | 452 -- .../V1/Client/FirestoreAdminClientTest.php | 2977 --------- .../Google/Firestore/V1/AggregationResult.php | 25 - .../Google/Firestore/V1/BloomFilter.php | 24 - .../Google/Firestore/V1/Common.php | 25 - .../Google/Firestore/V1/Document.php | 28 - .../Google/Firestore/V1/ExplainStats.php | 25 - .../Google/Firestore/V1/Firestore.php | 40 - .../Google/Firestore/V1/Pipeline.php | 26 - .../GPBMetadata/Google/Firestore/V1/Query.php | 27 - .../Google/Firestore/V1/QueryProfile.php | 27 - .../GPBMetadata/Google/Firestore/V1/Write.php | 28 - .../Cloud/Firestore/V1/AggregationResult.php | 86 - .../Google/Cloud/Firestore/V1/ArrayValue.php | 67 - .../Firestore/V1/BatchGetDocumentsRequest.php | 296 - .../V1/BatchGetDocumentsResponse.php | 214 - .../Cloud/Firestore/V1/BatchWriteRequest.php | 152 - .../Cloud/Firestore/V1/BatchWriteResponse.php | 118 - .../Firestore/V1/BeginTransactionRequest.php | 134 - .../Firestore/V1/BeginTransactionResponse.php | 68 - .../Google/Cloud/Firestore/V1/BitSequence.php | 124 - .../Google/Cloud/Firestore/V1/BloomFilter.php | 119 - .../Cloud/Firestore/V1/CommitRequest.php | 161 - .../Cloud/Firestore/V1/CommitResponse.php | 123 - .../Firestore/V1/CreateDocumentRequest.php | 248 - .../src/Google/Cloud/Firestore/V1/Cursor.php | 113 - .../Firestore/V1/DeleteDocumentRequest.php | 134 - .../Google/Cloud/Firestore/V1/Document.php | 290 - .../Cloud/Firestore/V1/DocumentChange.php | 154 - .../Cloud/Firestore/V1/DocumentDelete.php | 158 - .../Cloud/Firestore/V1/DocumentMask.php | 80 - .../Cloud/Firestore/V1/DocumentRemove.php | 160 - .../Cloud/Firestore/V1/DocumentTransform.php | 109 - .../V1/DocumentTransform/FieldTransform.php | 414 -- .../FieldTransform/ServerValue.php | 56 - .../Firestore/V1/ExecutePipelineRequest.php | 240 - .../Firestore/V1/ExecutePipelineResponse.php | 285 - .../Cloud/Firestore/V1/ExecutionStats.php | 237 - .../Cloud/Firestore/V1/ExistenceFilter.php | 209 - .../Cloud/Firestore/V1/ExplainMetrics.php | 129 - .../Cloud/Firestore/V1/ExplainOptions.php | 83 - .../Cloud/Firestore/V1/ExplainStats.php | 87 - .../Cloud/Firestore/V1/GetDocumentRequest.php | 208 - .../Firestore/V1/ListCollectionIdsRequest.php | 219 - .../V1/ListCollectionIdsResponse.php | 102 - .../Firestore/V1/ListDocumentsRequest.php | 462 -- .../Firestore/V1/ListDocumentsResponse.php | 106 - .../Cloud/Firestore/V1/ListenRequest.php | 180 - .../Cloud/Firestore/V1/ListenResponse.php | 219 - .../Google/Cloud/Firestore/V1/MapValue.php | 83 - .../Google/Cloud/Firestore/V1/PBFunction.php | 149 - .../Firestore/V1/PartitionQueryRequest.php | 364 -- .../Firestore/V1/PartitionQueryResponse.php | 162 - .../Google/Cloud/Firestore/V1/Pipeline.php | 67 - .../Cloud/Firestore/V1/Pipeline/Stage.php | 157 - .../Google/Cloud/Firestore/V1/PlanSummary.php | 83 - .../Cloud/Firestore/V1/Precondition.php | 114 - .../Cloud/Firestore/V1/RollbackRequest.php | 121 - .../V1/RunAggregationQueryRequest.php | 304 - .../V1/RunAggregationQueryResponse.php | 244 - .../Cloud/Firestore/V1/RunQueryRequest.php | 306 - .../Cloud/Firestore/V1/RunQueryResponse.php | 327 - .../V1/StructuredAggregationQuery.php | 122 - .../Aggregation.php | 287 - .../Aggregation/Avg.php | 83 - .../Aggregation/Count.php | 166 - .../Aggregation/Sum.php | 92 - .../Cloud/Firestore/V1/StructuredPipeline.php | 114 - .../Cloud/Firestore/V1/StructuredQuery.php | 652 -- .../V1/StructuredQuery/CollectionSelector.php | 113 - .../V1/StructuredQuery/CompositeFilter.php | 109 - .../CompositeFilter/Operator.php | 65 - .../V1/StructuredQuery/Direction.php | 61 - .../V1/StructuredQuery/FieldFilter.php | 155 - .../StructuredQuery/FieldFilter/Operator.php | 143 - .../V1/StructuredQuery/FieldReference.php | 83 - .../Firestore/V1/StructuredQuery/Filter.php | 141 - .../V1/StructuredQuery/FindNearest.php | 396 -- .../FindNearest/DistanceMeasure.php | 80 - .../Firestore/V1/StructuredQuery/Order.php | 111 - .../V1/StructuredQuery/Projection.php | 75 - .../V1/StructuredQuery/UnaryFilter.php | 109 - .../StructuredQuery/UnaryFilter/Operator.php | 81 - .../src/Google/Cloud/Firestore/V1/Target.php | 407 -- .../Firestore/V1/Target/DocumentsTarget.php | 79 - .../Cloud/Firestore/V1/Target/QueryTarget.php | 129 - .../Cloud/Firestore/V1/TargetChange.php | 267 - .../V1/TargetChange/TargetChangeType.php | 83 - .../Cloud/Firestore/V1/TransactionOptions.php | 108 - .../V1/TransactionOptions/PBReadOnly.php | 84 - .../V1/TransactionOptions/ReadWrite.php | 69 - .../Firestore/V1/UpdateDocumentRequest.php | 268 - .../src/Google/Cloud/Firestore/V1/Value.php | 603 -- .../src/Google/Cloud/Firestore/V1/Write.php | 314 - .../Cloud/Firestore/V1/WriteRequest.php | 277 - .../Cloud/Firestore/V1/WriteResponse.php | 203 - .../Google/Cloud/Firestore/V1/WriteResult.php | 131 - .../FirestoreClient/batch_get_documents.php | 86 - .../V1/FirestoreClient/batch_write.php | 66 - .../V1/FirestoreClient/begin_transaction.php | 71 - .../v1/samples/V1/FirestoreClient/commit.php | 74 - .../V1/FirestoreClient/create_document.php | 83 - .../V1/FirestoreClient/delete_document.php | 69 - .../V1/FirestoreClient/execute_pipeline.php | 76 - .../V1/FirestoreClient/get_document.php | 71 - .../FirestoreClient/list_collection_ids.php | 77 - .../V1/FirestoreClient/list_documents.php | 89 - .../v1/samples/V1/FirestoreClient/listen.php | 78 - .../V1/FirestoreClient/partition_query.php | 64 - .../samples/V1/FirestoreClient/rollback.php | 72 - .../FirestoreClient/run_aggregation_query.php | 92 - .../samples/V1/FirestoreClient/run_query.php | 80 - .../V1/FirestoreClient/update_document.php | 62 - .../v1/samples/V1/FirestoreClient/write.php | 79 - .../v1/src/V1/Client/FirestoreClient.php | 662 -- .../Firestore/v1/src/V1/gapic_metadata.json | 103 - .../V1/resources/firestore_client_config.json | 176 - .../resources/firestore_descriptor_config.php | 295 - .../firestore_rest_client_config.php | 304 - .../Unit/V1/Client/FirestoreClientTest.php | 1405 ---- .../Google/Logging/V2/LogEntry.php | 32 - .../GPBMetadata/Google/Logging/V2/Logging.php | 33 - .../Google/Logging/V2/LoggingConfig.php | 32 - .../Google/Logging/V2/LoggingMetrics.php | 32 - .../Cloud/Logging/V2/BigQueryDataset.php | 87 - .../Cloud/Logging/V2/BigQueryOptions.php | 149 - .../Cloud/Logging/V2/BucketMetadata.php | 230 - .../Google/Cloud/Logging/V2/CmekSettings.php | 320 - .../Logging/V2/CopyLogEntriesMetadata.php | 317 - .../Logging/V2/CopyLogEntriesRequest.php | 147 - .../Logging/V2/CopyLogEntriesResponse.php | 67 - .../Cloud/Logging/V2/CreateBucketRequest.php | 173 - .../Logging/V2/CreateExclusionRequest.php | 170 - .../Cloud/Logging/V2/CreateLinkRequest.php | 194 - .../Logging/V2/CreateLogMetricRequest.php | 144 - .../Cloud/Logging/V2/CreateSinkRequest.php | 244 - .../Cloud/Logging/V2/CreateViewRequest.php | 165 - .../Cloud/Logging/V2/DeleteBucketRequest.php | 91 - .../Logging/V2/DeleteExclusionRequest.php | 114 - .../Cloud/Logging/V2/DeleteLinkRequest.php | 102 - .../Logging/V2/DeleteLogMetricRequest.php | 87 - .../Cloud/Logging/V2/DeleteLogRequest.php | 129 - .../Cloud/Logging/V2/DeleteSinkRequest.php | 119 - .../Cloud/Logging/V2/DeleteViewRequest.php | 79 - .../Cloud/Logging/V2/GetBucketRequest.php | 91 - .../Logging/V2/GetCmekSettingsRequest.php | 111 - .../Cloud/Logging/V2/GetExclusionRequest.php | 114 - .../Cloud/Logging/V2/GetLinkRequest.php | 102 - .../Cloud/Logging/V2/GetLogMetricRequest.php | 87 - .../Cloud/Logging/V2/GetSettingsRequest.php | 139 - .../Cloud/Logging/V2/GetSinkRequest.php | 114 - .../Cloud/Logging/V2/GetViewRequest.php | 79 - .../Google/Cloud/Logging/V2/IndexConfig.php | 173 - .../src/Google/Cloud/Logging/V2/IndexType.php | 62 - .../Cloud/Logging/V2/LifecycleState.php | 86 - .../src/Google/Cloud/Logging/V2/Link.php | 271 - .../Google/Cloud/Logging/V2/LinkMetadata.php | 230 - .../Cloud/Logging/V2/ListBucketsRequest.php | 206 - .../Cloud/Logging/V2/ListBucketsResponse.php | 109 - .../Logging/V2/ListExclusionsRequest.php | 190 - .../Logging/V2/ListExclusionsResponse.php | 109 - .../Cloud/Logging/V2/ListLinksRequest.php | 178 - .../Cloud/Logging/V2/ListLinksResponse.php | 109 - .../Logging/V2/ListLogEntriesRequest.php | 354 - .../Logging/V2/ListLogEntriesResponse.php | 141 - .../Logging/V2/ListLogMetricsRequest.php | 175 - .../Logging/V2/ListLogMetricsResponse.php | 109 - .../Cloud/Logging/V2/ListLogsRequest.php | 264 - .../Cloud/Logging/V2/ListLogsResponse.php | 117 - ...istMonitoredResourceDescriptorsRequest.php | 121 - ...stMonitoredResourceDescriptorsResponse.php | 109 - .../Cloud/Logging/V2/ListSinksRequest.php | 190 - .../Cloud/Logging/V2/ListSinksResponse.php | 109 - .../Cloud/Logging/V2/ListViewsRequest.php | 174 - .../Cloud/Logging/V2/ListViewsResponse.php | 109 - .../Cloud/Logging/V2/LocationMetadata.php | 71 - .../src/Google/Cloud/Logging/V2/LogBucket.php | 525 -- .../src/Google/Cloud/Logging/V2/LogEntry.php | 1061 --- .../Cloud/Logging/V2/LogEntryOperation.php | 182 - .../Logging/V2/LogEntrySourceLocation.php | 164 - .../Google/Cloud/Logging/V2/LogExclusion.php | 321 - .../src/Google/Cloud/Logging/V2/LogMetric.php | 769 --- .../Cloud/Logging/V2/LogMetric/ApiVersion.php | 54 - .../src/Google/Cloud/Logging/V2/LogSink.php | 688 -- .../Logging/V2/LogSink/VersionFormat.php | 61 - .../src/Google/Cloud/Logging/V2/LogSplit.php | 153 - .../src/Google/Cloud/Logging/V2/LogView.php | 267 - .../Cloud/Logging/V2/OperationState.php | 93 - .../src/Google/Cloud/Logging/V2/Settings.php | 324 - .../Logging/V2/TailLogEntriesRequest.php | 209 - .../Logging/V2/TailLogEntriesResponse.php | 125 - .../SuppressionInfo.php | 101 - .../SuppressionInfo/Reason.php | 65 - .../Logging/V2/UndeleteBucketRequest.php | 91 - .../Cloud/Logging/V2/UpdateBucketRequest.php | 199 - .../Logging/V2/UpdateCmekSettingsRequest.php | 223 - .../Logging/V2/UpdateExclusionRequest.php | 242 - .../Logging/V2/UpdateLogMetricRequest.php | 149 - .../Logging/V2/UpdateSettingsRequest.php | 236 - .../Cloud/Logging/V2/UpdateSinkRequest.php | 368 -- .../Cloud/Logging/V2/UpdateViewRequest.php | 187 - .../V2/WriteLogEntriesPartialErrors.php | 83 - .../Logging/V2/WriteLogEntriesRequest.php | 507 -- .../Logging/V2/WriteLogEntriesResponse.php | 33 - .../copy_log_entries.php | 89 - .../ConfigServiceV2Client/create_bucket.php | 85 - .../create_bucket_async.php | 98 - .../create_exclusion.php | 106 - .../V2/ConfigServiceV2Client/create_link.php | 97 - .../V2/ConfigServiceV2Client/create_sink.php | 110 - .../V2/ConfigServiceV2Client/create_view.php | 84 - .../ConfigServiceV2Client/delete_bucket.php | 82 - .../delete_exclusion.php | 78 - .../V2/ConfigServiceV2Client/delete_link.php | 86 - .../V2/ConfigServiceV2Client/delete_sink.php | 80 - .../V2/ConfigServiceV2Client/delete_view.php | 83 - .../V2/ConfigServiceV2Client/get_bucket.php | 80 - .../get_cmek_settings.php | 66 - .../ConfigServiceV2Client/get_exclusion.php | 80 - .../V2/ConfigServiceV2Client/get_link.php | 76 - .../V2/ConfigServiceV2Client/get_settings.php | 94 - .../V2/ConfigServiceV2Client/get_sink.php | 80 - .../V2/ConfigServiceV2Client/get_view.php | 82 - .../V2/ConfigServiceV2Client/list_buckets.php | 85 - .../ConfigServiceV2Client/list_exclusions.php | 81 - .../V2/ConfigServiceV2Client/list_links.php | 81 - .../V2/ConfigServiceV2Client/list_sinks.php | 81 - .../V2/ConfigServiceV2Client/list_views.php | 77 - .../ConfigServiceV2Client/undelete_bucket.php | 79 - .../ConfigServiceV2Client/update_bucket.php | 90 - .../update_bucket_async.php | 102 - .../update_cmek_settings.php | 71 - .../update_exclusion.php | 107 - .../ConfigServiceV2Client/update_settings.php | 97 - .../V2/ConfigServiceV2Client/update_sink.php | 111 - .../V2/ConfigServiceV2Client/update_view.php | 82 - .../V2/LoggingServiceV2Client/delete_log.php | 84 - .../list_log_entries.php | 96 - .../V2/LoggingServiceV2Client/list_logs.php | 81 - .../list_monitored_resource_descriptors.php | 62 - .../tail_log_entries.php | 90 - .../write_log_entries.php | 105 - .../create_log_metric.php | 104 - .../delete_log_metric.php | 71 - .../MetricsServiceV2Client/get_log_metric.php | 73 - .../list_log_metrics.php | 78 - .../update_log_metric.php | 106 - .../src/V2/Client/ConfigServiceV2Client.php | 2039 ------ .../src/V2/Client/LoggingServiceV2Client.php | 541 -- .../src/V2/Client/MetricsServiceV2Client.php | 384 -- .../Logging/v2/src/V2/gapic_metadata.json | 251 - .../config_service_v2_client_config.json | 206 - .../config_service_v2_descriptor_config.php | 524 -- .../config_service_v2_rest_client_config.php | 1167 ---- .../logging_service_v2_client_config.json | 83 - .../logging_service_v2_descriptor_config.php | 106 - .../logging_service_v2_rest_client_config.php | 211 - .../metrics_service_v2_client_config.json | 71 - .../metrics_service_v2_descriptor_config.php | 100 - .../metrics_service_v2_rest_client_config.php | 180 - .../V2/Client/ConfigServiceV2ClientTest.php | 2819 -------- .../V2/Client/LoggingServiceV2ClientTest.php | 530 -- .../V2/Client/MetricsServiceV2ClientTest.php | 498 -- .../Google/Longrunning/Operations.php | 31 - .../LongRunning/CancelOperationRequest.php | 81 - .../LongRunning/DeleteOperationRequest.php | 81 - .../LongRunning/GetOperationRequest.php | 81 - .../LongRunning/ListOperationsRequest.php | 247 - .../LongRunning/ListOperationsResponse.php | 148 - .../src/Google/LongRunning/Operation.php | 270 - .../src/Google/LongRunning/OperationInfo.php | 144 - .../LongRunning/WaitOperationRequest.php | 120 - .../LongRunning/Client/OperationsClient.php | 344 - .../src/LongRunning/gapic_metadata.json | 43 - .../resources/operations_client_config.json | 59 - .../operations_descriptor_config.php | 88 - .../operations_rest_client_config.php | 76 - .../Unit/Client/OperationsClientTest.php | 418 -- .../Google/Devtools/Cloudtrace/V1/Trace.php | 29 - .../Google/Cloud/Trace/V1/GetTraceRequest.php | 116 - .../Cloud/Trace/V1/ListTracesRequest.php | 507 -- .../Trace/V1/ListTracesRequest/ViewType.php | 72 - .../Cloud/Trace/V1/ListTracesResponse.php | 109 - .../Cloud/Trace/V1/PatchTracesRequest.php | 126 - .../proto/src/Google/Cloud/Trace/V1/Trace.php | 145 - .../src/Google/Cloud/Trace/V1/TraceSpan.php | 451 -- .../Cloud/Trace/V1/TraceSpan/SpanKind.php | 64 - .../src/Google/Cloud/Trace/V1/Traces.php | 67 - .../V1/TraceServiceClient/get_trace.php | 73 - .../V1/TraceServiceClient/list_traces.php | 75 - .../V1/TraceServiceClient/patch_traces.php | 75 - .../v1/src/V1/Client/TraceServiceClient.php | 270 - .../Trace/v1/src/V1/gapic_metadata.json | 33 - .../trace_service_client_config.json | 50 - .../trace_service_descriptor_config.php | 78 - .../trace_service_rest_client_config.php | 68 - .../Unit/V1/Client/TraceServiceClientTest.php | 313 - .../Google/Devtools/Cloudtrace/V2/Trace.php | 29 - .../Google/Devtools/Cloudtrace/V2/Tracing.php | 30 - .../Google/Cloud/Trace/V2/AttributeValue.php | 141 - .../Cloud/Trace/V2/BatchWriteSpansRequest.php | 127 - .../src/Google/Cloud/Trace/V2/Module.php | 129 - .../proto/src/Google/Cloud/Trace/V2/Span.php | 783 --- .../Google/Cloud/Trace/V2/Span/Attributes.php | 129 - .../src/Google/Cloud/Trace/V2/Span/Link.php | 186 - .../Google/Cloud/Trace/V2/Span/Link/Type.php | 62 - .../src/Google/Cloud/Trace/V2/Span/Links.php | 106 - .../Google/Cloud/Trace/V2/Span/SpanKind.php | 92 - .../Google/Cloud/Trace/V2/Span/TimeEvent.php | 152 - .../Trace/V2/Span/TimeEvent/Annotation.php | 129 - .../Trace/V2/Span/TimeEvent/MessageEvent.php | 185 - .../V2/Span/TimeEvent/MessageEvent/Type.php | 61 - .../Google/Cloud/Trace/V2/Span/TimeEvents.php | 145 - .../src/Google/Cloud/Trace/V2/StackTrace.php | 135 - .../Cloud/Trace/V2/StackTrace/StackFrame.php | 345 - .../Cloud/Trace/V2/StackTrace/StackFrames.php | 109 - .../Cloud/Trace/V2/TruncatableString.php | 125 - .../TraceServiceClient/batch_write_spans.php | 103 - .../V2/TraceServiceClient/create_span.php | 91 - .../v2/src/V2/Client/TraceServiceClient.php | 304 - .../Trace/v2/src/V2/gapic_metadata.json | 28 - .../trace_service_client_config.json | 58 - .../trace_service_descriptor_config.php | 56 - .../trace_service_rest_client_config.php | 53 - .../Unit/V2/Client/TraceServiceClientTest.php | 254 - .../Google/Cloud/Visionai/V1/Annotations.php | 26 - .../Google/Cloud/Visionai/V1/Common.php | 27 - .../Cloud/Visionai/V1/HealthService.php | 27 - .../Google/Cloud/Visionai/V1/Lva.php | 24 - .../Google/Cloud/Visionai/V1/LvaResources.php | 28 - .../Google/Cloud/Visionai/V1/LvaService.php | 33 - .../Google/Cloud/Visionai/V1/Platform.php | 36 - .../Cloud/Visionai/V1/StreamingResources.php | 29 - .../Cloud/Visionai/V1/StreamingService.php | 29 - .../Cloud/Visionai/V1/StreamsResources.php | 28 - .../Cloud/Visionai/V1/StreamsService.php | 34 - .../Google/Cloud/Visionai/V1/Warehouse.php | 38 - .../V1/AIEnabledDevicesInputConfig.php | 33 - .../Cloud/VisionAI/V1/AcceleratorType.php | 103 - .../Cloud/VisionAI/V1/AcquireLeaseRequest.php | 179 - .../V1/AddApplicationStreamInputRequest.php | 203 - .../V1/AddApplicationStreamInputResponse.php | 33 - .../VisionAI/V1/AddCollectionItemRequest.php | 90 - .../VisionAI/V1/AddCollectionItemResponse.php | 77 - .../src/Google/Cloud/VisionAI/V1/Analysis.php | 371 -- .../Cloud/VisionAI/V1/AnalysisDefinition.php | 72 - .../VisionAI/V1/AnalyzeAssetMetadata.php | 155 - .../AnalyzeAssetMetadata/AnalysisStatus.php | 131 - .../AnalysisStatus/State.php | 68 - .../Cloud/VisionAI/V1/AnalyzeAssetRequest.php | 75 - .../VisionAI/V1/AnalyzeAssetResponse.php | 33 - .../VisionAI/V1/AnalyzeCorpusMetadata.php | 77 - .../VisionAI/V1/AnalyzeCorpusRequest.php | 75 - .../VisionAI/V1/AnalyzeCorpusResponse.php | 33 - .../Cloud/VisionAI/V1/AnalyzerDefinition.php | 280 - .../V1/AnalyzerDefinition/DebugOptions.php | 67 - .../V1/AnalyzerDefinition/OperatorOption.php | 101 - .../V1/AnalyzerDefinition/StreamInput.php | 79 - .../Google/Cloud/VisionAI/V1/Annotation.php | 120 - .../V1/AnnotationCustomizedStruct.php | 67 - .../Cloud/VisionAI/V1/AnnotationList.php | 67 - .../VisionAI/V1/AnnotationMatchingResult.php | 167 - .../Cloud/VisionAI/V1/AnnotationValue.php | 375 -- .../V1/AppPlatformCloudFunctionRequest.php | 118 - .../StructedInputAnnotation.php | 112 - .../V1/AppPlatformCloudFunctionResponse.php | 155 - .../StructedOutputAnnotation.php | 78 - .../VisionAI/V1/AppPlatformEventBody.php | 165 - .../Cloud/VisionAI/V1/AppPlatformMetadata.php | 175 - .../Google/Cloud/VisionAI/V1/Application.php | 417 -- .../V1/Application/ApplicationRuntimeInfo.php | 155 - .../GlobalOutputResource.php | 159 - .../MonitoringConfig.php | 67 - .../VisionAI/V1/Application/BillingMode.php | 61 - .../Cloud/VisionAI/V1/Application/State.php | 117 - .../Cloud/VisionAI/V1/ApplicationConfigs.php | 111 - .../EventDeliveryConfig.php | 135 - .../Cloud/VisionAI/V1/ApplicationInstance.php | 111 - .../VisionAI/V1/ApplicationNodeAnnotation.php | 102 - .../VisionAI/V1/ApplicationStreamInput.php | 70 - .../src/Google/Cloud/VisionAI/V1/Asset.php | 178 - .../Google/Cloud/VisionAI/V1/AssetSource.php | 108 - .../V1/AssetSource/AssetContentData.php | 60 - .../V1/AssetSource/AssetGcsSource.php | 67 - .../Cloud/VisionAI/V1/AttributeValue.php | 174 - .../VisionAI/V1/AutoscalingMetricSpec.php | 131 - .../VisionAI/V1/BatchOperationStatus.php | 109 - .../VisionAI/V1/BatchRunProcessRequest.php | 195 - .../BatchRunProcessOptions.php | 101 - .../VisionAI/V1/BatchRunProcessResponse.php | 101 - .../Cloud/VisionAI/V1/BigQueryConfig.php | 259 - .../Google/Cloud/VisionAI/V1/BoolValue.php | 58 - .../src/Google/Cloud/VisionAI/V1/Channel.php | 291 - .../Google/Cloud/VisionAI/V1/CircleArea.php | 135 - .../V1/ClassificationPredictionResult.php | 143 - .../Cloud/VisionAI/V1/ClipAssetRequest.php | 119 - .../Cloud/VisionAI/V1/ClipAssetResponse.php | 71 - .../V1/ClipAssetResponse/TimeIndexedUri.php | 111 - .../src/Google/Cloud/VisionAI/V1/Cluster.php | 325 - .../Cloud/VisionAI/V1/Cluster/State.php | 77 - .../Google/Cloud/VisionAI/V1/ClusterInfo.php | 99 - .../Google/Cloud/VisionAI/V1/Collection.php | 148 - .../Cloud/VisionAI/V1/CollectionItem.php | 148 - .../Cloud/VisionAI/V1/CollectionItem/Type.php | 54 - .../Cloud/VisionAI/V1/CommitRequest.php | 69 - .../Cloud/VisionAI/V1/ControlledMode.php | 143 - .../src/Google/Cloud/VisionAI/V1/Corpus.php | 387 -- .../Google/Cloud/VisionAI/V1/Corpus/Type.php | 69 - .../VisionAI/V1/CreateAnalysisRequest.php | 237 - .../VisionAI/V1/CreateAnnotationRequest.php | 209 - .../V1/CreateApplicationInstancesRequest.php | 199 - .../V1/CreateApplicationInstancesResponse.php | 33 - .../VisionAI/V1/CreateApplicationRequest.php | 235 - .../Cloud/VisionAI/V1/CreateAssetRequest.php | 209 - .../VisionAI/V1/CreateClusterRequest.php | 237 - .../VisionAI/V1/CreateCollectionMetadata.php | 77 - .../VisionAI/V1/CreateCollectionRequest.php | 204 - .../VisionAI/V1/CreateCorpusMetadata.php | 121 - .../Cloud/VisionAI/V1/CreateCorpusRequest.php | 126 - .../VisionAI/V1/CreateDataSchemaRequest.php | 137 - .../Cloud/VisionAI/V1/CreateDraftRequest.php | 237 - .../Cloud/VisionAI/V1/CreateEventRequest.php | 237 - .../V1/CreateIndexEndpointMetadata.php | 77 - .../V1/CreateIndexEndpointRequest.php | 189 - .../Cloud/VisionAI/V1/CreateIndexMetadata.php | 77 - .../Cloud/VisionAI/V1/CreateIndexRequest.php | 199 - .../VisionAI/V1/CreateOperatorRequest.php | 237 - .../VisionAI/V1/CreateProcessRequest.php | 237 - .../VisionAI/V1/CreateProcessorRequest.php | 237 - .../VisionAI/V1/CreateSearchConfigRequest.php | 188 - .../V1/CreateSearchHypernymRequest.php | 183 - .../Cloud/VisionAI/V1/CreateSeriesRequest.php | 237 - .../Cloud/VisionAI/V1/CreateStreamRequest.php | 237 - .../src/Google/Cloud/VisionAI/V1/Criteria.php | 336 - .../VisionAI/V1/CustomProcessorSourceInfo.php | 240 - .../CustomProcessorSourceInfo/ModelSchema.php | 178 - .../ProductRecognizerArtifact.php | 113 - .../CustomProcessorSourceInfo/SourceType.php | 68 - .../Google/Cloud/VisionAI/V1/DataSchema.php | 166 - .../Cloud/VisionAI/V1/DataSchemaDetails.php | 298 - .../CustomizedStructConfig.php | 67 - .../V1/DataSchemaDetails/DataType.php | 176 - .../V1/DataSchemaDetails/Granularity.php | 61 - .../V1/DataSchemaDetails/ListConfig.php | 77 - .../V1/DataSchemaDetails/ProtoAnyConfig.php | 67 - .../V1/DataSchemaDetails/SearchStrategy.php | 149 - .../ConfidenceScoreIndexConfig.php | 258 - .../SearchStrategy/SearchStrategyType.php | 63 - .../src/Google/Cloud/VisionAI/V1/DataType.php | 77 - .../Cloud/VisionAI/V1/DateTimeRange.php | 121 - .../Cloud/VisionAI/V1/DateTimeRangeArray.php | 67 - .../Cloud/VisionAI/V1/DedicatedResources.php | 328 - .../VisionAI/V1/DeleteAnalysisRequest.php | 155 - .../VisionAI/V1/DeleteAnnotationRequest.php | 91 - .../V1/DeleteApplicationInstancesRequest.php | 199 - .../V1/DeleteApplicationInstancesResponse.php | 33 - .../VisionAI/V1/DeleteApplicationRequest.php | 197 - .../Cloud/VisionAI/V1/DeleteAssetMetadata.php | 34 - .../Cloud/VisionAI/V1/DeleteAssetRequest.php | 91 - .../VisionAI/V1/DeleteClusterRequest.php | 155 - .../VisionAI/V1/DeleteCollectionMetadata.php | 77 - .../VisionAI/V1/DeleteCollectionRequest.php | 86 - .../Cloud/VisionAI/V1/DeleteCorpusRequest.php | 81 - .../VisionAI/V1/DeleteDataSchemaRequest.php | 91 - .../Cloud/VisionAI/V1/DeleteDraftRequest.php | 155 - .../Cloud/VisionAI/V1/DeleteEventRequest.php | 155 - .../V1/DeleteIndexEndpointMetadata.php | 77 - .../V1/DeleteIndexEndpointRequest.php | 81 - .../Cloud/VisionAI/V1/DeleteIndexMetadata.php | 33 - .../Cloud/VisionAI/V1/DeleteIndexRequest.php | 91 - .../VisionAI/V1/DeleteOperatorRequest.php | 155 - .../VisionAI/V1/DeleteProcessRequest.php | 155 - .../VisionAI/V1/DeleteProcessorRequest.php | 155 - .../VisionAI/V1/DeleteSearchConfigRequest.php | 91 - .../V1/DeleteSearchHypernymRequest.php | 91 - .../Cloud/VisionAI/V1/DeleteSeriesRequest.php | 155 - .../Cloud/VisionAI/V1/DeleteStreamRequest.php | 155 - .../VisionAI/V1/DeployApplicationRequest.php | 241 - .../VisionAI/V1/DeployApplicationResponse.php | 34 - .../Cloud/VisionAI/V1/DeployIndexMetadata.php | 111 - .../Cloud/VisionAI/V1/DeployIndexRequest.php | 119 - .../Cloud/VisionAI/V1/DeployIndexResponse.php | 33 - .../Cloud/VisionAI/V1/DeployedIndex.php | 75 - .../VisionAI/V1/DeployedIndexReference.php | 67 - .../src/Google/Cloud/VisionAI/V1/Draft.php | 301 - .../Google/Cloud/VisionAI/V1/EagerMode.php | 33 - .../src/Google/Cloud/VisionAI/V1/Event.php | 313 - .../Google/Cloud/VisionAI/V1/Event/Clock.php | 62 - .../Google/Cloud/VisionAI/V1/EventUpdate.php | 217 - .../Google/Cloud/VisionAI/V1/FacetBucket.php | 146 - .../Cloud/VisionAI/V1/FacetBucket/Range.php | 121 - .../Cloud/VisionAI/V1/FacetBucketType.php | 75 - .../Google/Cloud/VisionAI/V1/FacetGroup.php | 224 - .../Cloud/VisionAI/V1/FacetProperty.php | 329 - .../FacetProperty/CustomRangeBucketSpec.php | 74 - .../V1/FacetProperty/DateTimeBucketSpec.php | 67 - .../DateTimeBucketSpec/Granularity.php | 68 - .../V1/FacetProperty/FixedRangeBucketSpec.php | 169 - .../Google/Cloud/VisionAI/V1/FacetValue.php | 141 - .../Google/Cloud/VisionAI/V1/FloatRange.php | 121 - .../Cloud/VisionAI/V1/FloatRangeArray.php | 67 - .../Cloud/VisionAI/V1/GcsOutputConfig.php | 67 - .../Google/Cloud/VisionAI/V1/GcsSource.php | 67 - .../V1/GeneralObjectDetectionConfig.php | 33 - .../VisionAI/V1/GenerateHlsUriRequest.php | 151 - .../VisionAI/V1/GenerateHlsUriResponse.php | 109 - .../V1/GenerateRetrievalUrlRequest.php | 75 - .../V1/GenerateRetrievalUrlResponse.php | 67 - .../V1/GenerateStreamHlsTokenRequest.php | 80 - .../V1/GenerateStreamHlsTokenResponse.php | 127 - .../Cloud/VisionAI/V1/GeoCoordinate.php | 101 - .../Cloud/VisionAI/V1/GeoLocationArray.php | 67 - .../Cloud/VisionAI/V1/GetAnalysisRequest.php | 81 - .../VisionAI/V1/GetAnnotationRequest.php | 91 - .../VisionAI/V1/GetApplicationRequest.php | 81 - .../Cloud/VisionAI/V1/GetAssetRequest.php | 91 - .../Cloud/VisionAI/V1/GetClusterRequest.php | 81 - .../VisionAI/V1/GetCollectionRequest.php | 86 - .../Cloud/VisionAI/V1/GetCorpusRequest.php | 81 - .../VisionAI/V1/GetDataSchemaRequest.php | 91 - .../Cloud/VisionAI/V1/GetDraftRequest.php | 81 - .../Cloud/VisionAI/V1/GetEventRequest.php | 81 - .../VisionAI/V1/GetIndexEndpointRequest.php | 81 - .../Cloud/VisionAI/V1/GetIndexRequest.php | 91 - .../Cloud/VisionAI/V1/GetInstanceRequest.php | 81 - .../Cloud/VisionAI/V1/GetOperatorRequest.php | 81 - .../Cloud/VisionAI/V1/GetProcessRequest.php | 81 - .../Cloud/VisionAI/V1/GetProcessorRequest.php | 81 - .../VisionAI/V1/GetSearchConfigRequest.php | 91 - .../VisionAI/V1/GetSearchHypernymRequest.php | 91 - .../Cloud/VisionAI/V1/GetSeriesRequest.php | 81 - .../Cloud/VisionAI/V1/GetStreamRequest.php | 81 - .../VisionAI/V1/GetStreamThumbnailRequest.php | 228 - .../V1/GetStreamThumbnailResponse.php | 34 - .../VisionAI/V1/GstreamerBufferDescriptor.php | 233 - .../Cloud/VisionAI/V1/HealthCheckRequest.php | 67 - .../Cloud/VisionAI/V1/HealthCheckResponse.php | 145 - .../ImageObjectDetectionPredictionResult.php | 205 - .../Google/Cloud/VisionAI/V1/ImageQuery.php | 114 - .../V1/ImageSegmentationPredictionResult.php | 137 - .../VisionAI/V1/ImportAssetsMetadata.php | 125 - .../Cloud/VisionAI/V1/ImportAssetsRequest.php | 126 - .../VisionAI/V1/ImportAssetsResponse.php | 33 - .../src/Google/Cloud/VisionAI/V1/Index.php | 455 -- .../Google/Cloud/VisionAI/V1/Index/State.php | 69 - .../Cloud/VisionAI/V1/IndexAssetMetadata.php | 165 - .../Cloud/VisionAI/V1/IndexAssetRequest.php | 117 - .../Cloud/VisionAI/V1/IndexAssetResponse.php | 33 - .../Cloud/VisionAI/V1/IndexEndpoint.php | 523 -- .../Cloud/VisionAI/V1/IndexEndpoint/State.php | 75 - .../Google/Cloud/VisionAI/V1/IndexedAsset.php | 205 - .../Cloud/VisionAI/V1/IndexingStatus.php | 101 - .../VisionAI/V1/IndexingStatus/State.php | 68 - .../Cloud/VisionAI/V1/IngestAssetRequest.php | 114 - .../VisionAI/V1/IngestAssetRequest/Config.php | 113 - .../IngestAssetRequest/Config/VideoType.php | 67 - .../Config/VideoType/ContainerFormat.php | 54 - .../V1/IngestAssetRequest/TimeIndexedData.php | 111 - .../Cloud/VisionAI/V1/IngestAssetResponse.php | 77 - .../src/Google/Cloud/VisionAI/V1/Instance.php | 406 -- .../VisionAI/V1/Instance/InputResource.php | 301 - .../VisionAI/V1/Instance/InstanceType.php | 70 - .../VisionAI/V1/Instance/OutputResource.php | 235 - .../Cloud/VisionAI/V1/Instance/State.php | 124 - .../src/Google/Cloud/VisionAI/V1/IntRange.php | 121 - .../Cloud/VisionAI/V1/IntRangeArray.php | 67 - .../src/Google/Cloud/VisionAI/V1/Lease.php | 213 - .../Google/Cloud/VisionAI/V1/LeaseType.php | 61 - .../Cloud/VisionAI/V1/ListAnalysesRequest.php | 221 - .../VisionAI/V1/ListAnalysesResponse.php | 135 - .../VisionAI/V1/ListAnnotationsRequest.php | 268 - .../VisionAI/V1/ListAnnotationsResponse.php | 105 - .../VisionAI/V1/ListApplicationsRequest.php | 221 - .../VisionAI/V1/ListApplicationsResponse.php | 135 - .../Cloud/VisionAI/V1/ListAssetsRequest.php | 229 - .../Cloud/VisionAI/V1/ListAssetsResponse.php | 105 - .../Cloud/VisionAI/V1/ListClustersRequest.php | 221 - .../VisionAI/V1/ListClustersResponse.php | 135 - .../VisionAI/V1/ListCollectionsRequest.php | 174 - .../VisionAI/V1/ListCollectionsResponse.php | 105 - .../Cloud/VisionAI/V1/ListCorporaRequest.php | 230 - .../Cloud/VisionAI/V1/ListCorporaResponse.php | 113 - .../VisionAI/V1/ListDataSchemasRequest.php | 179 - .../VisionAI/V1/ListDataSchemasResponse.php | 105 - .../Cloud/VisionAI/V1/ListDraftsRequest.php | 221 - .../Cloud/VisionAI/V1/ListDraftsResponse.php | 135 - .../Cloud/VisionAI/V1/ListEventsRequest.php | 221 - .../Cloud/VisionAI/V1/ListEventsResponse.php | 135 - .../VisionAI/V1/ListIndexEndpointsRequest.php | 235 - .../V1/ListIndexEndpointsResponse.php | 101 - .../Cloud/VisionAI/V1/ListIndexesRequest.php | 183 - .../Cloud/VisionAI/V1/ListIndexesResponse.php | 105 - .../VisionAI/V1/ListInstancesRequest.php | 221 - .../VisionAI/V1/ListInstancesResponse.php | 135 - .../VisionAI/V1/ListOperatorsRequest.php | 221 - .../VisionAI/V1/ListOperatorsResponse.php | 135 - .../V1/ListPrebuiltProcessorsRequest.php | 81 - .../V1/ListPrebuiltProcessorsResponse.php | 67 - .../VisionAI/V1/ListProcessesRequest.php | 221 - .../VisionAI/V1/ListProcessesResponse.php | 135 - .../VisionAI/V1/ListProcessorsRequest.php | 221 - .../VisionAI/V1/ListProcessorsResponse.php | 135 - .../V1/ListPublicOperatorsRequest.php | 221 - .../V1/ListPublicOperatorsResponse.php | 101 - .../VisionAI/V1/ListSearchConfigsRequest.php | 183 - .../VisionAI/V1/ListSearchConfigsResponse.php | 105 - .../V1/ListSearchHypernymsRequest.php | 183 - .../V1/ListSearchHypernymsResponse.php | 105 - .../Cloud/VisionAI/V1/ListSeriesRequest.php | 221 - .../Cloud/VisionAI/V1/ListSeriesResponse.php | 135 - .../Cloud/VisionAI/V1/ListStreamsRequest.php | 221 - .../Cloud/VisionAI/V1/ListStreamsResponse.php | 135 - .../Google/Cloud/VisionAI/V1/MachineSpec.php | 171 - .../VisionAI/V1/MaterializeChannelRequest.php | 237 - .../VisionAI/V1/MediaWarehouseConfig.php | 164 - .../Google/Cloud/VisionAI/V1/ModelType.php | 124 - .../src/Google/Cloud/VisionAI/V1/Node.php | 305 - .../Cloud/VisionAI/V1/Node/InputEdge.php | 143 - .../Cloud/VisionAI/V1/NormalizedPolygon.php | 71 - .../Cloud/VisionAI/V1/NormalizedPolyline.php | 68 - .../Cloud/VisionAI/V1/NormalizedVertex.php | 103 - .../V1/ObjectDetectionPredictionResult.php | 111 - .../Entity.php | 101 - .../IdentifiedBox.php | 189 - .../IdentifiedBox/NormalizedBoundingBox.php | 169 - .../VisionAI/V1/OccupancyCountConfig.php | 147 - .../V1/OccupancyCountingPredictionResult.php | 275 - .../DwellTimeInfo.php | 189 - .../Entity.php | 101 - .../IdentifiedBox.php | 227 - .../IdentifiedBox/NormalizedBoundingBox.php | 169 - .../Stats.php | 135 - .../Stats/AccumulatedObjectCount.php | 122 - .../Stats/ActiveZoneCount.php | 111 - .../Stats/CrossingLineCount.php | 213 - .../Stats/ObjectCount.php | 112 - .../TrackInfo.php | 111 - .../Cloud/VisionAI/V1/OperationMetadata.php | 307 - .../src/Google/Cloud/VisionAI/V1/Operator.php | 267 - .../Cloud/VisionAI/V1/OperatorDefinition.php | 291 - .../OperatorDefinition/ArgumentDefinition.php | 114 - .../AttributeDefinition.php | 157 - .../Cloud/VisionAI/V1/OperatorQuery.php | 135 - .../src/Google/Cloud/VisionAI/V1/Packet.php | 111 - .../Google/Cloud/VisionAI/V1/PacketHeader.php | 369 -- .../Google/Cloud/VisionAI/V1/PacketType.php | 115 - .../VisionAI/V1/PacketType/TypeDescriptor.php | 166 - .../Google/Cloud/VisionAI/V1/Partition.php | 166 - .../Partition/RelativeTemporalPartition.php | 122 - .../V1/Partition/SpatialPartition.php | 209 - .../V1/Partition/TemporalPartition.php | 122 - .../Cloud/VisionAI/V1/PersonBlurConfig.php | 101 - .../V1/PersonBlurConfig/PersonBlurType.php | 61 - .../V1/PersonVehicleDetectionConfig.php | 117 - ...onalProtectiveEquipmentDetectionConfig.php | 135 - ...onalProtectiveEquipmentDetectionOutput.php | 111 - .../DetectedPerson.php | 414 -- .../NormalizedBoundingBox.php | 169 - .../PPEEntity.php | 173 - .../PPEIdentifiedBox.php | 189 - .../PersonEntity.php | 67 - .../PersonIdentifiedBox.php | 190 - .../src/Google/Cloud/VisionAI/V1/Process.php | 427 -- .../Google/Cloud/VisionAI/V1/Processor.php | 593 -- .../VisionAI/V1/Processor/ProcessorState.php | 73 - .../VisionAI/V1/Processor/ProcessorType.php | 78 - .../Cloud/VisionAI/V1/ProcessorConfig.php | 618 -- .../Cloud/VisionAI/V1/ProcessorIOSpec.php | 185 - .../ProcessorIOSpec/GraphInputChannelSpec.php | 235 - .../GraphOutputChannelSpec.php | 128 - .../InstanceResourceInputBindingSpec.php | 151 - .../InstanceResourceOutputBindingSpec.php | 137 - .../VisionAI/V1/ProductRecognizerConfig.php | 105 - .../Cloud/VisionAI/V1/RawImageDescriptor.php | 135 - .../V1/ReceiveEventsControlResponse.php | 126 - .../VisionAI/V1/ReceiveEventsRequest.php | 108 - .../V1/ReceiveEventsRequest/SetupRequest.php | 300 - .../VisionAI/V1/ReceiveEventsResponse.php | 108 - .../V1/ReceivePacketsControlResponse.php | 126 - .../VisionAI/V1/ReceivePacketsRequest.php | 111 - .../V1/ReceivePacketsRequest/SetupRequest.php | 306 - .../VisionAI/V1/ReceivePacketsResponse.php | 108 - .../src/Google/Cloud/VisionAI/V1/Registry.php | 65 - .../Cloud/VisionAI/V1/ReleaseLeaseRequest.php | 135 - .../VisionAI/V1/ReleaseLeaseResponse.php | 33 - .../RemoveApplicationStreamInputRequest.php | 199 - .../TargetStreamInput.php | 60 - .../RemoveApplicationStreamInputResponse.php | 33 - .../V1/RemoveCollectionItemRequest.php | 90 - .../V1/RemoveCollectionItemResponse.php | 77 - .../VisionAI/V1/RemoveIndexAssetMetadata.php | 165 - .../VisionAI/V1/RemoveIndexAssetRequest.php | 117 - .../VisionAI/V1/RemoveIndexAssetResponse.php | 33 - .../Cloud/VisionAI/V1/RenewLeaseRequest.php | 179 - .../Cloud/VisionAI/V1/RequestMetadata.php | 259 - .../V1/ResolveOperatorInfoRequest.php | 117 - .../V1/ResolveOperatorInfoResponse.php | 67 - .../Cloud/VisionAI/V1/ResourceAnnotations.php | 129 - .../VisionAI/V1/ResourceSpecification.php | 337 - .../src/Google/Cloud/VisionAI/V1/RunMode.php | 63 - .../Google/Cloud/VisionAI/V1/RunStatus.php | 101 - .../Cloud/VisionAI/V1/RunStatus/State.php | 84 - .../VisionAI/V1/SchemaKeySortingStrategy.php | 67 - .../V1/SchemaKeySortingStrategy/Option.php | 149 - .../Option/AggregateMethod.php | 66 - .../Cloud/VisionAI/V1/SearchAssetsRequest.php | 409 -- .../VisionAI/V1/SearchAssetsResponse.php | 139 - .../Cloud/VisionAI/V1/SearchCapability.php | 67 - .../VisionAI/V1/SearchCapability/Type.php | 54 - .../VisionAI/V1/SearchCapabilitySetting.php | 67 - .../Google/Cloud/VisionAI/V1/SearchConfig.php | 176 - .../VisionAI/V1/SearchCriteriaProperty.php | 143 - .../Cloud/VisionAI/V1/SearchHypernym.php | 148 - .../V1/SearchIndexEndpointRequest.php | 310 - .../V1/SearchIndexEndpointResponse.php | 105 - .../Cloud/VisionAI/V1/SearchResultItem.php | 304 - .../Cloud/VisionAI/V1/SendPacketsRequest.php | 108 - .../Cloud/VisionAI/V1/SendPacketsResponse.php | 33 - .../src/Google/Cloud/VisionAI/V1/Series.php | 291 - .../Cloud/VisionAI/V1/SeriesMetadata.php | 71 - .../Cloud/VisionAI/V1/ServerMetadata.php | 131 - .../src/Google/Cloud/VisionAI/V1/Stream.php | 335 - .../Cloud/VisionAI/V1/StreamAnnotation.php | 252 - .../VisionAI/V1/StreamAnnotationType.php | 66 - .../Cloud/VisionAI/V1/StreamAnnotations.php | 67 - .../VisionAI/V1/StreamWithAnnotation.php | 164 - .../StreamWithAnnotation/NodeAnnotation.php | 101 - .../Google/Cloud/VisionAI/V1/StringArray.php | 67 - .../Cloud/VisionAI/V1/TagParsingConfig.php | 71 - .../TagParsingConfig/EntityParsingConfig.php | 139 - .../EntityMatchingStrategy.php | 62 - .../Cloud/VisionAI/V1/TagRecognizerConfig.php | 115 - .../V1/UndeployApplicationRequest.php | 165 - .../V1/UndeployApplicationResponse.php | 33 - .../VisionAI/V1/UndeployIndexMetadata.php | 111 - .../VisionAI/V1/UndeployIndexRequest.php | 75 - .../VisionAI/V1/UndeployIndexResponse.php | 33 - .../VisionAI/V1/UniversalInputConfig.php | 33 - .../VisionAI/V1/UpdateAnalysisRequest.php | 230 - .../VisionAI/V1/UpdateAnnotationRequest.php | 151 - .../V1/UpdateApplicationInstancesRequest.php | 232 - .../UpdateApplicationInstance.php | 169 - .../V1/UpdateApplicationInstancesResponse.php | 33 - .../VisionAI/V1/UpdateApplicationRequest.php | 230 - .../UpdateApplicationStreamInputRequest.php | 241 - .../UpdateApplicationStreamInputResponse.php | 33 - .../Cloud/VisionAI/V1/UpdateAssetRequest.php | 152 - .../VisionAI/V1/UpdateClusterRequest.php | 230 - .../VisionAI/V1/UpdateCollectionRequest.php | 182 - .../Cloud/VisionAI/V1/UpdateCorpusRequest.php | 136 - .../VisionAI/V1/UpdateDataSchemaRequest.php | 146 - .../Cloud/VisionAI/V1/UpdateDraftRequest.php | 268 - .../Cloud/VisionAI/V1/UpdateEventRequest.php | 230 - .../V1/UpdateIndexEndpointMetadata.php | 77 - .../V1/UpdateIndexEndpointRequest.php | 166 - .../Cloud/VisionAI/V1/UpdateIndexMetadata.php | 77 - .../Cloud/VisionAI/V1/UpdateIndexRequest.php | 161 - .../VisionAI/V1/UpdateOperatorRequest.php | 230 - .../VisionAI/V1/UpdateProcessRequest.php | 230 - .../VisionAI/V1/UpdateProcessorRequest.php | 230 - .../VisionAI/V1/UpdateSearchConfigRequest.php | 157 - .../V1/UpdateSearchHypernymRequest.php | 156 - .../Cloud/VisionAI/V1/UpdateSeriesRequest.php | 230 - .../Cloud/VisionAI/V1/UpdateStreamRequest.php | 230 - .../Cloud/VisionAI/V1/UploadAssetMetadata.php | 121 - .../Cloud/VisionAI/V1/UploadAssetRequest.php | 119 - .../Cloud/VisionAI/V1/UploadAssetResponse.php | 33 - .../VisionAI/V1/UserSpecifiedAnnotation.php | 163 - .../VisionAI/V1/VertexAutoMLVideoConfig.php | 185 - .../VisionAI/V1/VertexAutoMLVisionConfig.php | 109 - .../Cloud/VisionAI/V1/VertexCustomConfig.php | 351 - ...VideoActionRecognitionPredictionResult.php | 167 - .../IdentifiedAction.php | 141 - .../VideoClassificationPredictionResult.php | 171 - .../IdentifiedClassification.php | 141 - .../VideoObjectTrackingPredictionResult.php | 167 - .../BoundingBox.php | 171 - .../DetectedObject.php | 231 - .../VisionAI/V1/VideoStreamInputConfig.php | 108 - .../V1/ViewCollectionItemsRequest.php | 178 - .../V1/ViewCollectionItemsResponse.php | 105 - .../VisionAI/V1/ViewIndexedAssetsRequest.php | 229 - .../VisionAI/V1/ViewIndexedAssetsResponse.php | 105 - .../add_application_stream_input.php | 88 - .../AppPlatformClient/create_application.php | 94 - .../create_application_instances.php | 108 - .../V1/AppPlatformClient/create_draft.php | 94 - .../V1/AppPlatformClient/create_processor.php | 94 - .../AppPlatformClient/delete_application.php | 80 - .../delete_application_instances.php | 99 - .../V1/AppPlatformClient/delete_draft.php | 85 - .../V1/AppPlatformClient/delete_processor.php | 80 - .../AppPlatformClient/deploy_application.php | 85 - .../V1/AppPlatformClient/get_application.php | 71 - .../V1/AppPlatformClient/get_draft.php | 76 - .../V1/AppPlatformClient/get_instance.php | 76 - .../V1/AppPlatformClient/get_location.php | 57 - .../V1/AppPlatformClient/get_processor.php | 71 - .../AppPlatformClient/list_applications.php | 76 - .../V1/AppPlatformClient/list_drafts.php | 76 - .../V1/AppPlatformClient/list_instances.php | 76 - .../V1/AppPlatformClient/list_locations.php | 62 - .../list_prebuilt_processors.php | 72 - .../V1/AppPlatformClient/list_processors.php | 76 - .../remove_application_stream_input.php | 87 - .../undeploy_application.php | 85 - .../AppPlatformClient/update_application.php | 84 - .../update_application_instances.php | 88 - .../update_application_stream_input.php | 87 - .../V1/AppPlatformClient/update_draft.php | 84 - .../V1/AppPlatformClient/update_processor.php | 84 - .../HealthCheckServiceClient/get_location.php | 57 - .../HealthCheckServiceClient/health_check.php | 57 - .../list_locations.php | 62 - .../batch_run_process.php | 120 - .../create_analysis.php | 88 - .../create_operator.php | 88 - .../create_process.php | 100 - .../delete_analysis.php | 85 - .../delete_operator.php | 80 - .../delete_process.php | 85 - .../LiveVideoAnalyticsClient/get_analysis.php | 76 - .../LiveVideoAnalyticsClient/get_location.php | 57 - .../LiveVideoAnalyticsClient/get_operator.php | 71 - .../LiveVideoAnalyticsClient/get_process.php | 76 - .../list_analyses.php | 76 - .../list_locations.php | 62 - .../list_operators.php | 76 - .../list_processes.php | 76 - .../list_public_operators.php | 76 - .../resolve_operator_info.php | 78 - .../update_analysis.php | 74 - .../update_operator.php | 74 - .../update_process.php | 93 - .../StreamingServiceClient/acquire_lease.php | 57 - .../StreamingServiceClient/get_location.php | 57 - .../StreamingServiceClient/list_locations.php | 62 - .../StreamingServiceClient/receive_events.php | 63 - .../receive_packets.php | 63 - .../StreamingServiceClient/release_lease.php | 57 - .../V1/StreamingServiceClient/renew_lease.php | 57 - .../StreamingServiceClient/send_packets.php | 63 - .../StreamsServiceClient/create_cluster.php | 88 - .../V1/StreamsServiceClient/create_event.php | 88 - .../V1/StreamsServiceClient/create_series.php | 110 - .../V1/StreamsServiceClient/create_stream.php | 88 - .../StreamsServiceClient/delete_cluster.php | 80 - .../V1/StreamsServiceClient/delete_event.php | 80 - .../V1/StreamsServiceClient/delete_series.php | 85 - .../V1/StreamsServiceClient/delete_stream.php | 85 - .../generate_stream_hls_token.php | 70 - .../V1/StreamsServiceClient/get_cluster.php | 71 - .../V1/StreamsServiceClient/get_event.php | 71 - .../V1/StreamsServiceClient/get_location.php | 57 - .../V1/StreamsServiceClient/get_series.php | 76 - .../V1/StreamsServiceClient/get_stream.php | 76 - .../get_stream_thumbnail.php | 85 - .../V1/StreamsServiceClient/list_clusters.php | 76 - .../V1/StreamsServiceClient/list_events.php | 76 - .../StreamsServiceClient/list_locations.php | 62 - .../V1/StreamsServiceClient/list_series.php | 76 - .../V1/StreamsServiceClient/list_streams.php | 76 - .../materialize_channel.php | 115 - .../StreamsServiceClient/update_cluster.php | 74 - .../V1/StreamsServiceClient/update_event.php | 74 - .../V1/StreamsServiceClient/update_series.php | 102 - .../V1/StreamsServiceClient/update_stream.php | 74 - .../WarehouseClient/add_collection_item.php | 92 - .../V1/WarehouseClient/analyze_asset.php | 90 - .../V1/WarehouseClient/analyze_corpus.php | 85 - .../samples/V1/WarehouseClient/clip_asset.php | 86 - .../V1/WarehouseClient/create_annotation.php | 80 - .../V1/WarehouseClient/create_asset.php | 75 - .../V1/WarehouseClient/create_collection.php | 86 - .../V1/WarehouseClient/create_corpus.php | 88 - .../V1/WarehouseClient/create_data_schema.php | 81 - .../V1/WarehouseClient/create_index.php | 87 - .../WarehouseClient/create_index_endpoint.php | 85 - .../WarehouseClient/create_search_config.php | 95 - .../create_search_hypernym.php | 74 - .../V1/WarehouseClient/delete_annotation.php | 77 - .../V1/WarehouseClient/delete_asset.php | 87 - .../V1/WarehouseClient/delete_collection.php | 86 - .../V1/WarehouseClient/delete_corpus.php | 70 - .../V1/WarehouseClient/delete_data_schema.php | 76 - .../V1/WarehouseClient/delete_index.php | 88 - .../WarehouseClient/delete_index_endpoint.php | 80 - .../WarehouseClient/delete_search_config.php | 79 - .../delete_search_hypernym.php | 76 - .../V1/WarehouseClient/deploy_index.php | 105 - .../V1/WarehouseClient/generate_hls_uri.php | 80 - .../generate_retrieval_url.php | 80 - .../V1/WarehouseClient/get_annotation.php | 79 - .../samples/V1/WarehouseClient/get_asset.php | 78 - .../V1/WarehouseClient/get_collection.php | 77 - .../samples/V1/WarehouseClient/get_corpus.php | 71 - .../V1/WarehouseClient/get_data_schema.php | 78 - .../samples/V1/WarehouseClient/get_index.php | 78 - .../V1/WarehouseClient/get_index_endpoint.php | 71 - .../V1/WarehouseClient/get_location.php | 57 - .../V1/WarehouseClient/get_search_config.php | 78 - .../WarehouseClient/get_search_hypernym.php | 78 - .../V1/WarehouseClient/import_assets.php | 87 - .../V1/WarehouseClient/index_asset.php | 91 - .../V1/WarehouseClient/ingest_asset.php | 66 - .../V1/WarehouseClient/list_annotations.php | 62 - .../V1/WarehouseClient/list_assets.php | 78 - .../V1/WarehouseClient/list_collections.php | 77 - .../V1/WarehouseClient/list_corpora.php | 75 - .../V1/WarehouseClient/list_data_schemas.php | 78 - .../WarehouseClient/list_index_endpoints.php | 76 - .../V1/WarehouseClient/list_indexes.php | 78 - .../V1/WarehouseClient/list_locations.php | 62 - .../WarehouseClient/list_search_configs.php | 78 - .../WarehouseClient/list_search_hypernyms.php | 78 - .../remove_collection_item.php | 92 - .../V1/WarehouseClient/remove_index_asset.php | 91 - .../V1/WarehouseClient/search_assets.php | 77 - .../WarehouseClient/search_index_endpoint.php | 82 - .../V1/WarehouseClient/undeploy_index.php | 89 - .../V1/WarehouseClient/update_annotation.php | 59 - .../V1/WarehouseClient/update_asset.php | 59 - .../V1/WarehouseClient/update_collection.php | 59 - .../V1/WarehouseClient/update_corpus.php | 73 - .../V1/WarehouseClient/update_data_schema.php | 75 - .../V1/WarehouseClient/update_index.php | 76 - .../WarehouseClient/update_index_endpoint.php | 74 - .../WarehouseClient/update_search_config.php | 72 - .../update_search_hypernym.php | 59 - .../V1/WarehouseClient/upload_asset.php | 99 - .../WarehouseClient/view_collection_items.php | 82 - .../WarehouseClient/view_indexed_assets.php | 83 - .../v1/src/V1/Client/AppPlatformClient.php | 1204 ---- .../V1/Client/HealthCheckServiceClient.php | 314 - .../V1/Client/LiveVideoAnalyticsClient.php | 933 --- .../src/V1/Client/StreamingServiceClient.php | 436 -- .../v1/src/V1/Client/StreamsServiceClient.php | 1099 ---- .../v1/src/V1/Client/WarehouseClient.php | 2361 ------- .../VisionAi/v1/src/V1/gapic_metadata.json | 808 --- .../resources/app_platform_client_config.json | 162 - .../app_platform_descriptor_config.php | 536 -- .../app_platform_rest_client_config.php | 443 -- .../health_check_service_client_config.json | 37 - ...health_check_service_descriptor_config.php | 77 - ...ealth_check_service_rest_client_config.php | 141 - .../live_video_analytics_client_config.json | 174 - ...live_video_analytics_descriptor_config.php | 390 -- ...ive_video_analytics_rest_client_config.php | 357 - .../streaming_service_client_config.json | 56 - .../streaming_service_descriptor_config.php | 122 - .../streaming_service_rest_client_config.php | 166 - .../streams_service_client_config.json | 147 - .../streams_service_descriptor_config.php | 480 -- .../streams_service_rest_client_config.php | 425 -- .../V1/resources/warehouse_client_config.json | 369 -- .../resources/warehouse_descriptor_config.php | 1066 --- .../warehouse_rest_client_config.php | 865 --- .../Unit/V1/Client/AppPlatformClientTest.php | 3108 --------- .../Client/HealthCheckServiceClientTest.php | 274 - .../Client/LiveVideoAnalyticsClientTest.php | 2167 ------- .../V1/Client/StreamingServiceClientTest.php | 666 -- .../V1/Client/StreamsServiceClientTest.php | 2786 -------- .../Unit/V1/Client/WarehouseClientTest.php | 5732 ----------------- 1160 files changed, 3 insertions(+), 192920 deletions(-) delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorGroupService.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ReportErrorsService.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventRequest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/get_group.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/update_group.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/delete_events.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_events.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_group_stats.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ReportErrorsServiceClient/report_error_event.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ErrorGroupServiceClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ErrorStatsServiceClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ReportErrorsServiceClient.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_client_config.json delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_descriptor_config.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ErrorGroupServiceClientTest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ErrorStatsServiceClientTest.php delete mode 100644 owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ReportErrorsServiceClientTest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Backup.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/RealtimeUpdates.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Schedule.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Snapshot.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/UserCreds.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/State.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/Stats.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BackupSchedule.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateBackupScheduleRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateUserCredsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DailyRecurrence.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/CmekConfig.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DataAccessMode.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseEdition.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DeleteProtectionState.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/CustomerManagedEncryptionOptions.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/GoogleDefaultEncryptionOptions.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/SourceEncryptionOptions.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/PointInTimeRecoveryEnablement.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo/BackupSource.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupScheduleRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteUserCredsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DisableUserCredsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/EnableUserCredsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupScheduleRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetUserCredsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/ApiScope.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/Density.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig/FlatIndex.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/PitrSnapshot.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RealtimeUpdatesMode.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ResetUserPasswordRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateBackupScheduleRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/ResourceIdentity.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/State.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/WeeklyRecurrence.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/bulk_delete_documents.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/clone_database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_backup_schedule.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_user_creds.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup_schedule.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_user_creds.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/disable_user_creds.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/enable_user_creds.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup_schedule.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_user_creds.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backup_schedules.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backups.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_user_creds.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/reset_user_password.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/restore_database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_backup_schedule.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/Client/FirestoreAdminClient.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json delete mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php delete mode 100644 owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/Client/FirestoreAdminClientTest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/BloomFilter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/ExplainStats.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Pipeline.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/QueryProfile.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BitSequence.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BloomFilter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutionStats.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainMetrics.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainOptions.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainStats.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PBFunction.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline/Stage.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PlanSummary.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Avg.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Sum.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredPipeline.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest/DistanceMeasure.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadWrite.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php delete mode 100644 owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/execute_pipeline.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php delete mode 100644 owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php delete mode 100644 owl-bot-staging/Firestore/v1/src/V1/Client/FirestoreClient.php delete mode 100644 owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json delete mode 100644 owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php delete mode 100644 owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php delete mode 100644 owl-bot-staging/Firestore/v1/tests/Unit/V1/Client/FirestoreClientTest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LogEntry.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/Logging.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingConfig.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingMetrics.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryDataset.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryOptions.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BucketMetadata.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CmekSettings.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesMetadata.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesResponse.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateBucketRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateExclusionRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLinkRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLogMetricRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateSinkRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateViewRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteBucketRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteExclusionRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLinkRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogMetricRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteSinkRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteViewRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetBucketRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetCmekSettingsRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetExclusionRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLinkRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLogMetricRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSettingsRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSinkRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetViewRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexConfig.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexType.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LifecycleState.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/Link.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LinkMetadata.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsResponse.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsResponse.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksResponse.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesResponse.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsResponse.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsResponse.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsResponse.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksResponse.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsResponse.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LocationMetadata.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogBucket.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntry.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntryOperation.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntrySourceLocation.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogExclusion.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric/ApiVersion.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink/VersionFormat.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSplit.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogView.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/OperationState.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/Settings.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo/Reason.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UndeleteBucketRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateBucketRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateCmekSettingsRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateExclusionRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateLogMetricRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSettingsRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSinkRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateViewRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesPartialErrors.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesRequest.php delete mode 100644 owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesResponse.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/copy_log_entries.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket_async.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_exclusion.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_link.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_sink.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_view.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_bucket.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_exclusion.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_link.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_sink.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_view.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_bucket.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_cmek_settings.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_exclusion.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_link.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_settings.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_sink.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_view.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_buckets.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_exclusions.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_links.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_sinks.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_views.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/undelete_bucket.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket_async.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_cmek_settings.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_exclusion.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_settings.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_sink.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_view.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/delete_log.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_log_entries.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_logs.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_monitored_resource_descriptors.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/tail_log_entries.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/write_log_entries.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/create_log_metric.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/delete_log_metric.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/get_log_metric.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/list_log_metrics.php delete mode 100644 owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/update_log_metric.php delete mode 100644 owl-bot-staging/Logging/v2/src/V2/Client/ConfigServiceV2Client.php delete mode 100644 owl-bot-staging/Logging/v2/src/V2/Client/LoggingServiceV2Client.php delete mode 100644 owl-bot-staging/Logging/v2/src/V2/Client/MetricsServiceV2Client.php delete mode 100644 owl-bot-staging/Logging/v2/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_client_config.json delete mode 100644 owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_descriptor_config.php delete mode 100644 owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_rest_client_config.php delete mode 100644 owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_client_config.json delete mode 100644 owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_descriptor_config.php delete mode 100644 owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_rest_client_config.php delete mode 100644 owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_client_config.json delete mode 100644 owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_descriptor_config.php delete mode 100644 owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_rest_client_config.php delete mode 100644 owl-bot-staging/Logging/v2/tests/Unit/V2/Client/ConfigServiceV2ClientTest.php delete mode 100644 owl-bot-staging/Logging/v2/tests/Unit/V2/Client/LoggingServiceV2ClientTest.php delete mode 100644 owl-bot-staging/Logging/v2/tests/Unit/V2/Client/MetricsServiceV2ClientTest.php delete mode 100644 owl-bot-staging/LongRunning/proto/src/GPBMetadata/Google/Longrunning/Operations.php delete mode 100644 owl-bot-staging/LongRunning/proto/src/Google/LongRunning/CancelOperationRequest.php delete mode 100644 owl-bot-staging/LongRunning/proto/src/Google/LongRunning/DeleteOperationRequest.php delete mode 100644 owl-bot-staging/LongRunning/proto/src/Google/LongRunning/GetOperationRequest.php delete mode 100644 owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsRequest.php delete mode 100644 owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsResponse.php delete mode 100644 owl-bot-staging/LongRunning/proto/src/Google/LongRunning/Operation.php delete mode 100644 owl-bot-staging/LongRunning/proto/src/Google/LongRunning/OperationInfo.php delete mode 100644 owl-bot-staging/LongRunning/proto/src/Google/LongRunning/WaitOperationRequest.php delete mode 100644 owl-bot-staging/LongRunning/src/LongRunning/Client/OperationsClient.php delete mode 100644 owl-bot-staging/LongRunning/src/LongRunning/gapic_metadata.json delete mode 100644 owl-bot-staging/LongRunning/src/LongRunning/resources/operations_client_config.json delete mode 100644 owl-bot-staging/LongRunning/src/LongRunning/resources/operations_descriptor_config.php delete mode 100644 owl-bot-staging/LongRunning/src/LongRunning/resources/operations_rest_client_config.php delete mode 100644 owl-bot-staging/LongRunning/tests/Unit/Client/OperationsClientTest.php delete mode 100644 owl-bot-staging/Trace/v1/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V1/Trace.php delete mode 100644 owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/GetTraceRequest.php delete mode 100644 owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest.php delete mode 100644 owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest/ViewType.php delete mode 100644 owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesResponse.php delete mode 100644 owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/PatchTracesRequest.php delete mode 100644 owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/Trace.php delete mode 100644 owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/TraceSpan.php delete mode 100644 owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/TraceSpan/SpanKind.php delete mode 100644 owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/Traces.php delete mode 100644 owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/get_trace.php delete mode 100644 owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/list_traces.php delete mode 100644 owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/patch_traces.php delete mode 100644 owl-bot-staging/Trace/v1/src/V1/Client/TraceServiceClient.php delete mode 100644 owl-bot-staging/Trace/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/Trace/v1/src/V1/resources/trace_service_client_config.json delete mode 100644 owl-bot-staging/Trace/v1/src/V1/resources/trace_service_descriptor_config.php delete mode 100644 owl-bot-staging/Trace/v1/src/V1/resources/trace_service_rest_client_config.php delete mode 100644 owl-bot-staging/Trace/v1/tests/Unit/V1/Client/TraceServiceClientTest.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V2/Trace.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V2/Tracing.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/AttributeValue.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/BatchWriteSpansRequest.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Module.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Attributes.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link/Type.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Links.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/SpanKind.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/Annotation.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent/Type.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvents.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrame.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrames.php delete mode 100644 owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/TruncatableString.php delete mode 100644 owl-bot-staging/Trace/v2/samples/V2/TraceServiceClient/batch_write_spans.php delete mode 100644 owl-bot-staging/Trace/v2/samples/V2/TraceServiceClient/create_span.php delete mode 100644 owl-bot-staging/Trace/v2/src/V2/Client/TraceServiceClient.php delete mode 100644 owl-bot-staging/Trace/v2/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/Trace/v2/src/V2/resources/trace_service_client_config.json delete mode 100644 owl-bot-staging/Trace/v2/src/V2/resources/trace_service_descriptor_config.php delete mode 100644 owl-bot-staging/Trace/v2/src/V2/resources/trace_service_rest_client_config.php delete mode 100644 owl-bot-staging/Trace/v2/tests/Unit/V2/Client/TraceServiceClientTest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Annotations.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Common.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/HealthService.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Lva.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/LvaResources.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/LvaService.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Platform.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamingResources.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamingService.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamsResources.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamsService.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Warehouse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AIEnabledDevicesInputConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AcceleratorType.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AcquireLeaseRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddApplicationStreamInputRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddApplicationStreamInputResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddCollectionItemRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddCollectionItemResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Analysis.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalysisDefinition.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata/AnalysisStatus.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata/AnalysisStatus/State.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/DebugOptions.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/OperatorOption.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/StreamInput.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Annotation.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationCustomizedStruct.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationList.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationMatchingResult.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationValue.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionRequest/StructedInputAnnotation.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionResponse/StructedOutputAnnotation.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformEventBody.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo/GlobalOutputResource.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo/MonitoringConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/BillingMode.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/State.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationConfigs.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationConfigs/EventDeliveryConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationInstance.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationNodeAnnotation.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationStreamInput.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Asset.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource/AssetContentData.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource/AssetGcsSource.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AttributeValue.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AutoscalingMetricSpec.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchOperationStatus.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessRequest/BatchRunProcessOptions.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BigQueryConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BoolValue.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Channel.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CircleArea.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClassificationPredictionResult.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetResponse/TimeIndexedUri.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Cluster.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Cluster/State.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClusterInfo.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Collection.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CollectionItem.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CollectionItem/Type.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CommitRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ControlledMode.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Corpus.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Corpus/Type.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAnalysisRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAnnotationRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationInstancesRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationInstancesResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAssetRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateClusterRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCollectionMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCollectionRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCorpusMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCorpusRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateDataSchemaRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateDraftRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateEventRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexEndpointMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexEndpointRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateOperatorRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateProcessRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateProcessorRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSearchConfigRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSearchHypernymRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSeriesRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateStreamRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Criteria.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/ModelSchema.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/ProductRecognizerArtifact.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/SourceType.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchema.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/CustomizedStructConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/DataType.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/Granularity.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/ListConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/ProtoAnyConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy/ConfidenceScoreIndexConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy/SearchStrategyType.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataType.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DateTimeRange.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DateTimeRangeArray.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DedicatedResources.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAnalysisRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAnnotationRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationInstancesRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationInstancesResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAssetMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAssetRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteClusterRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCollectionMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCollectionRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCorpusRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteDataSchemaRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteDraftRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteEventRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexEndpointMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexEndpointRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteOperatorRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteProcessRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteProcessorRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSearchConfigRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSearchHypernymRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSeriesRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteStreamRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployApplicationRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployApplicationResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployedIndex.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployedIndexReference.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Draft.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/EagerMode.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Event.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Event/Clock.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/EventUpdate.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucket.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucket/Range.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucketType.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetGroup.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/CustomRangeBucketSpec.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/DateTimeBucketSpec.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/DateTimeBucketSpec/Granularity.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/FixedRangeBucketSpec.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetValue.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FloatRange.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FloatRangeArray.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GcsOutputConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GcsSource.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeneralObjectDetectionConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateHlsUriRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateHlsUriResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateRetrievalUrlRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateRetrievalUrlResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateStreamHlsTokenRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateStreamHlsTokenResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeoCoordinate.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeoLocationArray.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAnalysisRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAnnotationRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetApplicationRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAssetRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetClusterRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetCollectionRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetCorpusRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetDataSchemaRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetDraftRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetEventRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetIndexEndpointRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetIndexRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetInstanceRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetOperatorRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetProcessRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetProcessorRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSearchConfigRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSearchHypernymRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSeriesRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamThumbnailRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamThumbnailResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GstreamerBufferDescriptor.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/HealthCheckRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/HealthCheckResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageObjectDetectionPredictionResult.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageQuery.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageSegmentationPredictionResult.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Index.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Index/State.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexEndpoint.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexEndpoint/State.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexedAsset.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexingStatus.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexingStatus/State.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config/VideoType.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config/VideoType/ContainerFormat.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/TimeIndexedData.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/InputResource.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/InstanceType.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/OutputResource.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/State.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IntRange.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IntRangeArray.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Lease.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/LeaseType.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnalysesRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnalysesResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnnotationsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnnotationsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListApplicationsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListApplicationsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAssetsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAssetsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListClustersRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListClustersResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCollectionsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCollectionsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCorporaRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCorporaResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDataSchemasRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDataSchemasResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDraftsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDraftsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListEventsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListEventsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexEndpointsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexEndpointsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexesRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexesResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListInstancesRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListInstancesResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListOperatorsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListOperatorsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPrebuiltProcessorsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPrebuiltProcessorsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessesRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessesResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessorsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessorsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPublicOperatorsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPublicOperatorsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchConfigsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchConfigsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchHypernymsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchHypernymsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSeriesRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSeriesResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListStreamsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListStreamsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MachineSpec.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MaterializeChannelRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MediaWarehouseConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ModelType.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Node.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Node/InputEdge.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedPolygon.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedPolyline.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedVertex.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/Entity.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/IdentifiedBox.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/IdentifiedBox/NormalizedBoundingBox.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/DwellTimeInfo.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Entity.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/IdentifiedBox.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/IdentifiedBox/NormalizedBoundingBox.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/AccumulatedObjectCount.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/ActiveZoneCount.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/CrossingLineCount.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/ObjectCount.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/TrackInfo.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperationMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Operator.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition/ArgumentDefinition.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition/AttributeDefinition.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorQuery.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Packet.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketHeader.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketType.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketType/TypeDescriptor.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/RelativeTemporalPartition.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/SpatialPartition.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/TemporalPartition.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonBlurConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonBlurConfig/PersonBlurType.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonVehicleDetectionConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/DetectedPerson.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/NormalizedBoundingBox.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PPEEntity.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PPEIdentifiedBox.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PersonEntity.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PersonIdentifiedBox.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Process.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor/ProcessorState.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor/ProcessorType.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/GraphInputChannelSpec.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/GraphOutputChannelSpec.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/InstanceResourceInputBindingSpec.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/InstanceResourceOutputBindingSpec.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProductRecognizerConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RawImageDescriptor.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsControlResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsRequest/SetupRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsControlResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsRequest/SetupRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Registry.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReleaseLeaseRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReleaseLeaseResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputRequest/TargetStreamInput.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveCollectionItemRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveCollectionItemResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RenewLeaseRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RequestMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResolveOperatorInfoRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResolveOperatorInfoResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResourceAnnotations.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResourceSpecification.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunMode.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunStatus.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunStatus/State.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy/Option.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy/Option/AggregateMethod.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchAssetsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchAssetsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapability.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapability/Type.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapabilitySetting.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCriteriaProperty.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchHypernym.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchIndexEndpointRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchIndexEndpointResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchResultItem.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SendPacketsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SendPacketsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Series.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SeriesMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ServerMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Stream.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotation.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotationType.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotations.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamWithAnnotation.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamWithAnnotation/NodeAnnotation.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StringArray.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig/EntityParsingConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig/EntityParsingConfig/EntityMatchingStrategy.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagRecognizerConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployApplicationRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployApplicationResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UniversalInputConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAnalysisRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAnnotationRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesRequest/UpdateApplicationInstance.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationStreamInputRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationStreamInputResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAssetRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateClusterRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateCollectionRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateCorpusRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateDataSchemaRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateDraftRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateEventRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexEndpointMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexEndpointRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateOperatorRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateProcessRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateProcessorRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSearchConfigRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSearchHypernymRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSeriesRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateStreamRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetMetadata.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UserSpecifiedAnnotation.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexAutoMLVideoConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexAutoMLVisionConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexCustomConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoActionRecognitionPredictionResult.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoActionRecognitionPredictionResult/IdentifiedAction.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoClassificationPredictionResult.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoClassificationPredictionResult/IdentifiedClassification.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult/BoundingBox.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult/DetectedObject.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoStreamInputConfig.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewCollectionItemsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewCollectionItemsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewIndexedAssetsRequest.php delete mode 100644 owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewIndexedAssetsResponse.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/add_application_stream_input.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_application.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_application_instances.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_draft.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_processor.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_application.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_application_instances.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_draft.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_processor.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/deploy_application.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_application.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_draft.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_instance.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_location.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_processor.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_applications.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_drafts.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_instances.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_locations.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_prebuilt_processors.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_processors.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/remove_application_stream_input.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/undeploy_application.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application_instances.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application_stream_input.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_draft.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_processor.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/get_location.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/health_check.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/list_locations.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/batch_run_process.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_analysis.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_operator.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_process.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_analysis.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_operator.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_process.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_analysis.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_location.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_operator.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_process.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_analyses.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_locations.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_operators.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_processes.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_public_operators.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/resolve_operator_info.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_analysis.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_operator.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_process.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/acquire_lease.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/get_location.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/list_locations.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/receive_events.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/receive_packets.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/release_lease.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/renew_lease.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/send_packets.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_cluster.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_event.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_series.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_stream.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_cluster.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_event.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_series.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_stream.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/generate_stream_hls_token.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_cluster.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_event.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_location.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_series.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_stream.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_stream_thumbnail.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_clusters.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_events.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_locations.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_series.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_streams.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/materialize_channel.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_cluster.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_event.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_series.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_stream.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/add_collection_item.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/analyze_asset.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/analyze_corpus.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/clip_asset.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_annotation.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_asset.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_collection.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_corpus.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_data_schema.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_index.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_index_endpoint.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_search_config.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_search_hypernym.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_annotation.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_asset.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_collection.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_corpus.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_data_schema.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_index.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_index_endpoint.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_search_config.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_search_hypernym.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/deploy_index.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/generate_hls_uri.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/generate_retrieval_url.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_annotation.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_asset.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_collection.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_corpus.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_data_schema.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_index.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_index_endpoint.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_location.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_search_config.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_search_hypernym.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/import_assets.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/index_asset.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/ingest_asset.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_annotations.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_assets.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_collections.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_corpora.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_data_schemas.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_index_endpoints.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_indexes.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_locations.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_search_configs.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_search_hypernyms.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/remove_collection_item.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/remove_index_asset.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/search_assets.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/search_index_endpoint.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/undeploy_index.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_annotation.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_asset.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_collection.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_corpus.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_data_schema.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_index.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_index_endpoint.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_search_config.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_search_hypernym.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/upload_asset.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/view_collection_items.php delete mode 100644 owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/view_indexed_assets.php delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/Client/AppPlatformClient.php delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/Client/HealthCheckServiceClient.php delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/Client/LiveVideoAnalyticsClient.php delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/Client/StreamingServiceClient.php delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/Client/StreamsServiceClient.php delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/Client/WarehouseClient.php delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_client_config.json delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_descriptor_config.php delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_rest_client_config.php delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_client_config.json delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_descriptor_config.php delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_rest_client_config.php delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_client_config.json delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_descriptor_config.php delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_rest_client_config.php delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_client_config.json delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_descriptor_config.php delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_rest_client_config.php delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_client_config.json delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_descriptor_config.php delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_rest_client_config.php delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_client_config.json delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_descriptor_config.php delete mode 100644 owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_rest_client_config.php delete mode 100644 owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/AppPlatformClientTest.php delete mode 100644 owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/HealthCheckServiceClientTest.php delete mode 100644 owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/LiveVideoAnalyticsClientTest.php delete mode 100644 owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/StreamingServiceClientTest.php delete mode 100644 owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/StreamsServiceClientTest.php delete mode 100644 owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/WarehouseClientTest.php diff --git a/LongRunning/tests/Unit/Client/OperationsClientTest.php b/LongRunning/tests/Unit/Client/OperationsClientTest.php index 9bfb9671abca..aaffbb1f3e73 100644 --- a/LongRunning/tests/Unit/Client/OperationsClientTest.php +++ b/LongRunning/tests/Unit/Client/OperationsClientTest.php @@ -27,6 +27,7 @@ use Google\ApiCore\Testing\GeneratedTest; use Google\ApiCore\Testing\MockTransport; use Google\LongRunning\CancelOperationRequest; +use Google\LongRunning\Client\OperationsClient; use Google\LongRunning\DeleteOperationRequest; use Google\LongRunning\GetOperationRequest; use Google\LongRunning\ListOperationsRequest; @@ -56,13 +57,13 @@ private function createCredentials() return $this->getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); } - /** @return \Google\LongRunning\Client\OperationsClient */ + /** @return OperationsClient */ private function createClient(array $options = []) { $options += [ 'credentials' => $this->createCredentials(), ]; - return new \Google\LongRunning\Client\OperationsClient($options); + return new OperationsClient($options); } /** @test */ diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php deleted file mode 100644 index ea7f3a7a57ca..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/Common.php +++ /dev/null @@ -1,26 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC0\x0C\x0A8google/devtools/clouderrorreporting/v1beta1/common.proto\x12+google.devtools.clouderrorreporting.v1beta1\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB2\x02\x0A\x0AErrorGroup\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x10\x0A\x08group_id\x18\x02 \x01(\x09\x12S\x0A\x0Ftracking_issues\x18\x03 \x03(\x0B2:.google.devtools.clouderrorreporting.v1beta1.TrackingIssue\x12X\x0A\x11resolution_status\x18\x05 \x01(\x0E2=.google.devtools.clouderrorreporting.v1beta1.ResolutionStatus:U\xEAAR\x0A-clouderrorreporting.googleapis.com/ErrorGroup\x12!projects/{project}/groups/{group}\"\x1C\x0A\x0DTrackingIssue\x12\x0B\x0A\x03url\x18\x01 \x01(\x09\"\xEF\x01\x0A\x0AErrorEvent\x12.\x0A\x0Aevent_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12T\x0A\x0Fservice_context\x18\x02 \x01(\x0B2;.google.devtools.clouderrorreporting.v1beta1.ServiceContext\x12\x0F\x0A\x07message\x18\x03 \x01(\x09\x12J\x0A\x07context\x18\x05 \x01(\x0B29.google.devtools.clouderrorreporting.v1beta1.ErrorContext\"I\x0A\x0EServiceContext\x12\x0F\x0A\x07service\x18\x02 \x01(\x09\x12\x0F\x0A\x07version\x18\x03 \x01(\x09\x12\x15\x0A\x0Dresource_type\x18\x04 \x01(\x09\"\xC9\x01\x0A\x0CErrorContext\x12U\x0A\x0Chttp_request\x18\x01 \x01(\x0B2?.google.devtools.clouderrorreporting.v1beta1.HttpRequestContext\x12\x0C\x0A\x04user\x18\x02 \x01(\x09\x12T\x0A\x0Freport_location\x18\x03 \x01(\x0B2;.google.devtools.clouderrorreporting.v1beta1.SourceLocation\"\x88\x01\x0A\x12HttpRequestContext\x12\x0E\x0A\x06method\x18\x01 \x01(\x09\x12\x0B\x0A\x03url\x18\x02 \x01(\x09\x12\x12\x0A\x0Auser_agent\x18\x03 \x01(\x09\x12\x10\x0A\x08referrer\x18\x04 \x01(\x09\x12\x1C\x0A\x14response_status_code\x18\x05 \x01(\x05\x12\x11\x0A\x09remote_ip\x18\x06 \x01(\x09\"O\x0A\x0ESourceLocation\x12\x11\x0A\x09file_path\x18\x01 \x01(\x09\x12\x13\x0A\x0Bline_number\x18\x02 \x01(\x05\x12\x15\x0A\x0Dfunction_name\x18\x04 \x01(\x09*j\x0A\x10ResolutionStatus\x12!\x0A\x1DRESOLUTION_STATUS_UNSPECIFIED\x10\x00\x12\x08\x0A\x04OPEN\x10\x01\x12\x10\x0A\x0CACKNOWLEDGED\x10\x02\x12\x0C\x0A\x08RESOLVED\x10\x03\x12\x09\x0A\x05MUTED\x10\x04B\x89\x02\x0A/com.google.devtools.clouderrorreporting.v1beta1B\x0BCommonProtoP\x01ZOcloud.google.com/go/errorreporting/apiv1beta1/errorreportingpb;errorreportingpb\xF8\x01\x01\xAA\x02#Google.Cloud.ErrorReporting.V1Beta1\xCA\x02#Google\\Cloud\\ErrorReporting\\V1beta1\xEA\x02&Google::Cloud::ErrorReporting::V1beta1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorGroupService.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorGroupService.php deleted file mode 100644 index 7db9757e5c51..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorGroupService.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xDB\x0A\x0AEgoogle/devtools/clouderrorreporting/v1beta1/error_group_service.proto\x12+google.devtools.clouderrorreporting.v1beta1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A8google/devtools/clouderrorreporting/v1beta1/common.proto\"\\\x0A\x0FGetGroupRequest\x12I\x0A\x0Agroup_name\x18\x01 \x01(\x09B5\xE0A\x02\xFAA/\x0A-clouderrorreporting.googleapis.com/ErrorGroup\"a\x0A\x12UpdateGroupRequest\x12K\x0A\x05group\x18\x01 \x01(\x0B27.google.devtools.clouderrorreporting.v1beta1.ErrorGroupB\x03\xE0A\x022\xF5\x04\x0A\x11ErrorGroupService\x12\xFA\x01\x0A\x08GetGroup\x12<.google.devtools.clouderrorreporting.v1beta1.GetGroupRequest\x1A7.google.devtools.clouderrorreporting.v1beta1.ErrorGroup\"w\xDAA\x0Agroup_name\x82\xD3\xE4\x93\x02d\x12)/v1beta1/{group_name=projects/*/groups/*}Z7\x125/v1beta1/{group_name=projects/*/locations/*/groups/*}\x12\x8A\x02\x0A\x0BUpdateGroup\x12?.google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest\x1A7.google.devtools.clouderrorreporting.v1beta1.ErrorGroup\"\x80\x01\xDAA\x05group\x82\xD3\xE4\x93\x02r\x1A)/v1beta1/{group.name=projects/*/groups/*}:\x05groupZ>\x1A5/v1beta1/{group.name=projects/*/locations/*/groups/*}:\x05group\x1AV\xCAA\"clouderrorreporting.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\x94\x02\x0A/com.google.devtools.clouderrorreporting.v1beta1B\x16ErrorGroupServiceProtoP\x01ZOcloud.google.com/go/errorreporting/apiv1beta1/errorreportingpb;errorreportingpb\xF8\x01\x01\xAA\x02#Google.Cloud.ErrorReporting.V1Beta1\xCA\x02#Google\\Cloud\\ErrorReporting\\V1beta1\xEA\x02&Google::Cloud::ErrorReporting::V1beta1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php deleted file mode 100644 index dce20da33697..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ErrorStatsService.php +++ /dev/null @@ -1,31 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xBD!\x0AEgoogle/devtools/clouderrorreporting/v1beta1/error_stats_service.proto\x12+google.devtools.clouderrorreporting.v1beta1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A8google/devtools/clouderrorreporting/v1beta1/common.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x83\x05\x0A\x15ListGroupStatsRequest\x12I\x0A\x0Cproject_name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+cloudresourcemanager.googleapis.com/Project\x12\x15\x0A\x08group_id\x18\x02 \x03(\x09B\x03\xE0A\x01\x12^\x0A\x0Eservice_filter\x18\x03 \x01(\x0B2A.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilterB\x03\xE0A\x01\x12T\x0A\x0Atime_range\x18\x05 \x01(\x0B2;.google.devtools.clouderrorreporting.v1beta1.QueryTimeRangeB\x03\xE0A\x01\x12<\x0A\x14timed_count_duration\x18\x06 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01\x12X\x0A\x09alignment\x18\x07 \x01(\x0E2@.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignmentB\x03\xE0A\x01\x127\x0A\x0Ealignment_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x01\x12P\x0A\x05order\x18\x09 \x01(\x0E2<.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrderB\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x0B \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x0C \x01(\x09B\x03\xE0A\x01\"\xC0\x01\x0A\x16ListGroupStatsResponse\x12W\x0A\x11error_group_stats\x18\x01 \x03(\x0B2<.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x124\x0A\x10time_range_begin\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x86\x04\x0A\x0FErrorGroupStats\x12F\x0A\x05group\x18\x01 \x01(\x0B27.google.devtools.clouderrorreporting.v1beta1.ErrorGroup\x12\x0D\x0A\x05count\x18\x02 \x01(\x03\x12\x1C\x0A\x14affected_users_count\x18\x03 \x01(\x03\x12M\x0A\x0Ctimed_counts\x18\x04 \x03(\x0B27.google.devtools.clouderrorreporting.v1beta1.TimedCount\x123\x0A\x0Ffirst_seen_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.Timestamp\x122\x0A\x0Elast_seen_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12V\x0A\x11affected_services\x18\x07 \x03(\x0B2;.google.devtools.clouderrorreporting.v1beta1.ServiceContext\x12\x1D\x0A\x15num_affected_services\x18\x08 \x01(\x05\x12O\x0A\x0Erepresentative\x18\x09 \x01(\x0B27.google.devtools.clouderrorreporting.v1beta1.ErrorEvent\"y\x0A\x0ATimedCount\x12\x0D\x0A\x05count\x18\x01 \x01(\x03\x12.\x0A\x0Astart_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\xDC\x02\x0A\x11ListEventsRequest\x12I\x0A\x0Cproject_name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+cloudresourcemanager.googleapis.com/Project\x12\x15\x0A\x08group_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12^\x0A\x0Eservice_filter\x18\x03 \x01(\x0B2A.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilterB\x03\xE0A\x01\x12T\x0A\x0Atime_range\x18\x04 \x01(\x0B2;.google.devtools.clouderrorreporting.v1beta1.QueryTimeRangeB\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x06 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x07 \x01(\x09B\x03\xE0A\x01\"\xB2\x01\x0A\x12ListEventsResponse\x12M\x0A\x0Cerror_events\x18\x01 \x03(\x0B27.google.devtools.clouderrorreporting.v1beta1.ErrorEvent\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x124\x0A\x10time_range_begin\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\xE7\x01\x0A\x0EQueryTimeRange\x12R\x0A\x06period\x18\x01 \x01(\x0E2B.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period\"\x80\x01\x0A\x06Period\x12\x16\x0A\x12PERIOD_UNSPECIFIED\x10\x00\x12\x11\x0A\x0DPERIOD_1_HOUR\x10\x01\x12\x12\x0A\x0EPERIOD_6_HOURS\x10\x02\x12\x10\x0A\x0CPERIOD_1_DAY\x10\x03\x12\x11\x0A\x0DPERIOD_1_WEEK\x10\x04\x12\x12\x0A\x0EPERIOD_30_DAYS\x10\x05\"^\x0A\x14ServiceContextFilter\x12\x14\x0A\x07service\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x14\x0A\x07version\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x1A\x0A\x0Dresource_type\x18\x04 \x01(\x09B\x03\xE0A\x01\"`\x0A\x13DeleteEventsRequest\x12I\x0A\x0Cproject_name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+cloudresourcemanager.googleapis.com/Project\"\x16\x0A\x14DeleteEventsResponse*u\x0A\x13TimedCountAlignment\x12%\x0A!ERROR_COUNT_ALIGNMENT_UNSPECIFIED\x10\x00\x12\x1B\x0A\x17ALIGNMENT_EQUAL_ROUNDED\x10\x01\x12\x1A\x0A\x16ALIGNMENT_EQUAL_AT_END\x10\x02*}\x0A\x0FErrorGroupOrder\x12\x1B\x0A\x17GROUP_ORDER_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ACOUNT_DESC\x10\x01\x12\x12\x0A\x0ELAST_SEEN_DESC\x10\x02\x12\x10\x0A\x0CCREATED_DESC\x10\x03\x12\x17\x0A\x13AFFECTED_USERS_DESC\x10\x042\xBC\x07\x0A\x11ErrorStatsService\x12\xA8\x02\x0A\x0EListGroupStats\x12B.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest\x1AC.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse\"\x8C\x01\xDAA\x17project_name,time_range\x82\xD3\xE4\x93\x02l\x12-/v1beta1/{project_name=projects/*}/groupStatsZ;\x129/v1beta1/{project_name=projects/*/locations/*}/groupStats\x12\x92\x02\x0A\x0AListEvents\x12>.google.devtools.clouderrorreporting.v1beta1.ListEventsRequest\x1A?.google.devtools.clouderrorreporting.v1beta1.ListEventsResponse\"\x82\x01\xDAA\x15project_name,group_id\x82\xD3\xE4\x93\x02d\x12)/v1beta1/{project_name=projects/*}/eventsZ7\x125/v1beta1/{project_name=projects/*/locations/*}/events\x12\x8E\x02\x0A\x0CDeleteEvents\x12@.google.devtools.clouderrorreporting.v1beta1.DeleteEventsRequest\x1AA.google.devtools.clouderrorreporting.v1beta1.DeleteEventsResponse\"y\xDAA\x0Cproject_name\x82\xD3\xE4\x93\x02d*)/v1beta1/{project_name=projects/*}/eventsZ7*5/v1beta1/{project_name=projects/*/locations/*}/events\x1AV\xCAA\"clouderrorreporting.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\x94\x02\x0A/com.google.devtools.clouderrorreporting.v1beta1B\x16ErrorStatsServiceProtoP\x01ZOcloud.google.com/go/errorreporting/apiv1beta1/errorreportingpb;errorreportingpb\xF8\x01\x01\xAA\x02#Google.Cloud.ErrorReporting.V1Beta1\xCA\x02#Google\\Cloud\\ErrorReporting\\V1beta1\xEA\x02&Google::Cloud::ErrorReporting::V1beta1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ReportErrorsService.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ReportErrorsService.php deleted file mode 100644 index b9c64ae90ea2..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/GPBMetadata/Google/Devtools/Clouderrorreporting/V1Beta1/ReportErrorsService.php +++ /dev/null @@ -1,30 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x95\x0B\x0AGgoogle/devtools/clouderrorreporting/v1beta1/report_errors_service.proto\x12+google.devtools.clouderrorreporting.v1beta1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A8google/devtools/clouderrorreporting/v1beta1/common.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB9\x01\x0A\x17ReportErrorEventRequest\x12I\x0A\x0Cproject_name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+cloudresourcemanager.googleapis.com/Project\x12S\x0A\x05event\x18\x02 \x01(\x0B2?.google.devtools.clouderrorreporting.v1beta1.ReportedErrorEventB\x03\xE0A\x02\"\x1A\x0A\x18ReportErrorEventResponse\"\x8B\x02\x0A\x12ReportedErrorEvent\x123\x0A\x0Aevent_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x01\x12Y\x0A\x0Fservice_context\x18\x02 \x01(\x0B2;.google.devtools.clouderrorreporting.v1beta1.ServiceContextB\x03\xE0A\x02\x12\x14\x0A\x07message\x18\x03 \x01(\x09B\x03\xE0A\x02\x12O\x0A\x07context\x18\x04 \x01(\x0B29.google.devtools.clouderrorreporting.v1beta1.ErrorContextB\x03\xE0A\x012\xE5\x02\x0A\x13ReportErrorsService\x12\xF5\x01\x0A\x10ReportErrorEvent\x12D.google.devtools.clouderrorreporting.v1beta1.ReportErrorEventRequest\x1AE.google.devtools.clouderrorreporting.v1beta1.ReportErrorEventResponse\"T\xDAA\x12project_name,event\x82\xD3\xE4\x93\x029\"0/v1beta1/{project_name=projects/*}/events:report:\x05event\x1AV\xCAA\"clouderrorreporting.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\x96\x02\x0A/com.google.devtools.clouderrorreporting.v1beta1B\x18ReportErrorsServiceProtoP\x01ZOcloud.google.com/go/errorreporting/apiv1beta1/errorreportingpb;errorreportingpb\xF8\x01\x01\xAA\x02#Google.Cloud.ErrorReporting.V1Beta1\xCA\x02#Google\\Cloud\\ErrorReporting\\V1beta1\xEA\x02&Google::Cloud::ErrorReporting::V1beta1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php deleted file mode 100644 index 9d8ea289b591..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsRequest.php +++ /dev/null @@ -1,128 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.DeleteEventsRequest - */ -class DeleteEventsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, - * where `{projectID}` is the [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is - * a Cloud region. - * Examples: `projects/my-project-123`, - * `projects/my-project-123/locations/global`. - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $project_name = ''; - - /** - * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, - * where `{projectID}` is the [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is - * a Cloud region. - * - * Examples: `projects/my-project-123`, - * `projects/my-project-123/locations/global`. - * - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. Please see - * {@see ErrorStatsServiceClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\ErrorReporting\V1beta1\DeleteEventsRequest - * - * @experimental - */ - public static function build(string $projectName): self - { - return (new self()) - ->setProjectName($projectName); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_name - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, - * where `{projectID}` is the [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is - * a Cloud region. - * Examples: `projects/my-project-123`, - * `projects/my-project-123/locations/global`. - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, - * where `{projectID}` is the [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is - * a Cloud region. - * Examples: `projects/my-project-123`, - * `projects/my-project-123/locations/global`. - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getProjectName() - { - return $this->project_name; - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, - * where `{projectID}` is the [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is - * a Cloud region. - * Examples: `projects/my-project-123`, - * `projects/my-project-123/locations/global`. - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProjectName($var) - { - GPBUtil::checkString($var, True); - $this->project_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php deleted file mode 100644 index 6fb5c40484e0..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/DeleteEventsResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.DeleteEventsResponse - */ -class DeleteEventsResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php deleted file mode 100644 index 306dad0bd7db..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorContext.php +++ /dev/null @@ -1,206 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ErrorContext - */ -class ErrorContext extends \Google\Protobuf\Internal\Message -{ - /** - * The HTTP request which was processed when the error was - * triggered. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1; - */ - protected $http_request = null; - /** - * The user who caused or was affected by the crash. - * This can be a user ID, an email address, or an arbitrary token that - * uniquely identifies the user. - * When sending an error report, leave this field empty if the user was not - * logged in. In this case the - * Error Reporting system will use other data, such as remote IP address, to - * distinguish affected users. See `affected_users_count` in - * `ErrorGroupStats`. - * - * Generated from protobuf field string user = 2; - */ - protected $user = ''; - /** - * The location in the source code where the decision was made to - * report the error, usually the place where it was logged. - * For a logged exception this would be the source line where the - * exception is logged, usually close to the place where it was - * caught. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.SourceLocation report_location = 3; - */ - protected $report_location = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext $http_request - * The HTTP request which was processed when the error was - * triggered. - * @type string $user - * The user who caused or was affected by the crash. - * This can be a user ID, an email address, or an arbitrary token that - * uniquely identifies the user. - * When sending an error report, leave this field empty if the user was not - * logged in. In this case the - * Error Reporting system will use other data, such as remote IP address, to - * distinguish affected users. See `affected_users_count` in - * `ErrorGroupStats`. - * @type \Google\Cloud\ErrorReporting\V1beta1\SourceLocation $report_location - * The location in the source code where the decision was made to - * report the error, usually the place where it was logged. - * For a logged exception this would be the source line where the - * exception is logged, usually close to the place where it was - * caught. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The HTTP request which was processed when the error was - * triggered. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1; - * @return \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext|null - */ - public function getHttpRequest() - { - return $this->http_request; - } - - public function hasHttpRequest() - { - return isset($this->http_request); - } - - public function clearHttpRequest() - { - unset($this->http_request); - } - - /** - * The HTTP request which was processed when the error was - * triggered. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.HttpRequestContext http_request = 1; - * @param \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext $var - * @return $this - */ - public function setHttpRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\HttpRequestContext::class); - $this->http_request = $var; - - return $this; - } - - /** - * The user who caused or was affected by the crash. - * This can be a user ID, an email address, or an arbitrary token that - * uniquely identifies the user. - * When sending an error report, leave this field empty if the user was not - * logged in. In this case the - * Error Reporting system will use other data, such as remote IP address, to - * distinguish affected users. See `affected_users_count` in - * `ErrorGroupStats`. - * - * Generated from protobuf field string user = 2; - * @return string - */ - public function getUser() - { - return $this->user; - } - - /** - * The user who caused or was affected by the crash. - * This can be a user ID, an email address, or an arbitrary token that - * uniquely identifies the user. - * When sending an error report, leave this field empty if the user was not - * logged in. In this case the - * Error Reporting system will use other data, such as remote IP address, to - * distinguish affected users. See `affected_users_count` in - * `ErrorGroupStats`. - * - * Generated from protobuf field string user = 2; - * @param string $var - * @return $this - */ - public function setUser($var) - { - GPBUtil::checkString($var, True); - $this->user = $var; - - return $this; - } - - /** - * The location in the source code where the decision was made to - * report the error, usually the place where it was logged. - * For a logged exception this would be the source line where the - * exception is logged, usually close to the place where it was - * caught. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.SourceLocation report_location = 3; - * @return \Google\Cloud\ErrorReporting\V1beta1\SourceLocation|null - */ - public function getReportLocation() - { - return $this->report_location; - } - - public function hasReportLocation() - { - return isset($this->report_location); - } - - public function clearReportLocation() - { - unset($this->report_location); - } - - /** - * The location in the source code where the decision was made to - * report the error, usually the place where it was logged. - * For a logged exception this would be the source line where the - * exception is logged, usually close to the place where it was - * caught. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.SourceLocation report_location = 3; - * @param \Google\Cloud\ErrorReporting\V1beta1\SourceLocation $var - * @return $this - */ - public function setReportLocation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\SourceLocation::class); - $this->report_location = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php deleted file mode 100644 index ce67ba92a10c..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorEvent.php +++ /dev/null @@ -1,207 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ErrorEvent - */ -class ErrorEvent extends \Google\Protobuf\Internal\Message -{ - /** - * Time when the event occurred as provided in the error report. - * If the report did not contain a timestamp, the time the error was received - * by the Error Reporting system is used. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1; - */ - protected $event_time = null; - /** - * The `ServiceContext` for which this error was reported. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2; - */ - protected $service_context = null; - /** - * The stack trace that was reported or logged by the service. - * - * Generated from protobuf field string message = 3; - */ - protected $message = ''; - /** - * Data about the context in which the error occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5; - */ - protected $context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $event_time - * Time when the event occurred as provided in the error report. - * If the report did not contain a timestamp, the time the error was received - * by the Error Reporting system is used. - * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $service_context - * The `ServiceContext` for which this error was reported. - * @type string $message - * The stack trace that was reported or logged by the service. - * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $context - * Data about the context in which the error occurred. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Time when the event occurred as provided in the error report. - * If the report did not contain a timestamp, the time the error was received - * by the Error Reporting system is used. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEventTime() - { - return $this->event_time; - } - - public function hasEventTime() - { - return isset($this->event_time); - } - - public function clearEventTime() - { - unset($this->event_time); - } - - /** - * Time when the event occurred as provided in the error report. - * If the report did not contain a timestamp, the time the error was received - * by the Error Reporting system is used. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->event_time = $var; - - return $this; - } - - /** - * The `ServiceContext` for which this error was reported. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2; - * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContext|null - */ - public function getServiceContext() - { - return $this->service_context; - } - - public function hasServiceContext() - { - return isset($this->service_context); - } - - public function clearServiceContext() - { - unset($this->service_context); - } - - /** - * The `ServiceContext` for which this error was reported. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2; - * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $var - * @return $this - */ - public function setServiceContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); - $this->service_context = $var; - - return $this; - } - - /** - * The stack trace that was reported or logged by the service. - * - * Generated from protobuf field string message = 3; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The stack trace that was reported or logged by the service. - * - * Generated from protobuf field string message = 3; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Data about the context in which the error occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorContext|null - */ - public function getContext() - { - return $this->context; - } - - public function hasContext() - { - return isset($this->context); - } - - public function clearContext() - { - unset($this->context); - } - - /** - * Data about the context in which the error occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 5; - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $var - * @return $this - */ - public function setContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorContext::class); - $this->context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php deleted file mode 100644 index 2cdcc20d9fa9..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroup.php +++ /dev/null @@ -1,245 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ErrorGroup - */ -class ErrorGroup extends \Google\Protobuf\Internal\Message -{ - /** - * The group resource name. - * Written as `projects/{projectID}/groups/{group_id}` or - * `projects/{projectID}/locations/{location}/groups/{group_id}` - * Examples: `projects/my-project-123/groups/my-group`, - * `projects/my-project-123/locations/us-central1/groups/my-group` - * In the group resource name, the `group_id` is a unique identifier for a - * particular error group. The identifier is derived from key parts of the - * error-log content and is treated as Service Data. For information about - * how Service Data is handled, see [Google Cloud Privacy - * Notice](https://cloud.google.com/terms/cloud-privacy-notice). - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * An opaque identifier of the group. This field is assigned by the Error - * Reporting system and always populated. - * In the group resource name, the `group_id` is a unique identifier for a - * particular error group. The identifier is derived from key parts of the - * error-log content and is treated as Service Data. For information about - * how Service Data is handled, see [Google Cloud Privacy - * Notice](https://cloud.google.com/terms/cloud-privacy-notice). - * - * Generated from protobuf field string group_id = 2; - */ - protected $group_id = ''; - /** - * Associated tracking issues. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3; - */ - private $tracking_issues; - /** - * Error group's resolution status. - * An unspecified resolution status will be interpreted as OPEN - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; - */ - protected $resolution_status = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The group resource name. - * Written as `projects/{projectID}/groups/{group_id}` or - * `projects/{projectID}/locations/{location}/groups/{group_id}` - * Examples: `projects/my-project-123/groups/my-group`, - * `projects/my-project-123/locations/us-central1/groups/my-group` - * In the group resource name, the `group_id` is a unique identifier for a - * particular error group. The identifier is derived from key parts of the - * error-log content and is treated as Service Data. For information about - * how Service Data is handled, see [Google Cloud Privacy - * Notice](https://cloud.google.com/terms/cloud-privacy-notice). - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. - * @type string $group_id - * An opaque identifier of the group. This field is assigned by the Error - * Reporting system and always populated. - * In the group resource name, the `group_id` is a unique identifier for a - * particular error group. The identifier is derived from key parts of the - * error-log content and is treated as Service Data. For information about - * how Service Data is handled, see [Google Cloud Privacy - * Notice](https://cloud.google.com/terms/cloud-privacy-notice). - * @type \Google\Cloud\ErrorReporting\V1beta1\TrackingIssue[] $tracking_issues - * Associated tracking issues. - * @type int $resolution_status - * Error group's resolution status. - * An unspecified resolution status will be interpreted as OPEN - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The group resource name. - * Written as `projects/{projectID}/groups/{group_id}` or - * `projects/{projectID}/locations/{location}/groups/{group_id}` - * Examples: `projects/my-project-123/groups/my-group`, - * `projects/my-project-123/locations/us-central1/groups/my-group` - * In the group resource name, the `group_id` is a unique identifier for a - * particular error group. The identifier is derived from key parts of the - * error-log content and is treated as Service Data. For information about - * how Service Data is handled, see [Google Cloud Privacy - * Notice](https://cloud.google.com/terms/cloud-privacy-notice). - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The group resource name. - * Written as `projects/{projectID}/groups/{group_id}` or - * `projects/{projectID}/locations/{location}/groups/{group_id}` - * Examples: `projects/my-project-123/groups/my-group`, - * `projects/my-project-123/locations/us-central1/groups/my-group` - * In the group resource name, the `group_id` is a unique identifier for a - * particular error group. The identifier is derived from key parts of the - * error-log content and is treated as Service Data. For information about - * how Service Data is handled, see [Google Cloud Privacy - * Notice](https://cloud.google.com/terms/cloud-privacy-notice). - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. - * - * 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; - } - - /** - * An opaque identifier of the group. This field is assigned by the Error - * Reporting system and always populated. - * In the group resource name, the `group_id` is a unique identifier for a - * particular error group. The identifier is derived from key parts of the - * error-log content and is treated as Service Data. For information about - * how Service Data is handled, see [Google Cloud Privacy - * Notice](https://cloud.google.com/terms/cloud-privacy-notice). - * - * Generated from protobuf field string group_id = 2; - * @return string - */ - public function getGroupId() - { - return $this->group_id; - } - - /** - * An opaque identifier of the group. This field is assigned by the Error - * Reporting system and always populated. - * In the group resource name, the `group_id` is a unique identifier for a - * particular error group. The identifier is derived from key parts of the - * error-log content and is treated as Service Data. For information about - * how Service Data is handled, see [Google Cloud Privacy - * Notice](https://cloud.google.com/terms/cloud-privacy-notice). - * - * Generated from protobuf field string group_id = 2; - * @param string $var - * @return $this - */ - public function setGroupId($var) - { - GPBUtil::checkString($var, True); - $this->group_id = $var; - - return $this; - } - - /** - * Associated tracking issues. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3; - * @return RepeatedField<\Google\Cloud\ErrorReporting\V1beta1\TrackingIssue> - */ - public function getTrackingIssues() - { - return $this->tracking_issues; - } - - /** - * Associated tracking issues. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3; - * @param \Google\Cloud\ErrorReporting\V1beta1\TrackingIssue[] $var - * @return $this - */ - public function setTrackingIssues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\TrackingIssue::class); - $this->tracking_issues = $arr; - - return $this; - } - - /** - * Error group's resolution status. - * An unspecified resolution status will be interpreted as OPEN - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; - * @return int - */ - public function getResolutionStatus() - { - return $this->resolution_status; - } - - /** - * Error group's resolution status. - * An unspecified resolution status will be interpreted as OPEN - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ResolutionStatus resolution_status = 5; - * @param int $var - * @return $this - */ - public function setResolutionStatus($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\ResolutionStatus::class); - $this->resolution_status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php deleted file mode 100644 index fd726de75f01..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupOrder.php +++ /dev/null @@ -1,76 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder - */ -class ErrorGroupOrder -{ - /** - * No group order specified. - * - * Generated from protobuf enum GROUP_ORDER_UNSPECIFIED = 0; - */ - const GROUP_ORDER_UNSPECIFIED = 0; - /** - * Total count of errors in the given time window in descending order. - * - * Generated from protobuf enum COUNT_DESC = 1; - */ - const COUNT_DESC = 1; - /** - * Timestamp when the group was last seen in the given time window - * in descending order. - * - * Generated from protobuf enum LAST_SEEN_DESC = 2; - */ - const LAST_SEEN_DESC = 2; - /** - * Timestamp when the group was created in descending order. - * - * Generated from protobuf enum CREATED_DESC = 3; - */ - const CREATED_DESC = 3; - /** - * Number of affected users in the given time window in descending order. - * - * Generated from protobuf enum AFFECTED_USERS_DESC = 4; - */ - const AFFECTED_USERS_DESC = 4; - - private static $valueToName = [ - self::GROUP_ORDER_UNSPECIFIED => 'GROUP_ORDER_UNSPECIFIED', - self::COUNT_DESC => 'COUNT_DESC', - self::LAST_SEEN_DESC => 'LAST_SEEN_DESC', - self::CREATED_DESC => 'CREATED_DESC', - self::AFFECTED_USERS_DESC => 'AFFECTED_USERS_DESC', - ]; - - 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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php deleted file mode 100644 index d7cbbab95436..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ErrorGroupStats.php +++ /dev/null @@ -1,492 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats - */ -class ErrorGroupStats extends \Google\Protobuf\Internal\Message -{ - /** - * Group data that is independent of the filter criteria. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1; - */ - protected $group = null; - /** - * Approximate total number of events in the given group that match - * the filter criteria. - * - * Generated from protobuf field int64 count = 2; - */ - protected $count = 0; - /** - * Approximate number of affected users in the given group that - * match the filter criteria. - * Users are distinguished by data in the [ErrorContext] - * [google.devtools.clouderrorreporting.v1beta1.ErrorContext] of the - * individual error events, such as their login name or their remote - * IP address in case of HTTP requests. - * The number of affected users can be zero even if the number of - * errors is non-zero if no data was provided from which the - * affected user could be deduced. - * Users are counted based on data in the request - * context that was provided in the error report. If more users are - * implicitly affected, such as due to a crash of the whole service, - * this is not reflected here. - * - * Generated from protobuf field int64 affected_users_count = 3; - */ - protected $affected_users_count = 0; - /** - * Approximate number of occurrences over time. - * Timed counts returned by ListGroups are guaranteed to be: - * - Inside the requested time interval - * - Non-overlapping, and - * - Ordered by ascending time. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4; - */ - private $timed_counts; - /** - * Approximate first occurrence that was ever seen for this group - * and which matches the given filter criteria, ignoring the - * time_range that was specified in the request. - * - * Generated from protobuf field .google.protobuf.Timestamp first_seen_time = 5; - */ - protected $first_seen_time = null; - /** - * Approximate last occurrence that was ever seen for this group and - * which matches the given filter criteria, ignoring the time_range - * that was specified in the request. - * - * Generated from protobuf field .google.protobuf.Timestamp last_seen_time = 6; - */ - protected $last_seen_time = null; - /** - * Service contexts with a non-zero error count for the given filter - * criteria. This list can be truncated if multiple services are affected. - * Refer to `num_affected_services` for the total count. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7; - */ - private $affected_services; - /** - * The total number of services with a non-zero error count for the given - * filter criteria. - * - * Generated from protobuf field int32 num_affected_services = 8; - */ - protected $num_affected_services = 0; - /** - * An arbitrary event that is chosen as representative for the whole group. - * The representative event is intended to be used as a quick preview for - * the whole group. Events in the group are usually sufficiently similar - * to each other such that showing an arbitrary representative provides - * insight into the characteristics of the group as a whole. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9; - */ - protected $representative = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $group - * Group data that is independent of the filter criteria. - * @type int|string $count - * Approximate total number of events in the given group that match - * the filter criteria. - * @type int|string $affected_users_count - * Approximate number of affected users in the given group that - * match the filter criteria. - * Users are distinguished by data in the [ErrorContext] - * [google.devtools.clouderrorreporting.v1beta1.ErrorContext] of the - * individual error events, such as their login name or their remote - * IP address in case of HTTP requests. - * The number of affected users can be zero even if the number of - * errors is non-zero if no data was provided from which the - * affected user could be deduced. - * Users are counted based on data in the request - * context that was provided in the error report. If more users are - * implicitly affected, such as due to a crash of the whole service, - * this is not reflected here. - * @type \Google\Cloud\ErrorReporting\V1beta1\TimedCount[] $timed_counts - * Approximate number of occurrences over time. - * Timed counts returned by ListGroups are guaranteed to be: - * - Inside the requested time interval - * - Non-overlapping, and - * - Ordered by ascending time. - * @type \Google\Protobuf\Timestamp $first_seen_time - * Approximate first occurrence that was ever seen for this group - * and which matches the given filter criteria, ignoring the - * time_range that was specified in the request. - * @type \Google\Protobuf\Timestamp $last_seen_time - * Approximate last occurrence that was ever seen for this group and - * which matches the given filter criteria, ignoring the time_range - * that was specified in the request. - * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContext[] $affected_services - * Service contexts with a non-zero error count for the given filter - * criteria. This list can be truncated if multiple services are affected. - * Refer to `num_affected_services` for the total count. - * @type int $num_affected_services - * The total number of services with a non-zero error count for the given - * filter criteria. - * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent $representative - * An arbitrary event that is chosen as representative for the whole group. - * The representative event is intended to be used as a quick preview for - * the whole group. Events in the group are usually sufficiently similar - * to each other such that showing an arbitrary representative provides - * insight into the characteristics of the group as a whole. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Group data that is independent of the filter criteria. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup|null - */ - public function getGroup() - { - return $this->group; - } - - public function hasGroup() - { - return isset($this->group); - } - - public function clearGroup() - { - unset($this->group); - } - - /** - * Group data that is independent of the filter criteria. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1; - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup::class); - $this->group = $var; - - return $this; - } - - /** - * Approximate total number of events in the given group that match - * the filter criteria. - * - * Generated from protobuf field int64 count = 2; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * Approximate total number of events in the given group that match - * the filter criteria. - * - * Generated from protobuf field int64 count = 2; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - - /** - * Approximate number of affected users in the given group that - * match the filter criteria. - * Users are distinguished by data in the [ErrorContext] - * [google.devtools.clouderrorreporting.v1beta1.ErrorContext] of the - * individual error events, such as their login name or their remote - * IP address in case of HTTP requests. - * The number of affected users can be zero even if the number of - * errors is non-zero if no data was provided from which the - * affected user could be deduced. - * Users are counted based on data in the request - * context that was provided in the error report. If more users are - * implicitly affected, such as due to a crash of the whole service, - * this is not reflected here. - * - * Generated from protobuf field int64 affected_users_count = 3; - * @return int|string - */ - public function getAffectedUsersCount() - { - return $this->affected_users_count; - } - - /** - * Approximate number of affected users in the given group that - * match the filter criteria. - * Users are distinguished by data in the [ErrorContext] - * [google.devtools.clouderrorreporting.v1beta1.ErrorContext] of the - * individual error events, such as their login name or their remote - * IP address in case of HTTP requests. - * The number of affected users can be zero even if the number of - * errors is non-zero if no data was provided from which the - * affected user could be deduced. - * Users are counted based on data in the request - * context that was provided in the error report. If more users are - * implicitly affected, such as due to a crash of the whole service, - * this is not reflected here. - * - * Generated from protobuf field int64 affected_users_count = 3; - * @param int|string $var - * @return $this - */ - public function setAffectedUsersCount($var) - { - GPBUtil::checkInt64($var); - $this->affected_users_count = $var; - - return $this; - } - - /** - * Approximate number of occurrences over time. - * Timed counts returned by ListGroups are guaranteed to be: - * - Inside the requested time interval - * - Non-overlapping, and - * - Ordered by ascending time. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4; - * @return RepeatedField<\Google\Cloud\ErrorReporting\V1beta1\TimedCount> - */ - public function getTimedCounts() - { - return $this->timed_counts; - } - - /** - * Approximate number of occurrences over time. - * Timed counts returned by ListGroups are guaranteed to be: - * - Inside the requested time interval - * - Non-overlapping, and - * - Ordered by ascending time. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4; - * @param \Google\Cloud\ErrorReporting\V1beta1\TimedCount[] $var - * @return $this - */ - public function setTimedCounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\TimedCount::class); - $this->timed_counts = $arr; - - return $this; - } - - /** - * Approximate first occurrence that was ever seen for this group - * and which matches the given filter criteria, ignoring the - * time_range that was specified in the request. - * - * Generated from protobuf field .google.protobuf.Timestamp first_seen_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getFirstSeenTime() - { - return $this->first_seen_time; - } - - public function hasFirstSeenTime() - { - return isset($this->first_seen_time); - } - - public function clearFirstSeenTime() - { - unset($this->first_seen_time); - } - - /** - * Approximate first occurrence that was ever seen for this group - * and which matches the given filter criteria, ignoring the - * time_range that was specified in the request. - * - * Generated from protobuf field .google.protobuf.Timestamp first_seen_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setFirstSeenTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->first_seen_time = $var; - - return $this; - } - - /** - * Approximate last occurrence that was ever seen for this group and - * which matches the given filter criteria, ignoring the time_range - * that was specified in the request. - * - * Generated from protobuf field .google.protobuf.Timestamp last_seen_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastSeenTime() - { - return $this->last_seen_time; - } - - public function hasLastSeenTime() - { - return isset($this->last_seen_time); - } - - public function clearLastSeenTime() - { - unset($this->last_seen_time); - } - - /** - * Approximate last occurrence that was ever seen for this group and - * which matches the given filter criteria, ignoring the time_range - * that was specified in the request. - * - * Generated from protobuf field .google.protobuf.Timestamp last_seen_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastSeenTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_seen_time = $var; - - return $this; - } - - /** - * Service contexts with a non-zero error count for the given filter - * criteria. This list can be truncated if multiple services are affected. - * Refer to `num_affected_services` for the total count. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7; - * @return RepeatedField<\Google\Cloud\ErrorReporting\V1beta1\ServiceContext> - */ - public function getAffectedServices() - { - return $this->affected_services; - } - - /** - * Service contexts with a non-zero error count for the given filter - * criteria. This list can be truncated if multiple services are affected. - * Refer to `num_affected_services` for the total count. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7; - * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContext[] $var - * @return $this - */ - public function setAffectedServices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); - $this->affected_services = $arr; - - return $this; - } - - /** - * The total number of services with a non-zero error count for the given - * filter criteria. - * - * Generated from protobuf field int32 num_affected_services = 8; - * @return int - */ - public function getNumAffectedServices() - { - return $this->num_affected_services; - } - - /** - * The total number of services with a non-zero error count for the given - * filter criteria. - * - * Generated from protobuf field int32 num_affected_services = 8; - * @param int $var - * @return $this - */ - public function setNumAffectedServices($var) - { - GPBUtil::checkInt32($var); - $this->num_affected_services = $var; - - return $this; - } - - /** - * An arbitrary event that is chosen as representative for the whole group. - * The representative event is intended to be used as a quick preview for - * the whole group. Events in the group are usually sufficiently similar - * to each other such that showing an arbitrary representative provides - * insight into the characteristics of the group as a whole. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent|null - */ - public function getRepresentative() - { - return $this->representative; - } - - public function hasRepresentative() - { - return isset($this->representative); - } - - public function clearRepresentative() - { - unset($this->representative); - } - - /** - * An arbitrary event that is chosen as representative for the whole group. - * The representative event is intended to be used as a quick preview for - * the whole group. Events in the group are usually sufficiently similar - * to each other such that showing an arbitrary representative provides - * insight into the characteristics of the group as a whole. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9; - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent $var - * @return $this - */ - public function setRepresentative($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent::class); - $this->representative = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php deleted file mode 100644 index 1c1331021d26..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/GetGroupRequest.php +++ /dev/null @@ -1,159 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.GetGroupRequest - */ -class GetGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The group resource name. Written as either - * `projects/{projectID}/groups/{group_id}` or - * `projects/{projectID}/locations/{location}/groups/{group_id}`. Call - * [groupStats.list] - * [google.devtools.clouderrorreporting.v1beta1.ErrorStatsService.ListGroupStats] - * to return a list of groups belonging to this project. - * Examples: `projects/my-project-123/groups/my-group`, - * `projects/my-project-123/locations/global/groups/my-group` - * In the group resource name, the `group_id` is a unique identifier for a - * particular error group. The identifier is derived from key parts of the - * error-log content and is treated as Service Data. For information about - * how Service Data is handled, see [Google Cloud Privacy - * Notice](https://cloud.google.com/terms/cloud-privacy-notice). - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. - * - * Generated from protobuf field string group_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $group_name = ''; - - /** - * @param string $groupName Required. The group resource name. Written as either - * `projects/{projectID}/groups/{group_id}` or - * `projects/{projectID}/locations/{location}/groups/{group_id}`. Call - * [groupStats.list] - * [google.devtools.clouderrorreporting.v1beta1.ErrorStatsService.ListGroupStats] - * to return a list of groups belonging to this project. - * - * Examples: `projects/my-project-123/groups/my-group`, - * `projects/my-project-123/locations/global/groups/my-group` - * - * In the group resource name, the `group_id` is a unique identifier for a - * particular error group. The identifier is derived from key parts of the - * error-log content and is treated as Service Data. For information about - * how Service Data is handled, see [Google Cloud Privacy - * Notice](https://cloud.google.com/terms/cloud-privacy-notice). - * - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. Please see - * {@see ErrorGroupServiceClient::errorGroupName()} for help formatting this field. - * - * @return \Google\Cloud\ErrorReporting\V1beta1\GetGroupRequest - * - * @experimental - */ - public static function build(string $groupName): self - { - return (new self()) - ->setGroupName($groupName); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $group_name - * Required. The group resource name. Written as either - * `projects/{projectID}/groups/{group_id}` or - * `projects/{projectID}/locations/{location}/groups/{group_id}`. Call - * [groupStats.list] - * [google.devtools.clouderrorreporting.v1beta1.ErrorStatsService.ListGroupStats] - * to return a list of groups belonging to this project. - * Examples: `projects/my-project-123/groups/my-group`, - * `projects/my-project-123/locations/global/groups/my-group` - * In the group resource name, the `group_id` is a unique identifier for a - * particular error group. The identifier is derived from key parts of the - * error-log content and is treated as Service Data. For information about - * how Service Data is handled, see [Google Cloud Privacy - * Notice](https://cloud.google.com/terms/cloud-privacy-notice). - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorGroupService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The group resource name. Written as either - * `projects/{projectID}/groups/{group_id}` or - * `projects/{projectID}/locations/{location}/groups/{group_id}`. Call - * [groupStats.list] - * [google.devtools.clouderrorreporting.v1beta1.ErrorStatsService.ListGroupStats] - * to return a list of groups belonging to this project. - * Examples: `projects/my-project-123/groups/my-group`, - * `projects/my-project-123/locations/global/groups/my-group` - * In the group resource name, the `group_id` is a unique identifier for a - * particular error group. The identifier is derived from key parts of the - * error-log content and is treated as Service Data. For information about - * how Service Data is handled, see [Google Cloud Privacy - * Notice](https://cloud.google.com/terms/cloud-privacy-notice). - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. - * - * Generated from protobuf field string group_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getGroupName() - { - return $this->group_name; - } - - /** - * Required. The group resource name. Written as either - * `projects/{projectID}/groups/{group_id}` or - * `projects/{projectID}/locations/{location}/groups/{group_id}`. Call - * [groupStats.list] - * [google.devtools.clouderrorreporting.v1beta1.ErrorStatsService.ListGroupStats] - * to return a list of groups belonging to this project. - * Examples: `projects/my-project-123/groups/my-group`, - * `projects/my-project-123/locations/global/groups/my-group` - * In the group resource name, the `group_id` is a unique identifier for a - * particular error group. The identifier is derived from key parts of the - * error-log content and is treated as Service Data. For information about - * how Service Data is handled, see [Google Cloud Privacy - * Notice](https://cloud.google.com/terms/cloud-privacy-notice). - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. - * - * Generated from protobuf field string group_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setGroupName($var) - { - GPBUtil::checkString($var, True); - $this->group_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php deleted file mode 100644 index f77253422435..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/HttpRequestContext.php +++ /dev/null @@ -1,252 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.HttpRequestContext - */ -class HttpRequestContext extends \Google\Protobuf\Internal\Message -{ - /** - * The type of HTTP request, such as `GET`, `POST`, etc. - * - * Generated from protobuf field string method = 1; - */ - protected $method = ''; - /** - * The URL of the request. - * - * Generated from protobuf field string url = 2; - */ - protected $url = ''; - /** - * The user agent information that is provided with the request. - * - * Generated from protobuf field string user_agent = 3; - */ - protected $user_agent = ''; - /** - * The referrer information that is provided with the request. - * - * Generated from protobuf field string referrer = 4; - */ - protected $referrer = ''; - /** - * The HTTP response status code for the request. - * - * Generated from protobuf field int32 response_status_code = 5; - */ - protected $response_status_code = 0; - /** - * The IP address from which the request originated. - * This can be IPv4, IPv6, or a token which is derived from the - * IP address, depending on the data that has been provided - * in the error report. - * - * Generated from protobuf field string remote_ip = 6; - */ - protected $remote_ip = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $method - * The type of HTTP request, such as `GET`, `POST`, etc. - * @type string $url - * The URL of the request. - * @type string $user_agent - * The user agent information that is provided with the request. - * @type string $referrer - * The referrer information that is provided with the request. - * @type int $response_status_code - * The HTTP response status code for the request. - * @type string $remote_ip - * The IP address from which the request originated. - * This can be IPv4, IPv6, or a token which is derived from the - * IP address, depending on the data that has been provided - * in the error report. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The type of HTTP request, such as `GET`, `POST`, etc. - * - * Generated from protobuf field string method = 1; - * @return string - */ - public function getMethod() - { - return $this->method; - } - - /** - * The type of HTTP request, such as `GET`, `POST`, etc. - * - * Generated from protobuf field string method = 1; - * @param string $var - * @return $this - */ - public function setMethod($var) - { - GPBUtil::checkString($var, True); - $this->method = $var; - - return $this; - } - - /** - * The URL of the request. - * - * Generated from protobuf field string url = 2; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * The URL of the request. - * - * Generated from protobuf field string url = 2; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * The user agent information that is provided with the request. - * - * Generated from protobuf field string user_agent = 3; - * @return string - */ - public function getUserAgent() - { - return $this->user_agent; - } - - /** - * The user agent information that is provided with the request. - * - * Generated from protobuf field string user_agent = 3; - * @param string $var - * @return $this - */ - public function setUserAgent($var) - { - GPBUtil::checkString($var, True); - $this->user_agent = $var; - - return $this; - } - - /** - * The referrer information that is provided with the request. - * - * Generated from protobuf field string referrer = 4; - * @return string - */ - public function getReferrer() - { - return $this->referrer; - } - - /** - * The referrer information that is provided with the request. - * - * Generated from protobuf field string referrer = 4; - * @param string $var - * @return $this - */ - public function setReferrer($var) - { - GPBUtil::checkString($var, True); - $this->referrer = $var; - - return $this; - } - - /** - * The HTTP response status code for the request. - * - * Generated from protobuf field int32 response_status_code = 5; - * @return int - */ - public function getResponseStatusCode() - { - return $this->response_status_code; - } - - /** - * The HTTP response status code for the request. - * - * Generated from protobuf field int32 response_status_code = 5; - * @param int $var - * @return $this - */ - public function setResponseStatusCode($var) - { - GPBUtil::checkInt32($var); - $this->response_status_code = $var; - - return $this; - } - - /** - * The IP address from which the request originated. - * This can be IPv4, IPv6, or a token which is derived from the - * IP address, depending on the data that has been provided - * in the error report. - * - * Generated from protobuf field string remote_ip = 6; - * @return string - */ - public function getRemoteIp() - { - return $this->remote_ip; - } - - /** - * The IP address from which the request originated. - * This can be IPv4, IPv6, or a token which is derived from the - * IP address, depending on the data that has been provided - * in the error report. - * - * Generated from protobuf field string remote_ip = 6; - * @param string $var - * @return $this - */ - public function setRemoteIp($var) - { - GPBUtil::checkString($var, True); - $this->remote_ip = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php deleted file mode 100644 index 3f44f5a95443..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsRequest.php +++ /dev/null @@ -1,361 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ListEventsRequest - */ -class ListEventsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, - * where `{projectID}` is the [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is - * a Cloud region. - * Examples: `projects/my-project-123`, - * `projects/my-project-123/locations/global`. - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $project_name = ''; - /** - * Required. The group for which events shall be returned. - * The `group_id` is a unique identifier for a particular error group. The - * identifier is derived from key parts of the error-log content and is - * treated as Service Data. For information about how Service Data - * is handled, see [Google Cloud Privacy - * Notice](https://cloud.google.com/terms/cloud-privacy-notice). - * - * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group_id = ''; - /** - * Optional. List only ErrorGroups which belong to a service context that - * matches the filter. - * Data for all service contexts is returned if this field is not specified. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_filter = null; - /** - * Optional. List only data for the given time range. - * If not set a default time range is used. The field time_range_begin - * in the response will specify the beginning of this time range. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $time_range = null; - /** - * Optional. The maximum number of results to return per response. - * - * Generated from protobuf field int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A `next_page_token` provided by a previous response. - * - * Generated from protobuf field string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, - * where `{projectID}` is the [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is - * a Cloud region. - * - * Examples: `projects/my-project-123`, - * `projects/my-project-123/locations/global`. - * - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. Please see - * {@see ErrorStatsServiceClient::projectName()} for help formatting this field. - * @param string $groupId Required. The group for which events shall be returned. - * The `group_id` is a unique identifier for a particular error group. The - * identifier is derived from key parts of the error-log content and is - * treated as Service Data. For information about how Service Data - * is handled, see [Google Cloud Privacy - * Notice](https://cloud.google.com/terms/cloud-privacy-notice). - * - * @return \Google\Cloud\ErrorReporting\V1beta1\ListEventsRequest - * - * @experimental - */ - public static function build(string $projectName, string $groupId): self - { - return (new self()) - ->setProjectName($projectName) - ->setGroupId($groupId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_name - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, - * where `{projectID}` is the [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is - * a Cloud region. - * Examples: `projects/my-project-123`, - * `projects/my-project-123/locations/global`. - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. - * @type string $group_id - * Required. The group for which events shall be returned. - * The `group_id` is a unique identifier for a particular error group. The - * identifier is derived from key parts of the error-log content and is - * treated as Service Data. For information about how Service Data - * is handled, see [Google Cloud Privacy - * Notice](https://cloud.google.com/terms/cloud-privacy-notice). - * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $service_filter - * Optional. List only ErrorGroups which belong to a service context that - * matches the filter. - * Data for all service contexts is returned if this field is not specified. - * @type \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $time_range - * Optional. List only data for the given time range. - * If not set a default time range is used. The field time_range_begin - * in the response will specify the beginning of this time range. - * @type int $page_size - * Optional. The maximum number of results to return per response. - * @type string $page_token - * Optional. A `next_page_token` provided by a previous response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, - * where `{projectID}` is the [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is - * a Cloud region. - * Examples: `projects/my-project-123`, - * `projects/my-project-123/locations/global`. - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getProjectName() - { - return $this->project_name; - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectID}/locations/{location}`, - * where `{projectID}` is the [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840) and `{location}` is - * a Cloud region. - * Examples: `projects/my-project-123`, - * `projects/my-project-123/locations/global`. - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProjectName($var) - { - GPBUtil::checkString($var, True); - $this->project_name = $var; - - return $this; - } - - /** - * Required. The group for which events shall be returned. - * The `group_id` is a unique identifier for a particular error group. The - * identifier is derived from key parts of the error-log content and is - * treated as Service Data. For information about how Service Data - * is handled, see [Google Cloud Privacy - * Notice](https://cloud.google.com/terms/cloud-privacy-notice). - * - * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGroupId() - { - return $this->group_id; - } - - /** - * Required. The group for which events shall be returned. - * The `group_id` is a unique identifier for a particular error group. The - * identifier is derived from key parts of the error-log content and is - * treated as Service Data. For information about how Service Data - * is handled, see [Google Cloud Privacy - * Notice](https://cloud.google.com/terms/cloud-privacy-notice). - * - * Generated from protobuf field string group_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGroupId($var) - { - GPBUtil::checkString($var, True); - $this->group_id = $var; - - return $this; - } - - /** - * Optional. List only ErrorGroups which belong to a service context that - * matches the filter. - * Data for all service contexts is returned if this field is not specified. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter|null - */ - public function getServiceFilter() - { - return $this->service_filter; - } - - public function hasServiceFilter() - { - return isset($this->service_filter); - } - - public function clearServiceFilter() - { - unset($this->service_filter); - } - - /** - * Optional. List only ErrorGroups which belong to a service context that - * matches the filter. - * Data for all service contexts is returned if this field is not specified. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $var - * @return $this - */ - public function setServiceFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter::class); - $this->service_filter = $var; - - return $this; - } - - /** - * Optional. List only data for the given time range. - * If not set a default time range is used. The field time_range_begin - * in the response will specify the beginning of this time range. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange|null - */ - public function getTimeRange() - { - return $this->time_range; - } - - public function hasTimeRange() - { - return isset($this->time_range); - } - - public function clearTimeRange() - { - unset($this->time_range); - } - - /** - * Optional. List only data for the given time range. - * If not set a default time range is used. The field time_range_begin - * in the response will specify the beginning of this time range. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $var - * @return $this - */ - public function setTimeRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange::class); - $this->time_range = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return per response. - * - * Generated from protobuf field int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return per response. - * - * Generated from protobuf field int32 page_size = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A `next_page_token` provided by a previous response. - * - * Generated from protobuf field string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A `next_page_token` provided by a previous response. - * - * Generated from protobuf field string page_token = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php deleted file mode 100644 index 511b515030c8..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListEventsResponse.php +++ /dev/null @@ -1,153 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ListEventsResponse - */ -class ListEventsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The error events which match the given request. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorEvent error_events = 1; - */ - private $error_events; - /** - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The timestamp specifies the start time to which the request was restricted. - * - * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - */ - protected $time_range_begin = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent[] $error_events - * The error events which match the given request. - * @type string $next_page_token - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * @type \Google\Protobuf\Timestamp $time_range_begin - * The timestamp specifies the start time to which the request was restricted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * The error events which match the given request. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorEvent error_events = 1; - * @return RepeatedField<\Google\Cloud\ErrorReporting\V1beta1\ErrorEvent> - */ - public function getErrorEvents() - { - return $this->error_events; - } - - /** - * The error events which match the given request. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorEvent error_events = 1; - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent[] $var - * @return $this - */ - public function setErrorEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ErrorEvent::class); - $this->error_events = $arr; - - return $this; - } - - /** - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view 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; - } - - /** - * The timestamp specifies the start time to which the request was restricted. - * - * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTimeRangeBegin() - { - return $this->time_range_begin; - } - - public function hasTimeRangeBegin() - { - return isset($this->time_range_begin); - } - - public function clearTimeRangeBegin() - { - unset($this->time_range_begin); - } - - /** - * The timestamp specifies the start time to which the request was restricted. - * - * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTimeRangeBegin($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->time_range_begin = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php deleted file mode 100644 index ec0d47f0af44..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsRequest.php +++ /dev/null @@ -1,638 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest - */ -class ListGroupStatsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectNumber}`, where - * `{projectID}` and `{projectNumber}` can be found in the - * [Google Cloud console](https://support.google.com/cloud/answer/6158840). - * It may also include a location, such as - * `projects/{projectID}/locations/{location}` where `{location}` is a cloud - * region. - * Examples: `projects/my-project-123`, `projects/5551234`, - * `projects/my-project-123/locations/us-central1`, - * `projects/5551234/locations/us-central1`. - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. Use `-` as a wildcard to request group stats - * from all regions. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $project_name = ''; - /** - * Optional. List all [ErrorGroupStats] - * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with these - * IDs. The `group_id` is a unique identifier for a particular error group. - * The identifier is derived from key parts of the error-log content and is - * treated as Service Data. For information about how Service Data - * is handled, see [Google Cloud Privacy Notice] - * (https://cloud.google.com/terms/cloud-privacy-notice). - * - * Generated from protobuf field repeated string group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $group_id; - /** - * Optional. List only [ErrorGroupStats] - * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] which belong - * to a service context that matches the filter. Data for all service contexts - * is returned if this field is not specified. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service_filter = null; - /** - * Optional. List data for the given time range. - * If not set, a default time range is used. The field - * [time_range_begin] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.time_range_begin] - * in the response will specify the beginning of this time range. Only - * [ErrorGroupStats] - * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with a - * non-zero count in the given time range are returned, unless the request - * contains an explicit [group_id] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] - * list. If a [group_id] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] - * list is given, also [ErrorGroupStats] - * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with zero - * occurrences are returned. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $time_range = null; - /** - * Optional. The preferred duration for a single returned [TimedCount] - * [google.devtools.clouderrorreporting.v1beta1.TimedCount]. If not set, no - * timed counts are returned. - * - * Generated from protobuf field .google.protobuf.Duration timed_count_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $timed_count_duration = null; - /** - * Optional. The alignment of the timed counts to be returned. - * Default is `ALIGNMENT_EQUAL_AT_END`. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $alignment = 0; - /** - * Optional. Time where the timed counts shall be aligned if rounded - * alignment is chosen. Default is 00:00 UTC. - * - * Generated from protobuf field .google.protobuf.Timestamp alignment_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $alignment_time = null; - /** - * Optional. The sort order in which the results are returned. - * Default is `COUNT_DESC`. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order = 0; - /** - * Optional. The maximum number of results to return per response. - * Default is 20. - * - * Generated from protobuf field int32 page_size = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A [next_page_token] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.next_page_token] - * provided by a previous response. To view additional results, pass this - * token along with the identical query parameters as the first request. - * - * Generated from protobuf field string page_token = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectNumber}`, where - * `{projectID}` and `{projectNumber}` can be found in the - * [Google Cloud console](https://support.google.com/cloud/answer/6158840). - * It may also include a location, such as - * `projects/{projectID}/locations/{location}` where `{location}` is a cloud - * region. - * - * Examples: `projects/my-project-123`, `projects/5551234`, - * `projects/my-project-123/locations/us-central1`, - * `projects/5551234/locations/us-central1`. - * - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. Use `-` as a wildcard to request group stats - * from all regions. Please see - * {@see ErrorStatsServiceClient::projectName()} for help formatting this field. - * @param \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $timeRange Optional. List data for the given time range. - * If not set, a default time range is used. The field - * [time_range_begin] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.time_range_begin] - * in the response will specify the beginning of this time range. Only - * [ErrorGroupStats] - * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with a - * non-zero count in the given time range are returned, unless the request - * contains an explicit [group_id] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] - * list. If a [group_id] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] - * list is given, also [ErrorGroupStats] - * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with zero - * occurrences are returned. - * - * @return \Google\Cloud\ErrorReporting\V1beta1\ListGroupStatsRequest - * - * @experimental - */ - public static function build(string $projectName, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $timeRange): self - { - return (new self()) - ->setProjectName($projectName) - ->setTimeRange($timeRange); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_name - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectNumber}`, where - * `{projectID}` and `{projectNumber}` can be found in the - * [Google Cloud console](https://support.google.com/cloud/answer/6158840). - * It may also include a location, such as - * `projects/{projectID}/locations/{location}` where `{location}` is a cloud - * region. - * Examples: `projects/my-project-123`, `projects/5551234`, - * `projects/my-project-123/locations/us-central1`, - * `projects/5551234/locations/us-central1`. - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. Use `-` as a wildcard to request group stats - * from all regions. - * @type string[] $group_id - * Optional. List all [ErrorGroupStats] - * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with these - * IDs. The `group_id` is a unique identifier for a particular error group. - * The identifier is derived from key parts of the error-log content and is - * treated as Service Data. For information about how Service Data - * is handled, see [Google Cloud Privacy Notice] - * (https://cloud.google.com/terms/cloud-privacy-notice). - * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $service_filter - * Optional. List only [ErrorGroupStats] - * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] which belong - * to a service context that matches the filter. Data for all service contexts - * is returned if this field is not specified. - * @type \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $time_range - * Optional. List data for the given time range. - * If not set, a default time range is used. The field - * [time_range_begin] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.time_range_begin] - * in the response will specify the beginning of this time range. Only - * [ErrorGroupStats] - * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with a - * non-zero count in the given time range are returned, unless the request - * contains an explicit [group_id] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] - * list. If a [group_id] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] - * list is given, also [ErrorGroupStats] - * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with zero - * occurrences are returned. - * @type \Google\Protobuf\Duration $timed_count_duration - * Optional. The preferred duration for a single returned [TimedCount] - * [google.devtools.clouderrorreporting.v1beta1.TimedCount]. If not set, no - * timed counts are returned. - * @type int $alignment - * Optional. The alignment of the timed counts to be returned. - * Default is `ALIGNMENT_EQUAL_AT_END`. - * @type \Google\Protobuf\Timestamp $alignment_time - * Optional. Time where the timed counts shall be aligned if rounded - * alignment is chosen. Default is 00:00 UTC. - * @type int $order - * Optional. The sort order in which the results are returned. - * Default is `COUNT_DESC`. - * @type int $page_size - * Optional. The maximum number of results to return per response. - * Default is 20. - * @type string $page_token - * Optional. A [next_page_token] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.next_page_token] - * provided by a previous response. To view additional results, pass this - * token along with the identical query parameters as the first request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectNumber}`, where - * `{projectID}` and `{projectNumber}` can be found in the - * [Google Cloud console](https://support.google.com/cloud/answer/6158840). - * It may also include a location, such as - * `projects/{projectID}/locations/{location}` where `{location}` is a cloud - * region. - * Examples: `projects/my-project-123`, `projects/5551234`, - * `projects/my-project-123/locations/us-central1`, - * `projects/5551234/locations/us-central1`. - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. Use `-` as a wildcard to request group stats - * from all regions. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getProjectName() - { - return $this->project_name; - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectID}` or `projects/{projectNumber}`, where - * `{projectID}` and `{projectNumber}` can be found in the - * [Google Cloud console](https://support.google.com/cloud/answer/6158840). - * It may also include a location, such as - * `projects/{projectID}/locations/{location}` where `{location}` is a cloud - * region. - * Examples: `projects/my-project-123`, `projects/5551234`, - * `projects/my-project-123/locations/us-central1`, - * `projects/5551234/locations/us-central1`. - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support). `global` is - * the default when unspecified. Use `-` as a wildcard to request group stats - * from all regions. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProjectName($var) - { - GPBUtil::checkString($var, True); - $this->project_name = $var; - - return $this; - } - - /** - * Optional. List all [ErrorGroupStats] - * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with these - * IDs. The `group_id` is a unique identifier for a particular error group. - * The identifier is derived from key parts of the error-log content and is - * treated as Service Data. For information about how Service Data - * is handled, see [Google Cloud Privacy Notice] - * (https://cloud.google.com/terms/cloud-privacy-notice). - * - * Generated from protobuf field repeated string group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getGroupId() - { - return $this->group_id; - } - - /** - * Optional. List all [ErrorGroupStats] - * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with these - * IDs. The `group_id` is a unique identifier for a particular error group. - * The identifier is derived from key parts of the error-log content and is - * treated as Service Data. For information about how Service Data - * is handled, see [Google Cloud Privacy Notice] - * (https://cloud.google.com/terms/cloud-privacy-notice). - * - * Generated from protobuf field repeated string group_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[] $var - * @return $this - */ - public function setGroupId($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->group_id = $arr; - - return $this; - } - - /** - * Optional. List only [ErrorGroupStats] - * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] which belong - * to a service context that matches the filter. Data for all service contexts - * is returned if this field is not specified. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter|null - */ - public function getServiceFilter() - { - return $this->service_filter; - } - - public function hasServiceFilter() - { - return isset($this->service_filter); - } - - public function clearServiceFilter() - { - unset($this->service_filter); - } - - /** - * Optional. List only [ErrorGroupStats] - * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] which belong - * to a service context that matches the filter. Data for all service contexts - * is returned if this field is not specified. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter $var - * @return $this - */ - public function setServiceFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContextFilter::class); - $this->service_filter = $var; - - return $this; - } - - /** - * Optional. List data for the given time range. - * If not set, a default time range is used. The field - * [time_range_begin] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.time_range_begin] - * in the response will specify the beginning of this time range. Only - * [ErrorGroupStats] - * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with a - * non-zero count in the given time range are returned, unless the request - * contains an explicit [group_id] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] - * list. If a [group_id] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] - * list is given, also [ErrorGroupStats] - * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with zero - * occurrences are returned. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange|null - */ - public function getTimeRange() - { - return $this->time_range; - } - - public function hasTimeRange() - { - return isset($this->time_range); - } - - public function clearTimeRange() - { - unset($this->time_range); - } - - /** - * Optional. List data for the given time range. - * If not set, a default time range is used. The field - * [time_range_begin] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.time_range_begin] - * in the response will specify the beginning of this time range. Only - * [ErrorGroupStats] - * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with a - * non-zero count in the given time range are returned, unless the request - * contains an explicit [group_id] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] - * list. If a [group_id] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.group_id] - * list is given, also [ErrorGroupStats] - * [google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats] with zero - * occurrences are returned. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange $var - * @return $this - */ - public function setTimeRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange::class); - $this->time_range = $var; - - return $this; - } - - /** - * Optional. The preferred duration for a single returned [TimedCount] - * [google.devtools.clouderrorreporting.v1beta1.TimedCount]. If not set, no - * timed counts are returned. - * - * Generated from protobuf field .google.protobuf.Duration timed_count_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getTimedCountDuration() - { - return $this->timed_count_duration; - } - - public function hasTimedCountDuration() - { - return isset($this->timed_count_duration); - } - - public function clearTimedCountDuration() - { - unset($this->timed_count_duration); - } - - /** - * Optional. The preferred duration for a single returned [TimedCount] - * [google.devtools.clouderrorreporting.v1beta1.TimedCount]. If not set, no - * timed counts are returned. - * - * Generated from protobuf field .google.protobuf.Duration timed_count_duration = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimedCountDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timed_count_duration = $var; - - return $this; - } - - /** - * Optional. The alignment of the timed counts to be returned. - * Default is `ALIGNMENT_EQUAL_AT_END`. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getAlignment() - { - return $this->alignment; - } - - /** - * Optional. The alignment of the timed counts to be returned. - * Default is `ALIGNMENT_EQUAL_AT_END`. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setAlignment($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\TimedCountAlignment::class); - $this->alignment = $var; - - return $this; - } - - /** - * Optional. Time where the timed counts shall be aligned if rounded - * alignment is chosen. Default is 00:00 UTC. - * - * Generated from protobuf field .google.protobuf.Timestamp alignment_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getAlignmentTime() - { - return $this->alignment_time; - } - - public function hasAlignmentTime() - { - return isset($this->alignment_time); - } - - public function clearAlignmentTime() - { - unset($this->alignment_time); - } - - /** - * Optional. Time where the timed counts shall be aligned if rounded - * alignment is chosen. Default is 00:00 UTC. - * - * Generated from protobuf field .google.protobuf.Timestamp alignment_time = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setAlignmentTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->alignment_time = $var; - - return $this; - } - - /** - * Optional. The sort order in which the results are returned. - * Default is `COUNT_DESC`. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getOrder() - { - return $this->order; - } - - /** - * Optional. The sort order in which the results are returned. - * Default is `COUNT_DESC`. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setOrder($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupOrder::class); - $this->order = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return per response. - * Default is 20. - * - * Generated from protobuf field int32 page_size = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return per response. - * Default is 20. - * - * Generated from protobuf field int32 page_size = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A [next_page_token] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.next_page_token] - * provided by a previous response. To view additional results, pass this - * token along with the identical query parameters as the first request. - * - * Generated from protobuf field string page_token = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A [next_page_token] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse.next_page_token] - * provided by a previous response. To view additional results, pass this - * token along with the identical query parameters as the first request. - * - * Generated from protobuf field string page_token = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php deleted file mode 100644 index fd7da35d035c..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ListGroupStatsResponse.php +++ /dev/null @@ -1,165 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ListGroupStatsResponse - */ -class ListGroupStatsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The error group stats which match the given request. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats error_group_stats = 1; - */ - private $error_group_stats; - /** - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The timestamp specifies the start time to which the request was restricted. - * The start time is set based on the requested time range. It may be adjusted - * to a later time if a project has exceeded the storage quota and older data - * has been deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - */ - protected $time_range_begin = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats[] $error_group_stats - * The error group stats which match the given request. - * @type string $next_page_token - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * @type \Google\Protobuf\Timestamp $time_range_begin - * The timestamp specifies the start time to which the request was restricted. - * The start time is set based on the requested time range. It may be adjusted - * to a later time if a project has exceeded the storage quota and older data - * has been deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * The error group stats which match the given request. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats error_group_stats = 1; - * @return RepeatedField<\Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats> - */ - public function getErrorGroupStats() - { - return $this->error_group_stats; - } - - /** - * The error group stats which match the given request. - * - * Generated from protobuf field repeated .google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats error_group_stats = 1; - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats[] $var - * @return $this - */ - public function setErrorGroupStats($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroupStats::class); - $this->error_group_stats = $arr; - - return $this; - } - - /** - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view the next page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If non-empty, more results are available. - * Pass this token, along with the same query parameters as the first - * request, to view 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; - } - - /** - * The timestamp specifies the start time to which the request was restricted. - * The start time is set based on the requested time range. It may be adjusted - * to a later time if a project has exceeded the storage quota and older data - * has been deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTimeRangeBegin() - { - return $this->time_range_begin; - } - - public function hasTimeRangeBegin() - { - return isset($this->time_range_begin); - } - - public function clearTimeRangeBegin() - { - unset($this->time_range_begin); - } - - /** - * The timestamp specifies the start time to which the request was restricted. - * The start time is set based on the requested time range. It may be adjusted - * to a later time if a project has exceeded the storage quota and older data - * has been deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp time_range_begin = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTimeRangeBegin($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->time_range_begin = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php deleted file mode 100644 index 182c809c7075..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange.php +++ /dev/null @@ -1,73 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.QueryTimeRange - */ -class QueryTimeRange extends \Google\Protobuf\Internal\Message -{ - /** - * Restricts the query to the specified time range. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1; - */ - protected $period = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $period - * Restricts the query to the specified time range. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Restricts the query to the specified time range. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1; - * @return int - */ - public function getPeriod() - { - return $this->period; - } - - /** - * Restricts the query to the specified time range. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period period = 1; - * @param int $var - * @return $this - */ - public function setPeriod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\ErrorReporting\V1beta1\QueryTimeRange\Period::class); - $this->period = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php deleted file mode 100644 index cd961eda5830..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/QueryTimeRange/Period.php +++ /dev/null @@ -1,87 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Period - */ -class Period -{ - /** - * Do not use. - * - * Generated from protobuf enum PERIOD_UNSPECIFIED = 0; - */ - const PERIOD_UNSPECIFIED = 0; - /** - * Retrieve data for the last hour. - * Recommended minimum timed count duration: 1 min. - * - * Generated from protobuf enum PERIOD_1_HOUR = 1; - */ - const PERIOD_1_HOUR = 1; - /** - * Retrieve data for the last 6 hours. - * Recommended minimum timed count duration: 10 min. - * - * Generated from protobuf enum PERIOD_6_HOURS = 2; - */ - const PERIOD_6_HOURS = 2; - /** - * Retrieve data for the last day. - * Recommended minimum timed count duration: 1 hour. - * - * Generated from protobuf enum PERIOD_1_DAY = 3; - */ - const PERIOD_1_DAY = 3; - /** - * Retrieve data for the last week. - * Recommended minimum timed count duration: 6 hours. - * - * Generated from protobuf enum PERIOD_1_WEEK = 4; - */ - const PERIOD_1_WEEK = 4; - /** - * Retrieve data for the last 30 days. - * Recommended minimum timed count duration: 1 day. - * - * Generated from protobuf enum PERIOD_30_DAYS = 5; - */ - const PERIOD_30_DAYS = 5; - - private static $valueToName = [ - self::PERIOD_UNSPECIFIED => 'PERIOD_UNSPECIFIED', - self::PERIOD_1_HOUR => 'PERIOD_1_HOUR', - self::PERIOD_6_HOURS => 'PERIOD_6_HOURS', - self::PERIOD_1_DAY => 'PERIOD_1_DAY', - self::PERIOD_1_WEEK => 'PERIOD_1_WEEK', - self::PERIOD_30_DAYS => 'PERIOD_30_DAYS', - ]; - - 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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventRequest.php deleted file mode 100644 index 35fd2ac21916..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventRequest.php +++ /dev/null @@ -1,148 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ReportErrorEventRequest - */ -class ReportErrorEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectId}`, where `{projectId}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: // `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $project_name = ''; - /** - * Required. The error event to be reported. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent event = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $event = null; - - /** - * @param string $projectName Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectId}`, where `{projectId}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * - * Example: // `projects/my-project-123`. Please see - * {@see ReportErrorsServiceClient::projectName()} for help formatting this field. - * @param \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent $event Required. The error event to be reported. - * - * @return \Google\Cloud\ErrorReporting\V1beta1\ReportErrorEventRequest - * - * @experimental - */ - public static function build(string $projectName, \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent $event): self - { - return (new self()) - ->setProjectName($projectName) - ->setEvent($event); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_name - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectId}`, where `{projectId}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: // `projects/my-project-123`. - * @type \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent $event - * Required. The error event to be reported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ReportErrorsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectId}`, where `{projectId}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: // `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getProjectName() - { - return $this->project_name; - } - - /** - * Required. The resource name of the Google Cloud Platform project. Written - * as `projects/{projectId}`, where `{projectId}` is the - * [Google Cloud Platform project - * ID](https://support.google.com/cloud/answer/6158840). - * Example: // `projects/my-project-123`. - * - * Generated from protobuf field string project_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setProjectName($var) - { - GPBUtil::checkString($var, True); - $this->project_name = $var; - - return $this; - } - - /** - * Required. The error event to be reported. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent|null - */ - public function getEvent() - { - return $this->event; - } - - public function hasEvent() - { - return isset($this->event); - } - - public function clearEvent() - { - unset($this->event); - } - - /** - * Required. The error event to be reported. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent $var - * @return $this - */ - public function setEvent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ReportedErrorEvent::class); - $this->event = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php deleted file mode 100644 index 53165d85178d..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportErrorEventResponse.php +++ /dev/null @@ -1,34 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ReportErrorEventResponse - */ -class ReportErrorEventResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ReportErrorsService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php deleted file mode 100644 index e593e184593a..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ReportedErrorEvent.php +++ /dev/null @@ -1,311 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent - */ -class ReportedErrorEvent extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Time when the event occurred. - * If not provided, the time when the event was received by the - * Error Reporting system is used. If provided, the time must not - * exceed the [logs retention - * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in - * the past, or be more than 24 hours in the future. - * If an invalid time is provided, then an error is returned. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $event_time = null; - /** - * Required. The service context in which this error has occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $service_context = null; - /** - * Required. The error message. - * If no `context.reportLocation` is provided, the message must contain a - * header (typically consisting of the exception type name and an error - * message) and an exception stack trace in one of the supported programming - * languages and formats. - * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. - * Supported stack trace formats are: - * * **Java**: Must be the return value of - * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). - * * **Python**: Must be the return value of - * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). - * * **JavaScript**: Must be the value of - * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned - * by V8. - * * **Ruby**: Must contain frames returned by - * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). - * * **C#**: Must be the return value of - * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). - * * **PHP**: Must be prefixed with `"PHP (Notice|Parse error|Fatal - * error|Warning): "` and contain the result of - * [`(string)$exception`](https://php.net/manual/en/exception.tostring.php). - * * **Go**: Must be the return value of - * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). - * - * Generated from protobuf field string message = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $message = ''; - /** - * Optional. A description of the context in which the error occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $context = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $event_time - * Optional. Time when the event occurred. - * If not provided, the time when the event was received by the - * Error Reporting system is used. If provided, the time must not - * exceed the [logs retention - * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in - * the past, or be more than 24 hours in the future. - * If an invalid time is provided, then an error is returned. - * @type \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $service_context - * Required. The service context in which this error has occurred. - * @type string $message - * Required. The error message. - * If no `context.reportLocation` is provided, the message must contain a - * header (typically consisting of the exception type name and an error - * message) and an exception stack trace in one of the supported programming - * languages and formats. - * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. - * Supported stack trace formats are: - * * **Java**: Must be the return value of - * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). - * * **Python**: Must be the return value of - * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). - * * **JavaScript**: Must be the value of - * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned - * by V8. - * * **Ruby**: Must contain frames returned by - * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). - * * **C#**: Must be the return value of - * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). - * * **PHP**: Must be prefixed with `"PHP (Notice|Parse error|Fatal - * error|Warning): "` and contain the result of - * [`(string)$exception`](https://php.net/manual/en/exception.tostring.php). - * * **Go**: Must be the return value of - * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). - * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $context - * Optional. A description of the context in which the error occurred. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ReportErrorsService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Time when the event occurred. - * If not provided, the time when the event was received by the - * Error Reporting system is used. If provided, the time must not - * exceed the [logs retention - * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in - * the past, or be more than 24 hours in the future. - * If an invalid time is provided, then an error is returned. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEventTime() - { - return $this->event_time; - } - - public function hasEventTime() - { - return isset($this->event_time); - } - - public function clearEventTime() - { - unset($this->event_time); - } - - /** - * Optional. Time when the event occurred. - * If not provided, the time when the event was received by the - * Error Reporting system is used. If provided, the time must not - * exceed the [logs retention - * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in - * the past, or be more than 24 hours in the future. - * If an invalid time is provided, then an error is returned. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->event_time = $var; - - return $this; - } - - /** - * Required. The service context in which this error has occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ServiceContext|null - */ - public function getServiceContext() - { - return $this->service_context; - } - - public function hasServiceContext() - { - return isset($this->service_context); - } - - public function clearServiceContext() - { - unset($this->service_context); - } - - /** - * Required. The service context in which this error has occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ServiceContext service_context = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ErrorReporting\V1beta1\ServiceContext $var - * @return $this - */ - public function setServiceContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ServiceContext::class); - $this->service_context = $var; - - return $this; - } - - /** - * Required. The error message. - * If no `context.reportLocation` is provided, the message must contain a - * header (typically consisting of the exception type name and an error - * message) and an exception stack trace in one of the supported programming - * languages and formats. - * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. - * Supported stack trace formats are: - * * **Java**: Must be the return value of - * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). - * * **Python**: Must be the return value of - * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). - * * **JavaScript**: Must be the value of - * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned - * by V8. - * * **Ruby**: Must contain frames returned by - * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). - * * **C#**: Must be the return value of - * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). - * * **PHP**: Must be prefixed with `"PHP (Notice|Parse error|Fatal - * error|Warning): "` and contain the result of - * [`(string)$exception`](https://php.net/manual/en/exception.tostring.php). - * * **Go**: Must be the return value of - * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). - * - * Generated from protobuf field string message = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * Required. The error message. - * If no `context.reportLocation` is provided, the message must contain a - * header (typically consisting of the exception type name and an error - * message) and an exception stack trace in one of the supported programming - * languages and formats. - * Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. - * Supported stack trace formats are: - * * **Java**: Must be the return value of - * [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). - * * **Python**: Must be the return value of - * [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). - * * **JavaScript**: Must be the value of - * [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned - * by V8. - * * **Ruby**: Must contain frames returned by - * [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). - * * **C#**: Must be the return value of - * [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). - * * **PHP**: Must be prefixed with `"PHP (Notice|Parse error|Fatal - * error|Warning): "` and contain the result of - * [`(string)$exception`](https://php.net/manual/en/exception.tostring.php). - * * **Go**: Must be the return value of - * [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). - * - * Generated from protobuf field string message = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - - /** - * Optional. A description of the context in which the error occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorContext|null - */ - public function getContext() - { - return $this->context; - } - - public function hasContext() - { - return isset($this->context); - } - - public function clearContext() - { - unset($this->context); - } - - /** - * Optional. A description of the context in which the error occurred. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorContext context = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorContext $var - * @return $this - */ - public function setContext($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorContext::class); - $this->context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php deleted file mode 100644 index a50feb043ec5..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ResolutionStatus.php +++ /dev/null @@ -1,78 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ResolutionStatus - */ -class ResolutionStatus -{ - /** - * Status is unknown. When left unspecified in requests, it is treated like - * OPEN. - * - * Generated from protobuf enum RESOLUTION_STATUS_UNSPECIFIED = 0; - */ - const RESOLUTION_STATUS_UNSPECIFIED = 0; - /** - * The error group is not being addressed. This is the default for - * new groups. It is also used for errors re-occurring after marked RESOLVED. - * - * Generated from protobuf enum OPEN = 1; - */ - const OPEN = 1; - /** - * Error Group manually acknowledged, it can have an issue link attached. - * - * Generated from protobuf enum ACKNOWLEDGED = 2; - */ - const ACKNOWLEDGED = 2; - /** - * Error Group manually resolved, more events for this group are not expected - * to occur. - * - * Generated from protobuf enum RESOLVED = 3; - */ - const RESOLVED = 3; - /** - * The error group is muted and excluded by default on group stats requests. - * - * Generated from protobuf enum MUTED = 4; - */ - const MUTED = 4; - - private static $valueToName = [ - self::RESOLUTION_STATUS_UNSPECIFIED => 'RESOLUTION_STATUS_UNSPECIFIED', - self::OPEN => 'OPEN', - self::ACKNOWLEDGED => 'ACKNOWLEDGED', - self::RESOLVED => 'RESOLVED', - self::MUTED => 'MUTED', - ]; - - 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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php deleted file mode 100644 index 5085fd5df2d8..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContext.php +++ /dev/null @@ -1,180 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ServiceContext - */ -class ServiceContext extends \Google\Protobuf\Internal\Message -{ - /** - * An identifier of the service, such as the name of the - * executable, job, or Google App Engine service name. This field is expected - * to have a low number of values that are relatively stable over time, as - * opposed to `version`, which can be changed whenever new code is deployed. - * Contains the service name for error reports extracted from Google - * App Engine logs or `default` if the App Engine default service is used. - * - * Generated from protobuf field string service = 2; - */ - protected $service = ''; - /** - * Represents the source code version that the developer provided, - * which could represent a version label or a Git SHA-1 hash, for example. - * For App Engine standard environment, the version is set to the version of - * the app. - * - * Generated from protobuf field string version = 3; - */ - protected $version = ''; - /** - * Type of the MonitoredResource. List of possible values: - * https://cloud.google.com/monitoring/api/resources - * Value is set automatically for incoming errors and must not be set when - * reporting errors. - * - * Generated from protobuf field string resource_type = 4; - */ - protected $resource_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service - * An identifier of the service, such as the name of the - * executable, job, or Google App Engine service name. This field is expected - * to have a low number of values that are relatively stable over time, as - * opposed to `version`, which can be changed whenever new code is deployed. - * Contains the service name for error reports extracted from Google - * App Engine logs or `default` if the App Engine default service is used. - * @type string $version - * Represents the source code version that the developer provided, - * which could represent a version label or a Git SHA-1 hash, for example. - * For App Engine standard environment, the version is set to the version of - * the app. - * @type string $resource_type - * Type of the MonitoredResource. List of possible values: - * https://cloud.google.com/monitoring/api/resources - * Value is set automatically for incoming errors and must not be set when - * reporting errors. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * An identifier of the service, such as the name of the - * executable, job, or Google App Engine service name. This field is expected - * to have a low number of values that are relatively stable over time, as - * opposed to `version`, which can be changed whenever new code is deployed. - * Contains the service name for error reports extracted from Google - * App Engine logs or `default` if the App Engine default service is used. - * - * Generated from protobuf field string service = 2; - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * An identifier of the service, such as the name of the - * executable, job, or Google App Engine service name. This field is expected - * to have a low number of values that are relatively stable over time, as - * opposed to `version`, which can be changed whenever new code is deployed. - * Contains the service name for error reports extracted from Google - * App Engine logs or `default` if the App Engine default service is used. - * - * Generated from protobuf field string service = 2; - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - - /** - * Represents the source code version that the developer provided, - * which could represent a version label or a Git SHA-1 hash, for example. - * For App Engine standard environment, the version is set to the version of - * the app. - * - * Generated from protobuf field string version = 3; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Represents the source code version that the developer provided, - * which could represent a version label or a Git SHA-1 hash, for example. - * For App Engine standard environment, the version is set to the version of - * the app. - * - * Generated from protobuf field string version = 3; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Type of the MonitoredResource. List of possible values: - * https://cloud.google.com/monitoring/api/resources - * Value is set automatically for incoming errors and must not be set when - * reporting errors. - * - * Generated from protobuf field string resource_type = 4; - * @return string - */ - public function getResourceType() - { - return $this->resource_type; - } - - /** - * Type of the MonitoredResource. List of possible values: - * https://cloud.google.com/monitoring/api/resources - * Value is set automatically for incoming errors and must not be set when - * reporting errors. - * - * Generated from protobuf field string resource_type = 4; - * @param string $var - * @return $this - */ - public function setResourceType($var) - { - GPBUtil::checkString($var, True); - $this->resource_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php deleted file mode 100644 index a364b5d8d7f7..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/ServiceContextFilter.php +++ /dev/null @@ -1,150 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter - */ -class ServiceContextFilter extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The exact value to match against - * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). - * - * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $service = ''; - /** - * Optional. The exact value to match against - * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $version = ''; - /** - * Optional. The exact value to match against - * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). - * - * Generated from protobuf field string resource_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $resource_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $service - * Optional. The exact value to match against - * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). - * @type string $version - * Optional. The exact value to match against - * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). - * @type string $resource_type - * Optional. The exact value to match against - * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The exact value to match against - * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). - * - * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getService() - { - return $this->service; - } - - /** - * Optional. The exact value to match against - * [`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). - * - * Generated from protobuf field string service = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setService($var) - { - GPBUtil::checkString($var, True); - $this->service = $var; - - return $this; - } - - /** - * Optional. The exact value to match against - * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVersion() - { - return $this->version; - } - - /** - * Optional. The exact value to match against - * [`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). - * - * Generated from protobuf field string version = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVersion($var) - { - GPBUtil::checkString($var, True); - $this->version = $var; - - return $this; - } - - /** - * Optional. The exact value to match against - * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). - * - * Generated from protobuf field string resource_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getResourceType() - { - return $this->resource_type; - } - - /** - * Optional. The exact value to match against - * [`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). - * - * Generated from protobuf field string resource_type = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setResourceType($var) - { - GPBUtil::checkString($var, True); - $this->resource_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php deleted file mode 100644 index b151d1f44176..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/SourceLocation.php +++ /dev/null @@ -1,150 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.SourceLocation - */ -class SourceLocation extends \Google\Protobuf\Internal\Message -{ - /** - * The source code filename, which can include a truncated relative - * path, or a full path from a production machine. - * - * Generated from protobuf field string file_path = 1; - */ - protected $file_path = ''; - /** - * 1-based. 0 indicates that the line number is unknown. - * - * Generated from protobuf field int32 line_number = 2; - */ - protected $line_number = 0; - /** - * Human-readable name of a function or method. - * The value can include optional context like the class or package name. - * For example, `my.package.MyClass.method` in case of Java. - * - * Generated from protobuf field string function_name = 4; - */ - protected $function_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $file_path - * The source code filename, which can include a truncated relative - * path, or a full path from a production machine. - * @type int $line_number - * 1-based. 0 indicates that the line number is unknown. - * @type string $function_name - * Human-readable name of a function or method. - * The value can include optional context like the class or package name. - * For example, `my.package.MyClass.method` in case of Java. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The source code filename, which can include a truncated relative - * path, or a full path from a production machine. - * - * Generated from protobuf field string file_path = 1; - * @return string - */ - public function getFilePath() - { - return $this->file_path; - } - - /** - * The source code filename, which can include a truncated relative - * path, or a full path from a production machine. - * - * Generated from protobuf field string file_path = 1; - * @param string $var - * @return $this - */ - public function setFilePath($var) - { - GPBUtil::checkString($var, True); - $this->file_path = $var; - - return $this; - } - - /** - * 1-based. 0 indicates that the line number is unknown. - * - * Generated from protobuf field int32 line_number = 2; - * @return int - */ - public function getLineNumber() - { - return $this->line_number; - } - - /** - * 1-based. 0 indicates that the line number is unknown. - * - * Generated from protobuf field int32 line_number = 2; - * @param int $var - * @return $this - */ - public function setLineNumber($var) - { - GPBUtil::checkInt32($var); - $this->line_number = $var; - - return $this; - } - - /** - * Human-readable name of a function or method. - * The value can include optional context like the class or package name. - * For example, `my.package.MyClass.method` in case of Java. - * - * Generated from protobuf field string function_name = 4; - * @return string - */ - public function getFunctionName() - { - return $this->function_name; - } - - /** - * Human-readable name of a function or method. - * The value can include optional context like the class or package name. - * For example, `my.package.MyClass.method` in case of Java. - * - * Generated from protobuf field string function_name = 4; - * @param string $var - * @return $this - */ - public function setFunctionName($var) - { - GPBUtil::checkString($var, True); - $this->function_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php deleted file mode 100644 index a305f0f53dbf..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCount.php +++ /dev/null @@ -1,157 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.TimedCount - */ -class TimedCount extends \Google\Protobuf\Internal\Message -{ - /** - * Approximate number of occurrences in the given time period. - * - * Generated from protobuf field int64 count = 1; - */ - protected $count = 0; - /** - * Start of the time period to which `count` refers (included). - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - */ - protected $start_time = null; - /** - * End of the time period to which `count` refers (excluded). - * - * 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|string $count - * Approximate number of occurrences in the given time period. - * @type \Google\Protobuf\Timestamp $start_time - * Start of the time period to which `count` refers (included). - * @type \Google\Protobuf\Timestamp $end_time - * End of the time period to which `count` refers (excluded). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorStatsService::initOnce(); - parent::__construct($data); - } - - /** - * Approximate number of occurrences in the given time period. - * - * Generated from protobuf field int64 count = 1; - * @return int|string - */ - public function getCount() - { - return $this->count; - } - - /** - * Approximate number of occurrences in the given time period. - * - * Generated from protobuf field int64 count = 1; - * @param int|string $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt64($var); - $this->count = $var; - - return $this; - } - - /** - * Start of the time period to which `count` refers (included). - * - * 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); - } - - /** - * Start of the time period to which `count` refers (included). - * - * 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; - } - - /** - * End of the time period to which `count` refers (excluded). - * - * 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); - } - - /** - * End of the time period to which `count` refers (excluded). - * - * 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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php deleted file mode 100644 index 697ac5cb0e0f..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TimedCountAlignment.php +++ /dev/null @@ -1,74 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment - */ -class TimedCountAlignment -{ - /** - * No alignment specified. - * - * Generated from protobuf enum ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0; - */ - const ERROR_COUNT_ALIGNMENT_UNSPECIFIED = 0; - /** - * The time periods shall be consecutive, have width equal to the - * requested duration, and be aligned at the - * [alignment_time] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.alignment_time] - * provided in the request. - * The [alignment_time] - * [google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.alignment_time] - * does not have to be inside the query period but even if it is outside, only - * time periods are returned which overlap with the query period. - * A rounded alignment will typically result in a different size of the first - * or the last time period. - * - * Generated from protobuf enum ALIGNMENT_EQUAL_ROUNDED = 1; - */ - const ALIGNMENT_EQUAL_ROUNDED = 1; - /** - * The time periods shall be consecutive, have width equal to the - * requested duration, and be aligned at the end of the requested time - * period. This can result in a different size of the - * first time period. - * - * Generated from protobuf enum ALIGNMENT_EQUAL_AT_END = 2; - */ - const ALIGNMENT_EQUAL_AT_END = 2; - - private static $valueToName = [ - self::ERROR_COUNT_ALIGNMENT_UNSPECIFIED => 'ERROR_COUNT_ALIGNMENT_UNSPECIFIED', - self::ALIGNMENT_EQUAL_ROUNDED => 'ALIGNMENT_EQUAL_ROUNDED', - self::ALIGNMENT_EQUAL_AT_END => 'ALIGNMENT_EQUAL_AT_END', - ]; - - 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/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php deleted file mode 100644 index d98de124d2ff..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/TrackingIssue.php +++ /dev/null @@ -1,71 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.TrackingIssue - */ -class TrackingIssue extends \Google\Protobuf\Internal\Message -{ - /** - * A URL pointing to a related entry in an issue tracking system. - * Example: `https://github.com/user/project/issues/4` - * - * Generated from protobuf field string url = 1; - */ - protected $url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * A URL pointing to a related entry in an issue tracking system. - * Example: `https://github.com/user/project/issues/4` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\Common::initOnce(); - parent::__construct($data); - } - - /** - * A URL pointing to a related entry in an issue tracking system. - * Example: `https://github.com/user/project/issues/4` - * - * Generated from protobuf field string url = 1; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * A URL pointing to a related entry in an issue tracking system. - * Example: `https://github.com/user/project/issues/4` - * - * Generated from protobuf field string url = 1; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php b/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php deleted file mode 100644 index be77fb479d98..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/proto/src/Google/Cloud/ErrorReporting/V1beta1/UpdateGroupRequest.php +++ /dev/null @@ -1,90 +0,0 @@ -google.devtools.clouderrorreporting.v1beta1.UpdateGroupRequest - */ -class UpdateGroupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The group which replaces the resource on the server. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $group = null; - - /** - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $group Required. The group which replaces the resource on the server. - * - * @return \Google\Cloud\ErrorReporting\V1beta1\UpdateGroupRequest - * - * @experimental - */ - public static function build(\Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $group): self - { - return (new self()) - ->setGroup($group); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $group - * Required. The group which replaces the resource on the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Clouderrorreporting\V1Beta1\ErrorGroupService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The group which replaces the resource on the server. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup|null - */ - public function getGroup() - { - return $this->group; - } - - public function hasGroup() - { - return isset($this->group); - } - - public function clearGroup() - { - unset($this->group); - } - - /** - * Required. The group which replaces the resource on the server. - * - * Generated from protobuf field .google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup $var - * @return $this - */ - public function setGroup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\ErrorReporting\V1beta1\ErrorGroup::class); - $this->group = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/get_group.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/get_group.php deleted file mode 100644 index 2b9ce3baad93..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/get_group.php +++ /dev/null @@ -1,89 +0,0 @@ -setGroupName($formattedGroupName); - - // Call the API and handle any network failures. - try { - /** @var ErrorGroup $response */ - $response = $errorGroupServiceClient->getGroup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedGroupName = ErrorGroupServiceClient::errorGroupName('[PROJECT]', '[GROUP]'); - - get_group_sample($formattedGroupName); -} -// [END clouderrorreporting_v1beta1_generated_ErrorGroupService_GetGroup_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/update_group.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/update_group.php deleted file mode 100644 index 9cb7632b7485..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorGroupServiceClient/update_group.php +++ /dev/null @@ -1,60 +0,0 @@ -setGroup($group); - - // Call the API and handle any network failures. - try { - /** @var ErrorGroup $response */ - $response = $errorGroupServiceClient->updateGroup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END clouderrorreporting_v1beta1_generated_ErrorGroupService_UpdateGroup_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/delete_events.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/delete_events.php deleted file mode 100644 index 80e4b40346fc..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/delete_events.php +++ /dev/null @@ -1,82 +0,0 @@ -setProjectName($formattedProjectName); - - // Call the API and handle any network failures. - try { - /** @var DeleteEventsResponse $response */ - $response = $errorStatsServiceClient->deleteEvents($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedProjectName = ErrorStatsServiceClient::projectName('[PROJECT]'); - - delete_events_sample($formattedProjectName); -} -// [END clouderrorreporting_v1beta1_generated_ErrorStatsService_DeleteEvents_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_events.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_events.php deleted file mode 100644 index d212826032d8..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_events.php +++ /dev/null @@ -1,95 +0,0 @@ -setProjectName($formattedProjectName) - ->setGroupId($groupId); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $errorStatsServiceClient->listEvents($request); - - /** @var ErrorEvent $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 -{ - $formattedProjectName = ErrorStatsServiceClient::projectName('[PROJECT]'); - $groupId = '[GROUP_ID]'; - - list_events_sample($formattedProjectName, $groupId); -} -// [END clouderrorreporting_v1beta1_generated_ErrorStatsService_ListEvents_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_group_stats.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_group_stats.php deleted file mode 100644 index 26b6ca6d8ee9..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ErrorStatsServiceClient/list_group_stats.php +++ /dev/null @@ -1,91 +0,0 @@ -setProjectName($formattedProjectName); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $errorStatsServiceClient->listGroupStats($request); - - /** @var ErrorGroupStats $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 -{ - $formattedProjectName = ErrorStatsServiceClient::projectName('[PROJECT]'); - - list_group_stats_sample($formattedProjectName); -} -// [END clouderrorreporting_v1beta1_generated_ErrorStatsService_ListGroupStats_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ReportErrorsServiceClient/report_error_event.php b/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ReportErrorsServiceClient/report_error_event.php deleted file mode 100644 index 81e5da2751ff..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/samples/V1beta1/ReportErrorsServiceClient/report_error_event.php +++ /dev/null @@ -1,127 +0,0 @@ -setServiceContext($eventServiceContext) - ->setMessage($eventMessage); - $request = (new ReportErrorEventRequest()) - ->setProjectName($formattedProjectName) - ->setEvent($event); - - // Call the API and handle any network failures. - try { - /** @var ReportErrorEventResponse $response */ - $response = $reportErrorsServiceClient->reportErrorEvent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedProjectName = ReportErrorsServiceClient::projectName('[PROJECT]'); - $eventMessage = '[MESSAGE]'; - - report_error_event_sample($formattedProjectName, $eventMessage); -} -// [END clouderrorreporting_v1beta1_generated_ReportErrorsService_ReportErrorEvent_sync] diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ErrorGroupServiceClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ErrorGroupServiceClient.php deleted file mode 100644 index 213cebe6d9be..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ErrorGroupServiceClient.php +++ /dev/null @@ -1,296 +0,0 @@ - getGroupAsync(GetGroupRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateGroupAsync(UpdateGroupRequest $request, array $optionalArgs = []) - */ -final class ErrorGroupServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'clouderrorreporting.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'clouderrorreporting.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/error_group_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/error_group_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/error_group_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/error_group_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a error_group - * resource. - * - * @param string $project - * @param string $group - * - * @return string The formatted error_group resource. - * - * @experimental - */ - public static function errorGroupName(string $project, string $group): string - { - return self::getPathTemplate('errorGroup')->render([ - 'project' => $project, - 'group' => $group, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - errorGroup: projects/{project}/groups/{group} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - * - * @experimental - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'clouderrorreporting.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\ErrorReporting\V1beta1\ErrorGroupServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new ErrorGroupServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Get the specified group. - * - * The async variant is {@see ErrorGroupServiceClient::getGroupAsync()} . - * - * @example samples/V1beta1/ErrorGroupServiceClient/get_group.php - * - * @param GetGroupRequest $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 ErrorGroup - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function getGroup(GetGroupRequest $request, array $callOptions = []): ErrorGroup - { - return $this->startApiCall('GetGroup', $request, $callOptions)->wait(); - } - - /** - * Replace the data for the specified group. - * Fails if the group does not exist. - * - * The async variant is {@see ErrorGroupServiceClient::updateGroupAsync()} . - * - * @example samples/V1beta1/ErrorGroupServiceClient/update_group.php - * - * @param UpdateGroupRequest $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 ErrorGroup - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function updateGroup(UpdateGroupRequest $request, array $callOptions = []): ErrorGroup - { - return $this->startApiCall('UpdateGroup', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ErrorStatsServiceClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ErrorStatsServiceClient.php deleted file mode 100644 index 76c0f051d4a6..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ErrorStatsServiceClient.php +++ /dev/null @@ -1,325 +0,0 @@ - deleteEventsAsync(DeleteEventsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listEventsAsync(ListEventsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listGroupStatsAsync(ListGroupStatsRequest $request, array $optionalArgs = []) - */ -final class ErrorStatsServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'clouderrorreporting.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'clouderrorreporting.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/error_stats_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/error_stats_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/error_stats_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/error_stats_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - * - * @experimental - */ - 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 - * - 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. - * - * @experimental - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'clouderrorreporting.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\ErrorReporting\V1beta1\ErrorStatsServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new ErrorStatsServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Deletes all error events of a given project. - * - * The async variant is {@see ErrorStatsServiceClient::deleteEventsAsync()} . - * - * @example samples/V1beta1/ErrorStatsServiceClient/delete_events.php - * - * @param DeleteEventsRequest $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 DeleteEventsResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function deleteEvents(DeleteEventsRequest $request, array $callOptions = []): DeleteEventsResponse - { - return $this->startApiCall('DeleteEvents', $request, $callOptions)->wait(); - } - - /** - * Lists the specified events. - * - * The async variant is {@see ErrorStatsServiceClient::listEventsAsync()} . - * - * @example samples/V1beta1/ErrorStatsServiceClient/list_events.php - * - * @param ListEventsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function listEvents(ListEventsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEvents', $request, $callOptions); - } - - /** - * Lists the specified groups. - * - * The async variant is {@see ErrorStatsServiceClient::listGroupStatsAsync()} . - * - * @example samples/V1beta1/ErrorStatsServiceClient/list_group_stats.php - * - * @param ListGroupStatsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function listGroupStats(ListGroupStatsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListGroupStats', $request, $callOptions); - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ReportErrorsServiceClient.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ReportErrorsServiceClient.php deleted file mode 100644 index fc5706e73e71..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/Client/ReportErrorsServiceClient.php +++ /dev/null @@ -1,282 +0,0 @@ - reportErrorEventAsync(ReportErrorEventRequest $request, array $optionalArgs = []) - */ -final class ReportErrorsServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'clouderrorreporting.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'clouderrorreporting.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/report_errors_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/report_errors_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/report_errors_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/report_errors_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - * - * @experimental - */ - 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 - * - 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. - * - * @experimental - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'clouderrorreporting.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\ErrorReporting\V1beta1\ReportErrorsServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new ReportErrorsServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - * - * @experimental - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Report an individual error event and record the event to a log. - * - * This endpoint accepts **either** an OAuth token, - * **or** an [API key](https://support.google.com/cloud/answer/6158862) - * for authentication. To use an API key, append it to the URL as the value of - * a `key` parameter. For example: - * - * `POST - * https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456` - * - * **Note:** [Error Reporting] (https://cloud.google.com/error-reporting) - * is a service built on Cloud Logging and can analyze log entries when all of - * the following are true: - * - * * Customer-managed encryption keys (CMEK) are disabled on the log bucket. - * * The log bucket satisfies one of the following: - * * The log bucket is stored in the same project where the logs - * originated. - * * The logs were routed to a project, and then that project stored those - * logs in a log bucket that it owns. - * - * The async variant is {@see ReportErrorsServiceClient::reportErrorEventAsync()} . - * - * @example samples/V1beta1/ReportErrorsServiceClient/report_error_event.php - * - * @param ReportErrorEventRequest $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 ReportErrorEventResponse - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function reportErrorEvent(ReportErrorEventRequest $request, array $callOptions = []): ReportErrorEventResponse - { - return $this->startApiCall('ReportErrorEvent', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/gapic_metadata.json b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/gapic_metadata.json deleted file mode 100644 index 8f2d0ccc76b5..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/gapic_metadata.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.devtools.clouderrorreporting.v1beta1", - "libraryPackage": "Google\\Cloud\\ErrorReporting\\V1beta1", - "services": { - "ErrorGroupService": { - "clients": { - "grpc": { - "libraryClient": "ErrorGroupServiceGapicClient", - "rpcs": { - "GetGroup": { - "methods": [ - "getGroup" - ] - }, - "UpdateGroup": { - "methods": [ - "updateGroup" - ] - } - } - } - } - }, - "ErrorStatsService": { - "clients": { - "grpc": { - "libraryClient": "ErrorStatsServiceGapicClient", - "rpcs": { - "DeleteEvents": { - "methods": [ - "deleteEvents" - ] - }, - "ListEvents": { - "methods": [ - "listEvents" - ] - }, - "ListGroupStats": { - "methods": [ - "listGroupStats" - ] - } - } - } - } - }, - "ReportErrorsService": { - "clients": { - "grpc": { - "libraryClient": "ReportErrorsServiceGapicClient", - "rpcs": { - "ReportErrorEvent": { - "methods": [ - "reportErrorEvent" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_client_config.json b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_client_config.json deleted file mode 100644 index 40af7ebab8d5..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_client_config.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "interfaces": { - "google.devtools.clouderrorreporting.v1beta1.ErrorGroupService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "GetGroup": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateGroup": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_descriptor_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_descriptor_config.php deleted file mode 100644 index b4513d5886b7..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_descriptor_config.php +++ /dev/null @@ -1,56 +0,0 @@ - [ - 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService' => [ - 'GetGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ErrorReporting\V1beta1\ErrorGroup', - 'headerParams' => [ - [ - 'keyName' => 'group_name', - 'fieldAccessors' => [ - 'getGroupName', - ], - ], - ], - ], - 'UpdateGroup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ErrorReporting\V1beta1\ErrorGroup', - 'headerParams' => [ - [ - 'keyName' => 'group.name', - 'fieldAccessors' => [ - 'getGroup', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'errorGroup' => 'projects/{project}/groups/{group}', - ], - ], - ], -]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php deleted file mode 100644 index 17314a869ed5..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_group_service_rest_client_config.php +++ /dev/null @@ -1,66 +0,0 @@ - [ - 'google.devtools.clouderrorreporting.v1beta1.ErrorGroupService' => [ - 'GetGroup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{group_name=projects/*/groups/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{group_name=projects/*/locations/*/groups/*}', - ], - ], - 'placeholders' => [ - 'group_name' => [ - 'getters' => [ - 'getGroupName', - ], - ], - ], - ], - 'UpdateGroup' => [ - 'method' => 'put', - 'uriTemplate' => '/v1beta1/{group.name=projects/*/groups/*}', - 'body' => 'group', - 'additionalBindings' => [ - [ - 'method' => 'put', - 'uriTemplate' => '/v1beta1/{group.name=projects/*/locations/*/groups/*}', - 'body' => 'group', - ], - ], - 'placeholders' => [ - 'group.name' => [ - 'getters' => [ - 'getGroup', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json deleted file mode 100644 index 0a7501188091..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_client_config.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "interfaces": { - "google.devtools.clouderrorreporting.v1beta1.ErrorStatsService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "DeleteEvents": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListEvents": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListGroupStats": { - "timeout_millis": 600000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php deleted file mode 100644 index 8d4f1e9b5e8a..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_descriptor_config.php +++ /dev/null @@ -1,83 +0,0 @@ - [ - 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService' => [ - 'DeleteEvents' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ErrorReporting\V1beta1\DeleteEventsResponse', - 'headerParams' => [ - [ - 'keyName' => 'project_name', - 'fieldAccessors' => [ - 'getProjectName', - ], - ], - ], - ], - 'ListEvents' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getErrorEvents', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\ErrorReporting\V1beta1\ListEventsResponse', - 'headerParams' => [ - [ - 'keyName' => 'project_name', - 'fieldAccessors' => [ - 'getProjectName', - ], - ], - ], - ], - 'ListGroupStats' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getErrorGroupStats', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\ErrorReporting\V1beta1\ListGroupStatsResponse', - 'headerParams' => [ - [ - 'keyName' => 'project_name', - 'fieldAccessors' => [ - 'getProjectName', - ], - ], - ], - ], - 'templateMap' => [ - 'project' => 'projects/{project}', - ], - ], - ], -]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php deleted file mode 100644 index bfb26de16ebf..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/error_stats_service_rest_client_config.php +++ /dev/null @@ -1,86 +0,0 @@ - [ - 'google.devtools.clouderrorreporting.v1beta1.ErrorStatsService' => [ - 'DeleteEvents' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v1beta1/{project_name=projects/*/locations/*}/events', - ], - ], - 'placeholders' => [ - 'project_name' => [ - 'getters' => [ - 'getProjectName', - ], - ], - ], - ], - 'ListEvents' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{project_name=projects/*/locations/*}/events', - 'queryParams' => [ - 'group_id', - ], - ], - ], - 'placeholders' => [ - 'project_name' => [ - 'getters' => [ - 'getProjectName', - ], - ], - ], - 'queryParams' => [ - 'group_id', - ], - ], - 'ListGroupStats' => [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{project_name=projects/*}/groupStats', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1beta1/{project_name=projects/*/locations/*}/groupStats', - ], - ], - 'placeholders' => [ - 'project_name' => [ - 'getters' => [ - 'getProjectName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json deleted file mode 100644 index 701d5afb9615..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_client_config.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "interfaces": { - "google.devtools.clouderrorreporting.v1beta1.ReportErrorsService": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 600000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "ReportErrorEvent": { - "timeout_millis": 600000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php deleted file mode 100644 index 098540c27121..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_descriptor_config.php +++ /dev/null @@ -1,43 +0,0 @@ - [ - 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService' => [ - 'ReportErrorEvent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\ErrorReporting\V1beta1\ReportErrorEventResponse', - 'headerParams' => [ - [ - 'keyName' => 'project_name', - 'fieldAccessors' => [ - 'getProjectName', - ], - ], - ], - ], - 'templateMap' => [ - 'project' => 'projects/{project}', - ], - ], - ], -]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php b/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php deleted file mode 100644 index 3ec9dbf2ce55..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/src/V1beta1/resources/report_errors_service_rest_client_config.php +++ /dev/null @@ -1,41 +0,0 @@ - [ - 'google.devtools.clouderrorreporting.v1beta1.ReportErrorsService' => [ - 'ReportErrorEvent' => [ - 'method' => 'post', - 'uriTemplate' => '/v1beta1/{project_name=projects/*}/events:report', - 'body' => 'event', - 'placeholders' => [ - 'project_name' => [ - 'getters' => [ - 'getProjectName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ErrorGroupServiceClientTest.php b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ErrorGroupServiceClientTest.php deleted file mode 100644 index f72789347302..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ErrorGroupServiceClientTest.php +++ /dev/null @@ -1,226 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ErrorGroupServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ErrorGroupServiceClient($options); - } - - /** @test */ - public function getGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $groupId = 'groupId506361563'; - $expectedResponse = new ErrorGroup(); - $expectedResponse->setName($name); - $expectedResponse->setGroupId($groupId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedGroupName = $gapicClient->errorGroupName('[PROJECT]', '[GROUP]'); - $request = (new GetGroupRequest()) - ->setGroupName($formattedGroupName); - $response = $gapicClient->getGroup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/GetGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getGroupName(); - $this->assertProtobufEquals($formattedGroupName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getGroupExceptionTest() - { - $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 - $formattedGroupName = $gapicClient->errorGroupName('[PROJECT]', '[GROUP]'); - $request = (new GetGroupRequest()) - ->setGroupName($formattedGroupName); - try { - $gapicClient->getGroup($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 updateGroupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $groupId = 'groupId506361563'; - $expectedResponse = new ErrorGroup(); - $expectedResponse->setName($name); - $expectedResponse->setGroupId($groupId); - $transport->addResponse($expectedResponse); - // Mock request - $group = new ErrorGroup(); - $request = (new UpdateGroupRequest()) - ->setGroup($group); - $response = $gapicClient->updateGroup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorGroupService/UpdateGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getGroup(); - $this->assertProtobufEquals($group, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateGroupExceptionTest() - { - $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 - $group = new ErrorGroup(); - $request = (new UpdateGroupRequest()) - ->setGroup($group); - try { - $gapicClient->updateGroup($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 getGroupAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $groupId = 'groupId506361563'; - $expectedResponse = new ErrorGroup(); - $expectedResponse->setName($name); - $expectedResponse->setGroupId($groupId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedGroupName = $gapicClient->errorGroupName('[PROJECT]', '[GROUP]'); - $request = (new GetGroupRequest()) - ->setGroupName($formattedGroupName); - $response = $gapicClient->getGroupAsync($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.devtools.clouderrorreporting.v1beta1.ErrorGroupService/GetGroup', $actualFuncCall); - $actualValue = $actualRequestObject->getGroupName(); - $this->assertProtobufEquals($formattedGroupName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ErrorStatsServiceClientTest.php b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ErrorStatsServiceClientTest.php deleted file mode 100644 index e0a4d816907b..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ErrorStatsServiceClientTest.php +++ /dev/null @@ -1,307 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ErrorStatsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ErrorStatsServiceClient($options); - } - - /** @test */ - public function deleteEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new DeleteEventsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedProjectName = $gapicClient->projectName('[PROJECT]'); - $request = (new DeleteEventsRequest()) - ->setProjectName($formattedProjectName); - $response = $gapicClient->deleteEvents($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/DeleteEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectName(); - $this->assertProtobufEquals($formattedProjectName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteEventsExceptionTest() - { - $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 - $formattedProjectName = $gapicClient->projectName('[PROJECT]'); - $request = (new DeleteEventsRequest()) - ->setProjectName($formattedProjectName); - try { - $gapicClient->deleteEvents($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 listEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $errorEventsElement = new ErrorEvent(); - $errorEvents = [ - $errorEventsElement, - ]; - $expectedResponse = new ListEventsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setErrorEvents($errorEvents); - $transport->addResponse($expectedResponse); - // Mock request - $formattedProjectName = $gapicClient->projectName('[PROJECT]'); - $groupId = 'groupId506361563'; - $request = (new ListEventsRequest()) - ->setProjectName($formattedProjectName) - ->setGroupId($groupId); - $response = $gapicClient->listEvents($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getErrorEvents()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectName(); - $this->assertProtobufEquals($formattedProjectName, $actualValue); - $actualValue = $actualRequestObject->getGroupId(); - $this->assertProtobufEquals($groupId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEventsExceptionTest() - { - $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 - $formattedProjectName = $gapicClient->projectName('[PROJECT]'); - $groupId = 'groupId506361563'; - $request = (new ListEventsRequest()) - ->setProjectName($formattedProjectName) - ->setGroupId($groupId); - try { - $gapicClient->listEvents($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 listGroupStatsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $errorGroupStatsElement = new ErrorGroupStats(); - $errorGroupStats = [ - $errorGroupStatsElement, - ]; - $expectedResponse = new ListGroupStatsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setErrorGroupStats($errorGroupStats); - $transport->addResponse($expectedResponse); - // Mock request - $formattedProjectName = $gapicClient->projectName('[PROJECT]'); - $request = (new ListGroupStatsRequest()) - ->setProjectName($formattedProjectName); - $response = $gapicClient->listGroupStats($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getErrorGroupStats()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ErrorStatsService/ListGroupStats', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectName(); - $this->assertProtobufEquals($formattedProjectName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listGroupStatsExceptionTest() - { - $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 - $formattedProjectName = $gapicClient->projectName('[PROJECT]'); - $request = (new ListGroupStatsRequest()) - ->setProjectName($formattedProjectName); - try { - $gapicClient->listGroupStats($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 deleteEventsAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new DeleteEventsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedProjectName = $gapicClient->projectName('[PROJECT]'); - $request = (new DeleteEventsRequest()) - ->setProjectName($formattedProjectName); - $response = $gapicClient->deleteEventsAsync($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.devtools.clouderrorreporting.v1beta1.ErrorStatsService/DeleteEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectName(); - $this->assertProtobufEquals($formattedProjectName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ReportErrorsServiceClientTest.php b/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ReportErrorsServiceClientTest.php deleted file mode 100644 index 66f19d75a551..000000000000 --- a/owl-bot-staging/ErrorReporting/v1beta1/tests/Unit/V1beta1/Client/ReportErrorsServiceClientTest.php +++ /dev/null @@ -1,175 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ReportErrorsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ReportErrorsServiceClient($options); - } - - /** @test */ - public function reportErrorEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ReportErrorEventResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedProjectName = $gapicClient->projectName('[PROJECT]'); - $event = new ReportedErrorEvent(); - $eventServiceContext = new ServiceContext(); - $event->setServiceContext($eventServiceContext); - $eventMessage = 'eventMessage1863181325'; - $event->setMessage($eventMessage); - $request = (new ReportErrorEventRequest()) - ->setProjectName($formattedProjectName) - ->setEvent($event); - $response = $gapicClient->reportErrorEvent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.clouderrorreporting.v1beta1.ReportErrorsService/ReportErrorEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectName(); - $this->assertProtobufEquals($formattedProjectName, $actualValue); - $actualValue = $actualRequestObject->getEvent(); - $this->assertProtobufEquals($event, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function reportErrorEventExceptionTest() - { - $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 - $formattedProjectName = $gapicClient->projectName('[PROJECT]'); - $event = new ReportedErrorEvent(); - $eventServiceContext = new ServiceContext(); - $event->setServiceContext($eventServiceContext); - $eventMessage = 'eventMessage1863181325'; - $event->setMessage($eventMessage); - $request = (new ReportErrorEventRequest()) - ->setProjectName($formattedProjectName) - ->setEvent($event); - try { - $gapicClient->reportErrorEvent($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 reportErrorEventAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ReportErrorEventResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedProjectName = $gapicClient->projectName('[PROJECT]'); - $event = new ReportedErrorEvent(); - $eventServiceContext = new ServiceContext(); - $event->setServiceContext($eventServiceContext); - $eventMessage = 'eventMessage1863181325'; - $event->setMessage($eventMessage); - $request = (new ReportErrorEventRequest()) - ->setProjectName($formattedProjectName) - ->setEvent($event); - $response = $gapicClient->reportErrorEventAsync($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.devtools.clouderrorreporting.v1beta1.ReportErrorsService/ReportErrorEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectName(); - $this->assertProtobufEquals($formattedProjectName, $actualValue); - $actualValue = $actualRequestObject->getEvent(); - $this->assertProtobufEquals($event, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Backup.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Backup.php deleted file mode 100644 index 7863bdb50960..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Backup.php +++ /dev/null @@ -1,27 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC7\x07\x0A&google/firestore/admin/v1/backup.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xE0\x04\x0A\x06Backup\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12;\x0A\x08database\x18\x02 \x01(\x09B)\xE0A\x03\xFAA#\x0A!firestore.googleapis.com/Database\x12\x19\x0A\x0Cdatabase_uid\x18\x07 \x01(\x09B\x03\xE0A\x03\x126\x0A\x0Dsnapshot_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bexpire_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12;\x0A\x05stats\x18\x06 \x01(\x0B2'.google.firestore.admin.v1.Backup.StatsB\x03\xE0A\x03\x12;\x0A\x05state\x18\x08 \x01(\x0E2'.google.firestore.admin.v1.Backup.StateB\x03\xE0A\x03\x1AW\x0A\x05Stats\x12\x17\x0A\x0Asize_bytes\x18\x01 \x01(\x03B\x03\xE0A\x03\x12\x1B\x0A\x0Edocument_count\x18\x02 \x01(\x03B\x03\xE0A\x03\x12\x18\x0A\x0Bindex_count\x18\x03 \x01(\x03B\x03\xE0A\x03\"J\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x09\x0A\x05READY\x10\x02\x12\x11\x0A\x0DNOT_AVAILABLE\x10\x03:^\xEAA[\x0A\x1Ffirestore.googleapis.com/Backup\x128projects/{project}/locations/{location}/backups/{backup}B\xDA\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0BBackupProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php deleted file mode 100644 index 7e56dd37b714..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Database.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xCF\x1D\x0A(google/firestore/admin/v1/database.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A0google/firestore/admin/v1/realtime_updates.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xAB\x19\x0A\x08Database\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x10\x0A\x03uid\x18\x03 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bdelete_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x0Blocation_id\x18\x09 \x01(\x09\x12>\x0A\x04type\x18\x0A \x01(\x0E20.google.firestore.admin.v1.Database.DatabaseType\x12M\x0A\x10concurrency_mode\x18\x0F \x01(\x0E23.google.firestore.admin.v1.Database.ConcurrencyMode\x12@\x0A\x18version_retention_period\x18\x11 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x03\x12>\x0A\x15earliest_version_time\x18\x12 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12l\x0A!point_in_time_recovery_enablement\x18\x15 \x01(\x0E2A.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement\x12a\x0A\x1Bapp_engine_integration_mode\x18\x13 \x01(\x0E2<.google.firestore.admin.v1.Database.AppEngineIntegrationMode\x12\x17\x0A\x0Akey_prefix\x18\x14 \x01(\x09B\x03\xE0A\x03\x12Z\x0A\x17delete_protection_state\x18\x16 \x01(\x0E29.google.firestore.admin.v1.Database.DeleteProtectionState\x12H\x0A\x0Bcmek_config\x18\x17 \x01(\x0B2..google.firestore.admin.v1.Database.CmekConfigB\x03\xE0A\x01\x12\x18\x0A\x0Bprevious_id\x18\x19 \x01(\x09B\x03\xE0A\x03\x12H\x0A\x0Bsource_info\x18\x1A \x01(\x0B2..google.firestore.admin.v1.Database.SourceInfoB\x03\xE0A\x03\x12F\x0A\x04tags\x18\x1D \x03(\x0B2-.google.firestore.admin.v1.Database.TagsEntryB\x09\xE0A\x04\xE0A\x05\xE0A\x01\x12\x1B\x0A\x09free_tier\x18\x1E \x01(\x08B\x03\xE0A\x03H\x00\x88\x01\x01\x12\x0C\x0A\x04etag\x18c \x01(\x09\x12R\x0A\x10database_edition\x18\x1C \x01(\x0E23.google.firestore.admin.v1.Database.DatabaseEditionB\x03\xE0A\x05\x12R\x0A\x15realtime_updates_mode\x18\x1F \x01(\x0E2..google.firestore.admin.v1.RealtimeUpdatesModeB\x03\xE0A\x05\x12[\x0A\x1Afirestore_data_access_mode\x18! \x01(\x0E22.google.firestore.admin.v1.Database.DataAccessModeB\x03\xE0A\x01\x12d\x0A#mongodb_compatible_data_access_mode\x18\" \x01(\x0E22.google.firestore.admin.v1.Database.DataAccessModeB\x03\xE0A\x01\x1AH\x0A\x0ACmekConfig\x12\x19\x0A\x0Ckms_key_name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1F\x0A\x12active_key_version\x18\x02 \x03(\x09B\x03\xE0A\x03\x1A\xE7\x01\x0A\x0ASourceInfo\x12M\x0A\x06backup\x18\x01 \x01(\x0B2;.google.firestore.admin.v1.Database.SourceInfo.BackupSourceH\x00\x12:\x0A\x09operation\x18\x03 \x01(\x09B'\xFAA\$\x0A\"firestore.googleapis.com/Operation\x1AD\x0A\x0CBackupSource\x124\x0A\x06backup\x18\x01 \x01(\x09B\$\xFAA!\x0A\x1Ffirestore.googleapis.com/BackupB\x08\x0A\x06source\x1A\x88\x04\x0A\x10EncryptionConfig\x12x\x0A\x19google_default_encryption\x18\x01 \x01(\x0B2S.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptionsH\x00\x12m\x0A\x15use_source_encryption\x18\x02 \x01(\x0B2L.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptionsH\x00\x12|\x0A\x1Bcustomer_managed_encryption\x18\x03 \x01(\x0B2U.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptionsH\x00\x1A \x0A\x1EGoogleDefaultEncryptionOptions\x1A\x19\x0A\x17SourceEncryptionOptions\x1A=\x0A CustomerManagedEncryptionOptions\x12\x19\x0A\x0Ckms_key_name\x18\x01 \x01(\x09B\x03\xE0A\x02B\x11\x0A\x0Fencryption_type\x1A+\x0A\x09TagsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"W\x0A\x0CDatabaseType\x12\x1D\x0A\x19DATABASE_TYPE_UNSPECIFIED\x10\x00\x12\x14\x0A\x10FIRESTORE_NATIVE\x10\x01\x12\x12\x0A\x0EDATASTORE_MODE\x10\x02\"w\x0A\x0FConcurrencyMode\x12 \x0A\x1CCONCURRENCY_MODE_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0AOPTIMISTIC\x10\x01\x12\x0F\x0A\x0BPESSIMISTIC\x10\x02\x12!\x0A\x1DOPTIMISTIC_WITH_ENTITY_GROUPS\x10\x03\"\x9B\x01\x0A\x1DPointInTimeRecoveryEnablement\x121\x0A-POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED\x10\x00\x12\"\x0A\x1EPOINT_IN_TIME_RECOVERY_ENABLED\x10\x01\x12#\x0A\x1FPOINT_IN_TIME_RECOVERY_DISABLED\x10\x02\"b\x0A\x18AppEngineIntegrationMode\x12+\x0A'APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07ENABLED\x10\x01\x12\x0C\x0A\x08DISABLED\x10\x02\"\x7F\x0A\x15DeleteProtectionState\x12'\x0A#DELETE_PROTECTION_STATE_UNSPECIFIED\x10\x00\x12\x1E\x0A\x1ADELETE_PROTECTION_DISABLED\x10\x01\x12\x1D\x0A\x19DELETE_PROTECTION_ENABLED\x10\x02\"Q\x0A\x0FDatabaseEdition\x12 \x0A\x1CDATABASE_EDITION_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08STANDARD\x10\x01\x12\x0E\x0A\x0AENTERPRISE\x10\x02\"o\x0A\x0EDataAccessMode\x12 \x0A\x1CDATA_ACCESS_MODE_UNSPECIFIED\x10\x00\x12\x1C\x0A\x18DATA_ACCESS_MODE_ENABLED\x10\x01\x12\x1D\x0A\x19DATA_ACCESS_MODE_DISABLED\x10\x02:R\xEAAO\x0A!firestore.googleapis.com/Database\x12'projects/{project}/databases/{database}R\x01\x01B\x0C\x0A\x0A_free_tierB\xC3\x02\x0A\x1Dcom.google.firestore.admin.v1B\x0DDatabaseProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1\xEAAd\x0A\"firestore.googleapis.com/Operation\x12>projects/{project}/databases/{database}/operations/{operation}b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php deleted file mode 100644 index bdfc8da72b88..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Field.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x8B\x08\x0A%google/firestore/admin/v1/field.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A%google/firestore/admin/v1/index.proto\x1A\x1Egoogle/protobuf/duration.proto\"\x80\x05\x0A\x05Field\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12B\x0A\x0Cindex_config\x18\x02 \x01(\x0B2,.google.firestore.admin.v1.Field.IndexConfig\x12>\x0A\x0Attl_config\x18\x03 \x01(\x0B2*.google.firestore.admin.v1.Field.TtlConfig\x1A\x89\x01\x0A\x0BIndexConfig\x121\x0A\x07indexes\x18\x01 \x03(\x0B2 .google.firestore.admin.v1.Index\x12\x1C\x0A\x14uses_ancestor_config\x18\x02 \x01(\x08\x12\x16\x0A\x0Eancestor_field\x18\x03 \x01(\x09\x12\x11\x0A\x09reverting\x18\x04 \x01(\x08\x1A\xD8\x01\x0A\x09TtlConfig\x12D\x0A\x05state\x18\x01 \x01(\x0E20.google.firestore.admin.v1.Field.TtlConfig.StateB\x03\xE0A\x03\x129\x0A\x11expiration_offset\x18\x03 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01\"J\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x10\x0A\x0CNEEDS_REPAIR\x10\x03:y\xEAAv\x0A\x1Efirestore.googleapis.com/Field\x12Tprojects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}B\xD9\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0AFieldProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php deleted file mode 100644 index 4958902fc482..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/FirestoreAdmin.php +++ /dev/null @@ -1,41 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xB3`\x0A/google/firestore/admin/v1/firestore_admin.proto\x12\x19google.firestore.admin.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\x18google/api/routing.proto\x1A&google/firestore/admin/v1/backup.proto\x1A(google/firestore/admin/v1/database.proto\x1A%google/firestore/admin/v1/field.proto\x1A%google/firestore/admin/v1/index.proto\x1A)google/firestore/admin/v1/operation.proto\x1A(google/firestore/admin/v1/schedule.proto\x1A(google/firestore/admin/v1/snapshot.proto\x1A*google/firestore/admin/v1/user_creds.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"g\x0A\x14ListDatabasesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!firestore.googleapis.com/Database\x12\x14\x0A\x0Cshow_deleted\x18\x04 \x01(\x08\"\xA8\x01\x0A\x15CreateDatabaseRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!firestore.googleapis.com/Database\x12:\x0A\x08database\x18\x02 \x01(\x0B2#.google.firestore.admin.v1.DatabaseB\x03\xE0A\x02\x12\x18\x0A\x0Bdatabase_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\x18\x0A\x16CreateDatabaseMetadata\"d\x0A\x15ListDatabasesResponse\x126\x0A\x09databases\x18\x01 \x03(\x0B2#.google.firestore.admin.v1.Database\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"M\x0A\x12GetDatabaseRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\"\x84\x01\x0A\x15UpdateDatabaseRequest\x12:\x0A\x08database\x18\x01 \x01(\x0B2#.google.firestore.admin.v1.DatabaseB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"\x18\x0A\x16UpdateDatabaseMetadata\"^\x0A\x15DeleteDatabaseRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x0C\x0A\x04etag\x18\x03 \x01(\x09\"\x18\x0A\x16DeleteDatabaseMetadata\"\xAF\x01\x0A\x16CreateUserCredsRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"firestore.googleapis.com/UserCreds\x12=\x0A\x0Auser_creds\x18\x02 \x01(\x0B2\$.google.firestore.admin.v1.UserCredsB\x03\xE0A\x02\x12\x1A\x0A\x0Duser_creds_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"O\x0A\x13GetUserCredsRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"R\x0A\x14ListUserCredsRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"firestore.googleapis.com/UserCreds\"Q\x0A\x15ListUserCredsResponse\x128\x0A\x0Auser_creds\x18\x01 \x03(\x0B2\$.google.firestore.admin.v1.UserCreds\"R\x0A\x16EnableUserCredsRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"S\x0A\x17DisableUserCredsRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"T\x0A\x18ResetUserPasswordRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"R\x0A\x16DeleteUserCredsRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"firestore.googleapis.com/UserCreds\"\xA1\x01\x0A\x1BCreateBackupScheduleRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12G\x0A\x0Fbackup_schedule\x18\x02 \x01(\x0B2).google.firestore.admin.v1.BackupScheduleB\x03\xE0A\x02\"Y\x0A\x18GetBackupScheduleRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'firestore.googleapis.com/BackupSchedule\"\x97\x01\x0A\x1BUpdateBackupScheduleRequest\x12G\x0A\x0Fbackup_schedule\x18\x01 \x01(\x0B2).google.firestore.admin.v1.BackupScheduleB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"W\x0A\x1AListBackupSchedulesRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\"b\x0A\x1BListBackupSchedulesResponse\x12C\x0A\x10backup_schedules\x18\x01 \x03(\x0B2).google.firestore.admin.v1.BackupSchedule\"\\\x0A\x1BDeleteBackupScheduleRequest\x12=\x0A\x04name\x18\x01 \x01(\x09B/\xE0A\x02\xFAA)\x0A'firestore.googleapis.com/BackupSchedule\"\x8C\x01\x0A\x12CreateIndexRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(firestore.googleapis.com/CollectionGroup\x124\x0A\x05index\x18\x02 \x01(\x0B2 .google.firestore.admin.v1.IndexB\x03\xE0A\x02\"\x8D\x01\x0A\x12ListIndexesRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(firestore.googleapis.com/CollectionGroup\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x03 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\"a\x0A\x13ListIndexesResponse\x121\x0A\x07indexes\x18\x01 \x03(\x0B2 .google.firestore.admin.v1.Index\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"G\x0A\x0FGetIndexRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Efirestore.googleapis.com/Index\"J\x0A\x12DeleteIndexRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Efirestore.googleapis.com/Index\"{\x0A\x12UpdateFieldRequest\x124\x0A\x05field\x18\x01 \x01(\x0B2 .google.firestore.admin.v1.FieldB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"G\x0A\x0FGetFieldRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Efirestore.googleapis.com/Field\"\x8C\x01\x0A\x11ListFieldsRequest\x12@\x0A\x06parent\x18\x01 \x01(\x09B0\xE0A\x02\xFAA*\x0A(firestore.googleapis.com/CollectionGroup\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x03 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\"_\x0A\x12ListFieldsResponse\x120\x0A\x06fields\x18\x01 \x03(\x0B2 .google.firestore.admin.v1.Field\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xCE\x01\x0A\x16ExportDocumentsRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x16\x0A\x0Ecollection_ids\x18\x02 \x03(\x09\x12\x19\x0A\x11output_uri_prefix\x18\x03 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x04 \x03(\x09\x121\x0A\x0Dsnapshot_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x9A\x01\x0A\x16ImportDocumentsRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x16\x0A\x0Ecollection_ids\x18\x02 \x03(\x09\x12\x18\x0A\x10input_uri_prefix\x18\x03 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x04 \x03(\x09\"\x8E\x01\x0A\x1ABulkDeleteDocumentsRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x1B\x0A\x0Ecollection_ids\x18\x02 \x03(\x09B\x03\xE0A\x01\x12\x1A\x0A\x0Dnamespace_ids\x18\x03 \x03(\x09B\x03\xE0A\x01\"\x1D\x0A\x1BBulkDeleteDocumentsResponse\"I\x0A\x10GetBackupRequest\x125\x0A\x04name\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Ffirestore.googleapis.com/Backup\"_\x0A\x12ListBackupsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Location\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\"^\x0A\x13ListBackupsResponse\x122\x0A\x07backups\x18\x01 \x03(\x0B2!.google.firestore.admin.v1.Backup\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"L\x0A\x13DeleteBackupRequest\x125\x0A\x04name\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Ffirestore.googleapis.com/Backup\"\xFC\x02\x0A\x16RestoreDatabaseRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!firestore.googleapis.com/Database\x12\x18\x0A\x0Bdatabase_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x127\x0A\x06backup\x18\x03 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Ffirestore.googleapis.com/Backup\x12T\x0A\x11encryption_config\x18\x09 \x01(\x0B24.google.firestore.admin.v1.Database.EncryptionConfigB\x03\xE0A\x01\x12Q\x0A\x04tags\x18\x0A \x03(\x0B2;.google.firestore.admin.v1.RestoreDatabaseRequest.TagsEntryB\x06\xE0A\x05\xE0A\x01\x1A+\x0A\x09TagsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x84\x03\x0A\x14CloneDatabaseRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!firestore.googleapis.com/Database\x12\x18\x0A\x0Bdatabase_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12C\x0A\x0Dpitr_snapshot\x18\x06 \x01(\x0B2'.google.firestore.admin.v1.PitrSnapshotB\x03\xE0A\x02\x12T\x0A\x11encryption_config\x18\x04 \x01(\x0B24.google.firestore.admin.v1.Database.EncryptionConfigB\x03\xE0A\x01\x12O\x0A\x04tags\x18\x05 \x03(\x0B29.google.firestore.admin.v1.CloneDatabaseRequest.TagsEntryB\x06\xE0A\x05\xE0A\x01\x1A+\x0A\x09TagsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x012\xFB1\x0A\x0EFirestoreAdmin\x12\xDB\x01\x0A\x0BCreateIndex\x12-.google.firestore.admin.v1.CreateIndexRequest\x1A\x1D.google.longrunning.Operation\"~\xCAA\x1F\x0A\x05Index\x12\x16IndexOperationMetadata\xDAA\x0Cparent,index\x82\xD3\xE4\x93\x02G\">/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes:\x05index\x12\xBD\x01\x0A\x0BListIndexes\x12-.google.firestore.admin.v1.ListIndexesRequest\x1A..google.firestore.admin.v1.ListIndexesResponse\"O\xDAA\x06parent\x82\xD3\xE4\x93\x02@\x12>/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes\x12\xA7\x01\x0A\x08GetIndex\x12*.google.firestore.admin.v1.GetIndexRequest\x1A .google.firestore.admin.v1.Index\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@\x12>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xA3\x01\x0A\x0BDeleteIndex\x12-.google.firestore.admin.v1.DeleteIndexRequest\x1A\x16.google.protobuf.Empty\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@*>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xA6\x01\x0A\x08GetField\x12*.google.firestore.admin.v1.GetFieldRequest\x1A .google.firestore.admin.v1.Field\"L\xDAA\x04name\x82\xD3\xE4\x93\x02?\x12=/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}\x12\xD9\x01\x0A\x0BUpdateField\x12-.google.firestore.admin.v1.UpdateFieldRequest\x1A\x1D.google.longrunning.Operation\"|\xCAA\x1F\x0A\x05Field\x12\x16FieldOperationMetadata\xDAA\x05field\x82\xD3\xE4\x93\x02L2C/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}:\x05field\x12\xB9\x01\x0A\x0AListFields\x12,.google.firestore.admin.v1.ListFieldsRequest\x1A-.google.firestore.admin.v1.ListFieldsResponse\"N\xDAA\x06parent\x82\xD3\xE4\x93\x02?\x12=/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields\x12\xDD\x01\x0A\x0FExportDocuments\x121.google.firestore.admin.v1.ExportDocumentsRequest\x1A\x1D.google.longrunning.Operation\"x\xCAA2\x0A\x17ExportDocumentsResponse\x12\x17ExportDocumentsMetadata\xDAA\x04name\x82\xD3\xE4\x93\x026\"1/v1/{name=projects/*/databases/*}:exportDocuments:\x01*\x12\xDB\x01\x0A\x0FImportDocuments\x121.google.firestore.admin.v1.ImportDocumentsRequest\x1A\x1D.google.longrunning.Operation\"v\xCAA0\x0A\x15google.protobuf.Empty\x12\x17ImportDocumentsMetadata\xDAA\x04name\x82\xD3\xE4\x93\x026\"1/v1/{name=projects/*/databases/*}:importDocuments:\x01*\x12\xF2\x01\x0A\x13BulkDeleteDocuments\x125.google.firestore.admin.v1.BulkDeleteDocumentsRequest\x1A\x1D.google.longrunning.Operation\"\x84\x01\xCAA:\x0A\x1BBulkDeleteDocumentsResponse\x12\x1BBulkDeleteDocumentsMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02:\"5/v1/{name=projects/*/databases/*}:bulkDeleteDocuments:\x01*\x12\xD9\x01\x0A\x0ECreateDatabase\x120.google.firestore.admin.v1.CreateDatabaseRequest\x1A\x1D.google.longrunning.Operation\"v\xCAA\"\x0A\x08Database\x12\x16CreateDatabaseMetadata\xDAA\x1Bparent,database,database_id\x82\xD3\xE4\x93\x02-\"!/v1/{parent=projects/*}/databases:\x08database\x12\x93\x01\x0A\x0BGetDatabase\x12-.google.firestore.admin.v1.GetDatabaseRequest\x1A#.google.firestore.admin.v1.Database\"0\xDAA\x04name\x82\xD3\xE4\x93\x02#\x12!/v1/{name=projects/*/databases/*}\x12\xA6\x01\x0A\x0DListDatabases\x12/.google.firestore.admin.v1.ListDatabasesRequest\x1A0.google.firestore.admin.v1.ListDatabasesResponse\"2\xDAA\x06parent\x82\xD3\xE4\x93\x02#\x12!/v1/{parent=projects/*}/databases\x12\xDB\x01\x0A\x0EUpdateDatabase\x120.google.firestore.admin.v1.UpdateDatabaseRequest\x1A\x1D.google.longrunning.Operation\"x\xCAA\"\x0A\x08Database\x12\x16UpdateDatabaseMetadata\xDAA\x14database,update_mask\x82\xD3\xE4\x93\x0262*/v1/{database.name=projects/*/databases/*}:\x08database\x12\xB8\x01\x0A\x0EDeleteDatabase\x120.google.firestore.admin.v1.DeleteDatabaseRequest\x1A\x1D.google.longrunning.Operation\"U\xCAA\"\x0A\x08Database\x12\x16DeleteDatabaseMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02#*!/v1/{name=projects/*/databases/*}\x12\xCF\x01\x0A\x0FCreateUserCreds\x121.google.firestore.admin.v1.CreateUserCredsRequest\x1A\$.google.firestore.admin.v1.UserCreds\"c\xDAA\x1Fparent,user_creds,user_creds_id\x82\xD3\xE4\x93\x02;\"-/v1/{parent=projects/*/databases/*}/userCreds:\x0Auser_creds\x12\xA2\x01\x0A\x0CGetUserCreds\x12..google.firestore.admin.v1.GetUserCredsRequest\x1A\$.google.firestore.admin.v1.UserCreds\"<\xDAA\x04name\x82\xD3\xE4\x93\x02/\x12-/v1/{name=projects/*/databases/*/userCreds/*}\x12\xB2\x01\x0A\x0DListUserCreds\x12/.google.firestore.admin.v1.ListUserCredsRequest\x1A0.google.firestore.admin.v1.ListUserCredsResponse\">\xDAA\x06parent\x82\xD3\xE4\x93\x02/\x12-/v1/{parent=projects/*/databases/*}/userCreds\x12\xB2\x01\x0A\x0FEnableUserCreds\x121.google.firestore.admin.v1.EnableUserCredsRequest\x1A\$.google.firestore.admin.v1.UserCreds\"F\xDAA\x04name\x82\xD3\xE4\x93\x029\"4/v1/{name=projects/*/databases/*/userCreds/*}:enable:\x01*\x12\xB5\x01\x0A\x10DisableUserCreds\x122.google.firestore.admin.v1.DisableUserCredsRequest\x1A\$.google.firestore.admin.v1.UserCreds\"G\xDAA\x04name\x82\xD3\xE4\x93\x02:\"5/v1/{name=projects/*/databases/*/userCreds/*}:disable:\x01*\x12\xBD\x01\x0A\x11ResetUserPassword\x123.google.firestore.admin.v1.ResetUserPasswordRequest\x1A\$.google.firestore.admin.v1.UserCreds\"M\xDAA\x04name\x82\xD3\xE4\x93\x02@\";/v1/{name=projects/*/databases/*/userCreds/*}:resetPassword:\x01*\x12\x9A\x01\x0A\x0FDeleteUserCreds\x121.google.firestore.admin.v1.DeleteUserCredsRequest\x1A\x16.google.protobuf.Empty\"<\xDAA\x04name\x82\xD3\xE4\x93\x02/*-/v1/{name=projects/*/databases/*/userCreds/*}\x12\x97\x01\x0A\x09GetBackup\x12+.google.firestore.admin.v1.GetBackupRequest\x1A!.google.firestore.admin.v1.Backup\":\xDAA\x04name\x82\xD3\xE4\x93\x02-\x12+/v1/{name=projects/*/locations/*/backups/*}\x12\xAA\x01\x0A\x0BListBackups\x12-.google.firestore.admin.v1.ListBackupsRequest\x1A..google.firestore.admin.v1.ListBackupsResponse\"<\xDAA\x06parent\x82\xD3\xE4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/backups\x12\x92\x01\x0A\x0CDeleteBackup\x12..google.firestore.admin.v1.DeleteBackupRequest\x1A\x16.google.protobuf.Empty\":\xDAA\x04name\x82\xD3\xE4\x93\x02-*+/v1/{name=projects/*/locations/*/backups/*}\x12\xBF\x01\x0A\x0FRestoreDatabase\x121.google.firestore.admin.v1.RestoreDatabaseRequest\x1A\x1D.google.longrunning.Operation\"Z\xCAA#\x0A\x08Database\x12\x17RestoreDatabaseMetadata\x82\xD3\xE4\x93\x02.\")/v1/{parent=projects/*}/databases:restore:\x01*\x12\xE0\x01\x0A\x14CreateBackupSchedule\x126.google.firestore.admin.v1.CreateBackupScheduleRequest\x1A).google.firestore.admin.v1.BackupSchedule\"e\xDAA\x16parent,backup_schedule\x82\xD3\xE4\x93\x02F\"3/v1/{parent=projects/*/databases/*}/backupSchedules:\x0Fbackup_schedule\x12\xB7\x01\x0A\x11GetBackupSchedule\x123.google.firestore.admin.v1.GetBackupScheduleRequest\x1A).google.firestore.admin.v1.BackupSchedule\"B\xDAA\x04name\x82\xD3\xE4\x93\x025\x123/v1/{name=projects/*/databases/*/backupSchedules/*}\x12\xCA\x01\x0A\x13ListBackupSchedules\x125.google.firestore.admin.v1.ListBackupSchedulesRequest\x1A6.google.firestore.admin.v1.ListBackupSchedulesResponse\"D\xDAA\x06parent\x82\xD3\xE4\x93\x025\x123/v1/{parent=projects/*/databases/*}/backupSchedules\x12\xF5\x01\x0A\x14UpdateBackupSchedule\x126.google.firestore.admin.v1.UpdateBackupScheduleRequest\x1A).google.firestore.admin.v1.BackupSchedule\"z\xDAA\x1Bbackup_schedule,update_mask\x82\xD3\xE4\x93\x02V2C/v1/{backup_schedule.name=projects/*/databases/*/backupSchedules/*}:\x0Fbackup_schedule\x12\xAA\x01\x0A\x14DeleteBackupSchedule\x126.google.firestore.admin.v1.DeleteBackupScheduleRequest\x1A\x16.google.protobuf.Empty\"B\xDAA\x04name\x82\xD3\xE4\x93\x025*3/v1/{name=projects/*/databases/*/backupSchedules/*}\x12\xB7\x02\x0A\x0DCloneDatabase\x12/.google.firestore.admin.v1.CloneDatabaseRequest\x1A\x1D.google.longrunning.Operation\"\xD5\x01\xCAA!\x0A\x08Database\x12\x15CloneDatabaseMetadata\x82\xD3\xE4\x93\x02,\"'/v1/{parent=projects/*}/databases:clone:\x01*\x8A\xD3\xE4\x93\x02y\x124\x0A\x16pitr_snapshot.database\x12\x1Aprojects/{project_id=*}/**\x12A\x0A\x16pitr_snapshot.database\x12'projects/*/databases/{database_id=*}/**\x1Av\xCAA\x18firestore.googleapis.com\xD2AXhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/datastoreB\xA5\x03\x0A\x1Dcom.google.firestore.admin.v1B\x13FirestoreAdminProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1\xEAAL\x0A!firestore.googleapis.com/Location\x12'projects/{project}/locations/{location}\xEAAq\x0A(firestore.googleapis.com/CollectionGroup\x12Eprojects/{project}/databases/{database}/collectionGroups/{collection}b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php deleted file mode 100644 index 7832c5a6f905..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Index.php +++ /dev/null @@ -1,26 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC6\x0D\x0A%google/firestore/admin/v1/index.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\"\x82\x0B\x0A\x05Index\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12@\x0A\x0Bquery_scope\x18\x02 \x01(\x0E2+.google.firestore.admin.v1.Index.QueryScope\x12<\x0A\x09api_scope\x18\x05 \x01(\x0E2).google.firestore.admin.v1.Index.ApiScope\x12;\x0A\x06fields\x18\x03 \x03(\x0B2+.google.firestore.admin.v1.Index.IndexField\x125\x0A\x05state\x18\x04 \x01(\x0E2&.google.firestore.admin.v1.Index.State\x12>\x0A\x07density\x18\x06 \x01(\x0E2(.google.firestore.admin.v1.Index.DensityB\x03\xE0A\x05\x12\x15\x0A\x08multikey\x18\x07 \x01(\x08B\x03\xE0A\x01\x12\x18\x0A\x0Bshard_count\x18\x08 \x01(\x05B\x03\xE0A\x01\x12\x13\x0A\x06unique\x18\x0A \x01(\x08B\x03\xE0A\x01\x1A\xA2\x04\x0A\x0AIndexField\x12\x12\x0A\x0Afield_path\x18\x01 \x01(\x09\x12B\x0A\x05order\x18\x02 \x01(\x0E21.google.firestore.admin.v1.Index.IndexField.OrderH\x00\x12O\x0A\x0Carray_config\x18\x03 \x01(\x0E27.google.firestore.admin.v1.Index.IndexField.ArrayConfigH\x00\x12Q\x0A\x0Dvector_config\x18\x04 \x01(\x0B28.google.firestore.admin.v1.Index.IndexField.VectorConfigH\x00\x1A\x8F\x01\x0A\x0CVectorConfig\x12\x16\x0A\x09dimension\x18\x01 \x01(\x05B\x03\xE0A\x02\x12R\x0A\x04flat\x18\x02 \x01(\x0B2B.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndexH\x00\x1A\x0B\x0A\x09FlatIndexB\x06\x0A\x04type\"=\x0A\x05Order\x12\x15\x0A\x11ORDER_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09ASCENDING\x10\x01\x12\x0E\x0A\x0ADESCENDING\x10\x02\"9\x0A\x0BArrayConfig\x12\x1C\x0A\x18ARRAY_CONFIG_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CONTAINS\x10\x01B\x0C\x0A\x0Avalue_mode\"i\x0A\x0AQueryScope\x12\x1B\x0A\x17QUERY_SCOPE_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ACOLLECTION\x10\x01\x12\x14\x0A\x10COLLECTION_GROUP\x10\x02\x12\x18\x0A\x14COLLECTION_RECURSIVE\x10\x03\"K\x0A\x08ApiScope\x12\x0B\x0A\x07ANY_API\x10\x00\x12\x16\x0A\x12DATASTORE_MODE_API\x10\x01\x12\x1A\x0A\x16MONGODB_COMPATIBLE_API\x10\x02\"I\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x09\x0A\x05READY\x10\x02\x12\x10\x0A\x0CNEEDS_REPAIR\x10\x03\"M\x0A\x07Density\x12\x17\x0A\x13DENSITY_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ASPARSE_ALL\x10\x01\x12\x0E\x0A\x0ASPARSE_ANY\x10\x02\x12\x09\x0A\x05DENSE\x10\x03:z\xEAAw\x0A\x1Efirestore.googleapis.com/Index\x12Uprojects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}B\xD9\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0AIndexProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php deleted file mode 100644 index 95b567f8eaae..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Location.php +++ /dev/null @@ -1,24 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC0\x02\x0A(google/firestore/admin/v1/location.proto\x12\x19google.firestore.admin.v1\"\x12\x0A\x10LocationMetadataB\xDC\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0DLocationProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php deleted file mode 100644 index 9c8527e9e62e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Operation.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xAD\x1F\x0A)google/firestore/admin/v1/operation.proto\x12\x19google.firestore.admin.v1\x1A%google/firestore/admin/v1/index.proto\x1A(google/firestore/admin/v1/snapshot.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xBD\x02\x0A\x16IndexOperationMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x0D\x0A\x05index\x18\x03 \x01(\x09\x128\x0A\x05state\x18\x04 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x06 \x01(\x0B2#.google.firestore.admin.v1.Progress\"\xCF\x07\x0A\x16FieldOperationMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x0D\x0A\x05field\x18\x03 \x01(\x09\x12_\x0A\x13index_config_deltas\x18\x04 \x03(\x0B2B.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta\x128\x0A\x05state\x18\x05 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x06 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x07 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12Z\x0A\x10ttl_config_delta\x18\x08 \x01(\x0B2@.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta\x1A\xE7\x01\x0A\x10IndexConfigDelta\x12b\x0A\x0Bchange_type\x18\x01 \x01(\x0E2M.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType\x12/\x0A\x05index\x18\x02 \x01(\x0B2 .google.firestore.admin.v1.Index\">\x0A\x0AChangeType\x12\x1B\x0A\x17CHANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\x1A\xE8\x01\x0A\x0ETtlConfigDelta\x12`\x0A\x0Bchange_type\x18\x01 \x01(\x0E2K.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType\x124\x0A\x11expiration_offset\x18\x03 \x01(\x0B2\x19.google.protobuf.Duration\">\x0A\x0AChangeType\x12\x1B\x0A\x17CHANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\"\xB6\x03\x0A\x17ExportDocumentsMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x04 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12\x16\x0A\x0Ecollection_ids\x18\x06 \x03(\x09\x12\x19\x0A\x11output_uri_prefix\x18\x07 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x08 \x03(\x09\x121\x0A\x0Dsnapshot_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x82\x03\x0A\x17ImportDocumentsMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x04 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12\x16\x0A\x0Ecollection_ids\x18\x06 \x03(\x09\x12\x18\x0A\x10input_uri_prefix\x18\x07 \x01(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x08 \x03(\x09\"\x9F\x03\x0A\x1BBulkDeleteDocumentsMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x12?\x0A\x12progress_documents\x18\x04 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12;\x0A\x0Eprogress_bytes\x18\x05 \x01(\x0B2#.google.firestore.admin.v1.Progress\x12\x16\x0A\x0Ecollection_ids\x18\x06 \x03(\x09\x12\x15\x0A\x0Dnamespace_ids\x18\x07 \x03(\x09\x121\x0A\x0Dsnapshot_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.Timestamp\"4\x0A\x17ExportDocumentsResponse\x12\x19\x0A\x11output_uri_prefix\x18\x01 \x01(\x09\"\xED\x02\x0A\x17RestoreDatabaseMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x128\x0A\x08database\x18\x04 \x01(\x09B&\xFAA#\x0A!firestore.googleapis.com/Database\x124\x0A\x06backup\x18\x05 \x01(\x09B\$\xFAA!\x0A\x1Ffirestore.googleapis.com/Backup\x12@\x0A\x13progress_percentage\x18\x08 \x01(\x0B2#.google.firestore.admin.v1.Progress\"\xF5\x02\x0A\x15CloneDatabaseMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12B\x0A\x0Foperation_state\x18\x03 \x01(\x0E2).google.firestore.admin.v1.OperationState\x128\x0A\x08database\x18\x04 \x01(\x09B&\xFAA#\x0A!firestore.googleapis.com/Database\x12>\x0A\x0Dpitr_snapshot\x18\x07 \x01(\x0B2'.google.firestore.admin.v1.PitrSnapshot\x12@\x0A\x13progress_percentage\x18\x06 \x01(\x0B2#.google.firestore.admin.v1.Progress\":\x0A\x08Progress\x12\x16\x0A\x0Eestimated_work\x18\x01 \x01(\x03\x12\x16\x0A\x0Ecompleted_work\x18\x02 \x01(\x03*\x9E\x01\x0A\x0EOperationState\x12\x1F\x0A\x1BOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CINITIALIZING\x10\x01\x12\x0E\x0A\x0APROCESSING\x10\x02\x12\x0E\x0A\x0ACANCELLING\x10\x03\x12\x0E\x0A\x0AFINALIZING\x10\x04\x12\x0E\x0A\x0ASUCCESSFUL\x10\x05\x12\x0A\x0A\x06FAILED\x10\x06\x12\x0D\x0A\x09CANCELLED\x10\x07B\xDD\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0EOperationProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/RealtimeUpdates.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/RealtimeUpdates.php deleted file mode 100644 index 554a536be61d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/RealtimeUpdates.php +++ /dev/null @@ -1,24 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC1\x03\x0A0google/firestore/admin/v1/realtime_updates.proto\x12\x19google.firestore.admin.v1*\x83\x01\x0A\x13RealtimeUpdatesMode\x12%\x0A!REALTIME_UPDATES_MODE_UNSPECIFIED\x10\x00\x12!\x0A\x1DREALTIME_UPDATES_MODE_ENABLED\x10\x01\x12\"\x0A\x1EREALTIME_UPDATES_MODE_DISABLED\x10\x02B\xE3\x01\x0A\x1Dcom.google.firestore.admin.v1B\x14RealtimeUpdatesProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Schedule.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Schedule.php deleted file mode 100644 index 045809417af4..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Schedule.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xCA\x07\x0A(google/firestore/admin/v1/schedule.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Bgoogle/type/dayofweek.proto\"\xD6\x03\x0A\x0EBackupSchedule\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x0A \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12,\x0A\x09retention\x18\x06 \x01(\x0B2\x19.google.protobuf.Duration\x12F\x0A\x10daily_recurrence\x18\x07 \x01(\x0B2*.google.firestore.admin.v1.DailyRecurrenceH\x00\x12H\x0A\x11weekly_recurrence\x18\x08 \x01(\x0B2+.google.firestore.admin.v1.WeeklyRecurrenceH\x00:w\xEAAt\x0A'firestore.googleapis.com/BackupSchedule\x12Iprojects/{project}/databases/{database}/backupSchedules/{backup_schedule}B\x0C\x0A\x0Arecurrence\"\x11\x0A\x0FDailyRecurrence\"7\x0A\x10WeeklyRecurrence\x12#\x0A\x03day\x18\x02 \x01(\x0E2\x16.google.type.DayOfWeekB\xDC\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0DScheduleProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Snapshot.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Snapshot.php deleted file mode 100644 index ae50af2b85eb..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/Snapshot.php +++ /dev/null @@ -1,27 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x8D\x04\x0A(google/firestore/admin/v1/snapshot.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x9E\x01\x0A\x0CPitrSnapshot\x12;\x0A\x08database\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!firestore.googleapis.com/Database\x12\x19\x0A\x0Cdatabase_uid\x18\x02 \x01(\x0CB\x03\xE0A\x03\x126\x0A\x0Dsnapshot_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x02B\xE0\x01\x0A\x1Dcom.google.firestore.admin.v1B\x11PitrSnapshotProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/UserCreds.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/UserCreds.php deleted file mode 100644 index 801548a219df..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/GPBMetadata/Google/Firestore/Admin/V1/UserCreds.php +++ /dev/null @@ -1,27 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xA5\x07\x0A*google/firestore/admin/v1/user_creds.proto\x12\x19google.firestore.admin.v1\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB7\x04\x0A\x09UserCreds\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12>\x0A\x05state\x18\x04 \x01(\x0E2*.google.firestore.admin.v1.UserCreds.StateB\x03\xE0A\x03\x12\x1C\x0A\x0Fsecure_password\x18\x05 \x01(\x09B\x03\xE0A\x03\x12R\x0A\x11resource_identity\x18\x06 \x01(\x0B25.google.firestore.admin.v1.UserCreds.ResourceIdentityH\x00\x1A*\x0A\x10ResourceIdentity\x12\x16\x0A\x09principal\x18\x01 \x01(\x09B\x03\xE0A\x03\"9\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07ENABLED\x10\x01\x12\x0C\x0A\x08DISABLED\x10\x02:}\xEAAz\x0A\"firestore.googleapis.com/UserCreds\x12>projects/{project}/databases/{database}/userCreds/{user_creds}*\x09userCreds2\x09userCredsB\x13\x0A\x11UserCredsIdentityB\xDD\x01\x0A\x1Dcom.google.firestore.admin.v1B\x0EUserCredsProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xA2\x02\x04GCFS\xAA\x02\x1FGoogle.Cloud.Firestore.Admin.V1\xCA\x02\x1FGoogle\\Cloud\\Firestore\\Admin\\V1\xEA\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup.php deleted file mode 100644 index 1f840d0bcfc9..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup.php +++ /dev/null @@ -1,327 +0,0 @@ -google.firestore.admin.v1.Backup - */ -class Backup extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The unique resource name of the Backup. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. Name of the Firestore database that the backup is from. - * Format is `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $database = ''; - /** - * Output only. The system-generated UUID4 for the Firestore database that the - * backup is from. - * - * Generated from protobuf field string database_uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $database_uid = ''; - /** - * Output only. The backup contains an externally consistent copy of the - * database at this time. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $snapshot_time = null; - /** - * Output only. The timestamp at which this backup expires. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $expire_time = null; - /** - * Output only. Statistics about the backup. - * This data only becomes available after the backup is fully materialized to - * secondary storage. This field will be empty till then. - * - * Generated from protobuf field .google.firestore.admin.v1.Backup.Stats stats = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $stats = null; - /** - * Output only. The current state of the backup. - * - * Generated from protobuf field .google.firestore.admin.v1.Backup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The unique resource name of the Backup. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * @type string $database - * Output only. Name of the Firestore database that the backup is from. - * Format is `projects/{project}/databases/{database}`. - * @type string $database_uid - * Output only. The system-generated UUID4 for the Firestore database that the - * backup is from. - * @type \Google\Protobuf\Timestamp $snapshot_time - * Output only. The backup contains an externally consistent copy of the - * database at this time. - * @type \Google\Protobuf\Timestamp $expire_time - * Output only. The timestamp at which this backup expires. - * @type \Google\Cloud\Firestore\Admin\V1\Backup\Stats $stats - * Output only. Statistics about the backup. - * This data only becomes available after the backup is fully materialized to - * secondary storage. This field will be empty till then. - * @type int $state - * Output only. The current state of the backup. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Backup::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The unique resource name of the Backup. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The unique resource name of the Backup. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Name of the Firestore database that the backup is from. - * Format is `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Output only. Name of the Firestore database that the backup is from. - * Format is `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * Output only. The system-generated UUID4 for the Firestore database that the - * backup is from. - * - * Generated from protobuf field string database_uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDatabaseUid() - { - return $this->database_uid; - } - - /** - * Output only. The system-generated UUID4 for the Firestore database that the - * backup is from. - * - * Generated from protobuf field string database_uid = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDatabaseUid($var) - { - GPBUtil::checkString($var, True); - $this->database_uid = $var; - - return $this; - } - - /** - * Output only. The backup contains an externally consistent copy of the - * database at this time. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSnapshotTime() - { - return $this->snapshot_time; - } - - public function hasSnapshotTime() - { - return isset($this->snapshot_time); - } - - public function clearSnapshotTime() - { - unset($this->snapshot_time); - } - - /** - * Output only. The backup contains an externally consistent copy of the - * database at this time. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSnapshotTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->snapshot_time = $var; - - return $this; - } - - /** - * Output only. The timestamp at which this backup expires. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpireTime() - { - return $this->expire_time; - } - - public function hasExpireTime() - { - return isset($this->expire_time); - } - - public function clearExpireTime() - { - unset($this->expire_time); - } - - /** - * Output only. The timestamp at which this backup expires. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - - /** - * Output only. Statistics about the backup. - * This data only becomes available after the backup is fully materialized to - * secondary storage. This field will be empty till then. - * - * Generated from protobuf field .google.firestore.admin.v1.Backup.Stats stats = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Firestore\Admin\V1\Backup\Stats|null - */ - public function getStats() - { - return $this->stats; - } - - public function hasStats() - { - return isset($this->stats); - } - - public function clearStats() - { - unset($this->stats); - } - - /** - * Output only. Statistics about the backup. - * This data only becomes available after the backup is fully materialized to - * secondary storage. This field will be empty till then. - * - * Generated from protobuf field .google.firestore.admin.v1.Backup.Stats stats = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Firestore\Admin\V1\Backup\Stats $var - * @return $this - */ - public function setStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Backup\Stats::class); - $this->stats = $var; - - return $this; - } - - /** - * Output only. The current state of the backup. - * - * Generated from protobuf field .google.firestore.admin.v1.Backup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current state of the backup. - * - * Generated from protobuf field .google.firestore.admin.v1.Backup.State state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Backup\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/State.php deleted file mode 100644 index a88be83f7339..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/State.php +++ /dev/null @@ -1,69 +0,0 @@ -google.firestore.admin.v1.Backup.State - */ -class State -{ - /** - * The state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The pending backup is still being created. Operations on the - * backup will be rejected in this state. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The backup is complete and ready to use. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * The backup is not available at this moment. - * - * Generated from protobuf enum NOT_AVAILABLE = 3; - */ - const NOT_AVAILABLE = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::NOT_AVAILABLE => 'NOT_AVAILABLE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/Stats.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/Stats.php deleted file mode 100644 index 830da955b0cd..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Backup/Stats.php +++ /dev/null @@ -1,139 +0,0 @@ -google.firestore.admin.v1.Backup.Stats - */ -class Stats extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Summation of the size of all documents and index entries in - * the backup, measured in bytes. - * - * Generated from protobuf field int64 size_bytes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $size_bytes = 0; - /** - * Output only. The total number of documents contained in the backup. - * - * Generated from protobuf field int64 document_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $document_count = 0; - /** - * Output only. The total number of index entries contained in the backup. - * - * Generated from protobuf field int64 index_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $index_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $size_bytes - * Output only. Summation of the size of all documents and index entries in - * the backup, measured in bytes. - * @type int|string $document_count - * Output only. The total number of documents contained in the backup. - * @type int|string $index_count - * Output only. The total number of index entries contained in the backup. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Backup::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Summation of the size of all documents and index entries in - * the backup, measured in bytes. - * - * Generated from protobuf field int64 size_bytes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getSizeBytes() - { - return $this->size_bytes; - } - - /** - * Output only. Summation of the size of all documents and index entries in - * the backup, measured in bytes. - * - * Generated from protobuf field int64 size_bytes = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->size_bytes = $var; - - return $this; - } - - /** - * Output only. The total number of documents contained in the backup. - * - * Generated from protobuf field int64 document_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getDocumentCount() - { - return $this->document_count; - } - - /** - * Output only. The total number of documents contained in the backup. - * - * Generated from protobuf field int64 document_count = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setDocumentCount($var) - { - GPBUtil::checkInt64($var); - $this->document_count = $var; - - return $this; - } - - /** - * Output only. The total number of index entries contained in the backup. - * - * Generated from protobuf field int64 index_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getIndexCount() - { - return $this->index_count; - } - - /** - * Output only. The total number of index entries contained in the backup. - * - * Generated from protobuf field int64 index_count = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setIndexCount($var) - { - GPBUtil::checkInt64($var); - $this->index_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BackupSchedule.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BackupSchedule.php deleted file mode 100644 index 2f86c6cbe31b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BackupSchedule.php +++ /dev/null @@ -1,316 +0,0 @@ -google.firestore.admin.v1.BackupSchedule - */ -class BackupSchedule extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The unique backup schedule identifier across all locations and - * databases for the given project. - * This will be auto-assigned. - * Format is - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The timestamp at which this backup schedule was created and - * effective since. - * No backups will be created for this schedule before this time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp at which this backup schedule was most recently - * updated. When a backup schedule is first created, this is the same as - * create_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * At what relative time in the future, compared to its creation time, - * the backup should be deleted, e.g. keep backups for 7 days. - * The maximum supported retention period is 14 weeks. - * - * Generated from protobuf field .google.protobuf.Duration retention = 6; - */ - protected $retention = null; - protected $recurrence; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The unique backup schedule identifier across all locations and - * databases for the given project. - * This will be auto-assigned. - * Format is - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp at which this backup schedule was created and - * effective since. - * No backups will be created for this schedule before this time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp at which this backup schedule was most recently - * updated. When a backup schedule is first created, this is the same as - * create_time. - * @type \Google\Protobuf\Duration $retention - * At what relative time in the future, compared to its creation time, - * the backup should be deleted, e.g. keep backups for 7 days. - * The maximum supported retention period is 14 weeks. - * @type \Google\Cloud\Firestore\Admin\V1\DailyRecurrence $daily_recurrence - * For a schedule that runs daily. - * @type \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence $weekly_recurrence - * For a schedule that runs weekly on a specific day. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Schedule::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The unique backup schedule identifier across all locations and - * databases for the given project. - * This will be auto-assigned. - * Format is - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The unique backup schedule identifier across all locations and - * databases for the given project. - * This will be auto-assigned. - * Format is - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The timestamp at which this backup schedule was created and - * effective since. - * No backups will be created for this schedule before this time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp at which this backup schedule was created and - * effective since. - * No backups will be created for this schedule before this time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp at which this backup schedule was most recently - * updated. When a backup schedule is first created, this is the same as - * create_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp at which this backup schedule was most recently - * updated. When a backup schedule is first created, this is the same as - * create_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * At what relative time in the future, compared to its creation time, - * the backup should be deleted, e.g. keep backups for 7 days. - * The maximum supported retention period is 14 weeks. - * - * Generated from protobuf field .google.protobuf.Duration retention = 6; - * @return \Google\Protobuf\Duration|null - */ - public function getRetention() - { - return $this->retention; - } - - public function hasRetention() - { - return isset($this->retention); - } - - public function clearRetention() - { - unset($this->retention); - } - - /** - * At what relative time in the future, compared to its creation time, - * the backup should be deleted, e.g. keep backups for 7 days. - * The maximum supported retention period is 14 weeks. - * - * Generated from protobuf field .google.protobuf.Duration retention = 6; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setRetention($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->retention = $var; - - return $this; - } - - /** - * For a schedule that runs daily. - * - * Generated from protobuf field .google.firestore.admin.v1.DailyRecurrence daily_recurrence = 7; - * @return \Google\Cloud\Firestore\Admin\V1\DailyRecurrence|null - */ - public function getDailyRecurrence() - { - return $this->readOneof(7); - } - - public function hasDailyRecurrence() - { - return $this->hasOneof(7); - } - - /** - * For a schedule that runs daily. - * - * Generated from protobuf field .google.firestore.admin.v1.DailyRecurrence daily_recurrence = 7; - * @param \Google\Cloud\Firestore\Admin\V1\DailyRecurrence $var - * @return $this - */ - public function setDailyRecurrence($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\DailyRecurrence::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * For a schedule that runs weekly on a specific day. - * - * Generated from protobuf field .google.firestore.admin.v1.WeeklyRecurrence weekly_recurrence = 8; - * @return \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence|null - */ - public function getWeeklyRecurrence() - { - return $this->readOneof(8); - } - - public function hasWeeklyRecurrence() - { - return $this->hasOneof(8); - } - - /** - * For a schedule that runs weekly on a specific day. - * - * Generated from protobuf field .google.firestore.admin.v1.WeeklyRecurrence weekly_recurrence = 8; - * @param \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence $var - * @return $this - */ - public function setWeeklyRecurrence($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\WeeklyRecurrence::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * @return string - */ - public function getRecurrence() - { - return $this->whichOneof("recurrence"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsMetadata.php deleted file mode 100644 index 37beadb05832..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsMetadata.php +++ /dev/null @@ -1,373 +0,0 @@ -google.firestore.admin.v1.BulkDeleteDocumentsMetadata - */ -class BulkDeleteDocumentsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - */ - protected $operation_state = 0; - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - */ - protected $progress_documents = null; - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - */ - protected $progress_bytes = null; - /** - * The IDs of the collection groups that are being deleted. - * - * Generated from protobuf field repeated string collection_ids = 6; - */ - private $collection_ids; - /** - * Which namespace IDs are being deleted. - * - * Generated from protobuf field repeated string namespace_ids = 7; - */ - private $namespace_ids; - /** - * The timestamp that corresponds to the version of the database that is being - * read to get the list of documents to delete. This time can also be used as - * the timestamp of PITR in case of disaster recovery (subject to PITR window - * limit). - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 8; - */ - protected $snapshot_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation completed. Will be unset if operation still in - * progress. - * @type int $operation_state - * The state of the operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents - * The progress, in documents, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes - * The progress, in bytes, of this operation. - * @type string[] $collection_ids - * The IDs of the collection groups that are being deleted. - * @type string[] $namespace_ids - * Which namespace IDs are being deleted. - * @type \Google\Protobuf\Timestamp $snapshot_time - * The timestamp that corresponds to the version of the database that is being - * read to get the list of documents to delete. This time can also be used as - * the timestamp of PITR in case of disaster recovery (subject to PITR window - * limit). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @return int - */ - public function getOperationState() - { - return $this->operation_state; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @param int $var - * @return $this - */ - public function setOperationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->operation_state = $var; - - return $this; - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressDocuments() - { - return $this->progress_documents; - } - - public function hasProgressDocuments() - { - return isset($this->progress_documents); - } - - public function clearProgressDocuments() - { - unset($this->progress_documents); - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_documents = $var; - - return $this; - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressBytes() - { - return $this->progress_bytes; - } - - public function hasProgressBytes() - { - return isset($this->progress_bytes); - } - - public function clearProgressBytes() - { - unset($this->progress_bytes); - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_bytes = $var; - - return $this; - } - - /** - * The IDs of the collection groups that are being deleted. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @return RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * The IDs of the collection groups that are being deleted. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @param string[] $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * Which namespace IDs are being deleted. - * - * Generated from protobuf field repeated string namespace_ids = 7; - * @return RepeatedField - */ - public function getNamespaceIds() - { - return $this->namespace_ids; - } - - /** - * Which namespace IDs are being deleted. - * - * Generated from protobuf field repeated string namespace_ids = 7; - * @param string[] $var - * @return $this - */ - public function setNamespaceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_ids = $arr; - - return $this; - } - - /** - * The timestamp that corresponds to the version of the database that is being - * read to get the list of documents to delete. This time can also be used as - * the timestamp of PITR in case of disaster recovery (subject to PITR window - * limit). - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 8; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSnapshotTime() - { - return $this->snapshot_time; - } - - public function hasSnapshotTime() - { - return isset($this->snapshot_time); - } - - public function clearSnapshotTime() - { - unset($this->snapshot_time); - } - - /** - * The timestamp that corresponds to the version of the database that is being - * read to get the list of documents to delete. This time can also be used as - * the timestamp of PITR in case of disaster recovery (subject to PITR window - * limit). - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 8; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSnapshotTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->snapshot_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsRequest.php deleted file mode 100644 index b112a4710b9e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsRequest.php +++ /dev/null @@ -1,193 +0,0 @@ -google.firestore.admin.v1.BulkDeleteDocumentsRequest - */ -class BulkDeleteDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Database to operate. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. IDs of the collection groups to delete. Unspecified means all - * collection groups. - * Each collection group in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $collection_ids; - /** - * Optional. Namespaces to delete. - * An empty list means all namespaces. This is the recommended - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to delete from them. - * Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $namespace_ids; - - /** - * @param string $name Required. Database to operate. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. Please see - * {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\BulkDeleteDocumentsRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Database to operate. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * @type string[] $collection_ids - * Optional. IDs of the collection groups to delete. Unspecified means all - * collection groups. - * Each collection group in this list must be unique. - * @type string[] $namespace_ids - * Optional. Namespaces to delete. - * An empty list means all namespaces. This is the recommended - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to delete from them. - * Each namespace in this list must be unique. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Database to operate. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Database to operate. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. IDs of the collection groups to delete. Unspecified means all - * collection groups. - * Each collection group in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * Optional. IDs of the collection groups to delete. Unspecified means all - * collection groups. - * Each collection group in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[] $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * Optional. Namespaces to delete. - * An empty list means all namespaces. This is the recommended - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to delete from them. - * Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getNamespaceIds() - { - return $this->namespace_ids; - } - - /** - * Optional. Namespaces to delete. - * An empty list means all namespaces. This is the recommended - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to delete from them. - * Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[] $var - * @return $this - */ - public function setNamespaceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsResponse.php deleted file mode 100644 index 7a6fa0418629..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/BulkDeleteDocumentsResponse.php +++ /dev/null @@ -1,34 +0,0 @@ -google.firestore.admin.v1.BulkDeleteDocumentsResponse - */ -class BulkDeleteDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseMetadata.php deleted file mode 100644 index 156b3e92f64f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseMetadata.php +++ /dev/null @@ -1,278 +0,0 @@ -google.firestore.admin.v1.CloneDatabaseMetadata - */ -class CloneDatabaseMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time the clone was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time the clone finished, unset for ongoing clones. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The operation state of the clone. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - */ - protected $operation_state = 0; - /** - * The name of the database being cloned to. - * - * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { - */ - protected $database = ''; - /** - * The snapshot from which this database was cloned. - * - * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; - */ - protected $pitr_snapshot = null; - /** - * How far along the clone is as an estimated percentage of remaining time. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 6; - */ - protected $progress_percentage = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time the clone was started. - * @type \Google\Protobuf\Timestamp $end_time - * The time the clone finished, unset for ongoing clones. - * @type int $operation_state - * The operation state of the clone. - * @type string $database - * The name of the database being cloned to. - * @type \Google\Cloud\Firestore\Admin\V1\PitrSnapshot $pitr_snapshot - * The snapshot from which this database was cloned. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_percentage - * How far along the clone is as an estimated percentage of remaining time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time the clone was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time the clone was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time the clone finished, unset for ongoing clones. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time the clone finished, unset for ongoing clones. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The operation state of the clone. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @return int - */ - public function getOperationState() - { - return $this->operation_state; - } - - /** - * The operation state of the clone. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @param int $var - * @return $this - */ - public function setOperationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->operation_state = $var; - - return $this; - } - - /** - * The name of the database being cloned to. - * - * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * The name of the database being cloned to. - * - * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The snapshot from which this database was cloned. - * - * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; - * @return \Google\Cloud\Firestore\Admin\V1\PitrSnapshot|null - */ - public function getPitrSnapshot() - { - return $this->pitr_snapshot; - } - - public function hasPitrSnapshot() - { - return isset($this->pitr_snapshot); - } - - public function clearPitrSnapshot() - { - unset($this->pitr_snapshot); - } - - /** - * The snapshot from which this database was cloned. - * - * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 7; - * @param \Google\Cloud\Firestore\Admin\V1\PitrSnapshot $var - * @return $this - */ - public function setPitrSnapshot($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\PitrSnapshot::class); - $this->pitr_snapshot = $var; - - return $this; - } - - /** - * How far along the clone is as an estimated percentage of remaining time. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 6; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressPercentage() - { - return $this->progress_percentage; - } - - public function hasProgressPercentage() - { - return isset($this->progress_percentage); - } - - public function clearProgressPercentage() - { - unset($this->progress_percentage); - } - - /** - * How far along the clone is as an estimated percentage of remaining time. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 6; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressPercentage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_percentage = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseRequest.php deleted file mode 100644 index 16f607528833..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CloneDatabaseRequest.php +++ /dev/null @@ -1,284 +0,0 @@ -google.firestore.admin.v1.CloneDatabaseRequest - */ -class CloneDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project to clone the database in. Format is - * `projects/{project_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * - * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database_id = ''; - /** - * Required. Specification of the PITR data to clone from. The source database - * must exist. - * The cloned database will be created in the same location as the source - * database. - * - * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $pitr_snapshot = null; - /** - * Optional. Encryption configuration for the cloned database. - * If this field is not specified, the cloned database will use - * the same encryption configuration as the source database, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encryption_config = null; - /** - * Optional. Immutable. Tags to be bound to the cloned database. - * The tags should be provided in the format of - * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. - * - * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project to clone the database in. Format is - * `projects/{project_id}`. - * @type string $database_id - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * @type \Google\Cloud\Firestore\Admin\V1\PitrSnapshot $pitr_snapshot - * Required. Specification of the PITR data to clone from. The source database - * must exist. - * The cloned database will be created in the same location as the source - * database. - * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig $encryption_config - * Optional. Encryption configuration for the cloned database. - * If this field is not specified, the cloned database will use - * the same encryption configuration as the source database, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * @type array|\Google\Protobuf\Internal\MapField $tags - * Optional. Immutable. Tags to be bound to the cloned database. - * The tags should be provided in the format of - * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project to clone the database in. Format is - * `projects/{project_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project to clone the database in. Format is - * `projects/{project_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * - * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabaseId() - { - return $this->database_id; - } - - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * - * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabaseId($var) - { - GPBUtil::checkString($var, True); - $this->database_id = $var; - - return $this; - } - - /** - * Required. Specification of the PITR data to clone from. The source database - * must exist. - * The cloned database will be created in the same location as the source - * database. - * - * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\PitrSnapshot|null - */ - public function getPitrSnapshot() - { - return $this->pitr_snapshot; - } - - public function hasPitrSnapshot() - { - return isset($this->pitr_snapshot); - } - - public function clearPitrSnapshot() - { - unset($this->pitr_snapshot); - } - - /** - * Required. Specification of the PITR data to clone from. The source database - * must exist. - * The cloned database will be created in the same location as the source - * database. - * - * Generated from protobuf field .google.firestore.admin.v1.PitrSnapshot pitr_snapshot = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\PitrSnapshot $var - * @return $this - */ - public function setPitrSnapshot($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\PitrSnapshot::class); - $this->pitr_snapshot = $var; - - return $this; - } - - /** - * Optional. Encryption configuration for the cloned database. - * If this field is not specified, the cloned database will use - * the same encryption configuration as the source database, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig|null - */ - public function getEncryptionConfig() - { - return $this->encryption_config; - } - - public function hasEncryptionConfig() - { - return isset($this->encryption_config); - } - - public function clearEncryptionConfig() - { - unset($this->encryption_config); - } - - /** - * Optional. Encryption configuration for the cloned database. - * If this field is not specified, the cloned database will use - * the same encryption configuration as the source database, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig $var - * @return $this - */ - public function setEncryptionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig::class); - $this->encryption_config = $var; - - return $this; - } - - /** - * Optional. Immutable. Tags to be bound to the cloned database. - * The tags should be provided in the format of - * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. - * - * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. Immutable. Tags to be bound to the cloned database. - * The tags should be provided in the format of - * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. - * - * Generated from protobuf field map tags = 5 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateBackupScheduleRequest.php deleted file mode 100644 index 5b111b40539a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateBackupScheduleRequest.php +++ /dev/null @@ -1,134 +0,0 @@ -google.firestore.admin.v1.CreateBackupScheduleRequest - */ -class CreateBackupScheduleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent database. - * Format `projects/{project}/databases/{database}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The backup schedule to create. - * - * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_schedule = null; - - /** - * @param string $parent Required. The parent database. - * - * Format `projects/{project}/databases/{database}` - * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule Required. The backup schedule to create. - * - * @return \Google\Cloud\Firestore\Admin\V1\CreateBackupScheduleRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule): self - { - return (new self()) - ->setParent($parent) - ->setBackupSchedule($backupSchedule); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent database. - * Format `projects/{project}/databases/{database}` - * @type \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backup_schedule - * Required. The backup schedule to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent database. - * Format `projects/{project}/databases/{database}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent database. - * Format `projects/{project}/databases/{database}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The backup schedule to create. - * - * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\BackupSchedule|null - */ - public function getBackupSchedule() - { - return $this->backup_schedule; - } - - public function hasBackupSchedule() - { - return isset($this->backup_schedule); - } - - public function clearBackupSchedule() - { - unset($this->backup_schedule); - } - - /** - * Required. The backup schedule to create. - * - * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $var - * @return $this - */ - public function setBackupSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\BackupSchedule::class); - $this->backup_schedule = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseMetadata.php deleted file mode 100644 index 6d7f95468786..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseMetadata.php +++ /dev/null @@ -1,33 +0,0 @@ -google.firestore.admin.v1.CreateDatabaseMetadata - */ -class CreateDatabaseMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseRequest.php deleted file mode 100644 index 11c925f81e0f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateDatabaseRequest.php +++ /dev/null @@ -1,196 +0,0 @@ -google.firestore.admin.v1.CreateDatabaseRequest - */ -class CreateDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Database to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = null; - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * - * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database_id = ''; - - /** - * @param string $parent Required. A parent name of the form - * `projects/{project_id}` - * Please see {@see FirestoreAdminClient::projectName()} for help formatting this field. - * @param \Google\Cloud\Firestore\Admin\V1\Database $database Required. The Database to create. - * @param string $databaseId Required. The ID to use for the database, which will become the final - * component of the database's resource name. - * - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * - * "(default)" database ID is also valid if the database is Standard edition. - * - * @return \Google\Cloud\Firestore\Admin\V1\CreateDatabaseRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Firestore\Admin\V1\Database $database, string $databaseId): self - { - return (new self()) - ->setParent($parent) - ->setDatabase($database) - ->setDatabaseId($databaseId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. A parent name of the form - * `projects/{project_id}` - * @type \Google\Cloud\Firestore\Admin\V1\Database $database - * Required. The Database to create. - * @type string $database_id - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. A parent name of the form - * `projects/{project_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The Database to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\Database|null - */ - public function getDatabase() - { - return $this->database; - } - - public function hasDatabase() - { - return isset($this->database); - } - - public function clearDatabase() - { - unset($this->database); - } - - /** - * Required. The Database to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\Database $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database::class); - $this->database = $var; - - return $this; - } - - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * - * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabaseId() - { - return $this->database_id; - } - - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * - * Generated from protobuf field string database_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabaseId($var) - { - GPBUtil::checkString($var, True); - $this->database_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php deleted file mode 100644 index cec053239e3a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateIndexRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.firestore.admin.v1.CreateIndexRequest - */ -class CreateIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The composite index to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $index = null; - - /** - * @param string $parent Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * Please see {@see FirestoreAdminClient::collectionGroupName()} for help formatting this field. - * @param \Google\Cloud\Firestore\Admin\V1\Index $index Required. The composite index to create. - * - * @return \Google\Cloud\Firestore\Admin\V1\CreateIndexRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Firestore\Admin\V1\Index $index): self - { - return (new self()) - ->setParent($parent) - ->setIndex($index); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * @type \Google\Cloud\Firestore\Admin\V1\Index $index - * Required. The composite index to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The composite index to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\Index|null - */ - public function getIndex() - { - return $this->index; - } - - public function hasIndex() - { - return isset($this->index); - } - - public function clearIndex() - { - unset($this->index); - } - - /** - * Required. The composite index to create. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\Index $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index::class); - $this->index = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateUserCredsRequest.php deleted file mode 100644 index 9e45f49e81ab..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/CreateUserCredsRequest.php +++ /dev/null @@ -1,190 +0,0 @@ -google.firestore.admin.v1.CreateUserCredsRequest - */ -class CreateUserCredsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The user creds to create. - * - * Generated from protobuf field .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $user_creds = null; - /** - * Required. The ID to use for the user creds, which will become the final - * component of the user creds's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * - * Generated from protobuf field string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $user_creds_id = ''; - - /** - * @param string $parent Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}` - * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * @param \Google\Cloud\Firestore\Admin\V1\UserCreds $userCreds Required. The user creds to create. - * @param string $userCredsId Required. The ID to use for the user creds, which will become the final - * component of the user creds's resource name. - * - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * - * @return \Google\Cloud\Firestore\Admin\V1\CreateUserCredsRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Firestore\Admin\V1\UserCreds $userCreds, string $userCredsId): self - { - return (new self()) - ->setParent($parent) - ->setUserCreds($userCreds) - ->setUserCredsId($userCredsId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}` - * @type \Google\Cloud\Firestore\Admin\V1\UserCreds $user_creds - * Required. The user creds to create. - * @type string $user_creds_id - * Required. The ID to use for the user creds, which will become the final - * component of the user creds's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The user creds to create. - * - * Generated from protobuf field .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\UserCreds|null - */ - public function getUserCreds() - { - return $this->user_creds; - } - - public function hasUserCreds() - { - return isset($this->user_creds); - } - - public function clearUserCreds() - { - unset($this->user_creds); - } - - /** - * Required. The user creds to create. - * - * Generated from protobuf field .google.firestore.admin.v1.UserCreds user_creds = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\UserCreds $var - * @return $this - */ - public function setUserCreds($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\UserCreds::class); - $this->user_creds = $var; - - return $this; - } - - /** - * Required. The ID to use for the user creds, which will become the final - * component of the user creds's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * - * Generated from protobuf field string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getUserCredsId() - { - return $this->user_creds_id; - } - - /** - * Required. The ID to use for the user creds, which will become the final - * component of the user creds's resource name. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * - * Generated from protobuf field string user_creds_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setUserCredsId($var) - { - GPBUtil::checkString($var, True); - $this->user_creds_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DailyRecurrence.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DailyRecurrence.php deleted file mode 100644 index 4f94e4e67e80..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DailyRecurrence.php +++ /dev/null @@ -1,34 +0,0 @@ -google.firestore.admin.v1.DailyRecurrence - */ -class DailyRecurrence extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Schedule::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php deleted file mode 100644 index 7d13814ea225..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database.php +++ /dev/null @@ -1,1125 +0,0 @@ -google.firestore.admin.v1.Database - */ -class Database extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the Database. - * Format: `projects/{project}/databases/{database}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The system-generated UUID4 for this Database. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - /** - * Output only. The timestamp at which this database was created. Databases - * created before 2016 do not populate create_time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The timestamp at which this database was most recently - * updated. Note this only includes updates to the database resource and not - * data contained by the database. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The timestamp at which this database was deleted. Only set if - * the database has been deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * The location of the database. Available locations are listed at - * https://cloud.google.com/firestore/docs/locations. - * - * Generated from protobuf field string location_id = 9; - */ - protected $location_id = ''; - /** - * The type of the database. - * See https://cloud.google.com/datastore/docs/firestore-or-datastore for - * information about how to choose. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; - */ - protected $type = 0; - /** - * The concurrency control mode to use for this database. - * If unspecified in a CreateDatabase request, this will default based on the - * database edition: Optimistic for Enterprise and Pessimistic for all other - * databases. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; - */ - protected $concurrency_mode = 0; - /** - * Output only. The period during which past versions of data are retained in - * the database. - * Any [read][google.firestore.v1.GetDocumentRequest.read_time] - * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify - * a `read_time` within this window, and will read the state of the database - * at that time. - * If the PITR feature is enabled, the retention period is 7 days. Otherwise, - * the retention period is 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $version_retention_period = null; - /** - * Output only. The earliest timestamp at which older versions of the data can - * be read from the database. See [version_retention_period] above; this field - * is populated with `now - version_retention_period`. - * This value is continuously updated, and becomes stale the moment it is - * queried. If you are using this value to recover data, make sure to account - * for the time from the moment when the value is queried to the moment when - * you initiate the recovery. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $earliest_version_time = null; - /** - * Whether to enable the PITR feature on this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; - */ - protected $point_in_time_recovery_enablement = 0; - /** - * The App Engine integration mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; - */ - protected $app_engine_integration_mode = 0; - /** - * Output only. The key_prefix for this database. This key_prefix is used, in - * combination with the project ID ("~") to construct - * the application ID that is returned from the Cloud Datastore APIs in Google - * App Engine first generation runtimes. - * This value may be empty in which case the appid to use for URL-encoded keys - * is the project_id (eg: foo instead of v~foo). - * - * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $key_prefix = ''; - /** - * State of delete protection for the database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; - */ - protected $delete_protection_state = 0; - /** - * Optional. Presence indicates CMEK is enabled for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $cmek_config = null; - /** - * Output only. The database resource's prior database ID. This field is only - * populated for deleted databases. - * - * Generated from protobuf field string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $previous_id = ''; - /** - * Output only. Information about the provenance of this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source_info = null; - /** - * Optional. Input only. Immutable. Tag keys/values directly bound to this - * resource. For example: - * "123/environment": "production", - * "123/costCenter": "marketing" - * - * Generated from protobuf field map tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - /** - * Output only. Background: Free tier is the ability of a Firestore database - * to use a small amount of resources every day without being charged. Once - * usage exceeds the free tier limit further usage is charged. - * Whether this database can make use of the free tier. Only one database - * per project can be eligible for the free tier. - * The first (or next) database that is created in a project without a free - * tier database will be marked as eligible for the free tier. Databases that - * are created while there is a free tier database will not be eligible for - * the free tier. - * - * Generated from protobuf field optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $free_tier = null; - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 99; - */ - protected $etag = ''; - /** - * Immutable. The edition of the database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $database_edition = 0; - /** - * Immutable. The default Realtime Updates mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.RealtimeUpdatesMode realtime_updates_mode = 31 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $realtime_updates_mode = 0; - /** - * Optional. The Firestore API data access mode to use for this database. If - * not set on write: - * - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. - * - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode firestore_data_access_mode = 33 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $firestore_data_access_mode = 0; - /** - * Optional. The MongoDB compatible API data access mode to use for this - * database. If not set on write, the default value is - * DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always - * DATA_ACCESS_MODE_DISABLED for Standard Edition. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode mongodb_compatible_data_access_mode = 34 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mongodb_compatible_data_access_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the Database. - * Format: `projects/{project}/databases/{database}` - * @type string $uid - * Output only. The system-generated UUID4 for this Database. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp at which this database was created. Databases - * created before 2016 do not populate create_time. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The timestamp at which this database was most recently - * updated. Note this only includes updates to the database resource and not - * data contained by the database. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. The timestamp at which this database was deleted. Only set if - * the database has been deleted. - * @type string $location_id - * The location of the database. Available locations are listed at - * https://cloud.google.com/firestore/docs/locations. - * @type int $type - * The type of the database. - * See https://cloud.google.com/datastore/docs/firestore-or-datastore for - * information about how to choose. - * @type int $concurrency_mode - * The concurrency control mode to use for this database. - * If unspecified in a CreateDatabase request, this will default based on the - * database edition: Optimistic for Enterprise and Pessimistic for all other - * databases. - * @type \Google\Protobuf\Duration $version_retention_period - * Output only. The period during which past versions of data are retained in - * the database. - * Any [read][google.firestore.v1.GetDocumentRequest.read_time] - * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify - * a `read_time` within this window, and will read the state of the database - * at that time. - * If the PITR feature is enabled, the retention period is 7 days. Otherwise, - * the retention period is 1 hour. - * @type \Google\Protobuf\Timestamp $earliest_version_time - * Output only. The earliest timestamp at which older versions of the data can - * be read from the database. See [version_retention_period] above; this field - * is populated with `now - version_retention_period`. - * This value is continuously updated, and becomes stale the moment it is - * queried. If you are using this value to recover data, make sure to account - * for the time from the moment when the value is queried to the moment when - * you initiate the recovery. - * @type int $point_in_time_recovery_enablement - * Whether to enable the PITR feature on this database. - * @type int $app_engine_integration_mode - * The App Engine integration mode to use for this database. - * @type string $key_prefix - * Output only. The key_prefix for this database. This key_prefix is used, in - * combination with the project ID ("~") to construct - * the application ID that is returned from the Cloud Datastore APIs in Google - * App Engine first generation runtimes. - * This value may be empty in which case the appid to use for URL-encoded keys - * is the project_id (eg: foo instead of v~foo). - * @type int $delete_protection_state - * State of delete protection for the database. - * @type \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig $cmek_config - * Optional. Presence indicates CMEK is enabled for this database. - * @type string $previous_id - * Output only. The database resource's prior database ID. This field is only - * populated for deleted databases. - * @type \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo $source_info - * Output only. Information about the provenance of this database. - * @type array|\Google\Protobuf\Internal\MapField $tags - * Optional. Input only. Immutable. Tag keys/values directly bound to this - * resource. For example: - * "123/environment": "production", - * "123/costCenter": "marketing" - * @type bool $free_tier - * Output only. Background: Free tier is the ability of a Firestore database - * to use a small amount of resources every day without being charged. Once - * usage exceeds the free tier limit further usage is charged. - * Whether this database can make use of the free tier. Only one database - * per project can be eligible for the free tier. - * The first (or next) database that is created in a project without a free - * tier database will be marked as eligible for the free tier. Databases that - * are created while there is a free tier database will not be eligible for - * the free tier. - * @type string $etag - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * @type int $database_edition - * Immutable. The edition of the database. - * @type int $realtime_updates_mode - * Immutable. The default Realtime Updates mode to use for this database. - * @type int $firestore_data_access_mode - * Optional. The Firestore API data access mode to use for this database. If - * not set on write: - * - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. - * - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition. - * @type int $mongodb_compatible_data_access_mode - * Optional. The MongoDB compatible API data access mode to use for this - * database. If not set on write, the default value is - * DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always - * DATA_ACCESS_MODE_DISABLED for Standard Edition. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the Database. - * Format: `projects/{project}/databases/{database}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the Database. - * Format: `projects/{project}/databases/{database}` - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The system-generated UUID4 for this Database. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. The system-generated UUID4 for this Database. - * - * Generated from protobuf field string uid = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * Output only. The timestamp at which this database was created. Databases - * created before 2016 do not populate create_time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp at which this database was created. Databases - * created before 2016 do not populate create_time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The timestamp at which this database was most recently - * updated. Note this only includes updates to the database resource and not - * data contained by the database. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The timestamp at which this database was most recently - * updated. Note this only includes updates to the database resource and not - * data contained by the database. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. The timestamp at which this database was deleted. Only set if - * the database has been deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. The timestamp at which this database was deleted. Only set if - * the database has been deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * The location of the database. Available locations are listed at - * https://cloud.google.com/firestore/docs/locations. - * - * Generated from protobuf field string location_id = 9; - * @return string - */ - public function getLocationId() - { - return $this->location_id; - } - - /** - * The location of the database. Available locations are listed at - * https://cloud.google.com/firestore/docs/locations. - * - * Generated from protobuf field string location_id = 9; - * @param string $var - * @return $this - */ - public function setLocationId($var) - { - GPBUtil::checkString($var, True); - $this->location_id = $var; - - return $this; - } - - /** - * The type of the database. - * See https://cloud.google.com/datastore/docs/firestore-or-datastore for - * information about how to choose. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the database. - * See https://cloud.google.com/datastore/docs/firestore-or-datastore for - * information about how to choose. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseType type = 10; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DatabaseType::class); - $this->type = $var; - - return $this; - } - - /** - * The concurrency control mode to use for this database. - * If unspecified in a CreateDatabase request, this will default based on the - * database edition: Optimistic for Enterprise and Pessimistic for all other - * databases. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; - * @return int - */ - public function getConcurrencyMode() - { - return $this->concurrency_mode; - } - - /** - * The concurrency control mode to use for this database. - * If unspecified in a CreateDatabase request, this will default based on the - * database edition: Optimistic for Enterprise and Pessimistic for all other - * databases. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.ConcurrencyMode concurrency_mode = 15; - * @param int $var - * @return $this - */ - public function setConcurrencyMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\ConcurrencyMode::class); - $this->concurrency_mode = $var; - - return $this; - } - - /** - * Output only. The period during which past versions of data are retained in - * the database. - * Any [read][google.firestore.v1.GetDocumentRequest.read_time] - * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify - * a `read_time` within this window, and will read the state of the database - * at that time. - * If the PITR feature is enabled, the retention period is 7 days. Otherwise, - * the retention period is 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Duration|null - */ - public function getVersionRetentionPeriod() - { - return $this->version_retention_period; - } - - public function hasVersionRetentionPeriod() - { - return isset($this->version_retention_period); - } - - public function clearVersionRetentionPeriod() - { - unset($this->version_retention_period); - } - - /** - * Output only. The period during which past versions of data are retained in - * the database. - * Any [read][google.firestore.v1.GetDocumentRequest.read_time] - * or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify - * a `read_time` within this window, and will read the state of the database - * at that time. - * If the PITR feature is enabled, the retention period is 7 days. Otherwise, - * the retention period is 1 hour. - * - * Generated from protobuf field .google.protobuf.Duration version_retention_period = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setVersionRetentionPeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->version_retention_period = $var; - - return $this; - } - - /** - * Output only. The earliest timestamp at which older versions of the data can - * be read from the database. See [version_retention_period] above; this field - * is populated with `now - version_retention_period`. - * This value is continuously updated, and becomes stale the moment it is - * queried. If you are using this value to recover data, make sure to account - * for the time from the moment when the value is queried to the moment when - * you initiate the recovery. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEarliestVersionTime() - { - return $this->earliest_version_time; - } - - public function hasEarliestVersionTime() - { - return isset($this->earliest_version_time); - } - - public function clearEarliestVersionTime() - { - unset($this->earliest_version_time); - } - - /** - * Output only. The earliest timestamp at which older versions of the data can - * be read from the database. See [version_retention_period] above; this field - * is populated with `now - version_retention_period`. - * This value is continuously updated, and becomes stale the moment it is - * queried. If you are using this value to recover data, make sure to account - * for the time from the moment when the value is queried to the moment when - * you initiate the recovery. - * - * Generated from protobuf field .google.protobuf.Timestamp earliest_version_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEarliestVersionTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->earliest_version_time = $var; - - return $this; - } - - /** - * Whether to enable the PITR feature on this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; - * @return int - */ - public function getPointInTimeRecoveryEnablement() - { - return $this->point_in_time_recovery_enablement; - } - - /** - * Whether to enable the PITR feature on this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement point_in_time_recovery_enablement = 21; - * @param int $var - * @return $this - */ - public function setPointInTimeRecoveryEnablement($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\PointInTimeRecoveryEnablement::class); - $this->point_in_time_recovery_enablement = $var; - - return $this; - } - - /** - * The App Engine integration mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; - * @return int - */ - public function getAppEngineIntegrationMode() - { - return $this->app_engine_integration_mode; - } - - /** - * The App Engine integration mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.AppEngineIntegrationMode app_engine_integration_mode = 19; - * @param int $var - * @return $this - */ - public function setAppEngineIntegrationMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\AppEngineIntegrationMode::class); - $this->app_engine_integration_mode = $var; - - return $this; - } - - /** - * Output only. The key_prefix for this database. This key_prefix is used, in - * combination with the project ID ("~") to construct - * the application ID that is returned from the Cloud Datastore APIs in Google - * App Engine first generation runtimes. - * This value may be empty in which case the appid to use for URL-encoded keys - * is the project_id (eg: foo instead of v~foo). - * - * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getKeyPrefix() - { - return $this->key_prefix; - } - - /** - * Output only. The key_prefix for this database. This key_prefix is used, in - * combination with the project ID ("~") to construct - * the application ID that is returned from the Cloud Datastore APIs in Google - * App Engine first generation runtimes. - * This value may be empty in which case the appid to use for URL-encoded keys - * is the project_id (eg: foo instead of v~foo). - * - * Generated from protobuf field string key_prefix = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setKeyPrefix($var) - { - GPBUtil::checkString($var, True); - $this->key_prefix = $var; - - return $this; - } - - /** - * State of delete protection for the database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; - * @return int - */ - public function getDeleteProtectionState() - { - return $this->delete_protection_state; - } - - /** - * State of delete protection for the database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DeleteProtectionState delete_protection_state = 22; - * @param int $var - * @return $this - */ - public function setDeleteProtectionState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DeleteProtectionState::class); - $this->delete_protection_state = $var; - - return $this; - } - - /** - * Optional. Presence indicates CMEK is enabled for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig|null - */ - public function getCmekConfig() - { - return $this->cmek_config; - } - - public function hasCmekConfig() - { - return isset($this->cmek_config); - } - - public function clearCmekConfig() - { - unset($this->cmek_config); - } - - /** - * Optional. Presence indicates CMEK is enabled for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.CmekConfig cmek_config = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig $var - * @return $this - */ - public function setCmekConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\CmekConfig::class); - $this->cmek_config = $var; - - return $this; - } - - /** - * Output only. The database resource's prior database ID. This field is only - * populated for deleted databases. - * - * Generated from protobuf field string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPreviousId() - { - return $this->previous_id; - } - - /** - * Output only. The database resource's prior database ID. This field is only - * populated for deleted databases. - * - * Generated from protobuf field string previous_id = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPreviousId($var) - { - GPBUtil::checkString($var, True); - $this->previous_id = $var; - - return $this; - } - - /** - * Output only. Information about the provenance of this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo|null - */ - public function getSourceInfo() - { - return $this->source_info; - } - - public function hasSourceInfo() - { - return isset($this->source_info); - } - - public function clearSourceInfo() - { - unset($this->source_info); - } - - /** - * Output only. Information about the provenance of this database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo source_info = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo $var - * @return $this - */ - public function setSourceInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo::class); - $this->source_info = $var; - - return $this; - } - - /** - * Optional. Input only. Immutable. Tag keys/values directly bound to this - * resource. For example: - * "123/environment": "production", - * "123/costCenter": "marketing" - * - * Generated from protobuf field map tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. Input only. Immutable. Tag keys/values directly bound to this - * resource. For example: - * "123/environment": "production", - * "123/costCenter": "marketing" - * - * Generated from protobuf field map tags = 29 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - - /** - * Output only. Background: Free tier is the ability of a Firestore database - * to use a small amount of resources every day without being charged. Once - * usage exceeds the free tier limit further usage is charged. - * Whether this database can make use of the free tier. Only one database - * per project can be eligible for the free tier. - * The first (or next) database that is created in a project without a free - * tier database will be marked as eligible for the free tier. Databases that - * are created while there is a free tier database will not be eligible for - * the free tier. - * - * Generated from protobuf field optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getFreeTier() - { - return isset($this->free_tier) ? $this->free_tier : false; - } - - public function hasFreeTier() - { - return isset($this->free_tier); - } - - public function clearFreeTier() - { - unset($this->free_tier); - } - - /** - * Output only. Background: Free tier is the ability of a Firestore database - * to use a small amount of resources every day without being charged. Once - * usage exceeds the free tier limit further usage is charged. - * Whether this database can make use of the free tier. Only one database - * per project can be eligible for the free tier. - * The first (or next) database that is created in a project without a free - * tier database will be marked as eligible for the free tier. Databases that - * are created while there is a free tier database will not be eligible for - * the free tier. - * - * Generated from protobuf field optional bool free_tier = 30 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setFreeTier($var) - { - GPBUtil::checkBool($var); - $this->free_tier = $var; - - return $this; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 99; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * This checksum is computed by the server based on the value of other - * fields, and may be sent on update and delete requests to ensure the - * client has an up-to-date value before proceeding. - * - * Generated from protobuf field string etag = 99; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - - /** - * Immutable. The edition of the database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getDatabaseEdition() - { - return $this->database_edition; - } - - /** - * Immutable. The edition of the database. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DatabaseEdition database_edition = 28 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setDatabaseEdition($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DatabaseEdition::class); - $this->database_edition = $var; - - return $this; - } - - /** - * Immutable. The default Realtime Updates mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.RealtimeUpdatesMode realtime_updates_mode = 31 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getRealtimeUpdatesMode() - { - return $this->realtime_updates_mode; - } - - /** - * Immutable. The default Realtime Updates mode to use for this database. - * - * Generated from protobuf field .google.firestore.admin.v1.RealtimeUpdatesMode realtime_updates_mode = 31 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setRealtimeUpdatesMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\RealtimeUpdatesMode::class); - $this->realtime_updates_mode = $var; - - return $this; - } - - /** - * Optional. The Firestore API data access mode to use for this database. If - * not set on write: - * - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. - * - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode firestore_data_access_mode = 33 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getFirestoreDataAccessMode() - { - return $this->firestore_data_access_mode; - } - - /** - * Optional. The Firestore API data access mode to use for this database. If - * not set on write: - * - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. - * - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode firestore_data_access_mode = 33 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setFirestoreDataAccessMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DataAccessMode::class); - $this->firestore_data_access_mode = $var; - - return $this; - } - - /** - * Optional. The MongoDB compatible API data access mode to use for this - * database. If not set on write, the default value is - * DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always - * DATA_ACCESS_MODE_DISABLED for Standard Edition. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode mongodb_compatible_data_access_mode = 34 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMongodbCompatibleDataAccessMode() - { - return $this->mongodb_compatible_data_access_mode; - } - - /** - * Optional. The MongoDB compatible API data access mode to use for this - * database. If not set on write, the default value is - * DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always - * DATA_ACCESS_MODE_DISABLED for Standard Edition. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.DataAccessMode mongodb_compatible_data_access_mode = 34 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMongodbCompatibleDataAccessMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Database\DataAccessMode::class); - $this->mongodb_compatible_data_access_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php deleted file mode 100644 index f81ca80beab3..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/AppEngineIntegrationMode.php +++ /dev/null @@ -1,66 +0,0 @@ -google.firestore.admin.v1.Database.AppEngineIntegrationMode - */ -class AppEngineIntegrationMode -{ - /** - * Not used. - * - * Generated from protobuf enum APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED = 0; - */ - const APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED = 0; - /** - * If an App Engine application exists in the same region as this database, - * App Engine configuration will impact this database. This includes - * disabling of the application & database, as well as disabling writes to - * the database. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * App Engine has no effect on the ability of this database to serve - * requests. - * This is the default setting for databases created with the Firestore API. - * - * Generated from protobuf enum DISABLED = 2; - */ - const DISABLED = 2; - - private static $valueToName = [ - self::APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED => 'APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED', - self::ENABLED => 'ENABLED', - self::DISABLED => 'DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/CmekConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/CmekConfig.php deleted file mode 100644 index 2178af095d91..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/CmekConfig.php +++ /dev/null @@ -1,151 +0,0 @@ -google.firestore.admin.v1.Database.CmekConfig - */ -class CmekConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Only keys in the same location as this database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $kms_key_name = ''; - /** - * Output only. Currently in-use [KMS key - * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). - * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), - * there can be multiple in-use key versions. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. - * - * Generated from protobuf field repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $active_key_version; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kms_key_name - * Required. Only keys in the same location as this database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * @type string[] $active_key_version - * Output only. Currently in-use [KMS key - * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). - * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), - * there can be multiple in-use key versions. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * Required. Only keys in the same location as this database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * Required. Only keys in the same location as this database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - - /** - * Output only. Currently in-use [KMS key - * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). - * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), - * there can be multiple in-use key versions. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. - * - * Generated from protobuf field repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField - */ - public function getActiveKeyVersion() - { - return $this->active_key_version; - } - - /** - * Output only. Currently in-use [KMS key - * versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). - * During [key rotation](https://cloud.google.com/kms/docs/key-rotation), - * there can be multiple in-use key versions. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. - * - * Generated from protobuf field repeated string active_key_version = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string[] $var - * @return $this - */ - public function setActiveKeyVersion($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->active_key_version = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php deleted file mode 100644 index f34e9bce6751..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/ConcurrencyMode.php +++ /dev/null @@ -1,78 +0,0 @@ -google.firestore.admin.v1.Database.ConcurrencyMode - */ -class ConcurrencyMode -{ - /** - * Not used. - * - * Generated from protobuf enum CONCURRENCY_MODE_UNSPECIFIED = 0; - */ - const CONCURRENCY_MODE_UNSPECIFIED = 0; - /** - * Use optimistic concurrency control by default. This mode is available - * for Cloud Firestore databases. - * This is the default setting for Cloud Firestore Enterprise Edition - * databases. - * - * Generated from protobuf enum OPTIMISTIC = 1; - */ - const OPTIMISTIC = 1; - /** - * Use pessimistic concurrency control by default. This mode is available - * for Cloud Firestore databases. - * This is the default setting for Cloud Firestore Standard Edition - * databases. - * - * Generated from protobuf enum PESSIMISTIC = 2; - */ - const PESSIMISTIC = 2; - /** - * Use optimistic concurrency control with entity groups by default. - * This mode is enabled for some databases that were automatically upgraded - * from Cloud Datastore to Cloud Firestore with Datastore Mode. - * It is not recommended for any new databases, and not supported for - * Firestore Native databases. - * - * Generated from protobuf enum OPTIMISTIC_WITH_ENTITY_GROUPS = 3; - */ - const OPTIMISTIC_WITH_ENTITY_GROUPS = 3; - - private static $valueToName = [ - self::CONCURRENCY_MODE_UNSPECIFIED => 'CONCURRENCY_MODE_UNSPECIFIED', - self::OPTIMISTIC => 'OPTIMISTIC', - self::PESSIMISTIC => 'PESSIMISTIC', - self::OPTIMISTIC_WITH_ENTITY_GROUPS => 'OPTIMISTIC_WITH_ENTITY_GROUPS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DataAccessMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DataAccessMode.php deleted file mode 100644 index 1768bbfdf76f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DataAccessMode.php +++ /dev/null @@ -1,61 +0,0 @@ -google.firestore.admin.v1.Database.DataAccessMode - */ -class DataAccessMode -{ - /** - * Not Used. - * - * Generated from protobuf enum DATA_ACCESS_MODE_UNSPECIFIED = 0; - */ - const DATA_ACCESS_MODE_UNSPECIFIED = 0; - /** - * Accessing the database through the API is allowed. - * - * Generated from protobuf enum DATA_ACCESS_MODE_ENABLED = 1; - */ - const DATA_ACCESS_MODE_ENABLED = 1; - /** - * Accessing the database through the API is disallowed. - * - * Generated from protobuf enum DATA_ACCESS_MODE_DISABLED = 2; - */ - const DATA_ACCESS_MODE_DISABLED = 2; - - private static $valueToName = [ - self::DATA_ACCESS_MODE_UNSPECIFIED => 'DATA_ACCESS_MODE_UNSPECIFIED', - self::DATA_ACCESS_MODE_ENABLED => 'DATA_ACCESS_MODE_ENABLED', - self::DATA_ACCESS_MODE_DISABLED => 'DATA_ACCESS_MODE_DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseEdition.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseEdition.php deleted file mode 100644 index 9102fcdc721b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseEdition.php +++ /dev/null @@ -1,62 +0,0 @@ -google.firestore.admin.v1.Database.DatabaseEdition - */ -class DatabaseEdition -{ - /** - * Not used. - * - * Generated from protobuf enum DATABASE_EDITION_UNSPECIFIED = 0; - */ - const DATABASE_EDITION_UNSPECIFIED = 0; - /** - * Standard edition. - * This is the default setting if not specified. - * - * Generated from protobuf enum STANDARD = 1; - */ - const STANDARD = 1; - /** - * Enterprise edition. - * - * Generated from protobuf enum ENTERPRISE = 2; - */ - const ENTERPRISE = 2; - - private static $valueToName = [ - self::DATABASE_EDITION_UNSPECIFIED => 'DATABASE_EDITION_UNSPECIFIED', - self::STANDARD => 'STANDARD', - self::ENTERPRISE => 'ENTERPRISE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php deleted file mode 100644 index 930fddf71f6f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DatabaseType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.firestore.admin.v1.Database.DatabaseType - */ -class DatabaseType -{ - /** - * Not used. - * - * Generated from protobuf enum DATABASE_TYPE_UNSPECIFIED = 0; - */ - const DATABASE_TYPE_UNSPECIFIED = 0; - /** - * Firestore Native Mode - * - * Generated from protobuf enum FIRESTORE_NATIVE = 1; - */ - const FIRESTORE_NATIVE = 1; - /** - * Firestore in Datastore Mode. - * - * Generated from protobuf enum DATASTORE_MODE = 2; - */ - const DATASTORE_MODE = 2; - - private static $valueToName = [ - self::DATABASE_TYPE_UNSPECIFIED => 'DATABASE_TYPE_UNSPECIFIED', - self::FIRESTORE_NATIVE => 'FIRESTORE_NATIVE', - self::DATASTORE_MODE => 'DATASTORE_MODE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DeleteProtectionState.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DeleteProtectionState.php deleted file mode 100644 index 299230749a07..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/DeleteProtectionState.php +++ /dev/null @@ -1,61 +0,0 @@ -google.firestore.admin.v1.Database.DeleteProtectionState - */ -class DeleteProtectionState -{ - /** - * The default value. Delete protection type is not specified - * - * Generated from protobuf enum DELETE_PROTECTION_STATE_UNSPECIFIED = 0; - */ - const DELETE_PROTECTION_STATE_UNSPECIFIED = 0; - /** - * Delete protection is disabled - * - * Generated from protobuf enum DELETE_PROTECTION_DISABLED = 1; - */ - const DELETE_PROTECTION_DISABLED = 1; - /** - * Delete protection is enabled - * - * Generated from protobuf enum DELETE_PROTECTION_ENABLED = 2; - */ - const DELETE_PROTECTION_ENABLED = 2; - - private static $valueToName = [ - self::DELETE_PROTECTION_STATE_UNSPECIFIED => 'DELETE_PROTECTION_STATE_UNSPECIFIED', - self::DELETE_PROTECTION_DISABLED => 'DELETE_PROTECTION_DISABLED', - self::DELETE_PROTECTION_ENABLED => 'DELETE_PROTECTION_ENABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig.php deleted file mode 100644 index 510f8a24fa1d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig.php +++ /dev/null @@ -1,144 +0,0 @@ -google.firestore.admin.v1.Database.EncryptionConfig - */ -class EncryptionConfig extends \Google\Protobuf\Internal\Message -{ - protected $encryption_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions $google_default_encryption - * Use Google default encryption. - * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions $use_source_encryption - * The database will use the same encryption configuration as the source. - * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions $customer_managed_encryption - * Use Customer Managed Encryption Keys (CMEK) for encryption. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * Use Google default encryption. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; - * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions|null - */ - public function getGoogleDefaultEncryption() - { - return $this->readOneof(1); - } - - public function hasGoogleDefaultEncryption() - { - return $this->hasOneof(1); - } - - /** - * Use Google default encryption. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions google_default_encryption = 1; - * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions $var - * @return $this - */ - public function setGoogleDefaultEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\GoogleDefaultEncryptionOptions::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The database will use the same encryption configuration as the source. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; - * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions|null - */ - public function getUseSourceEncryption() - { - return $this->readOneof(2); - } - - public function hasUseSourceEncryption() - { - return $this->hasOneof(2); - } - - /** - * The database will use the same encryption configuration as the source. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions use_source_encryption = 2; - * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions $var - * @return $this - */ - public function setUseSourceEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\SourceEncryptionOptions::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Use Customer Managed Encryption Keys (CMEK) for encryption. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; - * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions|null - */ - public function getCustomerManagedEncryption() - { - return $this->readOneof(3); - } - - public function hasCustomerManagedEncryption() - { - return $this->hasOneof(3); - } - - /** - * Use Customer Managed Encryption Keys (CMEK) for encryption. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions customer_managed_encryption = 3; - * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions $var - * @return $this - */ - public function setCustomerManagedEncryption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig\CustomerManagedEncryptionOptions::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getEncryptionType() - { - return $this->whichOneof("encryption_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/CustomerManagedEncryptionOptions.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/CustomerManagedEncryptionOptions.php deleted file mode 100644 index 17074d4754ef..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/CustomerManagedEncryptionOptions.php +++ /dev/null @@ -1,96 +0,0 @@ -google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions - */ -class CustomerManagedEncryptionOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Only keys in the same location as the database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $kms_key_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $kms_key_name - * Required. Only keys in the same location as the database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * Required. Only keys in the same location as the database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * Required. Only keys in the same location as the database are allowed to - * be used for encryption. - * For Firestore's nam5 multi-region, this corresponds to Cloud KMS - * multi-region us. For Firestore's eur3 multi-region, this corresponds to - * Cloud KMS multi-region europe. See - * https://cloud.google.com/kms/docs/locations. - * The expected format is - * `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - * - * Generated from protobuf field string kms_key_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/GoogleDefaultEncryptionOptions.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/GoogleDefaultEncryptionOptions.php deleted file mode 100644 index 3c68de993d27..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/GoogleDefaultEncryptionOptions.php +++ /dev/null @@ -1,33 +0,0 @@ -google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions - */ -class GoogleDefaultEncryptionOptions extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/SourceEncryptionOptions.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/SourceEncryptionOptions.php deleted file mode 100644 index 245e680690bc..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/EncryptionConfig/SourceEncryptionOptions.php +++ /dev/null @@ -1,34 +0,0 @@ -google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions - */ -class SourceEncryptionOptions extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/PointInTimeRecoveryEnablement.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/PointInTimeRecoveryEnablement.php deleted file mode 100644 index fff9f69765f7..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/PointInTimeRecoveryEnablement.php +++ /dev/null @@ -1,67 +0,0 @@ -google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement - */ -class PointInTimeRecoveryEnablement -{ - /** - * Not used. - * - * Generated from protobuf enum POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED = 0; - */ - const POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED = 0; - /** - * Reads are supported on selected versions of the data from within the past - * 7 days: - * * Reads against any timestamp within the past hour - * * Reads against 1-minute snapshots beyond 1 hour and within 7 days - * `version_retention_period` and `earliest_version_time` can be - * used to determine the supported versions. - * - * Generated from protobuf enum POINT_IN_TIME_RECOVERY_ENABLED = 1; - */ - const POINT_IN_TIME_RECOVERY_ENABLED = 1; - /** - * Reads are supported on any version of the data from within the past 1 - * hour. - * - * Generated from protobuf enum POINT_IN_TIME_RECOVERY_DISABLED = 2; - */ - const POINT_IN_TIME_RECOVERY_DISABLED = 2; - - private static $valueToName = [ - self::POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED => 'POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED', - self::POINT_IN_TIME_RECOVERY_ENABLED => 'POINT_IN_TIME_RECOVERY_ENABLED', - self::POINT_IN_TIME_RECOVERY_DISABLED => 'POINT_IN_TIME_RECOVERY_DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo.php deleted file mode 100644 index 4677a5d1b31b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo.php +++ /dev/null @@ -1,120 +0,0 @@ -google.firestore.admin.v1.Database.SourceInfo - */ -class SourceInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The associated long-running operation. This field may not be set after - * the operation has completed. Format: - * `projects/{project}/databases/{database}/operations/{operation}`. - * - * Generated from protobuf field string operation = 3 [(.google.api.resource_reference) = { - */ - protected $operation = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource $backup - * If set, this database was restored from the specified backup (or a - * snapshot thereof). - * @type string $operation - * The associated long-running operation. This field may not be set after - * the operation has completed. Format: - * `projects/{project}/databases/{database}/operations/{operation}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * If set, this database was restored from the specified backup (or a - * snapshot thereof). - * - * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; - * @return \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource|null - */ - public function getBackup() - { - return $this->readOneof(1); - } - - public function hasBackup() - { - return $this->hasOneof(1); - } - - /** - * If set, this database was restored from the specified backup (or a - * snapshot thereof). - * - * Generated from protobuf field .google.firestore.admin.v1.Database.SourceInfo.BackupSource backup = 1; - * @param \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\SourceInfo\BackupSource::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The associated long-running operation. This field may not be set after - * the operation has completed. Format: - * `projects/{project}/databases/{database}/operations/{operation}`. - * - * Generated from protobuf field string operation = 3 [(.google.api.resource_reference) = { - * @return string - */ - public function getOperation() - { - return $this->operation; - } - - /** - * The associated long-running operation. This field may not be set after - * the operation has completed. Format: - * `projects/{project}/databases/{database}/operations/{operation}`. - * - * Generated from protobuf field string operation = 3 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setOperation($var) - { - GPBUtil::checkString($var, True); - $this->operation = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo/BackupSource.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo/BackupSource.php deleted file mode 100644 index 43ccc3a5167b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Database/SourceInfo/BackupSource.php +++ /dev/null @@ -1,75 +0,0 @@ -google.firestore.admin.v1.Database.SourceInfo.BackupSource - */ -class BackupSource extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the backup that was used to restore this - * database. Format: - * `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string backup = 1 [(.google.api.resource_reference) = { - */ - protected $backup = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $backup - * The resource name of the backup that was used to restore this - * database. Format: - * `projects/{project}/locations/{location}/backups/{backup}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Database::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the backup that was used to restore this - * database. Format: - * `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string backup = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getBackup() - { - return $this->backup; - } - - /** - * The resource name of the backup that was used to restore this - * database. Format: - * `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string backup = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkString($var, True); - $this->backup = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupRequest.php deleted file mode 100644 index 2495637aee5b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.firestore.admin.v1.DeleteBackupRequest - */ -class DeleteBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the backup to delete. - * format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the backup to delete. - * - * format is `projects/{project}/locations/{location}/backups/{backup}`. Please see - * {@see FirestoreAdminClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\DeleteBackupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the backup to delete. - * format is `projects/{project}/locations/{location}/backups/{backup}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the backup to delete. - * format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the backup to delete. - * format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupScheduleRequest.php deleted file mode 100644 index db965ce73d76..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteBackupScheduleRequest.php +++ /dev/null @@ -1,92 +0,0 @@ -google.firestore.admin.v1.DeleteBackupScheduleRequest - */ -class DeleteBackupScheduleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the backup schedule. - * - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * Please see {@see FirestoreAdminClient::backupScheduleName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\DeleteBackupScheduleRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseMetadata.php deleted file mode 100644 index a1573dc43b4c..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseMetadata.php +++ /dev/null @@ -1,33 +0,0 @@ -google.firestore.admin.v1.DeleteDatabaseMetadata - */ -class DeleteDatabaseMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseRequest.php deleted file mode 100644 index cc25c2af8af8..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteDatabaseRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -google.firestore.admin.v1.DeleteDatabaseRequest - */ -class DeleteDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The current etag of the Database. - * If an etag is provided and does not match the current etag of the database, - * deletion will be blocked and a FAILED_PRECONDITION error will be returned. - * - * Generated from protobuf field string etag = 3; - */ - protected $etag = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\DeleteDatabaseRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * @type string $etag - * The current etag of the Database. - * If an etag is provided and does not match the current etag of the database, - * deletion will be blocked and a FAILED_PRECONDITION error will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The current etag of the Database. - * If an etag is provided and does not match the current etag of the database, - * deletion will be blocked and a FAILED_PRECONDITION error will be returned. - * - * Generated from protobuf field string etag = 3; - * @return string - */ - public function getEtag() - { - return $this->etag; - } - - /** - * The current etag of the Database. - * If an etag is provided and does not match the current etag of the database, - * deletion will be blocked and a FAILED_PRECONDITION error will be returned. - * - * Generated from protobuf field string etag = 3; - * @param string $var - * @return $this - */ - public function setEtag($var) - { - GPBUtil::checkString($var, True); - $this->etag = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php deleted file mode 100644 index af55872cb361..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteIndexRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.DeleteIndexRequest - */ -class DeleteIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * Please see {@see FirestoreAdminClient::indexName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\DeleteIndexRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteUserCredsRequest.php deleted file mode 100644 index 5b8386eac930..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DeleteUserCredsRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.DeleteUserCredsRequest - */ -class DeleteUserCredsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\DeleteUserCredsRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DisableUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DisableUserCredsRequest.php deleted file mode 100644 index df8d6e29323a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/DisableUserCredsRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.DisableUserCredsRequest - */ -class DisableUserCredsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\DisableUserCredsRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/EnableUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/EnableUserCredsRequest.php deleted file mode 100644 index 15bfff96c98b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/EnableUserCredsRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.EnableUserCredsRequest - */ -class EnableUserCredsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\EnableUserCredsRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php deleted file mode 100644 index 9af4ec049423..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsMetadata.php +++ /dev/null @@ -1,403 +0,0 @@ -google.firestore.admin.v1.ExportDocumentsMetadata - */ -class ExportDocumentsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The state of the export operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - */ - protected $operation_state = 0; - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - */ - protected $progress_documents = null; - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - */ - protected $progress_bytes = null; - /** - * Which collection IDs are being exported. - * - * Generated from protobuf field repeated string collection_ids = 6; - */ - private $collection_ids; - /** - * Where the documents are being exported to. - * - * Generated from protobuf field string output_uri_prefix = 7; - */ - protected $output_uri_prefix = ''; - /** - * Which namespace IDs are being exported. - * - * Generated from protobuf field repeated string namespace_ids = 8; - */ - private $namespace_ids; - /** - * The timestamp that corresponds to the version of the database that is being - * exported. If unspecified, there are no guarantees about the consistency of - * the documents being exported. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 9; - */ - protected $snapshot_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation completed. Will be unset if operation still in - * progress. - * @type int $operation_state - * The state of the export operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents - * The progress, in documents, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes - * The progress, in bytes, of this operation. - * @type string[] $collection_ids - * Which collection IDs are being exported. - * @type string $output_uri_prefix - * Where the documents are being exported to. - * @type string[] $namespace_ids - * Which namespace IDs are being exported. - * @type \Google\Protobuf\Timestamp $snapshot_time - * The timestamp that corresponds to the version of the database that is being - * exported. If unspecified, there are no guarantees about the consistency of - * the documents being exported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The state of the export operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @return int - */ - public function getOperationState() - { - return $this->operation_state; - } - - /** - * The state of the export operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @param int $var - * @return $this - */ - public function setOperationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->operation_state = $var; - - return $this; - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressDocuments() - { - return $this->progress_documents; - } - - public function hasProgressDocuments() - { - return isset($this->progress_documents); - } - - public function clearProgressDocuments() - { - unset($this->progress_documents); - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_documents = $var; - - return $this; - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressBytes() - { - return $this->progress_bytes; - } - - public function hasProgressBytes() - { - return isset($this->progress_bytes); - } - - public function clearProgressBytes() - { - unset($this->progress_bytes); - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_bytes = $var; - - return $this; - } - - /** - * Which collection IDs are being exported. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @return RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * Which collection IDs are being exported. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @param string[] $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * Where the documents are being exported to. - * - * Generated from protobuf field string output_uri_prefix = 7; - * @return string - */ - public function getOutputUriPrefix() - { - return $this->output_uri_prefix; - } - - /** - * Where the documents are being exported to. - * - * Generated from protobuf field string output_uri_prefix = 7; - * @param string $var - * @return $this - */ - public function setOutputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->output_uri_prefix = $var; - - return $this; - } - - /** - * Which namespace IDs are being exported. - * - * Generated from protobuf field repeated string namespace_ids = 8; - * @return RepeatedField - */ - public function getNamespaceIds() - { - return $this->namespace_ids; - } - - /** - * Which namespace IDs are being exported. - * - * Generated from protobuf field repeated string namespace_ids = 8; - * @param string[] $var - * @return $this - */ - public function setNamespaceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_ids = $arr; - - return $this; - } - - /** - * The timestamp that corresponds to the version of the database that is being - * exported. If unspecified, there are no guarantees about the consistency of - * the documents being exported. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 9; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSnapshotTime() - { - return $this->snapshot_time; - } - - public function hasSnapshotTime() - { - return isset($this->snapshot_time); - } - - public function clearSnapshotTime() - { - unset($this->snapshot_time); - } - - /** - * The timestamp that corresponds to the version of the database that is being - * exported. If unspecified, there are no guarantees about the consistency of - * the documents being exported. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 9; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSnapshotTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->snapshot_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php deleted file mode 100644 index eb91d63fb295..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsRequest.php +++ /dev/null @@ -1,305 +0,0 @@ -google.firestore.admin.v1.ExportDocumentsRequest - */ -class ExportDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * IDs of the collection groups to export. Unspecified means all - * collection groups. Each collection group in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2; - */ - private $collection_ids; - /** - * The output URI. Currently only supports Google Cloud Storage URIs of the - * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - * Google Cloud Storage namespace path. When - * choosing a name, be sure to consider Google Cloud Storage naming - * guidelines: https://cloud.google.com/storage/docs/naming. - * If the URI is a bucket (without a namespace path), a prefix will be - * generated based on the start time. - * - * Generated from protobuf field string output_uri_prefix = 3; - */ - protected $output_uri_prefix = ''; - /** - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 4; - */ - private $namespace_ids; - /** - * The timestamp that corresponds to the version of the database to be - * exported. The timestamp must be in the past, rounded to the minute and not - * older than - * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. - * If specified, then the exported documents will represent a consistent view - * of the database at the provided time. Otherwise, there are no guarantees - * about the consistency of the exported documents. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 5; - */ - protected $snapshot_time = null; - - /** - * @param string $name Required. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. Please see - * {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ExportDocumentsRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * @type string[] $collection_ids - * IDs of the collection groups to export. Unspecified means all - * collection groups. Each collection group in this list must be unique. - * @type string $output_uri_prefix - * The output URI. Currently only supports Google Cloud Storage URIs of the - * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - * Google Cloud Storage namespace path. When - * choosing a name, be sure to consider Google Cloud Storage naming - * guidelines: https://cloud.google.com/storage/docs/naming. - * If the URI is a bucket (without a namespace path), a prefix will be - * generated based on the start time. - * @type string[] $namespace_ids - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * @type \Google\Protobuf\Timestamp $snapshot_time - * The timestamp that corresponds to the version of the database to be - * exported. The timestamp must be in the past, rounded to the minute and not - * older than - * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. - * If specified, then the exported documents will represent a consistent view - * of the database at the provided time. Otherwise, there are no guarantees - * about the consistency of the exported documents. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Database to export. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * IDs of the collection groups to export. Unspecified means all - * collection groups. Each collection group in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2; - * @return RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * IDs of the collection groups to export. Unspecified means all - * collection groups. Each collection group in this list must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2; - * @param string[] $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * The output URI. Currently only supports Google Cloud Storage URIs of the - * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - * Google Cloud Storage namespace path. When - * choosing a name, be sure to consider Google Cloud Storage naming - * guidelines: https://cloud.google.com/storage/docs/naming. - * If the URI is a bucket (without a namespace path), a prefix will be - * generated based on the start time. - * - * Generated from protobuf field string output_uri_prefix = 3; - * @return string - */ - public function getOutputUriPrefix() - { - return $this->output_uri_prefix; - } - - /** - * The output URI. Currently only supports Google Cloud Storage URIs of the - * form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - * of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - * Google Cloud Storage namespace path. When - * choosing a name, be sure to consider Google Cloud Storage naming - * guidelines: https://cloud.google.com/storage/docs/naming. - * If the URI is a bucket (without a namespace path), a prefix will be - * generated based on the start time. - * - * Generated from protobuf field string output_uri_prefix = 3; - * @param string $var - * @return $this - */ - public function setOutputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->output_uri_prefix = $var; - - return $this; - } - - /** - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 4; - * @return RepeatedField - */ - public function getNamespaceIds() - { - return $this->namespace_ids; - } - - /** - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 4; - * @param string[] $var - * @return $this - */ - public function setNamespaceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_ids = $arr; - - return $this; - } - - /** - * The timestamp that corresponds to the version of the database to be - * exported. The timestamp must be in the past, rounded to the minute and not - * older than - * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. - * If specified, then the exported documents will represent a consistent view - * of the database at the provided time. Otherwise, there are no guarantees - * about the consistency of the exported documents. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSnapshotTime() - { - return $this->snapshot_time; - } - - public function hasSnapshotTime() - { - return isset($this->snapshot_time); - } - - public function clearSnapshotTime() - { - unset($this->snapshot_time); - } - - /** - * The timestamp that corresponds to the version of the database to be - * exported. The timestamp must be in the past, rounded to the minute and not - * older than - * [earliestVersionTime][google.firestore.admin.v1.Database.earliest_version_time]. - * If specified, then the exported documents will represent a consistent view - * of the database at the provided time. Otherwise, there are no guarantees - * about the consistency of the exported documents. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSnapshotTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->snapshot_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php deleted file mode 100644 index 63aac67f8b8a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ExportDocumentsResponse.php +++ /dev/null @@ -1,76 +0,0 @@ -google.firestore.admin.v1.ExportDocumentsResponse - */ -class ExportDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Location of the output files. This can be used to begin an import - * into Cloud Firestore (this project or another project) after the operation - * completes successfully. - * - * Generated from protobuf field string output_uri_prefix = 1; - */ - protected $output_uri_prefix = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $output_uri_prefix - * Location of the output files. This can be used to begin an import - * into Cloud Firestore (this project or another project) after the operation - * completes successfully. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * Location of the output files. This can be used to begin an import - * into Cloud Firestore (this project or another project) after the operation - * completes successfully. - * - * Generated from protobuf field string output_uri_prefix = 1; - * @return string - */ - public function getOutputUriPrefix() - { - return $this->output_uri_prefix; - } - - /** - * Location of the output files. This can be used to begin an import - * into Cloud Firestore (this project or another project) after the operation - * completes successfully. - * - * Generated from protobuf field string output_uri_prefix = 1; - * @param string $var - * @return $this - */ - public function setOutputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->output_uri_prefix = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php deleted file mode 100644 index 28645d2447cf..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field.php +++ /dev/null @@ -1,253 +0,0 @@ -google.firestore.admin.v1.Field - */ -class Field extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A field name of the form: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * A field path can be a simple field name, e.g. `address` or a path to fields - * within `map_value` , e.g. `address.city`, - * or a special field path. The only valid special field is `*`, which - * represents any field. - * Field paths can be quoted using `` ` `` (backtick). The only character that - * must be escaped within a quoted field path is the backtick character - * itself, escaped using a backslash. Special characters in field paths that - * must be quoted include: `*`, `.`, - * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. - * Examples: - * `` `address.city` `` represents a field named `address.city`, not the map - * key `city` in the field `address`. `` `*` `` represents a field named `*`, - * not any field. - * A special `Field` contains the default indexing settings for all fields. - * This field's resource name is: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` - * Indexes defined on this `Field` will be applied to all fields which do not - * have their own `Field` index configuration. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * The index configuration for this field. If unset, field indexing will - * revert to the configuration defined by the `ancestor_field`. To - * explicitly remove all indexes for this field, specify an index config - * with an empty list of indexes. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; - */ - protected $index_config = null; - /** - * The TTL configuration for this `Field`. - * Setting or unsetting this will enable or disable the TTL for - * documents that have this `Field`. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; - */ - protected $ttl_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A field name of the form: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * A field path can be a simple field name, e.g. `address` or a path to fields - * within `map_value` , e.g. `address.city`, - * or a special field path. The only valid special field is `*`, which - * represents any field. - * Field paths can be quoted using `` ` `` (backtick). The only character that - * must be escaped within a quoted field path is the backtick character - * itself, escaped using a backslash. Special characters in field paths that - * must be quoted include: `*`, `.`, - * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. - * Examples: - * `` `address.city` `` represents a field named `address.city`, not the map - * key `city` in the field `address`. `` `*` `` represents a field named `*`, - * not any field. - * A special `Field` contains the default indexing settings for all fields. - * This field's resource name is: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` - * Indexes defined on this `Field` will be applied to all fields which do not - * have their own `Field` index configuration. - * @type \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig $index_config - * The index configuration for this field. If unset, field indexing will - * revert to the configuration defined by the `ancestor_field`. To - * explicitly remove all indexes for this field, specify an index config - * with an empty list of indexes. - * @type \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig $ttl_config - * The TTL configuration for this `Field`. - * Setting or unsetting this will enable or disable the TTL for - * documents that have this `Field`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); - parent::__construct($data); - } - - /** - * Required. A field name of the form: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * A field path can be a simple field name, e.g. `address` or a path to fields - * within `map_value` , e.g. `address.city`, - * or a special field path. The only valid special field is `*`, which - * represents any field. - * Field paths can be quoted using `` ` `` (backtick). The only character that - * must be escaped within a quoted field path is the backtick character - * itself, escaped using a backslash. Special characters in field paths that - * must be quoted include: `*`, `.`, - * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. - * Examples: - * `` `address.city` `` represents a field named `address.city`, not the map - * key `city` in the field `address`. `` `*` `` represents a field named `*`, - * not any field. - * A special `Field` contains the default indexing settings for all fields. - * This field's resource name is: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` - * Indexes defined on this `Field` will be applied to all fields which do not - * have their own `Field` index configuration. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A field name of the form: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * A field path can be a simple field name, e.g. `address` or a path to fields - * within `map_value` , e.g. `address.city`, - * or a special field path. The only valid special field is `*`, which - * represents any field. - * Field paths can be quoted using `` ` `` (backtick). The only character that - * must be escaped within a quoted field path is the backtick character - * itself, escaped using a backslash. Special characters in field paths that - * must be quoted include: `*`, `.`, - * `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. - * Examples: - * `` `address.city` `` represents a field named `address.city`, not the map - * key `city` in the field `address`. `` `*` `` represents a field named `*`, - * not any field. - * A special `Field` contains the default indexing settings for all fields. - * This field's resource name is: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` - * Indexes defined on this `Field` will be applied to all fields which do not - * have their own `Field` index configuration. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The index configuration for this field. If unset, field indexing will - * revert to the configuration defined by the `ancestor_field`. To - * explicitly remove all indexes for this field, specify an index config - * with an empty list of indexes. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; - * @return \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig|null - */ - public function getIndexConfig() - { - return $this->index_config; - } - - public function hasIndexConfig() - { - return isset($this->index_config); - } - - public function clearIndexConfig() - { - unset($this->index_config); - } - - /** - * The index configuration for this field. If unset, field indexing will - * revert to the configuration defined by the `ancestor_field`. To - * explicitly remove all indexes for this field, specify an index config - * with an empty list of indexes. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.IndexConfig index_config = 2; - * @param \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig $var - * @return $this - */ - public function setIndexConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field\IndexConfig::class); - $this->index_config = $var; - - return $this; - } - - /** - * The TTL configuration for this `Field`. - * Setting or unsetting this will enable or disable the TTL for - * documents that have this `Field`. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; - * @return \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig|null - */ - public function getTtlConfig() - { - return $this->ttl_config; - } - - public function hasTtlConfig() - { - return isset($this->ttl_config); - } - - public function clearTtlConfig() - { - unset($this->ttl_config); - } - - /** - * The TTL configuration for this `Field`. - * Setting or unsetting this will enable or disable the TTL for - * documents that have this `Field`. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig ttl_config = 3; - * @param \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig $var - * @return $this - */ - public function setTtlConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig::class); - $this->ttl_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php deleted file mode 100644 index 7c74b5f4b7b5..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/IndexConfig.php +++ /dev/null @@ -1,205 +0,0 @@ -google.firestore.admin.v1.Field.IndexConfig - */ -class IndexConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The indexes supported for this field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - */ - private $indexes; - /** - * Output only. When true, the `Field`'s index configuration is set from the - * configuration specified by the `ancestor_field`. - * When false, the `Field`'s index configuration is defined explicitly. - * - * Generated from protobuf field bool uses_ancestor_config = 2; - */ - protected $uses_ancestor_config = false; - /** - * Output only. Specifies the resource name of the `Field` from which this - * field's index configuration is set (when `uses_ancestor_config` is true), - * or from which it *would* be set if this field had no index configuration - * (when `uses_ancestor_config` is false). - * - * Generated from protobuf field string ancestor_field = 3; - */ - protected $ancestor_field = ''; - /** - * Output only - * When true, the `Field`'s index configuration is in the process of being - * reverted. Once complete, the index config will transition to the same - * state as the field specified by `ancestor_field`, at which point - * `uses_ancestor_config` will be `true` and `reverting` will be `false`. - * - * Generated from protobuf field bool reverting = 4; - */ - protected $reverting = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Index[] $indexes - * The indexes supported for this field. - * @type bool $uses_ancestor_config - * Output only. When true, the `Field`'s index configuration is set from the - * configuration specified by the `ancestor_field`. - * When false, the `Field`'s index configuration is defined explicitly. - * @type string $ancestor_field - * Output only. Specifies the resource name of the `Field` from which this - * field's index configuration is set (when `uses_ancestor_config` is true), - * or from which it *would* be set if this field had no index configuration - * (when `uses_ancestor_config` is false). - * @type bool $reverting - * Output only - * When true, the `Field`'s index configuration is in the process of being - * reverted. Once complete, the index config will transition to the same - * state as the field specified by `ancestor_field`, at which point - * `uses_ancestor_config` will be `true` and `reverting` will be `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); - parent::__construct($data); - } - - /** - * The indexes supported for this field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Index> - */ - public function getIndexes() - { - return $this->indexes; - } - - /** - * The indexes supported for this field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - * @param \Google\Cloud\Firestore\Admin\V1\Index[] $var - * @return $this - */ - public function setIndexes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index::class); - $this->indexes = $arr; - - return $this; - } - - /** - * Output only. When true, the `Field`'s index configuration is set from the - * configuration specified by the `ancestor_field`. - * When false, the `Field`'s index configuration is defined explicitly. - * - * Generated from protobuf field bool uses_ancestor_config = 2; - * @return bool - */ - public function getUsesAncestorConfig() - { - return $this->uses_ancestor_config; - } - - /** - * Output only. When true, the `Field`'s index configuration is set from the - * configuration specified by the `ancestor_field`. - * When false, the `Field`'s index configuration is defined explicitly. - * - * Generated from protobuf field bool uses_ancestor_config = 2; - * @param bool $var - * @return $this - */ - public function setUsesAncestorConfig($var) - { - GPBUtil::checkBool($var); - $this->uses_ancestor_config = $var; - - return $this; - } - - /** - * Output only. Specifies the resource name of the `Field` from which this - * field's index configuration is set (when `uses_ancestor_config` is true), - * or from which it *would* be set if this field had no index configuration - * (when `uses_ancestor_config` is false). - * - * Generated from protobuf field string ancestor_field = 3; - * @return string - */ - public function getAncestorField() - { - return $this->ancestor_field; - } - - /** - * Output only. Specifies the resource name of the `Field` from which this - * field's index configuration is set (when `uses_ancestor_config` is true), - * or from which it *would* be set if this field had no index configuration - * (when `uses_ancestor_config` is false). - * - * Generated from protobuf field string ancestor_field = 3; - * @param string $var - * @return $this - */ - public function setAncestorField($var) - { - GPBUtil::checkString($var, True); - $this->ancestor_field = $var; - - return $this; - } - - /** - * Output only - * When true, the `Field`'s index configuration is in the process of being - * reverted. Once complete, the index config will transition to the same - * state as the field specified by `ancestor_field`, at which point - * `uses_ancestor_config` will be `true` and `reverting` will be `false`. - * - * Generated from protobuf field bool reverting = 4; - * @return bool - */ - public function getReverting() - { - return $this->reverting; - } - - /** - * Output only - * When true, the `Field`'s index configuration is in the process of being - * reverted. Once complete, the index config will transition to the same - * state as the field specified by `ancestor_field`, at which point - * `uses_ancestor_config` will be `true` and `reverting` will be `false`. - * - * Generated from protobuf field bool reverting = 4; - * @param bool $var - * @return $this - */ - public function setReverting($var) - { - GPBUtil::checkBool($var); - $this->reverting = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php deleted file mode 100644 index 664a2ae55edb..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig.php +++ /dev/null @@ -1,140 +0,0 @@ -google.firestore.admin.v1.Field.TtlConfig - */ -class TtlConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The state of the TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Optional. The offset, relative to the timestamp value from the - * TTL-enabled field, used to determine the document's expiration time. - * `expiration_offset.seconds` must be between 0 and 2,147,483,647 - * inclusive. Values more precise than seconds are rejected. - * If unset, defaults to 0, in which case the expiration time is the same - * as the timestamp value from the TTL-enabled field. - * - * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $expiration_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. The state of the TTL configuration. - * @type \Google\Protobuf\Duration $expiration_offset - * Optional. The offset, relative to the timestamp value from the - * TTL-enabled field, used to determine the document's expiration time. - * `expiration_offset.seconds` must be between 0 and 2,147,483,647 - * inclusive. Values more precise than seconds are rejected. - * If unset, defaults to 0, in which case the expiration time is the same - * as the timestamp value from the TTL-enabled field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Field::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The state of the TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.Field.TtlConfig.State state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Field\TtlConfig\State::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. The offset, relative to the timestamp value from the - * TTL-enabled field, used to determine the document's expiration time. - * `expiration_offset.seconds` must be between 0 and 2,147,483,647 - * inclusive. Values more precise than seconds are rejected. - * If unset, defaults to 0, in which case the expiration time is the same - * as the timestamp value from the TTL-enabled field. - * - * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getExpirationOffset() - { - return $this->expiration_offset; - } - - public function hasExpirationOffset() - { - return isset($this->expiration_offset); - } - - public function clearExpirationOffset() - { - unset($this->expiration_offset); - } - - /** - * Optional. The offset, relative to the timestamp value from the - * TTL-enabled field, used to determine the document's expiration time. - * `expiration_offset.seconds` must be between 0 and 2,147,483,647 - * inclusive. Values more precise than seconds are rejected. - * If unset, defaults to 0, in which case the expiration time is the same - * as the timestamp value from the TTL-enabled field. - * - * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setExpirationOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->expiration_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php deleted file mode 100644 index 3f5647cd9139..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Field/TtlConfig/State.php +++ /dev/null @@ -1,75 +0,0 @@ -google.firestore.admin.v1.Field.TtlConfig.State - */ -class State -{ - /** - * The state is unspecified or unknown. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The TTL is being applied. There is an active long-running operation to - * track the change. Newly written documents will have TTLs applied as - * requested. Requested TTLs on existing documents are still being - * processed. When TTLs on all existing documents have been processed, the - * state will move to 'ACTIVE'. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The TTL is active for all documents. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * The TTL configuration could not be enabled for all existing documents. - * Newly written documents will continue to have their TTL applied. - * The LRO returned when last attempting to enable TTL for this `Field` - * has failed, and may have more details. - * - * Generated from protobuf enum NEEDS_REPAIR = 3; - */ - const NEEDS_REPAIR = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::NEEDS_REPAIR => 'NEEDS_REPAIR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php deleted file mode 100644 index 8df053b4e432..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata.php +++ /dev/null @@ -1,373 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata - */ -class FieldOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The field resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * - * Generated from protobuf field string field = 3; - */ - protected $field = ''; - /** - * A list of - * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], - * which describe the intent of this operation. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; - */ - private $index_config_deltas; - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; - */ - protected $state = 0; - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; - */ - protected $progress_documents = null; - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; - */ - protected $progress_bytes = null; - /** - * Describes the deltas of TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; - */ - protected $ttl_config_delta = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation completed. Will be unset if operation still in - * progress. - * @type string $field - * The field resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * @type \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta[] $index_config_deltas - * A list of - * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], - * which describe the intent of this operation. - * @type int $state - * The state of the operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents - * The progress, in documents, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes - * The progress, in bytes, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta $ttl_config_delta - * Describes the deltas of TTL configuration. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The field resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * - * Generated from protobuf field string field = 3; - * @return string - */ - public function getField() - { - return $this->field; - } - - /** - * The field resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - * - * Generated from protobuf field string field = 3; - * @param string $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkString($var, True); - $this->field = $var; - - return $this; - } - - /** - * A list of - * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], - * which describe the intent of this operation. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; - * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta> - */ - public function getIndexConfigDeltas() - { - return $this->index_config_deltas; - } - - /** - * A list of - * [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], - * which describe the intent of this operation. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta index_config_deltas = 4; - * @param \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta[] $var - * @return $this - */ - public function setIndexConfigDeltas($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta::class); - $this->index_config_deltas = $arr; - - return $this; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 5; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressDocuments() - { - return $this->progress_documents; - } - - public function hasProgressDocuments() - { - return isset($this->progress_documents); - } - - public function clearProgressDocuments() - { - unset($this->progress_documents); - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 6; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_documents = $var; - - return $this; - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressBytes() - { - return $this->progress_bytes; - } - - public function hasProgressBytes() - { - return isset($this->progress_bytes); - } - - public function clearProgressBytes() - { - unset($this->progress_bytes); - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 7; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_bytes = $var; - - return $this; - } - - /** - * Describes the deltas of TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; - * @return \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta|null - */ - public function getTtlConfigDelta() - { - return $this->ttl_config_delta; - } - - public function hasTtlConfigDelta() - { - return isset($this->ttl_config_delta); - } - - public function clearTtlConfigDelta() - { - unset($this->ttl_config_delta); - } - - /** - * Describes the deltas of TTL configuration. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta ttl_config_delta = 8; - * @param \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta $var - * @return $this - */ - public function setTtlConfigDelta($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta::class); - $this->ttl_config_delta = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php deleted file mode 100644 index 212f34a5b90c..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta.php +++ /dev/null @@ -1,111 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta - */ -class IndexConfigDelta extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies how the index is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; - */ - protected $change_type = 0; - /** - * The index being changed. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; - */ - protected $index = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $change_type - * Specifies how the index is changing. - * @type \Google\Cloud\Firestore\Admin\V1\Index $index - * The index being changed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * Specifies how the index is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; - * @return int - */ - public function getChangeType() - { - return $this->change_type; - } - - /** - * Specifies how the index is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType change_type = 1; - * @param int $var - * @return $this - */ - public function setChangeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\IndexConfigDelta\ChangeType::class); - $this->change_type = $var; - - return $this; - } - - /** - * The index being changed. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; - * @return \Google\Cloud\Firestore\Admin\V1\Index|null - */ - public function getIndex() - { - return $this->index; - } - - public function hasIndex() - { - return isset($this->index); - } - - public function clearIndex() - { - unset($this->index); - } - - /** - * The index being changed. - * - * Generated from protobuf field .google.firestore.admin.v1.Index index = 2; - * @param \Google\Cloud\Firestore\Admin\V1\Index $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index::class); - $this->index = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php deleted file mode 100644 index cf7058555cad..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/IndexConfigDelta/ChangeType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType - */ -class ChangeType -{ - /** - * The type of change is not specified or known. - * - * Generated from protobuf enum CHANGE_TYPE_UNSPECIFIED = 0; - */ - const CHANGE_TYPE_UNSPECIFIED = 0; - /** - * The single field index is being added. - * - * Generated from protobuf enum ADD = 1; - */ - const ADD = 1; - /** - * The single field index is being removed. - * - * Generated from protobuf enum REMOVE = 2; - */ - const REMOVE = 2; - - private static $valueToName = [ - self::CHANGE_TYPE_UNSPECIFIED => 'CHANGE_TYPE_UNSPECIFIED', - self::ADD => 'ADD', - self::REMOVE => 'REMOVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php deleted file mode 100644 index 7e4bcbf2e563..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta.php +++ /dev/null @@ -1,115 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta - */ -class TtlConfigDelta extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies how the TTL configuration is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; - */ - protected $change_type = 0; - /** - * The offset, relative to the timestamp value in the TTL-enabled field, - * used determine the document's expiration time. - * - * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3; - */ - protected $expiration_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $change_type - * Specifies how the TTL configuration is changing. - * @type \Google\Protobuf\Duration $expiration_offset - * The offset, relative to the timestamp value in the TTL-enabled field, - * used determine the document's expiration time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * Specifies how the TTL configuration is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; - * @return int - */ - public function getChangeType() - { - return $this->change_type; - } - - /** - * Specifies how the TTL configuration is changing. - * - * Generated from protobuf field .google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType change_type = 1; - * @param int $var - * @return $this - */ - public function setChangeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata\TtlConfigDelta\ChangeType::class); - $this->change_type = $var; - - return $this; - } - - /** - * The offset, relative to the timestamp value in the TTL-enabled field, - * used determine the document's expiration time. - * - * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getExpirationOffset() - { - return $this->expiration_offset; - } - - public function hasExpirationOffset() - { - return isset($this->expiration_offset); - } - - public function clearExpirationOffset() - { - unset($this->expiration_offset); - } - - /** - * The offset, relative to the timestamp value in the TTL-enabled field, - * used determine the document's expiration time. - * - * Generated from protobuf field .google.protobuf.Duration expiration_offset = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setExpirationOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->expiration_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php deleted file mode 100644 index ce9d1598e609..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/FieldOperationMetadata/TtlConfigDelta/ChangeType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType - */ -class ChangeType -{ - /** - * The type of change is not specified or known. - * - * Generated from protobuf enum CHANGE_TYPE_UNSPECIFIED = 0; - */ - const CHANGE_TYPE_UNSPECIFIED = 0; - /** - * The TTL config is being added. - * - * Generated from protobuf enum ADD = 1; - */ - const ADD = 1; - /** - * The TTL config is being removed. - * - * Generated from protobuf enum REMOVE = 2; - */ - const REMOVE = 2; - - private static $valueToName = [ - self::CHANGE_TYPE_UNSPECIFIED => 'CHANGE_TYPE_UNSPECIFIED', - self::ADD => 'ADD', - self::REMOVE => 'REMOVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupRequest.php deleted file mode 100644 index 509497b1c82f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.firestore.admin.v1.GetBackupRequest - */ -class GetBackupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the backup to fetch. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the backup to fetch. - * - * Format is `projects/{project}/locations/{location}/backups/{backup}`. Please see - * {@see FirestoreAdminClient::backupName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\GetBackupRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the backup to fetch. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the backup to fetch. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the backup to fetch. - * Format is `projects/{project}/locations/{location}/backups/{backup}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupScheduleRequest.php deleted file mode 100644 index efb9342983af..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetBackupScheduleRequest.php +++ /dev/null @@ -1,93 +0,0 @@ -google.firestore.admin.v1.GetBackupScheduleRequest - */ -class GetBackupScheduleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the backup schedule. - * - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * Please see {@see FirestoreAdminClient::backupScheduleName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\GetBackupScheduleRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the backup schedule. - * Format - * `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php deleted file mode 100644 index de4fafa9bb43..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetDatabaseRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.GetDatabaseRequest - */ -class GetDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\GetDatabaseRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php deleted file mode 100644 index 98a81de0b9cc..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetFieldRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.GetFieldRequest - */ -class GetFieldRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` - * Please see {@see FirestoreAdminClient::fieldName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\GetFieldRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php deleted file mode 100644 index 832f881b9b21..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetIndexRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.GetIndexRequest - */ -class GetIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * Please see {@see FirestoreAdminClient::indexName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\GetIndexRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetUserCredsRequest.php deleted file mode 100644 index 4c672c6b75f3..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/GetUserCredsRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.GetUserCredsRequest - */ -class GetUserCredsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\GetUserCredsRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php deleted file mode 100644 index e6ce541ffbed..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsMetadata.php +++ /dev/null @@ -1,351 +0,0 @@ -google.firestore.admin.v1.ImportDocumentsMetadata - */ -class ImportDocumentsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The state of the import operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - */ - protected $operation_state = 0; - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - */ - protected $progress_documents = null; - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - */ - protected $progress_bytes = null; - /** - * Which collection IDs are being imported. - * - * Generated from protobuf field repeated string collection_ids = 6; - */ - private $collection_ids; - /** - * The location of the documents being imported. - * - * Generated from protobuf field string input_uri_prefix = 7; - */ - protected $input_uri_prefix = ''; - /** - * Which namespace IDs are being imported. - * - * Generated from protobuf field repeated string namespace_ids = 8; - */ - private $namespace_ids; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation completed. Will be unset if operation still in - * progress. - * @type int $operation_state - * The state of the import operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents - * The progress, in documents, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes - * The progress, in bytes, of this operation. - * @type string[] $collection_ids - * Which collection IDs are being imported. - * @type string $input_uri_prefix - * The location of the documents being imported. - * @type string[] $namespace_ids - * Which namespace IDs are being imported. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The state of the import operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @return int - */ - public function getOperationState() - { - return $this->operation_state; - } - - /** - * The state of the import operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @param int $var - * @return $this - */ - public function setOperationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->operation_state = $var; - - return $this; - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressDocuments() - { - return $this->progress_documents; - } - - public function hasProgressDocuments() - { - return isset($this->progress_documents); - } - - public function clearProgressDocuments() - { - unset($this->progress_documents); - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 4; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_documents = $var; - - return $this; - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressBytes() - { - return $this->progress_bytes; - } - - public function hasProgressBytes() - { - return isset($this->progress_bytes); - } - - public function clearProgressBytes() - { - unset($this->progress_bytes); - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 5; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_bytes = $var; - - return $this; - } - - /** - * Which collection IDs are being imported. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @return RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * Which collection IDs are being imported. - * - * Generated from protobuf field repeated string collection_ids = 6; - * @param string[] $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * The location of the documents being imported. - * - * Generated from protobuf field string input_uri_prefix = 7; - * @return string - */ - public function getInputUriPrefix() - { - return $this->input_uri_prefix; - } - - /** - * The location of the documents being imported. - * - * Generated from protobuf field string input_uri_prefix = 7; - * @param string $var - * @return $this - */ - public function setInputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->input_uri_prefix = $var; - - return $this; - } - - /** - * Which namespace IDs are being imported. - * - * Generated from protobuf field repeated string namespace_ids = 8; - * @return RepeatedField - */ - public function getNamespaceIds() - { - return $this->namespace_ids; - } - - /** - * Which namespace IDs are being imported. - * - * Generated from protobuf field repeated string namespace_ids = 8; - * @param string[] $var - * @return $this - */ - public function setNamespaceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php deleted file mode 100644 index e59bbc42fc7f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ImportDocumentsRequest.php +++ /dev/null @@ -1,229 +0,0 @@ -google.firestore.admin.v1.ImportDocumentsRequest - */ -class ImportDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * IDs of the collection groups to import. Unspecified means all collection - * groups that were included in the export. Each collection group in this list - * must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2; - */ - private $collection_ids; - /** - * Location of the exported files. - * This must match the output_uri_prefix of an ExportDocumentsResponse from - * an export that has completed successfully. - * See: - * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. - * - * Generated from protobuf field string input_uri_prefix = 3; - */ - protected $input_uri_prefix = ''; - /** - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 4; - */ - private $namespace_ids; - - /** - * @param string $name Required. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. Please see - * {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ImportDocumentsRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * @type string[] $collection_ids - * IDs of the collection groups to import. Unspecified means all collection - * groups that were included in the export. Each collection group in this list - * must be unique. - * @type string $input_uri_prefix - * Location of the exported files. - * This must match the output_uri_prefix of an ExportDocumentsResponse from - * an export that has completed successfully. - * See: - * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. - * @type string[] $namespace_ids - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Database to import into. Should be of the form: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * IDs of the collection groups to import. Unspecified means all collection - * groups that were included in the export. Each collection group in this list - * must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2; - * @return RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * IDs of the collection groups to import. Unspecified means all collection - * groups that were included in the export. Each collection group in this list - * must be unique. - * - * Generated from protobuf field repeated string collection_ids = 2; - * @param string[] $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * Location of the exported files. - * This must match the output_uri_prefix of an ExportDocumentsResponse from - * an export that has completed successfully. - * See: - * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. - * - * Generated from protobuf field string input_uri_prefix = 3; - * @return string - */ - public function getInputUriPrefix() - { - return $this->input_uri_prefix; - } - - /** - * Location of the exported files. - * This must match the output_uri_prefix of an ExportDocumentsResponse from - * an export that has completed successfully. - * See: - * [google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix][google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix]. - * - * Generated from protobuf field string input_uri_prefix = 3; - * @param string $var - * @return $this - */ - public function setInputUriPrefix($var) - { - GPBUtil::checkString($var, True); - $this->input_uri_prefix = $var; - - return $this; - } - - /** - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 4; - * @return RepeatedField - */ - public function getNamespaceIds() - { - return $this->namespace_ids; - } - - /** - * An empty list represents all namespaces. This is the preferred - * usage for databases that don't use namespaces. - * An empty string element represents the default namespace. This should be - * used if the database has data in non-default namespaces, but doesn't want - * to include them. Each namespace in this list must be unique. - * - * Generated from protobuf field repeated string namespace_ids = 4; - * @param string[] $var - * @return $this - */ - public function setNamespaceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->namespace_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php deleted file mode 100644 index ad324a132809..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index.php +++ /dev/null @@ -1,432 +0,0 @@ -google.firestore.admin.v1.Index - */ -class Index extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. A server defined name for this index. - * The form of this name for composite indexes will be: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` - * For single field indexes, this field will be empty. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified at - * query time, and that has the same collection ID. - * Indexes with a collection group query scope specified allow queries against - * all collections descended from a specific document, specified at query - * time, and that have the same collection ID as this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; - */ - protected $query_scope = 0; - /** - * The API scope supported by this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.ApiScope api_scope = 5; - */ - protected $api_scope = 0; - /** - * The fields supported by this index. - * For composite indexes, this requires a minimum of 2 and a maximum of 100 - * fields. The last field entry is always for the field path `__name__`. If, - * on creation, `__name__` was not specified as the last field, it will be - * added automatically with the same direction as that of the last field - * defined. If the final field in a composite index is not directional, the - * `__name__` will be ordered ASCENDING (unless explicitly specified). - * For single field indexes, this will always be exactly one entry with a - * field path equal to the field path of the associated field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; - */ - private $fields; - /** - * Output only. The serving state of the index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; - */ - protected $state = 0; - /** - * Immutable. The density configuration of the index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $density = 0; - /** - * Optional. Whether the index is multikey. By default, the index is not - * multikey. For non-multikey indexes, none of the paths in the index - * definition reach or traverse an array, except via an explicit array index. - * For multikey indexes, at most one of the paths in the index definition - * reach or traverse an array, except via an explicit array index. Violations - * will result in errors. - * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope. - * - * Generated from protobuf field bool multikey = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $multikey = false; - /** - * Optional. The number of shards for the index. - * - * Generated from protobuf field int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $shard_count = 0; - /** - * Optional. Whether it is an unique index. Unique index ensures all values - * for the indexed field(s) are unique across documents. - * - * Generated from protobuf field bool unique = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $unique = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. A server defined name for this index. - * The form of this name for composite indexes will be: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` - * For single field indexes, this field will be empty. - * @type int $query_scope - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified at - * query time, and that has the same collection ID. - * Indexes with a collection group query scope specified allow queries against - * all collections descended from a specific document, specified at query - * time, and that have the same collection ID as this index. - * @type int $api_scope - * The API scope supported by this index. - * @type \Google\Cloud\Firestore\Admin\V1\Index\IndexField[] $fields - * The fields supported by this index. - * For composite indexes, this requires a minimum of 2 and a maximum of 100 - * fields. The last field entry is always for the field path `__name__`. If, - * on creation, `__name__` was not specified as the last field, it will be - * added automatically with the same direction as that of the last field - * defined. If the final field in a composite index is not directional, the - * `__name__` will be ordered ASCENDING (unless explicitly specified). - * For single field indexes, this will always be exactly one entry with a - * field path equal to the field path of the associated field. - * @type int $state - * Output only. The serving state of the index. - * @type int $density - * Immutable. The density configuration of the index. - * @type bool $multikey - * Optional. Whether the index is multikey. By default, the index is not - * multikey. For non-multikey indexes, none of the paths in the index - * definition reach or traverse an array, except via an explicit array index. - * For multikey indexes, at most one of the paths in the index definition - * reach or traverse an array, except via an explicit array index. Violations - * will result in errors. - * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope. - * @type int $shard_count - * Optional. The number of shards for the index. - * @type bool $unique - * Optional. Whether it is an unique index. Unique index ensures all values - * for the indexed field(s) are unique across documents. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); - parent::__construct($data); - } - - /** - * Output only. A server defined name for this index. - * The form of this name for composite indexes will be: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` - * For single field indexes, this field will be empty. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. A server defined name for this index. - * The form of this name for composite indexes will be: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` - * For single field indexes, this field will be empty. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified at - * query time, and that has the same collection ID. - * Indexes with a collection group query scope specified allow queries against - * all collections descended from a specific document, specified at query - * time, and that have the same collection ID as this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; - * @return int - */ - public function getQueryScope() - { - return $this->query_scope; - } - - /** - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified at - * query time, and that has the same collection ID. - * Indexes with a collection group query scope specified allow queries against - * all collections descended from a specific document, specified at query - * time, and that have the same collection ID as this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.QueryScope query_scope = 2; - * @param int $var - * @return $this - */ - public function setQueryScope($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\QueryScope::class); - $this->query_scope = $var; - - return $this; - } - - /** - * The API scope supported by this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.ApiScope api_scope = 5; - * @return int - */ - public function getApiScope() - { - return $this->api_scope; - } - - /** - * The API scope supported by this index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.ApiScope api_scope = 5; - * @param int $var - * @return $this - */ - public function setApiScope($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\ApiScope::class); - $this->api_scope = $var; - - return $this; - } - - /** - * The fields supported by this index. - * For composite indexes, this requires a minimum of 2 and a maximum of 100 - * fields. The last field entry is always for the field path `__name__`. If, - * on creation, `__name__` was not specified as the last field, it will be - * added automatically with the same direction as that of the last field - * defined. If the final field in a composite index is not directional, the - * `__name__` will be ordered ASCENDING (unless explicitly specified). - * For single field indexes, this will always be exactly one entry with a - * field path equal to the field path of the associated field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; - * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Index\IndexField> - */ - public function getFields() - { - return $this->fields; - } - - /** - * The fields supported by this index. - * For composite indexes, this requires a minimum of 2 and a maximum of 100 - * fields. The last field entry is always for the field path `__name__`. If, - * on creation, `__name__` was not specified as the last field, it will be - * added automatically with the same direction as that of the last field - * defined. If the final field in a composite index is not directional, the - * `__name__` will be ordered ASCENDING (unless explicitly specified). - * For single field indexes, this will always be exactly one entry with a - * field path equal to the field path of the associated field. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index.IndexField fields = 3; - * @param \Google\Cloud\Firestore\Admin\V1\Index\IndexField[] $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index\IndexField::class); - $this->fields = $arr; - - return $this; - } - - /** - * Output only. The serving state of the index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The serving state of the index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.State state = 4; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\State::class); - $this->state = $var; - - return $this; - } - - /** - * Immutable. The density configuration of the index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getDensity() - { - return $this->density; - } - - /** - * Immutable. The density configuration of the index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.Density density = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setDensity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\Density::class); - $this->density = $var; - - return $this; - } - - /** - * Optional. Whether the index is multikey. By default, the index is not - * multikey. For non-multikey indexes, none of the paths in the index - * definition reach or traverse an array, except via an explicit array index. - * For multikey indexes, at most one of the paths in the index definition - * reach or traverse an array, except via an explicit array index. Violations - * will result in errors. - * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope. - * - * Generated from protobuf field bool multikey = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getMultikey() - { - return $this->multikey; - } - - /** - * Optional. Whether the index is multikey. By default, the index is not - * multikey. For non-multikey indexes, none of the paths in the index - * definition reach or traverse an array, except via an explicit array index. - * For multikey indexes, at most one of the paths in the index definition - * reach or traverse an array, except via an explicit array index. Violations - * will result in errors. - * Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope. - * - * Generated from protobuf field bool multikey = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setMultikey($var) - { - GPBUtil::checkBool($var); - $this->multikey = $var; - - return $this; - } - - /** - * Optional. The number of shards for the index. - * - * Generated from protobuf field int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getShardCount() - { - return $this->shard_count; - } - - /** - * Optional. The number of shards for the index. - * - * Generated from protobuf field int32 shard_count = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setShardCount($var) - { - GPBUtil::checkInt32($var); - $this->shard_count = $var; - - return $this; - } - - /** - * Optional. Whether it is an unique index. Unique index ensures all values - * for the indexed field(s) are unique across documents. - * - * Generated from protobuf field bool unique = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getUnique() - { - return $this->unique; - } - - /** - * Optional. Whether it is an unique index. Unique index ensures all values - * for the indexed field(s) are unique across documents. - * - * Generated from protobuf field bool unique = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setUnique($var) - { - GPBUtil::checkBool($var); - $this->unique = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/ApiScope.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/ApiScope.php deleted file mode 100644 index 82f955ef90e9..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/ApiScope.php +++ /dev/null @@ -1,63 +0,0 @@ -google.firestore.admin.v1.Index.ApiScope - */ -class ApiScope -{ - /** - * The index can only be used by the Firestore Native query API. - * This is the default. - * - * Generated from protobuf enum ANY_API = 0; - */ - const ANY_API = 0; - /** - * The index can only be used by the Firestore in Datastore Mode query API. - * - * Generated from protobuf enum DATASTORE_MODE_API = 1; - */ - const DATASTORE_MODE_API = 1; - /** - * The index can only be used by the MONGODB_COMPATIBLE_API. - * - * Generated from protobuf enum MONGODB_COMPATIBLE_API = 2; - */ - const MONGODB_COMPATIBLE_API = 2; - - private static $valueToName = [ - self::ANY_API => 'ANY_API', - self::DATASTORE_MODE_API => 'DATASTORE_MODE_API', - self::MONGODB_COMPATIBLE_API => 'MONGODB_COMPATIBLE_API', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/Density.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/Density.php deleted file mode 100644 index 1ceec9170909..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/Density.php +++ /dev/null @@ -1,109 +0,0 @@ -google.firestore.admin.v1.Index.Density - */ -class Density -{ - /** - * Unspecified. It will use database default setting. This value is input - * only. - * - * Generated from protobuf enum DENSITY_UNSPECIFIED = 0; - */ - const DENSITY_UNSPECIFIED = 0; - /** - * An index entry will only exist if ALL fields are present in the document. - * This is both the default and only allowed value for Standard Edition - * databases (for both Cloud Firestore `ANY_API` and Cloud Datastore - * `DATASTORE_MODE_API`). - * Take for example the following document: - * ``` - * { - * "__name__": "...", - * "a": 1, - * "b": 2, - * "c": 3 - * } - * ``` - * an index on `(a ASC, b ASC, c ASC, __name__ ASC)` will generate an index - * entry for this document since `a`, 'b', `c`, and `__name__` are all - * present but an index of `(a ASC, d ASC, __name__ ASC)` will not generate - * an index entry for this document since `d` is missing. - * This means that such indexes can only be used to serve a query when the - * query has either implicit or explicit requirements that all fields from - * the index are present. - * - * Generated from protobuf enum SPARSE_ALL = 1; - */ - const SPARSE_ALL = 1; - /** - * An index entry will exist if ANY field are present in the document. - * This is used as the definition of a sparse index for Enterprise Edition - * databases. - * Take for example the following document: - * ``` - * { - * "__name__": "...", - * "a": 1, - * "b": 2, - * "c": 3 - * } - * ``` - * an index on `(a ASC, d ASC)` will generate an index entry for this - * document since `a` is present, and will fill in an `unset` value for `d`. - * An index on `(d ASC, e ASC)` will not generate any index entry as neither - * `d` nor `e` are present. - * An index that contains `__name__` will generate an index entry for all - * documents since Firestore guarantees that all documents have a `__name__` - * field. - * - * Generated from protobuf enum SPARSE_ANY = 2; - */ - const SPARSE_ANY = 2; - /** - * An index entry will exist regardless of if the fields are present or not. - * This is the default density for an Enterprise Edition database. - * The index will store `unset` values for fields that are not present in - * the document. - * - * Generated from protobuf enum DENSE = 3; - */ - const DENSE = 3; - - private static $valueToName = [ - self::DENSITY_UNSPECIFIED => 'DENSITY_UNSPECIFIED', - self::SPARSE_ALL => 'SPARSE_ALL', - self::SPARSE_ANY => 'SPARSE_ANY', - self::DENSE => 'DENSE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php deleted file mode 100644 index 9eb85626fcba..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField.php +++ /dev/null @@ -1,191 +0,0 @@ -google.firestore.admin.v1.Index.IndexField - */ -class IndexField extends \Google\Protobuf\Internal\Message -{ - /** - * Can be __name__. - * For single field indexes, this must match the name of the field or may - * be omitted. - * - * Generated from protobuf field string field_path = 1; - */ - protected $field_path = ''; - protected $value_mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field_path - * Can be __name__. - * For single field indexes, this must match the name of the field or may - * be omitted. - * @type int $order - * Indicates that this field supports ordering by the specified order or - * comparing using =, !=, <, <=, >, >=. - * @type int $array_config - * Indicates that this field supports operations on `array_value`s. - * @type \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig $vector_config - * Indicates that this field supports nearest neighbor and distance - * operations on vector. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); - parent::__construct($data); - } - - /** - * Can be __name__. - * For single field indexes, this must match the name of the field or may - * be omitted. - * - * Generated from protobuf field string field_path = 1; - * @return string - */ - public function getFieldPath() - { - return $this->field_path; - } - - /** - * Can be __name__. - * For single field indexes, this must match the name of the field or may - * be omitted. - * - * Generated from protobuf field string field_path = 1; - * @param string $var - * @return $this - */ - public function setFieldPath($var) - { - GPBUtil::checkString($var, True); - $this->field_path = $var; - - return $this; - } - - /** - * Indicates that this field supports ordering by the specified order or - * comparing using =, !=, <, <=, >, >=. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.Order order = 2; - * @return int - */ - public function getOrder() - { - return $this->readOneof(2); - } - - public function hasOrder() - { - return $this->hasOneof(2); - } - - /** - * Indicates that this field supports ordering by the specified order or - * comparing using =, !=, <, <=, >, >=. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.Order order = 2; - * @param int $var - * @return $this - */ - public function setOrder($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\Order::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Indicates that this field supports operations on `array_value`s. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; - * @return int - */ - public function getArrayConfig() - { - return $this->readOneof(3); - } - - public function hasArrayConfig() - { - return $this->hasOneof(3); - } - - /** - * Indicates that this field supports operations on `array_value`s. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.ArrayConfig array_config = 3; - * @param int $var - * @return $this - */ - public function setArrayConfig($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\ArrayConfig::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Indicates that this field supports nearest neighbor and distance - * operations on vector. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4; - * @return \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig|null - */ - public function getVectorConfig() - { - return $this->readOneof(4); - } - - public function hasVectorConfig() - { - return $this->hasOneof(4); - } - - /** - * Indicates that this field supports nearest neighbor and distance - * operations on vector. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig vector_config = 4; - * @param \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig $var - * @return $this - */ - public function setVectorConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getValueMode() - { - return $this->whichOneof("value_mode"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php deleted file mode 100644 index e44e7c449bba..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/ArrayConfig.php +++ /dev/null @@ -1,54 +0,0 @@ -google.firestore.admin.v1.Index.IndexField.ArrayConfig - */ -class ArrayConfig -{ - /** - * The index does not support additional array queries. - * - * Generated from protobuf enum ARRAY_CONFIG_UNSPECIFIED = 0; - */ - const ARRAY_CONFIG_UNSPECIFIED = 0; - /** - * The index supports array containment queries. - * - * Generated from protobuf enum CONTAINS = 1; - */ - const CONTAINS = 1; - - private static $valueToName = [ - self::ARRAY_CONFIG_UNSPECIFIED => 'ARRAY_CONFIG_UNSPECIFIED', - self::CONTAINS => 'CONTAINS', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php deleted file mode 100644 index 6c7b3ab13bc3..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/Order.php +++ /dev/null @@ -1,61 +0,0 @@ -google.firestore.admin.v1.Index.IndexField.Order - */ -class Order -{ - /** - * The ordering is unspecified. Not a valid option. - * - * Generated from protobuf enum ORDER_UNSPECIFIED = 0; - */ - const ORDER_UNSPECIFIED = 0; - /** - * The field is ordered by ascending field value. - * - * Generated from protobuf enum ASCENDING = 1; - */ - const ASCENDING = 1; - /** - * The field is ordered by descending field value. - * - * Generated from protobuf enum DESCENDING = 2; - */ - const DESCENDING = 2; - - private static $valueToName = [ - self::ORDER_UNSPECIFIED => 'ORDER_UNSPECIFIED', - self::ASCENDING => 'ASCENDING', - self::DESCENDING => 'DESCENDING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig.php deleted file mode 100644 index f1cbd5ee0352..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig.php +++ /dev/null @@ -1,117 +0,0 @@ -google.firestore.admin.v1.Index.IndexField.VectorConfig - */ -class VectorConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The vector dimension this configuration applies to. - * The resulting index will only include vectors of this dimension, and - * can be used for vector search with the same dimension. - * - * Generated from protobuf field int32 dimension = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $dimension = 0; - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $dimension - * Required. The vector dimension this configuration applies to. - * The resulting index will only include vectors of this dimension, and - * can be used for vector search with the same dimension. - * @type \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex $flat - * Indicates the vector index is a flat index. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); - parent::__construct($data); - } - - /** - * Required. The vector dimension this configuration applies to. - * The resulting index will only include vectors of this dimension, and - * can be used for vector search with the same dimension. - * - * Generated from protobuf field int32 dimension = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getDimension() - { - return $this->dimension; - } - - /** - * Required. The vector dimension this configuration applies to. - * The resulting index will only include vectors of this dimension, and - * can be used for vector search with the same dimension. - * - * Generated from protobuf field int32 dimension = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setDimension($var) - { - GPBUtil::checkInt32($var); - $this->dimension = $var; - - return $this; - } - - /** - * Indicates the vector index is a flat index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex flat = 2; - * @return \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex|null - */ - public function getFlat() - { - return $this->readOneof(2); - } - - public function hasFlat() - { - return $this->hasOneof(2); - } - - /** - * Indicates the vector index is a flat index. - * - * Generated from protobuf field .google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex flat = 2; - * @param \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex $var - * @return $this - */ - public function setFlat($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Index\IndexField\VectorConfig\FlatIndex::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig/FlatIndex.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig/FlatIndex.php deleted file mode 100644 index 6247e505d63a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/IndexField/VectorConfig/FlatIndex.php +++ /dev/null @@ -1,34 +0,0 @@ -google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex - */ -class FlatIndex extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Index::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php deleted file mode 100644 index a2bee11d68a8..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/QueryScope.php +++ /dev/null @@ -1,74 +0,0 @@ -google.firestore.admin.v1.Index.QueryScope - */ -class QueryScope -{ - /** - * The query scope is unspecified. Not a valid option. - * - * Generated from protobuf enum QUERY_SCOPE_UNSPECIFIED = 0; - */ - const QUERY_SCOPE_UNSPECIFIED = 0; - /** - * Indexes with a collection query scope specified allow queries - * against a collection that is the child of a specific document, specified - * at query time, and that has the collection ID specified by the index. - * - * Generated from protobuf enum COLLECTION = 1; - */ - const COLLECTION = 1; - /** - * Indexes with a collection group query scope specified allow queries - * against all collections that has the collection ID specified by the - * index. - * - * Generated from protobuf enum COLLECTION_GROUP = 2; - */ - const COLLECTION_GROUP = 2; - /** - * Include all the collections's ancestor in the index. Only available for - * Datastore Mode databases. - * - * Generated from protobuf enum COLLECTION_RECURSIVE = 3; - */ - const COLLECTION_RECURSIVE = 3; - - private static $valueToName = [ - self::QUERY_SCOPE_UNSPECIFIED => 'QUERY_SCOPE_UNSPECIFIED', - self::COLLECTION => 'COLLECTION', - self::COLLECTION_GROUP => 'COLLECTION_GROUP', - self::COLLECTION_RECURSIVE => 'COLLECTION_RECURSIVE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php deleted file mode 100644 index bf31eec158a0..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Index/State.php +++ /dev/null @@ -1,83 +0,0 @@ -google.firestore.admin.v1.Index.State - */ -class State -{ - /** - * The state is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The index is being created. - * There is an active long-running operation for the index. - * The index is updated when writing a document. - * Some index data may exist. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * The index is ready to be used. - * The index is updated when writing a document. - * The index is fully populated from all stored documents it applies to. - * - * Generated from protobuf enum READY = 2; - */ - const READY = 2; - /** - * The index was being created, but something went wrong. - * There is no active long-running operation for the index, - * and the most recently finished long-running operation failed. - * The index is not updated when writing a document. - * Some index data may exist. - * Use the google.longrunning.Operations API to determine why the operation - * that last attempted to create this index failed, then re-create the - * index. - * - * Generated from protobuf enum NEEDS_REPAIR = 3; - */ - const NEEDS_REPAIR = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::READY => 'READY', - self::NEEDS_REPAIR => 'NEEDS_REPAIR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php deleted file mode 100644 index e9cec99074ea..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/IndexOperationMetadata.php +++ /dev/null @@ -1,287 +0,0 @@ -google.firestore.admin.v1.IndexOperationMetadata - */ -class IndexOperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The index resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string index = 3; - */ - protected $index = ''; - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; - */ - protected $state = 0; - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; - */ - protected $progress_documents = null; - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; - */ - protected $progress_bytes = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time this operation started. - * @type \Google\Protobuf\Timestamp $end_time - * The time this operation completed. Will be unset if operation still in - * progress. - * @type string $index - * The index resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * @type int $state - * The state of the operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_documents - * The progress, in documents, of this operation. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_bytes - * The progress, in bytes, of this operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time this operation started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time this operation completed. Will be unset if operation still in - * progress. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The index resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string index = 3; - * @return string - */ - public function getIndex() - { - return $this->index; - } - - /** - * The index resource that this operation is acting on. For example: - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - * - * Generated from protobuf field string index = 3; - * @param string $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkString($var, True); - $this->index = $var; - - return $this; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the operation. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState state = 4; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressDocuments() - { - return $this->progress_documents; - } - - public function hasProgressDocuments() - { - return isset($this->progress_documents); - } - - public function clearProgressDocuments() - { - unset($this->progress_documents); - } - - /** - * The progress, in documents, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_documents = 5; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_documents = $var; - - return $this; - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressBytes() - { - return $this->progress_bytes; - } - - public function hasProgressBytes() - { - return isset($this->progress_bytes); - } - - public function clearProgressBytes() - { - unset($this->progress_bytes); - } - - /** - * The progress, in bytes, of this operation. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_bytes = 6; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressBytes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesRequest.php deleted file mode 100644 index d05171b63611..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesRequest.php +++ /dev/null @@ -1,88 +0,0 @@ -google.firestore.admin.v1.ListBackupSchedulesRequest - */ -class ListBackupSchedulesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent database. - * Format is `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * @param string $parent Required. The parent database. - * - * Format is `projects/{project}/databases/{database}`. Please see - * {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ListBackupSchedulesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent database. - * Format is `projects/{project}/databases/{database}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent database. - * Format is `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent database. - * Format is `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesResponse.php deleted file mode 100644 index 230e34ceb900..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupSchedulesResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.firestore.admin.v1.ListBackupSchedulesResponse - */ -class ListBackupSchedulesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of all backup schedules. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.BackupSchedule backup_schedules = 1; - */ - private $backup_schedules; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\BackupSchedule[] $backup_schedules - * List of all backup schedules. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * List of all backup schedules. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.BackupSchedule backup_schedules = 1; - * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\BackupSchedule> - */ - public function getBackupSchedules() - { - return $this->backup_schedules; - } - - /** - * List of all backup schedules. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.BackupSchedule backup_schedules = 1; - * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule[] $var - * @return $this - */ - public function setBackupSchedules($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\BackupSchedule::class); - $this->backup_schedules = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsRequest.php deleted file mode 100644 index 6c6222670971..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsRequest.php +++ /dev/null @@ -1,169 +0,0 @@ -google.firestore.admin.v1.ListBackupsRequest - */ -class ListBackupsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The location to list backups from. - * Format is `projects/{project}/locations/{location}`. - * Use `{location} = '-'` to list backups from all locations for the given - * project. This allows listing backups from a single location or from all - * locations. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * An expression that filters the list of returned backups. - * A filter expression consists of a field name, a comparison operator, and a - * value for filtering. - * The value must be a string, a number, or a boolean. The comparison operator - * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - * Colon `:` is the contains operator. Filter rules are not case sensitive. - * The following fields in the [Backup][google.firestore.admin.v1.Backup] are - * eligible for filtering: - * * `database_uid` (supports `=` only) - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The location to list backups from. - * - * Format is `projects/{project}/locations/{location}`. - * Use `{location} = '-'` to list backups from all locations for the given - * project. This allows listing backups from a single location or from all - * locations. Please see - * {@see FirestoreAdminClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ListBackupsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The location to list backups from. - * Format is `projects/{project}/locations/{location}`. - * Use `{location} = '-'` to list backups from all locations for the given - * project. This allows listing backups from a single location or from all - * locations. - * @type string $filter - * An expression that filters the list of returned backups. - * A filter expression consists of a field name, a comparison operator, and a - * value for filtering. - * The value must be a string, a number, or a boolean. The comparison operator - * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - * Colon `:` is the contains operator. Filter rules are not case sensitive. - * The following fields in the [Backup][google.firestore.admin.v1.Backup] are - * eligible for filtering: - * * `database_uid` (supports `=` only) - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The location to list backups from. - * Format is `projects/{project}/locations/{location}`. - * Use `{location} = '-'` to list backups from all locations for the given - * project. This allows listing backups from a single location or from all - * locations. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The location to list backups from. - * Format is `projects/{project}/locations/{location}`. - * Use `{location} = '-'` to list backups from all locations for the given - * project. This allows listing backups from a single location or from all - * locations. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * An expression that filters the list of returned backups. - * A filter expression consists of a field name, a comparison operator, and a - * value for filtering. - * The value must be a string, a number, or a boolean. The comparison operator - * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - * Colon `:` is the contains operator. Filter rules are not case sensitive. - * The following fields in the [Backup][google.firestore.admin.v1.Backup] are - * eligible for filtering: - * * `database_uid` (supports `=` only) - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * An expression that filters the list of returned backups. - * A filter expression consists of a field name, a comparison operator, and a - * value for filtering. - * The value must be a string, a number, or a boolean. The comparison operator - * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - * Colon `:` is the contains operator. Filter rules are not case sensitive. - * The following fields in the [Backup][google.firestore.admin.v1.Backup] are - * eligible for filtering: - * * `database_uid` (supports `=` only) - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsResponse.php deleted file mode 100644 index 8b2b6447cb77..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListBackupsResponse.php +++ /dev/null @@ -1,118 +0,0 @@ -google.firestore.admin.v1.ListBackupsResponse - */ -class ListBackupsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of all backups for the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Backup backups = 1; - */ - private $backups; - /** - * List of locations that existing backups were not able to be fetched from. - * Instead of failing the entire requests when a single location is - * unreachable, this response returns a partial result set and list of - * locations unable to be reached here. The request can be retried against a - * single location to get a concrete error. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Backup[] $backups - * List of all backups for the project. - * @type string[] $unreachable - * List of locations that existing backups were not able to be fetched from. - * Instead of failing the entire requests when a single location is - * unreachable, this response returns a partial result set and list of - * locations unable to be reached here. The request can be retried against a - * single location to get a concrete error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * List of all backups for the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Backup backups = 1; - * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Backup> - */ - public function getBackups() - { - return $this->backups; - } - - /** - * List of all backups for the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Backup backups = 1; - * @param \Google\Cloud\Firestore\Admin\V1\Backup[] $var - * @return $this - */ - public function setBackups($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Backup::class); - $this->backups = $arr; - - return $this; - } - - /** - * List of locations that existing backups were not able to be fetched from. - * Instead of failing the entire requests when a single location is - * unreachable, this response returns a partial result set and list of - * locations unable to be reached here. The request can be retried against a - * single location to get a concrete error. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * List of locations that existing backups were not able to be fetched from. - * Instead of failing the entire requests when a single location is - * unreachable, this response returns a partial result set and list of - * locations unable to be reached here. The request can be retried against a - * single location to get a concrete error. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php deleted file mode 100644 index 8476d8052464..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.firestore.admin.v1.ListDatabasesRequest - */ -class ListDatabasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * If true, also returns deleted resources. - * - * Generated from protobuf field bool show_deleted = 4; - */ - protected $show_deleted = false; - - /** - * @param string $parent Required. A parent name of the form - * `projects/{project_id}` - * Please see {@see FirestoreAdminClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ListDatabasesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. A parent name of the form - * `projects/{project_id}` - * @type bool $show_deleted - * If true, also returns deleted resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. A parent name of the form - * `projects/{project_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * If true, also returns deleted resources. - * - * Generated from protobuf field bool show_deleted = 4; - * @return bool - */ - public function getShowDeleted() - { - return $this->show_deleted; - } - - /** - * If true, also returns deleted resources. - * - * Generated from protobuf field bool show_deleted = 4; - * @param bool $var - * @return $this - */ - public function setShowDeleted($var) - { - GPBUtil::checkBool($var); - $this->show_deleted = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php deleted file mode 100644 index f3a9c42afa12..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListDatabasesResponse.php +++ /dev/null @@ -1,129 +0,0 @@ -google.firestore.admin.v1.ListDatabasesResponse - */ -class ListDatabasesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The databases in the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; - */ - private $databases; - /** - * In the event that data about individual databases cannot be listed they - * will be recorded here. - * An example entry might be: projects/some_project/locations/some_location - * This can happen if the Cloud Region that the Database resides in is - * currently unavailable. In this case we can't fetch all the details about - * the database. You may be able to get a more detailed error message - * (or possibly fetch the resource) by sending a 'Get' request for the - * resource or a 'List' request for the specific location. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Database[] $databases - * The databases in the project. - * @type string[] $unreachable - * In the event that data about individual databases cannot be listed they - * will be recorded here. - * An example entry might be: projects/some_project/locations/some_location - * This can happen if the Cloud Region that the Database resides in is - * currently unavailable. In this case we can't fetch all the details about - * the database. You may be able to get a more detailed error message - * (or possibly fetch the resource) by sending a 'Get' request for the - * resource or a 'List' request for the specific location. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The databases in the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; - * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Database> - */ - public function getDatabases() - { - return $this->databases; - } - - /** - * The databases in the project. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Database databases = 1; - * @param \Google\Cloud\Firestore\Admin\V1\Database[] $var - * @return $this - */ - public function setDatabases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Database::class); - $this->databases = $arr; - - return $this; - } - - /** - * In the event that data about individual databases cannot be listed they - * will be recorded here. - * An example entry might be: projects/some_project/locations/some_location - * This can happen if the Cloud Region that the Database resides in is - * currently unavailable. In this case we can't fetch all the details about - * the database. You may be able to get a more detailed error message - * (or possibly fetch the resource) by sending a 'Get' request for the - * resource or a 'List' request for the specific location. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * In the event that data about individual databases cannot be listed they - * will be recorded here. - * An example entry might be: projects/some_project/locations/some_location - * This can happen if the Cloud Region that the Database resides in is - * currently unavailable. In this case we can't fetch all the details about - * the database. You may be able to get a more detailed error message - * (or possibly fetch the resource) by sending a 'Get' request for the - * resource or a 'List' request for the specific location. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php deleted file mode 100644 index 8596394a0bb5..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.firestore.admin.v1.ListFieldsRequest - */ -class ListFieldsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The filter to apply to list results. Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue - * this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` or - * `ttlConfig:*`. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * The number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], - * that may be used to get the next page of results. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * Please see {@see FirestoreAdminClient::collectionGroupName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ListFieldsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * @type string $filter - * The filter to apply to list results. Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue - * this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` or - * `ttlConfig:*`. - * @type int $page_size - * The number of results to return. - * @type string $page_token - * A page token, returned from a previous call to - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], - * that may be used to get the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The filter to apply to list results. Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue - * this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` or - * `ttlConfig:*`. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter to apply to list results. Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue - * this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with a filter that includes `indexConfig.usesAncestorConfig:false` or - * `ttlConfig:*`. - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], - * that may be used to get the next page of results. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields], - * that may be used to get the next page of results. - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php deleted file mode 100644 index 7273ec784839..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListFieldsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.firestore.admin.v1.ListFieldsResponse - */ -class ListFieldsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The requested fields. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; - */ - private $fields; - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Field[] $fields - * The requested fields. - * @type string $next_page_token - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The requested fields. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; - * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Field> - */ - public function getFields() - { - return $this->fields; - } - - /** - * The requested fields. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Field fields = 1; - * @param \Google\Cloud\Firestore\Admin\V1\Field[] $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Field::class); - $this->fields = $arr; - - return $this; - } - - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php deleted file mode 100644 index cb2ca52982de..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesRequest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.firestore.admin.v1.ListIndexesRequest - */ -class ListIndexesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * The number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - */ - protected $page_size = 0; - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], - * that may be used to get the next page of results. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * Please see {@see FirestoreAdminClient::collectionGroupName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ListIndexesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * @type string $filter - * The filter to apply to list results. - * @type int $page_size - * The number of results to return. - * @type string $page_token - * A page token, returned from a previous call to - * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], - * that may be used to get the next page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. A parent name of the form - * `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter to apply to list results. - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The number of results to return. - * - * Generated from protobuf field int32 page_size = 3; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], - * that may be used to get the next page of results. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, returned from a previous call to - * [FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes], - * that may be used to get the next page of results. - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php deleted file mode 100644 index 2306044b0674..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListIndexesResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.firestore.admin.v1.ListIndexesResponse - */ -class ListIndexesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The requested indexes. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - */ - private $indexes; - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Index[] $indexes - * The requested indexes. - * @type string $next_page_token - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The requested indexes. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\Index> - */ - public function getIndexes() - { - return $this->indexes; - } - - /** - * The requested indexes. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.Index indexes = 1; - * @param \Google\Cloud\Firestore\Admin\V1\Index[] $var - * @return $this - */ - public function setIndexes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\Index::class); - $this->indexes = $arr; - - return $this; - } - - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A page token that may be used to request another page of results. If blank, - * this is the last page. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsRequest.php deleted file mode 100644 index c8d03d1b1d3b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.ListUserCredsRequest - */ -class ListUserCredsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A parent database name of the form - * `projects/{project_id}/databases/{database_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * @param string $parent Required. A parent database name of the form - * `projects/{project_id}/databases/{database_id}` - * Please see {@see FirestoreAdminClient::databaseName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ListUserCredsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. A parent database name of the form - * `projects/{project_id}/databases/{database_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A parent database name of the form - * `projects/{project_id}/databases/{database_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. A parent database name of the form - * `projects/{project_id}/databases/{database_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsResponse.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsResponse.php deleted file mode 100644 index af839e0ebc78..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ListUserCredsResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.firestore.admin.v1.ListUserCredsResponse - */ -class ListUserCredsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The user creds for the database. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.UserCreds user_creds = 1; - */ - private $user_creds; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\UserCreds[] $user_creds - * The user creds for the database. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * The user creds for the database. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.UserCreds user_creds = 1; - * @return RepeatedField<\Google\Cloud\Firestore\Admin\V1\UserCreds> - */ - public function getUserCreds() - { - return $this->user_creds; - } - - /** - * The user creds for the database. - * - * Generated from protobuf field repeated .google.firestore.admin.v1.UserCreds user_creds = 1; - * @param \Google\Cloud\Firestore\Admin\V1\UserCreds[] $var - * @return $this - */ - public function setUserCreds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\Admin\V1\UserCreds::class); - $this->user_creds = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php deleted file mode 100644 index 995a7845b650..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/LocationMetadata.php +++ /dev/null @@ -1,34 +0,0 @@ -google.firestore.admin.v1.LocationMetadata - */ -class LocationMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Location::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php deleted file mode 100644 index 73244df17d28..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/OperationState.php +++ /dev/null @@ -1,98 +0,0 @@ -google.firestore.admin.v1.OperationState - */ -class OperationState -{ - /** - * Unspecified. - * - * Generated from protobuf enum OPERATION_STATE_UNSPECIFIED = 0; - */ - const OPERATION_STATE_UNSPECIFIED = 0; - /** - * Request is being prepared for processing. - * - * Generated from protobuf enum INITIALIZING = 1; - */ - const INITIALIZING = 1; - /** - * Request is actively being processed. - * - * Generated from protobuf enum PROCESSING = 2; - */ - const PROCESSING = 2; - /** - * Request is in the process of being cancelled after user called - * google.longrunning.Operations.CancelOperation on the operation. - * - * Generated from protobuf enum CANCELLING = 3; - */ - const CANCELLING = 3; - /** - * Request has been processed and is in its finalization stage. - * - * Generated from protobuf enum FINALIZING = 4; - */ - const FINALIZING = 4; - /** - * Request has completed successfully. - * - * Generated from protobuf enum SUCCESSFUL = 5; - */ - const SUCCESSFUL = 5; - /** - * Request has finished being processed, but encountered an error. - * - * Generated from protobuf enum FAILED = 6; - */ - const FAILED = 6; - /** - * Request has finished being cancelled after user called - * google.longrunning.Operations.CancelOperation. - * - * Generated from protobuf enum CANCELLED = 7; - */ - const CANCELLED = 7; - - private static $valueToName = [ - self::OPERATION_STATE_UNSPECIFIED => 'OPERATION_STATE_UNSPECIFIED', - self::INITIALIZING => 'INITIALIZING', - self::PROCESSING => 'PROCESSING', - self::CANCELLING => 'CANCELLING', - self::FINALIZING => 'FINALIZING', - self::SUCCESSFUL => 'SUCCESSFUL', - self::FAILED => 'FAILED', - self::CANCELLED => 'CANCELLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/PitrSnapshot.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/PitrSnapshot.php deleted file mode 100644 index 1d3ed47beeef..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/PitrSnapshot.php +++ /dev/null @@ -1,153 +0,0 @@ -google.firestore.admin.v1.PitrSnapshot - */ -class PitrSnapshot extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the database that this was a snapshot of. Format: - * `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $database = ''; - /** - * Output only. Public UUID of the database the snapshot was associated with. - * - * Generated from protobuf field bytes database_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $database_uid = ''; - /** - * Required. Snapshot time of the database. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $snapshot_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The name of the database that this was a snapshot of. Format: - * `projects/{project}/databases/{database}`. - * @type string $database_uid - * Output only. Public UUID of the database the snapshot was associated with. - * @type \Google\Protobuf\Timestamp $snapshot_time - * Required. Snapshot time of the database. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Snapshot::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the database that this was a snapshot of. Format: - * `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The name of the database that this was a snapshot of. Format: - * `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * Output only. Public UUID of the database the snapshot was associated with. - * - * Generated from protobuf field bytes database_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDatabaseUid() - { - return $this->database_uid; - } - - /** - * Output only. Public UUID of the database the snapshot was associated with. - * - * Generated from protobuf field bytes database_uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDatabaseUid($var) - { - GPBUtil::checkString($var, False); - $this->database_uid = $var; - - return $this; - } - - /** - * Required. Snapshot time of the database. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSnapshotTime() - { - return $this->snapshot_time; - } - - public function hasSnapshotTime() - { - return isset($this->snapshot_time); - } - - public function clearSnapshotTime() - { - unset($this->snapshot_time); - } - - /** - * Required. Snapshot time of the database. - * - * Generated from protobuf field .google.protobuf.Timestamp snapshot_time = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSnapshotTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->snapshot_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php deleted file mode 100644 index f7c35b1de363..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/Progress.php +++ /dev/null @@ -1,103 +0,0 @@ -google.firestore.admin.v1.Progress - */ -class Progress extends \Google\Protobuf\Internal\Message -{ - /** - * The amount of work estimated. - * - * Generated from protobuf field int64 estimated_work = 1; - */ - protected $estimated_work = 0; - /** - * The amount of work completed. - * - * Generated from protobuf field int64 completed_work = 2; - */ - protected $completed_work = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $estimated_work - * The amount of work estimated. - * @type int|string $completed_work - * The amount of work completed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The amount of work estimated. - * - * Generated from protobuf field int64 estimated_work = 1; - * @return int|string - */ - public function getEstimatedWork() - { - return $this->estimated_work; - } - - /** - * The amount of work estimated. - * - * Generated from protobuf field int64 estimated_work = 1; - * @param int|string $var - * @return $this - */ - public function setEstimatedWork($var) - { - GPBUtil::checkInt64($var); - $this->estimated_work = $var; - - return $this; - } - - /** - * The amount of work completed. - * - * Generated from protobuf field int64 completed_work = 2; - * @return int|string - */ - public function getCompletedWork() - { - return $this->completed_work; - } - - /** - * The amount of work completed. - * - * Generated from protobuf field int64 completed_work = 2; - * @param int|string $var - * @return $this - */ - public function setCompletedWork($var) - { - GPBUtil::checkInt64($var); - $this->completed_work = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RealtimeUpdatesMode.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RealtimeUpdatesMode.php deleted file mode 100644 index a9a985996dba..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RealtimeUpdatesMode.php +++ /dev/null @@ -1,62 +0,0 @@ -google.firestore.admin.v1.RealtimeUpdatesMode - */ -class RealtimeUpdatesMode -{ - /** - * The Realtime Updates feature is not specified. - * - * Generated from protobuf enum REALTIME_UPDATES_MODE_UNSPECIFIED = 0; - */ - const REALTIME_UPDATES_MODE_UNSPECIFIED = 0; - /** - * The Realtime Updates feature is enabled by default. - * This could potentially degrade write performance for the database. - * - * Generated from protobuf enum REALTIME_UPDATES_MODE_ENABLED = 1; - */ - const REALTIME_UPDATES_MODE_ENABLED = 1; - /** - * The Realtime Updates feature is disabled by default. - * - * Generated from protobuf enum REALTIME_UPDATES_MODE_DISABLED = 2; - */ - const REALTIME_UPDATES_MODE_DISABLED = 2; - - private static $valueToName = [ - self::REALTIME_UPDATES_MODE_UNSPECIFIED => 'REALTIME_UPDATES_MODE_UNSPECIFIED', - self::REALTIME_UPDATES_MODE_ENABLED => 'REALTIME_UPDATES_MODE_ENABLED', - self::REALTIME_UPDATES_MODE_DISABLED => 'REALTIME_UPDATES_MODE_DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ResetUserPasswordRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ResetUserPasswordRequest.php deleted file mode 100644 index 191470b20c2f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/ResetUserPasswordRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.admin.v1.ResetUserPasswordRequest - */ -class ResetUserPasswordRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * Please see {@see FirestoreAdminClient::userCredsName()} for help formatting this field. - * - * @return \Google\Cloud\Firestore\Admin\V1\ResetUserPasswordRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A name of the form - * `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseMetadata.php deleted file mode 100644 index 836cf1956dca..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseMetadata.php +++ /dev/null @@ -1,268 +0,0 @@ -google.firestore.admin.v1.RestoreDatabaseMetadata - */ -class RestoreDatabaseMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The time the restore was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The time the restore finished, unset for ongoing restores. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * The operation state of the restore. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - */ - protected $operation_state = 0; - /** - * The name of the database being restored to. - * - * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { - */ - protected $database = ''; - /** - * The name of the backup restoring from. - * - * Generated from protobuf field string backup = 5 [(.google.api.resource_reference) = { - */ - protected $backup = ''; - /** - * How far along the restore is as an estimated percentage of remaining time. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 8; - */ - protected $progress_percentage = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The time the restore was started. - * @type \Google\Protobuf\Timestamp $end_time - * The time the restore finished, unset for ongoing restores. - * @type int $operation_state - * The operation state of the restore. - * @type string $database - * The name of the database being restored to. - * @type string $backup - * The name of the backup restoring from. - * @type \Google\Cloud\Firestore\Admin\V1\Progress $progress_percentage - * How far along the restore is as an estimated percentage of remaining time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Operation::initOnce(); - parent::__construct($data); - } - - /** - * The time the restore was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The time the restore was started. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The time the restore finished, unset for ongoing restores. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The time the restore finished, unset for ongoing restores. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * The operation state of the restore. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @return int - */ - public function getOperationState() - { - return $this->operation_state; - } - - /** - * The operation state of the restore. - * - * Generated from protobuf field .google.firestore.admin.v1.OperationState operation_state = 3; - * @param int $var - * @return $this - */ - public function setOperationState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\OperationState::class); - $this->operation_state = $var; - - return $this; - } - - /** - * The name of the database being restored to. - * - * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * The name of the database being restored to. - * - * Generated from protobuf field string database = 4 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The name of the backup restoring from. - * - * Generated from protobuf field string backup = 5 [(.google.api.resource_reference) = { - * @return string - */ - public function getBackup() - { - return $this->backup; - } - - /** - * The name of the backup restoring from. - * - * Generated from protobuf field string backup = 5 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkString($var, True); - $this->backup = $var; - - return $this; - } - - /** - * How far along the restore is as an estimated percentage of remaining time. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 8; - * @return \Google\Cloud\Firestore\Admin\V1\Progress|null - */ - public function getProgressPercentage() - { - return $this->progress_percentage; - } - - public function hasProgressPercentage() - { - return isset($this->progress_percentage); - } - - public function clearProgressPercentage() - { - unset($this->progress_percentage); - } - - /** - * How far along the restore is as an estimated percentage of remaining time. - * - * Generated from protobuf field .google.firestore.admin.v1.Progress progress_percentage = 8; - * @param \Google\Cloud\Firestore\Admin\V1\Progress $var - * @return $this - */ - public function setProgressPercentage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Progress::class); - $this->progress_percentage = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseRequest.php deleted file mode 100644 index 7c2236e7bd2d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/RestoreDatabaseRequest.php +++ /dev/null @@ -1,278 +0,0 @@ -google.firestore.admin.v1.RestoreDatabaseRequest - */ -class RestoreDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The project to restore the database in. Format is - * `projects/{project_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * - * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database_id = ''; - /** - * Required. Backup to restore from. Must be from the same project as the - * parent. - * The restored database will be created in the same location as the source - * backup. - * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` - * - * Generated from protobuf field string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $backup = ''; - /** - * Optional. Encryption configuration for the restored database. - * If this field is not specified, the restored database will use - * the same encryption configuration as the backup, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $encryption_config = null; - /** - * Optional. Immutable. Tags to be bound to the restored database. - * The tags should be provided in the format of - * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. - * - * Generated from protobuf field map tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - */ - private $tags; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The project to restore the database in. Format is - * `projects/{project_id}`. - * @type string $database_id - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * @type string $backup - * Required. Backup to restore from. Must be from the same project as the - * parent. - * The restored database will be created in the same location as the source - * backup. - * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` - * @type \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig $encryption_config - * Optional. Encryption configuration for the restored database. - * If this field is not specified, the restored database will use - * the same encryption configuration as the backup, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * @type array|\Google\Protobuf\Internal\MapField $tags - * Optional. Immutable. Tags to be bound to the restored database. - * The tags should be provided in the format of - * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The project to restore the database in. Format is - * `projects/{project_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The project to restore the database in. Format is - * `projects/{project_id}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * - * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabaseId() - { - return $this->database_id; - } - - /** - * Required. The ID to use for the database, which will become the final - * component of the database's resource name. This database ID must not be - * associated with an existing database. - * This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - * with first character a letter and the last a letter or a number. Must not - * be UUID-like /[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}/. - * "(default)" database ID is also valid if the database is Standard edition. - * - * Generated from protobuf field string database_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabaseId($var) - { - GPBUtil::checkString($var, True); - $this->database_id = $var; - - return $this; - } - - /** - * Required. Backup to restore from. Must be from the same project as the - * parent. - * The restored database will be created in the same location as the source - * backup. - * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` - * - * Generated from protobuf field string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getBackup() - { - return $this->backup; - } - - /** - * Required. Backup to restore from. Must be from the same project as the - * parent. - * The restored database will be created in the same location as the source - * backup. - * Format is: `projects/{project_id}/locations/{location}/backups/{backup}` - * - * Generated from protobuf field string backup = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setBackup($var) - { - GPBUtil::checkString($var, True); - $this->backup = $var; - - return $this; - } - - /** - * Optional. Encryption configuration for the restored database. - * If this field is not specified, the restored database will use - * the same encryption configuration as the backup, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig|null - */ - public function getEncryptionConfig() - { - return $this->encryption_config; - } - - public function hasEncryptionConfig() - { - return isset($this->encryption_config); - } - - public function clearEncryptionConfig() - { - unset($this->encryption_config); - } - - /** - * Optional. Encryption configuration for the restored database. - * If this field is not specified, the restored database will use - * the same encryption configuration as the backup, namely - * [use_source_encryption][google.firestore.admin.v1.Database.EncryptionConfig.use_source_encryption]. - * - * Generated from protobuf field .google.firestore.admin.v1.Database.EncryptionConfig encryption_config = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig $var - * @return $this - */ - public function setEncryptionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database\EncryptionConfig::class); - $this->encryption_config = $var; - - return $this; - } - - /** - * Optional. Immutable. Tags to be bound to the restored database. - * The tags should be provided in the format of - * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. - * - * Generated from protobuf field map tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getTags() - { - return $this->tags; - } - - /** - * Optional. Immutable. Tags to be bound to the restored database. - * The tags should be provided in the format of - * `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. - * - * Generated from protobuf field map tags = 10 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setTags($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->tags = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateBackupScheduleRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateBackupScheduleRequest.php deleted file mode 100644 index 9ef06f95585e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateBackupScheduleRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.firestore.admin.v1.UpdateBackupScheduleRequest - */ -class UpdateBackupScheduleRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The backup schedule to update. - * - * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $backup_schedule = null; - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule Required. The backup schedule to update. - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. - * - * @return \Google\Cloud\Firestore\Admin\V1\UpdateBackupScheduleRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Firestore\Admin\V1\BackupSchedule $backupSchedule, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setBackupSchedule($backupSchedule) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\BackupSchedule $backup_schedule - * Required. The backup schedule to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The backup schedule to update. - * - * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\BackupSchedule|null - */ - public function getBackupSchedule() - { - return $this->backup_schedule; - } - - public function hasBackupSchedule() - { - return isset($this->backup_schedule); - } - - public function clearBackupSchedule() - { - unset($this->backup_schedule); - } - - /** - * Required. The backup schedule to update. - * - * Generated from protobuf field .google.firestore.admin.v1.BackupSchedule backup_schedule = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\BackupSchedule $var - * @return $this - */ - public function setBackupSchedule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\BackupSchedule::class); - $this->backup_schedule = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php deleted file mode 100644 index 189e1d6c5a6c..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseMetadata.php +++ /dev/null @@ -1,33 +0,0 @@ -google.firestore.admin.v1.UpdateDatabaseMetadata - */ -class UpdateDatabaseMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php deleted file mode 100644 index 3d9cfcf3df23..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateDatabaseRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.firestore.admin.v1.UpdateDatabaseRequest - */ -class UpdateDatabaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database to update. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = null; - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Firestore\Admin\V1\Database $database Required. The database to update. - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. - * - * @return \Google\Cloud\Firestore\Admin\V1\UpdateDatabaseRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Firestore\Admin\V1\Database $database, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDatabase($database) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Database $database - * Required. The database to update. - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database to update. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\Database|null - */ - public function getDatabase() - { - return $this->database; - } - - public function hasDatabase() - { - return isset($this->database); - } - - public function clearDatabase() - { - unset($this->database); - } - - /** - * Required. The database to update. - * - * Generated from protobuf field .google.firestore.admin.v1.Database database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\Database $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Database::class); - $this->database = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php deleted file mode 100644 index 4c1e8af65c10..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UpdateFieldRequest.php +++ /dev/null @@ -1,139 +0,0 @@ -google.firestore.admin.v1.UpdateFieldRequest - */ -class UpdateFieldRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The field to be updated. - * - * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $field = null; - /** - * A mask, relative to the field. If specified, only configuration specified - * by this field_mask will be updated in the field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Firestore\Admin\V1\Field $field Required. The field to be updated. - * - * @return \Google\Cloud\Firestore\Admin\V1\UpdateFieldRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Firestore\Admin\V1\Field $field): self - { - return (new self()) - ->setField($field); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\Admin\V1\Field $field - * Required. The field to be updated. - * @type \Google\Protobuf\FieldMask $update_mask - * A mask, relative to the field. If specified, only configuration specified - * by this field_mask will be updated in the field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\FirestoreAdmin::initOnce(); - parent::__construct($data); - } - - /** - * Required. The field to be updated. - * - * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\Admin\V1\Field|null - */ - public function getField() - { - return $this->field; - } - - public function hasField() - { - return isset($this->field); - } - - public function clearField() - { - unset($this->field); - } - - /** - * Required. The field to be updated. - * - * Generated from protobuf field .google.firestore.admin.v1.Field field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\Admin\V1\Field $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\Field::class); - $this->field = $var; - - return $this; - } - - /** - * A mask, relative to the field. If specified, only configuration specified - * by this field_mask will be updated in the field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * A mask, relative to the field. If specified, only configuration specified - * by this field_mask will be updated in the field. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds.php deleted file mode 100644 index 4f57674f6424..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds.php +++ /dev/null @@ -1,281 +0,0 @@ -google.firestore.admin.v1.UserCreds - */ -class UserCreds extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the UserCreds. - * Format: - * `projects/{project}/databases/{database}/userCreds/{user_creds}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The time the user creds were created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the user creds were last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. Whether the user creds are enabled or disabled. Defaults to - * ENABLED on creation. - * - * Generated from protobuf field .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The plaintext server-generated password for the user creds. - * Only populated in responses for CreateUserCreds and ResetUserPassword. - * - * Generated from protobuf field string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $secure_password = ''; - protected $UserCredsIdentity; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the UserCreds. - * Format: - * `projects/{project}/databases/{database}/userCreds/{user_creds}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the user creds were created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time the user creds were last updated. - * @type int $state - * Output only. Whether the user creds are enabled or disabled. Defaults to - * ENABLED on creation. - * @type string $secure_password - * Output only. The plaintext server-generated password for the user creds. - * Only populated in responses for CreateUserCreds and ResetUserPassword. - * @type \Google\Cloud\Firestore\Admin\V1\UserCreds\ResourceIdentity $resource_identity - * Resource Identity descriptor. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\UserCreds::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the UserCreds. - * Format: - * `projects/{project}/databases/{database}/userCreds/{user_creds}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the UserCreds. - * Format: - * `projects/{project}/databases/{database}/userCreds/{user_creds}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The time the user creds were created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the user creds were created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the user creds were last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time the user creds were last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. Whether the user creds are enabled or disabled. Defaults to - * ENABLED on creation. - * - * Generated from protobuf field .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. Whether the user creds are enabled or disabled. Defaults to - * ENABLED on creation. - * - * Generated from protobuf field .google.firestore.admin.v1.UserCreds.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\Admin\V1\UserCreds\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The plaintext server-generated password for the user creds. - * Only populated in responses for CreateUserCreds and ResetUserPassword. - * - * Generated from protobuf field string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSecurePassword() - { - return $this->secure_password; - } - - /** - * Output only. The plaintext server-generated password for the user creds. - * Only populated in responses for CreateUserCreds and ResetUserPassword. - * - * Generated from protobuf field string secure_password = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSecurePassword($var) - { - GPBUtil::checkString($var, True); - $this->secure_password = $var; - - return $this; - } - - /** - * Resource Identity descriptor. - * - * Generated from protobuf field .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; - * @return \Google\Cloud\Firestore\Admin\V1\UserCreds\ResourceIdentity|null - */ - public function getResourceIdentity() - { - return $this->readOneof(6); - } - - public function hasResourceIdentity() - { - return $this->hasOneof(6); - } - - /** - * Resource Identity descriptor. - * - * Generated from protobuf field .google.firestore.admin.v1.UserCreds.ResourceIdentity resource_identity = 6; - * @param \Google\Cloud\Firestore\Admin\V1\UserCreds\ResourceIdentity $var - * @return $this - */ - public function setResourceIdentity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\Admin\V1\UserCreds\ResourceIdentity::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getUserCredsIdentity() - { - return $this->whichOneof("UserCredsIdentity"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/ResourceIdentity.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/ResourceIdentity.php deleted file mode 100644 index 43aae2282b0e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/ResourceIdentity.php +++ /dev/null @@ -1,71 +0,0 @@ -google.firestore.admin.v1.UserCreds.ResourceIdentity - */ -class ResourceIdentity extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Principal identifier string. - * See: https://cloud.google.com/iam/docs/principal-identifiers - * - * Generated from protobuf field string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $principal = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $principal - * Output only. Principal identifier string. - * See: https://cloud.google.com/iam/docs/principal-identifiers - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\UserCreds::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Principal identifier string. - * See: https://cloud.google.com/iam/docs/principal-identifiers - * - * Generated from protobuf field string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPrincipal() - { - return $this->principal; - } - - /** - * Output only. Principal identifier string. - * See: https://cloud.google.com/iam/docs/principal-identifiers - * - * Generated from protobuf field string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPrincipal($var) - { - GPBUtil::checkString($var, True); - $this->principal = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/State.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/State.php deleted file mode 100644 index 87e4f2a1a39b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/UserCreds/State.php +++ /dev/null @@ -1,61 +0,0 @@ -google.firestore.admin.v1.UserCreds.State - */ -class State -{ - /** - * The default value. Should not be used. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The user creds are enabled. - * - * Generated from protobuf enum ENABLED = 1; - */ - const ENABLED = 1; - /** - * The user creds are disabled. - * - * Generated from protobuf enum DISABLED = 2; - */ - const DISABLED = 2; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::ENABLED => 'ENABLED', - self::DISABLED => 'DISABLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/WeeklyRecurrence.php b/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/WeeklyRecurrence.php deleted file mode 100644 index 8aa07e17a56a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/proto/src/Google/Cloud/Firestore/Admin/V1/WeeklyRecurrence.php +++ /dev/null @@ -1,72 +0,0 @@ -google.firestore.admin.v1.WeeklyRecurrence - */ -class WeeklyRecurrence extends \Google\Protobuf\Internal\Message -{ - /** - * The day of week to run. - * DAY_OF_WEEK_UNSPECIFIED is not allowed. - * - * Generated from protobuf field .google.type.DayOfWeek day = 2; - */ - protected $day = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $day - * The day of week to run. - * DAY_OF_WEEK_UNSPECIFIED is not allowed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\Admin\V1\Schedule::initOnce(); - parent::__construct($data); - } - - /** - * The day of week to run. - * DAY_OF_WEEK_UNSPECIFIED is not allowed. - * - * Generated from protobuf field .google.type.DayOfWeek day = 2; - * @return int - */ - public function getDay() - { - return $this->day; - } - - /** - * The day of week to run. - * DAY_OF_WEEK_UNSPECIFIED is not allowed. - * - * Generated from protobuf field .google.type.DayOfWeek day = 2; - * @param int $var - * @return $this - */ - public function setDay($var) - { - GPBUtil::checkEnum($var, \Google\Type\DayOfWeek::class); - $this->day = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/bulk_delete_documents.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/bulk_delete_documents.php deleted file mode 100644 index 22e0d66b5189..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/bulk_delete_documents.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->bulkDeleteDocuments($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BulkDeleteDocumentsResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - bulk_delete_documents_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/clone_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/clone_database.php deleted file mode 100644 index 1fb08fa56f99..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/clone_database.php +++ /dev/null @@ -1,125 +0,0 @@ -setDatabase($formattedPitrSnapshotDatabase) - ->setSnapshotTime($pitrSnapshotSnapshotTime); - $request = (new CloneDatabaseRequest()) - ->setParent($formattedParent) - ->setDatabaseId($databaseId) - ->setPitrSnapshot($pitrSnapshot); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->cloneDatabase($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Database $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = FirestoreAdminClient::projectName('[PROJECT]'); - $databaseId = '[DATABASE_ID]'; - $formattedPitrSnapshotDatabase = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - clone_database_sample($formattedParent, $databaseId, $formattedPitrSnapshotDatabase); -} -// [END firestore_v1_generated_FirestoreAdmin_CloneDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_backup_schedule.php deleted file mode 100644 index 977286655c7b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_backup_schedule.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent) - ->setBackupSchedule($backupSchedule); - - // Call the API and handle any network failures. - try { - /** @var BackupSchedule $response */ - $response = $firestoreAdminClient->createBackupSchedule($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - create_backup_schedule_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_CreateBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_database.php deleted file mode 100644 index 783e18078ae7..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_database.php +++ /dev/null @@ -1,96 +0,0 @@ -setParent($formattedParent) - ->setDatabase($database) - ->setDatabaseId($databaseId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->createDatabase($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Database $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = FirestoreAdminClient::projectName('[PROJECT]'); - $databaseId = '[DATABASE_ID]'; - - create_database_sample($formattedParent, $databaseId); -} -// [END firestore_v1_generated_FirestoreAdmin_CreateDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php deleted file mode 100644 index 698c28acb527..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_index.php +++ /dev/null @@ -1,94 +0,0 @@ -setParent($formattedParent) - ->setIndex($index); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->createIndex($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Index $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = FirestoreAdminClient::collectionGroupName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]' - ); - - create_index_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_CreateIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_user_creds.php deleted file mode 100644 index 12f15789d40a..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/create_user_creds.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent) - ->setUserCreds($userCreds) - ->setUserCredsId($userCredsId); - - // Call the API and handle any network failures. - try { - /** @var UserCreds $response */ - $response = $firestoreAdminClient->createUserCreds($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - $userCredsId = '[USER_CREDS_ID]'; - - create_user_creds_sample($formattedParent, $userCredsId); -} -// [END firestore_v1_generated_FirestoreAdmin_CreateUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup.php deleted file mode 100644 index d1d6ca23d9fb..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $firestoreAdminClient->deleteBackup($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - - delete_backup_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_DeleteBackup_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup_schedule.php deleted file mode 100644 index f63397852def..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_backup_schedule.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $firestoreAdminClient->deleteBackupSchedule($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::backupScheduleName( - '[PROJECT]', - '[DATABASE]', - '[BACKUP_SCHEDULE]' - ); - - delete_backup_schedule_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_DeleteBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_database.php deleted file mode 100644 index 2c054985cc61..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_database.php +++ /dev/null @@ -1,84 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->deleteDatabase($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Database $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - delete_database_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_DeleteDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php deleted file mode 100644 index 5100d4af099d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_index.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $firestoreAdminClient->deleteIndex($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::indexName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]', - '[INDEX]' - ); - - delete_index_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_DeleteIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_user_creds.php deleted file mode 100644 index db1dfa9a341d..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/delete_user_creds.php +++ /dev/null @@ -1,70 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $firestoreAdminClient->deleteUserCreds($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - - delete_user_creds_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_DeleteUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/disable_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/disable_user_creds.php deleted file mode 100644 index 2b7bb1a05207..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/disable_user_creds.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var UserCreds $response */ - $response = $firestoreAdminClient->disableUserCreds($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - - disable_user_creds_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_DisableUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/enable_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/enable_user_creds.php deleted file mode 100644 index fff81717a1ec..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/enable_user_creds.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var UserCreds $response */ - $response = $firestoreAdminClient->enableUserCreds($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - - enable_user_creds_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_EnableUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php deleted file mode 100644 index d74212e16a28..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/export_documents.php +++ /dev/null @@ -1,94 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->exportDocuments($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ExportDocumentsResponse $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - export_documents_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_ExportDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup.php deleted file mode 100644 index fb0043c93703..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Backup $response */ - $response = $firestoreAdminClient->getBackup($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - - get_backup_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetBackup_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup_schedule.php deleted file mode 100644 index 42aabad3b2f8..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_backup_schedule.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var BackupSchedule $response */ - $response = $firestoreAdminClient->getBackupSchedule($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::backupScheduleName( - '[PROJECT]', - '[DATABASE]', - '[BACKUP_SCHEDULE]' - ); - - get_backup_schedule_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php deleted file mode 100644 index 39e4f8f513b9..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_database.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Database $response */ - $response = $firestoreAdminClient->getDatabase($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - get_database_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php deleted file mode 100644 index c85dadbe1eb5..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_field.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Field $response */ - $response = $firestoreAdminClient->getField($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::fieldName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]', - '[FIELD]' - ); - - get_field_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetField_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php deleted file mode 100644 index d87b6487a86e..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_index.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Index $response */ - $response = $firestoreAdminClient->getIndex($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::indexName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]', - '[INDEX]' - ); - - get_index_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetIndex_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_user_creds.php deleted file mode 100644 index 0921c791681b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/get_user_creds.php +++ /dev/null @@ -1,73 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var UserCreds $response */ - $response = $firestoreAdminClient->getUserCreds($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - - get_user_creds_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_GetUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php deleted file mode 100644 index 3bcd34ff43ae..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/import_documents.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->importDocuments($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - import_documents_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_ImportDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backup_schedules.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backup_schedules.php deleted file mode 100644 index e5fd7d370287..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backup_schedules.php +++ /dev/null @@ -1,73 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ListBackupSchedulesResponse $response */ - $response = $firestoreAdminClient->listBackupSchedules($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - list_backup_schedules_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListBackupSchedules_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backups.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backups.php deleted file mode 100644 index 18a8633f5fa1..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_backups.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ListBackupsResponse $response */ - $response = $firestoreAdminClient->listBackups($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = FirestoreAdminClient::locationName('[PROJECT]', '[LOCATION]'); - - list_backups_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListBackups_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php deleted file mode 100644 index dbfcf54c34a4..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_databases.php +++ /dev/null @@ -1,72 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ListDatabasesResponse $response */ - $response = $firestoreAdminClient->listDatabases($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = FirestoreAdminClient::projectName('[PROJECT]'); - - list_databases_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListDatabases_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php deleted file mode 100644 index e0219706c327..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_fields.php +++ /dev/null @@ -1,89 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $firestoreAdminClient->listFields($request); - - /** @var Field $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = FirestoreAdminClient::collectionGroupName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]' - ); - - list_fields_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListFields_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php deleted file mode 100644 index f3bac598fa14..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_indexes.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $firestoreAdminClient->listIndexes($request); - - /** @var Index $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = FirestoreAdminClient::collectionGroupName( - '[PROJECT]', - '[DATABASE]', - '[COLLECTION]' - ); - - list_indexes_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListIndexes_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_user_creds.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_user_creds.php deleted file mode 100644 index 157d102fb508..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/list_user_creds.php +++ /dev/null @@ -1,73 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ListUserCredsResponse $response */ - $response = $firestoreAdminClient->listUserCreds($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = FirestoreAdminClient::databaseName('[PROJECT]', '[DATABASE]'); - - list_user_creds_sample($formattedParent); -} -// [END firestore_v1_generated_FirestoreAdmin_ListUserCreds_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/reset_user_password.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/reset_user_password.php deleted file mode 100644 index cf835144108b..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/reset_user_password.php +++ /dev/null @@ -1,72 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var UserCreds $response */ - $response = $firestoreAdminClient->resetUserPassword($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = FirestoreAdminClient::userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - - reset_user_password_sample($formattedName); -} -// [END firestore_v1_generated_FirestoreAdmin_ResetUserPassword_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/restore_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/restore_database.php deleted file mode 100644 index 98381e2f7c76..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/restore_database.php +++ /dev/null @@ -1,124 +0,0 @@ -setParent($formattedParent) - ->setDatabaseId($databaseId) - ->setBackup($formattedBackup); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->restoreDatabase($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Database $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = FirestoreAdminClient::projectName('[PROJECT]'); - $databaseId = '[DATABASE_ID]'; - $formattedBackup = FirestoreAdminClient::backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - - restore_database_sample($formattedParent, $databaseId, $formattedBackup); -} -// [END firestore_v1_generated_FirestoreAdmin_RestoreDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_backup_schedule.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_backup_schedule.php deleted file mode 100644 index a86c8f7e485f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_backup_schedule.php +++ /dev/null @@ -1,59 +0,0 @@ -setBackupSchedule($backupSchedule); - - // Call the API and handle any network failures. - try { - /** @var BackupSchedule $response */ - $response = $firestoreAdminClient->updateBackupSchedule($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END firestore_v1_generated_FirestoreAdmin_UpdateBackupSchedule_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php deleted file mode 100644 index 075e9e0b9cb2..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_database.php +++ /dev/null @@ -1,71 +0,0 @@ -setDatabase($database); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->updateDatabase($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Database $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END firestore_v1_generated_FirestoreAdmin_UpdateDatabase_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php b/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php deleted file mode 100644 index ea5c384494ac..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/samples/V1/FirestoreAdminClient/update_field.php +++ /dev/null @@ -1,122 +0,0 @@ -setName($fieldName); - $request = (new UpdateFieldRequest()) - ->setField($field); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $firestoreAdminClient->updateField($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Field $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $fieldName = '[NAME]'; - - update_field_sample($fieldName); -} -// [END firestore_v1_generated_FirestoreAdmin_UpdateField_sync] diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/Client/FirestoreAdminClient.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/Client/FirestoreAdminClient.php deleted file mode 100644 index 97f6dfe6af15..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/Client/FirestoreAdminClient.php +++ /dev/null @@ -1,1473 +0,0 @@ - bulkDeleteDocumentsAsync(BulkDeleteDocumentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface cloneDatabaseAsync(CloneDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface createBackupScheduleAsync(CreateBackupScheduleRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDatabaseAsync(CreateDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface createIndexAsync(CreateIndexRequest $request, array $optionalArgs = []) - * @method PromiseInterface createUserCredsAsync(CreateUserCredsRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBackupAsync(DeleteBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBackupScheduleAsync(DeleteBackupScheduleRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDatabaseAsync(DeleteDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteIndexAsync(DeleteIndexRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteUserCredsAsync(DeleteUserCredsRequest $request, array $optionalArgs = []) - * @method PromiseInterface disableUserCredsAsync(DisableUserCredsRequest $request, array $optionalArgs = []) - * @method PromiseInterface enableUserCredsAsync(EnableUserCredsRequest $request, array $optionalArgs = []) - * @method PromiseInterface exportDocumentsAsync(ExportDocumentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBackupAsync(GetBackupRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBackupScheduleAsync(GetBackupScheduleRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDatabaseAsync(GetDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface getFieldAsync(GetFieldRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIndexAsync(GetIndexRequest $request, array $optionalArgs = []) - * @method PromiseInterface getUserCredsAsync(GetUserCredsRequest $request, array $optionalArgs = []) - * @method PromiseInterface importDocumentsAsync(ImportDocumentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBackupSchedulesAsync(ListBackupSchedulesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBackupsAsync(ListBackupsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDatabasesAsync(ListDatabasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listFieldsAsync(ListFieldsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listIndexesAsync(ListIndexesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listUserCredsAsync(ListUserCredsRequest $request, array $optionalArgs = []) - * @method PromiseInterface resetUserPasswordAsync(ResetUserPasswordRequest $request, array $optionalArgs = []) - * @method PromiseInterface restoreDatabaseAsync(RestoreDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBackupScheduleAsync(UpdateBackupScheduleRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDatabaseAsync(UpdateDatabaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateFieldAsync(UpdateFieldRequest $request, array $optionalArgs = []) - */ -final class FirestoreAdminClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.firestore.admin.v1.FirestoreAdmin'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'firestore.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'firestore.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/datastore', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/firestore_admin_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/firestore_admin_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/firestore_admin_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/firestore_admin_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a backup - * resource. - * - * @param string $project - * @param string $location - * @param string $backup - * - * @return string The formatted backup resource. - */ - public static function backupName(string $project, string $location, string $backup): string - { - return self::getPathTemplate('backup')->render([ - 'project' => $project, - 'location' => $location, - 'backup' => $backup, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * backup_schedule resource. - * - * @param string $project - * @param string $database - * @param string $backupSchedule - * - * @return string The formatted backup_schedule resource. - */ - public static function backupScheduleName(string $project, string $database, string $backupSchedule): string - { - return self::getPathTemplate('backupSchedule')->render([ - 'project' => $project, - 'database' => $database, - 'backup_schedule' => $backupSchedule, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * collection_group resource. - * - * @param string $project - * @param string $database - * @param string $collection - * - * @return string The formatted collection_group resource. - */ - public static function collectionGroupName(string $project, string $database, string $collection): string - { - return self::getPathTemplate('collectionGroup')->render([ - 'project' => $project, - 'database' => $database, - 'collection' => $collection, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a database - * resource. - * - * @param string $project - * @param string $database - * - * @return string The formatted database resource. - */ - public static function databaseName(string $project, string $database): string - { - return self::getPathTemplate('database')->render([ - 'project' => $project, - 'database' => $database, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a field - * resource. - * - * @param string $project - * @param string $database - * @param string $collection - * @param string $field - * - * @return string The formatted field resource. - */ - public static function fieldName(string $project, string $database, string $collection, string $field): string - { - return self::getPathTemplate('field')->render([ - 'project' => $project, - 'database' => $database, - 'collection' => $collection, - 'field' => $field, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a index - * resource. - * - * @param string $project - * @param string $database - * @param string $collection - * @param string $index - * - * @return string The formatted index resource. - */ - public static function indexName(string $project, string $database, string $collection, string $index): string - { - return self::getPathTemplate('index')->render([ - 'project' => $project, - 'database' => $database, - 'collection' => $collection, - 'index' => $index, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a location - * resource. - * - * @param string $project - * @param string $location - * - * @return string The formatted location resource. - */ - public static function locationName(string $project, string $location): string - { - return self::getPathTemplate('location')->render([ - 'project' => $project, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a operation - * resource. - * - * @param string $project - * @param string $database - * @param string $operation - * - * @return string The formatted operation resource. - */ - public static function operationName(string $project, string $database, string $operation): string - { - return self::getPathTemplate('operation')->render([ - 'project' => $project, - 'database' => $database, - 'operation' => $operation, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a user_creds - * resource. - * - * @param string $project - * @param string $database - * @param string $userCreds - * - * @return string The formatted user_creds resource. - */ - public static function userCredsName(string $project, string $database, string $userCreds): string - { - return self::getPathTemplate('userCreds')->render([ - 'project' => $project, - 'database' => $database, - 'user_creds' => $userCreds, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - backup: projects/{project}/locations/{location}/backups/{backup} - * - backupSchedule: projects/{project}/databases/{database}/backupSchedules/{backup_schedule} - * - collectionGroup: projects/{project}/databases/{database}/collectionGroups/{collection} - * - database: projects/{project}/databases/{database} - * - field: projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field} - * - index: projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index} - * - location: projects/{project}/locations/{location} - * - operation: projects/{project}/databases/{database}/operations/{operation} - * - project: projects/{project} - * - userCreds: projects/{project}/databases/{database}/userCreds/{user_creds} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'firestore.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Firestore\Admin\V1\FirestoreAdminClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new FirestoreAdminClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Bulk deletes a subset of documents from Google Cloud Firestore. - * Documents created or updated after the underlying system starts to process - * the request will not be deleted. The bulk delete occurs in the background - * and its progress can be monitored and managed via the Operation resource - * that is created. - * - * For more details on bulk delete behavior, refer to: - * https://cloud.google.com/firestore/docs/manage-data/bulk-delete - * - * The async variant is {@see FirestoreAdminClient::bulkDeleteDocumentsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/bulk_delete_documents.php - * - * @param BulkDeleteDocumentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function bulkDeleteDocuments(BulkDeleteDocumentsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('BulkDeleteDocuments', $request, $callOptions)->wait(); - } - - /** - * Creates a new database by cloning an existing one. - * - * The new database must be in the same cloud region or multi-region location - * as the existing database. This behaves similar to - * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] - * except instead of creating a new empty database, a new database is created - * with the database type, index configuration, and documents from an existing - * database. - * - * The [long-running operation][google.longrunning.Operation] can be used to - * track the progress of the clone, with the Operation's - * [metadata][google.longrunning.Operation.metadata] field type being the - * [CloneDatabaseMetadata][google.firestore.admin.v1.CloneDatabaseMetadata]. - * The [response][google.longrunning.Operation.response] type is the - * [Database][google.firestore.admin.v1.Database] if the clone was - * successful. The new database is not readable or writeable until the LRO has - * completed. - * - * The async variant is {@see FirestoreAdminClient::cloneDatabaseAsync()} . - * - * @example samples/V1/FirestoreAdminClient/clone_database.php - * - * @param CloneDatabaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function cloneDatabase(CloneDatabaseRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CloneDatabase', $request, $callOptions)->wait(); - } - - /** - * Creates a backup schedule on a database. - * At most two backup schedules can be configured on a database, one daily - * backup schedule and one weekly backup schedule. - * - * The async variant is {@see FirestoreAdminClient::createBackupScheduleAsync()} . - * - * @example samples/V1/FirestoreAdminClient/create_backup_schedule.php - * - * @param CreateBackupScheduleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BackupSchedule - * - * @throws ApiException Thrown if the API call fails. - */ - public function createBackupSchedule(CreateBackupScheduleRequest $request, array $callOptions = []): BackupSchedule - { - return $this->startApiCall('CreateBackupSchedule', $request, $callOptions)->wait(); - } - - /** - * Create a database. - * - * The async variant is {@see FirestoreAdminClient::createDatabaseAsync()} . - * - * @example samples/V1/FirestoreAdminClient/create_database.php - * - * @param CreateDatabaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDatabase(CreateDatabaseRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateDatabase', $request, $callOptions)->wait(); - } - - /** - * Creates a composite index. This returns a - * [google.longrunning.Operation][google.longrunning.Operation] which may be - * used to track the status of the creation. The metadata for the operation - * will be the type - * [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. - * - * The async variant is {@see FirestoreAdminClient::createIndexAsync()} . - * - * @example samples/V1/FirestoreAdminClient/create_index.php - * - * @param CreateIndexRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createIndex(CreateIndexRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateIndex', $request, $callOptions)->wait(); - } - - /** - * Create a user creds. - * - * The async variant is {@see FirestoreAdminClient::createUserCredsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/create_user_creds.php - * - * @param CreateUserCredsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UserCreds - * - * @throws ApiException Thrown if the API call fails. - */ - public function createUserCreds(CreateUserCredsRequest $request, array $callOptions = []): UserCreds - { - return $this->startApiCall('CreateUserCreds', $request, $callOptions)->wait(); - } - - /** - * Deletes a backup. - * - * The async variant is {@see FirestoreAdminClient::deleteBackupAsync()} . - * - * @example samples/V1/FirestoreAdminClient/delete_backup.php - * - * @param DeleteBackupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteBackup(DeleteBackupRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteBackup', $request, $callOptions)->wait(); - } - - /** - * Deletes a backup schedule. - * - * The async variant is {@see FirestoreAdminClient::deleteBackupScheduleAsync()} . - * - * @example samples/V1/FirestoreAdminClient/delete_backup_schedule.php - * - * @param DeleteBackupScheduleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteBackupSchedule(DeleteBackupScheduleRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteBackupSchedule', $request, $callOptions)->wait(); - } - - /** - * Deletes a database. - * - * The async variant is {@see FirestoreAdminClient::deleteDatabaseAsync()} . - * - * @example samples/V1/FirestoreAdminClient/delete_database.php - * - * @param DeleteDatabaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteDatabase(DeleteDatabaseRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteDatabase', $request, $callOptions)->wait(); - } - - /** - * Deletes a composite index. - * - * The async variant is {@see FirestoreAdminClient::deleteIndexAsync()} . - * - * @example samples/V1/FirestoreAdminClient/delete_index.php - * - * @param DeleteIndexRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteIndex(DeleteIndexRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteIndex', $request, $callOptions)->wait(); - } - - /** - * Deletes a user creds. - * - * The async variant is {@see FirestoreAdminClient::deleteUserCredsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/delete_user_creds.php - * - * @param DeleteUserCredsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteUserCreds(DeleteUserCredsRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteUserCreds', $request, $callOptions)->wait(); - } - - /** - * Disables a user creds. No-op if the user creds are already disabled. - * - * The async variant is {@see FirestoreAdminClient::disableUserCredsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/disable_user_creds.php - * - * @param DisableUserCredsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UserCreds - * - * @throws ApiException Thrown if the API call fails. - */ - public function disableUserCreds(DisableUserCredsRequest $request, array $callOptions = []): UserCreds - { - return $this->startApiCall('DisableUserCreds', $request, $callOptions)->wait(); - } - - /** - * Enables a user creds. No-op if the user creds are already enabled. - * - * The async variant is {@see FirestoreAdminClient::enableUserCredsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/enable_user_creds.php - * - * @param EnableUserCredsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UserCreds - * - * @throws ApiException Thrown if the API call fails. - */ - public function enableUserCreds(EnableUserCredsRequest $request, array $callOptions = []): UserCreds - { - return $this->startApiCall('EnableUserCreds', $request, $callOptions)->wait(); - } - - /** - * Exports a copy of all or a subset of documents from Google Cloud Firestore - * to another storage system, such as Google Cloud Storage. Recent updates to - * documents may not be reflected in the export. The export occurs in the - * background and its progress can be monitored and managed via the - * Operation resource that is created. The output of an export may only be - * used once the associated operation is done. If an export operation is - * cancelled before completion it may leave partial data behind in Google - * Cloud Storage. - * - * For more details on export behavior and output format, refer to: - * https://cloud.google.com/firestore/docs/manage-data/export-import - * - * The async variant is {@see FirestoreAdminClient::exportDocumentsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/export_documents.php - * - * @param ExportDocumentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function exportDocuments(ExportDocumentsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ExportDocuments', $request, $callOptions)->wait(); - } - - /** - * Gets information about a backup. - * - * The async variant is {@see FirestoreAdminClient::getBackupAsync()} . - * - * @example samples/V1/FirestoreAdminClient/get_backup.php - * - * @param GetBackupRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Backup - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBackup(GetBackupRequest $request, array $callOptions = []): Backup - { - return $this->startApiCall('GetBackup', $request, $callOptions)->wait(); - } - - /** - * Gets information about a backup schedule. - * - * The async variant is {@see FirestoreAdminClient::getBackupScheduleAsync()} . - * - * @example samples/V1/FirestoreAdminClient/get_backup_schedule.php - * - * @param GetBackupScheduleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BackupSchedule - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBackupSchedule(GetBackupScheduleRequest $request, array $callOptions = []): BackupSchedule - { - return $this->startApiCall('GetBackupSchedule', $request, $callOptions)->wait(); - } - - /** - * Gets information about a database. - * - * The async variant is {@see FirestoreAdminClient::getDatabaseAsync()} . - * - * @example samples/V1/FirestoreAdminClient/get_database.php - * - * @param GetDatabaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Database - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDatabase(GetDatabaseRequest $request, array $callOptions = []): Database - { - return $this->startApiCall('GetDatabase', $request, $callOptions)->wait(); - } - - /** - * Gets the metadata and configuration for a Field. - * - * The async variant is {@see FirestoreAdminClient::getFieldAsync()} . - * - * @example samples/V1/FirestoreAdminClient/get_field.php - * - * @param GetFieldRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Field - * - * @throws ApiException Thrown if the API call fails. - */ - public function getField(GetFieldRequest $request, array $callOptions = []): Field - { - return $this->startApiCall('GetField', $request, $callOptions)->wait(); - } - - /** - * Gets a composite index. - * - * The async variant is {@see FirestoreAdminClient::getIndexAsync()} . - * - * @example samples/V1/FirestoreAdminClient/get_index.php - * - * @param GetIndexRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Index - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIndex(GetIndexRequest $request, array $callOptions = []): Index - { - return $this->startApiCall('GetIndex', $request, $callOptions)->wait(); - } - - /** - * Gets a user creds resource. Note that the returned resource does not - * contain the secret value itself. - * - * The async variant is {@see FirestoreAdminClient::getUserCredsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/get_user_creds.php - * - * @param GetUserCredsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UserCreds - * - * @throws ApiException Thrown if the API call fails. - */ - public function getUserCreds(GetUserCredsRequest $request, array $callOptions = []): UserCreds - { - return $this->startApiCall('GetUserCreds', $request, $callOptions)->wait(); - } - - /** - * Imports documents into Google Cloud Firestore. Existing documents with the - * same name are overwritten. The import occurs in the background and its - * progress can be monitored and managed via the Operation resource that is - * created. If an ImportDocuments operation is cancelled, it is possible - * that a subset of the data has already been imported to Cloud Firestore. - * - * The async variant is {@see FirestoreAdminClient::importDocumentsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/import_documents.php - * - * @param ImportDocumentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function importDocuments(ImportDocumentsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ImportDocuments', $request, $callOptions)->wait(); - } - - /** - * List backup schedules. - * - * The async variant is {@see FirestoreAdminClient::listBackupSchedulesAsync()} . - * - * @example samples/V1/FirestoreAdminClient/list_backup_schedules.php - * - * @param ListBackupSchedulesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ListBackupSchedulesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listBackupSchedules(ListBackupSchedulesRequest $request, array $callOptions = []): ListBackupSchedulesResponse - { - return $this->startApiCall('ListBackupSchedules', $request, $callOptions)->wait(); - } - - /** - * Lists all the backups. - * - * The async variant is {@see FirestoreAdminClient::listBackupsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/list_backups.php - * - * @param ListBackupsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ListBackupsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listBackups(ListBackupsRequest $request, array $callOptions = []): ListBackupsResponse - { - return $this->startApiCall('ListBackups', $request, $callOptions)->wait(); - } - - /** - * List all the databases in the project. - * - * The async variant is {@see FirestoreAdminClient::listDatabasesAsync()} . - * - * @example samples/V1/FirestoreAdminClient/list_databases.php - * - * @param ListDatabasesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ListDatabasesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDatabases(ListDatabasesRequest $request, array $callOptions = []): ListDatabasesResponse - { - return $this->startApiCall('ListDatabases', $request, $callOptions)->wait(); - } - - /** - * Lists the field configuration and metadata for this database. - * - * Currently, - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * only supports listing fields that have been explicitly overridden. To issue - * this query, call - * [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - * with the filter set to `indexConfig.usesAncestorConfig:false` or - * `ttlConfig:*`. - * - * The async variant is {@see FirestoreAdminClient::listFieldsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/list_fields.php - * - * @param ListFieldsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listFields(ListFieldsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListFields', $request, $callOptions); - } - - /** - * Lists composite indexes. - * - * The async variant is {@see FirestoreAdminClient::listIndexesAsync()} . - * - * @example samples/V1/FirestoreAdminClient/list_indexes.php - * - * @param ListIndexesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listIndexes(ListIndexesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListIndexes', $request, $callOptions); - } - - /** - * List all user creds in the database. Note that the returned resource - * does not contain the secret value itself. - * - * The async variant is {@see FirestoreAdminClient::listUserCredsAsync()} . - * - * @example samples/V1/FirestoreAdminClient/list_user_creds.php - * - * @param ListUserCredsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ListUserCredsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listUserCreds(ListUserCredsRequest $request, array $callOptions = []): ListUserCredsResponse - { - return $this->startApiCall('ListUserCreds', $request, $callOptions)->wait(); - } - - /** - * Resets the password of a user creds. - * - * The async variant is {@see FirestoreAdminClient::resetUserPasswordAsync()} . - * - * @example samples/V1/FirestoreAdminClient/reset_user_password.php - * - * @param ResetUserPasswordRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UserCreds - * - * @throws ApiException Thrown if the API call fails. - */ - public function resetUserPassword(ResetUserPasswordRequest $request, array $callOptions = []): UserCreds - { - return $this->startApiCall('ResetUserPassword', $request, $callOptions)->wait(); - } - - /** - * Creates a new database by restoring from an existing backup. - * - * The new database must be in the same cloud region or multi-region location - * as the existing backup. This behaves similar to - * [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] - * except instead of creating a new empty database, a new database is created - * with the database type, index configuration, and documents from an existing - * backup. - * - * The [long-running operation][google.longrunning.Operation] can be used to - * track the progress of the restore, with the Operation's - * [metadata][google.longrunning.Operation.metadata] field type being the - * [RestoreDatabaseMetadata][google.firestore.admin.v1.RestoreDatabaseMetadata]. - * The [response][google.longrunning.Operation.response] type is the - * [Database][google.firestore.admin.v1.Database] if the restore was - * successful. The new database is not readable or writeable until the LRO has - * completed. - * - * The async variant is {@see FirestoreAdminClient::restoreDatabaseAsync()} . - * - * @example samples/V1/FirestoreAdminClient/restore_database.php - * - * @param RestoreDatabaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function restoreDatabase(RestoreDatabaseRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RestoreDatabase', $request, $callOptions)->wait(); - } - - /** - * Updates a backup schedule. - * - * The async variant is {@see FirestoreAdminClient::updateBackupScheduleAsync()} . - * - * @example samples/V1/FirestoreAdminClient/update_backup_schedule.php - * - * @param UpdateBackupScheduleRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BackupSchedule - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateBackupSchedule(UpdateBackupScheduleRequest $request, array $callOptions = []): BackupSchedule - { - return $this->startApiCall('UpdateBackupSchedule', $request, $callOptions)->wait(); - } - - /** - * Updates a database. - * - * The async variant is {@see FirestoreAdminClient::updateDatabaseAsync()} . - * - * @example samples/V1/FirestoreAdminClient/update_database.php - * - * @param UpdateDatabaseRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateDatabase(UpdateDatabaseRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateDatabase', $request, $callOptions)->wait(); - } - - /** - * Updates a field configuration. Currently, field updates apply only to - * single field index configuration. However, calls to - * [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] - * should provide a field mask to avoid changing any configuration that the - * caller isn't aware of. The field mask should be specified as: `{ paths: - * "index_config" }`. - * - * This call returns a - * [google.longrunning.Operation][google.longrunning.Operation] which may be - * used to track the status of the field update. The metadata for the - * operation will be the type - * [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. - * - * To configure the default field settings for the database, use - * the special `Field` with resource name: - * `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. - * - * The async variant is {@see FirestoreAdminClient::updateFieldAsync()} . - * - * @example samples/V1/FirestoreAdminClient/update_field.php - * - * @param UpdateFieldRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateField(UpdateFieldRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateField', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json b/owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json deleted file mode 100644 index dbbc7871bacb..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/gapic_metadata.json +++ /dev/null @@ -1,178 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.firestore.admin.v1", - "libraryPackage": "Google\\Cloud\\Firestore\\Admin\\V1", - "services": { - "FirestoreAdmin": { - "clients": { - "grpc": { - "libraryClient": "FirestoreAdminGapicClient", - "rpcs": { - "BulkDeleteDocuments": { - "methods": [ - "bulkDeleteDocuments" - ] - }, - "CloneDatabase": { - "methods": [ - "cloneDatabase" - ] - }, - "CreateBackupSchedule": { - "methods": [ - "createBackupSchedule" - ] - }, - "CreateDatabase": { - "methods": [ - "createDatabase" - ] - }, - "CreateIndex": { - "methods": [ - "createIndex" - ] - }, - "CreateUserCreds": { - "methods": [ - "createUserCreds" - ] - }, - "DeleteBackup": { - "methods": [ - "deleteBackup" - ] - }, - "DeleteBackupSchedule": { - "methods": [ - "deleteBackupSchedule" - ] - }, - "DeleteDatabase": { - "methods": [ - "deleteDatabase" - ] - }, - "DeleteIndex": { - "methods": [ - "deleteIndex" - ] - }, - "DeleteUserCreds": { - "methods": [ - "deleteUserCreds" - ] - }, - "DisableUserCreds": { - "methods": [ - "disableUserCreds" - ] - }, - "EnableUserCreds": { - "methods": [ - "enableUserCreds" - ] - }, - "ExportDocuments": { - "methods": [ - "exportDocuments" - ] - }, - "GetBackup": { - "methods": [ - "getBackup" - ] - }, - "GetBackupSchedule": { - "methods": [ - "getBackupSchedule" - ] - }, - "GetDatabase": { - "methods": [ - "getDatabase" - ] - }, - "GetField": { - "methods": [ - "getField" - ] - }, - "GetIndex": { - "methods": [ - "getIndex" - ] - }, - "GetUserCreds": { - "methods": [ - "getUserCreds" - ] - }, - "ImportDocuments": { - "methods": [ - "importDocuments" - ] - }, - "ListBackupSchedules": { - "methods": [ - "listBackupSchedules" - ] - }, - "ListBackups": { - "methods": [ - "listBackups" - ] - }, - "ListDatabases": { - "methods": [ - "listDatabases" - ] - }, - "ListFields": { - "methods": [ - "listFields" - ] - }, - "ListIndexes": { - "methods": [ - "listIndexes" - ] - }, - "ListUserCreds": { - "methods": [ - "listUserCreds" - ] - }, - "ResetUserPassword": { - "methods": [ - "resetUserPassword" - ] - }, - "RestoreDatabase": { - "methods": [ - "restoreDatabase" - ] - }, - "UpdateBackupSchedule": { - "methods": [ - "updateBackupSchedule" - ] - }, - "UpdateDatabase": { - "methods": [ - "updateDatabase" - ] - }, - "UpdateField": { - "methods": [ - "updateField" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json deleted file mode 100644 index 5cbb0d1c138f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_client_config.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "interfaces": { - "google.firestore.admin.v1.FirestoreAdmin": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "INTERNAL", - "DEADLINE_EXCEEDED" - ], - "no_retry_1_codes": [], - "no_retry_2_codes": [], - "no_retry_3_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 120000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 120000, - "total_timeout_millis": 120000 - }, - "no_retry_3_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "BulkDeleteDocuments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CloneDatabase": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateBackupSchedule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateDatabase": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateIndex": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateUserCreds": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteBackup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteBackupSchedule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteDatabase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteIndex": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteUserCreds": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DisableUserCreds": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "EnableUserCreds": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ExportDocuments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetBackup": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetBackupSchedule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetDatabase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetField": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIndex": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetUserCreds": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ImportDocuments": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "ListBackupSchedules": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListBackups": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListDatabases": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListFields": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListIndexes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListUserCreds": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ResetUserPassword": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RestoreDatabase": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "UpdateBackupSchedule": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateDatabase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateField": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php deleted file mode 100644 index c3127617cb45..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_descriptor_config.php +++ /dev/null @@ -1,523 +0,0 @@ - [ - 'google.firestore.admin.v1.FirestoreAdmin' => [ - 'BulkDeleteDocuments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\BulkDeleteDocumentsResponse', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\BulkDeleteDocumentsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CloneDatabase' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\CloneDatabaseMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getPitrSnapshot', - 'getDatabase', - ], - 'matchers' => [], - ], - [ - 'keyName' => 'database_id', - 'fieldAccessors' => [ - 'getPitrSnapshot', - 'getDatabase', - ], - 'matchers' => [], - ], - ], - ], - 'CreateDatabase' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\CreateDatabaseMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateIndex' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Index', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\IndexOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteDatabase' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\DeleteDatabaseMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ExportDocuments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\ExportDocumentsResponse', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\ExportDocumentsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ImportDocuments' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\ImportDocumentsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RestoreDatabase' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\RestoreDatabaseMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDatabase' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Database', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\UpdateDatabaseMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'database.name', - 'fieldAccessors' => [ - 'getDatabase', - 'getName', - ], - ], - ], - ], - 'UpdateField' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Firestore\Admin\V1\Field', - 'metadataReturnType' => '\Google\Cloud\Firestore\Admin\V1\FieldOperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'field.name', - 'fieldAccessors' => [ - 'getField', - 'getName', - ], - ], - ], - ], - 'CreateBackupSchedule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\BackupSchedule', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateUserCreds' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteBackup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteBackupSchedule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteIndex' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteUserCreds' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DisableUserCreds' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'EnableUserCreds' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Backup', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBackupSchedule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\BackupSchedule', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDatabase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Database', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetField' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Field', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIndex' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\Index', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetUserCreds' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListBackupSchedules' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListBackupSchedulesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackups' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListBackupsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDatabases' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListDatabasesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListFields' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getFields', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListFieldsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListIndexes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getIndexes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListIndexesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListUserCreds' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\ListUserCredsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ResetUserPassword' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\UserCreds', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateBackupSchedule' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\Admin\V1\BackupSchedule', - 'headerParams' => [ - [ - 'keyName' => 'backup_schedule.name', - 'fieldAccessors' => [ - 'getBackupSchedule', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'backup' => 'projects/{project}/locations/{location}/backups/{backup}', - 'backupSchedule' => 'projects/{project}/databases/{database}/backupSchedules/{backup_schedule}', - 'collectionGroup' => 'projects/{project}/databases/{database}/collectionGroups/{collection}', - 'database' => 'projects/{project}/databases/{database}', - 'field' => 'projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}', - 'index' => 'projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}', - 'location' => 'projects/{project}/locations/{location}', - 'operation' => 'projects/{project}/databases/{database}/operations/{operation}', - 'project' => 'projects/{project}', - 'userCreds' => 'projects/{project}/databases/{database}/userCreds/{user_creds}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php b/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php deleted file mode 100644 index a2b82a32fc0f..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/src/V1/resources/firestore_admin_rest_client_config.php +++ /dev/null @@ -1,452 +0,0 @@ - [ - 'google.firestore.admin.v1.FirestoreAdmin' => [ - 'BulkDeleteDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}:bulkDeleteDocuments', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CloneDatabase' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/databases:clone', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateBackupSchedule' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*}/backupSchedules', - 'body' => 'backup_schedule', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDatabase' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/databases', - 'body' => 'database', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'database_id', - ], - ], - 'CreateIndex' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes', - 'body' => 'index', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateUserCreds' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*}/userCreds', - 'body' => 'user_creds', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'user_creds_id', - ], - ], - 'DeleteBackup' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteBackupSchedule' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/backupSchedules/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteDatabase' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteIndex' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteUserCreds' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DisableUserCreds' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}:disable', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'EnableUserCreds' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}:enable', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExportDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}:exportDocuments', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackup' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/backups/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBackupSchedule' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/backupSchedules/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDatabase' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetField' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIndex' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetUserCreds' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}:importDocuments', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBackupSchedules' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*}/backupSchedules', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListBackups' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/backups', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDatabases' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*}/databases', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListFields' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListIndexes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListUserCreds' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*}/userCreds', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ResetUserPassword' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/userCreds/*}:resetPassword', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'RestoreDatabase' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*}/databases:restore', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateBackupSchedule' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{backup_schedule.name=projects/*/databases/*/backupSchedules/*}', - 'body' => 'backup_schedule', - 'placeholders' => [ - 'backup_schedule.name' => [ - 'getters' => [ - 'getBackupSchedule', - 'getName', - ], - ], - ], - ], - 'UpdateDatabase' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{database.name=projects/*/databases/*}', - 'body' => 'database', - 'placeholders' => [ - 'database.name' => [ - 'getters' => [ - 'getDatabase', - 'getName', - ], - ], - ], - ], - 'UpdateField' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}', - 'body' => 'field', - 'placeholders' => [ - 'field.name' => [ - 'getters' => [ - 'getField', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/Client/FirestoreAdminClientTest.php b/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/Client/FirestoreAdminClientTest.php deleted file mode 100644 index 158d07508900..000000000000 --- a/owl-bot-staging/Firestore/v1/Admin/tests/Unit/V1/Client/FirestoreAdminClientTest.php +++ /dev/null @@ -1,2977 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return FirestoreAdminClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new FirestoreAdminClient($options); - } - - /** @test */ - public function bulkDeleteDocumentsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/bulkDeleteDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BulkDeleteDocumentsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/bulkDeleteDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new BulkDeleteDocumentsRequest()) - ->setName($formattedName); - $response = $gapicClient->bulkDeleteDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/BulkDeleteDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkDeleteDocumentsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function bulkDeleteDocumentsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/bulkDeleteDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new BulkDeleteDocumentsRequest()) - ->setName($formattedName); - $response = $gapicClient->bulkDeleteDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkDeleteDocumentsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function cloneDatabaseTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cloneDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $freeTier = false; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setFreeTier($freeTier); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/cloneDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $databaseId = 'databaseId816491103'; - $pitrSnapshot = new PitrSnapshot(); - $pitrSnapshotDatabase = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $pitrSnapshot->setDatabase($pitrSnapshotDatabase); - $pitrSnapshotSnapshotTime = new Timestamp(); - $pitrSnapshot->setSnapshotTime($pitrSnapshotSnapshotTime); - $request = (new CloneDatabaseRequest()) - ->setParent($formattedParent) - ->setDatabaseId($databaseId) - ->setPitrSnapshot($pitrSnapshot); - $response = $gapicClient->cloneDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/CloneDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDatabaseId(); - $this->assertProtobufEquals($databaseId, $actualValue); - $actualValue = $actualApiRequestObject->getPitrSnapshot(); - $this->assertProtobufEquals($pitrSnapshot, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cloneDatabaseTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function cloneDatabaseExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/cloneDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $databaseId = 'databaseId816491103'; - $pitrSnapshot = new PitrSnapshot(); - $pitrSnapshotDatabase = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $pitrSnapshot->setDatabase($pitrSnapshotDatabase); - $pitrSnapshotSnapshotTime = new Timestamp(); - $pitrSnapshot->setSnapshotTime($pitrSnapshotSnapshotTime); - $request = (new CloneDatabaseRequest()) - ->setParent($formattedParent) - ->setDatabaseId($databaseId) - ->setPitrSnapshot($pitrSnapshot); - $response = $gapicClient->cloneDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/cloneDatabaseTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createBackupScheduleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new BackupSchedule(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $backupSchedule = new BackupSchedule(); - $request = (new CreateBackupScheduleRequest()) - ->setParent($formattedParent) - ->setBackupSchedule($backupSchedule); - $response = $gapicClient->createBackupSchedule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/CreateBackupSchedule', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getBackupSchedule(); - $this->assertProtobufEquals($backupSchedule, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createBackupScheduleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $backupSchedule = new BackupSchedule(); - $request = (new CreateBackupScheduleRequest()) - ->setParent($formattedParent) - ->setBackupSchedule($backupSchedule); - try { - $gapicClient->createBackupSchedule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDatabaseTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $freeTier = false; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setFreeTier($freeTier); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $database = new Database(); - $databaseId = 'databaseId816491103'; - $request = (new CreateDatabaseRequest()) - ->setParent($formattedParent) - ->setDatabase($database) - ->setDatabaseId($databaseId); - $response = $gapicClient->createDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/CreateDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $actualValue = $actualApiRequestObject->getDatabaseId(); - $this->assertProtobufEquals($databaseId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDatabaseTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createDatabaseExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $database = new Database(); - $databaseId = 'databaseId816491103'; - $request = (new CreateDatabaseRequest()) - ->setParent($formattedParent) - ->setDatabase($database) - ->setDatabaseId($databaseId); - $response = $gapicClient->createDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDatabaseTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createIndexTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createIndexTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $multikey = true; - $shardCount = 495377042; - $unique = false; - $expectedResponse = new Index(); - $expectedResponse->setName($name); - $expectedResponse->setMultikey($multikey); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setUnique($unique); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createIndexTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $index = new Index(); - $request = (new CreateIndexRequest()) - ->setParent($formattedParent) - ->setIndex($index); - $response = $gapicClient->createIndex($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/CreateIndex', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getIndex(); - $this->assertProtobufEquals($index, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIndexTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createIndexExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createIndexTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $index = new Index(); - $request = (new CreateIndexRequest()) - ->setParent($formattedParent) - ->setIndex($index); - $response = $gapicClient->createIndex($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIndexTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createUserCredsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $securePassword = 'securePassword934119011'; - $expectedResponse = new UserCreds(); - $expectedResponse->setName($name); - $expectedResponse->setSecurePassword($securePassword); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $userCreds = new UserCreds(); - $userCredsId = 'userCredsId1873704105'; - $request = (new CreateUserCredsRequest()) - ->setParent($formattedParent) - ->setUserCreds($userCreds) - ->setUserCredsId($userCredsId); - $response = $gapicClient->createUserCreds($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/CreateUserCreds', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getUserCreds(); - $this->assertProtobufEquals($userCreds, $actualValue); - $actualValue = $actualRequestObject->getUserCredsId(); - $this->assertProtobufEquals($userCredsId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createUserCredsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $userCreds = new UserCreds(); - $userCredsId = 'userCredsId1873704105'; - $request = (new CreateUserCredsRequest()) - ->setParent($formattedParent) - ->setUserCreds($userCreds) - ->setUserCredsId($userCredsId); - try { - $gapicClient->createUserCreds($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new DeleteBackupRequest()) - ->setName($formattedName); - $gapicClient->deleteBackup($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteBackup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBackupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new DeleteBackupRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteBackup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBackupScheduleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); - $request = (new DeleteBackupScheduleRequest()) - ->setName($formattedName); - $gapicClient->deleteBackupSchedule($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteBackupSchedule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBackupScheduleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); - $request = (new DeleteBackupScheduleRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteBackupSchedule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDatabaseTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $freeTier = false; - $etag2 = 'etag2-1293302904'; - $expectedResponse = new Database(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setFreeTier($freeTier); - $expectedResponse->setEtag($etag2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new DeleteDatabaseRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDatabaseTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteDatabaseExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/deleteDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new DeleteDatabaseRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDatabaseTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function deleteIndexTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - $request = (new DeleteIndexRequest()) - ->setName($formattedName); - $gapicClient->deleteIndex($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteIndex', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteIndexExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - $request = (new DeleteIndexRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteIndex($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteUserCredsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new DeleteUserCredsRequest()) - ->setName($formattedName); - $gapicClient->deleteUserCreds($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DeleteUserCreds', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteUserCredsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new DeleteUserCredsRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteUserCreds($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function disableUserCredsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $securePassword = 'securePassword934119011'; - $expectedResponse = new UserCreds(); - $expectedResponse->setName($name2); - $expectedResponse->setSecurePassword($securePassword); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new DisableUserCredsRequest()) - ->setName($formattedName); - $response = $gapicClient->disableUserCreds($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/DisableUserCreds', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function disableUserCredsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new DisableUserCredsRequest()) - ->setName($formattedName); - try { - $gapicClient->disableUserCreds($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function enableUserCredsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $securePassword = 'securePassword934119011'; - $expectedResponse = new UserCreds(); - $expectedResponse->setName($name2); - $expectedResponse->setSecurePassword($securePassword); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new EnableUserCredsRequest()) - ->setName($formattedName); - $response = $gapicClient->enableUserCreds($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/EnableUserCreds', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function enableUserCredsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new EnableUserCredsRequest()) - ->setName($formattedName); - try { - $gapicClient->enableUserCreds($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function exportDocumentsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/exportDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $outputUriPrefix2 = 'outputUriPrefix2-377757258'; - $expectedResponse = new ExportDocumentsResponse(); - $expectedResponse->setOutputUriPrefix($outputUriPrefix2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/exportDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ExportDocumentsRequest()) - ->setName($formattedName); - $response = $gapicClient->exportDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ExportDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDocumentsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function exportDocumentsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/exportDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ExportDocumentsRequest()) - ->setName($formattedName); - $response = $gapicClient->exportDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/exportDocumentsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function getBackupTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $database = 'database1789464955'; - $databaseUid = 'databaseUid-458567796'; - $expectedResponse = new Backup(); - $expectedResponse->setName($name2); - $expectedResponse->setDatabase($database); - $expectedResponse->setDatabaseUid($databaseUid); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new GetBackupRequest()) - ->setName($formattedName); - $response = $gapicClient->getBackup($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetBackup', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new GetBackupRequest()) - ->setName($formattedName); - try { - $gapicClient->getBackup($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupScheduleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new BackupSchedule(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); - $request = (new GetBackupScheduleRequest()) - ->setName($formattedName); - $response = $gapicClient->getBackupSchedule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetBackupSchedule', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBackupScheduleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->backupScheduleName('[PROJECT]', '[DATABASE]', '[BACKUP_SCHEDULE]'); - $request = (new GetBackupScheduleRequest()) - ->setName($formattedName); - try { - $gapicClient->getBackupSchedule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDatabaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $freeTier = false; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name2); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setFreeTier($freeTier); - $expectedResponse->setEtag($etag); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new GetDatabaseRequest()) - ->setName($formattedName); - $response = $gapicClient->getDatabase($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetDatabase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDatabaseExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new GetDatabaseRequest()) - ->setName($formattedName); - try { - $gapicClient->getDatabase($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFieldTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Field(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->fieldName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[FIELD]'); - $request = (new GetFieldRequest()) - ->setName($formattedName); - $response = $gapicClient->getField($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetField', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getFieldExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->fieldName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[FIELD]'); - $request = (new GetFieldRequest()) - ->setName($formattedName); - try { - $gapicClient->getField($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIndexTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $multikey = true; - $shardCount = 495377042; - $unique = false; - $expectedResponse = new Index(); - $expectedResponse->setName($name2); - $expectedResponse->setMultikey($multikey); - $expectedResponse->setShardCount($shardCount); - $expectedResponse->setUnique($unique); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - $request = (new GetIndexRequest()) - ->setName($formattedName); - $response = $gapicClient->getIndex($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetIndex', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIndexExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->indexName('[PROJECT]', '[DATABASE]', '[COLLECTION]', '[INDEX]'); - $request = (new GetIndexRequest()) - ->setName($formattedName); - try { - $gapicClient->getIndex($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getUserCredsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $securePassword = 'securePassword934119011'; - $expectedResponse = new UserCreds(); - $expectedResponse->setName($name2); - $expectedResponse->setSecurePassword($securePassword); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new GetUserCredsRequest()) - ->setName($formattedName); - $response = $gapicClient->getUserCreds($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/GetUserCreds', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getUserCredsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new GetUserCredsRequest()) - ->setName($formattedName); - try { - $gapicClient->getUserCreds($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function importDocumentsTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ImportDocumentsRequest()) - ->setName($formattedName); - $response = $gapicClient->importDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ImportDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function importDocumentsExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/importDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ImportDocumentsRequest()) - ->setName($formattedName); - $response = $gapicClient->importDocuments($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importDocumentsTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function listBackupSchedulesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListBackupSchedulesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ListBackupSchedulesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBackupSchedules($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListBackupSchedules', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupSchedulesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ListBackupSchedulesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBackupSchedules($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListBackupsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListBackupsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBackups($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListBackups', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBackupsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListBackupsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBackups($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDatabasesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListDatabasesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListDatabasesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDatabases($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListDatabases', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDatabasesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListDatabasesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDatabases($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFieldsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $fieldsElement = new Field(); - $fields = [ - $fieldsElement, - ]; - $expectedResponse = new ListFieldsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFields($fields); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $request = (new ListFieldsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listFields($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFields()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListFields', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listFieldsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $request = (new ListFieldsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listFields($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIndexesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $indexesElement = new Index(); - $indexes = [ - $indexesElement, - ]; - $expectedResponse = new ListIndexesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setIndexes($indexes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $request = (new ListIndexesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listIndexes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getIndexes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListIndexes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIndexesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->collectionGroupName('[PROJECT]', '[DATABASE]', '[COLLECTION]'); - $request = (new ListIndexesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listIndexes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUserCredsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListUserCredsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ListUserCredsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listUserCreds($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ListUserCreds', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listUserCredsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new ListUserCredsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listUserCreds($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resetUserPasswordTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $securePassword = 'securePassword934119011'; - $expectedResponse = new UserCreds(); - $expectedResponse->setName($name2); - $expectedResponse->setSecurePassword($securePassword); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new ResetUserPasswordRequest()) - ->setName($formattedName); - $response = $gapicClient->resetUserPassword($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/ResetUserPassword', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resetUserPasswordExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->userCredsName('[PROJECT]', '[DATABASE]', '[USER_CREDS]'); - $request = (new ResetUserPasswordRequest()) - ->setName($formattedName); - try { - $gapicClient->resetUserPassword($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function restoreDatabaseTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/restoreDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $freeTier = false; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setFreeTier($freeTier); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/restoreDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $databaseId = 'databaseId816491103'; - $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new RestoreDatabaseRequest()) - ->setParent($formattedParent) - ->setDatabaseId($databaseId) - ->setBackup($formattedBackup); - $response = $gapicClient->restoreDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/RestoreDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDatabaseId(); - $this->assertProtobufEquals($databaseId, $actualValue); - $actualValue = $actualApiRequestObject->getBackup(); - $this->assertProtobufEquals($formattedBackup, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreDatabaseTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function restoreDatabaseExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/restoreDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $databaseId = 'databaseId816491103'; - $formattedBackup = $gapicClient->backupName('[PROJECT]', '[LOCATION]', '[BACKUP]'); - $request = (new RestoreDatabaseRequest()) - ->setParent($formattedParent) - ->setDatabaseId($databaseId) - ->setBackup($formattedBackup); - $response = $gapicClient->restoreDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/restoreDatabaseTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateBackupScheduleTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new BackupSchedule(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $backupSchedule = new BackupSchedule(); - $request = (new UpdateBackupScheduleRequest()) - ->setBackupSchedule($backupSchedule); - $response = $gapicClient->updateBackupSchedule($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/UpdateBackupSchedule', $actualFuncCall); - $actualValue = $actualRequestObject->getBackupSchedule(); - $this->assertProtobufEquals($backupSchedule, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBackupScheduleExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $backupSchedule = new BackupSchedule(); - $request = (new UpdateBackupScheduleRequest()) - ->setBackupSchedule($backupSchedule); - try { - $gapicClient->updateBackupSchedule($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDatabaseTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $uid = 'uid115792'; - $locationId = 'locationId552319461'; - $keyPrefix = 'keyPrefix438630514'; - $previousId = 'previousId-1005863069'; - $freeTier = false; - $etag = 'etag3123477'; - $expectedResponse = new Database(); - $expectedResponse->setName($name); - $expectedResponse->setUid($uid); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setKeyPrefix($keyPrefix); - $expectedResponse->setPreviousId($previousId); - $expectedResponse->setFreeTier($freeTier); - $expectedResponse->setEtag($etag); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDatabaseTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $database = new Database(); - $request = (new UpdateDatabaseRequest()) - ->setDatabase($database); - $response = $gapicClient->updateDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/UpdateDatabase', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDatabaseTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateDatabaseExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateDatabaseTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $database = new Database(); - $request = (new UpdateDatabaseRequest()) - ->setDatabase($database); - $response = $gapicClient->updateDatabase($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDatabaseTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateFieldTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateFieldTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Field(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateFieldTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $field = new Field(); - $fieldName = 'fieldName1265009317'; - $field->setName($fieldName); - $request = (new UpdateFieldRequest()) - ->setField($field); - $response = $gapicClient->updateField($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/UpdateField', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getField(); - $this->assertProtobufEquals($field, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFieldTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function updateFieldExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/updateFieldTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $field = new Field(); - $fieldName = 'fieldName1265009317'; - $field->setName($fieldName); - $request = (new UpdateFieldRequest()) - ->setField($field); - $response = $gapicClient->updateField($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateFieldTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function bulkDeleteDocumentsAsyncTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/bulkDeleteDocumentsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new BulkDeleteDocumentsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/bulkDeleteDocumentsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->databaseName('[PROJECT]', '[DATABASE]'); - $request = (new BulkDeleteDocumentsRequest()) - ->setName($formattedName); - $response = $gapicClient->bulkDeleteDocumentsAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.admin.v1.FirestoreAdmin/BulkDeleteDocuments', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/bulkDeleteDocumentsTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php deleted file mode 100644 index b1b788bc4187..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/AggregationResult.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xDD\x03\x0A,google/firestore/v1/aggregation_result.proto\x12\x13google.firestore.v1\"\xBE\x01\x0A\x11AggregationResult\x12U\x0A\x10aggregate_fields\x18\x02 \x03(\x0B2;.google.firestore.v1.AggregationResult.AggregateFieldsEntry\x1AR\x0A\x14AggregateFieldsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01B\xCE\x01\x0A\x17com.google.firestore.v1B\x16AggregationResultProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/BloomFilter.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/BloomFilter.php deleted file mode 100644 index a7f1ca1fe6ef..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/BloomFilter.php +++ /dev/null @@ -1,24 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x93\x03\x0A&google/firestore/v1/bloom_filter.proto\x12\x13google.firestore.v1\".\x0A\x0BBitSequence\x12\x0E\x0A\x06bitmap\x18\x01 \x01(\x0C\x12\x0F\x0A\x07padding\x18\x02 \x01(\x05\"Q\x0A\x0BBloomFilter\x12.\x0A\x04bits\x18\x01 \x01(\x0B2 .google.firestore.v1.BitSequence\x12\x12\x0A\x0Ahash_count\x18\x02 \x01(\x05B\xC8\x01\x0A\x17com.google.firestore.v1B\x10BloomFilterProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php deleted file mode 100644 index 7e8aea52f92e..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Common.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xBD\x05\x0A google/firestore/v1/common.proto\x12\x13google.firestore.v1\"#\x0A\x0CDocumentMask\x12\x13\x0A\x0Bfield_paths\x18\x01 \x03(\x09\"e\x0A\x0CPrecondition\x12\x10\x0A\x06exists\x18\x01 \x01(\x08H\x00\x121\x0A\x0Bupdate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x10\x0A\x0Econdition_type\"\xA9\x02\x0A\x12TransactionOptions\x12E\x0A\x09read_only\x18\x02 \x01(\x0B20.google.firestore.v1.TransactionOptions.ReadOnlyH\x00\x12G\x0A\x0Aread_write\x18\x03 \x01(\x0B21.google.firestore.v1.TransactionOptions.ReadWriteH\x00\x1A&\x0A\x09ReadWrite\x12\x19\x0A\x11retry_transaction\x18\x01 \x01(\x0C\x1AS\x0A\x08ReadOnly\x12/\x0A\x09read_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x16\x0A\x14consistency_selectorB\x06\x0A\x04modeB\xC3\x01\x0A\x17com.google.firestore.v1B\x0BCommonProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php deleted file mode 100644 index 64e7b3cca1d6..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Document.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x9E\x0F\x0A\"google/firestore/v1/document.proto\x12\x13google.firestore.v1\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x18google/type/latlng.proto\"\x80\x02\x0A\x08Document\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x129\x0A\x06fields\x18\x02 \x03(\x0B2).google.firestore.v1.Document.FieldsEntry\x12/\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x1AI\x0A\x0BFieldsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01\"\xE5\x04\x0A\x05Value\x120\x0A\x0Anull_value\x18\x0B \x01(\x0E2\x1A.google.protobuf.NullValueH\x00\x12\x17\x0A\x0Dboolean_value\x18\x01 \x01(\x08H\x00\x12\x17\x0A\x0Dinteger_value\x18\x02 \x01(\x03H\x00\x12\x16\x0A\x0Cdouble_value\x18\x03 \x01(\x01H\x00\x125\x0A\x0Ftimestamp_value\x18\x0A \x01(\x0B2\x1A.google.protobuf.TimestampH\x00\x12\x16\x0A\x0Cstring_value\x18\x11 \x01(\x09H\x00\x12\x15\x0A\x0Bbytes_value\x18\x12 \x01(\x0CH\x00\x12\x19\x0A\x0Freference_value\x18\x05 \x01(\x09H\x00\x12.\x0A\x0Fgeo_point_value\x18\x08 \x01(\x0B2\x13.google.type.LatLngH\x00\x126\x0A\x0Barray_value\x18\x09 \x01(\x0B2\x1F.google.firestore.v1.ArrayValueH\x00\x122\x0A\x09map_value\x18\x06 \x01(\x0B2\x1D.google.firestore.v1.MapValueH\x00\x12\x1F\x0A\x15field_reference_value\x18\x13 \x01(\x09H\x00\x12\"\x0A\x18variable_reference_value\x18\x16 \x01(\x09H\x00\x127\x0A\x0Efunction_value\x18\x14 \x01(\x0B2\x1D.google.firestore.v1.FunctionH\x00\x127\x0A\x0Epipeline_value\x18\x15 \x01(\x0B2\x1D.google.firestore.v1.PipelineH\x00B\x0C\x0A\x0Avalue_type\"8\x0A\x0AArrayValue\x12*\x0A\x06values\x18\x01 \x03(\x0B2\x1A.google.firestore.v1.Value\"\x90\x01\x0A\x08MapValue\x129\x0A\x06fields\x18\x01 \x03(\x0B2).google.firestore.v1.MapValue.FieldsEntry\x1AI\x0A\x0BFieldsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01\"\xDA\x01\x0A\x08Function\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12-\x0A\x04args\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.ValueB\x03\xE0A\x01\x12@\x0A\x07options\x18\x03 \x03(\x0B2*.google.firestore.v1.Function.OptionsEntryB\x03\xE0A\x01\x1AJ\x0A\x0COptionsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01\"\xA4\x02\x0A\x08Pipeline\x128\x0A\x06stages\x18\x01 \x03(\x0B2#.google.firestore.v1.Pipeline.StageB\x03\xE0A\x02\x1A\xDD\x01\x0A\x05Stage\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12-\x0A\x04args\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.ValueB\x03\xE0A\x01\x12F\x0A\x07options\x18\x03 \x03(\x0B20.google.firestore.v1.Pipeline.Stage.OptionsEntryB\x03\xE0A\x01\x1AJ\x0A\x0COptionsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01B\xC5\x01\x0A\x17com.google.firestore.v1B\x0DDocumentProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/ExplainStats.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/ExplainStats.php deleted file mode 100644 index bd54bc8f349b..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/ExplainStats.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xBF\x02\x0A'google/firestore/v1/explain_stats.proto\x12\x13google.firestore.v1\"2\x0A\x0CExplainStats\x12\"\x0A\x04data\x18\x01 \x01(\x0B2\x14.google.protobuf.AnyB\xC2\x01\x0A\x17com.google.firestore.v1B\x11ExplainStatsProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php deleted file mode 100644 index d18d15619ddc..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Firestore.php +++ /dev/null @@ -1,40 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xCFT\x0A#google/firestore/v1/firestore.proto\x12\x13google.firestore.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x18google/api/routing.proto\x1A,google/firestore/v1/aggregation_result.proto\x1A google/firestore/v1/common.proto\x1A\"google/firestore/v1/document.proto\x1A'google/firestore/v1/explain_stats.proto\x1A\"google/firestore/v1/pipeline.proto\x1A\x1Fgoogle/firestore/v1/query.proto\x1A'google/firestore/v1/query_profile.proto\x1A\x1Fgoogle/firestore/v1/write.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Egoogle/protobuf/wrappers.proto\x1A\x17google/rpc/status.proto\"\xB8\x01\x0A\x12GetDocumentRequest\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12/\x0A\x04mask\x18\x02 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12\x15\x0A\x0Btransaction\x18\x03 \x01(\x0CH\x00\x12/\x0A\x09read_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x16\x0A\x14consistency_selector\"\xBB\x02\x0A\x14ListDocumentsRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1A\x0A\x0Dcollection_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x04 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x06 \x01(\x09B\x03\xE0A\x01\x124\x0A\x04mask\x18\x07 \x01(\x0B2!.google.firestore.v1.DocumentMaskB\x03\xE0A\x01\x12\x15\x0A\x0Btransaction\x18\x08 \x01(\x0CH\x00\x12/\x0A\x09read_time\x18\x0A \x01(\x0B2\x1A.google.protobuf.TimestampH\x00\x12\x14\x0A\x0Cshow_missing\x18\x0C \x01(\x08B\x16\x0A\x14consistency_selector\"b\x0A\x15ListDocumentsResponse\x120\x0A\x09documents\x18\x01 \x03(\x0B2\x1D.google.firestore.v1.Document\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xC4\x01\x0A\x15CreateDocumentRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1A\x0A\x0Dcollection_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x0Bdocument_id\x18\x03 \x01(\x09\x124\x0A\x08document\x18\x04 \x01(\x0B2\x1D.google.firestore.v1.DocumentB\x03\xE0A\x02\x12/\x0A\x04mask\x18\x05 \x01(\x0B2!.google.firestore.v1.DocumentMask\"\xF3\x01\x0A\x15UpdateDocumentRequest\x124\x0A\x08document\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.DocumentB\x03\xE0A\x02\x126\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12/\x0A\x04mask\x18\x03 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12;\x0A\x10current_document\x18\x04 \x01(\x0B2!.google.firestore.v1.Precondition\"g\x0A\x15DeleteDocumentRequest\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12;\x0A\x10current_document\x18\x02 \x01(\x0B2!.google.firestore.v1.Precondition\"\x99\x02\x0A\x18BatchGetDocumentsRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x11\x0A\x09documents\x18\x02 \x03(\x09\x12/\x0A\x04mask\x18\x03 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12\x15\x0A\x0Btransaction\x18\x04 \x01(\x0CH\x00\x12B\x0A\x0Fnew_transaction\x18\x05 \x01(\x0B2'.google.firestore.v1.TransactionOptionsH\x00\x12/\x0A\x09read_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x16\x0A\x14consistency_selector\"\xAC\x01\x0A\x19BatchGetDocumentsResponse\x12.\x0A\x05found\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.DocumentH\x00\x12\x11\x0A\x07missing\x18\x02 \x01(\x09H\x00\x12\x13\x0A\x0Btransaction\x18\x03 \x01(\x0C\x12-\x0A\x09read_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x08\x0A\x06result\"j\x0A\x17BeginTransactionRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x128\x0A\x07options\x18\x02 \x01(\x0B2'.google.firestore.v1.TransactionOptions\"/\x0A\x18BeginTransactionResponse\x12\x13\x0A\x0Btransaction\x18\x01 \x01(\x0C\"g\x0A\x0DCommitRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12*\x0A\x06writes\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.Write\x12\x13\x0A\x0Btransaction\x18\x03 \x01(\x0C\"z\x0A\x0ECommitResponse\x127\x0A\x0Dwrite_results\x18\x01 \x03(\x0B2 .google.firestore.v1.WriteResult\x12/\x0A\x0Bcommit_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\"B\x0A\x0FRollbackRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Btransaction\x18\x02 \x01(\x0CB\x03\xE0A\x02\"\xDD\x02\x0A\x0FRunQueryRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12@\x0A\x10structured_query\x18\x02 \x01(\x0B2\$.google.firestore.v1.StructuredQueryH\x00\x12\x15\x0A\x0Btransaction\x18\x05 \x01(\x0CH\x01\x12B\x0A\x0Fnew_transaction\x18\x06 \x01(\x0B2'.google.firestore.v1.TransactionOptionsH\x01\x12/\x0A\x09read_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampH\x01\x12A\x0A\x0Fexplain_options\x18\x0A \x01(\x0B2#.google.firestore.v1.ExplainOptionsB\x03\xE0A\x01B\x0C\x0A\x0Aquery_typeB\x16\x0A\x14consistency_selector\"\x87\x02\x0A\x10RunQueryResponse\x12\x13\x0A\x0Btransaction\x18\x02 \x01(\x0C\x12/\x0A\x08document\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.Document\x12-\x0A\x09read_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x17\x0A\x0Fskipped_results\x18\x04 \x01(\x05\x12\x0E\x0A\x04done\x18\x06 \x01(\x08H\x00\x12<\x0A\x0Fexplain_metrics\x18\x0B \x01(\x0B2#.google.firestore.v1.ExplainMetricsB\x17\x0A\x15continuation_selector\"\xAC\x02\x0A\x16ExecutePipelineRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12F\x0A\x13structured_pipeline\x18\x02 \x01(\x0B2'.google.firestore.v1.StructuredPipelineH\x00\x12\x15\x0A\x0Btransaction\x18\x05 \x01(\x0CH\x01\x12B\x0A\x0Fnew_transaction\x18\x06 \x01(\x0B2'.google.firestore.v1.TransactionOptionsH\x01\x12/\x0A\x09read_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampH\x01B\x0F\x0A\x0Dpipeline_typeB\x16\x0A\x14consistency_selector\"\xCC\x01\x0A\x17ExecutePipelineResponse\x12\x13\x0A\x0Btransaction\x18\x01 \x01(\x0C\x12.\x0A\x07results\x18\x02 \x03(\x0B2\x1D.google.firestore.v1.Document\x122\x0A\x0Eexecution_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x128\x0A\x0Dexplain_stats\x18\x04 \x01(\x0B2!.google.firestore.v1.ExplainStats\"\xFF\x02\x0A\x1ARunAggregationQueryRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12W\x0A\x1Cstructured_aggregation_query\x18\x02 \x01(\x0B2/.google.firestore.v1.StructuredAggregationQueryH\x00\x12\x15\x0A\x0Btransaction\x18\x04 \x01(\x0CH\x01\x12B\x0A\x0Fnew_transaction\x18\x05 \x01(\x0B2'.google.firestore.v1.TransactionOptionsH\x01\x12/\x0A\x09read_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampH\x01\x12A\x0A\x0Fexplain_options\x18\x08 \x01(\x0B2#.google.firestore.v1.ExplainOptionsB\x03\xE0A\x01B\x0C\x0A\x0Aquery_typeB\x16\x0A\x14consistency_selector\"\xD7\x01\x0A\x1BRunAggregationQueryResponse\x126\x0A\x06result\x18\x01 \x01(\x0B2&.google.firestore.v1.AggregationResult\x12\x13\x0A\x0Btransaction\x18\x02 \x01(\x0C\x12-\x0A\x09read_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12<\x0A\x0Fexplain_metrics\x18\x0A \x01(\x0B2#.google.firestore.v1.ExplainMetrics\"\x85\x02\x0A\x15PartitionQueryRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12@\x0A\x10structured_query\x18\x02 \x01(\x0B2\$.google.firestore.v1.StructuredQueryH\x00\x12\x17\x0A\x0Fpartition_count\x18\x03 \x01(\x03\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\x12\x11\x0A\x09page_size\x18\x05 \x01(\x05\x12/\x0A\x09read_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampH\x01B\x0C\x0A\x0Aquery_typeB\x16\x0A\x14consistency_selector\"b\x0A\x16PartitionQueryResponse\x12/\x0A\x0Apartitions\x18\x01 \x03(\x0B2\x1B.google.firestore.v1.Cursor\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xE8\x01\x0A\x0CWriteRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x11\x0A\x09stream_id\x18\x02 \x01(\x09\x12*\x0A\x06writes\x18\x03 \x03(\x0B2\x1A.google.firestore.v1.Write\x12\x14\x0A\x0Cstream_token\x18\x04 \x01(\x0C\x12=\x0A\x06labels\x18\x05 \x03(\x0B2-.google.firestore.v1.WriteRequest.LabelsEntry\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\xA2\x01\x0A\x0DWriteResponse\x12\x11\x0A\x09stream_id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cstream_token\x18\x02 \x01(\x0C\x127\x0A\x0Dwrite_results\x18\x03 \x03(\x0B2 .google.firestore.v1.WriteResult\x12/\x0A\x0Bcommit_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\xF2\x01\x0A\x0DListenRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x121\x0A\x0Aadd_target\x18\x02 \x01(\x0B2\x1B.google.firestore.v1.TargetH\x00\x12\x17\x0A\x0Dremove_target\x18\x03 \x01(\x05H\x00\x12>\x0A\x06labels\x18\x04 \x03(\x0B2..google.firestore.v1.ListenRequest.LabelsEntry\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01B\x0F\x0A\x0Dtarget_change\"\xD5\x02\x0A\x0EListenResponse\x12:\x0A\x0Dtarget_change\x18\x02 \x01(\x0B2!.google.firestore.v1.TargetChangeH\x00\x12>\x0A\x0Fdocument_change\x18\x03 \x01(\x0B2#.google.firestore.v1.DocumentChangeH\x00\x12>\x0A\x0Fdocument_delete\x18\x04 \x01(\x0B2#.google.firestore.v1.DocumentDeleteH\x00\x12>\x0A\x0Fdocument_remove\x18\x06 \x01(\x0B2#.google.firestore.v1.DocumentRemoveH\x00\x126\x0A\x06filter\x18\x05 \x01(\x0B2\$.google.firestore.v1.ExistenceFilterH\x00B\x0F\x0A\x0Dresponse_type\"\xD6\x03\x0A\x06Target\x128\x0A\x05query\x18\x02 \x01(\x0B2'.google.firestore.v1.Target.QueryTargetH\x00\x12@\x0A\x09documents\x18\x03 \x01(\x0B2+.google.firestore.v1.Target.DocumentsTargetH\x00\x12\x16\x0A\x0Cresume_token\x18\x04 \x01(\x0CH\x01\x12/\x0A\x09read_time\x18\x0B \x01(\x0B2\x1A.google.protobuf.TimestampH\x01\x12\x11\x0A\x09target_id\x18\x05 \x01(\x05\x12\x0C\x0A\x04once\x18\x06 \x01(\x08\x123\x0A\x0Eexpected_count\x18\x0C \x01(\x0B2\x1B.google.protobuf.Int32Value\x1A\$\x0A\x0FDocumentsTarget\x12\x11\x0A\x09documents\x18\x02 \x03(\x09\x1Am\x0A\x0BQueryTarget\x12\x0E\x0A\x06parent\x18\x01 \x01(\x09\x12@\x0A\x10structured_query\x18\x02 \x01(\x0B2\$.google.firestore.v1.StructuredQueryH\x00B\x0C\x0A\x0Aquery_typeB\x0D\x0A\x0Btarget_typeB\x0D\x0A\x0Bresume_type\"\xAA\x02\x0A\x0CTargetChange\x12N\x0A\x12target_change_type\x18\x01 \x01(\x0E22.google.firestore.v1.TargetChange.TargetChangeType\x12\x12\x0A\x0Atarget_ids\x18\x02 \x03(\x05\x12!\x0A\x05cause\x18\x03 \x01(\x0B2\x12.google.rpc.Status\x12\x14\x0A\x0Cresume_token\x18\x04 \x01(\x0C\x12-\x0A\x09read_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.Timestamp\"N\x0A\x10TargetChangeType\x12\x0D\x0A\x09NO_CHANGE\x10\x00\x12\x07\x0A\x03ADD\x10\x01\x12\x0A\x0A\x06REMOVE\x10\x02\x12\x0B\x0A\x07CURRENT\x10\x03\x12\x09\x0A\x05RESET\x10\x04\"\x9F\x01\x0A\x18ListCollectionIdsRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12/\x0A\x09read_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampH\x00B\x16\x0A\x14consistency_selector\"L\x0A\x19ListCollectionIdsResponse\x12\x16\x0A\x0Ecollection_ids\x18\x01 \x03(\x09\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xC9\x01\x0A\x11BatchWriteRequest\x12\x15\x0A\x08database\x18\x01 \x01(\x09B\x03\xE0A\x02\x12*\x0A\x06writes\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.Write\x12B\x0A\x06labels\x18\x03 \x03(\x0B22.google.firestore.v1.BatchWriteRequest.LabelsEntry\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"q\x0A\x12BatchWriteResponse\x127\x0A\x0Dwrite_results\x18\x01 \x03(\x0B2 .google.firestore.v1.WriteResult\x12\"\x0A\x06status\x18\x02 \x03(\x0B2\x12.google.rpc.Status2\xFB\x1B\x0A\x09Firestore\x12\x8F\x01\x0A\x0BGetDocument\x12'.google.firestore.v1.GetDocumentRequest\x1A\x1D.google.firestore.v1.Document\"8\x82\xD3\xE4\x93\x022\x120/v1/{name=projects/*/databases/*/documents/*/**}\x12\xF5\x01\x0A\x0DListDocuments\x12).google.firestore.v1.ListDocumentsRequest\x1A*.google.firestore.v1.ListDocumentsResponse\"\x8C\x01\x82\xD3\xE4\x93\x02\x85\x01\x12B/v1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}Z?\x12=/v1/{parent=projects/*/databases/*/documents}/{collection_id}\x12\xBF\x01\x0A\x0EUpdateDocument\x12*.google.firestore.v1.UpdateDocumentRequest\x1A\x1D.google.firestore.v1.Document\"b\xDAA\x14document,update_mask\x82\xD3\xE4\x93\x02E29/v1/{document.name=projects/*/databases/*/documents/*/**}:\x08document\x12\x95\x01\x0A\x0EDeleteDocument\x12*.google.firestore.v1.DeleteDocumentRequest\x1A\x16.google.protobuf.Empty\"?\xDAA\x04name\x82\xD3\xE4\x93\x022*0/v1/{name=projects/*/databases/*/documents/*/**}\x12\xB9\x01\x0A\x11BatchGetDocuments\x12-.google.firestore.v1.BatchGetDocumentsRequest\x1A..google.firestore.v1.BatchGetDocumentsResponse\"C\x82\xD3\xE4\x93\x02=\"8/v1/{database=projects/*/databases/*}/documents:batchGet:\x01*0\x01\x12\xC7\x01\x0A\x10BeginTransaction\x12,.google.firestore.v1.BeginTransactionRequest\x1A-.google.firestore.v1.BeginTransactionResponse\"V\xDAA\x08database\x82\xD3\xE4\x93\x02E\"@/v1/{database=projects/*/databases/*}/documents:beginTransaction:\x01*\x12\xA6\x01\x0A\x06Commit\x12\".google.firestore.v1.CommitRequest\x1A#.google.firestore.v1.CommitResponse\"S\xDAA\x0Fdatabase,writes\x82\xD3\xE4\x93\x02;\"6/v1/{database=projects/*/databases/*}/documents:commit:\x01*\x12\xA4\x01\x0A\x08Rollback\x12\$.google.firestore.v1.RollbackRequest\x1A\x16.google.protobuf.Empty\"Z\xDAA\x14database,transaction\x82\xD3\xE4\x93\x02=\"8/v1/{database=projects/*/databases/*}/documents:rollback:\x01*\x12\xDF\x01\x0A\x08RunQuery\x12\$.google.firestore.v1.RunQueryRequest\x1A%.google.firestore.v1.RunQueryResponse\"\x83\x01\x82\xD3\xE4\x93\x02}\"6/v1/{parent=projects/*/databases/*/documents}:runQuery:\x01*Z@\";/v1/{parent=projects/*/databases/*/documents/*/**}:runQuery:\x01*0\x01\x12\x9E\x02\x0A\x0FExecutePipeline\x12+.google.firestore.v1.ExecutePipelineRequest\x1A,.google.firestore.v1.ExecutePipelineResponse\"\xAD\x01\x82\xD3\xE4\x93\x02D\"?/v1/{database=projects/*/databases/*}/documents:executePipeline:\x01*\x8A\xD3\xE4\x93\x02]\x12&\x0A\x08database\x12\x1Aprojects/{project_id=*}/**\x123\x0A\x08database\x12'projects/*/databases/{database_id=*}/**0\x01\x12\x97\x02\x0A\x13RunAggregationQuery\x12/.google.firestore.v1.RunAggregationQueryRequest\x1A0.google.firestore.v1.RunAggregationQueryResponse\"\x9A\x01\x82\xD3\xE4\x93\x02\x93\x01\"A/v1/{parent=projects/*/databases/*/documents}:runAggregationQuery:\x01*ZK\"F/v1/{parent=projects/*/databases/*/documents/*/**}:runAggregationQuery:\x01*0\x01\x12\xFC\x01\x0A\x0EPartitionQuery\x12*.google.firestore.v1.PartitionQueryRequest\x1A+.google.firestore.v1.PartitionQueryResponse\"\x90\x01\x82\xD3\xE4\x93\x02\x89\x01\"internalAddGeneratedFile( - "\x0A\x92\x04\x0A\"google/firestore/v1/pipeline.proto\x12\x13google.firestore.v1\x1A\"google/firestore/v1/document.proto\"\xE2\x01\x0A\x12StructuredPipeline\x124\x0A\x08pipeline\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.PipelineB\x03\xE0A\x02\x12J\x0A\x07options\x18\x02 \x03(\x0B24.google.firestore.v1.StructuredPipeline.OptionsEntryB\x03\xE0A\x01\x1AJ\x0A\x0COptionsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12)\x0A\x05value\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.Value:\x028\x01B\xC5\x01\x0A\x17com.google.firestore.v1B\x0DPipelineProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php deleted file mode 100644 index 7b9b9c57d1aa..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Query.php +++ /dev/null @@ -1,27 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC3\x1C\x0A\x1Fgoogle/firestore/v1/query.proto\x12\x13google.firestore.v1\x1A\"google/firestore/v1/document.proto\x1A\x1Egoogle/protobuf/wrappers.proto\"\xF8\x13\x0A\x0FStructuredQuery\x12?\x0A\x06select\x18\x01 \x01(\x0B2/.google.firestore.v1.StructuredQuery.Projection\x12E\x0A\x04from\x18\x02 \x03(\x0B27.google.firestore.v1.StructuredQuery.CollectionSelector\x12:\x0A\x05where\x18\x03 \x01(\x0B2+.google.firestore.v1.StructuredQuery.Filter\x12<\x0A\x08order_by\x18\x04 \x03(\x0B2*.google.firestore.v1.StructuredQuery.Order\x12-\x0A\x08start_at\x18\x07 \x01(\x0B2\x1B.google.firestore.v1.Cursor\x12+\x0A\x06end_at\x18\x08 \x01(\x0B2\x1B.google.firestore.v1.Cursor\x12\x0E\x0A\x06offset\x18\x06 \x01(\x05\x12*\x0A\x05limit\x18\x05 \x01(\x0B2\x1B.google.protobuf.Int32Value\x12K\x0A\x0Cfind_nearest\x18\x09 \x01(\x0B20.google.firestore.v1.StructuredQuery.FindNearestB\x03\xE0A\x01\x1AD\x0A\x12CollectionSelector\x12\x15\x0A\x0Dcollection_id\x18\x02 \x01(\x09\x12\x17\x0A\x0Fall_descendants\x18\x03 \x01(\x08\x1A\xFD\x01\x0A\x06Filter\x12P\x0A\x10composite_filter\x18\x01 \x01(\x0B24.google.firestore.v1.StructuredQuery.CompositeFilterH\x00\x12H\x0A\x0Cfield_filter\x18\x02 \x01(\x0B20.google.firestore.v1.StructuredQuery.FieldFilterH\x00\x12H\x0A\x0Cunary_filter\x18\x03 \x01(\x0B20.google.firestore.v1.StructuredQuery.UnaryFilterH\x00B\x0D\x0A\x0Bfilter_type\x1A\xD1\x01\x0A\x0FCompositeFilter\x12I\x0A\x02op\x18\x01 \x01(\x0E2=.google.firestore.v1.StructuredQuery.CompositeFilter.Operator\x12<\x0A\x07filters\x18\x02 \x03(\x0B2+.google.firestore.v1.StructuredQuery.Filter\"5\x0A\x08Operator\x12\x18\x0A\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x07\x0A\x03AND\x10\x01\x12\x06\x0A\x02OR\x10\x02\x1A\x98\x03\x0A\x0BFieldFilter\x12B\x0A\x05field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReference\x12E\x0A\x02op\x18\x02 \x01(\x0E29.google.firestore.v1.StructuredQuery.FieldFilter.Operator\x12)\x0A\x05value\x18\x03 \x01(\x0B2\x1A.google.firestore.v1.Value\"\xD2\x01\x0A\x08Operator\x12\x18\x0A\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09LESS_THAN\x10\x01\x12\x16\x0A\x12LESS_THAN_OR_EQUAL\x10\x02\x12\x10\x0A\x0CGREATER_THAN\x10\x03\x12\x19\x0A\x15GREATER_THAN_OR_EQUAL\x10\x04\x12\x09\x0A\x05EQUAL\x10\x05\x12\x0D\x0A\x09NOT_EQUAL\x10\x06\x12\x12\x0A\x0EARRAY_CONTAINS\x10\x07\x12\x06\x0A\x02IN\x10\x08\x12\x16\x0A\x12ARRAY_CONTAINS_ANY\x10\x09\x12\x0A\x0A\x06NOT_IN\x10\x0A\x1A\x8A\x02\x0A\x0BUnaryFilter\x12E\x0A\x02op\x18\x01 \x01(\x0E29.google.firestore.v1.StructuredQuery.UnaryFilter.Operator\x12D\x0A\x05field\x18\x02 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReferenceH\x00\"^\x0A\x08Operator\x12\x18\x0A\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06IS_NAN\x10\x02\x12\x0B\x0A\x07IS_NULL\x10\x03\x12\x0E\x0A\x0AIS_NOT_NAN\x10\x04\x12\x0F\x0A\x0BIS_NOT_NULL\x10\x05B\x0E\x0A\x0Coperand_type\x1A\x8E\x01\x0A\x05Order\x12B\x0A\x05field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReference\x12A\x0A\x09direction\x18\x02 \x01(\x0E2..google.firestore.v1.StructuredQuery.Direction\x1A\$\x0A\x0EFieldReference\x12\x12\x0A\x0Afield_path\x18\x02 \x01(\x09\x1AQ\x0A\x0AProjection\x12C\x0A\x06fields\x18\x02 \x03(\x0B23.google.firestore.v1.StructuredQuery.FieldReference\x1A\xEA\x03\x0A\x0BFindNearest\x12N\x0A\x0Cvector_field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReferenceB\x03\xE0A\x02\x125\x0A\x0Cquery_vector\x18\x02 \x01(\x0B2\x1A.google.firestore.v1.ValueB\x03\xE0A\x02\x12_\x0A\x10distance_measure\x18\x03 \x01(\x0E2@.google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasureB\x03\xE0A\x02\x12/\x0A\x05limit\x18\x04 \x01(\x0B2\x1B.google.protobuf.Int32ValueB\x03\xE0A\x02\x12\"\x0A\x15distance_result_field\x18\x05 \x01(\x09B\x03\xE0A\x01\x12=\x0A\x12distance_threshold\x18\x06 \x01(\x0B2\x1C.google.protobuf.DoubleValueB\x03\xE0A\x01\"_\x0A\x0FDistanceMeasure\x12 \x0A\x1CDISTANCE_MEASURE_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09EUCLIDEAN\x10\x01\x12\x0A\x0A\x06COSINE\x10\x02\x12\x0F\x0A\x0BDOT_PRODUCT\x10\x03\"E\x0A\x09Direction\x12\x19\x0A\x15DIRECTION_UNSPECIFIED\x10\x00\x12\x0D\x0A\x09ASCENDING\x10\x01\x12\x0E\x0A\x0ADESCENDING\x10\x02\"\xB8\x05\x0A\x1AStructuredAggregationQuery\x12@\x0A\x10structured_query\x18\x01 \x01(\x0B2\$.google.firestore.v1.StructuredQueryH\x00\x12V\x0A\x0Caggregations\x18\x03 \x03(\x0B2;.google.firestore.v1.StructuredAggregationQuery.AggregationB\x03\xE0A\x01\x1A\xF1\x03\x0A\x0BAggregation\x12R\x0A\x05count\x18\x01 \x01(\x0B2A.google.firestore.v1.StructuredAggregationQuery.Aggregation.CountH\x00\x12N\x0A\x03sum\x18\x02 \x01(\x0B2?.google.firestore.v1.StructuredAggregationQuery.Aggregation.SumH\x00\x12N\x0A\x03avg\x18\x03 \x01(\x0B2?.google.firestore.v1.StructuredAggregationQuery.Aggregation.AvgH\x00\x12\x12\x0A\x05alias\x18\x07 \x01(\x09B\x03\xE0A\x01\x1A8\x0A\x05Count\x12/\x0A\x05up_to\x18\x01 \x01(\x0B2\x1B.google.protobuf.Int64ValueB\x03\xE0A\x01\x1AI\x0A\x03Sum\x12B\x0A\x05field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReference\x1AI\x0A\x03Avg\x12B\x0A\x05field\x18\x01 \x01(\x0B23.google.firestore.v1.StructuredQuery.FieldReferenceB\x0A\x0A\x08operatorB\x0C\x0A\x0Aquery_type\"D\x0A\x06Cursor\x12*\x0A\x06values\x18\x01 \x03(\x0B2\x1A.google.firestore.v1.Value\x12\x0E\x0A\x06before\x18\x02 \x01(\x08B\xC2\x01\x0A\x17com.google.firestore.v1B\x0AQueryProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/QueryProfile.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/QueryProfile.php deleted file mode 100644 index 76b015b86594..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/QueryProfile.php +++ /dev/null @@ -1,27 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xEA\x05\x0A'google/firestore/v1/query_profile.proto\x12\x13google.firestore.v1\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Cgoogle/protobuf/struct.proto\"&\x0A\x0EExplainOptions\x12\x14\x0A\x07analyze\x18\x01 \x01(\x08B\x03\xE0A\x01\"\x86\x01\x0A\x0EExplainMetrics\x126\x0A\x0Cplan_summary\x18\x01 \x01(\x0B2 .google.firestore.v1.PlanSummary\x12<\x0A\x0Fexecution_stats\x18\x02 \x01(\x0B2#.google.firestore.v1.ExecutionStats\"<\x0A\x0BPlanSummary\x12-\x0A\x0Cindexes_used\x18\x01 \x03(\x0B2\x17.google.protobuf.Struct\"\xA8\x01\x0A\x0EExecutionStats\x12\x18\x0A\x10results_returned\x18\x01 \x01(\x03\x125\x0A\x12execution_duration\x18\x03 \x01(\x0B2\x19.google.protobuf.Duration\x12\x17\x0A\x0Fread_operations\x18\x04 \x01(\x03\x12,\x0A\x0Bdebug_stats\x18\x05 \x01(\x0B2\x17.google.protobuf.StructB\xC9\x01\x0A\x17com.google.firestore.v1B\x11QueryProfileProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php b/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php deleted file mode 100644 index d8c00fd19204..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/GPBMetadata/Google/Firestore/V1/Write.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xE8\x0E\x0A\x1Fgoogle/firestore/v1/write.proto\x12\x13google.firestore.v1\x1A google/firestore/v1/common.proto\x1A\"google/firestore/v1/document.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xDB\x02\x0A\x05Write\x12/\x0A\x06update\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.DocumentH\x00\x12\x10\x0A\x06delete\x18\x02 \x01(\x09H\x00\x12;\x0A\x09transform\x18\x06 \x01(\x0B2&.google.firestore.v1.DocumentTransformH\x00\x126\x0A\x0Bupdate_mask\x18\x03 \x01(\x0B2!.google.firestore.v1.DocumentMask\x12P\x0A\x11update_transforms\x18\x07 \x03(\x0B25.google.firestore.v1.DocumentTransform.FieldTransform\x12;\x0A\x10current_document\x18\x04 \x01(\x0B2!.google.firestore.v1.PreconditionB\x0B\x0A\x09operation\"\xE5\x04\x0A\x11DocumentTransform\x12\x10\x0A\x08document\x18\x01 \x01(\x09\x12O\x0A\x10field_transforms\x18\x02 \x03(\x0B25.google.firestore.v1.DocumentTransform.FieldTransform\x1A\xEC\x03\x0A\x0EFieldTransform\x12\x12\x0A\x0Afield_path\x18\x01 \x01(\x09\x12`\x0A\x13set_to_server_value\x18\x02 \x01(\x0E2A.google.firestore.v1.DocumentTransform.FieldTransform.ServerValueH\x00\x12/\x0A\x09increment\x18\x03 \x01(\x0B2\x1A.google.firestore.v1.ValueH\x00\x12-\x0A\x07maximum\x18\x04 \x01(\x0B2\x1A.google.firestore.v1.ValueH\x00\x12-\x0A\x07minimum\x18\x05 \x01(\x0B2\x1A.google.firestore.v1.ValueH\x00\x12B\x0A\x17append_missing_elements\x18\x06 \x01(\x0B2\x1F.google.firestore.v1.ArrayValueH\x00\x12@\x0A\x15remove_all_from_array\x18\x07 \x01(\x0B2\x1F.google.firestore.v1.ArrayValueH\x00\"=\x0A\x0BServerValue\x12\x1C\x0A\x18SERVER_VALUE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CREQUEST_TIME\x10\x01B\x10\x0A\x0Etransform_type\"u\x0A\x0BWriteResult\x12/\x0A\x0Bupdate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x125\x0A\x11transform_results\x18\x02 \x03(\x0B2\x1A.google.firestore.v1.Value\"q\x0A\x0EDocumentChange\x12/\x0A\x08document\x18\x01 \x01(\x0B2\x1D.google.firestore.v1.Document\x12\x12\x0A\x0Atarget_ids\x18\x05 \x03(\x05\x12\x1A\x0A\x12removed_target_ids\x18\x06 \x03(\x05\"m\x0A\x0EDocumentDelete\x12\x10\x0A\x08document\x18\x01 \x01(\x09\x12\x1A\x0A\x12removed_target_ids\x18\x06 \x03(\x05\x12-\x0A\x09read_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"m\x0A\x0EDocumentRemove\x12\x10\x0A\x08document\x18\x01 \x01(\x09\x12\x1A\x0A\x12removed_target_ids\x18\x02 \x03(\x05\x12-\x0A\x09read_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\"n\x0A\x0FExistenceFilter\x12\x11\x0A\x09target_id\x18\x01 \x01(\x05\x12\x0D\x0A\x05count\x18\x02 \x01(\x05\x129\x0A\x0Funchanged_names\x18\x03 \x01(\x0B2 .google.firestore.v1.BloomFilterB\xC2\x01\x0A\x17com.google.firestore.v1B\x0AWriteProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xA2\x02\x04GCFS\xAA\x02\x19Google.Cloud.Firestore.V1\xCA\x02\x19Google\\Cloud\\Firestore\\V1\xEA\x02\x1CGoogle::Cloud::Firestore::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php deleted file mode 100644 index f7296b1c7d2e..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/AggregationResult.php +++ /dev/null @@ -1,86 +0,0 @@ -google.firestore.v1.AggregationResult - */ -class AggregationResult extends \Google\Protobuf\Internal\Message -{ - /** - * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. - * The key is the - * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] - * assigned to the aggregation function on input and the size of this map - * equals the number of aggregation functions in the query. - * - * Generated from protobuf field map aggregate_fields = 2; - */ - private $aggregate_fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $aggregate_fields - * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. - * The key is the - * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] - * assigned to the aggregation function on input and the size of this map - * equals the number of aggregation functions in the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\AggregationResult::initOnce(); - parent::__construct($data); - } - - /** - * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. - * The key is the - * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] - * assigned to the aggregation function on input and the size of this map - * equals the number of aggregation functions in the query. - * - * Generated from protobuf field map aggregate_fields = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAggregateFields() - { - return $this->aggregate_fields; - } - - /** - * The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. - * The key is the - * [alias][google.firestore.v1.StructuredAggregationQuery.Aggregation.alias] - * assigned to the aggregation function on input and the size of this map - * equals the number of aggregation functions in the query. - * - * Generated from protobuf field map aggregate_fields = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAggregateFields($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->aggregate_fields = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php deleted file mode 100644 index 8d770c6e90db..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ArrayValue.php +++ /dev/null @@ -1,67 +0,0 @@ -google.firestore.v1.ArrayValue - */ -class ArrayValue extends \Google\Protobuf\Internal\Message -{ - /** - * Values in the array. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - */ - private $values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Value[] $values - * Values in the array. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Values in the array. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> - */ - public function getValues() - { - return $this->values; - } - - /** - * Values in the array. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - * @param \Google\Cloud\Firestore\V1\Value[] $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->values = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php deleted file mode 100644 index 0b845bb3b850..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsRequest.php +++ /dev/null @@ -1,296 +0,0 @@ -google.firestore.v1.BatchGetDocumentsRequest - */ -class BatchGetDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of the - * given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - */ - private $documents; - /** - * The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field will - * not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - */ - protected $mask = null; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type string[] $documents - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of the - * given `database`. Duplicate names will be elided. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field will - * not be returned in the response. - * @type string $transaction - * Reads documents in a transaction. - * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of the - * given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - * @return RepeatedField - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of the - * given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - * @param string[] $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->documents = $arr; - - return $this; - } - - /** - * The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field will - * not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field will - * not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - - /** - * Reads documents in a transaction. - * - * Generated from protobuf field bytes transaction = 4; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(4); - } - - public function hasTransaction() - { - return $this->hasOneof(4); - } - - /** - * Reads documents in a transaction. - * - * Generated from protobuf field bytes transaction = 4; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; - * @return \Google\Cloud\Firestore\V1\TransactionOptions|null - */ - public function getNewTransaction() - { - return $this->readOneof(5); - } - - public function hasNewTransaction() - { - return $this->hasOneof(5); - } - - /** - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; - * @param \Google\Cloud\Firestore\V1\TransactionOptions $var - * @return $this - */ - public function setNewTransaction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(7); - } - - public function hasReadTime() - { - return $this->hasOneof(7); - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php deleted file mode 100644 index 15ebf121f41b..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchGetDocumentsResponse.php +++ /dev/null @@ -1,214 +0,0 @@ -google.firestore.v1.BatchGetDocumentsResponse - */ -class BatchGetDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The transaction that was started as part of this request. - * Will only be set in the first response, and only if - * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] - * was set in the request. - * - * Generated from protobuf field bytes transaction = 3; - */ - protected $transaction = ''; - /** - * The time at which the document was read. - * This may be monotically increasing, in this case the previous documents in - * the result stream are guaranteed not to have changed between their - * read_time and this one. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - */ - protected $read_time = null; - protected $result; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Document $found - * A document that was requested. - * @type string $missing - * A document name that was requested but does not exist. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type string $transaction - * The transaction that was started as part of this request. - * Will only be set in the first response, and only if - * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] - * was set in the request. - * @type \Google\Protobuf\Timestamp $read_time - * The time at which the document was read. - * This may be monotically increasing, in this case the previous documents in - * the result stream are guaranteed not to have changed between their - * read_time and this one. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * A document that was requested. - * - * Generated from protobuf field .google.firestore.v1.Document found = 1; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getFound() - { - return $this->readOneof(1); - } - - public function hasFound() - { - return $this->hasOneof(1); - } - - /** - * A document that was requested. - * - * Generated from protobuf field .google.firestore.v1.Document found = 1; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setFound($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A document name that was requested but does not exist. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string missing = 2; - * @return string - */ - public function getMissing() - { - return $this->readOneof(2); - } - - public function hasMissing() - { - return $this->hasOneof(2); - } - - /** - * A document name that was requested but does not exist. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string missing = 2; - * @param string $var - * @return $this - */ - public function setMissing($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The transaction that was started as part of this request. - * Will only be set in the first response, and only if - * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] - * was set in the request. - * - * Generated from protobuf field bytes transaction = 3; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * The transaction that was started as part of this request. - * Will only be set in the first response, and only if - * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1.BatchGetDocumentsRequest.new_transaction] - * was set in the request. - * - * Generated from protobuf field bytes transaction = 3; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - - /** - * The time at which the document was read. - * This may be monotically increasing, in this case the previous documents in - * the result stream are guaranteed not to have changed between their - * read_time and this one. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The time at which the document was read. - * This may be monotically increasing, in this case the previous documents in - * the result stream are guaranteed not to have changed between their - * read_time and this one. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getResult() - { - return $this->whichOneof("result"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php deleted file mode 100644 index 1e475fa0e39f..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteRequest.php +++ /dev/null @@ -1,152 +0,0 @@ -google.firestore.v1.BatchWriteRequest - */ -class BatchWriteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The writes to apply. - * Method does not apply writes atomically and does not guarantee ordering. - * Each write succeeds or fails independently. You cannot write to the same - * document more than once per request. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - */ - private $writes; - /** - * Labels associated with this batch write. - * - * Generated from protobuf field map labels = 3; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type \Google\Cloud\Firestore\V1\Write[] $writes - * The writes to apply. - * Method does not apply writes atomically and does not guarantee ordering. - * Each write succeeds or fails independently. You cannot write to the same - * document more than once per request. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels associated with this batch write. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The writes to apply. - * Method does not apply writes atomically and does not guarantee ordering. - * Each write succeeds or fails independently. You cannot write to the same - * document more than once per request. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Write> - */ - public function getWrites() - { - return $this->writes; - } - - /** - * The writes to apply. - * Method does not apply writes atomically and does not guarantee ordering. - * Each write succeeds or fails independently. You cannot write to the same - * document more than once per request. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - * @param \Google\Cloud\Firestore\V1\Write[] $var - * @return $this - */ - public function setWrites($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); - $this->writes = $arr; - - return $this; - } - - /** - * Labels associated with this batch write. - * - * Generated from protobuf field map labels = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels associated with this batch write. - * - * Generated from protobuf field map labels = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php deleted file mode 100644 index b2da372d7a45..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BatchWriteResponse.php +++ /dev/null @@ -1,118 +0,0 @@ -google.firestore.v1.BatchWriteResponse - */ -class BatchWriteResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - */ - private $write_results; - /** - * The status of applying the writes. - * This i-th write status corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.rpc.Status status = 2; - */ - private $status; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\WriteResult[] $write_results - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * @type \Google\Rpc\Status[] $status - * The status of applying the writes. - * This i-th write status corresponds to the i-th write in the - * request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - * @return RepeatedField<\Google\Cloud\Firestore\V1\WriteResult> - */ - public function getWriteResults() - { - return $this->write_results; - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - * @param \Google\Cloud\Firestore\V1\WriteResult[] $var - * @return $this - */ - public function setWriteResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); - $this->write_results = $arr; - - return $this; - } - - /** - * The status of applying the writes. - * This i-th write status corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.rpc.Status status = 2; - * @return RepeatedField<\Google\Rpc\Status> - */ - public function getStatus() - { - return $this->status; - } - - /** - * The status of applying the writes. - * This i-th write status corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.rpc.Status status = 2; - * @param \Google\Rpc\Status[] $var - * @return $this - */ - public function setStatus($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->status = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php deleted file mode 100644 index ff5dc33718d1..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionRequest.php +++ /dev/null @@ -1,134 +0,0 @@ -google.firestore.v1.BeginTransactionRequest - */ -class BeginTransactionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The options for the transaction. - * Defaults to a read-write transaction. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; - */ - protected $options = null; - - /** - * @param string $database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * @return \Google\Cloud\Firestore\V1\BeginTransactionRequest - * - * @experimental - */ - public static function build(string $database): self - { - return (new self()) - ->setDatabase($database); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type \Google\Cloud\Firestore\V1\TransactionOptions $options - * The options for the transaction. - * Defaults to a read-write transaction. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The options for the transaction. - * Defaults to a read-write transaction. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; - * @return \Google\Cloud\Firestore\V1\TransactionOptions|null - */ - public function getOptions() - { - return $this->options; - } - - public function hasOptions() - { - return isset($this->options); - } - - public function clearOptions() - { - unset($this->options); - } - - /** - * The options for the transaction. - * Defaults to a read-write transaction. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions options = 2; - * @param \Google\Cloud\Firestore\V1\TransactionOptions $var - * @return $this - */ - public function setOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); - $this->options = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php deleted file mode 100644 index f790bd672f01..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BeginTransactionResponse.php +++ /dev/null @@ -1,68 +0,0 @@ -google.firestore.v1.BeginTransactionResponse - */ -class BeginTransactionResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The transaction that was started. - * - * Generated from protobuf field bytes transaction = 1; - */ - protected $transaction = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $transaction - * The transaction that was started. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The transaction that was started. - * - * Generated from protobuf field bytes transaction = 1; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * The transaction that was started. - * - * Generated from protobuf field bytes transaction = 1; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BitSequence.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BitSequence.php deleted file mode 100644 index 296bfb4a577f..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BitSequence.php +++ /dev/null @@ -1,124 +0,0 @@ -google.firestore.v1.BitSequence - */ -class BitSequence extends \Google\Protobuf\Internal\Message -{ - /** - * The bytes that encode the bit sequence. - * May have a length of zero. - * - * Generated from protobuf field bytes bitmap = 1; - */ - protected $bitmap = ''; - /** - * The number of bits of the last byte in `bitmap` to ignore as "padding". - * If the length of `bitmap` is zero, then this value must be `0`. - * Otherwise, this value must be between 0 and 7, inclusive. - * - * Generated from protobuf field int32 padding = 2; - */ - protected $padding = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $bitmap - * The bytes that encode the bit sequence. - * May have a length of zero. - * @type int $padding - * The number of bits of the last byte in `bitmap` to ignore as "padding". - * If the length of `bitmap` is zero, then this value must be `0`. - * Otherwise, this value must be between 0 and 7, inclusive. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\BloomFilter::initOnce(); - parent::__construct($data); - } - - /** - * The bytes that encode the bit sequence. - * May have a length of zero. - * - * Generated from protobuf field bytes bitmap = 1; - * @return string - */ - public function getBitmap() - { - return $this->bitmap; - } - - /** - * The bytes that encode the bit sequence. - * May have a length of zero. - * - * Generated from protobuf field bytes bitmap = 1; - * @param string $var - * @return $this - */ - public function setBitmap($var) - { - GPBUtil::checkString($var, False); - $this->bitmap = $var; - - return $this; - } - - /** - * The number of bits of the last byte in `bitmap` to ignore as "padding". - * If the length of `bitmap` is zero, then this value must be `0`. - * Otherwise, this value must be between 0 and 7, inclusive. - * - * Generated from protobuf field int32 padding = 2; - * @return int - */ - public function getPadding() - { - return $this->padding; - } - - /** - * The number of bits of the last byte in `bitmap` to ignore as "padding". - * If the length of `bitmap` is zero, then this value must be `0`. - * Otherwise, this value must be between 0 and 7, inclusive. - * - * Generated from protobuf field int32 padding = 2; - * @param int $var - * @return $this - */ - public function setPadding($var) - { - GPBUtil::checkInt32($var); - $this->padding = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BloomFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BloomFilter.php deleted file mode 100644 index 2760f1c7e40a..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/BloomFilter.php +++ /dev/null @@ -1,119 +0,0 @@ -google.firestore.v1.BloomFilter - */ -class BloomFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The bloom filter data. - * - * Generated from protobuf field .google.firestore.v1.BitSequence bits = 1; - */ - protected $bits = null; - /** - * The number of hashes used by the algorithm. - * - * Generated from protobuf field int32 hash_count = 2; - */ - protected $hash_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\BitSequence $bits - * The bloom filter data. - * @type int $hash_count - * The number of hashes used by the algorithm. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\BloomFilter::initOnce(); - parent::__construct($data); - } - - /** - * The bloom filter data. - * - * Generated from protobuf field .google.firestore.v1.BitSequence bits = 1; - * @return \Google\Cloud\Firestore\V1\BitSequence|null - */ - public function getBits() - { - return $this->bits; - } - - public function hasBits() - { - return isset($this->bits); - } - - public function clearBits() - { - unset($this->bits); - } - - /** - * The bloom filter data. - * - * Generated from protobuf field .google.firestore.v1.BitSequence bits = 1; - * @param \Google\Cloud\Firestore\V1\BitSequence $var - * @return $this - */ - public function setBits($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\BitSequence::class); - $this->bits = $var; - - return $this; - } - - /** - * The number of hashes used by the algorithm. - * - * Generated from protobuf field int32 hash_count = 2; - * @return int - */ - public function getHashCount() - { - return $this->hash_count; - } - - /** - * The number of hashes used by the algorithm. - * - * Generated from protobuf field int32 hash_count = 2; - * @param int $var - * @return $this - */ - public function setHashCount($var) - { - GPBUtil::checkInt32($var); - $this->hash_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php deleted file mode 100644 index 28a7f5186283..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.firestore.v1.CommitRequest - */ -class CommitRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The writes to apply. - * Always executed atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - */ - private $writes; - /** - * If set, applies all writes in this transaction, and commits it. - * - * Generated from protobuf field bytes transaction = 3; - */ - protected $transaction = ''; - - /** - * @param string $database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @param \Google\Cloud\Firestore\V1\Write[] $writes The writes to apply. - * - * Always executed atomically and in order. - * - * @return \Google\Cloud\Firestore\V1\CommitRequest - * - * @experimental - */ - public static function build(string $database, array $writes): self - { - return (new self()) - ->setDatabase($database) - ->setWrites($writes); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type \Google\Cloud\Firestore\V1\Write[] $writes - * The writes to apply. - * Always executed atomically and in order. - * @type string $transaction - * If set, applies all writes in this transaction, and commits it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The writes to apply. - * Always executed atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Write> - */ - public function getWrites() - { - return $this->writes; - } - - /** - * The writes to apply. - * Always executed atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 2; - * @param \Google\Cloud\Firestore\V1\Write[] $var - * @return $this - */ - public function setWrites($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); - $this->writes = $arr; - - return $this; - } - - /** - * If set, applies all writes in this transaction, and commits it. - * - * Generated from protobuf field bytes transaction = 3; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * If set, applies all writes in this transaction, and commits it. - * - * Generated from protobuf field bytes transaction = 3; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php deleted file mode 100644 index 9132548afe22..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CommitResponse.php +++ /dev/null @@ -1,123 +0,0 @@ -google.firestore.v1.CommitResponse - */ -class CommitResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - */ - private $write_results; - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the commit. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; - */ - protected $commit_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\WriteResult[] $write_results - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * @type \Google\Protobuf\Timestamp $commit_time - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the commit. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - * @return RepeatedField<\Google\Cloud\Firestore\V1\WriteResult> - */ - public function getWriteResults() - { - return $this->write_results; - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 1; - * @param \Google\Cloud\Firestore\V1\WriteResult[] $var - * @return $this - */ - public function setWriteResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); - $this->write_results = $arr; - - return $this; - } - - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the commit. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCommitTime() - { - return $this->commit_time; - } - - public function hasCommitTime() - { - return isset($this->commit_time); - } - - public function clearCommitTime() - { - unset($this->commit_time); - } - - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the commit. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCommitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->commit_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php deleted file mode 100644 index 7f77953b9837..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/CreateDocumentRequest.php +++ /dev/null @@ -1,248 +0,0 @@ -google.firestore.v1.CreateDocumentRequest - */ -class CreateDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource. For example: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. The collection ID, relative to `parent`, to list. For example: - * `chatrooms`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $collection_id = ''; - /** - * The client-assigned document ID to use for this document. - * Optional. If not specified, an ID will be assigned by the service. - * - * Generated from protobuf field string document_id = 3; - */ - protected $document_id = ''; - /** - * Required. The document to create. `name` must not be set. - * - * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; - */ - protected $mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource. For example: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - * @type string $collection_id - * Required. The collection ID, relative to `parent`, to list. For example: - * `chatrooms`. - * @type string $document_id - * The client-assigned document ID to use for this document. - * Optional. If not specified, an ID will be assigned by the service. - * @type \Google\Cloud\Firestore\V1\Document $document - * Required. The document to create. `name` must not be set. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource. For example: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource. For example: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The collection ID, relative to `parent`, to list. For example: - * `chatrooms`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getCollectionId() - { - return $this->collection_id; - } - - /** - * Required. The collection ID, relative to `parent`, to list. For example: - * `chatrooms`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setCollectionId($var) - { - GPBUtil::checkString($var, True); - $this->collection_id = $var; - - return $this; - } - - /** - * The client-assigned document ID to use for this document. - * Optional. If not specified, an ID will be assigned by the service. - * - * Generated from protobuf field string document_id = 3; - * @return string - */ - public function getDocumentId() - { - return $this->document_id; - } - - /** - * The client-assigned document ID to use for this document. - * Optional. If not specified, an ID will be assigned by the service. - * - * Generated from protobuf field string document_id = 3; - * @param string $var - * @return $this - */ - public function setDocumentId($var) - { - GPBUtil::checkString($var, True); - $this->document_id = $var; - - return $this; - } - - /** - * Required. The document to create. `name` must not be set. - * - * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. The document to create. `name` must not be set. - * - * Generated from protobuf field .google.firestore.v1.Document document = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 5; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php deleted file mode 100644 index fdf744e2c0e3..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Cursor.php +++ /dev/null @@ -1,113 +0,0 @@ -google.firestore.v1.Cursor - */ -class Cursor extends \Google\Protobuf\Internal\Message -{ - /** - * The values that represent a position, in the order they appear in - * the order by clause of a query. - * Can contain fewer values than specified in the order by clause. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - */ - private $values; - /** - * If the position is just before or just after the given values, relative - * to the sort order defined by the query. - * - * Generated from protobuf field bool before = 2; - */ - protected $before = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Value[] $values - * The values that represent a position, in the order they appear in - * the order by clause of a query. - * Can contain fewer values than specified in the order by clause. - * @type bool $before - * If the position is just before or just after the given values, relative - * to the sort order defined by the query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The values that represent a position, in the order they appear in - * the order by clause of a query. - * Can contain fewer values than specified in the order by clause. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> - */ - public function getValues() - { - return $this->values; - } - - /** - * The values that represent a position, in the order they appear in - * the order by clause of a query. - * Can contain fewer values than specified in the order by clause. - * - * Generated from protobuf field repeated .google.firestore.v1.Value values = 1; - * @param \Google\Cloud\Firestore\V1\Value[] $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->values = $arr; - - return $this; - } - - /** - * If the position is just before or just after the given values, relative - * to the sort order defined by the query. - * - * Generated from protobuf field bool before = 2; - * @return bool - */ - public function getBefore() - { - return $this->before; - } - - /** - * If the position is just before or just after the given values, relative - * to the sort order defined by the query. - * - * Generated from protobuf field bool before = 2; - * @param bool $var - * @return $this - */ - public function setBefore($var) - { - GPBUtil::checkBool($var); - $this->before = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php deleted file mode 100644 index a77ac38f9721..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DeleteDocumentRequest.php +++ /dev/null @@ -1,134 +0,0 @@ -google.firestore.v1.DeleteDocumentRequest - */ -class DeleteDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; - */ - protected $current_document = null; - - /** - * @param string $name Required. The resource name of the Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * @return \Google\Cloud\Firestore\V1\DeleteDocumentRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type \Google\Cloud\Firestore\V1\Precondition $current_document - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the Document to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; - * @return \Google\Cloud\Firestore\V1\Precondition|null - */ - public function getCurrentDocument() - { - return $this->current_document; - } - - public function hasCurrentDocument() - { - return isset($this->current_document); - } - - public function clearCurrentDocument() - { - unset($this->current_document); - } - - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 2; - * @param \Google\Cloud\Firestore\V1\Precondition $var - * @return $this - */ - public function setCurrentDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); - $this->current_document = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php deleted file mode 100644 index f858f1fe4e34..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Document.php +++ /dev/null @@ -1,290 +0,0 @@ -google.firestore.v1.Document - */ -class Document extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the document, for example - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The document's fields. - * The map keys represent field names. - * Field names matching the regular expression `__.*__` are reserved. Reserved - * field names are forbidden except in certain documented contexts. The field - * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be - * empty. - * Field paths may be used in other contexts to refer to structured fields - * defined here. For `map_value`, the field path is represented by a - * dot-delimited (`.`) string of segments. Each segment is either a simple - * field name (defined below) or a quoted field name. For example, the - * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" - * }}}` would be represented by the field path `` foo.`x&y` ``. - * A simple field name contains only characters `a` to `z`, `A` to `Z`, - * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, - * `foo_bar_17`. - * A quoted field name starts and ends with `` ` `` and - * may contain any character. Some characters, including `` ` ``, must be - * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and - * `` `bak\`tik` `` represents `` bak`tik ``. - * - * Generated from protobuf field map fields = 2; - */ - private $fields; - /** - * Output only. The time at which the document was created. - * This value increases monotonically when a document is deleted then - * recreated. It can also be compared to values from other documents and - * the `read_time` of a query. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - */ - protected $create_time = null; - /** - * Output only. The time at which the document was last changed. - * This value is initially set to the `create_time` then increases - * monotonically with each change to the document. It can also be - * compared to values from other documents and the `read_time` of a query. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the document, for example - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type array|\Google\Protobuf\Internal\MapField $fields - * The document's fields. - * The map keys represent field names. - * Field names matching the regular expression `__.*__` are reserved. Reserved - * field names are forbidden except in certain documented contexts. The field - * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be - * empty. - * Field paths may be used in other contexts to refer to structured fields - * defined here. For `map_value`, the field path is represented by a - * dot-delimited (`.`) string of segments. Each segment is either a simple - * field name (defined below) or a quoted field name. For example, the - * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" - * }}}` would be represented by the field path `` foo.`x&y` ``. - * A simple field name contains only characters `a` to `z`, `A` to `Z`, - * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, - * `foo_bar_17`. - * A quoted field name starts and ends with `` ` `` and - * may contain any character. Some characters, including `` ` ``, must be - * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and - * `` `bak\`tik` `` represents `` bak`tik ``. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the document was created. - * This value increases monotonically when a document is deleted then - * recreated. It can also be compared to values from other documents and - * the `read_time` of a query. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which the document was last changed. - * This value is initially set to the `create_time` then increases - * monotonically with each change to the document. It can also be - * compared to values from other documents and the `read_time` of a query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the document, for example - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the document, for example - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The document's fields. - * The map keys represent field names. - * Field names matching the regular expression `__.*__` are reserved. Reserved - * field names are forbidden except in certain documented contexts. The field - * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be - * empty. - * Field paths may be used in other contexts to refer to structured fields - * defined here. For `map_value`, the field path is represented by a - * dot-delimited (`.`) string of segments. Each segment is either a simple - * field name (defined below) or a quoted field name. For example, the - * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" - * }}}` would be represented by the field path `` foo.`x&y` ``. - * A simple field name contains only characters `a` to `z`, `A` to `Z`, - * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, - * `foo_bar_17`. - * A quoted field name starts and ends with `` ` `` and - * may contain any character. Some characters, including `` ` ``, must be - * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and - * `` `bak\`tik` `` represents `` bak`tik ``. - * - * Generated from protobuf field map fields = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getFields() - { - return $this->fields; - } - - /** - * The document's fields. - * The map keys represent field names. - * Field names matching the regular expression `__.*__` are reserved. Reserved - * field names are forbidden except in certain documented contexts. The field - * names, represented as UTF-8, must not exceed 1,500 bytes and cannot be - * empty. - * Field paths may be used in other contexts to refer to structured fields - * defined here. For `map_value`, the field path is represented by a - * dot-delimited (`.`) string of segments. Each segment is either a simple - * field name (defined below) or a quoted field name. For example, the - * structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" - * }}}` would be represented by the field path `` foo.`x&y` ``. - * A simple field name contains only characters `a` to `z`, `A` to `Z`, - * `0` to `9`, or `_`, and must not start with `0` to `9`. For example, - * `foo_bar_17`. - * A quoted field name starts and ends with `` ` `` and - * may contain any character. Some characters, including `` ` ``, must be - * escaped using a `\`. For example, `` `x&y` `` represents `x&y` and - * `` `bak\`tik` `` represents `` bak`tik ``. - * - * Generated from protobuf field map fields = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->fields = $arr; - - return $this; - } - - /** - * Output only. The time at which the document was created. - * This value increases monotonically when a document is deleted then - * recreated. It can also be compared to values from other documents and - * the `read_time` of a query. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time at which the document was created. - * This value increases monotonically when a document is deleted then - * recreated. It can also be compared to values from other documents and - * the `read_time` of a query. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time at which the document was last changed. - * This value is initially set to the `create_time` then increases - * monotonically with each change to the document. It can also be - * compared to values from other documents and the `read_time` of a query. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The time at which the document was last changed. - * This value is initially set to the `create_time` then increases - * monotonically with each change to the document. It can also be - * compared to values from other documents and the `read_time` of a query. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php deleted file mode 100644 index 4d89e75f035e..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentChange.php +++ /dev/null @@ -1,154 +0,0 @@ -google.firestore.v1.DocumentChange - */ -class DocumentChange extends \Google\Protobuf\Internal\Message -{ - /** - * The new state of the [Document][google.firestore.v1.Document]. - * If `mask` is set, contains only fields that were updated or added. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - */ - protected $document = null; - /** - * A set of target IDs of targets that match this document. - * - * Generated from protobuf field repeated int32 target_ids = 5; - */ - private $target_ids; - /** - * A set of target IDs for targets that no longer match this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - */ - private $removed_target_ids; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Document $document - * The new state of the [Document][google.firestore.v1.Document]. - * If `mask` is set, contains only fields that were updated or added. - * @type int[] $target_ids - * A set of target IDs of targets that match this document. - * @type int[] $removed_target_ids - * A set of target IDs for targets that no longer match this document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The new state of the [Document][google.firestore.v1.Document]. - * If `mask` is set, contains only fields that were updated or added. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * The new state of the [Document][google.firestore.v1.Document]. - * If `mask` is set, contains only fields that were updated or added. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * A set of target IDs of targets that match this document. - * - * Generated from protobuf field repeated int32 target_ids = 5; - * @return RepeatedField - */ - public function getTargetIds() - { - return $this->target_ids; - } - - /** - * A set of target IDs of targets that match this document. - * - * Generated from protobuf field repeated int32 target_ids = 5; - * @param int[] $var - * @return $this - */ - public function setTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->target_ids = $arr; - - return $this; - } - - /** - * A set of target IDs for targets that no longer match this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - * @return RepeatedField - */ - public function getRemovedTargetIds() - { - return $this->removed_target_ids; - } - - /** - * A set of target IDs for targets that no longer match this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - * @param int[] $var - * @return $this - */ - public function setRemovedTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->removed_target_ids = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php deleted file mode 100644 index 706a0f731675..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentDelete.php +++ /dev/null @@ -1,158 +0,0 @@ -google.firestore.v1.DocumentDelete - */ -class DocumentDelete extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the [Document][google.firestore.v1.Document] that was - * deleted. - * - * Generated from protobuf field string document = 1; - */ - protected $document = ''; - /** - * A set of target IDs for targets that previously matched this entity. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - */ - private $removed_target_ids; - /** - * The read timestamp at which the delete was observed. - * Greater or equal to the `commit_time` of the delete. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - */ - protected $read_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $document - * The resource name of the [Document][google.firestore.v1.Document] that was - * deleted. - * @type int[] $removed_target_ids - * A set of target IDs for targets that previously matched this entity. - * @type \Google\Protobuf\Timestamp $read_time - * The read timestamp at which the delete was observed. - * Greater or equal to the `commit_time` of the delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the [Document][google.firestore.v1.Document] that was - * deleted. - * - * Generated from protobuf field string document = 1; - * @return string - */ - public function getDocument() - { - return $this->document; - } - - /** - * The resource name of the [Document][google.firestore.v1.Document] that was - * deleted. - * - * Generated from protobuf field string document = 1; - * @param string $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkString($var, True); - $this->document = $var; - - return $this; - } - - /** - * A set of target IDs for targets that previously matched this entity. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - * @return RepeatedField - */ - public function getRemovedTargetIds() - { - return $this->removed_target_ids; - } - - /** - * A set of target IDs for targets that previously matched this entity. - * - * Generated from protobuf field repeated int32 removed_target_ids = 6; - * @param int[] $var - * @return $this - */ - public function setRemovedTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->removed_target_ids = $arr; - - return $this; - } - - /** - * The read timestamp at which the delete was observed. - * Greater or equal to the `commit_time` of the delete. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The read timestamp at which the delete was observed. - * Greater or equal to the `commit_time` of the delete. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php deleted file mode 100644 index 9f4e56639765..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentMask.php +++ /dev/null @@ -1,80 +0,0 @@ -google.firestore.v1.DocumentMask - */ -class DocumentMask extends \Google\Protobuf\Internal\Message -{ - /** - * The list of field paths in the mask. See - * [Document.fields][google.firestore.v1.Document.fields] for a field path - * syntax reference. - * - * Generated from protobuf field repeated string field_paths = 1; - */ - private $field_paths; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $field_paths - * The list of field paths in the mask. See - * [Document.fields][google.firestore.v1.Document.fields] for a field path - * syntax reference. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The list of field paths in the mask. See - * [Document.fields][google.firestore.v1.Document.fields] for a field path - * syntax reference. - * - * Generated from protobuf field repeated string field_paths = 1; - * @return RepeatedField - */ - public function getFieldPaths() - { - return $this->field_paths; - } - - /** - * The list of field paths in the mask. See - * [Document.fields][google.firestore.v1.Document.fields] for a field path - * syntax reference. - * - * Generated from protobuf field repeated string field_paths = 1; - * @param string[] $var - * @return $this - */ - public function setFieldPaths($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->field_paths = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php deleted file mode 100644 index e346028118e7..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentRemove.php +++ /dev/null @@ -1,160 +0,0 @@ -google.firestore.v1.DocumentRemove - */ -class DocumentRemove extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the [Document][google.firestore.v1.Document] that has - * gone out of view. - * - * Generated from protobuf field string document = 1; - */ - protected $document = ''; - /** - * A set of target IDs for targets that previously matched this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 2; - */ - private $removed_target_ids; - /** - * The read timestamp at which the remove was observed. - * Greater or equal to the `commit_time` of the change/delete/remove. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - */ - protected $read_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $document - * The resource name of the [Document][google.firestore.v1.Document] that has - * gone out of view. - * @type int[] $removed_target_ids - * A set of target IDs for targets that previously matched this document. - * @type \Google\Protobuf\Timestamp $read_time - * The read timestamp at which the remove was observed. - * Greater or equal to the `commit_time` of the change/delete/remove. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the [Document][google.firestore.v1.Document] that has - * gone out of view. - * - * Generated from protobuf field string document = 1; - * @return string - */ - public function getDocument() - { - return $this->document; - } - - /** - * The resource name of the [Document][google.firestore.v1.Document] that has - * gone out of view. - * - * Generated from protobuf field string document = 1; - * @param string $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkString($var, True); - $this->document = $var; - - return $this; - } - - /** - * A set of target IDs for targets that previously matched this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 2; - * @return RepeatedField - */ - public function getRemovedTargetIds() - { - return $this->removed_target_ids; - } - - /** - * A set of target IDs for targets that previously matched this document. - * - * Generated from protobuf field repeated int32 removed_target_ids = 2; - * @param int[] $var - * @return $this - */ - public function setRemovedTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->removed_target_ids = $arr; - - return $this; - } - - /** - * The read timestamp at which the remove was observed. - * Greater or equal to the `commit_time` of the change/delete/remove. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The read timestamp at which the remove was observed. - * Greater or equal to the `commit_time` of the change/delete/remove. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php deleted file mode 100644 index d57bdf03c859..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform.php +++ /dev/null @@ -1,109 +0,0 @@ -google.firestore.v1.DocumentTransform - */ -class DocumentTransform extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the document to transform. - * - * Generated from protobuf field string document = 1; - */ - protected $document = ''; - /** - * The list of transformations to apply to the fields of the document, in - * order. - * This must not be empty. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; - */ - private $field_transforms; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $document - * The name of the document to transform. - * @type \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform[] $field_transforms - * The list of transformations to apply to the fields of the document, in - * order. - * This must not be empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The name of the document to transform. - * - * Generated from protobuf field string document = 1; - * @return string - */ - public function getDocument() - { - return $this->document; - } - - /** - * The name of the document to transform. - * - * Generated from protobuf field string document = 1; - * @param string $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkString($var, True); - $this->document = $var; - - return $this; - } - - /** - * The list of transformations to apply to the fields of the document, in - * order. - * This must not be empty. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; - * @return RepeatedField<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform> - */ - public function getFieldTransforms() - { - return $this->field_transforms; - } - - /** - * The list of transformations to apply to the fields of the document, in - * order. - * This must not be empty. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform field_transforms = 2; - * @param \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform[] $var - * @return $this - */ - public function setFieldTransforms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform::class); - $this->field_transforms = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php deleted file mode 100644 index 10135fb11738..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform.php +++ /dev/null @@ -1,414 +0,0 @@ -google.firestore.v1.DocumentTransform.FieldTransform - */ -class FieldTransform extends \Google\Protobuf\Internal\Message -{ - /** - * The path of the field. See - * [Document.fields][google.firestore.v1.Document.fields] for the field path - * syntax reference. - * - * Generated from protobuf field string field_path = 1; - */ - protected $field_path = ''; - protected $transform_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field_path - * The path of the field. See - * [Document.fields][google.firestore.v1.Document.fields] for the field path - * syntax reference. - * @type int $set_to_server_value - * Sets the field to the given server value. - * @type \Google\Cloud\Firestore\V1\Value $increment - * Adds the given value to the field's current value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If either of the given value or the current field value are doubles, - * both values will be interpreted as doubles. Double arithmetic and - * representation of double values follow IEEE 754 semantics. - * If there is positive/negative integer overflow, the field is resolved - * to the largest magnitude positive/negative integer. - * @type \Google\Cloud\Firestore\V1\Value $maximum - * Sets the field to the maximum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If a maximum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the larger operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and - * zero input value is always the stored value. - * The maximum of any numeric value x and NaN is NaN. - * @type \Google\Cloud\Firestore\V1\Value $minimum - * Sets the field to the minimum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the input value. - * If a minimum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the smaller operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and - * zero input value is always the stored value. - * The minimum of any numeric value x and NaN is NaN. - * @type \Google\Cloud\Firestore\V1\ArrayValue $append_missing_elements - * Append the given elements in order if they are not already present in - * the current field value. - * If the field is not an array, or if the field does not yet exist, it is - * first set to the empty array. - * Equivalent numbers of different types (e.g. 3L and 3.0) are - * considered equal when checking if a value is missing. - * NaN is equal to NaN, and Null is equal to Null. - * If the input contains multiple equivalent values, only the first will - * be considered. - * The corresponding transform_result will be the null value. - * @type \Google\Cloud\Firestore\V1\ArrayValue $remove_all_from_array - * Remove all of the given elements from the array in the field. - * If the field is not an array, or if the field does not yet exist, it is - * set to the empty array. - * Equivalent numbers of the different types (e.g. 3L and 3.0) are - * considered equal when deciding whether an element should be removed. - * NaN is equal to NaN, and Null is equal to Null. - * This will remove all equivalent values if there are duplicates. - * The corresponding transform_result will be the null value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The path of the field. See - * [Document.fields][google.firestore.v1.Document.fields] for the field path - * syntax reference. - * - * Generated from protobuf field string field_path = 1; - * @return string - */ - public function getFieldPath() - { - return $this->field_path; - } - - /** - * The path of the field. See - * [Document.fields][google.firestore.v1.Document.fields] for the field path - * syntax reference. - * - * Generated from protobuf field string field_path = 1; - * @param string $var - * @return $this - */ - public function setFieldPath($var) - { - GPBUtil::checkString($var, True); - $this->field_path = $var; - - return $this; - } - - /** - * Sets the field to the given server value. - * - * Generated from protobuf field .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; - * @return int - */ - public function getSetToServerValue() - { - return $this->readOneof(2); - } - - public function hasSetToServerValue() - { - return $this->hasOneof(2); - } - - /** - * Sets the field to the given server value. - * - * Generated from protobuf field .google.firestore.v1.DocumentTransform.FieldTransform.ServerValue set_to_server_value = 2; - * @param int $var - * @return $this - */ - public function setSetToServerValue($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform\ServerValue::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Adds the given value to the field's current value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If either of the given value or the current field value are doubles, - * both values will be interpreted as doubles. Double arithmetic and - * representation of double values follow IEEE 754 semantics. - * If there is positive/negative integer overflow, the field is resolved - * to the largest magnitude positive/negative integer. - * - * Generated from protobuf field .google.firestore.v1.Value increment = 3; - * @return \Google\Cloud\Firestore\V1\Value|null - */ - public function getIncrement() - { - return $this->readOneof(3); - } - - public function hasIncrement() - { - return $this->hasOneof(3); - } - - /** - * Adds the given value to the field's current value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If either of the given value or the current field value are doubles, - * both values will be interpreted as doubles. Double arithmetic and - * representation of double values follow IEEE 754 semantics. - * If there is positive/negative integer overflow, the field is resolved - * to the largest magnitude positive/negative integer. - * - * Generated from protobuf field .google.firestore.v1.Value increment = 3; - * @param \Google\Cloud\Firestore\V1\Value $var - * @return $this - */ - public function setIncrement($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Sets the field to the maximum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If a maximum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the larger operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and - * zero input value is always the stored value. - * The maximum of any numeric value x and NaN is NaN. - * - * Generated from protobuf field .google.firestore.v1.Value maximum = 4; - * @return \Google\Cloud\Firestore\V1\Value|null - */ - public function getMaximum() - { - return $this->readOneof(4); - } - - public function hasMaximum() - { - return $this->hasOneof(4); - } - - /** - * Sets the field to the maximum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the given value. - * If a maximum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the larger operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and - * zero input value is always the stored value. - * The maximum of any numeric value x and NaN is NaN. - * - * Generated from protobuf field .google.firestore.v1.Value maximum = 4; - * @param \Google\Cloud\Firestore\V1\Value $var - * @return $this - */ - public function setMaximum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Sets the field to the minimum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the input value. - * If a minimum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the smaller operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and - * zero input value is always the stored value. - * The minimum of any numeric value x and NaN is NaN. - * - * Generated from protobuf field .google.firestore.v1.Value minimum = 5; - * @return \Google\Cloud\Firestore\V1\Value|null - */ - public function getMinimum() - { - return $this->readOneof(5); - } - - public function hasMinimum() - { - return $this->hasOneof(5); - } - - /** - * Sets the field to the minimum of its current value and the given value. - * This must be an integer or a double value. - * If the field is not an integer or double, or if the field does not yet - * exist, the transformation will set the field to the input value. - * If a minimum operation is applied where the field and the input value - * are of mixed types (that is - one is an integer and one is a double) - * the field takes on the type of the smaller operand. If the operands are - * equivalent (e.g. 3 and 3.0), the field does not change. - * 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and - * zero input value is always the stored value. - * The minimum of any numeric value x and NaN is NaN. - * - * Generated from protobuf field .google.firestore.v1.Value minimum = 5; - * @param \Google\Cloud\Firestore\V1\Value $var - * @return $this - */ - public function setMinimum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Append the given elements in order if they are not already present in - * the current field value. - * If the field is not an array, or if the field does not yet exist, it is - * first set to the empty array. - * Equivalent numbers of different types (e.g. 3L and 3.0) are - * considered equal when checking if a value is missing. - * NaN is equal to NaN, and Null is equal to Null. - * If the input contains multiple equivalent values, only the first will - * be considered. - * The corresponding transform_result will be the null value. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue append_missing_elements = 6; - * @return \Google\Cloud\Firestore\V1\ArrayValue|null - */ - public function getAppendMissingElements() - { - return $this->readOneof(6); - } - - public function hasAppendMissingElements() - { - return $this->hasOneof(6); - } - - /** - * Append the given elements in order if they are not already present in - * the current field value. - * If the field is not an array, or if the field does not yet exist, it is - * first set to the empty array. - * Equivalent numbers of different types (e.g. 3L and 3.0) are - * considered equal when checking if a value is missing. - * NaN is equal to NaN, and Null is equal to Null. - * If the input contains multiple equivalent values, only the first will - * be considered. - * The corresponding transform_result will be the null value. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue append_missing_elements = 6; - * @param \Google\Cloud\Firestore\V1\ArrayValue $var - * @return $this - */ - public function setAppendMissingElements($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Remove all of the given elements from the array in the field. - * If the field is not an array, or if the field does not yet exist, it is - * set to the empty array. - * Equivalent numbers of the different types (e.g. 3L and 3.0) are - * considered equal when deciding whether an element should be removed. - * NaN is equal to NaN, and Null is equal to Null. - * This will remove all equivalent values if there are duplicates. - * The corresponding transform_result will be the null value. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue remove_all_from_array = 7; - * @return \Google\Cloud\Firestore\V1\ArrayValue|null - */ - public function getRemoveAllFromArray() - { - return $this->readOneof(7); - } - - public function hasRemoveAllFromArray() - { - return $this->hasOneof(7); - } - - /** - * Remove all of the given elements from the array in the field. - * If the field is not an array, or if the field does not yet exist, it is - * set to the empty array. - * Equivalent numbers of the different types (e.g. 3L and 3.0) are - * considered equal when deciding whether an element should be removed. - * NaN is equal to NaN, and Null is equal to Null. - * This will remove all equivalent values if there are duplicates. - * The corresponding transform_result will be the null value. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue remove_all_from_array = 7; - * @param \Google\Cloud\Firestore\V1\ArrayValue $var - * @return $this - */ - public function setRemoveAllFromArray($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getTransformType() - { - return $this->whichOneof("transform_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php deleted file mode 100644 index 32444539ac62..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/DocumentTransform/FieldTransform/ServerValue.php +++ /dev/null @@ -1,56 +0,0 @@ -google.firestore.v1.DocumentTransform.FieldTransform.ServerValue - */ -class ServerValue -{ - /** - * Unspecified. This value must not be used. - * - * Generated from protobuf enum SERVER_VALUE_UNSPECIFIED = 0; - */ - const SERVER_VALUE_UNSPECIFIED = 0; - /** - * The time at which the server processed the request, with millisecond - * precision. If used on multiple fields (same or different documents) in - * a transaction, all the fields will get the same server timestamp. - * - * Generated from protobuf enum REQUEST_TIME = 1; - */ - const REQUEST_TIME = 1; - - private static $valueToName = [ - self::SERVER_VALUE_UNSPECIFIED => 'SERVER_VALUE_UNSPECIFIED', - self::REQUEST_TIME => 'REQUEST_TIME', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineRequest.php deleted file mode 100644 index 10221d2cba4b..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineRequest.php +++ /dev/null @@ -1,240 +0,0 @@ -google.firestore.v1.ExecutePipelineRequest - */ -class ExecutePipelineRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Database identifier, in the form - * `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - protected $pipeline_type; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. Database identifier, in the form - * `projects/{project}/databases/{database}`. - * @type \Google\Cloud\Firestore\V1\StructuredPipeline $structured_pipeline - * A pipelined operation. - * @type string $transaction - * Run the query within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction - * Execute the pipeline in a new transaction. - * The identifier of the newly created transaction will be returned in the - * first response on the stream. This defaults to a read-only transaction. - * @type \Google\Protobuf\Timestamp $read_time - * Execute the pipeline in a snapshot transaction at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. Database identifier, in the form - * `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. Database identifier, in the form - * `projects/{project}/databases/{database}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * A pipelined operation. - * - * Generated from protobuf field .google.firestore.v1.StructuredPipeline structured_pipeline = 2; - * @return \Google\Cloud\Firestore\V1\StructuredPipeline|null - */ - public function getStructuredPipeline() - { - return $this->readOneof(2); - } - - public function hasStructuredPipeline() - { - return $this->hasOneof(2); - } - - /** - * A pipelined operation. - * - * Generated from protobuf field .google.firestore.v1.StructuredPipeline structured_pipeline = 2; - * @param \Google\Cloud\Firestore\V1\StructuredPipeline $var - * @return $this - */ - public function setStructuredPipeline($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredPipeline::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Run the query within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 5; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(5); - } - - public function hasTransaction() - { - return $this->hasOneof(5); - } - - /** - * Run the query within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 5; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Execute the pipeline in a new transaction. - * The identifier of the newly created transaction will be returned in the - * first response on the stream. This defaults to a read-only transaction. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; - * @return \Google\Cloud\Firestore\V1\TransactionOptions|null - */ - public function getNewTransaction() - { - return $this->readOneof(6); - } - - public function hasNewTransaction() - { - return $this->hasOneof(6); - } - - /** - * Execute the pipeline in a new transaction. - * The identifier of the newly created transaction will be returned in the - * first response on the stream. This defaults to a read-only transaction. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; - * @param \Google\Cloud\Firestore\V1\TransactionOptions $var - * @return $this - */ - public function setNewTransaction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Execute the pipeline in a snapshot transaction at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(7); - } - - public function hasReadTime() - { - return $this->hasOneof(7); - } - - /** - * Execute the pipeline in a snapshot transaction at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getPipelineType() - { - return $this->whichOneof("pipeline_type"); - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineResponse.php deleted file mode 100644 index 6ee7dc36a3e0..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutePipelineResponse.php +++ /dev/null @@ -1,285 +0,0 @@ -google.firestore.v1.ExecutePipelineResponse - */ -class ExecutePipelineResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Newly created transaction identifier. - * This field is only specified as part of the first response from the server, - * alongside the `results` field when the original request specified - * [ExecuteRequest.new_transaction][]. - * - * Generated from protobuf field bytes transaction = 1; - */ - protected $transaction = ''; - /** - * An ordered batch of results returned executing a pipeline. - * The batch size is variable, and can even be zero for when only a partial - * progress message is returned. - * The fields present in the returned documents are only those that were - * explicitly requested in the pipeline, this includes those like - * [`__name__`][google.firestore.v1.Document.name] and - * [`__update_time__`][google.firestore.v1.Document.update_time]. This is - * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument` - * RPCs which always return such fields even when they are not specified in - * the [`mask`][google.firestore.v1.DocumentMask]. - * - * Generated from protobuf field repeated .google.firestore.v1.Document results = 2; - */ - private $results; - /** - * The time at which the results are valid. - * This is a (not strictly) monotonically increasing value across multiple - * responses in the same stream. The API guarantees that all previously - * returned results are still valid at the latest `execution_time`. This - * allows the API consumer to treat the query if it ran at the latest - * `execution_time` returned. - * If the query returns no results, a response with `execution_time` and no - * `results` will be sent, and this represents the time at which the operation - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp execution_time = 3; - */ - protected $execution_time = null; - /** - * Query explain stats. - * This is present on the **last** response if the request configured explain - * to run in 'analyze' or 'explain' mode in the pipeline options. If the query - * does not return any results, a response with `explain_stats` and no - * `results` will still be sent. - * - * Generated from protobuf field .google.firestore.v1.ExplainStats explain_stats = 4; - */ - protected $explain_stats = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $transaction - * Newly created transaction identifier. - * This field is only specified as part of the first response from the server, - * alongside the `results` field when the original request specified - * [ExecuteRequest.new_transaction][]. - * @type \Google\Cloud\Firestore\V1\Document[] $results - * An ordered batch of results returned executing a pipeline. - * The batch size is variable, and can even be zero for when only a partial - * progress message is returned. - * The fields present in the returned documents are only those that were - * explicitly requested in the pipeline, this includes those like - * [`__name__`][google.firestore.v1.Document.name] and - * [`__update_time__`][google.firestore.v1.Document.update_time]. This is - * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument` - * RPCs which always return such fields even when they are not specified in - * the [`mask`][google.firestore.v1.DocumentMask]. - * @type \Google\Protobuf\Timestamp $execution_time - * The time at which the results are valid. - * This is a (not strictly) monotonically increasing value across multiple - * responses in the same stream. The API guarantees that all previously - * returned results are still valid at the latest `execution_time`. This - * allows the API consumer to treat the query if it ran at the latest - * `execution_time` returned. - * If the query returns no results, a response with `execution_time` and no - * `results` will be sent, and this represents the time at which the operation - * was run. - * @type \Google\Cloud\Firestore\V1\ExplainStats $explain_stats - * Query explain stats. - * This is present on the **last** response if the request configured explain - * to run in 'analyze' or 'explain' mode in the pipeline options. If the query - * does not return any results, a response with `explain_stats` and no - * `results` will still be sent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Newly created transaction identifier. - * This field is only specified as part of the first response from the server, - * alongside the `results` field when the original request specified - * [ExecuteRequest.new_transaction][]. - * - * Generated from protobuf field bytes transaction = 1; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * Newly created transaction identifier. - * This field is only specified as part of the first response from the server, - * alongside the `results` field when the original request specified - * [ExecuteRequest.new_transaction][]. - * - * Generated from protobuf field bytes transaction = 1; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - - /** - * An ordered batch of results returned executing a pipeline. - * The batch size is variable, and can even be zero for when only a partial - * progress message is returned. - * The fields present in the returned documents are only those that were - * explicitly requested in the pipeline, this includes those like - * [`__name__`][google.firestore.v1.Document.name] and - * [`__update_time__`][google.firestore.v1.Document.update_time]. This is - * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument` - * RPCs which always return such fields even when they are not specified in - * the [`mask`][google.firestore.v1.DocumentMask]. - * - * Generated from protobuf field repeated .google.firestore.v1.Document results = 2; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Document> - */ - public function getResults() - { - return $this->results; - } - - /** - * An ordered batch of results returned executing a pipeline. - * The batch size is variable, and can even be zero for when only a partial - * progress message is returned. - * The fields present in the returned documents are only those that were - * explicitly requested in the pipeline, this includes those like - * [`__name__`][google.firestore.v1.Document.name] and - * [`__update_time__`][google.firestore.v1.Document.update_time]. This is - * explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument` - * RPCs which always return such fields even when they are not specified in - * the [`mask`][google.firestore.v1.DocumentMask]. - * - * Generated from protobuf field repeated .google.firestore.v1.Document results = 2; - * @param \Google\Cloud\Firestore\V1\Document[] $var - * @return $this - */ - public function setResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Document::class); - $this->results = $arr; - - return $this; - } - - /** - * The time at which the results are valid. - * This is a (not strictly) monotonically increasing value across multiple - * responses in the same stream. The API guarantees that all previously - * returned results are still valid at the latest `execution_time`. This - * allows the API consumer to treat the query if it ran at the latest - * `execution_time` returned. - * If the query returns no results, a response with `execution_time` and no - * `results` will be sent, and this represents the time at which the operation - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp execution_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExecutionTime() - { - return $this->execution_time; - } - - public function hasExecutionTime() - { - return isset($this->execution_time); - } - - public function clearExecutionTime() - { - unset($this->execution_time); - } - - /** - * The time at which the results are valid. - * This is a (not strictly) monotonically increasing value across multiple - * responses in the same stream. The API guarantees that all previously - * returned results are still valid at the latest `execution_time`. This - * allows the API consumer to treat the query if it ran at the latest - * `execution_time` returned. - * If the query returns no results, a response with `execution_time` and no - * `results` will be sent, and this represents the time at which the operation - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp execution_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExecutionTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->execution_time = $var; - - return $this; - } - - /** - * Query explain stats. - * This is present on the **last** response if the request configured explain - * to run in 'analyze' or 'explain' mode in the pipeline options. If the query - * does not return any results, a response with `explain_stats` and no - * `results` will still be sent. - * - * Generated from protobuf field .google.firestore.v1.ExplainStats explain_stats = 4; - * @return \Google\Cloud\Firestore\V1\ExplainStats|null - */ - public function getExplainStats() - { - return $this->explain_stats; - } - - public function hasExplainStats() - { - return isset($this->explain_stats); - } - - public function clearExplainStats() - { - unset($this->explain_stats); - } - - /** - * Query explain stats. - * This is present on the **last** response if the request configured explain - * to run in 'analyze' or 'explain' mode in the pipeline options. If the query - * does not return any results, a response with `explain_stats` and no - * `results` will still be sent. - * - * Generated from protobuf field .google.firestore.v1.ExplainStats explain_stats = 4; - * @param \Google\Cloud\Firestore\V1\ExplainStats $var - * @return $this - */ - public function setExplainStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainStats::class); - $this->explain_stats = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutionStats.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutionStats.php deleted file mode 100644 index 63cbbcf07b0c..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExecutionStats.php +++ /dev/null @@ -1,237 +0,0 @@ -google.firestore.v1.ExecutionStats - */ -class ExecutionStats extends \Google\Protobuf\Internal\Message -{ - /** - * Total number of results returned, including documents, projections, - * aggregation results, keys. - * - * Generated from protobuf field int64 results_returned = 1; - */ - protected $results_returned = 0; - /** - * Total time to execute the query in the backend. - * - * Generated from protobuf field .google.protobuf.Duration execution_duration = 3; - */ - protected $execution_duration = null; - /** - * Total billable read operations. - * - * Generated from protobuf field int64 read_operations = 4; - */ - protected $read_operations = 0; - /** - * Debugging statistics from the execution of the query. Note that the - * debugging stats are subject to change as Firestore evolves. It could - * include: - * { - * "indexes_entries_scanned": "1000", - * "documents_scanned": "20", - * "billing_details" : { - * "documents_billable": "20", - * "index_entries_billable": "1000", - * "min_query_cost": "0" - * } - * } - * - * Generated from protobuf field .google.protobuf.Struct debug_stats = 5; - */ - protected $debug_stats = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $results_returned - * Total number of results returned, including documents, projections, - * aggregation results, keys. - * @type \Google\Protobuf\Duration $execution_duration - * Total time to execute the query in the backend. - * @type int|string $read_operations - * Total billable read operations. - * @type \Google\Protobuf\Struct $debug_stats - * Debugging statistics from the execution of the query. Note that the - * debugging stats are subject to change as Firestore evolves. It could - * include: - * { - * "indexes_entries_scanned": "1000", - * "documents_scanned": "20", - * "billing_details" : { - * "documents_billable": "20", - * "index_entries_billable": "1000", - * "min_query_cost": "0" - * } - * } - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); - parent::__construct($data); - } - - /** - * Total number of results returned, including documents, projections, - * aggregation results, keys. - * - * Generated from protobuf field int64 results_returned = 1; - * @return int|string - */ - public function getResultsReturned() - { - return $this->results_returned; - } - - /** - * Total number of results returned, including documents, projections, - * aggregation results, keys. - * - * Generated from protobuf field int64 results_returned = 1; - * @param int|string $var - * @return $this - */ - public function setResultsReturned($var) - { - GPBUtil::checkInt64($var); - $this->results_returned = $var; - - return $this; - } - - /** - * Total time to execute the query in the backend. - * - * Generated from protobuf field .google.protobuf.Duration execution_duration = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getExecutionDuration() - { - return $this->execution_duration; - } - - public function hasExecutionDuration() - { - return isset($this->execution_duration); - } - - public function clearExecutionDuration() - { - unset($this->execution_duration); - } - - /** - * Total time to execute the query in the backend. - * - * Generated from protobuf field .google.protobuf.Duration execution_duration = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setExecutionDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->execution_duration = $var; - - return $this; - } - - /** - * Total billable read operations. - * - * Generated from protobuf field int64 read_operations = 4; - * @return int|string - */ - public function getReadOperations() - { - return $this->read_operations; - } - - /** - * Total billable read operations. - * - * Generated from protobuf field int64 read_operations = 4; - * @param int|string $var - * @return $this - */ - public function setReadOperations($var) - { - GPBUtil::checkInt64($var); - $this->read_operations = $var; - - return $this; - } - - /** - * Debugging statistics from the execution of the query. Note that the - * debugging stats are subject to change as Firestore evolves. It could - * include: - * { - * "indexes_entries_scanned": "1000", - * "documents_scanned": "20", - * "billing_details" : { - * "documents_billable": "20", - * "index_entries_billable": "1000", - * "min_query_cost": "0" - * } - * } - * - * Generated from protobuf field .google.protobuf.Struct debug_stats = 5; - * @return \Google\Protobuf\Struct|null - */ - public function getDebugStats() - { - return $this->debug_stats; - } - - public function hasDebugStats() - { - return isset($this->debug_stats); - } - - public function clearDebugStats() - { - unset($this->debug_stats); - } - - /** - * Debugging statistics from the execution of the query. Note that the - * debugging stats are subject to change as Firestore evolves. It could - * include: - * { - * "indexes_entries_scanned": "1000", - * "documents_scanned": "20", - * "billing_details" : { - * "documents_billable": "20", - * "index_entries_billable": "1000", - * "min_query_cost": "0" - * } - * } - * - * Generated from protobuf field .google.protobuf.Struct debug_stats = 5; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setDebugStats($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->debug_stats = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php deleted file mode 100644 index a136f19886db..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExistenceFilter.php +++ /dev/null @@ -1,209 +0,0 @@ -google.firestore.v1.ExistenceFilter - */ -class ExistenceFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The target ID to which this filter applies. - * - * Generated from protobuf field int32 target_id = 1; - */ - protected $target_id = 0; - /** - * The total count of documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id]. - * If different from the count of documents in the client that match, the - * client must manually determine which documents no longer match the target. - * The client can use the `unchanged_names` bloom filter to assist with - * this determination by testing ALL the document names against the filter; - * if the document name is NOT in the filter, it means the document no - * longer matches the target. - * - * Generated from protobuf field int32 count = 2; - */ - protected $count = 0; - /** - * A bloom filter that, despite its name, contains the UTF-8 byte encodings of - * the resource names of ALL the documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * This bloom filter may be omitted at the server's discretion, such as if it - * is deemed that the client will not make use of it or if it is too - * computationally expensive to calculate or transmit. Clients must gracefully - * handle this field being absent by falling back to the logic used before - * this field existed; that is, re-add the target without a resume token to - * figure out which documents in the client's cache are out of sync. - * - * Generated from protobuf field .google.firestore.v1.BloomFilter unchanged_names = 3; - */ - protected $unchanged_names = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $target_id - * The target ID to which this filter applies. - * @type int $count - * The total count of documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id]. - * If different from the count of documents in the client that match, the - * client must manually determine which documents no longer match the target. - * The client can use the `unchanged_names` bloom filter to assist with - * this determination by testing ALL the document names against the filter; - * if the document name is NOT in the filter, it means the document no - * longer matches the target. - * @type \Google\Cloud\Firestore\V1\BloomFilter $unchanged_names - * A bloom filter that, despite its name, contains the UTF-8 byte encodings of - * the resource names of ALL the documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * This bloom filter may be omitted at the server's discretion, such as if it - * is deemed that the client will not make use of it or if it is too - * computationally expensive to calculate or transmit. Clients must gracefully - * handle this field being absent by falling back to the logic used before - * this field existed; that is, re-add the target without a resume token to - * figure out which documents in the client's cache are out of sync. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The target ID to which this filter applies. - * - * Generated from protobuf field int32 target_id = 1; - * @return int - */ - public function getTargetId() - { - return $this->target_id; - } - - /** - * The target ID to which this filter applies. - * - * Generated from protobuf field int32 target_id = 1; - * @param int $var - * @return $this - */ - public function setTargetId($var) - { - GPBUtil::checkInt32($var); - $this->target_id = $var; - - return $this; - } - - /** - * The total count of documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id]. - * If different from the count of documents in the client that match, the - * client must manually determine which documents no longer match the target. - * The client can use the `unchanged_names` bloom filter to assist with - * this determination by testing ALL the document names against the filter; - * if the document name is NOT in the filter, it means the document no - * longer matches the target. - * - * Generated from protobuf field int32 count = 2; - * @return int - */ - public function getCount() - { - return $this->count; - } - - /** - * The total count of documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id]. - * If different from the count of documents in the client that match, the - * client must manually determine which documents no longer match the target. - * The client can use the `unchanged_names` bloom filter to assist with - * this determination by testing ALL the document names against the filter; - * if the document name is NOT in the filter, it means the document no - * longer matches the target. - * - * Generated from protobuf field int32 count = 2; - * @param int $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt32($var); - $this->count = $var; - - return $this; - } - - /** - * A bloom filter that, despite its name, contains the UTF-8 byte encodings of - * the resource names of ALL the documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * This bloom filter may be omitted at the server's discretion, such as if it - * is deemed that the client will not make use of it or if it is too - * computationally expensive to calculate or transmit. Clients must gracefully - * handle this field being absent by falling back to the logic used before - * this field existed; that is, re-add the target without a resume token to - * figure out which documents in the client's cache are out of sync. - * - * Generated from protobuf field .google.firestore.v1.BloomFilter unchanged_names = 3; - * @return \Google\Cloud\Firestore\V1\BloomFilter|null - */ - public function getUnchangedNames() - { - return $this->unchanged_names; - } - - public function hasUnchangedNames() - { - return isset($this->unchanged_names); - } - - public function clearUnchangedNames() - { - unset($this->unchanged_names); - } - - /** - * A bloom filter that, despite its name, contains the UTF-8 byte encodings of - * the resource names of ALL the documents that match - * [target_id][google.firestore.v1.ExistenceFilter.target_id], in the form - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * This bloom filter may be omitted at the server's discretion, such as if it - * is deemed that the client will not make use of it or if it is too - * computationally expensive to calculate or transmit. Clients must gracefully - * handle this field being absent by falling back to the logic used before - * this field existed; that is, re-add the target without a resume token to - * figure out which documents in the client's cache are out of sync. - * - * Generated from protobuf field .google.firestore.v1.BloomFilter unchanged_names = 3; - * @param \Google\Cloud\Firestore\V1\BloomFilter $var - * @return $this - */ - public function setUnchangedNames($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\BloomFilter::class); - $this->unchanged_names = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainMetrics.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainMetrics.php deleted file mode 100644 index 0e879bab9188..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainMetrics.php +++ /dev/null @@ -1,129 +0,0 @@ -google.firestore.v1.ExplainMetrics - */ -class ExplainMetrics extends \Google\Protobuf\Internal\Message -{ - /** - * Planning phase information for the query. - * - * Generated from protobuf field .google.firestore.v1.PlanSummary plan_summary = 1; - */ - protected $plan_summary = null; - /** - * Aggregated stats from the execution of the query. Only present when - * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set - * to true. - * - * Generated from protobuf field .google.firestore.v1.ExecutionStats execution_stats = 2; - */ - protected $execution_stats = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\PlanSummary $plan_summary - * Planning phase information for the query. - * @type \Google\Cloud\Firestore\V1\ExecutionStats $execution_stats - * Aggregated stats from the execution of the query. Only present when - * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set - * to true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); - parent::__construct($data); - } - - /** - * Planning phase information for the query. - * - * Generated from protobuf field .google.firestore.v1.PlanSummary plan_summary = 1; - * @return \Google\Cloud\Firestore\V1\PlanSummary|null - */ - public function getPlanSummary() - { - return $this->plan_summary; - } - - public function hasPlanSummary() - { - return isset($this->plan_summary); - } - - public function clearPlanSummary() - { - unset($this->plan_summary); - } - - /** - * Planning phase information for the query. - * - * Generated from protobuf field .google.firestore.v1.PlanSummary plan_summary = 1; - * @param \Google\Cloud\Firestore\V1\PlanSummary $var - * @return $this - */ - public function setPlanSummary($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\PlanSummary::class); - $this->plan_summary = $var; - - return $this; - } - - /** - * Aggregated stats from the execution of the query. Only present when - * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set - * to true. - * - * Generated from protobuf field .google.firestore.v1.ExecutionStats execution_stats = 2; - * @return \Google\Cloud\Firestore\V1\ExecutionStats|null - */ - public function getExecutionStats() - { - return $this->execution_stats; - } - - public function hasExecutionStats() - { - return isset($this->execution_stats); - } - - public function clearExecutionStats() - { - unset($this->execution_stats); - } - - /** - * Aggregated stats from the execution of the query. Only present when - * [ExplainOptions.analyze][google.firestore.v1.ExplainOptions.analyze] is set - * to true. - * - * Generated from protobuf field .google.firestore.v1.ExecutionStats execution_stats = 2; - * @param \Google\Cloud\Firestore\V1\ExecutionStats $var - * @return $this - */ - public function setExecutionStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExecutionStats::class); - $this->execution_stats = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainOptions.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainOptions.php deleted file mode 100644 index 05b64823f7d4..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainOptions.php +++ /dev/null @@ -1,83 +0,0 @@ -google.firestore.v1.ExplainOptions - */ -class ExplainOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether to execute this query. - * When false (the default), the query will be planned, returning only - * metrics from the planning stages. - * When true, the query will be planned and executed, returning the full - * query results along with both planning and execution stage metrics. - * - * Generated from protobuf field bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $analyze = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $analyze - * Optional. Whether to execute this query. - * When false (the default), the query will be planned, returning only - * metrics from the planning stages. - * When true, the query will be planned and executed, returning the full - * query results along with both planning and execution stage metrics. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Whether to execute this query. - * When false (the default), the query will be planned, returning only - * metrics from the planning stages. - * When true, the query will be planned and executed, returning the full - * query results along with both planning and execution stage metrics. - * - * Generated from protobuf field bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAnalyze() - { - return $this->analyze; - } - - /** - * Optional. Whether to execute this query. - * When false (the default), the query will be planned, returning only - * metrics from the planning stages. - * When true, the query will be planned and executed, returning the full - * query results along with both planning and execution stage metrics. - * - * Generated from protobuf field bool analyze = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAnalyze($var) - { - GPBUtil::checkBool($var); - $this->analyze = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainStats.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainStats.php deleted file mode 100644 index ca8d929ebf74..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ExplainStats.php +++ /dev/null @@ -1,87 +0,0 @@ -google.firestore.v1.ExplainStats - */ -class ExplainStats extends \Google\Protobuf\Internal\Message -{ - /** - * The format depends on the `output_format` options in the request. - * Currently there are two supported options: `TEXT` and `JSON`. - * Both supply a `google.protobuf.StringValue`. - * - * Generated from protobuf field .google.protobuf.Any data = 1; - */ - protected $data = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Any $data - * The format depends on the `output_format` options in the request. - * Currently there are two supported options: `TEXT` and `JSON`. - * Both supply a `google.protobuf.StringValue`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\ExplainStats::initOnce(); - parent::__construct($data); - } - - /** - * The format depends on the `output_format` options in the request. - * Currently there are two supported options: `TEXT` and `JSON`. - * Both supply a `google.protobuf.StringValue`. - * - * Generated from protobuf field .google.protobuf.Any data = 1; - * @return \Google\Protobuf\Any|null - */ - public function getData() - { - return $this->data; - } - - public function hasData() - { - return isset($this->data); - } - - public function clearData() - { - unset($this->data); - } - - /** - * The format depends on the `output_format` options in the request. - * Currently there are two supported options: `TEXT` and `JSON`. - * Both supply a `google.protobuf.StringValue`. - * - * Generated from protobuf field .google.protobuf.Any data = 1; - * @param \Google\Protobuf\Any $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); - $this->data = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php deleted file mode 100644 index 4e4caa99345d..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/GetDocumentRequest.php +++ /dev/null @@ -1,208 +0,0 @@ -google.firestore.v1.GetDocumentRequest - */ -class GetDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the Document to get. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; - */ - protected $mask = null; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the Document to get. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * @type string $transaction - * Reads the document in a transaction. - * @type \Google\Protobuf\Timestamp $read_time - * Reads the version of the document at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the Document to get. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the Document to get. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 2; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - - /** - * Reads the document in a transaction. - * - * Generated from protobuf field bytes transaction = 3; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(3); - } - - public function hasTransaction() - { - return $this->hasOneof(3); - } - - /** - * Reads the document in a transaction. - * - * Generated from protobuf field bytes transaction = 3; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Reads the version of the document at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(5); - } - - public function hasReadTime() - { - return $this->hasOneof(5); - } - - /** - * Reads the version of the document at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php deleted file mode 100644 index 5ff67a8a156a..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsRequest.php +++ /dev/null @@ -1,219 +0,0 @@ -google.firestore.v1.ListCollectionIdsRequest - */ -class ListCollectionIdsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * The maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token. Must be a value from - * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - protected $consistency_selector; - - /** - * @param string $parent Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * @return \Google\Cloud\Firestore\V1\ListCollectionIdsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type int $page_size - * The maximum number of results to return. - * @type string $page_token - * A page token. Must be a value from - * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent document. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of results to return. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token. Must be a value from - * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token. Must be a value from - * [ListCollectionIdsResponse][google.firestore.v1.ListCollectionIdsResponse]. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(4); - } - - public function hasReadTime() - { - return $this->hasOneof(4); - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php deleted file mode 100644 index 9607c86c708c..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListCollectionIdsResponse.php +++ /dev/null @@ -1,102 +0,0 @@ -google.firestore.v1.ListCollectionIdsResponse - */ -class ListCollectionIdsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The collection ids. - * - * Generated from protobuf field repeated string collection_ids = 1; - */ - private $collection_ids; - /** - * A page token that may be used to continue the list. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $collection_ids - * The collection ids. - * @type string $next_page_token - * A page token that may be used to continue the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The collection ids. - * - * Generated from protobuf field repeated string collection_ids = 1; - * @return RepeatedField - */ - public function getCollectionIds() - { - return $this->collection_ids; - } - - /** - * The collection ids. - * - * Generated from protobuf field repeated string collection_ids = 1; - * @param string[] $var - * @return $this - */ - public function setCollectionIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->collection_ids = $arr; - - return $this; - } - - /** - * A page token that may be used to continue the list. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A page token that may be used to continue the list. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php deleted file mode 100644 index 95df1ff70628..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsRequest.php +++ /dev/null @@ -1,462 +0,0 @@ -google.firestore.v1.ListDocumentsRequest - */ -class ListDocumentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. The collection ID, relative to `parent`, to list. - * For example: `chatrooms` or `messages`. - * This is optional, and when not provided, Firestore will list documents - * from all collections under the provided `parent`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $collection_id = ''; - /** - * Optional. The maximum number of documents to return in a single response. - * Firestore may return fewer than this value. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous `ListDocuments` response. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters (with the exception of `page_size`) must match the values set - * in the request that generated the page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The optional ordering of the documents to return. - * For example: `priority desc, __name__ desc`. - * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] - * used in Firestore queries but in a string representation. When absent, - * documents are ordered based on `__name__ ASC`. - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Optional. The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $mask = null; - /** - * If the list should show missing documents. - * A document is missing if it does not exist, but there are sub-documents - * nested underneath it. When true, such missing documents will be returned - * with a key but will not have fields, - * [`create_time`][google.firestore.v1.Document.create_time], or - * [`update_time`][google.firestore.v1.Document.update_time] set. - * Requests with `show_missing` may not specify `where` or `order_by`. - * - * Generated from protobuf field bool show_missing = 12; - */ - protected $show_missing = false; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type string $collection_id - * Optional. The collection ID, relative to `parent`, to list. - * For example: `chatrooms` or `messages`. - * This is optional, and when not provided, Firestore will list documents - * from all collections under the provided `parent`. - * @type int $page_size - * Optional. The maximum number of documents to return in a single response. - * Firestore may return fewer than this value. - * @type string $page_token - * Optional. A page token, received from a previous `ListDocuments` response. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters (with the exception of `page_size`) must match the values set - * in the request that generated the page token. - * @type string $order_by - * Optional. The optional ordering of the documents to return. - * For example: `priority desc, __name__ desc`. - * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] - * used in Firestore queries but in a string representation. When absent, - * documents are ordered based on `__name__ ASC`. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * Optional. The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field - * will not be returned in the response. - * @type string $transaction - * Perform the read as part of an already active transaction. - * @type \Google\Protobuf\Timestamp $read_time - * Perform the read at the provided time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * @type bool $show_missing - * If the list should show missing documents. - * A document is missing if it does not exist, but there are sub-documents - * nested underneath it. When true, such missing documents will be returned - * with a key but will not have fields, - * [`create_time`][google.firestore.v1.Document.create_time], or - * [`update_time`][google.firestore.v1.Document.update_time] set. - * Requests with `show_missing` may not specify `where` or `order_by`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The collection ID, relative to `parent`, to list. - * For example: `chatrooms` or `messages`. - * This is optional, and when not provided, Firestore will list documents - * from all collections under the provided `parent`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCollectionId() - { - return $this->collection_id; - } - - /** - * Optional. The collection ID, relative to `parent`, to list. - * For example: `chatrooms` or `messages`. - * This is optional, and when not provided, Firestore will list documents - * from all collections under the provided `parent`. - * - * Generated from protobuf field string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCollectionId($var) - { - GPBUtil::checkString($var, True); - $this->collection_id = $var; - - return $this; - } - - /** - * Optional. The maximum number of documents to return in a single response. - * Firestore may return fewer than this value. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of documents to return in a single response. - * Firestore may return fewer than this value. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token, received from a previous `ListDocuments` response. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters (with the exception of `page_size`) must match the values set - * in the request that generated the page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous `ListDocuments` response. - * Provide this to retrieve the subsequent page. When paginating, all other - * parameters (with the exception of `page_size`) must match the values set - * in the request that generated the page token. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The optional ordering of the documents to return. - * For example: `priority desc, __name__ desc`. - * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] - * used in Firestore queries but in a string representation. When absent, - * documents are ordered based on `__name__ ASC`. - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. The optional ordering of the documents to return. - * For example: `priority desc, __name__ desc`. - * This mirrors the [`ORDER BY`][google.firestore.v1.StructuredQuery.order_by] - * used in Firestore queries but in a string representation. When absent, - * documents are ordered based on `__name__ ASC`. - * - * Generated from protobuf field string order_by = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Optional. The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * Optional. The fields to return. If not set, returns all fields. - * If a document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - - /** - * Perform the read as part of an already active transaction. - * - * Generated from protobuf field bytes transaction = 8; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(8); - } - - public function hasTransaction() - { - return $this->hasOneof(8); - } - - /** - * Perform the read as part of an already active transaction. - * - * Generated from protobuf field bytes transaction = 8; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Perform the read at the provided time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(10); - } - - public function hasReadTime() - { - return $this->hasOneof(10); - } - - /** - * Perform the read at the provided time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * If the list should show missing documents. - * A document is missing if it does not exist, but there are sub-documents - * nested underneath it. When true, such missing documents will be returned - * with a key but will not have fields, - * [`create_time`][google.firestore.v1.Document.create_time], or - * [`update_time`][google.firestore.v1.Document.update_time] set. - * Requests with `show_missing` may not specify `where` or `order_by`. - * - * Generated from protobuf field bool show_missing = 12; - * @return bool - */ - public function getShowMissing() - { - return $this->show_missing; - } - - /** - * If the list should show missing documents. - * A document is missing if it does not exist, but there are sub-documents - * nested underneath it. When true, such missing documents will be returned - * with a key but will not have fields, - * [`create_time`][google.firestore.v1.Document.create_time], or - * [`update_time`][google.firestore.v1.Document.update_time] set. - * Requests with `show_missing` may not specify `where` or `order_by`. - * - * Generated from protobuf field bool show_missing = 12; - * @param bool $var - * @return $this - */ - public function setShowMissing($var) - { - GPBUtil::checkBool($var); - $this->show_missing = $var; - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php deleted file mode 100644 index cc7b6cc12bf7..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListDocumentsResponse.php +++ /dev/null @@ -1,106 +0,0 @@ -google.firestore.v1.ListDocumentsResponse - */ -class ListDocumentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The Documents found. - * - * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; - */ - private $documents; - /** - * A token to retrieve the next page of documents. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Document[] $documents - * The Documents found. - * @type string $next_page_token - * A token to retrieve the next page of documents. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The Documents found. - * - * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Document> - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * The Documents found. - * - * Generated from protobuf field repeated .google.firestore.v1.Document documents = 1; - * @param \Google\Cloud\Firestore\V1\Document[] $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Document::class); - $this->documents = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of documents. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of documents. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php deleted file mode 100644 index 806288a8cb01..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenRequest.php +++ /dev/null @@ -1,180 +0,0 @@ -google.firestore.v1.ListenRequest - */ -class ListenRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * Labels associated with this target change. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - protected $target_change; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type \Google\Cloud\Firestore\V1\Target $add_target - * A target to add to this stream. - * @type int $remove_target - * The ID of a target to remove from this stream. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels associated with this target change. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * A target to add to this stream. - * - * Generated from protobuf field .google.firestore.v1.Target add_target = 2; - * @return \Google\Cloud\Firestore\V1\Target|null - */ - public function getAddTarget() - { - return $this->readOneof(2); - } - - public function hasAddTarget() - { - return $this->hasOneof(2); - } - - /** - * A target to add to this stream. - * - * Generated from protobuf field .google.firestore.v1.Target add_target = 2; - * @param \Google\Cloud\Firestore\V1\Target $var - * @return $this - */ - public function setAddTarget($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The ID of a target to remove from this stream. - * - * Generated from protobuf field int32 remove_target = 3; - * @return int - */ - public function getRemoveTarget() - { - return $this->readOneof(3); - } - - public function hasRemoveTarget() - { - return $this->hasOneof(3); - } - - /** - * The ID of a target to remove from this stream. - * - * Generated from protobuf field int32 remove_target = 3; - * @param int $var - * @return $this - */ - public function setRemoveTarget($var) - { - GPBUtil::checkInt32($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Labels associated with this target change. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels associated with this target change. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * @return string - */ - public function getTargetChange() - { - return $this->whichOneof("target_change"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php deleted file mode 100644 index 1848b4a3012f..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/ListenResponse.php +++ /dev/null @@ -1,219 +0,0 @@ -google.firestore.v1.ListenResponse - */ -class ListenResponse extends \Google\Protobuf\Internal\Message -{ - protected $response_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\TargetChange $target_change - * Targets have changed. - * @type \Google\Cloud\Firestore\V1\DocumentChange $document_change - * A [Document][google.firestore.v1.Document] has changed. - * @type \Google\Cloud\Firestore\V1\DocumentDelete $document_delete - * A [Document][google.firestore.v1.Document] has been deleted. - * @type \Google\Cloud\Firestore\V1\DocumentRemove $document_remove - * A [Document][google.firestore.v1.Document] has been removed from a target - * (because it is no longer relevant to that target). - * @type \Google\Cloud\Firestore\V1\ExistenceFilter $filter - * A filter to apply to the set of documents previously returned for the - * given target. - * Returned when documents may have been removed from the given target, but - * the exact documents are unknown. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Targets have changed. - * - * Generated from protobuf field .google.firestore.v1.TargetChange target_change = 2; - * @return \Google\Cloud\Firestore\V1\TargetChange|null - */ - public function getTargetChange() - { - return $this->readOneof(2); - } - - public function hasTargetChange() - { - return $this->hasOneof(2); - } - - /** - * Targets have changed. - * - * Generated from protobuf field .google.firestore.v1.TargetChange target_change = 2; - * @param \Google\Cloud\Firestore\V1\TargetChange $var - * @return $this - */ - public function setTargetChange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TargetChange::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A [Document][google.firestore.v1.Document] has changed. - * - * Generated from protobuf field .google.firestore.v1.DocumentChange document_change = 3; - * @return \Google\Cloud\Firestore\V1\DocumentChange|null - */ - public function getDocumentChange() - { - return $this->readOneof(3); - } - - public function hasDocumentChange() - { - return $this->hasOneof(3); - } - - /** - * A [Document][google.firestore.v1.Document] has changed. - * - * Generated from protobuf field .google.firestore.v1.DocumentChange document_change = 3; - * @param \Google\Cloud\Firestore\V1\DocumentChange $var - * @return $this - */ - public function setDocumentChange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentChange::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A [Document][google.firestore.v1.Document] has been deleted. - * - * Generated from protobuf field .google.firestore.v1.DocumentDelete document_delete = 4; - * @return \Google\Cloud\Firestore\V1\DocumentDelete|null - */ - public function getDocumentDelete() - { - return $this->readOneof(4); - } - - public function hasDocumentDelete() - { - return $this->hasOneof(4); - } - - /** - * A [Document][google.firestore.v1.Document] has been deleted. - * - * Generated from protobuf field .google.firestore.v1.DocumentDelete document_delete = 4; - * @param \Google\Cloud\Firestore\V1\DocumentDelete $var - * @return $this - */ - public function setDocumentDelete($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentDelete::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * A [Document][google.firestore.v1.Document] has been removed from a target - * (because it is no longer relevant to that target). - * - * Generated from protobuf field .google.firestore.v1.DocumentRemove document_remove = 6; - * @return \Google\Cloud\Firestore\V1\DocumentRemove|null - */ - public function getDocumentRemove() - { - return $this->readOneof(6); - } - - public function hasDocumentRemove() - { - return $this->hasOneof(6); - } - - /** - * A [Document][google.firestore.v1.Document] has been removed from a target - * (because it is no longer relevant to that target). - * - * Generated from protobuf field .google.firestore.v1.DocumentRemove document_remove = 6; - * @param \Google\Cloud\Firestore\V1\DocumentRemove $var - * @return $this - */ - public function setDocumentRemove($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentRemove::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * A filter to apply to the set of documents previously returned for the - * given target. - * Returned when documents may have been removed from the given target, but - * the exact documents are unknown. - * - * Generated from protobuf field .google.firestore.v1.ExistenceFilter filter = 5; - * @return \Google\Cloud\Firestore\V1\ExistenceFilter|null - */ - public function getFilter() - { - return $this->readOneof(5); - } - - public function hasFilter() - { - return $this->hasOneof(5); - } - - /** - * A filter to apply to the set of documents previously returned for the - * given target. - * Returned when documents may have been removed from the given target, but - * the exact documents are unknown. - * - * Generated from protobuf field .google.firestore.v1.ExistenceFilter filter = 5; - * @param \Google\Cloud\Firestore\V1\ExistenceFilter $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExistenceFilter::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getResponseType() - { - return $this->whichOneof("response_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php deleted file mode 100644 index 23d448dfcd95..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/MapValue.php +++ /dev/null @@ -1,83 +0,0 @@ -google.firestore.v1.MapValue - */ -class MapValue extends \Google\Protobuf\Internal\Message -{ - /** - * The map's fields. - * The map keys represent field names. Field names matching the regular - * expression `__.*__` are reserved. Reserved field names are forbidden except - * in certain documented contexts. The map keys, represented as UTF-8, must - * not exceed 1,500 bytes and cannot be empty. - * - * Generated from protobuf field map fields = 1; - */ - private $fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $fields - * The map's fields. - * The map keys represent field names. Field names matching the regular - * expression `__.*__` are reserved. Reserved field names are forbidden except - * in certain documented contexts. The map keys, represented as UTF-8, must - * not exceed 1,500 bytes and cannot be empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * The map's fields. - * The map keys represent field names. Field names matching the regular - * expression `__.*__` are reserved. Reserved field names are forbidden except - * in certain documented contexts. The map keys, represented as UTF-8, must - * not exceed 1,500 bytes and cannot be empty. - * - * Generated from protobuf field map fields = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getFields() - { - return $this->fields; - } - - /** - * The map's fields. - * The map keys represent field names. Field names matching the regular - * expression `__.*__` are reserved. Reserved field names are forbidden except - * in certain documented contexts. The map keys, represented as UTF-8, must - * not exceed 1,500 bytes and cannot be empty. - * - * Generated from protobuf field map fields = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->fields = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PBFunction.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PBFunction.php deleted file mode 100644 index c43b051420c3..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PBFunction.php +++ /dev/null @@ -1,149 +0,0 @@ -google.firestore.v1.Function - */ -class PBFunction extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the function to evaluate. - * **Requires:** - * * must be in snake case (lower case with underscore separator). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. Ordered list of arguments the given function expects. - * - * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $args; - /** - * Optional. Optional named arguments that certain functions may support. - * - * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $options; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the function to evaluate. - * **Requires:** - * * must be in snake case (lower case with underscore separator). - * @type \Google\Cloud\Firestore\V1\Value[] $args - * Optional. Ordered list of arguments the given function expects. - * @type array|\Google\Protobuf\Internal\MapField $options - * Optional. Optional named arguments that certain functions may support. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the function to evaluate. - * **Requires:** - * * must be in snake case (lower case with underscore separator). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the function to evaluate. - * **Requires:** - * * must be in snake case (lower case with underscore separator). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Ordered list of arguments the given function expects. - * - * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> - */ - public function getArgs() - { - return $this->args; - } - - /** - * Optional. Ordered list of arguments the given function expects. - * - * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\V1\Value[] $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->args = $arr; - - return $this; - } - - /** - * Optional. Optional named arguments that certain functions may support. - * - * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getOptions() - { - return $this->options; - } - - /** - * Optional. Optional named arguments that certain functions may support. - * - * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setOptions($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->options = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php deleted file mode 100644 index 8ef18f40550b..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryRequest.php +++ /dev/null @@ -1,364 +0,0 @@ -google.firestore.v1.PartitionQueryRequest - */ -class PartitionQueryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents`. - * Document resource names are not supported; only database resource names - * can be specified. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * The desired maximum number of partition points. - * The partitions may be returned across multiple pages of results. - * The number must be positive. The actual number of partitions - * returned may be fewer. - * For example, this may be set to one fewer than the number of parallel - * queries to be run, or in running a data pipeline job, one fewer than the - * number of workers or compute instances available. - * - * Generated from protobuf field int64 partition_count = 3; - */ - protected $partition_count = 0; - /** - * The `next_page_token` value returned from a previous call to - * PartitionQuery that may be used to get an additional set of results. - * There are no ordering guarantees between sets of results. Thus, using - * multiple sets of results will require merging the different result sets. - * For example, two subsequent calls using a page_token may return: - * * cursor B, cursor M, cursor Q - * * cursor A, cursor U, cursor W - * To obtain a complete result set ordered with respect to the results of the - * query supplied to PartitionQuery, the results sets should be merged: - * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - /** - * The maximum number of partitions to return in this call, subject to - * `partition_count`. - * For example, if `partition_count` = 10 and `page_size` = 8, the first call - * to PartitionQuery will return up to 8 partitions and a `next_page_token` - * if more results exist. A second call to PartitionQuery will return up to - * 2 partitions, to complete the total of 10 specified in `partition_count`. - * - * Generated from protobuf field int32 page_size = 5; - */ - protected $page_size = 0; - protected $query_type; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents`. - * Document resource names are not supported; only database resource names - * can be specified. - * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query - * A structured query. - * Query must specify collection with all descendants and be ordered by name - * ascending. Other filters, order bys, limits, offsets, and start/end - * cursors are not supported. - * @type int|string $partition_count - * The desired maximum number of partition points. - * The partitions may be returned across multiple pages of results. - * The number must be positive. The actual number of partitions - * returned may be fewer. - * For example, this may be set to one fewer than the number of parallel - * queries to be run, or in running a data pipeline job, one fewer than the - * number of workers or compute instances available. - * @type string $page_token - * The `next_page_token` value returned from a previous call to - * PartitionQuery that may be used to get an additional set of results. - * There are no ordering guarantees between sets of results. Thus, using - * multiple sets of results will require merging the different result sets. - * For example, two subsequent calls using a page_token may return: - * * cursor B, cursor M, cursor Q - * * cursor A, cursor U, cursor W - * To obtain a complete result set ordered with respect to the results of the - * query supplied to PartitionQuery, the results sets should be merged: - * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W - * @type int $page_size - * The maximum number of partitions to return in this call, subject to - * `partition_count`. - * For example, if `partition_count` = 10 and `page_size` = 8, the first call - * to PartitionQuery will return up to 8 partitions and a `next_page_token` - * if more results exist. A second call to PartitionQuery will return up to - * 2 partitions, to complete the total of 10 specified in `partition_count`. - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents`. - * Document resource names are not supported; only database resource names - * can be specified. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents`. - * Document resource names are not supported; only database resource names - * can be specified. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * A structured query. - * Query must specify collection with all descendants and be ordered by name - * ascending. Other filters, order bys, limits, offsets, and start/end - * cursors are not supported. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery|null - */ - public function getStructuredQuery() - { - return $this->readOneof(2); - } - - public function hasStructuredQuery() - { - return $this->hasOneof(2); - } - - /** - * A structured query. - * Query must specify collection with all descendants and be ordered by name - * ascending. Other filters, order bys, limits, offsets, and start/end - * cursors are not supported. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery $var - * @return $this - */ - public function setStructuredQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The desired maximum number of partition points. - * The partitions may be returned across multiple pages of results. - * The number must be positive. The actual number of partitions - * returned may be fewer. - * For example, this may be set to one fewer than the number of parallel - * queries to be run, or in running a data pipeline job, one fewer than the - * number of workers or compute instances available. - * - * Generated from protobuf field int64 partition_count = 3; - * @return int|string - */ - public function getPartitionCount() - { - return $this->partition_count; - } - - /** - * The desired maximum number of partition points. - * The partitions may be returned across multiple pages of results. - * The number must be positive. The actual number of partitions - * returned may be fewer. - * For example, this may be set to one fewer than the number of parallel - * queries to be run, or in running a data pipeline job, one fewer than the - * number of workers or compute instances available. - * - * Generated from protobuf field int64 partition_count = 3; - * @param int|string $var - * @return $this - */ - public function setPartitionCount($var) - { - GPBUtil::checkInt64($var); - $this->partition_count = $var; - - return $this; - } - - /** - * The `next_page_token` value returned from a previous call to - * PartitionQuery that may be used to get an additional set of results. - * There are no ordering guarantees between sets of results. Thus, using - * multiple sets of results will require merging the different result sets. - * For example, two subsequent calls using a page_token may return: - * * cursor B, cursor M, cursor Q - * * cursor A, cursor U, cursor W - * To obtain a complete result set ordered with respect to the results of the - * query supplied to PartitionQuery, the results sets should be merged: - * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The `next_page_token` value returned from a previous call to - * PartitionQuery that may be used to get an additional set of results. - * There are no ordering guarantees between sets of results. Thus, using - * multiple sets of results will require merging the different result sets. - * For example, two subsequent calls using a page_token may return: - * * cursor B, cursor M, cursor Q - * * cursor A, cursor U, cursor W - * To obtain a complete result set ordered with respect to the results of the - * query supplied to PartitionQuery, the results sets should be merged: - * cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The maximum number of partitions to return in this call, subject to - * `partition_count`. - * For example, if `partition_count` = 10 and `page_size` = 8, the first call - * to PartitionQuery will return up to 8 partitions and a `next_page_token` - * if more results exist. A second call to PartitionQuery will return up to - * 2 partitions, to complete the total of 10 specified in `partition_count`. - * - * Generated from protobuf field int32 page_size = 5; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of partitions to return in this call, subject to - * `partition_count`. - * For example, if `partition_count` = 10 and `page_size` = 8, the first call - * to PartitionQuery will return up to 8 partitions and a `next_page_token` - * if more results exist. A second call to PartitionQuery will return up to - * 2 partitions, to complete the total of 10 specified in `partition_count`. - * - * Generated from protobuf field int32 page_size = 5; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(6); - } - - public function hasReadTime() - { - return $this->hasOneof(6); - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php deleted file mode 100644 index 4592a55de307..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PartitionQueryResponse.php +++ /dev/null @@ -1,162 +0,0 @@ -google.firestore.v1.PartitionQueryResponse - */ -class PartitionQueryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Partition results. - * Each partition is a split point that can be used by RunQuery as a starting - * or end point for the query results. The RunQuery requests must be made with - * the same query supplied to this PartitionQuery request. The partition - * cursors will be ordered according to same ordering as the results of the - * query supplied to PartitionQuery. - * For example, if a PartitionQuery request returns partition cursors A and B, - * running the following three queries will return the entire result set of - * the original query: - * * query, end_at A - * * query, start_at A, end_at B - * * query, start_at B - * An empty result may indicate that the query has too few results to be - * partitioned, or that the query is not yet supported for partitioning. - * - * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; - */ - private $partitions; - /** - * A page token that may be used to request an additional set of results, up - * to the number specified by `partition_count` in the PartitionQuery request. - * If blank, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Cursor[] $partitions - * Partition results. - * Each partition is a split point that can be used by RunQuery as a starting - * or end point for the query results. The RunQuery requests must be made with - * the same query supplied to this PartitionQuery request. The partition - * cursors will be ordered according to same ordering as the results of the - * query supplied to PartitionQuery. - * For example, if a PartitionQuery request returns partition cursors A and B, - * running the following three queries will return the entire result set of - * the original query: - * * query, end_at A - * * query, start_at A, end_at B - * * query, start_at B - * An empty result may indicate that the query has too few results to be - * partitioned, or that the query is not yet supported for partitioning. - * @type string $next_page_token - * A page token that may be used to request an additional set of results, up - * to the number specified by `partition_count` in the PartitionQuery request. - * If blank, there are no more results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Partition results. - * Each partition is a split point that can be used by RunQuery as a starting - * or end point for the query results. The RunQuery requests must be made with - * the same query supplied to this PartitionQuery request. The partition - * cursors will be ordered according to same ordering as the results of the - * query supplied to PartitionQuery. - * For example, if a PartitionQuery request returns partition cursors A and B, - * running the following three queries will return the entire result set of - * the original query: - * * query, end_at A - * * query, start_at A, end_at B - * * query, start_at B - * An empty result may indicate that the query has too few results to be - * partitioned, or that the query is not yet supported for partitioning. - * - * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Cursor> - */ - public function getPartitions() - { - return $this->partitions; - } - - /** - * Partition results. - * Each partition is a split point that can be used by RunQuery as a starting - * or end point for the query results. The RunQuery requests must be made with - * the same query supplied to this PartitionQuery request. The partition - * cursors will be ordered according to same ordering as the results of the - * query supplied to PartitionQuery. - * For example, if a PartitionQuery request returns partition cursors A and B, - * running the following three queries will return the entire result set of - * the original query: - * * query, end_at A - * * query, start_at A, end_at B - * * query, start_at B - * An empty result may indicate that the query has too few results to be - * partitioned, or that the query is not yet supported for partitioning. - * - * Generated from protobuf field repeated .google.firestore.v1.Cursor partitions = 1; - * @param \Google\Cloud\Firestore\V1\Cursor[] $var - * @return $this - */ - public function setPartitions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Cursor::class); - $this->partitions = $arr; - - return $this; - } - - /** - * A page token that may be used to request an additional set of results, up - * to the number specified by `partition_count` in the PartitionQuery request. - * If blank, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A page token that may be used to request an additional set of results, up - * to the number specified by `partition_count` in the PartitionQuery request. - * If blank, there are no more results. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline.php deleted file mode 100644 index 8d5c8afc6abc..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline.php +++ /dev/null @@ -1,67 +0,0 @@ -google.firestore.v1.Pipeline - */ -class Pipeline extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Ordered list of stages to evaluate. - * - * Generated from protobuf field repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $stages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Pipeline\Stage[] $stages - * Required. Ordered list of stages to evaluate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Required. Ordered list of stages to evaluate. - * - * Generated from protobuf field repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Pipeline\Stage> - */ - public function getStages() - { - return $this->stages; - } - - /** - * Required. Ordered list of stages to evaluate. - * - * Generated from protobuf field repeated .google.firestore.v1.Pipeline.Stage stages = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\V1\Pipeline\Stage[] $var - * @return $this - */ - public function setStages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Pipeline\Stage::class); - $this->stages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline/Stage.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline/Stage.php deleted file mode 100644 index 47a7f1e726f9..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Pipeline/Stage.php +++ /dev/null @@ -1,157 +0,0 @@ -google.firestore.v1.Pipeline.Stage - */ -class Stage extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the stage to evaluate. - * **Requires:** - * * must be in snake case (lower case with underscore separator). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. Ordered list of arguments the given stage expects. - * - * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $args; - /** - * Optional. Optional named arguments that certain functions may support. - * - * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $options; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the stage to evaluate. - * **Requires:** - * * must be in snake case (lower case with underscore separator). - * @type \Google\Cloud\Firestore\V1\Value[] $args - * Optional. Ordered list of arguments the given stage expects. - * @type array|\Google\Protobuf\Internal\MapField $options - * Optional. Optional named arguments that certain functions may support. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the stage to evaluate. - * **Requires:** - * * must be in snake case (lower case with underscore separator). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the stage to evaluate. - * **Requires:** - * * must be in snake case (lower case with underscore separator). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Ordered list of arguments the given stage expects. - * - * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> - */ - public function getArgs() - { - return $this->args; - } - - /** - * Optional. Ordered list of arguments the given stage expects. - * - * Generated from protobuf field repeated .google.firestore.v1.Value args = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\V1\Value[] $var - * @return $this - */ - public function setArgs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->args = $arr; - - return $this; - } - - /** - * Optional. Optional named arguments that certain functions may support. - * - * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getOptions() - { - return $this->options; - } - - /** - * Optional. Optional named arguments that certain functions may support. - * - * Generated from protobuf field map options = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setOptions($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->options = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PlanSummary.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PlanSummary.php deleted file mode 100644 index 517cd29d648f..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/PlanSummary.php +++ /dev/null @@ -1,83 +0,0 @@ -google.firestore.v1.PlanSummary - */ -class PlanSummary extends \Google\Protobuf\Internal\Message -{ - /** - * The indexes selected for the query. For example: - * [ - * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, - * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} - * ] - * - * Generated from protobuf field repeated .google.protobuf.Struct indexes_used = 1; - */ - private $indexes_used; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Struct[] $indexes_used - * The indexes selected for the query. For example: - * [ - * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, - * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} - * ] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\QueryProfile::initOnce(); - parent::__construct($data); - } - - /** - * The indexes selected for the query. For example: - * [ - * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, - * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} - * ] - * - * Generated from protobuf field repeated .google.protobuf.Struct indexes_used = 1; - * @return RepeatedField<\Google\Protobuf\Struct> - */ - public function getIndexesUsed() - { - return $this->indexes_used; - } - - /** - * The indexes selected for the query. For example: - * [ - * {"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, - * {"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} - * ] - * - * Generated from protobuf field repeated .google.protobuf.Struct indexes_used = 1; - * @param \Google\Protobuf\Struct[] $var - * @return $this - */ - public function setIndexesUsed($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Struct::class); - $this->indexes_used = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php deleted file mode 100644 index a78e481b7ad5..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Precondition.php +++ /dev/null @@ -1,114 +0,0 @@ -google.firestore.v1.Precondition - */ -class Precondition extends \Google\Protobuf\Internal\Message -{ - protected $condition_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $exists - * When set to `true`, the target document must exist. - * When set to `false`, the target document must not exist. - * @type \Google\Protobuf\Timestamp $update_time - * When set, the target document must exist and have been last updated at - * that time. Timestamp must be microsecond aligned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * When set to `true`, the target document must exist. - * When set to `false`, the target document must not exist. - * - * Generated from protobuf field bool exists = 1; - * @return bool - */ - public function getExists() - { - return $this->readOneof(1); - } - - public function hasExists() - { - return $this->hasOneof(1); - } - - /** - * When set to `true`, the target document must exist. - * When set to `false`, the target document must not exist. - * - * Generated from protobuf field bool exists = 1; - * @param bool $var - * @return $this - */ - public function setExists($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * When set, the target document must exist and have been last updated at - * that time. Timestamp must be microsecond aligned. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->readOneof(2); - } - - public function hasUpdateTime() - { - return $this->hasOneof(2); - } - - /** - * When set, the target document must exist and have been last updated at - * that time. Timestamp must be microsecond aligned. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getConditionType() - { - return $this->whichOneof("condition_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php deleted file mode 100644 index ab42c1a2a4c9..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RollbackRequest.php +++ /dev/null @@ -1,121 +0,0 @@ -google.firestore.v1.RollbackRequest - */ -class RollbackRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * Required. The transaction to roll back. - * - * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $transaction = ''; - - /** - * @param string $database Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @param string $transaction Required. The transaction to roll back. - * - * @return \Google\Cloud\Firestore\V1\RollbackRequest - * - * @experimental - */ - public static function build(string $database, string $transaction): self - { - return (new self()) - ->setDatabase($database) - ->setTransaction($transaction); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * @type string $transaction - * Required. The transaction to roll back. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * Required. The transaction to roll back. - * - * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * Required. The transaction to roll back. - * - * Generated from protobuf field bytes transaction = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php deleted file mode 100644 index 723a1d0962f1..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryRequest.php +++ /dev/null @@ -1,304 +0,0 @@ -google.firestore.v1.RunAggregationQueryRequest - */ -class RunAggregationQueryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * - * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $explain_options = null; - protected $query_type; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery $structured_aggregation_query - * An aggregation query. - * @type string $transaction - * Run the aggregation within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction - * Starts a new transaction as part of the query, defaulting to read-only. - * The new transaction ID will be returned as the first response in the - * stream. - * @type \Google\Protobuf\Timestamp $read_time - * Executes the query at the given timestamp. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * @type \Google\Cloud\Firestore\V1\ExplainOptions $explain_options - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * An aggregation query. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery structured_aggregation_query = 2; - * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery|null - */ - public function getStructuredAggregationQuery() - { - return $this->readOneof(2); - } - - public function hasStructuredAggregationQuery() - { - return $this->hasOneof(2); - } - - /** - * An aggregation query. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery structured_aggregation_query = 2; - * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery $var - * @return $this - */ - public function setStructuredAggregationQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Run the aggregation within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 4; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(4); - } - - public function hasTransaction() - { - return $this->hasOneof(4); - } - - /** - * Run the aggregation within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 4; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Starts a new transaction as part of the query, defaulting to read-only. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; - * @return \Google\Cloud\Firestore\V1\TransactionOptions|null - */ - public function getNewTransaction() - { - return $this->readOneof(5); - } - - public function hasNewTransaction() - { - return $this->hasOneof(5); - } - - /** - * Starts a new transaction as part of the query, defaulting to read-only. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 5; - * @param \Google\Cloud\Firestore\V1\TransactionOptions $var - * @return $this - */ - public function setNewTransaction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Executes the query at the given timestamp. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(6); - } - - public function hasReadTime() - { - return $this->hasOneof(6); - } - - /** - * Executes the query at the given timestamp. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * - * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\V1\ExplainOptions|null - */ - public function getExplainOptions() - { - return $this->explain_options; - } - - public function hasExplainOptions() - { - return isset($this->explain_options); - } - - public function clearExplainOptions() - { - unset($this->explain_options); - } - - /** - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * - * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\V1\ExplainOptions $var - * @return $this - */ - public function setExplainOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainOptions::class); - $this->explain_options = $var; - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php deleted file mode 100644 index ace604bf5ecf..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunAggregationQueryResponse.php +++ /dev/null @@ -1,244 +0,0 @@ -google.firestore.v1.RunAggregationQueryResponse - */ -class RunAggregationQueryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A single aggregation result. - * Not present when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; - */ - protected $result = null; - /** - * The transaction that was started as part of this request. - * Only present on the first response when the request requested to start - * a new transaction. - * - * Generated from protobuf field bytes transaction = 2; - */ - protected $transaction = ''; - /** - * The time at which the aggregate result was computed. This is always - * monotonically increasing; in this case, the previous AggregationResult in - * the result stream are guaranteed not to have changed between their - * `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `result` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - */ - protected $read_time = null; - /** - * Query explain metrics. This is only present when the - * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * - * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 10; - */ - protected $explain_metrics = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\AggregationResult $result - * A single aggregation result. - * Not present when reporting partial progress. - * @type string $transaction - * The transaction that was started as part of this request. - * Only present on the first response when the request requested to start - * a new transaction. - * @type \Google\Protobuf\Timestamp $read_time - * The time at which the aggregate result was computed. This is always - * monotonically increasing; in this case, the previous AggregationResult in - * the result stream are guaranteed not to have changed between their - * `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `result` will be sent, and this represents the time at which the query - * was run. - * @type \Google\Cloud\Firestore\V1\ExplainMetrics $explain_metrics - * Query explain metrics. This is only present when the - * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * A single aggregation result. - * Not present when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; - * @return \Google\Cloud\Firestore\V1\AggregationResult|null - */ - public function getResult() - { - return $this->result; - } - - public function hasResult() - { - return isset($this->result); - } - - public function clearResult() - { - unset($this->result); - } - - /** - * A single aggregation result. - * Not present when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.AggregationResult result = 1; - * @param \Google\Cloud\Firestore\V1\AggregationResult $var - * @return $this - */ - public function setResult($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\AggregationResult::class); - $this->result = $var; - - return $this; - } - - /** - * The transaction that was started as part of this request. - * Only present on the first response when the request requested to start - * a new transaction. - * - * Generated from protobuf field bytes transaction = 2; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * The transaction that was started as part of this request. - * Only present on the first response when the request requested to start - * a new transaction. - * - * Generated from protobuf field bytes transaction = 2; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - - /** - * The time at which the aggregate result was computed. This is always - * monotonically increasing; in this case, the previous AggregationResult in - * the result stream are guaranteed not to have changed between their - * `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `result` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The time at which the aggregate result was computed. This is always - * monotonically increasing; in this case, the previous AggregationResult in - * the result stream are guaranteed not to have changed between their - * `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `result` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * Query explain metrics. This is only present when the - * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * - * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 10; - * @return \Google\Cloud\Firestore\V1\ExplainMetrics|null - */ - public function getExplainMetrics() - { - return $this->explain_metrics; - } - - public function hasExplainMetrics() - { - return isset($this->explain_metrics); - } - - public function clearExplainMetrics() - { - unset($this->explain_metrics); - } - - /** - * Query explain metrics. This is only present when the - * [RunAggregationQueryRequest.explain_options][google.firestore.v1.RunAggregationQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * - * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 10; - * @param \Google\Cloud\Firestore\V1\ExplainMetrics $var - * @return $this - */ - public function setExplainMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainMetrics::class); - $this->explain_metrics = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php deleted file mode 100644 index 91a9b297f86a..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryRequest.php +++ /dev/null @@ -1,306 +0,0 @@ -google.firestore.v1.RunQueryRequest - */ -class RunQueryRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * - * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $explain_options = null; - protected $query_type; - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query - * A structured query. - * @type string $transaction - * Run the query within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * @type \Google\Cloud\Firestore\V1\TransactionOptions $new_transaction - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * @type \Google\Cloud\Firestore\V1\ExplainOptions $explain_options - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * A structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery|null - */ - public function getStructuredQuery() - { - return $this->readOneof(2); - } - - public function hasStructuredQuery() - { - return $this->hasOneof(2); - } - - /** - * A structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery $var - * @return $this - */ - public function setStructuredQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Run the query within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 5; - * @return string - */ - public function getTransaction() - { - return $this->readOneof(5); - } - - public function hasTransaction() - { - return $this->hasOneof(5); - } - - /** - * Run the query within an already active transaction. - * The value here is the opaque transaction ID to execute the query in. - * - * Generated from protobuf field bytes transaction = 5; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; - * @return \Google\Cloud\Firestore\V1\TransactionOptions|null - */ - public function getNewTransaction() - { - return $this->readOneof(6); - } - - public function hasNewTransaction() - { - return $this->hasOneof(6); - } - - /** - * Starts a new transaction and reads the documents. - * Defaults to a read-only transaction. - * The new transaction ID will be returned as the first response in the - * stream. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions new_transaction = 6; - * @param \Google\Cloud\Firestore\V1\TransactionOptions $var - * @return $this - */ - public function setNewTransaction($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(7); - } - - public function hasReadTime() - { - return $this->hasOneof(7); - } - - /** - * Reads documents as they were at the given time. - * This must be a microsecond precision timestamp within the past one hour, - * or if Point-in-Time Recovery is enabled, can additionally be a whole - * minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 7; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * - * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\V1\ExplainOptions|null - */ - public function getExplainOptions() - { - return $this->explain_options; - } - - public function hasExplainOptions() - { - return isset($this->explain_options); - } - - public function clearExplainOptions() - { - unset($this->explain_options); - } - - /** - * Optional. Explain options for the query. If set, additional query - * statistics will be returned. If not, only query results will be returned. - * - * Generated from protobuf field .google.firestore.v1.ExplainOptions explain_options = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\V1\ExplainOptions $var - * @return $this - */ - public function setExplainOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainOptions::class); - $this->explain_options = $var; - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php deleted file mode 100644 index 0ee820b70e32..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/RunQueryResponse.php +++ /dev/null @@ -1,327 +0,0 @@ -google.firestore.v1.RunQueryResponse - */ -class RunQueryResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The transaction that was started as part of this request. - * Can only be set in the first response, and only if - * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] - * was set in the request. If set, no other fields will be set in this - * response. - * - * Generated from protobuf field bytes transaction = 2; - */ - protected $transaction = ''; - /** - * A query result, not set when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - */ - protected $document = null; - /** - * The time at which the document was read. This may be monotonically - * increasing; in this case, the previous documents in the result stream are - * guaranteed not to have changed between their `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `document` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - */ - protected $read_time = null; - /** - * The number of results that have been skipped due to an offset between - * the last response and the current response. - * - * Generated from protobuf field int32 skipped_results = 4; - */ - protected $skipped_results = 0; - /** - * Query explain metrics. This is only present when the - * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * - * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 11; - */ - protected $explain_metrics = null; - protected $continuation_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $transaction - * The transaction that was started as part of this request. - * Can only be set in the first response, and only if - * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] - * was set in the request. If set, no other fields will be set in this - * response. - * @type \Google\Cloud\Firestore\V1\Document $document - * A query result, not set when reporting partial progress. - * @type \Google\Protobuf\Timestamp $read_time - * The time at which the document was read. This may be monotonically - * increasing; in this case, the previous documents in the result stream are - * guaranteed not to have changed between their `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `document` will be sent, and this represents the time at which the query - * was run. - * @type int $skipped_results - * The number of results that have been skipped due to an offset between - * the last response and the current response. - * @type bool $done - * If present, Firestore has completely finished the request and no more - * documents will be returned. - * @type \Google\Cloud\Firestore\V1\ExplainMetrics $explain_metrics - * Query explain metrics. This is only present when the - * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The transaction that was started as part of this request. - * Can only be set in the first response, and only if - * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] - * was set in the request. If set, no other fields will be set in this - * response. - * - * Generated from protobuf field bytes transaction = 2; - * @return string - */ - public function getTransaction() - { - return $this->transaction; - } - - /** - * The transaction that was started as part of this request. - * Can only be set in the first response, and only if - * [RunQueryRequest.new_transaction][google.firestore.v1.RunQueryRequest.new_transaction] - * was set in the request. If set, no other fields will be set in this - * response. - * - * Generated from protobuf field bytes transaction = 2; - * @param string $var - * @return $this - */ - public function setTransaction($var) - { - GPBUtil::checkString($var, False); - $this->transaction = $var; - - return $this; - } - - /** - * A query result, not set when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * A query result, not set when reporting partial progress. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The time at which the document was read. This may be monotonically - * increasing; in this case, the previous documents in the result stream are - * guaranteed not to have changed between their `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `document` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The time at which the document was read. This may be monotonically - * increasing; in this case, the previous documents in the result stream are - * guaranteed not to have changed between their `read_time` and this one. - * If the query returns no results, a response with `read_time` and no - * `document` will be sent, and this represents the time at which the query - * was run. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - - /** - * The number of results that have been skipped due to an offset between - * the last response and the current response. - * - * Generated from protobuf field int32 skipped_results = 4; - * @return int - */ - public function getSkippedResults() - { - return $this->skipped_results; - } - - /** - * The number of results that have been skipped due to an offset between - * the last response and the current response. - * - * Generated from protobuf field int32 skipped_results = 4; - * @param int $var - * @return $this - */ - public function setSkippedResults($var) - { - GPBUtil::checkInt32($var); - $this->skipped_results = $var; - - return $this; - } - - /** - * If present, Firestore has completely finished the request and no more - * documents will be returned. - * - * Generated from protobuf field bool done = 6; - * @return bool - */ - public function getDone() - { - return $this->readOneof(6); - } - - public function hasDone() - { - return $this->hasOneof(6); - } - - /** - * If present, Firestore has completely finished the request and no more - * documents will be returned. - * - * Generated from protobuf field bool done = 6; - * @param bool $var - * @return $this - */ - public function setDone($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Query explain metrics. This is only present when the - * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * - * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 11; - * @return \Google\Cloud\Firestore\V1\ExplainMetrics|null - */ - public function getExplainMetrics() - { - return $this->explain_metrics; - } - - public function hasExplainMetrics() - { - return isset($this->explain_metrics); - } - - public function clearExplainMetrics() - { - unset($this->explain_metrics); - } - - /** - * Query explain metrics. This is only present when the - * [RunQueryRequest.explain_options][google.firestore.v1.RunQueryRequest.explain_options] - * is provided, and it is sent only once with the last response in the stream. - * - * Generated from protobuf field .google.firestore.v1.ExplainMetrics explain_metrics = 11; - * @param \Google\Cloud\Firestore\V1\ExplainMetrics $var - * @return $this - */ - public function setExplainMetrics($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ExplainMetrics::class); - $this->explain_metrics = $var; - - return $this; - } - - /** - * @return string - */ - public function getContinuationSelector() - { - return $this->whichOneof("continuation_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php deleted file mode 100644 index 38f437249c88..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery.php +++ /dev/null @@ -1,122 +0,0 @@ -google.firestore.v1.StructuredAggregationQuery - */ -class StructuredAggregationQuery extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Series of aggregations to apply over the results of the - * `structured_query`. - * Requires: - * * A minimum of one and maximum of five aggregations per query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $aggregations; - protected $query_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query - * Nested structured query. - * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation[] $aggregations - * Optional. Series of aggregations to apply over the results of the - * `structured_query`. - * Requires: - * * A minimum of one and maximum of five aggregations per query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * Nested structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery|null - */ - public function getStructuredQuery() - { - return $this->readOneof(1); - } - - public function hasStructuredQuery() - { - return $this->hasOneof(1); - } - - /** - * Nested structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery $var - * @return $this - */ - public function setStructuredQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Optional. Series of aggregations to apply over the results of the - * `structured_query`. - * Requires: - * * A minimum of one and maximum of five aggregations per query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation> - */ - public function getAggregations() - { - return $this->aggregations; - } - - /** - * Optional. Series of aggregations to apply over the results of the - * `structured_query`. - * Requires: - * * A minimum of one and maximum of five aggregations per query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredAggregationQuery.Aggregation aggregations = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation[] $var - * @return $this - */ - public function setAggregations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation::class); - $this->aggregations = $arr; - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php deleted file mode 100644 index 04b2898c8e33..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation.php +++ /dev/null @@ -1,287 +0,0 @@ -google.firestore.v1.StructuredAggregationQuery.Aggregation - */ -class Aggregation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Optional name of the field to store the result of the - * aggregation into. - * If not provided, Firestore will pick a default name following the format - * `field_`. For example: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2), - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) - * OVER ( - * ... - * ); - * ``` - * becomes: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2) AS field_1, - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) AS field_2 - * OVER ( - * ... - * ); - * ``` - * Requires: - * * Must be unique across all aggregation aliases. - * * Conform to [document field name][google.firestore.v1.Document.fields] - * limitations. - * - * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $alias = ''; - protected $operator; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count $count - * Count aggregator. - * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum $sum - * Sum aggregator. - * @type \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg $avg - * Average aggregator. - * @type string $alias - * Optional. Optional name of the field to store the result of the - * aggregation into. - * If not provided, Firestore will pick a default name following the format - * `field_`. For example: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2), - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) - * OVER ( - * ... - * ); - * ``` - * becomes: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2) AS field_1, - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) AS field_2 - * OVER ( - * ... - * ); - * ``` - * Requires: - * * Must be unique across all aggregation aliases. - * * Conform to [document field name][google.firestore.v1.Document.fields] - * limitations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * Count aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1; - * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count|null - */ - public function getCount() - { - return $this->readOneof(1); - } - - public function hasCount() - { - return $this->hasOneof(1); - } - - /** - * Count aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Count count = 1; - * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Count::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Sum aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2; - * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum|null - */ - public function getSum() - { - return $this->readOneof(2); - } - - public function hasSum() - { - return $this->hasOneof(2); - } - - /** - * Sum aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum sum = 2; - * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum $var - * @return $this - */ - public function setSum($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Sum::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Average aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3; - * @return \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg|null - */ - public function getAvg() - { - return $this->readOneof(3); - } - - public function hasAvg() - { - return $this->hasOneof(3); - } - - /** - * Average aggregator. - * - * Generated from protobuf field .google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg avg = 3; - * @param \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg $var - * @return $this - */ - public function setAvg($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredAggregationQuery\Aggregation\Avg::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Optional. Optional name of the field to store the result of the - * aggregation into. - * If not provided, Firestore will pick a default name following the format - * `field_`. For example: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2), - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) - * OVER ( - * ... - * ); - * ``` - * becomes: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2) AS field_1, - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) AS field_2 - * OVER ( - * ... - * ); - * ``` - * Requires: - * * Must be unique across all aggregation aliases. - * * Conform to [document field name][google.firestore.v1.Document.fields] - * limitations. - * - * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAlias() - { - return $this->alias; - } - - /** - * Optional. Optional name of the field to store the result of the - * aggregation into. - * If not provided, Firestore will pick a default name following the format - * `field_`. For example: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2), - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) - * OVER ( - * ... - * ); - * ``` - * becomes: - * ``` - * AGGREGATE - * COUNT_UP_TO(1) AS count_up_to_1, - * COUNT_UP_TO(2) AS field_1, - * COUNT_UP_TO(3) AS count_up_to_3, - * COUNT(*) AS field_2 - * OVER ( - * ... - * ); - * ``` - * Requires: - * * Must be unique across all aggregation aliases. - * * Conform to [document field name][google.firestore.v1.Document.fields] - * limitations. - * - * Generated from protobuf field string alias = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAlias($var) - { - GPBUtil::checkString($var, True); - $this->alias = $var; - - return $this; - } - - /** - * @return string - */ - public function getOperator() - { - return $this->whichOneof("operator"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Avg.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Avg.php deleted file mode 100644 index 7c58f19ceb45..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Avg.php +++ /dev/null @@ -1,83 +0,0 @@ -google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg - */ -class Avg extends \Google\Protobuf\Internal\Message -{ - /** - * The field to aggregate on. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - protected $field = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field - * The field to aggregate on. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The field to aggregate on. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getField() - { - return $this->field; - } - - public function hasField() - { - return isset($this->field); - } - - public function clearField() - { - unset($this->field); - } - - /** - * The field to aggregate on. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->field = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php deleted file mode 100644 index 5202b92cc409..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Count.php +++ /dev/null @@ -1,166 +0,0 @@ -google.firestore.v1.StructuredAggregationQuery.Aggregation.Count - */ -class Count extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Optional constraint on the maximum number of documents to - * count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency, and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $up_to = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Int64Value $up_to - * Optional. Optional constraint on the maximum number of documents to - * count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency, and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Optional constraint on the maximum number of documents to - * count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency, and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int64Value|null - */ - public function getUpTo() - { - return $this->up_to; - } - - public function hasUpTo() - { - return isset($this->up_to); - } - - public function clearUpTo() - { - unset($this->up_to); - } - - /** - * Returns the unboxed value from getUpTo() - - * Optional. Optional constraint on the maximum number of documents to - * count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency, and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string|null - */ - public function getUpToUnwrapped() - { - return $this->readWrapperValue("up_to"); - } - - /** - * Optional. Optional constraint on the maximum number of documents to - * count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency, and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int64Value $var - * @return $this - */ - public function setUpTo($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int64Value::class); - $this->up_to = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int64Value object. - - * Optional. Optional constraint on the maximum number of documents to - * count. - * This provides a way to set an upper bound on the number of documents - * to scan, limiting latency, and cost. - * Unspecified is interpreted as no bound. - * High-Level Example: - * ``` - * AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - * ``` - * Requires: - * * Must be greater than zero when present. - * - * Generated from protobuf field .google.protobuf.Int64Value up_to = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string|null $var - * @return $this - */ - public function setUpToUnwrapped($var) - { - $this->writeWrapperValue("up_to", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Sum.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Sum.php deleted file mode 100644 index 5e6f0ef1b0ce..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredAggregationQuery/Aggregation/Sum.php +++ /dev/null @@ -1,92 +0,0 @@ -google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum - */ -class Sum extends \Google\Protobuf\Internal\Message -{ - /** - * The field to aggregate on. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - protected $field = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field - * The field to aggregate on. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The field to aggregate on. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getField() - { - return $this->field; - } - - public function hasField() - { - return isset($this->field); - } - - public function clearField() - { - unset($this->field); - } - - /** - * The field to aggregate on. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->field = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredPipeline.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredPipeline.php deleted file mode 100644 index 91fb0cfa1f68..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredPipeline.php +++ /dev/null @@ -1,114 +0,0 @@ -google.firestore.v1.StructuredPipeline - */ -class StructuredPipeline extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The pipeline query to execute. - * - * Generated from protobuf field .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $pipeline = null; - /** - * Optional. Optional query-level arguments. - * - * Generated from protobuf field map options = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $options; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Pipeline $pipeline - * Required. The pipeline query to execute. - * @type array|\Google\Protobuf\Internal\MapField $options - * Optional. Optional query-level arguments. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Pipeline::initOnce(); - parent::__construct($data); - } - - /** - * Required. The pipeline query to execute. - * - * Generated from protobuf field .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\V1\Pipeline|null - */ - public function getPipeline() - { - return $this->pipeline; - } - - public function hasPipeline() - { - return isset($this->pipeline); - } - - public function clearPipeline() - { - unset($this->pipeline); - } - - /** - * Required. The pipeline query to execute. - * - * Generated from protobuf field .google.firestore.v1.Pipeline pipeline = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\V1\Pipeline $var - * @return $this - */ - public function setPipeline($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Pipeline::class); - $this->pipeline = $var; - - return $this; - } - - /** - * Optional. Optional query-level arguments. - * - * Generated from protobuf field map options = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getOptions() - { - return $this->options; - } - - /** - * Optional. Optional query-level arguments. - * - * Generated from protobuf field map options = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setOptions($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->options = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php deleted file mode 100644 index 7ec21ccd6c9d..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery.php +++ /dev/null @@ -1,652 +0,0 @@ -google.firestore.v1.StructuredQuery - */ -class StructuredQuery extends \Google\Protobuf\Internal\Message -{ - /** - * Optional sub-set of the fields to return. - * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the - * documents returned from a query. When not set, assumes that the caller - * wants all fields returned. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; - */ - protected $select = null; - /** - * The collections to query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; - */ - private $from; - /** - * The filter to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; - */ - protected $where = null; - /** - * The order to apply to the query results. - * Firestore allows callers to provide a full ordering, a partial ordering, or - * no ordering at all. In all cases, Firestore guarantees a stable ordering - * through the following rules: - * * The `order_by` is required to reference all fields used with an - * inequality filter. - * * All fields that are required to be in the `order_by` but are not already - * present are appended in lexicographical ordering of the field name. - * * If an order on `__name__` is not specified, it is appended by default. - * Fields are appended with the same sort direction as the last order - * specified, or 'ASCENDING' if no order was specified. For example: - * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` - * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` - * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` - * * `WHERE __name__ > ... AND a > 1` becomes - * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; - */ - private $order_by; - /** - * A potential prefix of a position in the result set to start the query at. - * The ordering of the result set is based on the `ORDER BY` clause of the - * original query. - * ``` - * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; - * ``` - * This query's results are ordered by `(b ASC, __name__ ASC)`. - * Cursors can reference either the full ordering or a prefix of the location, - * though it cannot reference more fields than what are in the provided - * `ORDER BY`. - * Continuing off the example above, attaching the following start cursors - * will have varying impact: - * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND - * b > 2 AND __name__ > /k/123`. - * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. - * Unlike `OFFSET` which requires scanning over the first N results to skip, - * a start cursor allows the query to begin at a logical position. This - * position is not required to match an actual result, it will scan forward - * from this position to find the next document. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; - */ - protected $start_at = null; - /** - * A potential prefix of a position in the result set to end the query at. - * This is similar to `START_AT` but with it controlling the end position - * rather than the start position. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; - */ - protected $end_at = null; - /** - * The number of documents to skip before returning the first result. - * This applies after the constraints specified by the `WHERE`, `START AT`, & - * `END AT` but before the `LIMIT` clause. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field int32 offset = 6; - */ - protected $offset = 0; - /** - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - */ - protected $limit = null; - /** - * Optional. A potential nearest neighbors search. - * Applies after all other filters and ordering. - * Finds the closest vector embeddings to the given query vector. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest find_nearest = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $find_nearest = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\Projection $select - * Optional sub-set of the fields to return. - * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the - * documents returned from a query. When not set, assumes that the caller - * wants all fields returned. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector[] $from - * The collections to query. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\Filter $where - * The filter to apply. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\Order[] $order_by - * The order to apply to the query results. - * Firestore allows callers to provide a full ordering, a partial ordering, or - * no ordering at all. In all cases, Firestore guarantees a stable ordering - * through the following rules: - * * The `order_by` is required to reference all fields used with an - * inequality filter. - * * All fields that are required to be in the `order_by` but are not already - * present are appended in lexicographical ordering of the field name. - * * If an order on `__name__` is not specified, it is appended by default. - * Fields are appended with the same sort direction as the last order - * specified, or 'ASCENDING' if no order was specified. For example: - * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` - * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` - * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` - * * `WHERE __name__ > ... AND a > 1` becomes - * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` - * @type \Google\Cloud\Firestore\V1\Cursor $start_at - * A potential prefix of a position in the result set to start the query at. - * The ordering of the result set is based on the `ORDER BY` clause of the - * original query. - * ``` - * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; - * ``` - * This query's results are ordered by `(b ASC, __name__ ASC)`. - * Cursors can reference either the full ordering or a prefix of the location, - * though it cannot reference more fields than what are in the provided - * `ORDER BY`. - * Continuing off the example above, attaching the following start cursors - * will have varying impact: - * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND - * b > 2 AND __name__ > /k/123`. - * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. - * Unlike `OFFSET` which requires scanning over the first N results to skip, - * a start cursor allows the query to begin at a logical position. This - * position is not required to match an actual result, it will scan forward - * from this position to find the next document. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * @type \Google\Cloud\Firestore\V1\Cursor $end_at - * A potential prefix of a position in the result set to end the query at. - * This is similar to `START_AT` but with it controlling the end position - * rather than the start position. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * @type int $offset - * The number of documents to skip before returning the first result. - * This applies after the constraints specified by the `WHERE`, `START AT`, & - * `END AT` but before the `LIMIT` clause. - * Requires: - * * The value must be greater than or equal to zero if specified. - * @type \Google\Protobuf\Int32Value $limit - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest $find_nearest - * Optional. A potential nearest neighbors search. - * Applies after all other filters and ordering. - * Finds the closest vector embeddings to the given query vector. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * Optional sub-set of the fields to return. - * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the - * documents returned from a query. When not set, assumes that the caller - * wants all fields returned. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\Projection|null - */ - public function getSelect() - { - return $this->select; - } - - public function hasSelect() - { - return isset($this->select); - } - - public function clearSelect() - { - unset($this->select); - } - - /** - * Optional sub-set of the fields to return. - * This acts as a [DocumentMask][google.firestore.v1.DocumentMask] over the - * documents returned from a query. When not set, assumes that the caller - * wants all fields returned. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Projection select = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\Projection $var - * @return $this - */ - public function setSelect($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\Projection::class); - $this->select = $var; - - return $this; - } - - /** - * The collections to query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; - * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector> - */ - public function getFrom() - { - return $this->from; - } - - /** - * The collections to query. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.CollectionSelector from = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector[] $var - * @return $this - */ - public function setFrom($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\CollectionSelector::class); - $this->from = $arr; - - return $this; - } - - /** - * The filter to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\Filter|null - */ - public function getWhere() - { - return $this->where; - } - - public function hasWhere() - { - return isset($this->where); - } - - public function clearWhere() - { - unset($this->where); - } - - /** - * The filter to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Filter where = 3; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\Filter $var - * @return $this - */ - public function setWhere($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\Filter::class); - $this->where = $var; - - return $this; - } - - /** - * The order to apply to the query results. - * Firestore allows callers to provide a full ordering, a partial ordering, or - * no ordering at all. In all cases, Firestore guarantees a stable ordering - * through the following rules: - * * The `order_by` is required to reference all fields used with an - * inequality filter. - * * All fields that are required to be in the `order_by` but are not already - * present are appended in lexicographical ordering of the field name. - * * If an order on `__name__` is not specified, it is appended by default. - * Fields are appended with the same sort direction as the last order - * specified, or 'ASCENDING' if no order was specified. For example: - * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` - * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` - * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` - * * `WHERE __name__ > ... AND a > 1` becomes - * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; - * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredQuery\Order> - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * The order to apply to the query results. - * Firestore allows callers to provide a full ordering, a partial ordering, or - * no ordering at all. In all cases, Firestore guarantees a stable ordering - * through the following rules: - * * The `order_by` is required to reference all fields used with an - * inequality filter. - * * All fields that are required to be in the `order_by` but are not already - * present are appended in lexicographical ordering of the field name. - * * If an order on `__name__` is not specified, it is appended by default. - * Fields are appended with the same sort direction as the last order - * specified, or 'ASCENDING' if no order was specified. For example: - * * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` - * * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` - * * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` - * * `WHERE __name__ > ... AND a > 1` becomes - * `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Order order_by = 4; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\Order[] $var - * @return $this - */ - public function setOrderBy($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\Order::class); - $this->order_by = $arr; - - return $this; - } - - /** - * A potential prefix of a position in the result set to start the query at. - * The ordering of the result set is based on the `ORDER BY` clause of the - * original query. - * ``` - * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; - * ``` - * This query's results are ordered by `(b ASC, __name__ ASC)`. - * Cursors can reference either the full ordering or a prefix of the location, - * though it cannot reference more fields than what are in the provided - * `ORDER BY`. - * Continuing off the example above, attaching the following start cursors - * will have varying impact: - * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND - * b > 2 AND __name__ > /k/123`. - * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. - * Unlike `OFFSET` which requires scanning over the first N results to skip, - * a start cursor allows the query to begin at a logical position. This - * position is not required to match an actual result, it will scan forward - * from this position to find the next document. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; - * @return \Google\Cloud\Firestore\V1\Cursor|null - */ - public function getStartAt() - { - return $this->start_at; - } - - public function hasStartAt() - { - return isset($this->start_at); - } - - public function clearStartAt() - { - unset($this->start_at); - } - - /** - * A potential prefix of a position in the result set to start the query at. - * The ordering of the result set is based on the `ORDER BY` clause of the - * original query. - * ``` - * SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; - * ``` - * This query's results are ordered by `(b ASC, __name__ ASC)`. - * Cursors can reference either the full ordering or a prefix of the location, - * though it cannot reference more fields than what are in the provided - * `ORDER BY`. - * Continuing off the example above, attaching the following start cursors - * will have varying impact: - * - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND - * b > 2 AND __name__ > /k/123`. - * - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. - * Unlike `OFFSET` which requires scanning over the first N results to skip, - * a start cursor allows the query to begin at a logical position. This - * position is not required to match an actual result, it will scan forward - * from this position to find the next document. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor start_at = 7; - * @param \Google\Cloud\Firestore\V1\Cursor $var - * @return $this - */ - public function setStartAt($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Cursor::class); - $this->start_at = $var; - - return $this; - } - - /** - * A potential prefix of a position in the result set to end the query at. - * This is similar to `START_AT` but with it controlling the end position - * rather than the start position. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; - * @return \Google\Cloud\Firestore\V1\Cursor|null - */ - public function getEndAt() - { - return $this->end_at; - } - - public function hasEndAt() - { - return isset($this->end_at); - } - - public function clearEndAt() - { - unset($this->end_at); - } - - /** - * A potential prefix of a position in the result set to end the query at. - * This is similar to `START_AT` but with it controlling the end position - * rather than the start position. - * Requires: - * * The number of values cannot be greater than the number of fields - * specified in the `ORDER BY` clause. - * - * Generated from protobuf field .google.firestore.v1.Cursor end_at = 8; - * @param \Google\Cloud\Firestore\V1\Cursor $var - * @return $this - */ - public function setEndAt($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Cursor::class); - $this->end_at = $var; - - return $this; - } - - /** - * The number of documents to skip before returning the first result. - * This applies after the constraints specified by the `WHERE`, `START AT`, & - * `END AT` but before the `LIMIT` clause. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field int32 offset = 6; - * @return int - */ - public function getOffset() - { - return $this->offset; - } - - /** - * The number of documents to skip before returning the first result. - * This applies after the constraints specified by the `WHERE`, `START AT`, & - * `END AT` but before the `LIMIT` clause. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field int32 offset = 6; - * @param int $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkInt32($var); - $this->offset = $var; - - return $this; - } - - /** - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - * @return \Google\Protobuf\Int32Value|null - */ - public function getLimit() - { - return $this->limit; - } - - public function hasLimit() - { - return isset($this->limit); - } - - public function clearLimit() - { - unset($this->limit); - } - - /** - * Returns the unboxed value from getLimit() - - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - * @return int|null - */ - public function getLimitUnwrapped() - { - return $this->readWrapperValue("limit"); - } - - /** - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setLimit($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->limit = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * The maximum number of results to return. - * Applies after all other constraints. - * Requires: - * * The value must be greater than or equal to zero if specified. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 5; - * @param int|null $var - * @return $this - */ - public function setLimitUnwrapped($var) - { - $this->writeWrapperValue("limit", $var); - return $this;} - - /** - * Optional. A potential nearest neighbors search. - * Applies after all other filters and ordering. - * Finds the closest vector embeddings to the given query vector. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest find_nearest = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest|null - */ - public function getFindNearest() - { - return $this->find_nearest; - } - - public function hasFindNearest() - { - return isset($this->find_nearest); - } - - public function clearFindNearest() - { - unset($this->find_nearest); - } - - /** - * Optional. A potential nearest neighbors search. - * Applies after all other filters and ordering. - * Finds the closest vector embeddings to the given query vector. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest find_nearest = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest $var - * @return $this - */ - public function setFindNearest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest::class); - $this->find_nearest = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php deleted file mode 100644 index cf990906266f..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CollectionSelector.php +++ /dev/null @@ -1,113 +0,0 @@ -google.firestore.v1.StructuredQuery.CollectionSelector - */ -class CollectionSelector extends \Google\Protobuf\Internal\Message -{ - /** - * The collection ID. - * When set, selects only collections with this ID. - * - * Generated from protobuf field string collection_id = 2; - */ - protected $collection_id = ''; - /** - * When false, selects only collections that are immediate children of - * the `parent` specified in the containing `RunQueryRequest`. - * When true, selects all descendant collections. - * - * Generated from protobuf field bool all_descendants = 3; - */ - protected $all_descendants = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $collection_id - * The collection ID. - * When set, selects only collections with this ID. - * @type bool $all_descendants - * When false, selects only collections that are immediate children of - * the `parent` specified in the containing `RunQueryRequest`. - * When true, selects all descendant collections. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The collection ID. - * When set, selects only collections with this ID. - * - * Generated from protobuf field string collection_id = 2; - * @return string - */ - public function getCollectionId() - { - return $this->collection_id; - } - - /** - * The collection ID. - * When set, selects only collections with this ID. - * - * Generated from protobuf field string collection_id = 2; - * @param string $var - * @return $this - */ - public function setCollectionId($var) - { - GPBUtil::checkString($var, True); - $this->collection_id = $var; - - return $this; - } - - /** - * When false, selects only collections that are immediate children of - * the `parent` specified in the containing `RunQueryRequest`. - * When true, selects all descendant collections. - * - * Generated from protobuf field bool all_descendants = 3; - * @return bool - */ - public function getAllDescendants() - { - return $this->all_descendants; - } - - /** - * When false, selects only collections that are immediate children of - * the `parent` specified in the containing `RunQueryRequest`. - * When true, selects all descendant collections. - * - * Generated from protobuf field bool all_descendants = 3; - * @param bool $var - * @return $this - */ - public function setAllDescendants($var) - { - GPBUtil::checkBool($var); - $this->all_descendants = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php deleted file mode 100644 index 5a006c7a4ddd..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter.php +++ /dev/null @@ -1,109 +0,0 @@ -google.firestore.v1.StructuredQuery.CompositeFilter - */ -class CompositeFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The operator for combining multiple filters. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; - */ - protected $op = 0; - /** - * The list of filters to combine. - * Requires: - * * At least one filter is present. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; - */ - private $filters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $op - * The operator for combining multiple filters. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\Filter[] $filters - * The list of filters to combine. - * Requires: - * * At least one filter is present. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The operator for combining multiple filters. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; - * @return int - */ - public function getOp() - { - return $this->op; - } - - /** - * The operator for combining multiple filters. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter.Operator op = 1; - * @param int $var - * @return $this - */ - public function setOp($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter\Operator::class); - $this->op = $var; - - return $this; - } - - /** - * The list of filters to combine. - * Requires: - * * At least one filter is present. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; - * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredQuery\Filter> - */ - public function getFilters() - { - return $this->filters; - } - - /** - * The list of filters to combine. - * Requires: - * * At least one filter is present. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.Filter filters = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\Filter[] $var - * @return $this - */ - public function setFilters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\Filter::class); - $this->filters = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php deleted file mode 100644 index ae6554be217b..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/CompositeFilter/Operator.php +++ /dev/null @@ -1,65 +0,0 @@ -google.firestore.v1.StructuredQuery.CompositeFilter.Operator - */ -class Operator -{ - /** - * Unspecified. This value must not be used. - * - * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; - */ - const OPERATOR_UNSPECIFIED = 0; - /** - * Documents are required to satisfy all of the combined filters. - * - * Generated from protobuf enum AND = 1; - */ - const PBAND = 1; - /** - * Documents are required to satisfy at least one of the combined filters. - * - * Generated from protobuf enum OR = 2; - */ - const PBOR = 2; - - private static $valueToName = [ - self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', - self::PBAND => 'AND', - self::PBOR => 'OR', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php deleted file mode 100644 index 0c598d813733..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Direction.php +++ /dev/null @@ -1,61 +0,0 @@ -google.firestore.v1.StructuredQuery.Direction - */ -class Direction -{ - /** - * Unspecified. - * - * Generated from protobuf enum DIRECTION_UNSPECIFIED = 0; - */ - const DIRECTION_UNSPECIFIED = 0; - /** - * Ascending. - * - * Generated from protobuf enum ASCENDING = 1; - */ - const ASCENDING = 1; - /** - * Descending. - * - * Generated from protobuf enum DESCENDING = 2; - */ - const DESCENDING = 2; - - private static $valueToName = [ - self::DIRECTION_UNSPECIFIED => 'DIRECTION_UNSPECIFIED', - self::ASCENDING => 'ASCENDING', - self::DESCENDING => 'DESCENDING', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php deleted file mode 100644 index 07005156b426..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter.php +++ /dev/null @@ -1,155 +0,0 @@ -google.firestore.v1.StructuredQuery.FieldFilter - */ -class FieldFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The field to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - protected $field = null; - /** - * The operator to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; - */ - protected $op = 0; - /** - * The value to compare to. - * - * Generated from protobuf field .google.firestore.v1.Value value = 3; - */ - protected $value = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field - * The field to filter by. - * @type int $op - * The operator to filter by. - * @type \Google\Cloud\Firestore\V1\Value $value - * The value to compare to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The field to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getField() - { - return $this->field; - } - - public function hasField() - { - return isset($this->field); - } - - public function clearField() - { - unset($this->field); - } - - /** - * The field to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->field = $var; - - return $this; - } - - /** - * The operator to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; - * @return int - */ - public function getOp() - { - return $this->op; - } - - /** - * The operator to filter by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter.Operator op = 2; - * @param int $var - * @return $this - */ - public function setOp($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter\Operator::class); - $this->op = $var; - - return $this; - } - - /** - * The value to compare to. - * - * Generated from protobuf field .google.firestore.v1.Value value = 3; - * @return \Google\Cloud\Firestore\V1\Value|null - */ - public function getValue() - { - return $this->value; - } - - public function hasValue() - { - return isset($this->value); - } - - public function clearValue() - { - unset($this->value); - } - - /** - * The value to compare to. - * - * Generated from protobuf field .google.firestore.v1.Value value = 3; - * @param \Google\Cloud\Firestore\V1\Value $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); - $this->value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php deleted file mode 100644 index 23eae118d8f1..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldFilter/Operator.php +++ /dev/null @@ -1,143 +0,0 @@ -google.firestore.v1.StructuredQuery.FieldFilter.Operator - */ -class Operator -{ - /** - * Unspecified. This value must not be used. - * - * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; - */ - const OPERATOR_UNSPECIFIED = 0; - /** - * The given `field` is less than the given `value`. - * Requires: - * * That `field` come first in `order_by`. - * - * Generated from protobuf enum LESS_THAN = 1; - */ - const LESS_THAN = 1; - /** - * The given `field` is less than or equal to the given `value`. - * Requires: - * * That `field` come first in `order_by`. - * - * Generated from protobuf enum LESS_THAN_OR_EQUAL = 2; - */ - const LESS_THAN_OR_EQUAL = 2; - /** - * The given `field` is greater than the given `value`. - * Requires: - * * That `field` come first in `order_by`. - * - * Generated from protobuf enum GREATER_THAN = 3; - */ - const GREATER_THAN = 3; - /** - * The given `field` is greater than or equal to the given `value`. - * Requires: - * * That `field` come first in `order_by`. - * - * Generated from protobuf enum GREATER_THAN_OR_EQUAL = 4; - */ - const GREATER_THAN_OR_EQUAL = 4; - /** - * The given `field` is equal to the given `value`. - * - * Generated from protobuf enum EQUAL = 5; - */ - const EQUAL = 5; - /** - * The given `field` is not equal to the given `value`. - * Requires: - * * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. - * * That `field` comes first in the `order_by`. - * - * Generated from protobuf enum NOT_EQUAL = 6; - */ - const NOT_EQUAL = 6; - /** - * The given `field` is an array that contains the given `value`. - * - * Generated from protobuf enum ARRAY_CONTAINS = 7; - */ - const ARRAY_CONTAINS = 7; - /** - * The given `field` is equal to at least one value in the given array. - * Requires: - * * That `value` is a non-empty `ArrayValue`, subject to disjunction - * limits. - * * No `NOT_IN` filters in the same query. - * - * Generated from protobuf enum IN = 8; - */ - const IN = 8; - /** - * The given `field` is an array that contains any of the values in the - * given array. - * Requires: - * * That `value` is a non-empty `ArrayValue`, subject to disjunction - * limits. - * * No other `ARRAY_CONTAINS_ANY` filters within the same disjunction. - * * No `NOT_IN` filters in the same query. - * - * Generated from protobuf enum ARRAY_CONTAINS_ANY = 9; - */ - const ARRAY_CONTAINS_ANY = 9; - /** - * The value of the `field` is not in the given array. - * Requires: - * * That `value` is a non-empty `ArrayValue` with at most 10 values. - * * No other `OR`, `IN`, `ARRAY_CONTAINS_ANY`, `NOT_IN`, `NOT_EQUAL`, - * `IS_NOT_NULL`, or `IS_NOT_NAN`. - * * That `field` comes first in the `order_by`. - * - * Generated from protobuf enum NOT_IN = 10; - */ - const NOT_IN = 10; - - private static $valueToName = [ - self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', - self::LESS_THAN => 'LESS_THAN', - self::LESS_THAN_OR_EQUAL => 'LESS_THAN_OR_EQUAL', - self::GREATER_THAN => 'GREATER_THAN', - self::GREATER_THAN_OR_EQUAL => 'GREATER_THAN_OR_EQUAL', - self::EQUAL => 'EQUAL', - self::NOT_EQUAL => 'NOT_EQUAL', - self::ARRAY_CONTAINS => 'ARRAY_CONTAINS', - self::IN => 'IN', - self::ARRAY_CONTAINS_ANY => 'ARRAY_CONTAINS_ANY', - self::NOT_IN => 'NOT_IN', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php deleted file mode 100644 index 0b53587c59b6..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FieldReference.php +++ /dev/null @@ -1,83 +0,0 @@ -google.firestore.v1.StructuredQuery.FieldReference - */ -class FieldReference extends \Google\Protobuf\Internal\Message -{ - /** - * A reference to a field in a document. - * Requires: - * * MUST be a dot-delimited (`.`) string of segments, where each segment - * conforms to [document field name][google.firestore.v1.Document.fields] - * limitations. - * - * Generated from protobuf field string field_path = 2; - */ - protected $field_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field_path - * A reference to a field in a document. - * Requires: - * * MUST be a dot-delimited (`.`) string of segments, where each segment - * conforms to [document field name][google.firestore.v1.Document.fields] - * limitations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * A reference to a field in a document. - * Requires: - * * MUST be a dot-delimited (`.`) string of segments, where each segment - * conforms to [document field name][google.firestore.v1.Document.fields] - * limitations. - * - * Generated from protobuf field string field_path = 2; - * @return string - */ - public function getFieldPath() - { - return $this->field_path; - } - - /** - * A reference to a field in a document. - * Requires: - * * MUST be a dot-delimited (`.`) string of segments, where each segment - * conforms to [document field name][google.firestore.v1.Document.fields] - * limitations. - * - * Generated from protobuf field string field_path = 2; - * @param string $var - * @return $this - */ - public function setFieldPath($var) - { - GPBUtil::checkString($var, True); - $this->field_path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php deleted file mode 100644 index 3a0beed1562c..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Filter.php +++ /dev/null @@ -1,141 +0,0 @@ -google.firestore.v1.StructuredQuery.Filter - */ -class Filter extends \Google\Protobuf\Internal\Message -{ - protected $filter_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter $composite_filter - * A composite filter. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter $field_filter - * A filter on a document field. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter $unary_filter - * A filter that takes exactly one argument. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * A composite filter. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter|null - */ - public function getCompositeFilter() - { - return $this->readOneof(1); - } - - public function hasCompositeFilter() - { - return $this->hasOneof(1); - } - - /** - * A composite filter. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.CompositeFilter composite_filter = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter $var - * @return $this - */ - public function setCompositeFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\CompositeFilter::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A filter on a document field. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter|null - */ - public function getFieldFilter() - { - return $this->readOneof(2); - } - - public function hasFieldFilter() - { - return $this->hasOneof(2); - } - - /** - * A filter on a document field. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldFilter field_filter = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter $var - * @return $this - */ - public function setFieldFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldFilter::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A filter that takes exactly one argument. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter|null - */ - public function getUnaryFilter() - { - return $this->readOneof(3); - } - - public function hasUnaryFilter() - { - return $this->hasOneof(3); - } - - /** - * A filter that takes exactly one argument. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter unary_filter = 3; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter $var - * @return $this - */ - public function setUnaryFilter($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getFilterType() - { - return $this->whichOneof("filter_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest.php deleted file mode 100644 index b9f2d3f526a9..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest.php +++ /dev/null @@ -1,396 +0,0 @@ -google.firestore.v1.StructuredQuery.FindNearest - */ -class FindNearest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. An indexed vector field to search upon. Only documents which - * contain vectors whose dimensionality match the query_vector can be - * returned. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference vector_field = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $vector_field = null; - /** - * Required. The query vector that we are searching on. Must be a vector of - * no more than 2048 dimensions. - * - * Generated from protobuf field .google.firestore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query_vector = null; - /** - * Required. The distance measure to use, required. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $distance_measure = 0; - /** - * Required. The number of nearest neighbors to return. Must be a positive - * integer of no more than 1000. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $limit = null; - /** - * Optional. Optional name of the field to output the result of the vector - * distance calculation. Must conform to [document field - * name][google.firestore.v1.Document.fields] limitations. - * - * Generated from protobuf field string distance_result_field = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $distance_result_field = ''; - /** - * Optional. Option to specify a threshold for which no less similar - * documents will be returned. The behavior of the specified - * `distance_measure` will affect the meaning of the distance threshold. - * Since DOT_PRODUCT distances increase when the vectors are more similar, - * the comparison is inverted. - * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` - * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` - * - * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $distance_threshold = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $vector_field - * Required. An indexed vector field to search upon. Only documents which - * contain vectors whose dimensionality match the query_vector can be - * returned. - * @type \Google\Cloud\Firestore\V1\Value $query_vector - * Required. The query vector that we are searching on. Must be a vector of - * no more than 2048 dimensions. - * @type int $distance_measure - * Required. The distance measure to use, required. - * @type \Google\Protobuf\Int32Value $limit - * Required. The number of nearest neighbors to return. Must be a positive - * integer of no more than 1000. - * @type string $distance_result_field - * Optional. Optional name of the field to output the result of the vector - * distance calculation. Must conform to [document field - * name][google.firestore.v1.Document.fields] limitations. - * @type \Google\Protobuf\DoubleValue $distance_threshold - * Optional. Option to specify a threshold for which no less similar - * documents will be returned. The behavior of the specified - * `distance_measure` will affect the meaning of the distance threshold. - * Since DOT_PRODUCT distances increase when the vectors are more similar, - * the comparison is inverted. - * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` - * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * Required. An indexed vector field to search upon. Only documents which - * contain vectors whose dimensionality match the query_vector can be - * returned. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference vector_field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getVectorField() - { - return $this->vector_field; - } - - public function hasVectorField() - { - return isset($this->vector_field); - } - - public function clearVectorField() - { - unset($this->vector_field); - } - - /** - * Required. An indexed vector field to search upon. Only documents which - * contain vectors whose dimensionality match the query_vector can be - * returned. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference vector_field = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setVectorField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->vector_field = $var; - - return $this; - } - - /** - * Required. The query vector that we are searching on. Must be a vector of - * no more than 2048 dimensions. - * - * Generated from protobuf field .google.firestore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\V1\Value|null - */ - public function getQueryVector() - { - return $this->query_vector; - } - - public function hasQueryVector() - { - return isset($this->query_vector); - } - - public function clearQueryVector() - { - unset($this->query_vector); - } - - /** - * Required. The query vector that we are searching on. Must be a vector of - * no more than 2048 dimensions. - * - * Generated from protobuf field .google.firestore.v1.Value query_vector = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\V1\Value $var - * @return $this - */ - public function setQueryVector($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Value::class); - $this->query_vector = $var; - - return $this; - } - - /** - * Required. The distance measure to use, required. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getDistanceMeasure() - { - return $this->distance_measure; - } - - /** - * Required. The distance measure to use, required. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure distance_measure = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setDistanceMeasure($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\FindNearest\DistanceMeasure::class); - $this->distance_measure = $var; - - return $this; - } - - /** - * Required. The number of nearest neighbors to return. Must be a positive - * integer of no more than 1000. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Protobuf\Int32Value|null - */ - public function getLimit() - { - return $this->limit; - } - - public function hasLimit() - { - return isset($this->limit); - } - - public function clearLimit() - { - unset($this->limit); - } - - /** - * Returns the unboxed value from getLimit() - - * Required. The number of nearest neighbors to return. Must be a positive - * integer of no more than 1000. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int|null - */ - public function getLimitUnwrapped() - { - return $this->readWrapperValue("limit"); - } - - /** - * Required. The number of nearest neighbors to return. Must be a positive - * integer of no more than 1000. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setLimit($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->limit = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Required. The number of nearest neighbors to return. Must be a positive - * integer of no more than 1000. - * - * Generated from protobuf field .google.protobuf.Int32Value limit = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int|null $var - * @return $this - */ - public function setLimitUnwrapped($var) - { - $this->writeWrapperValue("limit", $var); - return $this;} - - /** - * Optional. Optional name of the field to output the result of the vector - * distance calculation. Must conform to [document field - * name][google.firestore.v1.Document.fields] limitations. - * - * Generated from protobuf field string distance_result_field = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDistanceResultField() - { - return $this->distance_result_field; - } - - /** - * Optional. Optional name of the field to output the result of the vector - * distance calculation. Must conform to [document field - * name][google.firestore.v1.Document.fields] limitations. - * - * Generated from protobuf field string distance_result_field = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDistanceResultField($var) - { - GPBUtil::checkString($var, True); - $this->distance_result_field = $var; - - return $this; - } - - /** - * Optional. Option to specify a threshold for which no less similar - * documents will be returned. The behavior of the specified - * `distance_measure` will affect the meaning of the distance threshold. - * Since DOT_PRODUCT distances increase when the vectors are more similar, - * the comparison is inverted. - * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` - * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` - * - * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\DoubleValue|null - */ - public function getDistanceThreshold() - { - return $this->distance_threshold; - } - - public function hasDistanceThreshold() - { - return isset($this->distance_threshold); - } - - public function clearDistanceThreshold() - { - unset($this->distance_threshold); - } - - /** - * Returns the unboxed value from getDistanceThreshold() - - * Optional. Option to specify a threshold for which no less similar - * documents will be returned. The behavior of the specified - * `distance_measure` will affect the meaning of the distance threshold. - * Since DOT_PRODUCT distances increase when the vectors are more similar, - * the comparison is inverted. - * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` - * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` - * - * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return float|null - */ - public function getDistanceThresholdUnwrapped() - { - return $this->readWrapperValue("distance_threshold"); - } - - /** - * Optional. Option to specify a threshold for which no less similar - * documents will be returned. The behavior of the specified - * `distance_measure` will affect the meaning of the distance threshold. - * Since DOT_PRODUCT distances increase when the vectors are more similar, - * the comparison is inverted. - * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` - * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` - * - * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\DoubleValue $var - * @return $this - */ - public function setDistanceThreshold($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\DoubleValue::class); - $this->distance_threshold = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\DoubleValue object. - - * Optional. Option to specify a threshold for which no less similar - * documents will be returned. The behavior of the specified - * `distance_measure` will affect the meaning of the distance threshold. - * Since DOT_PRODUCT distances increase when the vectors are more similar, - * the comparison is inverted. - * * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` - * * For DOT_PRODUCT: `WHERE distance >= distance_threshold` - * - * Generated from protobuf field .google.protobuf.DoubleValue distance_threshold = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param float|null $var - * @return $this - */ - public function setDistanceThresholdUnwrapped($var) - { - $this->writeWrapperValue("distance_threshold", $var); - return $this;} - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest/DistanceMeasure.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest/DistanceMeasure.php deleted file mode 100644 index 27f0c9d19df1..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/FindNearest/DistanceMeasure.php +++ /dev/null @@ -1,80 +0,0 @@ -google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure - */ -class DistanceMeasure -{ - /** - * Should not be set. - * - * Generated from protobuf enum DISTANCE_MEASURE_UNSPECIFIED = 0; - */ - const DISTANCE_MEASURE_UNSPECIFIED = 0; - /** - * Measures the EUCLIDEAN distance between the vectors. See - * [Euclidean](https://en.wikipedia.org/wiki/Euclidean_distance) to learn - * more. The resulting distance decreases the more similar two vectors - * are. - * - * Generated from protobuf enum EUCLIDEAN = 1; - */ - const EUCLIDEAN = 1; - /** - * COSINE distance compares vectors based on the angle between them, which - * allows you to measure similarity that isn't based on the vectors - * magnitude. We recommend using DOT_PRODUCT with unit normalized vectors - * instead of COSINE distance, which is mathematically equivalent with - * better performance. See [Cosine - * Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to learn - * more about COSINE similarity and COSINE distance. The resulting - * COSINE distance decreases the more similar two vectors are. - * - * Generated from protobuf enum COSINE = 2; - */ - const COSINE = 2; - /** - * Similar to cosine but is affected by the magnitude of the vectors. See - * [Dot Product](https://en.wikipedia.org/wiki/Dot_product) to learn more. - * The resulting distance increases the more similar two vectors are. - * - * Generated from protobuf enum DOT_PRODUCT = 3; - */ - const DOT_PRODUCT = 3; - - private static $valueToName = [ - self::DISTANCE_MEASURE_UNSPECIFIED => 'DISTANCE_MEASURE_UNSPECIFIED', - self::EUCLIDEAN => 'EUCLIDEAN', - self::COSINE => 'COSINE', - self::DOT_PRODUCT => 'DOT_PRODUCT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php deleted file mode 100644 index 398914ff2a88..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Order.php +++ /dev/null @@ -1,111 +0,0 @@ -google.firestore.v1.StructuredQuery.Order - */ -class Order extends \Google\Protobuf\Internal\Message -{ - /** - * The field to order by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - */ - protected $field = null; - /** - * The direction to order by. Defaults to `ASCENDING`. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; - */ - protected $direction = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field - * The field to order by. - * @type int $direction - * The direction to order by. Defaults to `ASCENDING`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The field to order by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getField() - { - return $this->field; - } - - public function hasField() - { - return isset($this->field); - } - - public function clearField() - { - unset($this->field); - } - - /** - * The field to order by. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 1; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->field = $var; - - return $this; - } - - /** - * The direction to order by. Defaults to `ASCENDING`. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; - * @return int - */ - public function getDirection() - { - return $this->direction; - } - - /** - * The direction to order by. Defaults to `ASCENDING`. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.Direction direction = 2; - * @param int $var - * @return $this - */ - public function setDirection($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\Direction::class); - $this->direction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php deleted file mode 100644 index 07788a015d64..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/Projection.php +++ /dev/null @@ -1,75 +0,0 @@ -google.firestore.v1.StructuredQuery.Projection - */ -class Projection extends \Google\Protobuf\Internal\Message -{ - /** - * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - */ - private $fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference[] $fields - * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - * @return RepeatedField<\Google\Cloud\Firestore\V1\StructuredQuery\FieldReference> - */ - public function getFields() - { - return $this->fields; - } - - /** - * The fields to return. - * If empty, all fields are returned. To only return the name - * of the document, use `['__name__']`. - * - * Generated from protobuf field repeated .google.firestore.v1.StructuredQuery.FieldReference fields = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference[] $var - * @return $this - */ - public function setFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->fields = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php deleted file mode 100644 index e7cffcd5e3c6..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter.php +++ /dev/null @@ -1,109 +0,0 @@ -google.firestore.v1.StructuredQuery.UnaryFilter - */ -class UnaryFilter extends \Google\Protobuf\Internal\Message -{ - /** - * The unary operator to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - */ - protected $op = 0; - protected $operand_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $op - * The unary operator to apply. - * @type \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $field - * The field to which to apply the operator. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Query::initOnce(); - parent::__construct($data); - } - - /** - * The unary operator to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - * @return int - */ - public function getOp() - { - return $this->op; - } - - /** - * The unary operator to apply. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.UnaryFilter.Operator op = 1; - * @param int $var - * @return $this - */ - public function setOp($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\StructuredQuery\UnaryFilter\Operator::class); - $this->op = $var; - - return $this; - } - - /** - * The field to which to apply the operator. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference|null - */ - public function getField() - { - return $this->readOneof(2); - } - - public function hasField() - { - return $this->hasOneof(2); - } - - /** - * The field to which to apply the operator. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery.FieldReference field = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery\FieldReference::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getOperandType() - { - return $this->whichOneof("operand_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php deleted file mode 100644 index 4c991e2fd636..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/StructuredQuery/UnaryFilter/Operator.php +++ /dev/null @@ -1,81 +0,0 @@ -google.firestore.v1.StructuredQuery.UnaryFilter.Operator - */ -class Operator -{ - /** - * Unspecified. This value must not be used. - * - * Generated from protobuf enum OPERATOR_UNSPECIFIED = 0; - */ - const OPERATOR_UNSPECIFIED = 0; - /** - * The given `field` is equal to `NaN`. - * - * Generated from protobuf enum IS_NAN = 2; - */ - const IS_NAN = 2; - /** - * The given `field` is equal to `NULL`. - * - * Generated from protobuf enum IS_NULL = 3; - */ - const IS_NULL = 3; - /** - * The given `field` is not equal to `NaN`. - * Requires: - * * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. - * * That `field` comes first in the `order_by`. - * - * Generated from protobuf enum IS_NOT_NAN = 4; - */ - const IS_NOT_NAN = 4; - /** - * The given `field` is not equal to `NULL`. - * Requires: - * * A single `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. - * * That `field` comes first in the `order_by`. - * - * Generated from protobuf enum IS_NOT_NULL = 5; - */ - const IS_NOT_NULL = 5; - - private static $valueToName = [ - self::OPERATOR_UNSPECIFIED => 'OPERATOR_UNSPECIFIED', - self::IS_NAN => 'IS_NAN', - self::IS_NULL => 'IS_NULL', - self::IS_NOT_NAN => 'IS_NOT_NAN', - self::IS_NOT_NULL => 'IS_NOT_NULL', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php deleted file mode 100644 index 187794cd9a71..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target.php +++ /dev/null @@ -1,407 +0,0 @@ -google.firestore.v1.Target - */ -class Target extends \Google\Protobuf\Internal\Message -{ - /** - * The target ID that identifies the target on the stream. Must be a positive - * number and non-zero. - * If `target_id` is 0 (or unspecified), the server will assign an ID for this - * target and return that in a `TargetChange::ADD` event. Once a target with - * `target_id=0` is added, all subsequent targets must also have - * `target_id=0`. If an `AddTarget` request with `target_id != 0` is - * sent to the server after a target with `target_id=0` is added, the server - * will immediately send a response with a `TargetChange::Remove` event. - * Note that if the client sends multiple `AddTarget` requests - * without an ID, the order of IDs returned in `TargetChange.target_ids` are - * undefined. Therefore, clients should provide a target ID instead of relying - * on the server to assign one. - * If `target_id` is non-zero, there must not be an existing active target on - * this stream with the same ID. - * - * Generated from protobuf field int32 target_id = 5; - */ - protected $target_id = 0; - /** - * If the target should be removed once it is current and consistent. - * - * Generated from protobuf field bool once = 6; - */ - protected $once = false; - /** - * The number of documents that last matched the query at the resume token or - * read time. - * This value is only relevant when a `resume_type` is provided. This value - * being present and greater than zero signals that the client wants - * `ExistenceFilter.unchanged_names` to be included in the response. - * - * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; - */ - protected $expected_count = null; - protected $target_type; - protected $resume_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Target\QueryTarget $query - * A target specified by a query. - * @type \Google\Cloud\Firestore\V1\Target\DocumentsTarget $documents - * A target specified by a set of document names. - * @type string $resume_token - * A resume token from a prior - * [TargetChange][google.firestore.v1.TargetChange] for an identical target. - * Using a resume token with a different target is unsupported and may fail. - * @type \Google\Protobuf\Timestamp $read_time - * Start listening after a specific `read_time`. - * The client must know the state of matching documents at this time. - * @type int $target_id - * The target ID that identifies the target on the stream. Must be a positive - * number and non-zero. - * If `target_id` is 0 (or unspecified), the server will assign an ID for this - * target and return that in a `TargetChange::ADD` event. Once a target with - * `target_id=0` is added, all subsequent targets must also have - * `target_id=0`. If an `AddTarget` request with `target_id != 0` is - * sent to the server after a target with `target_id=0` is added, the server - * will immediately send a response with a `TargetChange::Remove` event. - * Note that if the client sends multiple `AddTarget` requests - * without an ID, the order of IDs returned in `TargetChange.target_ids` are - * undefined. Therefore, clients should provide a target ID instead of relying - * on the server to assign one. - * If `target_id` is non-zero, there must not be an existing active target on - * this stream with the same ID. - * @type bool $once - * If the target should be removed once it is current and consistent. - * @type \Google\Protobuf\Int32Value $expected_count - * The number of documents that last matched the query at the resume token or - * read time. - * This value is only relevant when a `resume_type` is provided. This value - * being present and greater than zero signals that the client wants - * `ExistenceFilter.unchanged_names` to be included in the response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * A target specified by a query. - * - * Generated from protobuf field .google.firestore.v1.Target.QueryTarget query = 2; - * @return \Google\Cloud\Firestore\V1\Target\QueryTarget|null - */ - public function getQuery() - { - return $this->readOneof(2); - } - - public function hasQuery() - { - return $this->hasOneof(2); - } - - /** - * A target specified by a query. - * - * Generated from protobuf field .google.firestore.v1.Target.QueryTarget query = 2; - * @param \Google\Cloud\Firestore\V1\Target\QueryTarget $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target\QueryTarget::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A target specified by a set of document names. - * - * Generated from protobuf field .google.firestore.v1.Target.DocumentsTarget documents = 3; - * @return \Google\Cloud\Firestore\V1\Target\DocumentsTarget|null - */ - public function getDocuments() - { - return $this->readOneof(3); - } - - public function hasDocuments() - { - return $this->hasOneof(3); - } - - /** - * A target specified by a set of document names. - * - * Generated from protobuf field .google.firestore.v1.Target.DocumentsTarget documents = 3; - * @param \Google\Cloud\Firestore\V1\Target\DocumentsTarget $var - * @return $this - */ - public function setDocuments($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Target\DocumentsTarget::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A resume token from a prior - * [TargetChange][google.firestore.v1.TargetChange] for an identical target. - * Using a resume token with a different target is unsupported and may fail. - * - * Generated from protobuf field bytes resume_token = 4; - * @return string - */ - public function getResumeToken() - { - return $this->readOneof(4); - } - - public function hasResumeToken() - { - return $this->hasOneof(4); - } - - /** - * A resume token from a prior - * [TargetChange][google.firestore.v1.TargetChange] for an identical target. - * Using a resume token with a different target is unsupported and may fail. - * - * Generated from protobuf field bytes resume_token = 4; - * @param string $var - * @return $this - */ - public function setResumeToken($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Start listening after a specific `read_time`. - * The client must know the state of matching documents at this time. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 11; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(11); - } - - public function hasReadTime() - { - return $this->hasOneof(11); - } - - /** - * Start listening after a specific `read_time`. - * The client must know the state of matching documents at this time. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 11; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * The target ID that identifies the target on the stream. Must be a positive - * number and non-zero. - * If `target_id` is 0 (or unspecified), the server will assign an ID for this - * target and return that in a `TargetChange::ADD` event. Once a target with - * `target_id=0` is added, all subsequent targets must also have - * `target_id=0`. If an `AddTarget` request with `target_id != 0` is - * sent to the server after a target with `target_id=0` is added, the server - * will immediately send a response with a `TargetChange::Remove` event. - * Note that if the client sends multiple `AddTarget` requests - * without an ID, the order of IDs returned in `TargetChange.target_ids` are - * undefined. Therefore, clients should provide a target ID instead of relying - * on the server to assign one. - * If `target_id` is non-zero, there must not be an existing active target on - * this stream with the same ID. - * - * Generated from protobuf field int32 target_id = 5; - * @return int - */ - public function getTargetId() - { - return $this->target_id; - } - - /** - * The target ID that identifies the target on the stream. Must be a positive - * number and non-zero. - * If `target_id` is 0 (or unspecified), the server will assign an ID for this - * target and return that in a `TargetChange::ADD` event. Once a target with - * `target_id=0` is added, all subsequent targets must also have - * `target_id=0`. If an `AddTarget` request with `target_id != 0` is - * sent to the server after a target with `target_id=0` is added, the server - * will immediately send a response with a `TargetChange::Remove` event. - * Note that if the client sends multiple `AddTarget` requests - * without an ID, the order of IDs returned in `TargetChange.target_ids` are - * undefined. Therefore, clients should provide a target ID instead of relying - * on the server to assign one. - * If `target_id` is non-zero, there must not be an existing active target on - * this stream with the same ID. - * - * Generated from protobuf field int32 target_id = 5; - * @param int $var - * @return $this - */ - public function setTargetId($var) - { - GPBUtil::checkInt32($var); - $this->target_id = $var; - - return $this; - } - - /** - * If the target should be removed once it is current and consistent. - * - * Generated from protobuf field bool once = 6; - * @return bool - */ - public function getOnce() - { - return $this->once; - } - - /** - * If the target should be removed once it is current and consistent. - * - * Generated from protobuf field bool once = 6; - * @param bool $var - * @return $this - */ - public function setOnce($var) - { - GPBUtil::checkBool($var); - $this->once = $var; - - return $this; - } - - /** - * The number of documents that last matched the query at the resume token or - * read time. - * This value is only relevant when a `resume_type` is provided. This value - * being present and greater than zero signals that the client wants - * `ExistenceFilter.unchanged_names` to be included in the response. - * - * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; - * @return \Google\Protobuf\Int32Value|null - */ - public function getExpectedCount() - { - return $this->expected_count; - } - - public function hasExpectedCount() - { - return isset($this->expected_count); - } - - public function clearExpectedCount() - { - unset($this->expected_count); - } - - /** - * Returns the unboxed value from getExpectedCount() - - * The number of documents that last matched the query at the resume token or - * read time. - * This value is only relevant when a `resume_type` is provided. This value - * being present and greater than zero signals that the client wants - * `ExistenceFilter.unchanged_names` to be included in the response. - * - * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; - * @return int|null - */ - public function getExpectedCountUnwrapped() - { - return $this->readWrapperValue("expected_count"); - } - - /** - * The number of documents that last matched the query at the resume token or - * read time. - * This value is only relevant when a `resume_type` is provided. This value - * being present and greater than zero signals that the client wants - * `ExistenceFilter.unchanged_names` to be included in the response. - * - * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setExpectedCount($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->expected_count = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * The number of documents that last matched the query at the resume token or - * read time. - * This value is only relevant when a `resume_type` is provided. This value - * being present and greater than zero signals that the client wants - * `ExistenceFilter.unchanged_names` to be included in the response. - * - * Generated from protobuf field .google.protobuf.Int32Value expected_count = 12; - * @param int|null $var - * @return $this - */ - public function setExpectedCountUnwrapped($var) - { - $this->writeWrapperValue("expected_count", $var); - return $this;} - - /** - * @return string - */ - public function getTargetType() - { - return $this->whichOneof("target_type"); - } - - /** - * @return string - */ - public function getResumeType() - { - return $this->whichOneof("resume_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php deleted file mode 100644 index b4cab2dfd941..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/DocumentsTarget.php +++ /dev/null @@ -1,79 +0,0 @@ -google.firestore.v1.Target.DocumentsTarget - */ -class DocumentsTarget extends \Google\Protobuf\Internal\Message -{ - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of - * the given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - */ - private $documents; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $documents - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of - * the given `database`. Duplicate names will be elided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of - * the given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - * @return RepeatedField - */ - public function getDocuments() - { - return $this->documents; - } - - /** - * The names of the documents to retrieve. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * The request will fail if any of the document is not a child resource of - * the given `database`. Duplicate names will be elided. - * - * Generated from protobuf field repeated string documents = 2; - * @param string[] $var - * @return $this - */ - public function setDocuments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->documents = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php deleted file mode 100644 index 94ccd8393aa9..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Target/QueryTarget.php +++ /dev/null @@ -1,129 +0,0 @@ -google.firestore.v1.Target.QueryTarget - */ -class QueryTarget extends \Google\Protobuf\Internal\Message -{ - /** - * The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1; - */ - protected $parent = ''; - protected $query_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * @type \Google\Cloud\Firestore\V1\StructuredQuery $structured_query - * A structured query. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The parent resource name. In the format: - * `projects/{project_id}/databases/{database_id}/documents` or - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * For example: - * `projects/my-project/databases/my-database/documents` or - * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - * - * Generated from protobuf field string parent = 1; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * A structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @return \Google\Cloud\Firestore\V1\StructuredQuery|null - */ - public function getStructuredQuery() - { - return $this->readOneof(2); - } - - public function hasStructuredQuery() - { - return $this->hasOneof(2); - } - - /** - * A structured query. - * - * Generated from protobuf field .google.firestore.v1.StructuredQuery structured_query = 2; - * @param \Google\Cloud\Firestore\V1\StructuredQuery $var - * @return $this - */ - public function setStructuredQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\StructuredQuery::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getQueryType() - { - return $this->whichOneof("query_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php deleted file mode 100644 index a47a27e138bd..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange.php +++ /dev/null @@ -1,267 +0,0 @@ -google.firestore.v1.TargetChange - */ -class TargetChange extends \Google\Protobuf\Internal\Message -{ - /** - * The type of change that occurred. - * - * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; - */ - protected $target_change_type = 0; - /** - * The target IDs of targets that have changed. - * If empty, the change applies to all targets. - * The order of the target IDs is not defined. - * - * Generated from protobuf field repeated int32 target_ids = 2; - */ - private $target_ids; - /** - * The error that resulted in this change, if applicable. - * - * Generated from protobuf field .google.rpc.Status cause = 3; - */ - protected $cause = null; - /** - * A token that can be used to resume the stream for the given `target_ids`, - * or all targets if `target_ids` is empty. - * Not set on every target change. - * - * Generated from protobuf field bytes resume_token = 4; - */ - protected $resume_token = ''; - /** - * The consistent `read_time` for the given `target_ids` (omitted when the - * target_ids are not at a consistent snapshot). - * The stream is guaranteed to send a `read_time` with `target_ids` empty - * whenever the entire stream reaches a new consistent snapshot. ADD, - * CURRENT, and RESET messages are guaranteed to (eventually) result in a - * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). - * For a given stream, `read_time` is guaranteed to be monotonically - * increasing. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - */ - protected $read_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $target_change_type - * The type of change that occurred. - * @type int[] $target_ids - * The target IDs of targets that have changed. - * If empty, the change applies to all targets. - * The order of the target IDs is not defined. - * @type \Google\Rpc\Status $cause - * The error that resulted in this change, if applicable. - * @type string $resume_token - * A token that can be used to resume the stream for the given `target_ids`, - * or all targets if `target_ids` is empty. - * Not set on every target change. - * @type \Google\Protobuf\Timestamp $read_time - * The consistent `read_time` for the given `target_ids` (omitted when the - * target_ids are not at a consistent snapshot). - * The stream is guaranteed to send a `read_time` with `target_ids` empty - * whenever the entire stream reaches a new consistent snapshot. ADD, - * CURRENT, and RESET messages are guaranteed to (eventually) result in a - * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). - * For a given stream, `read_time` is guaranteed to be monotonically - * increasing. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The type of change that occurred. - * - * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; - * @return int - */ - public function getTargetChangeType() - { - return $this->target_change_type; - } - - /** - * The type of change that occurred. - * - * Generated from protobuf field .google.firestore.v1.TargetChange.TargetChangeType target_change_type = 1; - * @param int $var - * @return $this - */ - public function setTargetChangeType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Firestore\V1\TargetChange\TargetChangeType::class); - $this->target_change_type = $var; - - return $this; - } - - /** - * The target IDs of targets that have changed. - * If empty, the change applies to all targets. - * The order of the target IDs is not defined. - * - * Generated from protobuf field repeated int32 target_ids = 2; - * @return RepeatedField - */ - public function getTargetIds() - { - return $this->target_ids; - } - - /** - * The target IDs of targets that have changed. - * If empty, the change applies to all targets. - * The order of the target IDs is not defined. - * - * Generated from protobuf field repeated int32 target_ids = 2; - * @param int[] $var - * @return $this - */ - public function setTargetIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT32); - $this->target_ids = $arr; - - return $this; - } - - /** - * The error that resulted in this change, if applicable. - * - * Generated from protobuf field .google.rpc.Status cause = 3; - * @return \Google\Rpc\Status|null - */ - public function getCause() - { - return $this->cause; - } - - public function hasCause() - { - return isset($this->cause); - } - - public function clearCause() - { - unset($this->cause); - } - - /** - * The error that resulted in this change, if applicable. - * - * Generated from protobuf field .google.rpc.Status cause = 3; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setCause($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->cause = $var; - - return $this; - } - - /** - * A token that can be used to resume the stream for the given `target_ids`, - * or all targets if `target_ids` is empty. - * Not set on every target change. - * - * Generated from protobuf field bytes resume_token = 4; - * @return string - */ - public function getResumeToken() - { - return $this->resume_token; - } - - /** - * A token that can be used to resume the stream for the given `target_ids`, - * or all targets if `target_ids` is empty. - * Not set on every target change. - * - * Generated from protobuf field bytes resume_token = 4; - * @param string $var - * @return $this - */ - public function setResumeToken($var) - { - GPBUtil::checkString($var, False); - $this->resume_token = $var; - - return $this; - } - - /** - * The consistent `read_time` for the given `target_ids` (omitted when the - * target_ids are not at a consistent snapshot). - * The stream is guaranteed to send a `read_time` with `target_ids` empty - * whenever the entire stream reaches a new consistent snapshot. ADD, - * CURRENT, and RESET messages are guaranteed to (eventually) result in a - * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). - * For a given stream, `read_time` is guaranteed to be monotonically - * increasing. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->read_time; - } - - public function hasReadTime() - { - return isset($this->read_time); - } - - public function clearReadTime() - { - unset($this->read_time); - } - - /** - * The consistent `read_time` for the given `target_ids` (omitted when the - * target_ids are not at a consistent snapshot). - * The stream is guaranteed to send a `read_time` with `target_ids` empty - * whenever the entire stream reaches a new consistent snapshot. ADD, - * CURRENT, and RESET messages are guaranteed to (eventually) result in a - * new consistent snapshot (while NO_CHANGE and REMOVE messages are not). - * For a given stream, `read_time` is guaranteed to be monotonically - * increasing. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->read_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php deleted file mode 100644 index 0971283f5a47..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TargetChange/TargetChangeType.php +++ /dev/null @@ -1,83 +0,0 @@ -google.firestore.v1.TargetChange.TargetChangeType - */ -class TargetChangeType -{ - /** - * No change has occurred. Used only to send an updated `resume_token`. - * - * Generated from protobuf enum NO_CHANGE = 0; - */ - const NO_CHANGE = 0; - /** - * The targets have been added. - * - * Generated from protobuf enum ADD = 1; - */ - const ADD = 1; - /** - * The targets have been removed. - * - * Generated from protobuf enum REMOVE = 2; - */ - const REMOVE = 2; - /** - * The targets reflect all changes committed before the targets were added - * to the stream. - * This will be sent after or with a `read_time` that is greater than or - * equal to the time at which the targets were added. - * Listeners can wait for this change if read-after-write semantics - * are desired. - * - * Generated from protobuf enum CURRENT = 3; - */ - const CURRENT = 3; - /** - * The targets have been reset, and a new initial state for the targets - * will be returned in subsequent changes. - * After the initial state is complete, `CURRENT` will be returned even - * if the target was previously indicated to be `CURRENT`. - * - * Generated from protobuf enum RESET = 4; - */ - const RESET = 4; - - private static $valueToName = [ - self::NO_CHANGE => 'NO_CHANGE', - self::ADD => 'ADD', - self::REMOVE => 'REMOVE', - self::CURRENT => 'CURRENT', - self::RESET => 'RESET', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php deleted file mode 100644 index d35fb47e9cdb..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions.php +++ /dev/null @@ -1,108 +0,0 @@ -google.firestore.v1.TransactionOptions - */ -class TransactionOptions extends \Google\Protobuf\Internal\Message -{ - protected $mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly $read_only - * The transaction can only be used for read operations. - * @type \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite $read_write - * The transaction can be used for both read and write operations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * The transaction can only be used for read operations. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; - * @return \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly|null - */ - public function getReadOnly() - { - return $this->readOneof(2); - } - - public function hasReadOnly() - { - return $this->hasOneof(2); - } - - /** - * The transaction can only be used for read operations. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadOnly read_only = 2; - * @param \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly $var - * @return $this - */ - public function setReadOnly($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions\PBReadOnly::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The transaction can be used for both read and write operations. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; - * @return \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite|null - */ - public function getReadWrite() - { - return $this->readOneof(3); - } - - public function hasReadWrite() - { - return $this->hasOneof(3); - } - - /** - * The transaction can be used for both read and write operations. - * - * Generated from protobuf field .google.firestore.v1.TransactionOptions.ReadWrite read_write = 3; - * @param \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite $var - * @return $this - */ - public function setReadWrite($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\TransactionOptions\ReadWrite::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getMode() - { - return $this->whichOneof("mode"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php deleted file mode 100644 index dde09490ca47..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/PBReadOnly.php +++ /dev/null @@ -1,84 +0,0 @@ -google.firestore.v1.TransactionOptions.ReadOnly - */ -class PBReadOnly extends \Google\Protobuf\Internal\Message -{ - protected $consistency_selector; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $read_time - * Reads documents at the given time. - * This must be a microsecond precision timestamp within the past one - * hour, or if Point-in-Time Recovery is enabled, can additionally be a - * whole minute timestamp within the past 7 days. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Reads documents at the given time. - * This must be a microsecond precision timestamp within the past one - * hour, or if Point-in-Time Recovery is enabled, can additionally be a - * whole minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReadTime() - { - return $this->readOneof(2); - } - - public function hasReadTime() - { - return $this->hasOneof(2); - } - - /** - * Reads documents at the given time. - * This must be a microsecond precision timestamp within the past one - * hour, or if Point-in-Time Recovery is enabled, can additionally be a - * whole minute timestamp within the past 7 days. - * - * Generated from protobuf field .google.protobuf.Timestamp read_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getConsistencySelector() - { - return $this->whichOneof("consistency_selector"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadWrite.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadWrite.php deleted file mode 100644 index abf223a2244e..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/TransactionOptions/ReadWrite.php +++ /dev/null @@ -1,69 +0,0 @@ -google.firestore.v1.TransactionOptions.ReadWrite - */ -class ReadWrite extends \Google\Protobuf\Internal\Message -{ - /** - * An optional transaction to retry. - * - * Generated from protobuf field bytes retry_transaction = 1; - */ - protected $retry_transaction = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $retry_transaction - * An optional transaction to retry. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * An optional transaction to retry. - * - * Generated from protobuf field bytes retry_transaction = 1; - * @return string - */ - public function getRetryTransaction() - { - return $this->retry_transaction; - } - - /** - * An optional transaction to retry. - * - * Generated from protobuf field bytes retry_transaction = 1; - * @param string $var - * @return $this - */ - public function setRetryTransaction($var) - { - GPBUtil::checkString($var, False); - $this->retry_transaction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php deleted file mode 100644 index 96c7684e0800..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/UpdateDocumentRequest.php +++ /dev/null @@ -1,268 +0,0 @@ -google.firestore.v1.UpdateDocumentRequest - */ -class UpdateDocumentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The updated document. - * Creates the document if it does not already exist. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $document = null; - /** - * The fields to update. - * None of the field paths in the mask may contain a reserved name. - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; - */ - protected $update_mask = null; - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - */ - protected $mask = null; - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - */ - protected $current_document = null; - - /** - * @param \Google\Cloud\Firestore\V1\Document $document Required. The updated document. - * Creates the document if it does not already exist. - * @param \Google\Cloud\Firestore\V1\DocumentMask $updateMask The fields to update. - * None of the field paths in the mask may contain a reserved name. - * - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * - * @return \Google\Cloud\Firestore\V1\UpdateDocumentRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Firestore\V1\Document $document, \Google\Cloud\Firestore\V1\DocumentMask $updateMask): self - { - return (new self()) - ->setDocument($document) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Document $document - * Required. The updated document. - * Creates the document if it does not already exist. - * @type \Google\Cloud\Firestore\V1\DocumentMask $update_mask - * The fields to update. - * None of the field paths in the mask may contain a reserved name. - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * @type \Google\Cloud\Firestore\V1\DocumentMask $mask - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * @type \Google\Cloud\Firestore\V1\Precondition $current_document - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The updated document. - * Creates the document if it does not already exist. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getDocument() - { - return $this->document; - } - - public function hasDocument() - { - return isset($this->document); - } - - public function clearDocument() - { - unset($this->document); - } - - /** - * Required. The updated document. - * Creates the document if it does not already exist. - * - * Generated from protobuf field .google.firestore.v1.Document document = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->document = $var; - - return $this; - } - - /** - * The fields to update. - * None of the field paths in the mask may contain a reserved name. - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The fields to update. - * None of the field paths in the mask may contain a reserved name. - * If the document exists on the server and has fields not referenced in the - * mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 2; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getMask() - { - return $this->mask; - } - - public function hasMask() - { - return isset($this->mask); - } - - public function clearMask() - { - unset($this->mask); - } - - /** - * The fields to return. If not set, returns all fields. - * If the document has a field that is not present in this mask, that field - * will not be returned in the response. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask mask = 3; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->mask = $var; - - return $this; - } - - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - * @return \Google\Cloud\Firestore\V1\Precondition|null - */ - public function getCurrentDocument() - { - return $this->current_document; - } - - public function hasCurrentDocument() - { - return isset($this->current_document); - } - - public function clearCurrentDocument() - { - unset($this->current_document); - } - - /** - * An optional precondition on the document. - * The request will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - * @param \Google\Cloud\Firestore\V1\Precondition $var - * @return $this - */ - public function setCurrentDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); - $this->current_document = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php deleted file mode 100644 index db0784d64e76..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Value.php +++ /dev/null @@ -1,603 +0,0 @@ -google.firestore.v1.Value - */ -class Value extends \Google\Protobuf\Internal\Message -{ - protected $value_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $null_value - * A null value. - * @type bool $boolean_value - * A boolean value. - * @type int|string $integer_value - * An integer value. - * @type float $double_value - * A double value. - * @type \Google\Protobuf\Timestamp $timestamp_value - * A timestamp value. - * Precise only to microseconds. When stored, any additional precision is - * rounded down. - * @type string $string_value - * A string value. - * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes of the UTF-8 representation are considered by - * queries. - * @type string $bytes_value - * A bytes value. - * Must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes are considered by queries. - * @type string $reference_value - * A reference to a document. For example: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type \Google\Type\LatLng $geo_point_value - * A geo point value representing a point on the surface of Earth. - * @type \Google\Cloud\Firestore\V1\ArrayValue $array_value - * An array value. - * Cannot directly contain another array value, though can contain a - * map which contains another array. - * @type \Google\Cloud\Firestore\V1\MapValue $map_value - * A map value. - * @type string $field_reference_value - * Value which references a field. - * This is considered relative (vs absolute) since it only refers to a field - * and not a field within a particular document. - * **Requires:** - * * Must follow [field reference][FieldReference.field_path] limitations. - * * Not allowed to be used when writing documents. - * @type string $variable_reference_value - * Pointer to a variable defined elsewhere in a pipeline. - * Unlike `field_reference_value` which references a field within a - * document, this refers to a variable, defined in a separate namespace than - * the fields of a document. - * @type \Google\Cloud\Firestore\V1\PBFunction $function_value - * A value that represents an unevaluated expression. - * **Requires:** - * * Not allowed to be used when writing documents. - * @type \Google\Cloud\Firestore\V1\Pipeline $pipeline_value - * A value that represents an unevaluated pipeline. - * **Requires:** - * * Not allowed to be used when writing documents. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Document::initOnce(); - parent::__construct($data); - } - - /** - * A null value. - * - * Generated from protobuf field .google.protobuf.NullValue null_value = 11; - * @return int - */ - public function getNullValue() - { - return $this->readOneof(11); - } - - public function hasNullValue() - { - return $this->hasOneof(11); - } - - /** - * A null value. - * - * Generated from protobuf field .google.protobuf.NullValue null_value = 11; - * @param int $var - * @return $this - */ - public function setNullValue($var) - { - GPBUtil::checkEnum($var, \Google\Protobuf\NullValue::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * A boolean value. - * - * Generated from protobuf field bool boolean_value = 1; - * @return bool - */ - public function getBooleanValue() - { - return $this->readOneof(1); - } - - public function hasBooleanValue() - { - return $this->hasOneof(1); - } - - /** - * A boolean value. - * - * Generated from protobuf field bool boolean_value = 1; - * @param bool $var - * @return $this - */ - public function setBooleanValue($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * An integer value. - * - * Generated from protobuf field int64 integer_value = 2; - * @return int|string - */ - public function getIntegerValue() - { - return $this->readOneof(2); - } - - public function hasIntegerValue() - { - return $this->hasOneof(2); - } - - /** - * An integer value. - * - * Generated from protobuf field int64 integer_value = 2; - * @param int|string $var - * @return $this - */ - public function setIntegerValue($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A double value. - * - * Generated from protobuf field double double_value = 3; - * @return float - */ - public function getDoubleValue() - { - return $this->readOneof(3); - } - - public function hasDoubleValue() - { - return $this->hasOneof(3); - } - - /** - * A double value. - * - * Generated from protobuf field double double_value = 3; - * @param float $var - * @return $this - */ - public function setDoubleValue($var) - { - GPBUtil::checkDouble($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A timestamp value. - * Precise only to microseconds. When stored, any additional precision is - * rounded down. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 10; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTimestampValue() - { - return $this->readOneof(10); - } - - public function hasTimestampValue() - { - return $this->hasOneof(10); - } - - /** - * A timestamp value. - * Precise only to microseconds. When stored, any additional precision is - * rounded down. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp_value = 10; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTimestampValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * A string value. - * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes of the UTF-8 representation are considered by - * queries. - * - * Generated from protobuf field string string_value = 17; - * @return string - */ - public function getStringValue() - { - return $this->readOneof(17); - } - - public function hasStringValue() - { - return $this->hasOneof(17); - } - - /** - * A string value. - * The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes of the UTF-8 representation are considered by - * queries. - * - * Generated from protobuf field string string_value = 17; - * @param string $var - * @return $this - */ - public function setStringValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * A bytes value. - * Must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes are considered by queries. - * - * Generated from protobuf field bytes bytes_value = 18; - * @return string - */ - public function getBytesValue() - { - return $this->readOneof(18); - } - - public function hasBytesValue() - { - return $this->hasOneof(18); - } - - /** - * A bytes value. - * Must not exceed 1 MiB - 89 bytes. - * Only the first 1,500 bytes are considered by queries. - * - * Generated from protobuf field bytes bytes_value = 18; - * @param string $var - * @return $this - */ - public function setBytesValue($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(18, $var); - - return $this; - } - - /** - * A reference to a document. For example: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string reference_value = 5; - * @return string - */ - public function getReferenceValue() - { - return $this->readOneof(5); - } - - public function hasReferenceValue() - { - return $this->hasOneof(5); - } - - /** - * A reference to a document. For example: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string reference_value = 5; - * @param string $var - * @return $this - */ - public function setReferenceValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * A geo point value representing a point on the surface of Earth. - * - * Generated from protobuf field .google.type.LatLng geo_point_value = 8; - * @return \Google\Type\LatLng|null - */ - public function getGeoPointValue() - { - return $this->readOneof(8); - } - - public function hasGeoPointValue() - { - return $this->hasOneof(8); - } - - /** - * A geo point value representing a point on the surface of Earth. - * - * Generated from protobuf field .google.type.LatLng geo_point_value = 8; - * @param \Google\Type\LatLng $var - * @return $this - */ - public function setGeoPointValue($var) - { - GPBUtil::checkMessage($var, \Google\Type\LatLng::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * An array value. - * Cannot directly contain another array value, though can contain a - * map which contains another array. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue array_value = 9; - * @return \Google\Cloud\Firestore\V1\ArrayValue|null - */ - public function getArrayValue() - { - return $this->readOneof(9); - } - - public function hasArrayValue() - { - return $this->hasOneof(9); - } - - /** - * An array value. - * Cannot directly contain another array value, though can contain a - * map which contains another array. - * - * Generated from protobuf field .google.firestore.v1.ArrayValue array_value = 9; - * @param \Google\Cloud\Firestore\V1\ArrayValue $var - * @return $this - */ - public function setArrayValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\ArrayValue::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * A map value. - * - * Generated from protobuf field .google.firestore.v1.MapValue map_value = 6; - * @return \Google\Cloud\Firestore\V1\MapValue|null - */ - public function getMapValue() - { - return $this->readOneof(6); - } - - public function hasMapValue() - { - return $this->hasOneof(6); - } - - /** - * A map value. - * - * Generated from protobuf field .google.firestore.v1.MapValue map_value = 6; - * @param \Google\Cloud\Firestore\V1\MapValue $var - * @return $this - */ - public function setMapValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\MapValue::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Value which references a field. - * This is considered relative (vs absolute) since it only refers to a field - * and not a field within a particular document. - * **Requires:** - * * Must follow [field reference][FieldReference.field_path] limitations. - * * Not allowed to be used when writing documents. - * - * Generated from protobuf field string field_reference_value = 19; - * @return string - */ - public function getFieldReferenceValue() - { - return $this->readOneof(19); - } - - public function hasFieldReferenceValue() - { - return $this->hasOneof(19); - } - - /** - * Value which references a field. - * This is considered relative (vs absolute) since it only refers to a field - * and not a field within a particular document. - * **Requires:** - * * Must follow [field reference][FieldReference.field_path] limitations. - * * Not allowed to be used when writing documents. - * - * Generated from protobuf field string field_reference_value = 19; - * @param string $var - * @return $this - */ - public function setFieldReferenceValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(19, $var); - - return $this; - } - - /** - * Pointer to a variable defined elsewhere in a pipeline. - * Unlike `field_reference_value` which references a field within a - * document, this refers to a variable, defined in a separate namespace than - * the fields of a document. - * - * Generated from protobuf field string variable_reference_value = 22; - * @return string - */ - public function getVariableReferenceValue() - { - return $this->readOneof(22); - } - - public function hasVariableReferenceValue() - { - return $this->hasOneof(22); - } - - /** - * Pointer to a variable defined elsewhere in a pipeline. - * Unlike `field_reference_value` which references a field within a - * document, this refers to a variable, defined in a separate namespace than - * the fields of a document. - * - * Generated from protobuf field string variable_reference_value = 22; - * @param string $var - * @return $this - */ - public function setVariableReferenceValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(22, $var); - - return $this; - } - - /** - * A value that represents an unevaluated expression. - * **Requires:** - * * Not allowed to be used when writing documents. - * - * Generated from protobuf field .google.firestore.v1.Function function_value = 20; - * @return \Google\Cloud\Firestore\V1\PBFunction|null - */ - public function getFunctionValue() - { - return $this->readOneof(20); - } - - public function hasFunctionValue() - { - return $this->hasOneof(20); - } - - /** - * A value that represents an unevaluated expression. - * **Requires:** - * * Not allowed to be used when writing documents. - * - * Generated from protobuf field .google.firestore.v1.Function function_value = 20; - * @param \Google\Cloud\Firestore\V1\PBFunction $var - * @return $this - */ - public function setFunctionValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\PBFunction::class); - $this->writeOneof(20, $var); - - return $this; - } - - /** - * A value that represents an unevaluated pipeline. - * **Requires:** - * * Not allowed to be used when writing documents. - * - * Generated from protobuf field .google.firestore.v1.Pipeline pipeline_value = 21; - * @return \Google\Cloud\Firestore\V1\Pipeline|null - */ - public function getPipelineValue() - { - return $this->readOneof(21); - } - - public function hasPipelineValue() - { - return $this->hasOneof(21); - } - - /** - * A value that represents an unevaluated pipeline. - * **Requires:** - * * Not allowed to be used when writing documents. - * - * Generated from protobuf field .google.firestore.v1.Pipeline pipeline_value = 21; - * @param \Google\Cloud\Firestore\V1\Pipeline $var - * @return $this - */ - public function setPipelineValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Pipeline::class); - $this->writeOneof(21, $var); - - return $this; - } - - /** - * @return string - */ - public function getValueType() - { - return $this->whichOneof("value_type"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php deleted file mode 100644 index ed59c89434d1..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/Write.php +++ /dev/null @@ -1,314 +0,0 @@ -google.firestore.v1.Write - */ -class Write extends \Google\Protobuf\Internal\Message -{ - /** - * The fields to update in this write. - * This field can be set only when the operation is `update`. - * If the mask is not set for an `update` and the document exists, any - * existing data will be overwritten. - * If the mask is set and the document on the server has fields not covered by - * the mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * The field paths in this mask must not contain a reserved field name. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; - */ - protected $update_mask = null; - /** - * The transforms to perform after update. - * This field can be set only when the operation is `update`. If present, this - * write is equivalent to performing `update` and `transform` to the same - * document atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; - */ - private $update_transforms; - /** - * An optional precondition on the document. - * The write will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - */ - protected $current_document = null; - protected $operation; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Firestore\V1\Document $update - * A document to write. - * @type string $delete - * A document name to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * @type \Google\Cloud\Firestore\V1\DocumentTransform $transform - * Applies a transformation to a document. - * @type \Google\Cloud\Firestore\V1\DocumentMask $update_mask - * The fields to update in this write. - * This field can be set only when the operation is `update`. - * If the mask is not set for an `update` and the document exists, any - * existing data will be overwritten. - * If the mask is set and the document on the server has fields not covered by - * the mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * The field paths in this mask must not contain a reserved field name. - * @type \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform[] $update_transforms - * The transforms to perform after update. - * This field can be set only when the operation is `update`. If present, this - * write is equivalent to performing `update` and `transform` to the same - * document atomically and in order. - * @type \Google\Cloud\Firestore\V1\Precondition $current_document - * An optional precondition on the document. - * The write will fail if this is set and not met by the target document. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * A document to write. - * - * Generated from protobuf field .google.firestore.v1.Document update = 1; - * @return \Google\Cloud\Firestore\V1\Document|null - */ - public function getUpdate() - { - return $this->readOneof(1); - } - - public function hasUpdate() - { - return $this->hasOneof(1); - } - - /** - * A document to write. - * - * Generated from protobuf field .google.firestore.v1.Document update = 1; - * @param \Google\Cloud\Firestore\V1\Document $var - * @return $this - */ - public function setUpdate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Document::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A document name to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string delete = 2; - * @return string - */ - public function getDelete() - { - return $this->readOneof(2); - } - - public function hasDelete() - { - return $this->hasOneof(2); - } - - /** - * A document name to delete. In the format: - * `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - * - * Generated from protobuf field string delete = 2; - * @param string $var - * @return $this - */ - public function setDelete($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Applies a transformation to a document. - * - * Generated from protobuf field .google.firestore.v1.DocumentTransform transform = 6; - * @return \Google\Cloud\Firestore\V1\DocumentTransform|null - */ - public function getTransform() - { - return $this->readOneof(6); - } - - public function hasTransform() - { - return $this->hasOneof(6); - } - - /** - * Applies a transformation to a document. - * - * Generated from protobuf field .google.firestore.v1.DocumentTransform transform = 6; - * @param \Google\Cloud\Firestore\V1\DocumentTransform $var - * @return $this - */ - public function setTransform($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentTransform::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * The fields to update in this write. - * This field can be set only when the operation is `update`. - * If the mask is not set for an `update` and the document exists, any - * existing data will be overwritten. - * If the mask is set and the document on the server has fields not covered by - * the mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * The field paths in this mask must not contain a reserved field name. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; - * @return \Google\Cloud\Firestore\V1\DocumentMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The fields to update in this write. - * This field can be set only when the operation is `update`. - * If the mask is not set for an `update` and the document exists, any - * existing data will be overwritten. - * If the mask is set and the document on the server has fields not covered by - * the mask, they are left unchanged. - * Fields referenced in the mask, but not present in the input document, are - * deleted from the document on the server. - * The field paths in this mask must not contain a reserved field name. - * - * Generated from protobuf field .google.firestore.v1.DocumentMask update_mask = 3; - * @param \Google\Cloud\Firestore\V1\DocumentMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\DocumentMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * The transforms to perform after update. - * This field can be set only when the operation is `update`. If present, this - * write is equivalent to performing `update` and `transform` to the same - * document atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; - * @return RepeatedField<\Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform> - */ - public function getUpdateTransforms() - { - return $this->update_transforms; - } - - /** - * The transforms to perform after update. - * This field can be set only when the operation is `update`. If present, this - * write is equivalent to performing `update` and `transform` to the same - * document atomically and in order. - * - * Generated from protobuf field repeated .google.firestore.v1.DocumentTransform.FieldTransform update_transforms = 7; - * @param \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform[] $var - * @return $this - */ - public function setUpdateTransforms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\DocumentTransform\FieldTransform::class); - $this->update_transforms = $arr; - - return $this; - } - - /** - * An optional precondition on the document. - * The write will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - * @return \Google\Cloud\Firestore\V1\Precondition|null - */ - public function getCurrentDocument() - { - return $this->current_document; - } - - public function hasCurrentDocument() - { - return isset($this->current_document); - } - - public function clearCurrentDocument() - { - unset($this->current_document); - } - - /** - * An optional precondition on the document. - * The write will fail if this is set and not met by the target document. - * - * Generated from protobuf field .google.firestore.v1.Precondition current_document = 4; - * @param \Google\Cloud\Firestore\V1\Precondition $var - * @return $this - */ - public function setCurrentDocument($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Firestore\V1\Precondition::class); - $this->current_document = $var; - - return $this; - } - - /** - * @return string - */ - public function getOperation() - { - return $this->whichOneof("operation"); - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php deleted file mode 100644 index cd8eef8c5f35..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteRequest.php +++ /dev/null @@ -1,277 +0,0 @@ -google.firestore.v1.WriteRequest - */ -class WriteRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * This is only required in the first message. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $database = ''; - /** - * The ID of the write stream to resume. - * This may only be set in the first message. When left empty, a new write - * stream will be created. - * - * Generated from protobuf field string stream_id = 2; - */ - protected $stream_id = ''; - /** - * The writes to apply. - * Always executed atomically and in order. - * This must be empty on the first request. - * This may be empty on the last request. - * This must not be empty on all other requests. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; - */ - private $writes; - /** - * A stream token that was previously sent by the server. - * The client should set this field to the token from the most recent - * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This - * acknowledges that the client has received responses up to this token. After - * sending this token, earlier tokens may not be used anymore. - * The server may close the stream if there are too many unacknowledged - * responses. - * Leave this field unset when creating a new stream. To resume a stream at - * a specific point, set this field and the `stream_id` field. - * Leave this field unset when creating a new stream. - * - * Generated from protobuf field bytes stream_token = 4; - */ - protected $stream_token = ''; - /** - * Labels associated with this write request. - * - * Generated from protobuf field map labels = 5; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $database - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * This is only required in the first message. - * @type string $stream_id - * The ID of the write stream to resume. - * This may only be set in the first message. When left empty, a new write - * stream will be created. - * @type \Google\Cloud\Firestore\V1\Write[] $writes - * The writes to apply. - * Always executed atomically and in order. - * This must be empty on the first request. - * This may be empty on the last request. - * This must not be empty on all other requests. - * @type string $stream_token - * A stream token that was previously sent by the server. - * The client should set this field to the token from the most recent - * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This - * acknowledges that the client has received responses up to this token. After - * sending this token, earlier tokens may not be used anymore. - * The server may close the stream if there are too many unacknowledged - * responses. - * Leave this field unset when creating a new stream. To resume a stream at - * a specific point, set this field and the `stream_id` field. - * Leave this field unset when creating a new stream. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels associated with this write request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * This is only required in the first message. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDatabase() - { - return $this->database; - } - - /** - * Required. The database name. In the format: - * `projects/{project_id}/databases/{database_id}`. - * This is only required in the first message. - * - * Generated from protobuf field string database = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDatabase($var) - { - GPBUtil::checkString($var, True); - $this->database = $var; - - return $this; - } - - /** - * The ID of the write stream to resume. - * This may only be set in the first message. When left empty, a new write - * stream will be created. - * - * Generated from protobuf field string stream_id = 2; - * @return string - */ - public function getStreamId() - { - return $this->stream_id; - } - - /** - * The ID of the write stream to resume. - * This may only be set in the first message. When left empty, a new write - * stream will be created. - * - * Generated from protobuf field string stream_id = 2; - * @param string $var - * @return $this - */ - public function setStreamId($var) - { - GPBUtil::checkString($var, True); - $this->stream_id = $var; - - return $this; - } - - /** - * The writes to apply. - * Always executed atomically and in order. - * This must be empty on the first request. - * This may be empty on the last request. - * This must not be empty on all other requests. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Write> - */ - public function getWrites() - { - return $this->writes; - } - - /** - * The writes to apply. - * Always executed atomically and in order. - * This must be empty on the first request. - * This may be empty on the last request. - * This must not be empty on all other requests. - * - * Generated from protobuf field repeated .google.firestore.v1.Write writes = 3; - * @param \Google\Cloud\Firestore\V1\Write[] $var - * @return $this - */ - public function setWrites($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Write::class); - $this->writes = $arr; - - return $this; - } - - /** - * A stream token that was previously sent by the server. - * The client should set this field to the token from the most recent - * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This - * acknowledges that the client has received responses up to this token. After - * sending this token, earlier tokens may not be used anymore. - * The server may close the stream if there are too many unacknowledged - * responses. - * Leave this field unset when creating a new stream. To resume a stream at - * a specific point, set this field and the `stream_id` field. - * Leave this field unset when creating a new stream. - * - * Generated from protobuf field bytes stream_token = 4; - * @return string - */ - public function getStreamToken() - { - return $this->stream_token; - } - - /** - * A stream token that was previously sent by the server. - * The client should set this field to the token from the most recent - * [WriteResponse][google.firestore.v1.WriteResponse] it has received. This - * acknowledges that the client has received responses up to this token. After - * sending this token, earlier tokens may not be used anymore. - * The server may close the stream if there are too many unacknowledged - * responses. - * Leave this field unset when creating a new stream. To resume a stream at - * a specific point, set this field and the `stream_id` field. - * Leave this field unset when creating a new stream. - * - * Generated from protobuf field bytes stream_token = 4; - * @param string $var - * @return $this - */ - public function setStreamToken($var) - { - GPBUtil::checkString($var, False); - $this->stream_token = $var; - - return $this; - } - - /** - * Labels associated with this write request. - * - * Generated from protobuf field map labels = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels associated with this write request. - * - * Generated from protobuf field map labels = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php deleted file mode 100644 index 7413907f1e2b..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResponse.php +++ /dev/null @@ -1,203 +0,0 @@ -google.firestore.v1.WriteResponse - */ -class WriteResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the stream. - * Only set on the first message, when a new stream was created. - * - * Generated from protobuf field string stream_id = 1; - */ - protected $stream_id = ''; - /** - * A token that represents the position of this response in the stream. - * This can be used by a client to resume the stream at this point. - * This field is always set. - * - * Generated from protobuf field bytes stream_token = 2; - */ - protected $stream_token = ''; - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; - */ - private $write_results; - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the write. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; - */ - protected $commit_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $stream_id - * The ID of the stream. - * Only set on the first message, when a new stream was created. - * @type string $stream_token - * A token that represents the position of this response in the stream. - * This can be used by a client to resume the stream at this point. - * This field is always set. - * @type \Google\Cloud\Firestore\V1\WriteResult[] $write_results - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * @type \Google\Protobuf\Timestamp $commit_time - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the write. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Firestore::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the stream. - * Only set on the first message, when a new stream was created. - * - * Generated from protobuf field string stream_id = 1; - * @return string - */ - public function getStreamId() - { - return $this->stream_id; - } - - /** - * The ID of the stream. - * Only set on the first message, when a new stream was created. - * - * Generated from protobuf field string stream_id = 1; - * @param string $var - * @return $this - */ - public function setStreamId($var) - { - GPBUtil::checkString($var, True); - $this->stream_id = $var; - - return $this; - } - - /** - * A token that represents the position of this response in the stream. - * This can be used by a client to resume the stream at this point. - * This field is always set. - * - * Generated from protobuf field bytes stream_token = 2; - * @return string - */ - public function getStreamToken() - { - return $this->stream_token; - } - - /** - * A token that represents the position of this response in the stream. - * This can be used by a client to resume the stream at this point. - * This field is always set. - * - * Generated from protobuf field bytes stream_token = 2; - * @param string $var - * @return $this - */ - public function setStreamToken($var) - { - GPBUtil::checkString($var, False); - $this->stream_token = $var; - - return $this; - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; - * @return RepeatedField<\Google\Cloud\Firestore\V1\WriteResult> - */ - public function getWriteResults() - { - return $this->write_results; - } - - /** - * The result of applying the writes. - * This i-th write result corresponds to the i-th write in the - * request. - * - * Generated from protobuf field repeated .google.firestore.v1.WriteResult write_results = 3; - * @param \Google\Cloud\Firestore\V1\WriteResult[] $var - * @return $this - */ - public function setWriteResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\WriteResult::class); - $this->write_results = $arr; - - return $this; - } - - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the write. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCommitTime() - { - return $this->commit_time; - } - - public function hasCommitTime() - { - return isset($this->commit_time); - } - - public function clearCommitTime() - { - unset($this->commit_time); - } - - /** - * The time at which the commit occurred. Any read with an equal or greater - * `read_time` is guaranteed to see the effects of the write. - * - * Generated from protobuf field .google.protobuf.Timestamp commit_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCommitTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->commit_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php b/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php deleted file mode 100644 index 3684d662245a..000000000000 --- a/owl-bot-staging/Firestore/v1/proto/src/Google/Cloud/Firestore/V1/WriteResult.php +++ /dev/null @@ -1,131 +0,0 @@ -google.firestore.v1.WriteResult - */ -class WriteResult extends \Google\Protobuf\Internal\Message -{ - /** - * The last update time of the document after applying the write. Not set - * after a `delete`. - * If the write did not actually change the document, this will be the - * previous update_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - */ - protected $update_time = null; - /** - * The results of applying each - * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], - * in the same order. - * - * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; - */ - private $transform_results; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $update_time - * The last update time of the document after applying the write. Not set - * after a `delete`. - * If the write did not actually change the document, this will be the - * previous update_time. - * @type \Google\Cloud\Firestore\V1\Value[] $transform_results - * The results of applying each - * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], - * in the same order. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Firestore\V1\Write::initOnce(); - parent::__construct($data); - } - - /** - * The last update time of the document after applying the write. Not set - * after a `delete`. - * If the write did not actually change the document, this will be the - * previous update_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The last update time of the document after applying the write. Not set - * after a `delete`. - * If the write did not actually change the document, this will be the - * previous update_time. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * The results of applying each - * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], - * in the same order. - * - * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; - * @return RepeatedField<\Google\Cloud\Firestore\V1\Value> - */ - public function getTransformResults() - { - return $this->transform_results; - } - - /** - * The results of applying each - * [DocumentTransform.FieldTransform][google.firestore.v1.DocumentTransform.FieldTransform], - * in the same order. - * - * Generated from protobuf field repeated .google.firestore.v1.Value transform_results = 2; - * @param \Google\Cloud\Firestore\V1\Value[] $var - * @return $this - */ - public function setTransformResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Firestore\V1\Value::class); - $this->transform_results = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php deleted file mode 100644 index f16bc62003d6..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_get_documents.php +++ /dev/null @@ -1,86 +0,0 @@ -setDatabase($database) - ->setDocuments($documents); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $firestoreClient->batchGetDocuments($request); - - /** @var BatchGetDocumentsResponse $element */ - foreach ($stream->readAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $database = '[DATABASE]'; - $documentsElement = '[DOCUMENTS]'; - - batch_get_documents_sample($database, $documentsElement); -} -// [END firestore_v1_generated_Firestore_BatchGetDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php deleted file mode 100644 index 102aa7be0006..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/batch_write.php +++ /dev/null @@ -1,66 +0,0 @@ -batchWrite($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END firestore_v1_generated_Firestore_BatchWrite_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php deleted file mode 100644 index 2349a880038e..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/begin_transaction.php +++ /dev/null @@ -1,71 +0,0 @@ -setDatabase($database); - - // Call the API and handle any network failures. - try { - /** @var BeginTransactionResponse $response */ - $response = $firestoreClient->beginTransaction($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $database = '[DATABASE]'; - - begin_transaction_sample($database); -} -// [END firestore_v1_generated_Firestore_BeginTransaction_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php deleted file mode 100644 index 5cdc59666df0..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/commit.php +++ /dev/null @@ -1,74 +0,0 @@ -setDatabase($database) - ->setWrites($writes); - - // Call the API and handle any network failures. - try { - /** @var CommitResponse $response */ - $response = $firestoreClient->commit($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $database = '[DATABASE]'; - - commit_sample($database); -} -// [END firestore_v1_generated_Firestore_Commit_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php deleted file mode 100644 index 9f9f17993eba..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/create_document.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($parent) - ->setCollectionId($collectionId) - ->setDocumentId($documentId) - ->setDocument($document); - - // Call the API and handle any network failures. - try { - /** @var Document $response */ - $response = $firestoreClient->createDocument($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - $collectionId = '[COLLECTION_ID]'; - $documentId = '[DOCUMENT_ID]'; - - create_document_sample($parent, $collectionId, $documentId); -} -// [END firestore_v1_generated_Firestore_CreateDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php deleted file mode 100644 index 4aaab650c29b..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/delete_document.php +++ /dev/null @@ -1,69 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - $firestoreClient->deleteDocument($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - delete_document_sample($name); -} -// [END firestore_v1_generated_Firestore_DeleteDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/execute_pipeline.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/execute_pipeline.php deleted file mode 100644 index 362c1d1510e0..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/execute_pipeline.php +++ /dev/null @@ -1,76 +0,0 @@ -setDatabase($database); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $firestoreClient->executePipeline($request); - - /** @var ExecutePipelineResponse $element */ - foreach ($stream->readAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $database = '[DATABASE]'; - - execute_pipeline_sample($database); -} -// [END firestore_v1_generated_Firestore_ExecutePipeline_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php deleted file mode 100644 index ed51bc93ad05..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/get_document.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var Document $response */ - $response = $firestoreClient->getDocument($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - get_document_sample($name); -} -// [END firestore_v1_generated_Firestore_GetDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php deleted file mode 100644 index 7dc6a65473ab..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_collection_ids.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $firestoreClient->listCollectionIds($request); - - /** @var string $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - list_collection_ids_sample($parent); -} -// [END firestore_v1_generated_Firestore_ListCollectionIds_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php deleted file mode 100644 index f26d245154b1..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/list_documents.php +++ /dev/null @@ -1,89 +0,0 @@ -setParent($parent) - ->setCollectionId($collectionId); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $firestoreClient->listDocuments($request); - - /** @var Document $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - $collectionId = '[COLLECTION_ID]'; - - list_documents_sample($parent, $collectionId); -} -// [END firestore_v1_generated_Firestore_ListDocuments_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php deleted file mode 100644 index f1c21fa3a7d6..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/listen.php +++ /dev/null @@ -1,78 +0,0 @@ -setDatabase($database); - - // Call the API and handle any network failures. - try { - /** @var BidiStream $stream */ - $stream = $firestoreClient->listen(); - $stream->writeAll([$request,]); - - /** @var ListenResponse $element */ - foreach ($stream->closeWriteAndReadAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $database = '[DATABASE]'; - - listen_sample($database); -} -// [END firestore_v1_generated_Firestore_Listen_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php deleted file mode 100644 index e0baf617c0de..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/partition_query.php +++ /dev/null @@ -1,64 +0,0 @@ -partitionQuery($request); - - /** @var Cursor $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END firestore_v1_generated_Firestore_PartitionQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php deleted file mode 100644 index 2708c09c4b40..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/rollback.php +++ /dev/null @@ -1,72 +0,0 @@ -setDatabase($database) - ->setTransaction($transaction); - - // Call the API and handle any network failures. - try { - $firestoreClient->rollback($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $database = '[DATABASE]'; - $transaction = '...'; - - rollback_sample($database, $transaction); -} -// [END firestore_v1_generated_Firestore_Rollback_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php deleted file mode 100644 index adf0798bfd4f..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_aggregation_query.php +++ /dev/null @@ -1,92 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $firestoreClient->runAggregationQuery($request); - - /** @var RunAggregationQueryResponse $element */ - foreach ($stream->readAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - run_aggregation_query_sample($parent); -} -// [END firestore_v1_generated_Firestore_RunAggregationQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php deleted file mode 100644 index 0678620382ff..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/run_query.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var ServerStream $stream */ - $stream = $firestoreClient->runQuery($request); - - /** @var RunQueryResponse $element */ - foreach ($stream->readAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - run_query_sample($parent); -} -// [END firestore_v1_generated_Firestore_RunQuery_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php deleted file mode 100644 index efd6e77a8341..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/update_document.php +++ /dev/null @@ -1,62 +0,0 @@ -setDocument($document) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var Document $response */ - $response = $firestoreClient->updateDocument($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END firestore_v1_generated_Firestore_UpdateDocument_sync] diff --git a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php b/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php deleted file mode 100644 index 635baa2a69d7..000000000000 --- a/owl-bot-staging/Firestore/v1/samples/V1/FirestoreClient/write.php +++ /dev/null @@ -1,79 +0,0 @@ -setDatabase($database); - - // Call the API and handle any network failures. - try { - /** @var BidiStream $stream */ - $stream = $firestoreClient->write(); - $stream->writeAll([$request,]); - - /** @var WriteResponse $element */ - foreach ($stream->closeWriteAndReadAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $database = '[DATABASE]'; - - write_sample($database); -} -// [END firestore_v1_generated_Firestore_Write_sync] diff --git a/owl-bot-staging/Firestore/v1/src/V1/Client/FirestoreClient.php b/owl-bot-staging/Firestore/v1/src/V1/Client/FirestoreClient.php deleted file mode 100644 index 3ffd4513dbd8..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/Client/FirestoreClient.php +++ /dev/null @@ -1,662 +0,0 @@ - batchWriteAsync(BatchWriteRequest $request, array $optionalArgs = []) - * @method PromiseInterface beginTransactionAsync(BeginTransactionRequest $request, array $optionalArgs = []) - * @method PromiseInterface commitAsync(CommitRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDocumentAsync(CreateDocumentRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDocumentAsync(DeleteDocumentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDocumentAsync(GetDocumentRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCollectionIdsAsync(ListCollectionIdsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDocumentsAsync(ListDocumentsRequest $request, array $optionalArgs = []) - * @method PromiseInterface partitionQueryAsync(PartitionQueryRequest $request, array $optionalArgs = []) - * @method PromiseInterface rollbackAsync(RollbackRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDocumentAsync(UpdateDocumentRequest $request, array $optionalArgs = []) - */ -final class FirestoreClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.firestore.v1.Firestore'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'firestore.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'firestore.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/datastore', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/firestore_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/firestore_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/firestore_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/firestore_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'firestore.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Firestore\V1\FirestoreClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new FirestoreClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Gets multiple documents. - * - * Documents returned by this method are not guaranteed to be returned in the - * same order that they were requested. - * - * @example samples/V1/FirestoreClient/batch_get_documents.php - * - * @param BatchGetDocumentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchGetDocuments(BatchGetDocumentsRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('BatchGetDocuments', $request, $callOptions); - } - - /** - * Applies a batch of write operations. - * - * The BatchWrite method does not apply the write operations atomically - * and can apply them out of order. Method does not allow more than one write - * per document. Each write succeeds or fails independently. See the - * [BatchWriteResponse][google.firestore.v1.BatchWriteResponse] for the - * success status of each write. - * - * If you require an atomically applied set of writes, use - * [Commit][google.firestore.v1.Firestore.Commit] instead. - * - * The async variant is {@see FirestoreClient::batchWriteAsync()} . - * - * @example samples/V1/FirestoreClient/batch_write.php - * - * @param BatchWriteRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BatchWriteResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function batchWrite(BatchWriteRequest $request, array $callOptions = []): BatchWriteResponse - { - return $this->startApiCall('BatchWrite', $request, $callOptions)->wait(); - } - - /** - * Starts a new transaction. - * - * The async variant is {@see FirestoreClient::beginTransactionAsync()} . - * - * @example samples/V1/FirestoreClient/begin_transaction.php - * - * @param BeginTransactionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return BeginTransactionResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function beginTransaction(BeginTransactionRequest $request, array $callOptions = []): BeginTransactionResponse - { - return $this->startApiCall('BeginTransaction', $request, $callOptions)->wait(); - } - - /** - * Commits a transaction, while optionally updating documents. - * - * The async variant is {@see FirestoreClient::commitAsync()} . - * - * @example samples/V1/FirestoreClient/commit.php - * - * @param CommitRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CommitResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function commit(CommitRequest $request, array $callOptions = []): CommitResponse - { - return $this->startApiCall('Commit', $request, $callOptions)->wait(); - } - - /** - * Creates a new document. - * - * The async variant is {@see FirestoreClient::createDocumentAsync()} . - * - * @example samples/V1/FirestoreClient/create_document.php - * - * @param CreateDocumentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Document - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDocument(CreateDocumentRequest $request, array $callOptions = []): Document - { - return $this->startApiCall('CreateDocument', $request, $callOptions)->wait(); - } - - /** - * Deletes a document. - * - * The async variant is {@see FirestoreClient::deleteDocumentAsync()} . - * - * @example samples/V1/FirestoreClient/delete_document.php - * - * @param DeleteDocumentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteDocument(DeleteDocumentRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteDocument', $request, $callOptions)->wait(); - } - - /** - * Executes a pipeline query. - * - * @example samples/V1/FirestoreClient/execute_pipeline.php - * - * @param ExecutePipelineRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function executePipeline(ExecutePipelineRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('ExecutePipeline', $request, $callOptions); - } - - /** - * Gets a single document. - * - * The async variant is {@see FirestoreClient::getDocumentAsync()} . - * - * @example samples/V1/FirestoreClient/get_document.php - * - * @param GetDocumentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Document - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDocument(GetDocumentRequest $request, array $callOptions = []): Document - { - return $this->startApiCall('GetDocument', $request, $callOptions)->wait(); - } - - /** - * Lists all the collection IDs underneath a document. - * - * The async variant is {@see FirestoreClient::listCollectionIdsAsync()} . - * - * @example samples/V1/FirestoreClient/list_collection_ids.php - * - * @param ListCollectionIdsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listCollectionIds(ListCollectionIdsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCollectionIds', $request, $callOptions); - } - - /** - * Lists documents. - * - * The async variant is {@see FirestoreClient::listDocumentsAsync()} . - * - * @example samples/V1/FirestoreClient/list_documents.php - * - * @param ListDocumentsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listDocuments(ListDocumentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDocuments', $request, $callOptions); - } - - /** - * Listens to changes. This method is only available via gRPC or WebChannel - * (not REST). - * - * @example samples/V1/FirestoreClient/listen.php - * - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return BidiStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function listen(array $callOptions = []): BidiStream - { - return $this->startApiCall('Listen', null, $callOptions); - } - - /** - * Partitions a query by returning partition cursors that can be used to run - * the query in parallel. The returned partition cursors are split points that - * can be used by RunQuery as starting/end points for the query results. - * - * The async variant is {@see FirestoreClient::partitionQueryAsync()} . - * - * @example samples/V1/FirestoreClient/partition_query.php - * - * @param PartitionQueryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function partitionQuery(PartitionQueryRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('PartitionQuery', $request, $callOptions); - } - - /** - * Rolls back a transaction. - * - * The async variant is {@see FirestoreClient::rollbackAsync()} . - * - * @example samples/V1/FirestoreClient/rollback.php - * - * @param RollbackRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function rollback(RollbackRequest $request, array $callOptions = []): void - { - $this->startApiCall('Rollback', $request, $callOptions)->wait(); - } - - /** - * Runs an aggregation query. - * - * Rather than producing [Document][google.firestore.v1.Document] results like - * [Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery], this API - * allows running an aggregation to produce a series of - * [AggregationResult][google.firestore.v1.AggregationResult] server-side. - * - * High-Level Example: - * - * ``` - * -- Return the number of documents in table given a filter. - * SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); - * ``` - * - * @example samples/V1/FirestoreClient/run_aggregation_query.php - * - * @param RunAggregationQueryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function runAggregationQuery(RunAggregationQueryRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('RunAggregationQuery', $request, $callOptions); - } - - /** - * Runs a query. - * - * @example samples/V1/FirestoreClient/run_query.php - * - * @param RunQueryRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return ServerStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function runQuery(RunQueryRequest $request, array $callOptions = []): ServerStream - { - return $this->startApiCall('RunQuery', $request, $callOptions); - } - - /** - * Updates or inserts a document. - * - * The async variant is {@see FirestoreClient::updateDocumentAsync()} . - * - * @example samples/V1/FirestoreClient/update_document.php - * - * @param UpdateDocumentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Document - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateDocument(UpdateDocumentRequest $request, array $callOptions = []): Document - { - return $this->startApiCall('UpdateDocument', $request, $callOptions)->wait(); - } - - /** - * Streams batches of document updates and deletes, in order. This method is - * only available via gRPC or WebChannel (not REST). - * - * @example samples/V1/FirestoreClient/write.php - * - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return BidiStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function write(array $callOptions = []): BidiStream - { - return $this->startApiCall('Write', null, $callOptions); - } -} diff --git a/owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 8793f858e7f3..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.firestore.v1", - "libraryPackage": "Google\\Cloud\\Firestore\\V1", - "services": { - "Firestore": { - "clients": { - "grpc": { - "libraryClient": "FirestoreGapicClient", - "rpcs": { - "BatchGetDocuments": { - "methods": [ - "batchGetDocuments" - ] - }, - "BatchWrite": { - "methods": [ - "batchWrite" - ] - }, - "BeginTransaction": { - "methods": [ - "beginTransaction" - ] - }, - "Commit": { - "methods": [ - "commit" - ] - }, - "CreateDocument": { - "methods": [ - "createDocument" - ] - }, - "DeleteDocument": { - "methods": [ - "deleteDocument" - ] - }, - "ExecutePipeline": { - "methods": [ - "executePipeline" - ] - }, - "GetDocument": { - "methods": [ - "getDocument" - ] - }, - "ListCollectionIds": { - "methods": [ - "listCollectionIds" - ] - }, - "ListDocuments": { - "methods": [ - "listDocuments" - ] - }, - "Listen": { - "methods": [ - "listen" - ] - }, - "PartitionQuery": { - "methods": [ - "partitionQuery" - ] - }, - "Rollback": { - "methods": [ - "rollback" - ] - }, - "RunAggregationQuery": { - "methods": [ - "runAggregationQuery" - ] - }, - "RunQuery": { - "methods": [ - "runQuery" - ] - }, - "UpdateDocument": { - "methods": [ - "updateDocument" - ] - }, - "Write": { - "methods": [ - "write" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json deleted file mode 100644 index 3f189e07e6a3..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_client_config.json +++ /dev/null @@ -1,176 +0,0 @@ -{ - "interfaces": { - "google.firestore.v1.Firestore": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE" - ], - "retry_policy_2_codes": [ - "UNAVAILABLE", - "INTERNAL", - "DEADLINE_EXCEEDED" - ], - "retry_policy_3_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE", - "INTERNAL", - "DEADLINE_EXCEEDED" - ], - "no_retry_1_codes": [], - "retry_policy_4_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE", - "INTERNAL", - "DEADLINE_EXCEEDED" - ], - "retry_policy_5_codes": [ - "RESOURCE_EXHAUSTED", - "UNAVAILABLE", - "ABORTED" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - }, - "retry_policy_3_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 86400000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 86400000, - "total_timeout_millis": 86400000 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 86400000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 86400000, - "total_timeout_millis": 86400000 - }, - "retry_policy_4_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_5_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "BatchGetDocuments": { - "timeout_millis": 300000 - }, - "BatchWrite": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_5_codes", - "retry_params_name": "retry_policy_5_params" - }, - "BeginTransaction": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "Commit": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "ExecutePipeline": { - "timeout_millis": 300000 - }, - "GetDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "ListCollectionIds": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "ListDocuments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "Listen": { - "timeout_millis": 86400000 - }, - "PartitionQuery": { - "timeout_millis": 300000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "Rollback": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "RunAggregationQuery": { - "timeout_millis": 300000 - }, - "RunQuery": { - "timeout_millis": 300000 - }, - "UpdateDocument": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "Write": { - "timeout_millis": 86400000 - } - } - } - } -} diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php deleted file mode 100644 index d1232247d0ae..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_descriptor_config.php +++ /dev/null @@ -1,295 +0,0 @@ - [ - 'google.firestore.v1.Firestore' => [ - 'BatchGetDocuments' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\BatchGetDocumentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'BatchWrite' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\BatchWriteResponse', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'BeginTransaction' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\BeginTransactionResponse', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'Commit' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\CommitResponse', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'CreateDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\Document', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - [ - 'keyName' => 'collection_id', - 'fieldAccessors' => [ - 'getCollectionId', - ], - ], - ], - ], - 'DeleteDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ExecutePipeline' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\ExecutePipelineResponse', - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getDatabase', - ], - 'matchers' => [], - ], - [ - 'keyName' => 'database_id', - 'fieldAccessors' => [ - 'getDatabase', - ], - 'matchers' => [], - ], - ], - ], - 'GetDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\Document', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListCollectionIds' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCollectionIds', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\ListCollectionIdsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDocuments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDocuments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\ListDocumentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - [ - 'keyName' => 'collection_id', - 'fieldAccessors' => [ - 'getCollectionId', - ], - ], - ], - ], - 'Listen' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\ListenResponse', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'PartitionQuery' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getPartitions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\PartitionQueryResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'Rollback' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - 'RunAggregationQuery' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\RunAggregationQueryResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RunQuery' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'ServerStreaming', - ], - 'callType' => \Google\ApiCore\Call::SERVER_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\RunQueryResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDocument' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\Document', - 'headerParams' => [ - [ - 'keyName' => 'document.name', - 'fieldAccessors' => [ - 'getDocument', - 'getName', - ], - ], - ], - ], - 'Write' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Firestore\V1\WriteResponse', - 'headerParams' => [ - [ - 'keyName' => 'database', - 'fieldAccessors' => [ - 'getDatabase', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php b/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php deleted file mode 100644 index 421c7325a999..000000000000 --- a/owl-bot-staging/Firestore/v1/src/V1/resources/firestore_rest_client_config.php +++ /dev/null @@ -1,304 +0,0 @@ - [ - 'google.firestore.v1.Firestore' => [ - 'BatchGetDocuments' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:batchGet', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'BatchWrite' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:batchWrite', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'BeginTransaction' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:beginTransaction', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'Commit' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:commit', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'CreateDocument' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/**}/{collection_id}', - 'body' => 'document', - 'placeholders' => [ - 'collection_id' => [ - 'getters' => [ - 'getCollectionId', - ], - ], - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'document_id', - ], - ], - 'DeleteDocument' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/documents/*/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExecutePipeline' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:executePipeline', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'GetDocument' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/documents/*/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListCollectionIds' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:listCollectionIds', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:listCollectionIds', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDocuments' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}/{collection_id}', - ], - ], - 'placeholders' => [ - 'collection_id' => [ - 'getters' => [ - 'getCollectionId', - ], - ], - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'PartitionQuery' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:partitionQuery', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:partitionQuery', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'Rollback' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{database=projects/*/databases/*}/documents:rollback', - 'body' => '*', - 'placeholders' => [ - 'database' => [ - 'getters' => [ - 'getDatabase', - ], - ], - ], - ], - 'RunAggregationQuery' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:runAggregationQuery', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:runAggregationQuery', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RunQuery' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents}:runQuery', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/databases/*/documents/*/**}:runQuery', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateDocument' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{document.name=projects/*/databases/*/documents/*/**}', - 'body' => 'document', - 'placeholders' => [ - 'document.name' => [ - 'getters' => [ - 'getDocument', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/databases/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Firestore/v1/tests/Unit/V1/Client/FirestoreClientTest.php b/owl-bot-staging/Firestore/v1/tests/Unit/V1/Client/FirestoreClientTest.php deleted file mode 100644 index 992ccc934a93..000000000000 --- a/owl-bot-staging/Firestore/v1/tests/Unit/V1/Client/FirestoreClientTest.php +++ /dev/null @@ -1,1405 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return FirestoreClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new FirestoreClient($options); - } - - /** @test */ - public function batchGetDocumentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $missing = 'missing1069449574'; - $transaction2 = '17'; - $expectedResponse = new BatchGetDocumentsResponse(); - $expectedResponse->setMissing($missing); - $expectedResponse->setTransaction($transaction2); - $transport->addResponse($expectedResponse); - $missing2 = 'missing21243859865'; - $transaction3 = '18'; - $expectedResponse2 = new BatchGetDocumentsResponse(); - $expectedResponse2->setMissing($missing2); - $expectedResponse2->setTransaction($transaction3); - $transport->addResponse($expectedResponse2); - $missing3 = 'missing31243859866'; - $transaction4 = '19'; - $expectedResponse3 = new BatchGetDocumentsResponse(); - $expectedResponse3->setMissing($missing3); - $expectedResponse3->setTransaction($transaction4); - $transport->addResponse($expectedResponse3); - // Mock request - $database = 'database1789464955'; - $documents = []; - $request = (new BatchGetDocumentsRequest()) - ->setDatabase($database) - ->setDocuments($documents); - $serverStream = $gapicClient->batchGetDocuments($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/BatchGetDocuments', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $actualValue = $actualRequestObject->getDocuments(); - $this->assertProtobufEquals($documents, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchGetDocumentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $database = 'database1789464955'; - $documents = []; - $request = (new BatchGetDocumentsRequest()) - ->setDatabase($database) - ->setDocuments($documents); - $serverStream = $gapicClient->batchGetDocuments($request); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchWriteTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchWriteResponse(); - $transport->addResponse($expectedResponse); - $request = new BatchWriteRequest(); - $response = $gapicClient->batchWrite($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/BatchWrite', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchWriteExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new BatchWriteRequest(); - try { - $gapicClient->batchWrite($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function beginTransactionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $transaction = '-34'; - $expectedResponse = new BeginTransactionResponse(); - $expectedResponse->setTransaction($transaction); - $transport->addResponse($expectedResponse); - // Mock request - $database = 'database1789464955'; - $request = (new BeginTransactionRequest()) - ->setDatabase($database); - $response = $gapicClient->beginTransaction($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/BeginTransaction', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function beginTransactionExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $database = 'database1789464955'; - $request = (new BeginTransactionRequest()) - ->setDatabase($database); - try { - $gapicClient->beginTransaction($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function commitTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new CommitResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $database = 'database1789464955'; - $writes = []; - $request = (new CommitRequest()) - ->setDatabase($database) - ->setWrites($writes); - $response = $gapicClient->commit($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/Commit', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $actualValue = $actualRequestObject->getWrites(); - $this->assertProtobufEquals($writes, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function commitExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $database = 'database1789464955'; - $writes = []; - $request = (new CommitRequest()) - ->setDatabase($database) - ->setWrites($writes); - try { - $gapicClient->commit($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Document(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $collectionId = 'collectionId-821242276'; - $documentId = 'documentId506676927'; - $document = new Document(); - $request = (new CreateDocumentRequest()) - ->setParent($parent) - ->setCollectionId($collectionId) - ->setDocumentId($documentId) - ->setDocument($document); - $response = $gapicClient->createDocument($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/CreateDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getCollectionId(); - $this->assertProtobufEquals($collectionId, $actualValue); - $actualValue = $actualRequestObject->getDocumentId(); - $this->assertProtobufEquals($documentId, $actualValue); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDocumentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $collectionId = 'collectionId-821242276'; - $documentId = 'documentId506676927'; - $document = new Document(); - $request = (new CreateDocumentRequest()) - ->setParent($parent) - ->setCollectionId($collectionId) - ->setDocumentId($documentId) - ->setDocument($document); - try { - $gapicClient->createDocument($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new DeleteDocumentRequest()) - ->setName($name); - $gapicClient->deleteDocument($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/DeleteDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDocumentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new DeleteDocumentRequest()) - ->setName($name); - try { - $gapicClient->deleteDocument($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function executePipelineTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $transaction2 = '17'; - $expectedResponse = new ExecutePipelineResponse(); - $expectedResponse->setTransaction($transaction2); - $transport->addResponse($expectedResponse); - $transaction3 = '18'; - $expectedResponse2 = new ExecutePipelineResponse(); - $expectedResponse2->setTransaction($transaction3); - $transport->addResponse($expectedResponse2); - $transaction4 = '19'; - $expectedResponse3 = new ExecutePipelineResponse(); - $expectedResponse3->setTransaction($transaction4); - $transport->addResponse($expectedResponse3); - // Mock request - $database = 'database1789464955'; - $request = (new ExecutePipelineRequest()) - ->setDatabase($database); - $serverStream = $gapicClient->executePipeline($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/ExecutePipeline', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function executePipelineExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $database = 'database1789464955'; - $request = (new ExecutePipelineRequest()) - ->setDatabase($database); - $serverStream = $gapicClient->executePipeline($request); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Document(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new GetDocumentRequest()) - ->setName($name); - $response = $gapicClient->getDocument($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/GetDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDocumentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new GetDocumentRequest()) - ->setName($name); - try { - $gapicClient->getDocument($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCollectionIdsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $collectionIdsElement = 'collectionIdsElement1368994900'; - $collectionIds = [ - $collectionIdsElement, - ]; - $expectedResponse = new ListCollectionIdsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCollectionIds($collectionIds); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListCollectionIdsRequest()) - ->setParent($parent); - $response = $gapicClient->listCollectionIds($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCollectionIds()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/ListCollectionIds', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCollectionIdsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListCollectionIdsRequest()) - ->setParent($parent); - try { - $gapicClient->listCollectionIds($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDocumentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $documentsElement = new Document(); - $documents = [ - $documentsElement, - ]; - $expectedResponse = new ListDocumentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDocuments($documents); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $collectionId = 'collectionId-821242276'; - $request = (new ListDocumentsRequest()) - ->setParent($parent) - ->setCollectionId($collectionId); - $response = $gapicClient->listDocuments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDocuments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/ListDocuments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getCollectionId(); - $this->assertProtobufEquals($collectionId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDocumentsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $collectionId = 'collectionId-821242276'; - $request = (new ListDocumentsRequest()) - ->setParent($parent) - ->setCollectionId($collectionId); - try { - $gapicClient->listDocuments($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListenResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new ListenResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new ListenResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $database = 'database1789464955'; - $request = new ListenRequest(); - $request->setDatabase($database); - $database2 = 'database21688906350'; - $request2 = new ListenRequest(); - $request2->setDatabase($database2); - $database3 = 'database31688906351'; - $request3 = new ListenRequest(); - $request3->setDatabase($database3); - $bidi = $gapicClient->listen(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/Listen', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listenExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->listen(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function partitionQueryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $partitionsElement = new Cursor(); - $partitions = [ - $partitionsElement, - ]; - $expectedResponse = new PartitionQueryResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setPartitions($partitions); - $transport->addResponse($expectedResponse); - $request = new PartitionQueryRequest(); - $response = $gapicClient->partitionQuery($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getPartitions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/PartitionQuery', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function partitionQueryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new PartitionQueryRequest(); - try { - $gapicClient->partitionQuery($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rollbackTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $database = 'database1789464955'; - $transaction = '-34'; - $request = (new RollbackRequest()) - ->setDatabase($database) - ->setTransaction($transaction); - $gapicClient->rollback($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/Rollback', $actualFuncCall); - $actualValue = $actualRequestObject->getDatabase(); - $this->assertProtobufEquals($database, $actualValue); - $actualValue = $actualRequestObject->getTransaction(); - $this->assertProtobufEquals($transaction, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function rollbackExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $database = 'database1789464955'; - $transaction = '-34'; - $request = (new RollbackRequest()) - ->setDatabase($database) - ->setTransaction($transaction); - try { - $gapicClient->rollback($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runAggregationQueryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $transaction2 = '17'; - $expectedResponse = new RunAggregationQueryResponse(); - $expectedResponse->setTransaction($transaction2); - $transport->addResponse($expectedResponse); - $transaction3 = '18'; - $expectedResponse2 = new RunAggregationQueryResponse(); - $expectedResponse2->setTransaction($transaction3); - $transport->addResponse($expectedResponse2); - $transaction4 = '19'; - $expectedResponse3 = new RunAggregationQueryResponse(); - $expectedResponse3->setTransaction($transaction4); - $transport->addResponse($expectedResponse3); - // Mock request - $parent = 'parent-995424086'; - $request = (new RunAggregationQueryRequest()) - ->setParent($parent); - $serverStream = $gapicClient->runAggregationQuery($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/RunAggregationQuery', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runAggregationQueryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $parent = 'parent-995424086'; - $request = (new RunAggregationQueryRequest()) - ->setParent($parent); - $serverStream = $gapicClient->runAggregationQuery($request); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runQueryTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $transaction2 = '17'; - $skippedResults = 880286183; - $done = true; - $expectedResponse = new RunQueryResponse(); - $expectedResponse->setTransaction($transaction2); - $expectedResponse->setSkippedResults($skippedResults); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - $transaction3 = '18'; - $skippedResults2 = 153532454; - $done2 = false; - $expectedResponse2 = new RunQueryResponse(); - $expectedResponse2->setTransaction($transaction3); - $expectedResponse2->setSkippedResults($skippedResults2); - $expectedResponse2->setDone($done2); - $transport->addResponse($expectedResponse2); - $transaction4 = '19'; - $skippedResults3 = 153532453; - $done3 = true; - $expectedResponse3 = new RunQueryResponse(); - $expectedResponse3->setTransaction($transaction4); - $expectedResponse3->setSkippedResults($skippedResults3); - $expectedResponse3->setDone($done3); - $transport->addResponse($expectedResponse3); - // Mock request - $parent = 'parent-995424086'; - $request = (new RunQueryRequest()) - ->setParent($parent); - $serverStream = $gapicClient->runQuery($request); - $this->assertInstanceOf(ServerStream::class, $serverStream); - $responses = iterator_to_array($serverStream->readAll()); - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/RunQuery', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function runQueryExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - // Mock request - $parent = 'parent-995424086'; - $request = (new RunQueryRequest()) - ->setParent($parent); - $serverStream = $gapicClient->runQuery($request); - $results = $serverStream->readAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDocumentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Document(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $document = new Document(); - $updateMask = new DocumentMask(); - $request = (new UpdateDocumentRequest()) - ->setDocument($document) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateDocument($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/UpdateDocument', $actualFuncCall); - $actualValue = $actualRequestObject->getDocument(); - $this->assertProtobufEquals($document, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDocumentExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $document = new Document(); - $updateMask = new DocumentMask(); - $request = (new UpdateDocumentRequest()) - ->setDocument($document) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateDocument($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function writeTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $streamId = 'streamId-315624902'; - $streamToken = '122'; - $expectedResponse = new WriteResponse(); - $expectedResponse->setStreamId($streamId); - $expectedResponse->setStreamToken($streamToken); - $transport->addResponse($expectedResponse); - $streamId2 = 'streamId21627150189'; - $streamToken2 = '-83'; - $expectedResponse2 = new WriteResponse(); - $expectedResponse2->setStreamId($streamId2); - $expectedResponse2->setStreamToken($streamToken2); - $transport->addResponse($expectedResponse2); - $streamId3 = 'streamId31627150190'; - $streamToken3 = '-82'; - $expectedResponse3 = new WriteResponse(); - $expectedResponse3->setStreamId($streamId3); - $expectedResponse3->setStreamToken($streamToken3); - $transport->addResponse($expectedResponse3); - // Mock request - $database = 'database1789464955'; - $request = new WriteRequest(); - $request->setDatabase($database); - $database2 = 'database21688906350'; - $request2 = new WriteRequest(); - $request2->setDatabase($database2); - $database3 = 'database31688906351'; - $request3 = new WriteRequest(); - $request3->setDatabase($database3); - $bidi = $gapicClient->write(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/Write', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function writeExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->write(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchWriteAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new BatchWriteResponse(); - $transport->addResponse($expectedResponse); - $request = new BatchWriteRequest(); - $response = $gapicClient->batchWriteAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.firestore.v1.Firestore/BatchWrite', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LogEntry.php b/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LogEntry.php deleted file mode 100644 index 3b78a5a19eb4..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LogEntry.php +++ /dev/null @@ -1,32 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xDD\x0D\x0A!google/logging/v2/log_entry.proto\x12\x11google.logging.v2\x1A#google/api/monitored_resource.proto\x1A\x19google/api/resource.proto\x1A&google/logging/type/http_request.proto\x1A&google/logging/type/log_severity.proto\x1A\x19google/protobuf/any.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x83\x08\x0A\x08LogEntry\x12\x15\x0A\x08log_name\x18\x0C \x01(\x09B\x03\xE0A\x02\x124\x0A\x08resource\x18\x08 \x01(\x0B2\x1D.google.api.MonitoredResourceB\x03\xE0A\x02\x12-\x0A\x0Dproto_payload\x18\x02 \x01(\x0B2\x14.google.protobuf.AnyH\x00\x12\x16\x0A\x0Ctext_payload\x18\x03 \x01(\x09H\x00\x12/\x0A\x0Cjson_payload\x18\x06 \x01(\x0B2\x17.google.protobuf.StructH\x00\x122\x0A\x09timestamp\x18\x09 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x01\x12:\x0A\x11receive_timestamp\x18\x18 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x127\x0A\x08severity\x18\x0A \x01(\x0E2 .google.logging.type.LogSeverityB\x03\xE0A\x01\x12\x16\x0A\x09insert_id\x18\x04 \x01(\x09B\x03\xE0A\x01\x12;\x0A\x0Chttp_request\x18\x07 \x01(\x0B2 .google.logging.type.HttpRequestB\x03\xE0A\x01\x12<\x0A\x06labels\x18\x0B \x03(\x0B2'.google.logging.v2.LogEntry.LabelsEntryB\x03\xE0A\x01\x12<\x0A\x09operation\x18\x0F \x01(\x0B2\$.google.logging.v2.LogEntryOperationB\x03\xE0A\x01\x12\x12\x0A\x05trace\x18\x16 \x01(\x09B\x03\xE0A\x01\x12\x14\x0A\x07span_id\x18\x1B \x01(\x09B\x03\xE0A\x01\x12\x1A\x0A\x0Dtrace_sampled\x18\x1E \x01(\x08B\x03\xE0A\x01\x12G\x0A\x0Fsource_location\x18\x17 \x01(\x0B2).google.logging.v2.LogEntrySourceLocationB\x03\xE0A\x01\x12/\x0A\x05split\x18# \x01(\x0B2\x1B.google.logging.v2.LogSplitB\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:\xBD\x01\xEAA\xB9\x01\x0A\x1Alogging.googleapis.com/Log\x12\x1Dprojects/{project}/logs/{log}\x12'organizations/{organization}/logs/{log}\x12\x1Bfolders/{folder}/logs/{log}\x12,billingAccounts/{billing_account}/logs/{log}\x1A\x08log_nameB\x09\x0A\x07payload\"b\x0A\x11LogEntryOperation\x12\x0F\x0A\x02id\x18\x01 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08producer\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x12\x0A\x05first\x18\x03 \x01(\x08B\x03\xE0A\x01\x12\x11\x0A\x04last\x18\x04 \x01(\x08B\x03\xE0A\x01\"U\x0A\x16LogEntrySourceLocation\x12\x11\x0A\x04file\x18\x01 \x01(\x09B\x03\xE0A\x01\x12\x11\x0A\x04line\x18\x02 \x01(\x03B\x03\xE0A\x01\x12\x15\x0A\x08function\x18\x03 \x01(\x09B\x03\xE0A\x01\"<\x0A\x08LogSplit\x12\x0B\x0A\x03uid\x18\x01 \x01(\x09\x12\x0D\x0A\x05index\x18\x02 \x01(\x05\x12\x14\x0A\x0Ctotal_splits\x18\x03 \x01(\x05B\xB3\x01\x0A\x15com.google.logging.v2B\x0DLogEntryProtoP\x01Z5cloud.google.com/go/logging/apiv2/loggingpb;loggingpb\xF8\x01\x01\xAA\x02\x17Google.Cloud.Logging.V2\xCA\x02\x17Google\\Cloud\\Logging\\V2\xEA\x02\x1AGoogle::Cloud::Logging::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/Logging.php b/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/Logging.php deleted file mode 100644 index 532169e93dda..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/Logging.php +++ /dev/null @@ -1,33 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC0 \x0A\x1Fgoogle/logging/v2/logging.proto\x12\x11google.logging.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A#google/api/monitored_resource.proto\x1A\x19google/api/resource.proto\x1A!google/logging/v2/log_entry.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A\x17google/rpc/status.proto\"H\x0A\x10DeleteLogRequest\x124\x0A\x08log_name\x18\x01 \x01(\x09B\"\xE0A\x02\xFAA\x1C\x0A\x1Alogging.googleapis.com/Log\"\xE6\x02\x0A\x16WriteLogEntriesRequest\x124\x0A\x08log_name\x18\x01 \x01(\x09B\"\xE0A\x01\xFAA\x1C\x0A\x1Alogging.googleapis.com/Log\x124\x0A\x08resource\x18\x02 \x01(\x0B2\x1D.google.api.MonitoredResourceB\x03\xE0A\x01\x12J\x0A\x06labels\x18\x03 \x03(\x0B25.google.logging.v2.WriteLogEntriesRequest.LabelsEntryB\x03\xE0A\x01\x121\x0A\x07entries\x18\x04 \x03(\x0B2\x1B.google.logging.v2.LogEntryB\x03\xE0A\x02\x12\x1C\x0A\x0Fpartial_success\x18\x05 \x01(\x08B\x03\xE0A\x01\x12\x14\x0A\x07dry_run\x18\x06 \x01(\x08B\x03\xE0A\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x19\x0A\x17WriteLogEntriesResponse\"\xC8\x01\x0A\x1CWriteLogEntriesPartialErrors\x12]\x0A\x10log_entry_errors\x18\x01 \x03(\x0B2C.google.logging.v2.WriteLogEntriesPartialErrors.LogEntryErrorsEntry\x1AI\x0A\x13LogEntryErrorsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x05\x12!\x0A\x05value\x18\x02 \x01(\x0B2\x12.google.rpc.Status:\x028\x01\"\xB0\x01\x0A\x15ListLogEntriesRequest\x12:\x0A\x0Eresource_names\x18\x08 \x03(\x09B\"\xE0A\x02\xFAA\x1C\x12\x1Alogging.googleapis.com/Log\x12\x13\x0A\x06filter\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x04 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x05 \x01(\x09B\x03\xE0A\x01\"_\x0A\x16ListLogEntriesResponse\x12,\x0A\x07entries\x18\x01 \x03(\x0B2\x1B.google.logging.v2.LogEntry\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"Z\x0A'ListMonitoredResourceDescriptorsRequest\x12\x16\x0A\x09page_size\x18\x01 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x02 \x01(\x09B\x03\xE0A\x01\"\x8A\x01\x0A(ListMonitoredResourceDescriptorsResponse\x12E\x0A\x14resource_descriptors\x18\x01 \x03(\x0B2'.google.api.MonitoredResourceDescriptor\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xB2\x01\x0A\x0FListLogsRequest\x122\x0A\x06parent\x18\x01 \x01(\x09B\"\xE0A\x02\xFAA\x1C\x12\x1Alogging.googleapis.com/Log\x12:\x0A\x0Eresource_names\x18\x08 \x03(\x09B\"\xE0A\x01\xFAA\x1C\x12\x1Alogging.googleapis.com/Log\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\">\x0A\x10ListLogsResponse\x12\x11\x0A\x09log_names\x18\x03 \x03(\x09\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x80\x01\x0A\x15TailLogEntriesRequest\x12\x1B\x0A\x0Eresource_names\x18\x01 \x03(\x09B\x03\xE0A\x02\x12\x13\x0A\x06filter\x18\x02 \x01(\x09B\x03\xE0A\x01\x125\x0A\x0Dbuffer_window\x18\x03 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01\"\xDF\x02\x0A\x16TailLogEntriesResponse\x12,\x0A\x07entries\x18\x01 \x03(\x0B2\x1B.google.logging.v2.LogEntry\x12S\x0A\x10suppression_info\x18\x02 \x03(\x0B29.google.logging.v2.TailLogEntriesResponse.SuppressionInfo\x1A\xC1\x01\x0A\x0FSuppressionInfo\x12P\x0A\x06reason\x18\x01 \x01(\x0E2@.google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason\x12\x18\x0A\x10suppressed_count\x18\x02 \x01(\x05\"B\x0A\x06Reason\x12\x16\x0A\x12REASON_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ARATE_LIMIT\x10\x01\x12\x10\x0A\x0CNOT_CONSUMED\x10\x022\xE9\x0D\x0A\x10LoggingServiceV2\x12\x93\x02\x0A\x09DeleteLog\x12#.google.logging.v2.DeleteLogRequest\x1A\x16.google.protobuf.Empty\"\xC8\x01\xDAA\x08log_name\x82\xD3\xE4\x93\x02\xB6\x01* /v2/{log_name=projects/*/logs/*}Z\x1B*\x19/v2/{log_name=*/*/logs/*}Z'*%/v2/{log_name=organizations/*/logs/*}Z!*\x1F/v2/{log_name=folders/*/logs/*}Z)*'/v2/{log_name=billingAccounts/*/logs/*}\x12\xA9\x01\x0A\x0FWriteLogEntries\x12).google.logging.v2.WriteLogEntriesRequest\x1A*.google.logging.v2.WriteLogEntriesResponse\"?\xDAA log_name,resource,labels,entries\x82\xD3\xE4\x93\x02\x16\"\x11/v2/entries:write:\x01*\x12\xA3\x01\x0A\x0EListLogEntries\x12(.google.logging.v2.ListLogEntriesRequest\x1A).google.logging.v2.ListLogEntriesResponse\"<\xDAA\x1Eresource_names,filter,order_by\x82\xD3\xE4\x93\x02\x15\"\x10/v2/entries:list:\x01*\x12\xC5\x01\x0A ListMonitoredResourceDescriptors\x12:.google.logging.v2.ListMonitoredResourceDescriptorsRequest\x1A;.google.logging.v2.ListMonitoredResourceDescriptorsResponse\"(\x82\xD3\xE4\x93\x02\"\x12 /v2/monitoredResourceDescriptors\x12\x8B\x04\x0A\x08ListLogs\x12\".google.logging.v2.ListLogsRequest\x1A#.google.logging.v2.ListLogsResponse\"\xB5\x03\xDAA\x06parent\x82\xD3\xE4\x93\x02\xA5\x03\x12\x15/v2/{parent=*/*}/logsZ\x1E\x12\x1C/v2/{parent=projects/*}/logsZ#\x12!/v2/{parent=organizations/*}/logsZ\x1D\x12\x1B/v2/{parent=folders/*}/logsZ%\x12#/v2/{parent=billingAccounts/*}/logsZ<\x12:/v2/{parent=projects/*/locations/*/buckets/*/views/*}/logsZA\x12?/v2/{parent=organizations/*/locations/*/buckets/*/views/*}/logsZ;\x129/v2/{parent=folders/*/locations/*/buckets/*/views/*}/logsZC\x12A/v2/{parent=billingAccounts/*/locations/*/buckets/*/views/*}/logs\x12\x86\x01\x0A\x0ETailLogEntries\x12(.google.logging.v2.TailLogEntriesRequest\x1A).google.logging.v2.TailLogEntriesResponse\"\x1B\x82\xD3\xE4\x93\x02\x15\"\x10/v2/entries:tail:\x01*(\x010\x01\x1A\x8D\x02\xCAA\x16logging.googleapis.com\xD2A\xF0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xB2\x01\x0A\x15com.google.logging.v2B\x0CLoggingProtoP\x01Z5cloud.google.com/go/logging/apiv2/loggingpb;loggingpb\xF8\x01\x01\xAA\x02\x17Google.Cloud.Logging.V2\xCA\x02\x17Google\\Cloud\\Logging\\V2\xEA\x02\x1AGoogle::Cloud::Logging::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingConfig.php b/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingConfig.php deleted file mode 100644 index 682637236b8b..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingConfig.php +++ /dev/null @@ -1,32 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xFA\xA8\x01\x0A&google/logging/v2/logging_config.proto\x12\x11google.logging.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x8D\x01\x0A\x0BIndexConfig\x12\x17\x0A\x0Afield_path\x18\x01 \x01(\x09B\x03\xE0A\x02\x12/\x0A\x04type\x18\x02 \x01(\x0E2\x1C.google.logging.v2.IndexTypeB\x03\xE0A\x02\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"\xD5\x05\x0A\x09LogBucket\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x13\x0A\x0Bdescription\x18\x03 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x16\x0A\x0Eretention_days\x18\x0B \x01(\x05\x12\x0E\x0A\x06locked\x18\x09 \x01(\x08\x12?\x0A\x0Flifecycle_state\x18\x0C \x01(\x0E2!.google.logging.v2.LifecycleStateB\x03\xE0A\x03\x12\x19\x0A\x11analytics_enabled\x18\x0E \x01(\x08\x12\x19\x0A\x11restricted_fields\x18\x0F \x03(\x09\x125\x0A\x0Dindex_configs\x18\x11 \x03(\x0B2\x1E.google.logging.v2.IndexConfig\x126\x0A\x0Dcmek_settings\x18\x13 \x01(\x0B2\x1F.google.logging.v2.CmekSettings:\xA5\x02\xEAA\xA1\x02\x0A logging.googleapis.com/LogBucket\x128projects/{project}/locations/{location}/buckets/{bucket}\x12Borganizations/{organization}/locations/{location}/buckets/{bucket}\x126folders/{folder}/locations/{location}/buckets/{bucket}\x12GbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}\"\x82\x04\x0A\x07LogView\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x03 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x0E\x0A\x06filter\x18\x07 \x01(\x09:\xD7\x02\xEAA\xD3\x02\x0A\x1Elogging.googleapis.com/LogView\x12Eprojects/{project}/locations/{location}/buckets/{bucket}/views/{view}\x12Oorganizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}\x12Cfolders/{folder}/locations/{location}/buckets/{bucket}/views/{view}\x12TbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}\"\x85\x06\x0A\x07LogSink\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1E\x0A\x0Bdestination\x18\x03 \x01(\x09B\x09\xE0A\x02\xFAA\x03\x0A\x01*\x12\x13\x0A\x06filter\x18\x05 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bdescription\x18\x12 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08disabled\x18\x13 \x01(\x08B\x03\xE0A\x01\x128\x0A\x0Aexclusions\x18\x10 \x03(\x0B2\x1F.google.logging.v2.LogExclusionB\x03\xE0A\x01\x12K\x0A\x15output_version_format\x18\x06 \x01(\x0E2(.google.logging.v2.LogSink.VersionFormatB\x02\x18\x01\x12\x1C\x0A\x0Fwriter_identity\x18\x08 \x01(\x09B\x03\xE0A\x03\x12\x1D\x0A\x10include_children\x18\x09 \x01(\x08B\x03\xE0A\x01\x12C\x0A\x10bigquery_options\x18\x0C \x01(\x0B2\".google.logging.v2.BigQueryOptionsB\x03\xE0A\x01H\x00\x124\x0A\x0Bcreate_time\x18\x0D \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x0E \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"?\x0A\x0DVersionFormat\x12\x1E\x0A\x1AVERSION_FORMAT_UNSPECIFIED\x10\x00\x12\x06\x0A\x02V2\x10\x01\x12\x06\x0A\x02V1\x10\x02:\xBF\x01\xEAA\xBB\x01\x0A\x1Elogging.googleapis.com/LogSink\x12\x1Fprojects/{project}/sinks/{sink}\x12)organizations/{organization}/sinks/{sink}\x12\x1Dfolders/{folder}/sinks/{sink}\x12.billingAccounts/{billing_account}/sinks/{sink}B\x09\x0A\x07options\"*\x0A\x0FBigQueryDataset\x12\x17\x0A\x0Adataset_id\x18\x01 \x01(\x09B\x03\xE0A\x03\"\xB5\x04\x0A\x04Link\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x02 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12?\x0A\x0Flifecycle_state\x18\x04 \x01(\x0E2!.google.logging.v2.LifecycleStateB\x03\xE0A\x03\x12<\x0A\x10bigquery_dataset\x18\x05 \x01(\x0B2\".google.logging.v2.BigQueryDataset:\xD4\x02\xEAA\xD0\x02\x0A\x1Blogging.googleapis.com/Link\x12Eprojects/{project}/locations/{location}/buckets/{bucket}/links/{link}\x12Oorganizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}\x12Cfolders/{folder}/locations/{location}/buckets/{bucket}/links/{link}\x12TbillingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link}\"g\x0A\x0FBigQueryOptions\x12#\x0A\x16use_partitioned_tables\x18\x01 \x01(\x08B\x03\xE0A\x01\x12/\x0A\"uses_timestamp_column_partitioning\x18\x03 \x01(\x08B\x03\xE0A\x03\"\x7F\x0A\x12ListBucketsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 logging.googleapis.com/LogBucket\x12\x17\x0A\x0Apage_token\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\"]\x0A\x13ListBucketsResponse\x12-\x0A\x07buckets\x18\x01 \x03(\x0B2\x1C.google.logging.v2.LogBucket\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x9A\x01\x0A\x13CreateBucketRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 logging.googleapis.com/LogBucket\x12\x16\x0A\x09bucket_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x121\x0A\x06bucket\x18\x03 \x01(\x0B2\x1C.google.logging.v2.LogBucketB\x03\xE0A\x02\"\xB6\x01\x0A\x13UpdateBucketRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A logging.googleapis.com/LogBucket\x121\x0A\x06bucket\x18\x02 \x01(\x0B2\x1C.google.logging.v2.LogBucketB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x04 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\"J\x0A\x10GetBucketRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A logging.googleapis.com/LogBucket\"M\x0A\x13DeleteBucketRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A logging.googleapis.com/LogBucket\"O\x0A\x15UndeleteBucketRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A logging.googleapis.com/LogBucket\"X\x0A\x10ListViewsRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x17\x0A\x0Apage_token\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\"W\x0A\x11ListViewsResponse\x12)\x0A\x05views\x18\x01 \x03(\x0B2\x1A.google.logging.v2.LogView\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"m\x0A\x11CreateViewRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x14\x0A\x07view_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12-\x0A\x04view\x18\x03 \x01(\x0B2\x1A.google.logging.v2.LogViewB\x03\xE0A\x02\"\x8B\x01\x0A\x11UpdateViewRequest\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12-\x0A\x04view\x18\x02 \x01(\x0B2\x1A.google.logging.v2.LogViewB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x04 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"F\x0A\x0EGetViewRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Elogging.googleapis.com/LogView\"I\x0A\x11DeleteViewRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Elogging.googleapis.com/LogView\"{\x0A\x10ListSinksRequest\x126\x0A\x06parent\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x12\x1Elogging.googleapis.com/LogSink\x12\x17\x0A\x0Apage_token\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\"W\x0A\x11ListSinksResponse\x12)\x0A\x05sinks\x18\x01 \x03(\x0B2\x1A.google.logging.v2.LogSink\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"K\x0A\x0EGetSinkRequest\x129\x0A\x09sink_name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Elogging.googleapis.com/LogSink\"\x9F\x01\x0A\x11CreateSinkRequest\x126\x0A\x06parent\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x12\x1Elogging.googleapis.com/LogSink\x12-\x0A\x04sink\x18\x02 \x01(\x0B2\x1A.google.logging.v2.LogSinkB\x03\xE0A\x02\x12#\x0A\x16unique_writer_identity\x18\x03 \x01(\x08B\x03\xE0A\x01\"\xD8\x01\x0A\x11UpdateSinkRequest\x129\x0A\x09sink_name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Elogging.googleapis.com/LogSink\x12-\x0A\x04sink\x18\x02 \x01(\x0B2\x1A.google.logging.v2.LogSinkB\x03\xE0A\x02\x12#\x0A\x16unique_writer_identity\x18\x03 \x01(\x08B\x03\xE0A\x01\x124\x0A\x0Bupdate_mask\x18\x04 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"N\x0A\x11DeleteSinkRequest\x129\x0A\x09sink_name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Elogging.googleapis.com/LogSink\"\x8A\x01\x0A\x11CreateLinkRequest\x123\x0A\x06parent\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x12\x1Blogging.googleapis.com/Link\x12*\x0A\x04link\x18\x02 \x01(\x0B2\x17.google.logging.v2.LinkB\x03\xE0A\x02\x12\x14\x0A\x07link_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"F\x0A\x11DeleteLinkRequest\x121\x0A\x04name\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x0A\x1Blogging.googleapis.com/Link\"x\x0A\x10ListLinksRequest\x123\x0A\x06parent\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x12\x1Blogging.googleapis.com/Link\x12\x17\x0A\x0Apage_token\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\"T\x0A\x11ListLinksResponse\x12&\x0A\x05links\x18\x01 \x03(\x0B2\x17.google.logging.v2.Link\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"C\x0A\x0EGetLinkRequest\x121\x0A\x04name\x18\x01 \x01(\x09B#\xE0A\x02\xFAA\x1D\x0A\x1Blogging.googleapis.com/Link\"\xC2\x03\x0A\x0CLogExclusion\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x03 \x01(\x09B\x03\xE0A\x02\x12\x15\x0A\x08disabled\x18\x04 \x01(\x08B\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03:\xEC\x01\xEAA\xE8\x01\x0A#logging.googleapis.com/LogExclusion\x12)projects/{project}/exclusions/{exclusion}\x123organizations/{organization}/exclusions/{exclusion}\x12'folders/{folder}/exclusions/{exclusion}\x128billingAccounts/{billing_account}/exclusions/{exclusion}\"\x85\x01\x0A\x15ListExclusionsRequest\x12;\x0A\x06parent\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x12#logging.googleapis.com/LogExclusion\x12\x17\x0A\x0Apage_token\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\"f\x0A\x16ListExclusionsResponse\x123\x0A\x0Aexclusions\x18\x01 \x03(\x0B2\x1F.google.logging.v2.LogExclusion\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"P\x0A\x13GetExclusionRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#logging.googleapis.com/LogExclusion\"\x8E\x01\x0A\x16CreateExclusionRequest\x12;\x0A\x06parent\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x12#logging.googleapis.com/LogExclusion\x127\x0A\x09exclusion\x18\x02 \x01(\x0B2\x1F.google.logging.v2.LogExclusionB\x03\xE0A\x02\"\xC2\x01\x0A\x16UpdateExclusionRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#logging.googleapis.com/LogExclusion\x127\x0A\x09exclusion\x18\x02 \x01(\x0B2\x1F.google.logging.v2.LogExclusionB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x03 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\"S\x0A\x16DeleteExclusionRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#logging.googleapis.com/LogExclusion\"S\x0A\x16GetCmekSettingsRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#logging.googleapis.com/CmekSettings\"\xA1\x01\x0A\x19UpdateCmekSettingsRequest\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12;\x0A\x0Dcmek_settings\x18\x02 \x01(\x0B2\x1F.google.logging.v2.CmekSettingsB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x03 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"\xBD\x02\x0A\x0CCmekSettings\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x14\x0A\x0Ckms_key_name\x18\x02 \x01(\x09\x12\x1C\x0A\x14kms_key_version_name\x18\x04 \x01(\x09\x12\x1F\x0A\x12service_account_id\x18\x03 \x01(\x09B\x03\xE0A\x03:\xC4\x01\xEAA\xC0\x01\x0A#logging.googleapis.com/CmekSettings\x12\x1Fprojects/{project}/cmekSettings\x12)organizations/{organization}/cmekSettings\x12\x1Dfolders/{folder}/cmekSettings\x12.billingAccounts/{billing_account}/cmekSettings\"K\x0A\x12GetSettingsRequest\x125\x0A\x04name\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Flogging.googleapis.com/Settings\"\x94\x01\x0A\x15UpdateSettingsRequest\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x122\x0A\x08settings\x18\x02 \x01(\x0B2\x1B.google.logging.v2.SettingsB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x03 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"\xD2\x02\x0A\x08Settings\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x19\x0A\x0Ckms_key_name\x18\x02 \x01(\x09B\x03\xE0A\x01\x12#\x0A\x16kms_service_account_id\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x1D\x0A\x10storage_location\x18\x04 \x01(\x09B\x03\xE0A\x01\x12!\x0A\x14disable_default_sink\x18\x05 \x01(\x08B\x03\xE0A\x01:\xB0\x01\xEAA\xAC\x01\x0A\x1Flogging.googleapis.com/Settings\x12\x1Bprojects/{project}/settings\x12%organizations/{organization}/settings\x12\x19folders/{folder}/settings\x12*billingAccounts/{billing_account}/settings\"Y\x0A\x15CopyLogEntriesRequest\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x06filter\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bdestination\x18\x04 \x01(\x09B\x03\xE0A\x02\"\xAE\x02\x0A\x16CopyLogEntriesMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x120\x0A\x05state\x18\x03 \x01(\x0E2!.google.logging.v2.OperationState\x12\x1E\x0A\x16cancellation_requested\x18\x04 \x01(\x08\x129\x0A\x07request\x18\x05 \x01(\x0B2(.google.logging.v2.CopyLogEntriesRequest\x12\x10\x0A\x08progress\x18\x06 \x01(\x05\x12\x17\x0A\x0Fwriter_identity\x18\x07 \x01(\x09\":\x0A\x16CopyLogEntriesResponse\x12 \x0A\x18log_entries_copied_count\x18\x01 \x01(\x03\"\xBD\x02\x0A\x0EBucketMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x120\x0A\x05state\x18\x03 \x01(\x0E2!.google.logging.v2.OperationState\x12G\x0A\x15create_bucket_request\x18\x04 \x01(\x0B2&.google.logging.v2.CreateBucketRequestH\x00\x12G\x0A\x15update_bucket_request\x18\x05 \x01(\x0B2&.google.logging.v2.UpdateBucketRequestH\x00B\x09\x0A\x07request\"\xB3\x02\x0A\x0CLinkMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x120\x0A\x05state\x18\x03 \x01(\x0E2!.google.logging.v2.OperationState\x12C\x0A\x13create_link_request\x18\x04 \x01(\x0B2\$.google.logging.v2.CreateLinkRequestH\x00\x12C\x0A\x13delete_link_request\x18\x05 \x01(\x0B2\$.google.logging.v2.DeleteLinkRequestH\x00B\x09\x0A\x07request\"1\x0A\x10LocationMetadata\x12\x1D\x0A\x15log_analytics_enabled\x18\x01 \x01(\x08*\xF4\x01\x0A\x0EOperationState\x12\x1F\x0A\x1BOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x1D\x0A\x19OPERATION_STATE_SCHEDULED\x10\x01\x12+\x0A'OPERATION_STATE_WAITING_FOR_PERMISSIONS\x10\x02\x12\x1B\x0A\x17OPERATION_STATE_RUNNING\x10\x03\x12\x1D\x0A\x19OPERATION_STATE_SUCCEEDED\x10\x04\x12\x1A\x0A\x16OPERATION_STATE_FAILED\x10\x05\x12\x1D\x0A\x19OPERATION_STATE_CANCELLED\x10\x06*{\x0A\x0ELifecycleState\x12\x1F\x0A\x1BLIFECYCLE_STATE_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06ACTIVE\x10\x01\x12\x14\x0A\x10DELETE_REQUESTED\x10\x02\x12\x0C\x0A\x08UPDATING\x10\x03\x12\x0C\x0A\x08CREATING\x10\x04\x12\x0A\x0A\x06FAILED\x10\x05*V\x0A\x09IndexType\x12\x1A\x0A\x16INDEX_TYPE_UNSPECIFIED\x10\x00\x12\x15\x0A\x11INDEX_TYPE_STRING\x10\x01\x12\x16\x0A\x12INDEX_TYPE_INTEGER\x10\x022\x9FY\x0A\x0FConfigServiceV2\x12\xDC\x02\x0A\x0BListBuckets\x12%.google.logging.v2.ListBucketsRequest\x1A&.google.logging.v2.ListBucketsResponse\"\xFD\x01\xDAA\x06parent\x82\xD3\xE4\x93\x02\xED\x01\x12\$/v2/{parent=*/*/locations/*}/bucketsZ-\x12+/v2/{parent=projects/*/locations/*}/bucketsZ2\x120/v2/{parent=organizations/*/locations/*}/bucketsZ,\x12*/v2/{parent=folders/*/locations/*}/bucketsZ4\x122/v2/{parent=billingAccounts/*/locations/*}/buckets\x12\xC5\x02\x0A\x09GetBucket\x12#.google.logging.v2.GetBucketRequest\x1A\x1C.google.logging.v2.LogBucket\"\xF4\x01\x82\xD3\xE4\x93\x02\xED\x01\x12\$/v2/{name=*/*/locations/*/buckets/*}Z-\x12+/v2/{name=projects/*/locations/*/buckets/*}Z2\x120/v2/{name=organizations/*/locations/*/buckets/*}Z,\x12*/v2/{name=folders/*/locations/*/buckets/*}Z4\x122/v2/{name=billingAccounts/*/locations/*/buckets/*}\x12\xD3\x03\x0A\x11CreateBucketAsync\x12&.google.logging.v2.CreateBucketRequest\x1A\x1D.google.longrunning.Operation\"\xF6\x02\xCAA\x1B\x0A\x09LogBucket\x12\x0EBucketMetadata\x82\xD3\xE4\x93\x02\xD1\x02\"0/v2/{parent=*/*/locations/*}/buckets:createAsync:\x06bucketZA\"7/v2/{parent=projects/*/locations/*}/buckets:createAsync:\x06bucketZF\"/v2/{parent=billingAccounts/*/locations/*}/buckets:createAsync:\x06bucket\x12\xD3\x03\x0A\x11UpdateBucketAsync\x12&.google.logging.v2.UpdateBucketRequest\x1A\x1D.google.longrunning.Operation\"\xF6\x02\xCAA\x1B\x0A\x09LogBucket\x12\x0EBucketMetadata\x82\xD3\xE4\x93\x02\xD1\x02\"0/v2/{name=*/*/locations/*/buckets/*}:updateAsync:\x06bucketZA\"7/v2/{name=projects/*/locations/*/buckets/*}:updateAsync:\x06bucketZF\"/v2/{name=billingAccounts/*/locations/*/buckets/*}:updateAsync:\x06bucket\x12\xF3\x02\x0A\x0CCreateBucket\x12&.google.logging.v2.CreateBucketRequest\x1A\x1C.google.logging.v2.LogBucket\"\x9C\x02\x82\xD3\xE4\x93\x02\x95\x02\"\$/v2/{parent=*/*/locations/*}/buckets:\x06bucketZ5\"+/v2/{parent=projects/*/locations/*}/buckets:\x06bucketZ:\"0/v2/{parent=organizations/*/locations/*}/buckets:\x06bucketZ4\"*/v2/{parent=folders/*/locations/*}/buckets:\x06bucketZ<\"2/v2/{parent=billingAccounts/*/locations/*}/buckets:\x06bucket\x12\xF3\x02\x0A\x0CUpdateBucket\x12&.google.logging.v2.UpdateBucketRequest\x1A\x1C.google.logging.v2.LogBucket\"\x9C\x02\x82\xD3\xE4\x93\x02\x95\x022\$/v2/{name=*/*/locations/*/buckets/*}:\x06bucketZ52+/v2/{name=projects/*/locations/*/buckets/*}:\x06bucketZ:20/v2/{name=organizations/*/locations/*/buckets/*}:\x06bucketZ42*/v2/{name=folders/*/locations/*/buckets/*}:\x06bucketZ<22/v2/{name=billingAccounts/*/locations/*/buckets/*}:\x06bucket\x12\xC5\x02\x0A\x0CDeleteBucket\x12&.google.logging.v2.DeleteBucketRequest\x1A\x16.google.protobuf.Empty\"\xF4\x01\x82\xD3\xE4\x93\x02\xED\x01*\$/v2/{name=*/*/locations/*/buckets/*}Z-*+/v2/{name=projects/*/locations/*/buckets/*}Z2*0/v2/{name=organizations/*/locations/*/buckets/*}Z,**/v2/{name=folders/*/locations/*/buckets/*}Z4*2/v2/{name=billingAccounts/*/locations/*/buckets/*}\x12\x85\x03\x0A\x0EUndeleteBucket\x12(.google.logging.v2.UndeleteBucketRequest\x1A\x16.google.protobuf.Empty\"\xB0\x02\x82\xD3\xE4\x93\x02\xA9\x02\"-/v2/{name=*/*/locations/*/buckets/*}:undelete:\x01*Z9\"4/v2/{name=projects/*/locations/*/buckets/*}:undelete:\x01*Z>\"9/v2/{name=organizations/*/locations/*/buckets/*}:undelete:\x01*Z8\"3/v2/{name=folders/*/locations/*/buckets/*}:undelete:\x01*Z@\";/v2/{name=billingAccounts/*/locations/*/buckets/*}:undelete:\x01*\x12\xFE\x02\x0A\x09ListViews\x12#.google.logging.v2.ListViewsRequest\x1A\$.google.logging.v2.ListViewsResponse\"\xA5\x02\xDAA\x06parent\x82\xD3\xE4\x93\x02\x95\x02\x12,/v2/{parent=*/*/locations/*/buckets/*}/viewsZ5\x123/v2/{parent=projects/*/locations/*/buckets/*}/viewsZ:\x128/v2/{parent=organizations/*/locations/*/buckets/*}/viewsZ4\x122/v2/{parent=folders/*/locations/*/buckets/*}/viewsZ<\x12:/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views\x12\xE7\x02\x0A\x07GetView\x12!.google.logging.v2.GetViewRequest\x1A\x1A.google.logging.v2.LogView\"\x9C\x02\x82\xD3\xE4\x93\x02\x95\x02\x12,/v2/{name=*/*/locations/*/buckets/*/views/*}Z5\x123/v2/{name=projects/*/locations/*/buckets/*/views/*}Z:\x128/v2/{name=organizations/*/locations/*/buckets/*/views/*}Z4\x122/v2/{name=folders/*/locations/*/buckets/*/views/*}Z<\x12:/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}\x12\x8B\x03\x0A\x0ACreateView\x12\$.google.logging.v2.CreateViewRequest\x1A\x1A.google.logging.v2.LogView\"\xBA\x02\x82\xD3\xE4\x93\x02\xB3\x02\",/v2/{parent=*/*/locations/*/buckets/*}/views:\x04viewZ;\"3/v2/{parent=projects/*/locations/*/buckets/*}/views:\x04viewZ@\"8/v2/{parent=organizations/*/locations/*/buckets/*}/views:\x04viewZ:\"2/v2/{parent=folders/*/locations/*/buckets/*}/views:\x04viewZB\":/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views:\x04view\x12\x8B\x03\x0A\x0AUpdateView\x12\$.google.logging.v2.UpdateViewRequest\x1A\x1A.google.logging.v2.LogView\"\xBA\x02\x82\xD3\xE4\x93\x02\xB3\x022,/v2/{name=*/*/locations/*/buckets/*/views/*}:\x04viewZ;23/v2/{name=projects/*/locations/*/buckets/*/views/*}:\x04viewZ@28/v2/{name=organizations/*/locations/*/buckets/*/views/*}:\x04viewZ:22/v2/{name=folders/*/locations/*/buckets/*/views/*}:\x04viewZB2:/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}:\x04view\x12\xE9\x02\x0A\x0ADeleteView\x12\$.google.logging.v2.DeleteViewRequest\x1A\x16.google.protobuf.Empty\"\x9C\x02\x82\xD3\xE4\x93\x02\x95\x02*,/v2/{name=*/*/locations/*/buckets/*/views/*}Z5*3/v2/{name=projects/*/locations/*/buckets/*/views/*}Z:*8/v2/{name=organizations/*/locations/*/buckets/*/views/*}Z4*2/v2/{name=folders/*/locations/*/buckets/*/views/*}Z<*:/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}\x12\x90\x02\x0A\x09ListSinks\x12#.google.logging.v2.ListSinksRequest\x1A\$.google.logging.v2.ListSinksResponse\"\xB7\x01\xDAA\x06parent\x82\xD3\xE4\x93\x02\xA7\x01\x12\x16/v2/{parent=*/*}/sinksZ\x1F\x12\x1D/v2/{parent=projects/*}/sinksZ\$\x12\"/v2/{parent=organizations/*}/sinksZ\x1E\x12\x1C/v2/{parent=folders/*}/sinksZ&\x12\$/v2/{parent=billingAccounts/*}/sinks\x12\x9E\x02\x0A\x07GetSink\x12!.google.logging.v2.GetSinkRequest\x1A\x1A.google.logging.v2.LogSink\"\xD3\x01\xDAA\x09sink_name\x82\xD3\xE4\x93\x02\xC0\x01\x12\x1B/v2/{sink_name=*/*/sinks/*}Z\$\x12\"/v2/{sink_name=projects/*/sinks/*}Z)\x12'/v2/{sink_name=organizations/*/sinks/*}Z#\x12!/v2/{sink_name=folders/*/sinks/*}Z+\x12)/v2/{sink_name=billingAccounts/*/sinks/*}\x12\xAB\x02\x0A\x0ACreateSink\x12\$.google.logging.v2.CreateSinkRequest\x1A\x1A.google.logging.v2.LogSink\"\xDA\x01\xDAA\x0Bparent,sink\x82\xD3\xE4\x93\x02\xC5\x01\"\x16/v2/{parent=*/*}/sinks:\x04sinkZ%\"\x1D/v2/{parent=projects/*}/sinks:\x04sinkZ*\"\"/v2/{parent=organizations/*}/sinks:\x04sinkZ\$\"\x1C/v2/{parent=folders/*}/sinks:\x04sinkZ,\"\$/v2/{parent=billingAccounts/*}/sinks:\x04sink\x12\x9F\x04\x0A\x0AUpdateSink\x12\$.google.logging.v2.UpdateSinkRequest\x1A\x1A.google.logging.v2.LogSink\"\xCE\x03\xDAA\x1Asink_name,sink,update_mask\xDAA\x0Esink_name,sink\x82\xD3\xE4\x93\x02\x99\x03\x1A\x1B/v2/{sink_name=*/*/sinks/*}:\x04sinkZ*\x1A\"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/\x1A'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)\x1A!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ1\x1A)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sinkZ*2\"/v2/{sink_name=projects/*/sinks/*}:\x04sinkZ/2'/v2/{sink_name=organizations/*/sinks/*}:\x04sinkZ)2!/v2/{sink_name=folders/*/sinks/*}:\x04sinkZ12)/v2/{sink_name=billingAccounts/*/sinks/*}:\x04sink\x12\xA0\x02\x0A\x0ADeleteSink\x12\$.google.logging.v2.DeleteSinkRequest\x1A\x16.google.protobuf.Empty\"\xD3\x01\xDAA\x09sink_name\x82\xD3\xE4\x93\x02\xC0\x01*\x1B/v2/{sink_name=*/*/sinks/*}Z\$*\"/v2/{sink_name=projects/*/sinks/*}Z)*'/v2/{sink_name=organizations/*/sinks/*}Z#*!/v2/{sink_name=folders/*/sinks/*}Z+*)/v2/{sink_name=billingAccounts/*/sinks/*}\x12\xBB\x03\x0A\x0ACreateLink\x12\$.google.logging.v2.CreateLinkRequest\x1A\x1D.google.longrunning.Operation\"\xE7\x02\xCAA\x14\x0A\x04Link\x12\x0CLinkMetadata\xDAA\x13parent,link,link_id\x82\xD3\xE4\x93\x02\xB3\x02\",/v2/{parent=*/*/locations/*/buckets/*}/links:\x04linkZ;\"3/v2/{parent=projects/*/locations/*/buckets/*}/links:\x04linkZ@\"8/v2/{parent=organizations/*/locations/*/buckets/*}/links:\x04linkZ:\"2/v2/{parent=folders/*/locations/*/buckets/*}/links:\x04linkZB\":/v2/{parent=billingAccounts/*/locations/*/buckets/*}/links:\x04link\x12\x9F\x03\x0A\x0ADeleteLink\x12\$.google.logging.v2.DeleteLinkRequest\x1A\x1D.google.longrunning.Operation\"\xCB\x02\xCAA%\x0A\x15google.protobuf.Empty\x12\x0CLinkMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02\x95\x02*,/v2/{name=*/*/locations/*/buckets/*/links/*}Z5*3/v2/{name=projects/*/locations/*/buckets/*/links/*}Z:*8/v2/{name=organizations/*/locations/*/buckets/*/links/*}Z4*2/v2/{name=folders/*/locations/*/buckets/*/links/*}Z<*:/v2/{name=billingAccounts/*/locations/*/buckets/*/links/*}\x12\xFE\x02\x0A\x09ListLinks\x12#.google.logging.v2.ListLinksRequest\x1A\$.google.logging.v2.ListLinksResponse\"\xA5\x02\xDAA\x06parent\x82\xD3\xE4\x93\x02\x95\x02\x12,/v2/{parent=*/*/locations/*/buckets/*}/linksZ5\x123/v2/{parent=projects/*/locations/*/buckets/*}/linksZ:\x128/v2/{parent=organizations/*/locations/*/buckets/*}/linksZ4\x122/v2/{parent=folders/*/locations/*/buckets/*}/linksZ<\x12:/v2/{parent=billingAccounts/*/locations/*/buckets/*}/links\x12\xEB\x02\x0A\x07GetLink\x12!.google.logging.v2.GetLinkRequest\x1A\x17.google.logging.v2.Link\"\xA3\x02\xDAA\x04name\x82\xD3\xE4\x93\x02\x95\x02\x12,/v2/{name=*/*/locations/*/buckets/*/links/*}Z5\x123/v2/{name=projects/*/locations/*/buckets/*/links/*}Z:\x128/v2/{name=organizations/*/locations/*/buckets/*/links/*}Z4\x122/v2/{name=folders/*/locations/*/buckets/*/links/*}Z<\x12:/v2/{name=billingAccounts/*/locations/*/buckets/*/links/*}\x12\xB8\x02\x0A\x0EListExclusions\x12(.google.logging.v2.ListExclusionsRequest\x1A).google.logging.v2.ListExclusionsResponse\"\xD0\x01\xDAA\x06parent\x82\xD3\xE4\x93\x02\xC0\x01\x12\x1B/v2/{parent=*/*}/exclusionsZ\$\x12\"/v2/{parent=projects/*}/exclusionsZ)\x12'/v2/{parent=organizations/*}/exclusionsZ#\x12!/v2/{parent=folders/*}/exclusionsZ+\x12)/v2/{parent=billingAccounts/*}/exclusions\x12\xA8\x02\x0A\x0CGetExclusion\x12&.google.logging.v2.GetExclusionRequest\x1A\x1F.google.logging.v2.LogExclusion\"\xCE\x01\xDAA\x04name\x82\xD3\xE4\x93\x02\xC0\x01\x12\x1B/v2/{name=*/*/exclusions/*}Z\$\x12\"/v2/{name=projects/*/exclusions/*}Z)\x12'/v2/{name=organizations/*/exclusions/*}Z#\x12!/v2/{name=folders/*/exclusions/*}Z+\x12)/v2/{name=billingAccounts/*/exclusions/*}\x12\xF1\x02\x0A\x0FCreateExclusion\x12).google.logging.v2.CreateExclusionRequest\x1A\x1F.google.logging.v2.LogExclusion\"\x91\x02\xDAA\x10parent,exclusion\x82\xD3\xE4\x93\x02\xF7\x01\"\x1B/v2/{parent=*/*}/exclusions:\x09exclusionZ/\"\"/v2/{parent=projects/*}/exclusions:\x09exclusionZ4\"'/v2/{parent=organizations/*}/exclusions:\x09exclusionZ.\"!/v2/{parent=folders/*}/exclusions:\x09exclusionZ6\")/v2/{parent=billingAccounts/*}/exclusions:\x09exclusion\x12\xFB\x02\x0A\x0FUpdateExclusion\x12).google.logging.v2.UpdateExclusionRequest\x1A\x1F.google.logging.v2.LogExclusion\"\x9B\x02\xDAA\x1Aname,exclusion,update_mask\x82\xD3\xE4\x93\x02\xF7\x012\x1B/v2/{name=*/*/exclusions/*}:\x09exclusionZ/2\"/v2/{name=projects/*/exclusions/*}:\x09exclusionZ42'/v2/{name=organizations/*/exclusions/*}:\x09exclusionZ.2!/v2/{name=folders/*/exclusions/*}:\x09exclusionZ62)/v2/{name=billingAccounts/*/exclusions/*}:\x09exclusion\x12\xA5\x02\x0A\x0FDeleteExclusion\x12).google.logging.v2.DeleteExclusionRequest\x1A\x16.google.protobuf.Empty\"\xCE\x01\xDAA\x04name\x82\xD3\xE4\x93\x02\xC0\x01*\x1B/v2/{name=*/*/exclusions/*}Z\$*\"/v2/{name=projects/*/exclusions/*}Z)*'/v2/{name=organizations/*/exclusions/*}Z#*!/v2/{name=folders/*/exclusions/*}Z+*)/v2/{name=billingAccounts/*/exclusions/*}\x12\xA7\x02\x0A\x0FGetCmekSettings\x12).google.logging.v2.GetCmekSettingsRequest\x1A\x1F.google.logging.v2.CmekSettings\"\xC7\x01\x82\xD3\xE4\x93\x02\xC0\x01\x12\x1B/v2/{name=*/*}/cmekSettingsZ\$\x12\"/v2/{name=projects/*}/cmekSettingsZ)\x12'/v2/{name=organizations/*}/cmekSettingsZ#\x12!/v2/{name=folders/*}/cmekSettingsZ+\x12)/v2/{name=billingAccounts/*}/cmekSettings\x12\xD1\x01\x0A\x12UpdateCmekSettings\x12,.google.logging.v2.UpdateCmekSettingsRequest\x1A\x1F.google.logging.v2.CmekSettings\"l\x82\xD3\xE4\x93\x02f2\x1B/v2/{name=*/*}/cmekSettings:\x0Dcmek_settingsZ82'/v2/{name=organizations/*}/cmekSettings:\x0Dcmek_settings\x12\x8E\x02\x0A\x0BGetSettings\x12%.google.logging.v2.GetSettingsRequest\x1A\x1B.google.logging.v2.Settings\"\xBA\x01\xDAA\x04name\x82\xD3\xE4\x93\x02\xAC\x01\x12\x17/v2/{name=*/*}/settingsZ \x12\x1E/v2/{name=projects/*}/settingsZ%\x12#/v2/{name=organizations/*}/settingsZ\x1F\x12\x1D/v2/{name=folders/*}/settingsZ'\x12%/v2/{name=billingAccounts/*}/settings\x12\xF6\x01\x0A\x0EUpdateSettings\x12(.google.logging.v2.UpdateSettingsRequest\x1A\x1B.google.logging.v2.Settings\"\x9C\x01\xDAA\x14settings,update_mask\x82\xD3\xE4\x93\x02\x7F2\x17/v2/{name=*/*}/settings:\x08settingsZ/2#/v2/{name=organizations/*}/settings:\x08settingsZ)2\x1D/v2/{name=folders/*}/settings:\x08settings\x12\xA9\x01\x0A\x0ECopyLogEntries\x12(.google.logging.v2.CopyLogEntriesRequest\x1A\x1D.google.longrunning.Operation\"N\xCAA0\x0A\x16CopyLogEntriesResponse\x12\x16CopyLogEntriesMetadata\x82\xD3\xE4\x93\x02\x15\"\x10/v2/entries:copy:\x01*\x1A\xDF\x01\xCAA\x16logging.googleapis.com\xD2A\xC2\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.readB\xD6\x03\x0A\x15com.google.logging.v2B\x12LoggingConfigProtoP\x01Z5cloud.google.com/go/logging/apiv2/loggingpb;loggingpb\xF8\x01\x01\xAA\x02\x17Google.Cloud.Logging.V2\xCA\x02\x17Google\\Cloud\\Logging\\V2\xEA\x02\x1AGoogle::Cloud::Logging::V2\xEAA`\x0A+logging.googleapis.com/OrganizationLocation\x121organizations/{organization}/locations/{location}\xEAAN\x0A%logging.googleapis.com/FolderLocation\x12%folders/{folder}/locations/{location}\xEAAg\x0A-logging.googleapis.com/BillingAccountLocation\x126billingAccounts/{billing_account}/locations/{location}b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingMetrics.php b/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingMetrics.php deleted file mode 100644 index c655d08fd1cb..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/GPBMetadata/Google/Logging/V2/LoggingMetrics.php +++ /dev/null @@ -1,32 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xF2\x16\x0A'google/logging/v2/logging_metrics.proto\x12\x11google.logging.v2\x1A\x17google/api/client.proto\x1A\x1Dgoogle/api/distribution.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x17google/api/metric.proto\x1A\x19google/api/resource.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xBD\x05\x0A\x09LogMetric\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x03 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bbucket_name\x18\x0D \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08disabled\x18\x0C \x01(\x08B\x03\xE0A\x01\x12<\x0A\x11metric_descriptor\x18\x05 \x01(\x0B2\x1C.google.api.MetricDescriptorB\x03\xE0A\x01\x12\x1C\x0A\x0Fvalue_extractor\x18\x06 \x01(\x09B\x03\xE0A\x01\x12P\x0A\x10label_extractors\x18\x07 \x03(\x0B21.google.logging.v2.LogMetric.LabelExtractorsEntryB\x03\xE0A\x01\x12C\x0A\x0Ebucket_options\x18\x08 \x01(\x0B2&.google.api.Distribution.BucketOptionsB\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x09 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x0A \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12<\x0A\x07version\x18\x04 \x01(\x0E2'.google.logging.v2.LogMetric.ApiVersionB\x02\x18\x01\x1A6\x0A\x14LabelExtractorsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\x1C\x0A\x0AApiVersion\x12\x06\x0A\x02V2\x10\x00\x12\x06\x0A\x02V1\x10\x01:J\xEAAG\x0A logging.googleapis.com/LogMetric\x12#projects/{project}/metrics/{metric}\"\x8D\x01\x0A\x15ListLogMetricsRequest\x12C\x0A\x06parent\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+cloudresourcemanager.googleapis.com/Project\x12\x17\x0A\x0Apage_token\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\"`\x0A\x16ListLogMetricsResponse\x12-\x0A\x07metrics\x18\x01 \x03(\x0B2\x1C.google.logging.v2.LogMetric\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"T\x0A\x13GetLogMetricRequest\x12=\x0A\x0Bmetric_name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A logging.googleapis.com/LogMetric\"\x85\x01\x0A\x16CreateLogMetricRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 logging.googleapis.com/LogMetric\x121\x0A\x06metric\x18\x02 \x01(\x0B2\x1C.google.logging.v2.LogMetricB\x03\xE0A\x02\"\x8A\x01\x0A\x16UpdateLogMetricRequest\x12=\x0A\x0Bmetric_name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A logging.googleapis.com/LogMetric\x121\x0A\x06metric\x18\x02 \x01(\x0B2\x1C.google.logging.v2.LogMetricB\x03\xE0A\x02\"W\x0A\x16DeleteLogMetricRequest\x12=\x0A\x0Bmetric_name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A logging.googleapis.com/LogMetric2\xAE\x08\x0A\x10MetricsServiceV2\x12\x97\x01\x0A\x0EListLogMetrics\x12(.google.logging.v2.ListLogMetricsRequest\x1A).google.logging.v2.ListLogMetricsResponse\"0\xDAA\x06parent\x82\xD3\xE4\x93\x02!\x12\x1F/v2/{parent=projects/*}/metrics\x12\x92\x01\x0A\x0CGetLogMetric\x12&.google.logging.v2.GetLogMetricRequest\x1A\x1C.google.logging.v2.LogMetric\"<\xDAA\x0Bmetric_name\x82\xD3\xE4\x93\x02(\x12&/v2/{metric_name=projects/*/metrics/*}\x12\x9B\x01\x0A\x0FCreateLogMetric\x12).google.logging.v2.CreateLogMetricRequest\x1A\x1C.google.logging.v2.LogMetric\"?\xDAA\x0Dparent,metric\x82\xD3\xE4\x93\x02)\"\x1F/v2/{parent=projects/*}/metrics:\x06metric\x12\xA7\x01\x0A\x0FUpdateLogMetric\x12).google.logging.v2.UpdateLogMetricRequest\x1A\x1C.google.logging.v2.LogMetric\"K\xDAA\x12metric_name,metric\x82\xD3\xE4\x93\x020\x1A&/v2/{metric_name=projects/*/metrics/*}:\x06metric\x12\x92\x01\x0A\x0FDeleteLogMetric\x12).google.logging.v2.DeleteLogMetricRequest\x1A\x16.google.protobuf.Empty\"<\xDAA\x0Bmetric_name\x82\xD3\xE4\x93\x02(*&/v2/{metric_name=projects/*/metrics/*}\x1A\x8D\x02\xCAA\x16logging.googleapis.com\xD2A\xF0\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/cloud-platform.read-only,https://www.googleapis.com/auth/logging.admin,https://www.googleapis.com/auth/logging.read,https://www.googleapis.com/auth/logging.writeB\xB9\x01\x0A\x15com.google.logging.v2B\x13LoggingMetricsProtoP\x01Z5cloud.google.com/go/logging/apiv2/loggingpb;loggingpb\xF8\x01\x01\xAA\x02\x17Google.Cloud.Logging.V2\xCA\x02\x17Google\\Cloud\\Logging\\V2\xEA\x02\x1AGoogle::Cloud::Logging::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryDataset.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryDataset.php deleted file mode 100644 index 58ce65ad5a03..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryDataset.php +++ /dev/null @@ -1,87 +0,0 @@ -google.logging.v2.BigQueryDataset - */ -class BigQueryDataset extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The full resource name of the BigQuery dataset. The DATASET_ID - * will match the ID of the link, so the link must match the naming - * restrictions of BigQuery datasets (alphanumeric characters and underscores - * only). - * The dataset will have a resource path of - * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET_ID]" - * - * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $dataset_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $dataset_id - * Output only. The full resource name of the BigQuery dataset. The DATASET_ID - * will match the ID of the link, so the link must match the naming - * restrictions of BigQuery datasets (alphanumeric characters and underscores - * only). - * The dataset will have a resource path of - * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET_ID]" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The full resource name of the BigQuery dataset. The DATASET_ID - * will match the ID of the link, so the link must match the naming - * restrictions of BigQuery datasets (alphanumeric characters and underscores - * only). - * The dataset will have a resource path of - * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET_ID]" - * - * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDatasetId() - { - return $this->dataset_id; - } - - /** - * Output only. The full resource name of the BigQuery dataset. The DATASET_ID - * will match the ID of the link, so the link must match the naming - * restrictions of BigQuery datasets (alphanumeric characters and underscores - * only). - * The dataset will have a resource path of - * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET_ID]" - * - * Generated from protobuf field string dataset_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDatasetId($var) - { - GPBUtil::checkString($var, True); - $this->dataset_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryOptions.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryOptions.php deleted file mode 100644 index b1abb2c802b6..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BigQueryOptions.php +++ /dev/null @@ -1,149 +0,0 @@ -google.logging.v2.BigQueryOptions - */ -class BigQueryOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Whether to use [BigQuery's partition - * tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By - * default, Cloud Logging creates dated tables based on the log entries' - * timestamps, e.g. syslog_20170523. With partitioned tables the date suffix - * is no longer present and [special query - * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) - * has to be used instead. In both cases, tables are sharded based on UTC - * timezone. - * - * Generated from protobuf field bool use_partitioned_tables = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $use_partitioned_tables = false; - /** - * Output only. True if new timestamp column based partitioning is in use, - * false if legacy ingestion-time partitioning is in use. - * All new sinks will have this field set true and will use timestamp column - * based partitioning. If use_partitioned_tables is false, this value has no - * meaning and will be false. Legacy sinks using partitioned tables will have - * this field set to false. - * - * Generated from protobuf field bool uses_timestamp_column_partitioning = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uses_timestamp_column_partitioning = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $use_partitioned_tables - * Optional. Whether to use [BigQuery's partition - * tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By - * default, Cloud Logging creates dated tables based on the log entries' - * timestamps, e.g. syslog_20170523. With partitioned tables the date suffix - * is no longer present and [special query - * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) - * has to be used instead. In both cases, tables are sharded based on UTC - * timezone. - * @type bool $uses_timestamp_column_partitioning - * Output only. True if new timestamp column based partitioning is in use, - * false if legacy ingestion-time partitioning is in use. - * All new sinks will have this field set true and will use timestamp column - * based partitioning. If use_partitioned_tables is false, this value has no - * meaning and will be false. Legacy sinks using partitioned tables will have - * this field set to false. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Whether to use [BigQuery's partition - * tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By - * default, Cloud Logging creates dated tables based on the log entries' - * timestamps, e.g. syslog_20170523. With partitioned tables the date suffix - * is no longer present and [special query - * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) - * has to be used instead. In both cases, tables are sharded based on UTC - * timezone. - * - * Generated from protobuf field bool use_partitioned_tables = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getUsePartitionedTables() - { - return $this->use_partitioned_tables; - } - - /** - * Optional. Whether to use [BigQuery's partition - * tables](https://cloud.google.com/bigquery/docs/partitioned-tables). By - * default, Cloud Logging creates dated tables based on the log entries' - * timestamps, e.g. syslog_20170523. With partitioned tables the date suffix - * is no longer present and [special query - * syntax](https://cloud.google.com/bigquery/docs/querying-partitioned-tables) - * has to be used instead. In both cases, tables are sharded based on UTC - * timezone. - * - * Generated from protobuf field bool use_partitioned_tables = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setUsePartitionedTables($var) - { - GPBUtil::checkBool($var); - $this->use_partitioned_tables = $var; - - return $this; - } - - /** - * Output only. True if new timestamp column based partitioning is in use, - * false if legacy ingestion-time partitioning is in use. - * All new sinks will have this field set true and will use timestamp column - * based partitioning. If use_partitioned_tables is false, this value has no - * meaning and will be false. Legacy sinks using partitioned tables will have - * this field set to false. - * - * Generated from protobuf field bool uses_timestamp_column_partitioning = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getUsesTimestampColumnPartitioning() - { - return $this->uses_timestamp_column_partitioning; - } - - /** - * Output only. True if new timestamp column based partitioning is in use, - * false if legacy ingestion-time partitioning is in use. - * All new sinks will have this field set true and will use timestamp column - * based partitioning. If use_partitioned_tables is false, this value has no - * meaning and will be false. Legacy sinks using partitioned tables will have - * this field set to false. - * - * Generated from protobuf field bool uses_timestamp_column_partitioning = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setUsesTimestampColumnPartitioning($var) - { - GPBUtil::checkBool($var); - $this->uses_timestamp_column_partitioning = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BucketMetadata.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BucketMetadata.php deleted file mode 100644 index 2c689587cea9..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/BucketMetadata.php +++ /dev/null @@ -1,230 +0,0 @@ -google.logging.v2.BucketMetadata - */ -class BucketMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The create time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The end time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * State of an operation. - * - * Generated from protobuf field .google.logging.v2.OperationState state = 3; - */ - protected $state = 0; - protected $request; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The create time of an operation. - * @type \Google\Protobuf\Timestamp $end_time - * The end time of an operation. - * @type int $state - * State of an operation. - * @type \Google\Cloud\Logging\V2\CreateBucketRequest $create_bucket_request - * LongRunningCreateBucket RPC request. - * @type \Google\Cloud\Logging\V2\UpdateBucketRequest $update_bucket_request - * LongRunningUpdateBucket RPC request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * The create time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The create time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The end time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The end time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * State of an operation. - * - * Generated from protobuf field .google.logging.v2.OperationState state = 3; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * State of an operation. - * - * Generated from protobuf field .google.logging.v2.OperationState state = 3; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * LongRunningCreateBucket RPC request. - * - * Generated from protobuf field .google.logging.v2.CreateBucketRequest create_bucket_request = 4; - * @return \Google\Cloud\Logging\V2\CreateBucketRequest|null - */ - public function getCreateBucketRequest() - { - return $this->readOneof(4); - } - - public function hasCreateBucketRequest() - { - return $this->hasOneof(4); - } - - /** - * LongRunningCreateBucket RPC request. - * - * Generated from protobuf field .google.logging.v2.CreateBucketRequest create_bucket_request = 4; - * @param \Google\Cloud\Logging\V2\CreateBucketRequest $var - * @return $this - */ - public function setCreateBucketRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\CreateBucketRequest::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * LongRunningUpdateBucket RPC request. - * - * Generated from protobuf field .google.logging.v2.UpdateBucketRequest update_bucket_request = 5; - * @return \Google\Cloud\Logging\V2\UpdateBucketRequest|null - */ - public function getUpdateBucketRequest() - { - return $this->readOneof(5); - } - - public function hasUpdateBucketRequest() - { - return $this->hasOneof(5); - } - - /** - * LongRunningUpdateBucket RPC request. - * - * Generated from protobuf field .google.logging.v2.UpdateBucketRequest update_bucket_request = 5; - * @param \Google\Cloud\Logging\V2\UpdateBucketRequest $var - * @return $this - */ - public function setUpdateBucketRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\UpdateBucketRequest::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getRequest() - { - return $this->whichOneof("request"); - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CmekSettings.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CmekSettings.php deleted file mode 100644 index 77f5f44951ad..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CmekSettings.php +++ /dev/null @@ -1,320 +0,0 @@ -google.logging.v2.CmekSettings - */ -class CmekSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the CMEK settings. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * The resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - * To enable CMEK for the Log Router, set this field to a valid - * `kms_key_name` for which the associated service account has the required - * cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. - * The Cloud KMS key used by the Log Router can be updated by changing the - * `kms_key_name` to a new valid key name or disabled by setting the key name - * to an empty string. Encryption operations that are in progress will be - * completed with the key that was in use when they started. Decryption - * operations will be completed using the key that was used at the time of - * encryption unless access to that key has been revoked. - * To disable CMEK for the Log Router, set this field to an empty string. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string kms_key_name = 2; - */ - protected $kms_key_name = ''; - /** - * The CryptoKeyVersion resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"` - * This is a read-only field used to convey the specific configured - * CryptoKeyVersion of `kms_key` that has been configured. It will be - * populated in cases where the CMEK settings are bound to a single key - * version. - * If this field is populated, the `kms_key` is tied to a specific - * CryptoKeyVersion. - * - * Generated from protobuf field string kms_key_version_name = 4; - */ - protected $kms_key_version_name = ''; - /** - * Output only. The service account that will be used by the Log Router to - * access your Cloud KMS key. - * Before enabling CMEK for Log Router, you must first assign the - * cloudkms.cryptoKeyEncrypterDecrypter role to the service account that - * the Log Router will use to access your Cloud KMS key. Use - * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to - * obtain the service account ID. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $service_account_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the CMEK settings. - * @type string $kms_key_name - * The resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - * To enable CMEK for the Log Router, set this field to a valid - * `kms_key_name` for which the associated service account has the required - * cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. - * The Cloud KMS key used by the Log Router can be updated by changing the - * `kms_key_name` to a new valid key name or disabled by setting the key name - * to an empty string. Encryption operations that are in progress will be - * completed with the key that was in use when they started. Decryption - * operations will be completed using the key that was used at the time of - * encryption unless access to that key has been revoked. - * To disable CMEK for the Log Router, set this field to an empty string. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * @type string $kms_key_version_name - * The CryptoKeyVersion resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"` - * This is a read-only field used to convey the specific configured - * CryptoKeyVersion of `kms_key` that has been configured. It will be - * populated in cases where the CMEK settings are bound to a single key - * version. - * If this field is populated, the `kms_key` is tied to a specific - * CryptoKeyVersion. - * @type string $service_account_id - * Output only. The service account that will be used by the Log Router to - * access your Cloud KMS key. - * Before enabling CMEK for Log Router, you must first assign the - * cloudkms.cryptoKeyEncrypterDecrypter role to the service account that - * the Log Router will use to access your Cloud KMS key. Use - * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to - * obtain the service account ID. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the CMEK settings. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the CMEK settings. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - * To enable CMEK for the Log Router, set this field to a valid - * `kms_key_name` for which the associated service account has the required - * cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. - * The Cloud KMS key used by the Log Router can be updated by changing the - * `kms_key_name` to a new valid key name or disabled by setting the key name - * to an empty string. Encryption operations that are in progress will be - * completed with the key that was in use when they started. Decryption - * operations will be completed using the key that was used at the time of - * encryption unless access to that key has been revoked. - * To disable CMEK for the Log Router, set this field to an empty string. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string kms_key_name = 2; - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * The resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - * To enable CMEK for the Log Router, set this field to a valid - * `kms_key_name` for which the associated service account has the required - * cloudkms.cryptoKeyEncrypterDecrypter roles assigned for the key. - * The Cloud KMS key used by the Log Router can be updated by changing the - * `kms_key_name` to a new valid key name or disabled by setting the key name - * to an empty string. Encryption operations that are in progress will be - * completed with the key that was in use when they started. Decryption - * operations will be completed using the key that was used at the time of - * encryption unless access to that key has been revoked. - * To disable CMEK for the Log Router, set this field to an empty string. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string kms_key_name = 2; - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - - /** - * The CryptoKeyVersion resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"` - * This is a read-only field used to convey the specific configured - * CryptoKeyVersion of `kms_key` that has been configured. It will be - * populated in cases where the CMEK settings are bound to a single key - * version. - * If this field is populated, the `kms_key` is tied to a specific - * CryptoKeyVersion. - * - * Generated from protobuf field string kms_key_version_name = 4; - * @return string - */ - public function getKmsKeyVersionName() - { - return $this->kms_key_version_name; - } - - /** - * The CryptoKeyVersion resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]/cryptoKeyVersions/[VERSION]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key/cryptoKeyVersions/1"` - * This is a read-only field used to convey the specific configured - * CryptoKeyVersion of `kms_key` that has been configured. It will be - * populated in cases where the CMEK settings are bound to a single key - * version. - * If this field is populated, the `kms_key` is tied to a specific - * CryptoKeyVersion. - * - * Generated from protobuf field string kms_key_version_name = 4; - * @param string $var - * @return $this - */ - public function setKmsKeyVersionName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_version_name = $var; - - return $this; - } - - /** - * Output only. The service account that will be used by the Log Router to - * access your Cloud KMS key. - * Before enabling CMEK for Log Router, you must first assign the - * cloudkms.cryptoKeyEncrypterDecrypter role to the service account that - * the Log Router will use to access your Cloud KMS key. Use - * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to - * obtain the service account ID. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getServiceAccountId() - { - return $this->service_account_id; - } - - /** - * Output only. The service account that will be used by the Log Router to - * access your Cloud KMS key. - * Before enabling CMEK for Log Router, you must first assign the - * cloudkms.cryptoKeyEncrypterDecrypter role to the service account that - * the Log Router will use to access your Cloud KMS key. Use - * [GetCmekSettings][google.logging.v2.ConfigServiceV2.GetCmekSettings] to - * obtain the service account ID. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setServiceAccountId($var) - { - GPBUtil::checkString($var, True); - $this->service_account_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesMetadata.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesMetadata.php deleted file mode 100644 index 3cbc7be428a6..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesMetadata.php +++ /dev/null @@ -1,317 +0,0 @@ -google.logging.v2.CopyLogEntriesMetadata - */ -class CopyLogEntriesMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The create time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The end time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * State of an operation. - * - * Generated from protobuf field .google.logging.v2.OperationState state = 3; - */ - protected $state = 0; - /** - * Identifies whether the user has requested cancellation of the operation. - * - * Generated from protobuf field bool cancellation_requested = 4; - */ - protected $cancellation_requested = false; - /** - * CopyLogEntries RPC request. - * - * Generated from protobuf field .google.logging.v2.CopyLogEntriesRequest request = 5; - */ - protected $request = null; - /** - * Estimated progress of the operation (0 - 100%). - * - * Generated from protobuf field int32 progress = 6; - */ - protected $progress = 0; - /** - * The IAM identity of a service account that must be granted access to the - * destination. - * If the service account is not granted permission to the destination within - * an hour, the operation will be cancelled. - * For example: `"serviceAccount:foo\@bar.com"` - * - * Generated from protobuf field string writer_identity = 7; - */ - protected $writer_identity = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The create time of an operation. - * @type \Google\Protobuf\Timestamp $end_time - * The end time of an operation. - * @type int $state - * State of an operation. - * @type bool $cancellation_requested - * Identifies whether the user has requested cancellation of the operation. - * @type \Google\Cloud\Logging\V2\CopyLogEntriesRequest $request - * CopyLogEntries RPC request. - * @type int $progress - * Estimated progress of the operation (0 - 100%). - * @type string $writer_identity - * The IAM identity of a service account that must be granted access to the - * destination. - * If the service account is not granted permission to the destination within - * an hour, the operation will be cancelled. - * For example: `"serviceAccount:foo\@bar.com"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * The create time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The create time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The end time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The end time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * State of an operation. - * - * Generated from protobuf field .google.logging.v2.OperationState state = 3; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * State of an operation. - * - * Generated from protobuf field .google.logging.v2.OperationState state = 3; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * Identifies whether the user has requested cancellation of the operation. - * - * Generated from protobuf field bool cancellation_requested = 4; - * @return bool - */ - public function getCancellationRequested() - { - return $this->cancellation_requested; - } - - /** - * Identifies whether the user has requested cancellation of the operation. - * - * Generated from protobuf field bool cancellation_requested = 4; - * @param bool $var - * @return $this - */ - public function setCancellationRequested($var) - { - GPBUtil::checkBool($var); - $this->cancellation_requested = $var; - - return $this; - } - - /** - * CopyLogEntries RPC request. - * - * Generated from protobuf field .google.logging.v2.CopyLogEntriesRequest request = 5; - * @return \Google\Cloud\Logging\V2\CopyLogEntriesRequest|null - */ - public function getRequest() - { - return $this->request; - } - - public function hasRequest() - { - return isset($this->request); - } - - public function clearRequest() - { - unset($this->request); - } - - /** - * CopyLogEntries RPC request. - * - * Generated from protobuf field .google.logging.v2.CopyLogEntriesRequest request = 5; - * @param \Google\Cloud\Logging\V2\CopyLogEntriesRequest $var - * @return $this - */ - public function setRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\CopyLogEntriesRequest::class); - $this->request = $var; - - return $this; - } - - /** - * Estimated progress of the operation (0 - 100%). - * - * Generated from protobuf field int32 progress = 6; - * @return int - */ - public function getProgress() - { - return $this->progress; - } - - /** - * Estimated progress of the operation (0 - 100%). - * - * Generated from protobuf field int32 progress = 6; - * @param int $var - * @return $this - */ - public function setProgress($var) - { - GPBUtil::checkInt32($var); - $this->progress = $var; - - return $this; - } - - /** - * The IAM identity of a service account that must be granted access to the - * destination. - * If the service account is not granted permission to the destination within - * an hour, the operation will be cancelled. - * For example: `"serviceAccount:foo\@bar.com"` - * - * Generated from protobuf field string writer_identity = 7; - * @return string - */ - public function getWriterIdentity() - { - return $this->writer_identity; - } - - /** - * The IAM identity of a service account that must be granted access to the - * destination. - * If the service account is not granted permission to the destination within - * an hour, the operation will be cancelled. - * For example: `"serviceAccount:foo\@bar.com"` - * - * Generated from protobuf field string writer_identity = 7; - * @param string $var - * @return $this - */ - public function setWriterIdentity($var) - { - GPBUtil::checkString($var, True); - $this->writer_identity = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesRequest.php deleted file mode 100644 index 613c80228067..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesRequest.php +++ /dev/null @@ -1,147 +0,0 @@ -google.logging.v2.CopyLogEntriesRequest - */ -class CopyLogEntriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Log bucket from which to copy log entries. - * For example: - * `"projects/my-project/locations/global/buckets/my-source-bucket"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. A filter specifying which log entries to copy. The filter must be - * no more than 20k characters. An empty filter matches all log entries. - * - * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Required. Destination to which to copy log entries. - * - * Generated from protobuf field string destination = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $destination = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Log bucket from which to copy log entries. - * For example: - * `"projects/my-project/locations/global/buckets/my-source-bucket"` - * @type string $filter - * Optional. A filter specifying which log entries to copy. The filter must be - * no more than 20k characters. An empty filter matches all log entries. - * @type string $destination - * Required. Destination to which to copy log entries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. Log bucket from which to copy log entries. - * For example: - * `"projects/my-project/locations/global/buckets/my-source-bucket"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Log bucket from which to copy log entries. - * For example: - * `"projects/my-project/locations/global/buckets/my-source-bucket"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A filter specifying which log entries to copy. The filter must be - * no more than 20k characters. An empty filter matches all log entries. - * - * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A filter specifying which log entries to copy. The filter must be - * no more than 20k characters. An empty filter matches all log entries. - * - * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Required. Destination to which to copy log entries. - * - * Generated from protobuf field string destination = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDestination() - { - return $this->destination; - } - - /** - * Required. Destination to which to copy log entries. - * - * Generated from protobuf field string destination = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDestination($var) - { - GPBUtil::checkString($var, True); - $this->destination = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesResponse.php deleted file mode 100644 index ae22ce9d52d6..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CopyLogEntriesResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.logging.v2.CopyLogEntriesResponse - */ -class CopyLogEntriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Number of log entries copied. - * - * Generated from protobuf field int64 log_entries_copied_count = 1; - */ - protected $log_entries_copied_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $log_entries_copied_count - * Number of log entries copied. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Number of log entries copied. - * - * Generated from protobuf field int64 log_entries_copied_count = 1; - * @return int|string - */ - public function getLogEntriesCopiedCount() - { - return $this->log_entries_copied_count; - } - - /** - * Number of log entries copied. - * - * Generated from protobuf field int64 log_entries_copied_count = 1; - * @param int|string $var - * @return $this - */ - public function setLogEntriesCopiedCount($var) - { - GPBUtil::checkInt64($var); - $this->log_entries_copied_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateBucketRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateBucketRequest.php deleted file mode 100644 index f9fe4976cfed..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateBucketRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.logging.v2.CreateBucketRequest - */ -class CreateBucketRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource in which to create the log bucket: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * For example: - * `"projects/my-project/locations/global"` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers - * are limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. - * - * Generated from protobuf field string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bucket_id = ''; - /** - * Required. The new bucket. The region specified in the new bucket must be - * compliant with any Location Restriction Org Policy. The name field in the - * bucket is ignored. - * - * Generated from protobuf field .google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bucket = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource in which to create the log bucket: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * For example: - * `"projects/my-project/locations/global"` - * @type string $bucket_id - * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers - * are limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. - * @type \Google\Cloud\Logging\V2\LogBucket $bucket - * Required. The new bucket. The region specified in the new bucket must be - * compliant with any Location Restriction Org Policy. The name field in the - * bucket is ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource in which to create the log bucket: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * For example: - * `"projects/my-project/locations/global"` - * - * 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 resource in which to create the log bucket: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * For example: - * `"projects/my-project/locations/global"` - * - * 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. A client-assigned identifier such as `"my-bucket"`. Identifiers - * are limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. - * - * Generated from protobuf field string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getBucketId() - { - return $this->bucket_id; - } - - /** - * Required. A client-assigned identifier such as `"my-bucket"`. Identifiers - * are limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. - * - * Generated from protobuf field string bucket_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setBucketId($var) - { - GPBUtil::checkString($var, True); - $this->bucket_id = $var; - - return $this; - } - - /** - * Required. The new bucket. The region specified in the new bucket must be - * compliant with any Location Restriction Org Policy. The name field in the - * bucket is ignored. - * - * Generated from protobuf field .google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogBucket|null - */ - public function getBucket() - { - return $this->bucket; - } - - public function hasBucket() - { - return isset($this->bucket); - } - - public function clearBucket() - { - unset($this->bucket); - } - - /** - * Required. The new bucket. The region specified in the new bucket must be - * compliant with any Location Restriction Org Policy. The name field in the - * bucket is ignored. - * - * Generated from protobuf field .google.logging.v2.LogBucket bucket = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogBucket $var - * @return $this - */ - public function setBucket($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogBucket::class); - $this->bucket = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateExclusionRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateExclusionRequest.php deleted file mode 100644 index cbc9e79a3b79..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateExclusionRequest.php +++ /dev/null @@ -1,170 +0,0 @@ -google.logging.v2.CreateExclusionRequest - */ -class CreateExclusionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource in which to create the exclusion: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * For examples: - * `"projects/my-logging-project"` - * `"organizations/123456789"` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The new exclusion, whose `name` parameter is an exclusion name - * that is not already used in the parent resource. - * - * Generated from protobuf field .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $exclusion = null; - - /** - * @param string $parent Required. The parent resource in which to create the exclusion: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * For examples: - * - * `"projects/my-logging-project"` - * `"organizations/123456789"` - * Please see {@see ConfigServiceV2Client::projectName()} for help formatting this field. - * @param \Google\Cloud\Logging\V2\LogExclusion $exclusion Required. The new exclusion, whose `name` parameter is an exclusion name - * that is not already used in the parent resource. - * - * @return \Google\Cloud\Logging\V2\CreateExclusionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Logging\V2\LogExclusion $exclusion): self - { - return (new self()) - ->setParent($parent) - ->setExclusion($exclusion); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource in which to create the exclusion: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * For examples: - * `"projects/my-logging-project"` - * `"organizations/123456789"` - * @type \Google\Cloud\Logging\V2\LogExclusion $exclusion - * Required. The new exclusion, whose `name` parameter is an exclusion name - * that is not already used in the parent resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource in which to create the exclusion: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * For examples: - * `"projects/my-logging-project"` - * `"organizations/123456789"` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource in which to create the exclusion: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * For examples: - * `"projects/my-logging-project"` - * `"organizations/123456789"` - * - * 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 new exclusion, whose `name` parameter is an exclusion name - * that is not already used in the parent resource. - * - * Generated from protobuf field .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogExclusion|null - */ - public function getExclusion() - { - return $this->exclusion; - } - - public function hasExclusion() - { - return isset($this->exclusion); - } - - public function clearExclusion() - { - unset($this->exclusion); - } - - /** - * Required. The new exclusion, whose `name` parameter is an exclusion name - * that is not already used in the parent resource. - * - * Generated from protobuf field .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogExclusion $var - * @return $this - */ - public function setExclusion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogExclusion::class); - $this->exclusion = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLinkRequest.php deleted file mode 100644 index 788ce2837100..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLinkRequest.php +++ /dev/null @@ -1,194 +0,0 @@ -google.logging.v2.CreateLinkRequest - */ -class CreateLinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the bucket to create a link for. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The new link. - * - * Generated from protobuf field .google.logging.v2.Link link = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $link = null; - /** - * Required. The ID to use for the link. The link_id can have up to 100 - * characters. A valid link_id must only have alphanumeric characters and - * underscores within it. - * - * Generated from protobuf field string link_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $link_id = ''; - - /** - * @param string $parent Required. The full resource name of the bucket to create a link for. - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * Please see {@see ConfigServiceV2Client::logBucketName()} for help formatting this field. - * @param \Google\Cloud\Logging\V2\Link $link Required. The new link. - * @param string $linkId Required. The ID to use for the link. The link_id can have up to 100 - * characters. A valid link_id must only have alphanumeric characters and - * underscores within it. - * - * @return \Google\Cloud\Logging\V2\CreateLinkRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Logging\V2\Link $link, string $linkId): self - { - return (new self()) - ->setParent($parent) - ->setLink($link) - ->setLinkId($linkId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The full resource name of the bucket to create a link for. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * @type \Google\Cloud\Logging\V2\Link $link - * Required. The new link. - * @type string $link_id - * Required. The ID to use for the link. The link_id can have up to 100 - * characters. A valid link_id must only have alphanumeric characters and - * underscores within it. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the bucket to create a link for. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The full resource name of the bucket to create a link for. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The new link. - * - * Generated from protobuf field .google.logging.v2.Link link = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\Link|null - */ - public function getLink() - { - return $this->link; - } - - public function hasLink() - { - return isset($this->link); - } - - public function clearLink() - { - unset($this->link); - } - - /** - * Required. The new link. - * - * Generated from protobuf field .google.logging.v2.Link link = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\Link $var - * @return $this - */ - public function setLink($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\Link::class); - $this->link = $var; - - return $this; - } - - /** - * Required. The ID to use for the link. The link_id can have up to 100 - * characters. A valid link_id must only have alphanumeric characters and - * underscores within it. - * - * Generated from protobuf field string link_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLinkId() - { - return $this->link_id; - } - - /** - * Required. The ID to use for the link. The link_id can have up to 100 - * characters. A valid link_id must only have alphanumeric characters and - * underscores within it. - * - * Generated from protobuf field string link_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLinkId($var) - { - GPBUtil::checkString($var, True); - $this->link_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLogMetricRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLogMetricRequest.php deleted file mode 100644 index 85cceae25314..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateLogMetricRequest.php +++ /dev/null @@ -1,144 +0,0 @@ -google.logging.v2.CreateLogMetricRequest - */ -class CreateLogMetricRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the project in which to create the metric: - * "projects/[PROJECT_ID]" - * The new metric must be provided in the request. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The new logs-based metric, which must not have an identifier that - * already exists. - * - * Generated from protobuf field .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $metric = null; - - /** - * @param string $parent Required. The resource name of the project in which to create the metric: - * - * "projects/[PROJECT_ID]" - * - * The new metric must be provided in the request. Please see - * {@see MetricsServiceV2Client::projectName()} for help formatting this field. - * @param \Google\Cloud\Logging\V2\LogMetric $metric Required. The new logs-based metric, which must not have an identifier that - * already exists. - * - * @return \Google\Cloud\Logging\V2\CreateLogMetricRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Logging\V2\LogMetric $metric): self - { - return (new self()) - ->setParent($parent) - ->setMetric($metric); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the project in which to create the metric: - * "projects/[PROJECT_ID]" - * The new metric must be provided in the request. - * @type \Google\Cloud\Logging\V2\LogMetric $metric - * Required. The new logs-based metric, which must not have an identifier that - * already exists. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the project in which to create the metric: - * "projects/[PROJECT_ID]" - * The new metric must be provided in the request. - * - * 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 resource name of the project in which to create the metric: - * "projects/[PROJECT_ID]" - * The new metric must be provided in the request. - * - * 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 new logs-based metric, which must not have an identifier that - * already exists. - * - * Generated from protobuf field .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogMetric|null - */ - public function getMetric() - { - return $this->metric; - } - - public function hasMetric() - { - return isset($this->metric); - } - - public function clearMetric() - { - unset($this->metric); - } - - /** - * Required. The new logs-based metric, which must not have an identifier that - * already exists. - * - * Generated from protobuf field .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogMetric $var - * @return $this - */ - public function setMetric($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogMetric::class); - $this->metric = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateSinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateSinkRequest.php deleted file mode 100644 index 42bdfbadbfb7..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateSinkRequest.php +++ /dev/null @@ -1,244 +0,0 @@ -google.logging.v2.CreateSinkRequest - */ -class CreateSinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource in which to create the sink: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * For examples: - * `"projects/my-project"` - * `"organizations/123456789"` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The new sink, whose `name` parameter is a sink identifier that - * is not already in use. - * - * Generated from protobuf field .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $sink = null; - /** - * Optional. Determines the kind of IAM identity returned as `writer_identity` - * in the new sink. If this value is omitted or set to false, and if the - * sink's parent is a project, then the value returned as `writer_identity` is - * the same group or service account used by Cloud Logging before the addition - * of writer identities to this API. The sink's destination must be in the - * same project as the sink itself. - * If this field is set to true, or if the sink is owned by a non-project - * resource such as an organization, then the value of `writer_identity` will - * be a unique service account used only for exports from the new sink. For - * more information, see `writer_identity` in - * [LogSink][google.logging.v2.LogSink]. - * - * Generated from protobuf field bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $unique_writer_identity = false; - - /** - * @param string $parent Required. The resource in which to create the sink: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * For examples: - * - * `"projects/my-project"` - * `"organizations/123456789"` - * Please see {@see ConfigServiceV2Client::projectName()} for help formatting this field. - * @param \Google\Cloud\Logging\V2\LogSink $sink Required. The new sink, whose `name` parameter is a sink identifier that - * is not already in use. - * - * @return \Google\Cloud\Logging\V2\CreateSinkRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Logging\V2\LogSink $sink): self - { - return (new self()) - ->setParent($parent) - ->setSink($sink); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource in which to create the sink: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * For examples: - * `"projects/my-project"` - * `"organizations/123456789"` - * @type \Google\Cloud\Logging\V2\LogSink $sink - * Required. The new sink, whose `name` parameter is a sink identifier that - * is not already in use. - * @type bool $unique_writer_identity - * Optional. Determines the kind of IAM identity returned as `writer_identity` - * in the new sink. If this value is omitted or set to false, and if the - * sink's parent is a project, then the value returned as `writer_identity` is - * the same group or service account used by Cloud Logging before the addition - * of writer identities to this API. The sink's destination must be in the - * same project as the sink itself. - * If this field is set to true, or if the sink is owned by a non-project - * resource such as an organization, then the value of `writer_identity` will - * be a unique service account used only for exports from the new sink. For - * more information, see `writer_identity` in - * [LogSink][google.logging.v2.LogSink]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource in which to create the sink: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * For examples: - * `"projects/my-project"` - * `"organizations/123456789"` - * - * 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 resource in which to create the sink: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * For examples: - * `"projects/my-project"` - * `"organizations/123456789"` - * - * 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 new sink, whose `name` parameter is a sink identifier that - * is not already in use. - * - * Generated from protobuf field .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogSink|null - */ - public function getSink() - { - return $this->sink; - } - - public function hasSink() - { - return isset($this->sink); - } - - public function clearSink() - { - unset($this->sink); - } - - /** - * Required. The new sink, whose `name` parameter is a sink identifier that - * is not already in use. - * - * Generated from protobuf field .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogSink $var - * @return $this - */ - public function setSink($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogSink::class); - $this->sink = $var; - - return $this; - } - - /** - * Optional. Determines the kind of IAM identity returned as `writer_identity` - * in the new sink. If this value is omitted or set to false, and if the - * sink's parent is a project, then the value returned as `writer_identity` is - * the same group or service account used by Cloud Logging before the addition - * of writer identities to this API. The sink's destination must be in the - * same project as the sink itself. - * If this field is set to true, or if the sink is owned by a non-project - * resource such as an organization, then the value of `writer_identity` will - * be a unique service account used only for exports from the new sink. For - * more information, see `writer_identity` in - * [LogSink][google.logging.v2.LogSink]. - * - * Generated from protobuf field bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getUniqueWriterIdentity() - { - return $this->unique_writer_identity; - } - - /** - * Optional. Determines the kind of IAM identity returned as `writer_identity` - * in the new sink. If this value is omitted or set to false, and if the - * sink's parent is a project, then the value returned as `writer_identity` is - * the same group or service account used by Cloud Logging before the addition - * of writer identities to this API. The sink's destination must be in the - * same project as the sink itself. - * If this field is set to true, or if the sink is owned by a non-project - * resource such as an organization, then the value of `writer_identity` will - * be a unique service account used only for exports from the new sink. For - * more information, see `writer_identity` in - * [LogSink][google.logging.v2.LogSink]. - * - * Generated from protobuf field bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setUniqueWriterIdentity($var) - { - GPBUtil::checkBool($var); - $this->unique_writer_identity = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateViewRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateViewRequest.php deleted file mode 100644 index 44f6888bfdaf..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/CreateViewRequest.php +++ /dev/null @@ -1,165 +0,0 @@ -google.logging.v2.CreateViewRequest - */ -class CreateViewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The bucket in which to create the view - * `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. A client-assigned identifier such as `"my-view"`. Identifiers are - * limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. - * - * Generated from protobuf field string view_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $view_id = ''; - /** - * Required. The new view. - * - * Generated from protobuf field .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $view = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The bucket in which to create the view - * `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * @type string $view_id - * Required. A client-assigned identifier such as `"my-view"`. Identifiers are - * limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. - * @type \Google\Cloud\Logging\V2\LogView $view - * Required. The new view. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The bucket in which to create the view - * `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The bucket in which to create the view - * `"projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]"` - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. A client-assigned identifier such as `"my-view"`. Identifiers are - * limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. - * - * Generated from protobuf field string view_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getViewId() - { - return $this->view_id; - } - - /** - * Required. A client-assigned identifier such as `"my-view"`. Identifiers are - * limited to 100 characters and can include only letters, digits, - * underscores, hyphens, and periods. - * - * Generated from protobuf field string view_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setViewId($var) - { - GPBUtil::checkString($var, True); - $this->view_id = $var; - - return $this; - } - - /** - * Required. The new view. - * - * Generated from protobuf field .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogView|null - */ - public function getView() - { - return $this->view; - } - - public function hasView() - { - return isset($this->view); - } - - public function clearView() - { - unset($this->view); - } - - /** - * Required. The new view. - * - * Generated from protobuf field .google.logging.v2.LogView view = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogView $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogView::class); - $this->view = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteBucketRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteBucketRequest.php deleted file mode 100644 index b02efe43c7b9..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteBucketRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.logging.v2.DeleteBucketRequest - */ -class DeleteBucketRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the bucket to delete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full resource name of the bucket to delete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the bucket to delete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full resource name of the bucket to delete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteExclusionRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteExclusionRequest.php deleted file mode 100644 index 6775e406ee07..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteExclusionRequest.php +++ /dev/null @@ -1,114 +0,0 @@ -google.logging.v2.DeleteExclusionRequest - */ -class DeleteExclusionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of an existing exclusion to delete: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of an existing exclusion to delete: - * - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * - * For example: - * - * `"projects/my-project/exclusions/my-exclusion"` - * Please see {@see ConfigServiceV2Client::logExclusionName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\DeleteExclusionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of an existing exclusion to delete: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of an existing exclusion to delete: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of an existing exclusion to delete: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLinkRequest.php deleted file mode 100644 index e1061ffd4100..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLinkRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.logging.v2.DeleteLinkRequest - */ -class DeleteLinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the link to delete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full resource name of the link to delete. - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * Please see {@see ConfigServiceV2Client::linkName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\DeleteLinkRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full resource name of the link to delete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the link to delete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full resource name of the link to delete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogMetricRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogMetricRequest.php deleted file mode 100644 index 910740651628..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogMetricRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.logging.v2.DeleteLogMetricRequest - */ -class DeleteLogMetricRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the metric to delete: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $metric_name = ''; - - /** - * @param string $metricName Required. The resource name of the metric to delete: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * Please see {@see MetricsServiceV2Client::logMetricName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\DeleteLogMetricRequest - * - * @experimental - */ - public static function build(string $metricName): self - { - return (new self()) - ->setMetricName($metricName); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $metric_name - * Required. The resource name of the metric to delete: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the metric to delete: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getMetricName() - { - return $this->metric_name; - } - - /** - * Required. The resource name of the metric to delete: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMetricName($var) - { - GPBUtil::checkString($var, True); - $this->metric_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogRequest.php deleted file mode 100644 index 29a9a8d3f7d8..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteLogRequest.php +++ /dev/null @@ -1,129 +0,0 @@ -google.logging.v2.DeleteLogRequest - */ -class DeleteLogRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the log to delete: - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * `[LOG_ID]` must be URL-encoded. For example, - * `"projects/my-project-id/logs/syslog"`, - * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. - * For more information about log names, see - * [LogEntry][google.logging.v2.LogEntry]. - * - * Generated from protobuf field string log_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $log_name = ''; - - /** - * @param string $logName Required. The resource name of the log to delete: - * - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * - * `[LOG_ID]` must be URL-encoded. For example, - * `"projects/my-project-id/logs/syslog"`, - * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. - * - * For more information about log names, see - * [LogEntry][google.logging.v2.LogEntry]. Please see - * {@see LoggingServiceV2Client::logName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\DeleteLogRequest - * - * @experimental - */ - public static function build(string $logName): self - { - return (new self()) - ->setLogName($logName); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $log_name - * Required. The resource name of the log to delete: - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * `[LOG_ID]` must be URL-encoded. For example, - * `"projects/my-project-id/logs/syslog"`, - * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. - * For more information about log names, see - * [LogEntry][google.logging.v2.LogEntry]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the log to delete: - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * `[LOG_ID]` must be URL-encoded. For example, - * `"projects/my-project-id/logs/syslog"`, - * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. - * For more information about log names, see - * [LogEntry][google.logging.v2.LogEntry]. - * - * Generated from protobuf field string log_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getLogName() - { - return $this->log_name; - } - - /** - * Required. The resource name of the log to delete: - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * `[LOG_ID]` must be URL-encoded. For example, - * `"projects/my-project-id/logs/syslog"`, - * `"organizations/123/logs/cloudaudit.googleapis.com%2Factivity"`. - * For more information about log names, see - * [LogEntry][google.logging.v2.LogEntry]. - * - * Generated from protobuf field string log_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLogName($var) - { - GPBUtil::checkString($var, True); - $this->log_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteSinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteSinkRequest.php deleted file mode 100644 index 763b0ae90a70..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteSinkRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -google.logging.v2.DeleteSinkRequest - */ -class DeleteSinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the sink to delete, including the - * parent resource and the sink identifier: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * - * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $sink_name = ''; - - /** - * @param string $sinkName Required. The full resource name of the sink to delete, including the - * parent resource and the sink identifier: - * - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * - * For example: - * - * `"projects/my-project/sinks/my-sink"` - * Please see {@see ConfigServiceV2Client::logSinkName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\DeleteSinkRequest - * - * @experimental - */ - public static function build(string $sinkName): self - { - return (new self()) - ->setSinkName($sinkName); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sink_name - * Required. The full resource name of the sink to delete, including the - * parent resource and the sink identifier: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the sink to delete, including the - * parent resource and the sink identifier: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * - * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSinkName() - { - return $this->sink_name; - } - - /** - * Required. The full resource name of the sink to delete, including the - * parent resource and the sink identifier: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * - * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSinkName($var) - { - GPBUtil::checkString($var, True); - $this->sink_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteViewRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteViewRequest.php deleted file mode 100644 index 3dd14ad7de35..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/DeleteViewRequest.php +++ /dev/null @@ -1,79 +0,0 @@ -google.logging.v2.DeleteViewRequest - */ -class DeleteViewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the view to delete: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full resource name of the view to delete: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the view to delete: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full resource name of the view to delete: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetBucketRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetBucketRequest.php deleted file mode 100644 index 909e48de6de2..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetBucketRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.logging.v2.GetBucketRequest - */ -class GetBucketRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the bucket: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the bucket: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the bucket: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the bucket: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetCmekSettingsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetCmekSettingsRequest.php deleted file mode 100644 index 692af357343f..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetCmekSettingsRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.logging.v2.GetCmekSettingsRequest - */ -class GetCmekSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource for which to retrieve CMEK settings. - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * For example: - * `"organizations/12345/cmekSettings"` - * Note: CMEK for the Log Router can be configured for Google Cloud projects, - * folders, organizations and billing accounts. Once configured for an - * organization, it applies to all projects and folders in the Google Cloud - * organization. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource for which to retrieve CMEK settings. - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * For example: - * `"organizations/12345/cmekSettings"` - * Note: CMEK for the Log Router can be configured for Google Cloud projects, - * folders, organizations and billing accounts. Once configured for an - * organization, it applies to all projects and folders in the Google Cloud - * organization. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource for which to retrieve CMEK settings. - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * For example: - * `"organizations/12345/cmekSettings"` - * Note: CMEK for the Log Router can be configured for Google Cloud projects, - * folders, organizations and billing accounts. Once configured for an - * organization, it applies to all projects and folders in the Google Cloud - * organization. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource for which to retrieve CMEK settings. - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * For example: - * `"organizations/12345/cmekSettings"` - * Note: CMEK for the Log Router can be configured for Google Cloud projects, - * folders, organizations and billing accounts. Once configured for an - * organization, it applies to all projects and folders in the Google Cloud - * organization. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetExclusionRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetExclusionRequest.php deleted file mode 100644 index 9eecf1e4cb05..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetExclusionRequest.php +++ /dev/null @@ -1,114 +0,0 @@ -google.logging.v2.GetExclusionRequest - */ -class GetExclusionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of an existing exclusion: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of an existing exclusion: - * - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * - * For example: - * - * `"projects/my-project/exclusions/my-exclusion"` - * Please see {@see ConfigServiceV2Client::logExclusionName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\GetExclusionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of an existing exclusion: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of an existing exclusion: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of an existing exclusion: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLinkRequest.php deleted file mode 100644 index c527dd1edff4..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLinkRequest.php +++ /dev/null @@ -1,102 +0,0 @@ -google.logging.v2.GetLinkRequest - */ -class GetLinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the link: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the link: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID] - * Please see {@see ConfigServiceV2Client::linkName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\GetLinkRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the link: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the link: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the link: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID] - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLogMetricRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLogMetricRequest.php deleted file mode 100644 index 1bcc54610c1d..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetLogMetricRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.logging.v2.GetLogMetricRequest - */ -class GetLogMetricRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the desired metric: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $metric_name = ''; - - /** - * @param string $metricName Required. The resource name of the desired metric: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * Please see {@see MetricsServiceV2Client::logMetricName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\GetLogMetricRequest - * - * @experimental - */ - public static function build(string $metricName): self - { - return (new self()) - ->setMetricName($metricName); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $metric_name - * Required. The resource name of the desired metric: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the desired metric: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getMetricName() - { - return $this->metric_name; - } - - /** - * Required. The resource name of the desired metric: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMetricName($var) - { - GPBUtil::checkString($var, True); - $this->metric_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSettingsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSettingsRequest.php deleted file mode 100644 index 61320af4d0e5..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSettingsRequest.php +++ /dev/null @@ -1,139 +0,0 @@ -google.logging.v2.GetSettingsRequest - */ -class GetSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource for which to retrieve settings. - * "projects/[PROJECT_ID]/settings" - * "organizations/[ORGANIZATION_ID]/settings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/settings" - * "folders/[FOLDER_ID]/settings" - * For example: - * `"organizations/12345/settings"` - * Note: Settings for the Log Router can be get for Google Cloud projects, - * folders, organizations and billing accounts. Currently it can only be - * configured for organizations. Once configured for an organization, it - * applies to all projects and folders in the Google Cloud organization. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource for which to retrieve settings. - * - * "projects/[PROJECT_ID]/settings" - * "organizations/[ORGANIZATION_ID]/settings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/settings" - * "folders/[FOLDER_ID]/settings" - * - * For example: - * - * `"organizations/12345/settings"` - * - * Note: Settings for the Log Router can be get for Google Cloud projects, - * folders, organizations and billing accounts. Currently it can only be - * configured for organizations. Once configured for an organization, it - * applies to all projects and folders in the Google Cloud organization. Please see - * {@see ConfigServiceV2Client::settingsName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\GetSettingsRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource for which to retrieve settings. - * "projects/[PROJECT_ID]/settings" - * "organizations/[ORGANIZATION_ID]/settings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/settings" - * "folders/[FOLDER_ID]/settings" - * For example: - * `"organizations/12345/settings"` - * Note: Settings for the Log Router can be get for Google Cloud projects, - * folders, organizations and billing accounts. Currently it can only be - * configured for organizations. Once configured for an organization, it - * applies to all projects and folders in the Google Cloud organization. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource for which to retrieve settings. - * "projects/[PROJECT_ID]/settings" - * "organizations/[ORGANIZATION_ID]/settings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/settings" - * "folders/[FOLDER_ID]/settings" - * For example: - * `"organizations/12345/settings"` - * Note: Settings for the Log Router can be get for Google Cloud projects, - * folders, organizations and billing accounts. Currently it can only be - * configured for organizations. Once configured for an organization, it - * applies to all projects and folders in the Google Cloud organization. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource for which to retrieve settings. - * "projects/[PROJECT_ID]/settings" - * "organizations/[ORGANIZATION_ID]/settings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/settings" - * "folders/[FOLDER_ID]/settings" - * For example: - * `"organizations/12345/settings"` - * Note: Settings for the Log Router can be get for Google Cloud projects, - * folders, organizations and billing accounts. Currently it can only be - * configured for organizations. Once configured for an organization, it - * applies to all projects and folders in the Google Cloud organization. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSinkRequest.php deleted file mode 100644 index b93d8feafde2..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetSinkRequest.php +++ /dev/null @@ -1,114 +0,0 @@ -google.logging.v2.GetSinkRequest - */ -class GetSinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the sink: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * - * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $sink_name = ''; - - /** - * @param string $sinkName Required. The resource name of the sink: - * - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * - * For example: - * - * `"projects/my-project/sinks/my-sink"` - * Please see {@see ConfigServiceV2Client::logSinkName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\GetSinkRequest - * - * @experimental - */ - public static function build(string $sinkName): self - { - return (new self()) - ->setSinkName($sinkName); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sink_name - * Required. The resource name of the sink: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the sink: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * - * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSinkName() - { - return $this->sink_name; - } - - /** - * Required. The resource name of the sink: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * - * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSinkName($var) - { - GPBUtil::checkString($var, True); - $this->sink_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetViewRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetViewRequest.php deleted file mode 100644 index 952bdc133356..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/GetViewRequest.php +++ /dev/null @@ -1,79 +0,0 @@ -google.logging.v2.GetViewRequest - */ -class GetViewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the policy: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the policy: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the policy: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the policy: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexConfig.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexConfig.php deleted file mode 100644 index 19803fd1d9d0..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexConfig.php +++ /dev/null @@ -1,173 +0,0 @@ -google.logging.v2.IndexConfig - */ -class IndexConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The LogEntry field path to index. - * Note that some paths are automatically indexed, and other paths are not - * eligible for indexing. See [indexing documentation]( - * https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields) - * for details. - * For example: `jsonPayload.request.status` - * - * Generated from protobuf field string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $field_path = ''; - /** - * Required. The type of data in this index. - * - * Generated from protobuf field .google.logging.v2.IndexType type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Output only. The timestamp when the index was last modified. - * This is used to return the timestamp, and will be ignored if supplied - * during update. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field_path - * Required. The LogEntry field path to index. - * Note that some paths are automatically indexed, and other paths are not - * eligible for indexing. See [indexing documentation]( - * https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields) - * for details. - * For example: `jsonPayload.request.status` - * @type int $type - * Required. The type of data in this index. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The timestamp when the index was last modified. - * This is used to return the timestamp, and will be ignored if supplied - * during update. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The LogEntry field path to index. - * Note that some paths are automatically indexed, and other paths are not - * eligible for indexing. See [indexing documentation]( - * https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields) - * for details. - * For example: `jsonPayload.request.status` - * - * Generated from protobuf field string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFieldPath() - { - return $this->field_path; - } - - /** - * Required. The LogEntry field path to index. - * Note that some paths are automatically indexed, and other paths are not - * eligible for indexing. See [indexing documentation]( - * https://cloud.google.com/logging/docs/view/advanced-queries#indexed-fields) - * for details. - * For example: `jsonPayload.request.status` - * - * Generated from protobuf field string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFieldPath($var) - { - GPBUtil::checkString($var, True); - $this->field_path = $var; - - return $this; - } - - /** - * Required. The type of data in this index. - * - * Generated from protobuf field .google.logging.v2.IndexType type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of data in this index. - * - * Generated from protobuf field .google.logging.v2.IndexType type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\IndexType::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. The timestamp when the index was last modified. - * This is used to return the timestamp, and will be ignored if supplied - * during update. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The timestamp when the index was last modified. - * This is used to return the timestamp, and will be ignored if supplied - * during update. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexType.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexType.php deleted file mode 100644 index bbda5df5852a..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/IndexType.php +++ /dev/null @@ -1,62 +0,0 @@ -google.logging.v2.IndexType - */ -class IndexType -{ - /** - * The index's type is unspecified. - * - * Generated from protobuf enum INDEX_TYPE_UNSPECIFIED = 0; - */ - const INDEX_TYPE_UNSPECIFIED = 0; - /** - * The index is a string-type index. - * - * Generated from protobuf enum INDEX_TYPE_STRING = 1; - */ - const INDEX_TYPE_STRING = 1; - /** - * The index is a integer-type index. - * - * Generated from protobuf enum INDEX_TYPE_INTEGER = 2; - */ - const INDEX_TYPE_INTEGER = 2; - - private static $valueToName = [ - self::INDEX_TYPE_UNSPECIFIED => 'INDEX_TYPE_UNSPECIFIED', - self::INDEX_TYPE_STRING => 'INDEX_TYPE_STRING', - self::INDEX_TYPE_INTEGER => 'INDEX_TYPE_INTEGER', - ]; - - 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/LifecycleState.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LifecycleState.php deleted file mode 100644 index 0fe746cebd4d..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LifecycleState.php +++ /dev/null @@ -1,86 +0,0 @@ -google.logging.v2.LifecycleState - */ -class LifecycleState -{ - /** - * Unspecified state. This is only used/useful for distinguishing unset - * values. - * - * Generated from protobuf enum LIFECYCLE_STATE_UNSPECIFIED = 0; - */ - const LIFECYCLE_STATE_UNSPECIFIED = 0; - /** - * The normal and active state. - * - * Generated from protobuf enum ACTIVE = 1; - */ - const ACTIVE = 1; - /** - * The resource has been marked for deletion by the user. For some resources - * (e.g. buckets), this can be reversed by an un-delete operation. - * - * Generated from protobuf enum DELETE_REQUESTED = 2; - */ - const DELETE_REQUESTED = 2; - /** - * The resource has been marked for an update by the user. It will remain in - * this state until the update is complete. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * The resource has been marked for creation by the user. It will remain in - * this state until the creation is complete. - * - * Generated from protobuf enum CREATING = 4; - */ - const CREATING = 4; - /** - * The resource is in an INTERNAL error state. - * - * Generated from protobuf enum FAILED = 5; - */ - const FAILED = 5; - - private static $valueToName = [ - self::LIFECYCLE_STATE_UNSPECIFIED => 'LIFECYCLE_STATE_UNSPECIFIED', - self::ACTIVE => 'ACTIVE', - self::DELETE_REQUESTED => 'DELETE_REQUESTED', - self::UPDATING => 'UPDATING', - self::CREATING => 'CREATING', - self::FAILED => 'FAILED', - ]; - - 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/Link.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/Link.php deleted file mode 100644 index bea2795e9708..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/Link.php +++ /dev/null @@ -1,271 +0,0 @@ -google.logging.v2.Link - */ -class Link extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the link. The name can have up to 100 characters. - * A valid link id (at the end of the link name) must only have alphanumeric - * characters and underscores within it. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * For example: - * `projects/my-project/locations/global/buckets/my-bucket/links/my_link - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Describes this link. - * The maximum length of the description is 8000 characters. - * - * Generated from protobuf field string description = 2; - */ - protected $description = ''; - /** - * Output only. The creation timestamp of the link. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The resource lifecycle state. - * - * Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $lifecycle_state = 0; - /** - * The information of a BigQuery Dataset. When a link is created, a BigQuery - * dataset is created along with it, in the same project as the LogBucket it's - * linked to. This dataset will also have BigQuery Views corresponding to the - * LogViews in the bucket. - * - * Generated from protobuf field .google.logging.v2.BigQueryDataset bigquery_dataset = 5; - */ - protected $bigquery_dataset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the link. The name can have up to 100 characters. - * A valid link id (at the end of the link name) must only have alphanumeric - * characters and underscores within it. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * For example: - * `projects/my-project/locations/global/buckets/my-bucket/links/my_link - * @type string $description - * Describes this link. - * The maximum length of the description is 8000 characters. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation timestamp of the link. - * @type int $lifecycle_state - * Output only. The resource lifecycle state. - * @type \Google\Cloud\Logging\V2\BigQueryDataset $bigquery_dataset - * The information of a BigQuery Dataset. When a link is created, a BigQuery - * dataset is created along with it, in the same project as the LogBucket it's - * linked to. This dataset will also have BigQuery Views corresponding to the - * LogViews in the bucket. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the link. The name can have up to 100 characters. - * A valid link id (at the end of the link name) must only have alphanumeric - * characters and underscores within it. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * For example: - * `projects/my-project/locations/global/buckets/my-bucket/links/my_link - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the link. The name can have up to 100 characters. - * A valid link id (at the end of the link name) must only have alphanumeric - * characters and underscores within it. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/[LINK_ID]" - * For example: - * `projects/my-project/locations/global/buckets/my-bucket/links/my_link - * - * 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; - } - - /** - * Describes this link. - * The maximum length of the description is 8000 characters. - * - * Generated from protobuf field string description = 2; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Describes this link. - * The maximum length of the description is 8000 characters. - * - * Generated from protobuf field string description = 2; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The creation timestamp of the link. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The creation timestamp of the link. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The resource lifecycle state. - * - * Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getLifecycleState() - { - return $this->lifecycle_state; - } - - /** - * Output only. The resource lifecycle state. - * - * Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setLifecycleState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\LifecycleState::class); - $this->lifecycle_state = $var; - - return $this; - } - - /** - * The information of a BigQuery Dataset. When a link is created, a BigQuery - * dataset is created along with it, in the same project as the LogBucket it's - * linked to. This dataset will also have BigQuery Views corresponding to the - * LogViews in the bucket. - * - * Generated from protobuf field .google.logging.v2.BigQueryDataset bigquery_dataset = 5; - * @return \Google\Cloud\Logging\V2\BigQueryDataset|null - */ - public function getBigqueryDataset() - { - return $this->bigquery_dataset; - } - - public function hasBigqueryDataset() - { - return isset($this->bigquery_dataset); - } - - public function clearBigqueryDataset() - { - unset($this->bigquery_dataset); - } - - /** - * The information of a BigQuery Dataset. When a link is created, a BigQuery - * dataset is created along with it, in the same project as the LogBucket it's - * linked to. This dataset will also have BigQuery Views corresponding to the - * LogViews in the bucket. - * - * Generated from protobuf field .google.logging.v2.BigQueryDataset bigquery_dataset = 5; - * @param \Google\Cloud\Logging\V2\BigQueryDataset $var - * @return $this - */ - public function setBigqueryDataset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\BigQueryDataset::class); - $this->bigquery_dataset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LinkMetadata.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LinkMetadata.php deleted file mode 100644 index 4a6bb20a6e2d..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LinkMetadata.php +++ /dev/null @@ -1,230 +0,0 @@ -google.logging.v2.LinkMetadata - */ -class LinkMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The start time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The end time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - /** - * State of an operation. - * - * Generated from protobuf field .google.logging.v2.OperationState state = 3; - */ - protected $state = 0; - protected $request; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The start time of an operation. - * @type \Google\Protobuf\Timestamp $end_time - * The end time of an operation. - * @type int $state - * State of an operation. - * @type \Google\Cloud\Logging\V2\CreateLinkRequest $create_link_request - * CreateLink RPC request. - * @type \Google\Cloud\Logging\V2\DeleteLinkRequest $delete_link_request - * DeleteLink RPC request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * The start time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The start time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The end time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * The end time of an operation. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * State of an operation. - * - * Generated from protobuf field .google.logging.v2.OperationState state = 3; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * State of an operation. - * - * Generated from protobuf field .google.logging.v2.OperationState state = 3; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\OperationState::class); - $this->state = $var; - - return $this; - } - - /** - * CreateLink RPC request. - * - * Generated from protobuf field .google.logging.v2.CreateLinkRequest create_link_request = 4; - * @return \Google\Cloud\Logging\V2\CreateLinkRequest|null - */ - public function getCreateLinkRequest() - { - return $this->readOneof(4); - } - - public function hasCreateLinkRequest() - { - return $this->hasOneof(4); - } - - /** - * CreateLink RPC request. - * - * Generated from protobuf field .google.logging.v2.CreateLinkRequest create_link_request = 4; - * @param \Google\Cloud\Logging\V2\CreateLinkRequest $var - * @return $this - */ - public function setCreateLinkRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\CreateLinkRequest::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * DeleteLink RPC request. - * - * Generated from protobuf field .google.logging.v2.DeleteLinkRequest delete_link_request = 5; - * @return \Google\Cloud\Logging\V2\DeleteLinkRequest|null - */ - public function getDeleteLinkRequest() - { - return $this->readOneof(5); - } - - public function hasDeleteLinkRequest() - { - return $this->hasOneof(5); - } - - /** - * DeleteLink RPC request. - * - * Generated from protobuf field .google.logging.v2.DeleteLinkRequest delete_link_request = 5; - * @param \Google\Cloud\Logging\V2\DeleteLinkRequest $var - * @return $this - */ - public function setDeleteLinkRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\DeleteLinkRequest::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getRequest() - { - return $this->whichOneof("request"); - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsRequest.php deleted file mode 100644 index 224cc5337ea2..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsRequest.php +++ /dev/null @@ -1,206 +0,0 @@ -google.logging.v2.ListBucketsRequest - */ -class ListBucketsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource whose buckets are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - * Note: The locations portion of the resource must be specified, but - * supplying the character `-` in place of [LOCATION_ID] will return all - * buckets. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - - /** - * @param string $parent Required. The parent resource whose buckets are to be listed: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - * - * Note: The locations portion of the resource must be specified, but - * supplying the character `-` in place of [LOCATION_ID] will return all - * buckets. Please see - * {@see ConfigServiceV2Client::organizationLocationName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\ListBucketsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource whose buckets are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - * Note: The locations portion of the resource must be specified, but - * supplying the character `-` in place of [LOCATION_ID] will return all - * buckets. - * @type string $page_token - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource whose buckets are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - * Note: The locations portion of the resource must be specified, but - * supplying the character `-` in place of [LOCATION_ID] will return all - * buckets. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource whose buckets are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]" - * Note: The locations portion of the resource must be specified, but - * supplying the character `-` in place of [LOCATION_ID] will return all - * buckets. - * - * 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; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsResponse.php deleted file mode 100644 index 35db3372403b..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListBucketsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.logging.v2.ListBucketsResponse - */ -class ListBucketsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of buckets. - * - * Generated from protobuf field repeated .google.logging.v2.LogBucket buckets = 1; - */ - private $buckets; - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Logging\V2\LogBucket[] $buckets - * A list of buckets. - * @type string $next_page_token - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * A list of buckets. - * - * Generated from protobuf field repeated .google.logging.v2.LogBucket buckets = 1; - * @return RepeatedField<\Google\Cloud\Logging\V2\LogBucket> - */ - public function getBuckets() - { - return $this->buckets; - } - - /** - * A list of buckets. - * - * Generated from protobuf field repeated .google.logging.v2.LogBucket buckets = 1; - * @param \Google\Cloud\Logging\V2\LogBucket[] $var - * @return $this - */ - public function setBuckets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogBucket::class); - $this->buckets = $arr; - - return $this; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsRequest.php deleted file mode 100644 index 31a8f81d98be..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsRequest.php +++ /dev/null @@ -1,190 +0,0 @@ -google.logging.v2.ListExclusionsRequest - */ -class ListExclusionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource whose exclusions are to be listed. - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - - /** - * @param string $parent Required. The parent resource whose exclusions are to be listed. - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * Please see {@see ConfigServiceV2Client::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\ListExclusionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource whose exclusions are to be listed. - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * @type string $page_token - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource whose exclusions are to be listed. - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource whose exclusions are to be listed. - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsResponse.php deleted file mode 100644 index 513a7eff6ac8..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListExclusionsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.logging.v2.ListExclusionsResponse - */ -class ListExclusionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of exclusions. - * - * Generated from protobuf field repeated .google.logging.v2.LogExclusion exclusions = 1; - */ - private $exclusions; - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Logging\V2\LogExclusion[] $exclusions - * A list of exclusions. - * @type string $next_page_token - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * A list of exclusions. - * - * Generated from protobuf field repeated .google.logging.v2.LogExclusion exclusions = 1; - * @return RepeatedField<\Google\Cloud\Logging\V2\LogExclusion> - */ - public function getExclusions() - { - return $this->exclusions; - } - - /** - * A list of exclusions. - * - * Generated from protobuf field repeated .google.logging.v2.LogExclusion exclusions = 1; - * @param \Google\Cloud\Logging\V2\LogExclusion[] $var - * @return $this - */ - public function setExclusions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogExclusion::class); - $this->exclusions = $arr; - - return $this; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksRequest.php deleted file mode 100644 index 43679c5bc760..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.logging.v2.ListLinksRequest - */ -class ListLinksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource whose links are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The maximum number of results to return from this request. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - - /** - * @param string $parent Required. The parent resource whose links are to be listed: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ - * Please see {@see ConfigServiceV2Client::logBucketName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\ListLinksRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource whose links are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ - * @type string $page_token - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource whose links are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource whose links are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/links/" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/ - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return from this request. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksResponse.php deleted file mode 100644 index 48d7ba8da57c..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLinksResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.logging.v2.ListLinksResponse - */ -class ListLinksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of links. - * - * Generated from protobuf field repeated .google.logging.v2.Link links = 1; - */ - private $links; - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Logging\V2\Link[] $links - * A list of links. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * A list of links. - * - * Generated from protobuf field repeated .google.logging.v2.Link links = 1; - * @return RepeatedField<\Google\Cloud\Logging\V2\Link> - */ - public function getLinks() - { - return $this->links; - } - - /** - * A list of links. - * - * Generated from protobuf field repeated .google.logging.v2.Link links = 1; - * @param \Google\Cloud\Logging\V2\Link[] $var - * @return $this - */ - public function setLinks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\Link::class); - $this->links = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesRequest.php deleted file mode 100644 index 881df27fc348..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesRequest.php +++ /dev/null @@ -1,354 +0,0 @@ -google.logging.v2.ListLogEntriesRequest - */ -class ListLogEntriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Names of one or more parent resources from which to - * retrieve log entries: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * May alternatively be one or more views: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * Projects listed in the `project_ids` field are added to this list. - * A maximum of 100 resources may be specified in a single request. - * - * Generated from protobuf field repeated string resource_names = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $resource_names; - /** - * Optional. Only log entries that match the filter are returned. An empty - * filter matches all log entries in the resources listed in `resource_names`. - * Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of a filter is - * 20,000 characters. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. How the results should be sorted. Presently, the only permitted - * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first - * option returns entries in order of increasing values of - * `LogEntry.timestamp` (oldest first), and the second option returns entries - * in order of decreasing timestamps (newest first). Entries with equal - * timestamps are returned in order of their `insert_id` values. - * - * Generated from protobuf field string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Optional. The maximum number of results to return from this request. - * Default is 50. If the value is negative or exceeds 1000, the request is - * rejected. The presence of `next_page_token` in the response indicates that - * more results might be available. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string[] $resourceNames Required. Names of one or more parent resources from which to - * retrieve log entries: - * - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * - * May alternatively be one or more views: - * - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * - * Projects listed in the `project_ids` field are added to this list. - * A maximum of 100 resources may be specified in a single request. Please see - * {@see LoggingServiceV2Client::projectName()} for help formatting this field. - * @param string $filter Optional. Only log entries that match the filter are returned. An empty - * filter matches all log entries in the resources listed in `resource_names`. - * Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of a filter is - * 20,000 characters. - * @param string $orderBy Optional. How the results should be sorted. Presently, the only permitted - * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first - * option returns entries in order of increasing values of - * `LogEntry.timestamp` (oldest first), and the second option returns entries - * in order of decreasing timestamps (newest first). Entries with equal - * timestamps are returned in order of their `insert_id` values. - * - * @return \Google\Cloud\Logging\V2\ListLogEntriesRequest - * - * @experimental - */ - public static function build(array $resourceNames, string $filter, string $orderBy): self - { - return (new self()) - ->setResourceNames($resourceNames) - ->setFilter($filter) - ->setOrderBy($orderBy); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $resource_names - * Required. Names of one or more parent resources from which to - * retrieve log entries: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * May alternatively be one or more views: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * Projects listed in the `project_ids` field are added to this list. - * A maximum of 100 resources may be specified in a single request. - * @type string $filter - * Optional. Only log entries that match the filter are returned. An empty - * filter matches all log entries in the resources listed in `resource_names`. - * Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of a filter is - * 20,000 characters. - * @type string $order_by - * Optional. How the results should be sorted. Presently, the only permitted - * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first - * option returns entries in order of increasing values of - * `LogEntry.timestamp` (oldest first), and the second option returns entries - * in order of decreasing timestamps (newest first). Entries with equal - * timestamps are returned in order of their `insert_id` values. - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Default is 50. If the value is negative or exceeds 1000, the request is - * rejected. The presence of `next_page_token` in the response indicates that - * more results might be available. - * @type string $page_token - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * Required. Names of one or more parent resources from which to - * retrieve log entries: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * May alternatively be one or more views: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * Projects listed in the `project_ids` field are added to this list. - * A maximum of 100 resources may be specified in a single request. - * - * Generated from protobuf field repeated string resource_names = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return RepeatedField - */ - public function getResourceNames() - { - return $this->resource_names; - } - - /** - * Required. Names of one or more parent resources from which to - * retrieve log entries: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * May alternatively be one or more views: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * Projects listed in the `project_ids` field are added to this list. - * A maximum of 100 resources may be specified in a single request. - * - * Generated from protobuf field repeated string resource_names = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string[] $var - * @return $this - */ - public function setResourceNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->resource_names = $arr; - - return $this; - } - - /** - * Optional. Only log entries that match the filter are returned. An empty - * filter matches all log entries in the resources listed in `resource_names`. - * Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of a filter is - * 20,000 characters. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Only log entries that match the filter are returned. An empty - * filter matches all log entries in the resources listed in `resource_names`. - * Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of a filter is - * 20,000 characters. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. How the results should be sorted. Presently, the only permitted - * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first - * option returns entries in order of increasing values of - * `LogEntry.timestamp` (oldest first), and the second option returns entries - * in order of decreasing timestamps (newest first). Entries with equal - * timestamps are returned in order of their `insert_id` values. - * - * Generated from protobuf field string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. How the results should be sorted. Presently, the only permitted - * values are `"timestamp asc"` (default) and `"timestamp desc"`. The first - * option returns entries in order of increasing values of - * `LogEntry.timestamp` (oldest first), and the second option returns entries - * in order of decreasing timestamps (newest first). Entries with equal - * timestamps are returned in order of their `insert_id` values. - * - * Generated from protobuf field string order_by = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return from this request. - * Default is 50. If the value is negative or exceeds 1000, the request is - * rejected. The presence of `next_page_token` in the response indicates that - * more results might be available. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * Default is 50. If the value is negative or exceeds 1000, the request is - * rejected. The presence of `next_page_token` in the response indicates that - * more results might be available. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `page_token` must be the value of - * `next_page_token` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesResponse.php deleted file mode 100644 index 10436906f93d..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogEntriesResponse.php +++ /dev/null @@ -1,141 +0,0 @@ -google.logging.v2.ListLogEntriesResponse - */ -class ListLogEntriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of log entries. If `entries` is empty, `nextPageToken` may still be - * returned, indicating that more entries may exist. See `nextPageToken` for - * more information. - * - * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 1; - */ - private $entries; - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * If a value for `next_page_token` appears and the `entries` field is empty, - * it means that the search found no log entries so far but it did not have - * time to search all the possible log entries. Retry the method with this - * value for `page_token` to continue the search. Alternatively, consider - * speeding up the search by changing your filter to specify a single log name - * or resource type, or to narrow the time range of the search. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Logging\V2\LogEntry[] $entries - * A list of log entries. If `entries` is empty, `nextPageToken` may still be - * returned, indicating that more entries may exist. See `nextPageToken` for - * more information. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * If a value for `next_page_token` appears and the `entries` field is empty, - * it means that the search found no log entries so far but it did not have - * time to search all the possible log entries. Retry the method with this - * value for `page_token` to continue the search. Alternatively, consider - * speeding up the search by changing your filter to specify a single log name - * or resource type, or to narrow the time range of the search. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * A list of log entries. If `entries` is empty, `nextPageToken` may still be - * returned, indicating that more entries may exist. See `nextPageToken` for - * more information. - * - * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 1; - * @return RepeatedField<\Google\Cloud\Logging\V2\LogEntry> - */ - public function getEntries() - { - return $this->entries; - } - - /** - * A list of log entries. If `entries` is empty, `nextPageToken` may still be - * returned, indicating that more entries may exist. See `nextPageToken` for - * more information. - * - * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 1; - * @param \Google\Cloud\Logging\V2\LogEntry[] $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogEntry::class); - $this->entries = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * If a value for `next_page_token` appears and the `entries` field is empty, - * it means that the search found no log entries so far but it did not have - * time to search all the possible log entries. Retry the method with this - * value for `page_token` to continue the search. Alternatively, consider - * speeding up the search by changing your filter to specify a single log name - * or resource type, or to narrow the time range of the search. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * If a value for `next_page_token` appears and the `entries` field is empty, - * it means that the search found no log entries so far but it did not have - * time to search all the possible log entries. Retry the method with this - * value for `page_token` to continue the search. Alternatively, consider - * speeding up the search by changing your filter to specify a single log name - * or resource type, or to narrow the time range of the search. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsRequest.php deleted file mode 100644 index 5c6a1b627d1c..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsRequest.php +++ /dev/null @@ -1,175 +0,0 @@ -google.logging.v2.ListLogMetricsRequest - */ -class ListLogMetricsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the project containing the metrics: - * "projects/[PROJECT_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - - /** - * @param string $parent Required. The name of the project containing the metrics: - * - * "projects/[PROJECT_ID]" - * Please see {@see MetricsServiceV2Client::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\ListLogMetricsRequest - * - * @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 name of the project containing the metrics: - * "projects/[PROJECT_ID]" - * @type string $page_token - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the project containing the metrics: - * "projects/[PROJECT_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The name of the project containing the metrics: - * "projects/[PROJECT_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsResponse.php deleted file mode 100644 index df66f17a1f24..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogMetricsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.logging.v2.ListLogMetricsResponse - */ -class ListLogMetricsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of logs-based metrics. - * - * Generated from protobuf field repeated .google.logging.v2.LogMetric metrics = 1; - */ - private $metrics; - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Logging\V2\LogMetric[] $metrics - * A list of logs-based metrics. - * @type string $next_page_token - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); - parent::__construct($data); - } - - /** - * A list of logs-based metrics. - * - * Generated from protobuf field repeated .google.logging.v2.LogMetric metrics = 1; - * @return RepeatedField<\Google\Cloud\Logging\V2\LogMetric> - */ - public function getMetrics() - { - return $this->metrics; - } - - /** - * A list of logs-based metrics. - * - * Generated from protobuf field repeated .google.logging.v2.LogMetric metrics = 1; - * @param \Google\Cloud\Logging\V2\LogMetric[] $var - * @return $this - */ - public function setMetrics($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogMetric::class); - $this->metrics = $arr; - - return $this; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsRequest.php deleted file mode 100644 index 27f5a2a1b1f7..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsRequest.php +++ /dev/null @@ -1,264 +0,0 @@ -google.logging.v2.ListLogsRequest - */ -class ListLogsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name to list logs for: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. List of resource names to list logs for: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * To support legacy queries, it could also be: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * The resource name in the `parent` field is added to this list. - * - * Generated from protobuf field repeated string resource_names = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - private $resource_names; - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name to list logs for: - * - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * Please see {@see LoggingServiceV2Client::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\ListLogsRequest - * - * @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 resource name to list logs for: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * @type string[] $resource_names - * Optional. List of resource names to list logs for: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * To support legacy queries, it could also be: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * The resource name in the `parent` field is added to this list. - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * @type string $page_token - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name to list logs for: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name to list logs for: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. List of resource names to list logs for: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * To support legacy queries, it could also be: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * The resource name in the `parent` field is added to this list. - * - * Generated from protobuf field repeated string resource_names = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return RepeatedField - */ - public function getResourceNames() - { - return $this->resource_names; - } - - /** - * Optional. List of resource names to list logs for: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * To support legacy queries, it could also be: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * The resource name in the `parent` field is added to this list. - * - * Generated from protobuf field repeated string resource_names = 8 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string[] $var - * @return $this - */ - public function setResourceNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->resource_names = $arr; - - return $this; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsResponse.php deleted file mode 100644 index 7e958521adea..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListLogsResponse.php +++ /dev/null @@ -1,117 +0,0 @@ -google.logging.v2.ListLogsResponse - */ -class ListLogsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of log names. For example, - * `"projects/my-project/logs/syslog"` or - * `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * - * Generated from protobuf field repeated string log_names = 3; - */ - private $log_names; - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $log_names - * A list of log names. For example, - * `"projects/my-project/logs/syslog"` or - * `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * A list of log names. For example, - * `"projects/my-project/logs/syslog"` or - * `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * - * Generated from protobuf field repeated string log_names = 3; - * @return RepeatedField - */ - public function getLogNames() - { - return $this->log_names; - } - - /** - * A list of log names. For example, - * `"projects/my-project/logs/syslog"` or - * `"organizations/123/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * - * Generated from protobuf field repeated string log_names = 3; - * @param string[] $var - * @return $this - */ - public function setLogNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->log_names = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsRequest.php deleted file mode 100644 index c0111d37642c..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsRequest.php +++ /dev/null @@ -1,121 +0,0 @@ -google.logging.v2.ListMonitoredResourceDescriptorsRequest - */ -class ListMonitoredResourceDescriptorsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * @type string $page_token - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsResponse.php deleted file mode 100644 index 594fad76590a..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListMonitoredResourceDescriptorsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.logging.v2.ListMonitoredResourceDescriptorsResponse - */ -class ListMonitoredResourceDescriptorsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of resource descriptors. - * - * Generated from protobuf field repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; - */ - private $resource_descriptors; - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Api\MonitoredResourceDescriptor[] $resource_descriptors - * A list of resource descriptors. - * @type string $next_page_token - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * A list of resource descriptors. - * - * Generated from protobuf field repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; - * @return RepeatedField<\Google\Api\MonitoredResourceDescriptor> - */ - public function getResourceDescriptors() - { - return $this->resource_descriptors; - } - - /** - * A list of resource descriptors. - * - * Generated from protobuf field repeated .google.api.MonitoredResourceDescriptor resource_descriptors = 1; - * @param \Google\Api\MonitoredResourceDescriptor[] $var - * @return $this - */ - public function setResourceDescriptors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Api\MonitoredResourceDescriptor::class); - $this->resource_descriptors = $arr; - - return $this; - } - - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than those appearing in this response, then - * `nextPageToken` is included. To get the next set of results, call this - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksRequest.php deleted file mode 100644 index f9555cf2ac3b..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksRequest.php +++ /dev/null @@ -1,190 +0,0 @@ -google.logging.v2.ListSinksRequest - */ -class ListSinksRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource whose sinks are to be listed: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - - /** - * @param string $parent Required. The parent resource whose sinks are to be listed: - * - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * Please see {@see ConfigServiceV2Client::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Logging\V2\ListSinksRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource whose sinks are to be listed: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * @type string $page_token - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource whose sinks are to be listed: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource whose sinks are to be listed: - * "projects/[PROJECT_ID]" - * "organizations/[ORGANIZATION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]" - * "folders/[FOLDER_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksResponse.php deleted file mode 100644 index 513450b4ee05..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListSinksResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.logging.v2.ListSinksResponse - */ -class ListSinksResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of sinks. - * - * Generated from protobuf field repeated .google.logging.v2.LogSink sinks = 1; - */ - private $sinks; - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Logging\V2\LogSink[] $sinks - * A list of sinks. - * @type string $next_page_token - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * A list of sinks. - * - * Generated from protobuf field repeated .google.logging.v2.LogSink sinks = 1; - * @return RepeatedField<\Google\Cloud\Logging\V2\LogSink> - */ - public function getSinks() - { - return $this->sinks; - } - - /** - * A list of sinks. - * - * Generated from protobuf field repeated .google.logging.v2.LogSink sinks = 1; - * @param \Google\Cloud\Logging\V2\LogSink[] $var - * @return $this - */ - public function setSinks($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogSink::class); - $this->sinks = $arr; - - return $this; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsRequest.php deleted file mode 100644 index 1631b3f0f592..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.logging.v2.ListViewsRequest - */ -class ListViewsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The bucket whose views are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - - /** - * @param string $parent Required. The bucket whose views are to be listed: - * - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * @return \Google\Cloud\Logging\V2\ListViewsRequest - * - * @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 bucket whose views are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * @type string $page_token - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * @type int $page_size - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The bucket whose views are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The bucket whose views are to be listed: - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. If present, then retrieve the next batch of results from the - * preceding call to this method. `pageToken` must be the value of - * `nextPageToken` from the previous response. The values of other method - * parameters should be identical to those in the previous call. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of results to return from this request. - * Non-positive values are ignored. The presence of `nextPageToken` in the - * response indicates that more results might be available. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsResponse.php deleted file mode 100644 index ecc28441482c..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/ListViewsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.logging.v2.ListViewsResponse - */ -class ListViewsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of views. - * - * Generated from protobuf field repeated .google.logging.v2.LogView views = 1; - */ - private $views; - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Logging\V2\LogView[] $views - * A list of views. - * @type string $next_page_token - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * A list of views. - * - * Generated from protobuf field repeated .google.logging.v2.LogView views = 1; - * @return RepeatedField<\Google\Cloud\Logging\V2\LogView> - */ - public function getViews() - { - return $this->views; - } - - /** - * A list of views. - * - * Generated from protobuf field repeated .google.logging.v2.LogView views = 1; - * @param \Google\Cloud\Logging\V2\LogView[] $var - * @return $this - */ - public function setViews($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogView::class); - $this->views = $arr; - - return $this; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If there might be more results than appear in this response, then - * `nextPageToken` is included. To get the next set of results, call the same - * method again using the value of `nextPageToken` as `pageToken`. - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/LocationMetadata.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LocationMetadata.php deleted file mode 100644 index a101ab0e4e41..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LocationMetadata.php +++ /dev/null @@ -1,71 +0,0 @@ -google.logging.v2.LocationMetadata - */ -class LocationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Indicates whether or not Log Analytics features are supported in the given - * location. - * - * Generated from protobuf field bool log_analytics_enabled = 1; - */ - protected $log_analytics_enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $log_analytics_enabled - * Indicates whether or not Log Analytics features are supported in the given - * location. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Indicates whether or not Log Analytics features are supported in the given - * location. - * - * Generated from protobuf field bool log_analytics_enabled = 1; - * @return bool - */ - public function getLogAnalyticsEnabled() - { - return $this->log_analytics_enabled; - } - - /** - * Indicates whether or not Log Analytics features are supported in the given - * location. - * - * Generated from protobuf field bool log_analytics_enabled = 1; - * @param bool $var - * @return $this - */ - public function setLogAnalyticsEnabled($var) - { - GPBUtil::checkBool($var); - $this->log_analytics_enabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogBucket.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogBucket.php deleted file mode 100644 index b1314fed0837..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogBucket.php +++ /dev/null @@ -1,525 +0,0 @@ -google.logging.v2.LogBucket - */ -class LogBucket extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the bucket. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket` - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support) - * For the location of `global` it is unspecified where log entries are - * actually stored. - * After a bucket has been created, the location cannot be changed. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Describes this bucket. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Output only. The creation timestamp of the bucket. This is not set for any - * of the default buckets. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last update timestamp of the bucket. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Logs will be retained by default for this amount of time, after which they - * will automatically be deleted. The minimum retention period is 1 day. If - * this value is set to zero at bucket creation time, the default time of 30 - * days will be used. - * - * Generated from protobuf field int32 retention_days = 11; - */ - protected $retention_days = 0; - /** - * Whether the bucket is locked. - * The retention period on a locked bucket cannot be changed. Locked buckets - * may only be deleted if they are empty. - * - * Generated from protobuf field bool locked = 9; - */ - protected $locked = false; - /** - * Output only. The bucket lifecycle state. - * - * Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $lifecycle_state = 0; - /** - * Whether log analytics is enabled for this bucket. - * Once enabled, log analytics features cannot be disabled. - * - * Generated from protobuf field bool analytics_enabled = 14; - */ - protected $analytics_enabled = false; - /** - * Log entry field paths that are denied access in this bucket. - * The following fields and their children are eligible: `textPayload`, - * `jsonPayload`, `protoPayload`, `httpRequest`, `labels`, `sourceLocation`. - * Restricting a repeated field will restrict all values. Adding a parent will - * block all child fields. (e.g. `foo.bar` will block `foo.bar.baz`) - * - * Generated from protobuf field repeated string restricted_fields = 15; - */ - private $restricted_fields; - /** - * A list of indexed fields and related configuration data. - * - * Generated from protobuf field repeated .google.logging.v2.IndexConfig index_configs = 17; - */ - private $index_configs; - /** - * The CMEK settings of the log bucket. If present, new log entries written to - * this log bucket are encrypted using the CMEK key provided in this - * configuration. If a log bucket has CMEK settings, the CMEK settings cannot - * be disabled later by updating the log bucket. Changing the KMS key is - * allowed. - * - * Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 19; - */ - protected $cmek_settings = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the bucket. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket` - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support) - * For the location of `global` it is unspecified where log entries are - * actually stored. - * After a bucket has been created, the location cannot be changed. - * @type string $description - * Describes this bucket. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation timestamp of the bucket. This is not set for any - * of the default buckets. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update timestamp of the bucket. - * @type int $retention_days - * Logs will be retained by default for this amount of time, after which they - * will automatically be deleted. The minimum retention period is 1 day. If - * this value is set to zero at bucket creation time, the default time of 30 - * days will be used. - * @type bool $locked - * Whether the bucket is locked. - * The retention period on a locked bucket cannot be changed. Locked buckets - * may only be deleted if they are empty. - * @type int $lifecycle_state - * Output only. The bucket lifecycle state. - * @type bool $analytics_enabled - * Whether log analytics is enabled for this bucket. - * Once enabled, log analytics features cannot be disabled. - * @type string[] $restricted_fields - * Log entry field paths that are denied access in this bucket. - * The following fields and their children are eligible: `textPayload`, - * `jsonPayload`, `protoPayload`, `httpRequest`, `labels`, `sourceLocation`. - * Restricting a repeated field will restrict all values. Adding a parent will - * block all child fields. (e.g. `foo.bar` will block `foo.bar.baz`) - * @type \Google\Cloud\Logging\V2\IndexConfig[] $index_configs - * A list of indexed fields and related configuration data. - * @type \Google\Cloud\Logging\V2\CmekSettings $cmek_settings - * The CMEK settings of the log bucket. If present, new log entries written to - * this log bucket are encrypted using the CMEK key provided in this - * configuration. If a log bucket has CMEK settings, the CMEK settings cannot - * be disabled later by updating the log bucket. Changing the KMS key is - * allowed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the bucket. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket` - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support) - * For the location of `global` it is unspecified where log entries are - * actually stored. - * After a bucket has been created, the location cannot be changed. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the bucket. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket` - * For a list of supported locations, see [Supported - * Regions](https://cloud.google.com/logging/docs/region-support) - * For the location of `global` it is unspecified where log entries are - * actually stored. - * After a bucket has been created, the location cannot be changed. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Describes this bucket. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Describes this bucket. - * - * 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; - } - - /** - * Output only. The creation timestamp of the bucket. This is not set for any - * of the default buckets. - * - * 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 creation timestamp of the bucket. This is not set for any - * of the default buckets. - * - * 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; - } - - /** - * Output only. The last update timestamp of the bucket. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last update timestamp of the bucket. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Logs will be retained by default for this amount of time, after which they - * will automatically be deleted. The minimum retention period is 1 day. If - * this value is set to zero at bucket creation time, the default time of 30 - * days will be used. - * - * Generated from protobuf field int32 retention_days = 11; - * @return int - */ - public function getRetentionDays() - { - return $this->retention_days; - } - - /** - * Logs will be retained by default for this amount of time, after which they - * will automatically be deleted. The minimum retention period is 1 day. If - * this value is set to zero at bucket creation time, the default time of 30 - * days will be used. - * - * Generated from protobuf field int32 retention_days = 11; - * @param int $var - * @return $this - */ - public function setRetentionDays($var) - { - GPBUtil::checkInt32($var); - $this->retention_days = $var; - - return $this; - } - - /** - * Whether the bucket is locked. - * The retention period on a locked bucket cannot be changed. Locked buckets - * may only be deleted if they are empty. - * - * Generated from protobuf field bool locked = 9; - * @return bool - */ - public function getLocked() - { - return $this->locked; - } - - /** - * Whether the bucket is locked. - * The retention period on a locked bucket cannot be changed. Locked buckets - * may only be deleted if they are empty. - * - * Generated from protobuf field bool locked = 9; - * @param bool $var - * @return $this - */ - public function setLocked($var) - { - GPBUtil::checkBool($var); - $this->locked = $var; - - return $this; - } - - /** - * Output only. The bucket lifecycle state. - * - * Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getLifecycleState() - { - return $this->lifecycle_state; - } - - /** - * Output only. The bucket lifecycle state. - * - * Generated from protobuf field .google.logging.v2.LifecycleState lifecycle_state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setLifecycleState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\LifecycleState::class); - $this->lifecycle_state = $var; - - return $this; - } - - /** - * Whether log analytics is enabled for this bucket. - * Once enabled, log analytics features cannot be disabled. - * - * Generated from protobuf field bool analytics_enabled = 14; - * @return bool - */ - public function getAnalyticsEnabled() - { - return $this->analytics_enabled; - } - - /** - * Whether log analytics is enabled for this bucket. - * Once enabled, log analytics features cannot be disabled. - * - * Generated from protobuf field bool analytics_enabled = 14; - * @param bool $var - * @return $this - */ - public function setAnalyticsEnabled($var) - { - GPBUtil::checkBool($var); - $this->analytics_enabled = $var; - - return $this; - } - - /** - * Log entry field paths that are denied access in this bucket. - * The following fields and their children are eligible: `textPayload`, - * `jsonPayload`, `protoPayload`, `httpRequest`, `labels`, `sourceLocation`. - * Restricting a repeated field will restrict all values. Adding a parent will - * block all child fields. (e.g. `foo.bar` will block `foo.bar.baz`) - * - * Generated from protobuf field repeated string restricted_fields = 15; - * @return RepeatedField - */ - public function getRestrictedFields() - { - return $this->restricted_fields; - } - - /** - * Log entry field paths that are denied access in this bucket. - * The following fields and their children are eligible: `textPayload`, - * `jsonPayload`, `protoPayload`, `httpRequest`, `labels`, `sourceLocation`. - * Restricting a repeated field will restrict all values. Adding a parent will - * block all child fields. (e.g. `foo.bar` will block `foo.bar.baz`) - * - * Generated from protobuf field repeated string restricted_fields = 15; - * @param string[] $var - * @return $this - */ - public function setRestrictedFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->restricted_fields = $arr; - - return $this; - } - - /** - * A list of indexed fields and related configuration data. - * - * Generated from protobuf field repeated .google.logging.v2.IndexConfig index_configs = 17; - * @return RepeatedField<\Google\Cloud\Logging\V2\IndexConfig> - */ - public function getIndexConfigs() - { - return $this->index_configs; - } - - /** - * A list of indexed fields and related configuration data. - * - * Generated from protobuf field repeated .google.logging.v2.IndexConfig index_configs = 17; - * @param \Google\Cloud\Logging\V2\IndexConfig[] $var - * @return $this - */ - public function setIndexConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\IndexConfig::class); - $this->index_configs = $arr; - - return $this; - } - - /** - * The CMEK settings of the log bucket. If present, new log entries written to - * this log bucket are encrypted using the CMEK key provided in this - * configuration. If a log bucket has CMEK settings, the CMEK settings cannot - * be disabled later by updating the log bucket. Changing the KMS key is - * allowed. - * - * Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 19; - * @return \Google\Cloud\Logging\V2\CmekSettings|null - */ - public function getCmekSettings() - { - return $this->cmek_settings; - } - - public function hasCmekSettings() - { - return isset($this->cmek_settings); - } - - public function clearCmekSettings() - { - unset($this->cmek_settings); - } - - /** - * The CMEK settings of the log bucket. If present, new log entries written to - * this log bucket are encrypted using the CMEK key provided in this - * configuration. If a log bucket has CMEK settings, the CMEK settings cannot - * be disabled later by updating the log bucket. Changing the KMS key is - * allowed. - * - * Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 19; - * @param \Google\Cloud\Logging\V2\CmekSettings $var - * @return $this - */ - public function setCmekSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\CmekSettings::class); - $this->cmek_settings = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntry.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntry.php deleted file mode 100644 index 8592900f4140..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntry.php +++ /dev/null @@ -1,1061 +0,0 @@ -google.logging.v2.LogEntry - */ -class LogEntry extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the log to which this log entry belongs: - * "projects/[PROJECT_ID]/logs/[LOG_ID]" - * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * A project number may be used in place of PROJECT_ID. The project number is - * translated to its corresponding PROJECT_ID internally and the `log_name` - * field will contain PROJECT_ID in queries and exports. - * `[LOG_ID]` must be URL-encoded within `log_name`. Example: - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * `[LOG_ID]` must be less than 512 characters long and can only include the - * following characters: upper and lower case alphanumeric characters, - * forward-slash, underscore, hyphen, and period. - * For backward compatibility, if `log_name` begins with a forward-slash, such - * as `/projects/...`, then the log entry is ingested as usual, but the - * forward-slash is removed. Listing the log entry will not show the leading - * slash and filtering for a log name with a leading slash will never return - * any results. - * - * Generated from protobuf field string log_name = 12 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $log_name = ''; - /** - * Required. The monitored resource that produced this log entry. - * Example: a log entry that reports a database error would be associated with - * the monitored resource designating the particular database that reported - * the error. - * - * Generated from protobuf field .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $resource = null; - /** - * Optional. The time the event described by the log entry occurred. This time - * is used to compute the log entry's age and to enforce the logs retention - * period. If this field is omitted in a new log entry, then Logging assigns - * it the current time. Timestamps have nanosecond accuracy, but trailing - * zeros in the fractional seconds might be omitted when the timestamp is - * displayed. - * Incoming log entries must have timestamps that don't exceed the - * [logs retention - * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in - * the past, and that don't exceed 24 hours in the future. Log entries outside - * those time boundaries aren't ingested by Logging. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $timestamp = null; - /** - * Output only. The time the log entry was received by Logging. - * - * Generated from protobuf field .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $receive_timestamp = null; - /** - * Optional. The severity of the log entry. The default value is - * `LogSeverity.DEFAULT`. - * - * Generated from protobuf field .google.logging.type.LogSeverity severity = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $severity = 0; - /** - * Optional. A unique identifier for the log entry. If you provide a value, - * then Logging considers other log entries in the same project, with the same - * `timestamp`, and with the same `insert_id` to be duplicates which are - * removed in a single query result. However, there are no guarantees of - * de-duplication in the export of logs. - * If the `insert_id` is omitted when writing a log entry, the Logging API - * assigns its own unique identifier in this field. - * In queries, the `insert_id` is also used to order log entries that have - * the same `log_name` and `timestamp` values. - * - * Generated from protobuf field string insert_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $insert_id = ''; - /** - * Optional. Information about the HTTP request associated with this log - * entry, if applicable. - * - * Generated from protobuf field .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $http_request = null; - /** - * Optional. A map of key, value pairs that provides additional information - * about the log entry. The labels can be user-defined or system-defined. - * User-defined labels are arbitrary key, value pairs that you can use to - * classify logs. - * System-defined labels are defined by GCP services for platform logs. - * They have two components - a service namespace component and the - * attribute name. For example: `compute.googleapis.com/resource_name`. - * Cloud Logging truncates label keys that exceed 512 B and label - * values that exceed 64 KB upon their associated log entry being - * written. The truncation is indicated by an ellipsis at the - * end of the character string. - * - * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Optional. Information about an operation associated with the log entry, if - * applicable. - * - * Generated from protobuf field .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $operation = null; - /** - * Optional. The REST resource name of the trace being written to - * [Cloud Trace](https://cloud.google.com/trace) in - * association with this log entry. For example, if your trace data is stored - * in the Cloud project "my-trace-project" and if the service that is creating - * the log entry receives a trace header that includes the trace ID "12345", - * then the service should use "projects/my-tracing-project/traces/12345". - * The `trace` field provides the link between logs and traces. By using - * this field, you can navigate from a log entry to a trace. - * - * Generated from protobuf field string trace = 22 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $trace = ''; - /** - * Optional. The ID of the [Cloud Trace](https://cloud.google.com/trace) span - * associated with the current operation in which the log is being written. - * For example, if a span has the REST resource name of - * "projects/some-project/traces/some-trace/spans/some-span-id", then the - * `span_id` field is "some-span-id". - * A - * [Span](https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) - * represents a single operation within a trace. Whereas a trace may involve - * multiple different microservices running on multiple different machines, - * a span generally corresponds to a single logical operation being performed - * in a single instance of a microservice on one specific machine. Spans - * are the nodes within the tree that is a trace. - * Applications that are [instrumented for - * tracing](https://cloud.google.com/trace/docs/setup) will generally assign a - * new, unique span ID on each incoming request. It is also common to create - * and record additional spans corresponding to internal processing elements - * as well as issuing requests to dependencies. - * The span ID is expected to be a 16-character, hexadecimal encoding of an - * 8-byte array and should not be zero. It should be unique within the trace - * and should, ideally, be generated in a manner that is uniformly random. - * Example values: - * - `000000000000004a` - * - `7a2190356c3fc94b` - * - `0000f00300090021` - * - `d39223e101960076` - * - * Generated from protobuf field string span_id = 27 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $span_id = ''; - /** - * Optional. The sampling decision of the trace associated with the log entry. - * True means that the trace resource name in the `trace` field was sampled - * for storage in a trace backend. False means that the trace was not sampled - * for storage when this log entry was written, or the sampling decision was - * unknown at the time. A non-sampled `trace` value is still useful as a - * request correlation identifier. The default is False. - * - * Generated from protobuf field bool trace_sampled = 30 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $trace_sampled = false; - /** - * Optional. Source code location information associated with the log entry, - * if any. - * - * Generated from protobuf field .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $source_location = null; - /** - * Optional. Information indicating this LogEntry is part of a sequence of - * multiple log entries split from a single LogEntry. - * - * Generated from protobuf field .google.logging.v2.LogSplit split = 35 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $split = null; - protected $payload; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $log_name - * Required. The resource name of the log to which this log entry belongs: - * "projects/[PROJECT_ID]/logs/[LOG_ID]" - * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * A project number may be used in place of PROJECT_ID. The project number is - * translated to its corresponding PROJECT_ID internally and the `log_name` - * field will contain PROJECT_ID in queries and exports. - * `[LOG_ID]` must be URL-encoded within `log_name`. Example: - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * `[LOG_ID]` must be less than 512 characters long and can only include the - * following characters: upper and lower case alphanumeric characters, - * forward-slash, underscore, hyphen, and period. - * For backward compatibility, if `log_name` begins with a forward-slash, such - * as `/projects/...`, then the log entry is ingested as usual, but the - * forward-slash is removed. Listing the log entry will not show the leading - * slash and filtering for a log name with a leading slash will never return - * any results. - * @type \Google\Api\MonitoredResource $resource - * Required. The monitored resource that produced this log entry. - * Example: a log entry that reports a database error would be associated with - * the monitored resource designating the particular database that reported - * the error. - * @type \Google\Protobuf\Any $proto_payload - * The log entry payload, represented as a protocol buffer. Some Google - * Cloud Platform services use this field for their log entry payloads. - * The following protocol buffer types are supported; user-defined types - * are not supported: - * "type.googleapis.com/google.cloud.audit.AuditLog" - * "type.googleapis.com/google.appengine.logging.v1.RequestLog" - * @type string $text_payload - * The log entry payload, represented as a Unicode string (UTF-8). - * @type \Google\Protobuf\Struct $json_payload - * The log entry payload, represented as a structure that is - * expressed as a JSON object. - * @type \Google\Protobuf\Timestamp $timestamp - * Optional. The time the event described by the log entry occurred. This time - * is used to compute the log entry's age and to enforce the logs retention - * period. If this field is omitted in a new log entry, then Logging assigns - * it the current time. Timestamps have nanosecond accuracy, but trailing - * zeros in the fractional seconds might be omitted when the timestamp is - * displayed. - * Incoming log entries must have timestamps that don't exceed the - * [logs retention - * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in - * the past, and that don't exceed 24 hours in the future. Log entries outside - * those time boundaries aren't ingested by Logging. - * @type \Google\Protobuf\Timestamp $receive_timestamp - * Output only. The time the log entry was received by Logging. - * @type int $severity - * Optional. The severity of the log entry. The default value is - * `LogSeverity.DEFAULT`. - * @type string $insert_id - * Optional. A unique identifier for the log entry. If you provide a value, - * then Logging considers other log entries in the same project, with the same - * `timestamp`, and with the same `insert_id` to be duplicates which are - * removed in a single query result. However, there are no guarantees of - * de-duplication in the export of logs. - * If the `insert_id` is omitted when writing a log entry, the Logging API - * assigns its own unique identifier in this field. - * In queries, the `insert_id` is also used to order log entries that have - * the same `log_name` and `timestamp` values. - * @type \Google\Cloud\Logging\Type\HttpRequest $http_request - * Optional. Information about the HTTP request associated with this log - * entry, if applicable. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. A map of key, value pairs that provides additional information - * about the log entry. The labels can be user-defined or system-defined. - * User-defined labels are arbitrary key, value pairs that you can use to - * classify logs. - * System-defined labels are defined by GCP services for platform logs. - * They have two components - a service namespace component and the - * attribute name. For example: `compute.googleapis.com/resource_name`. - * Cloud Logging truncates label keys that exceed 512 B and label - * values that exceed 64 KB upon their associated log entry being - * written. The truncation is indicated by an ellipsis at the - * end of the character string. - * @type \Google\Cloud\Logging\V2\LogEntryOperation $operation - * Optional. Information about an operation associated with the log entry, if - * applicable. - * @type string $trace - * Optional. The REST resource name of the trace being written to - * [Cloud Trace](https://cloud.google.com/trace) in - * association with this log entry. For example, if your trace data is stored - * in the Cloud project "my-trace-project" and if the service that is creating - * the log entry receives a trace header that includes the trace ID "12345", - * then the service should use "projects/my-tracing-project/traces/12345". - * The `trace` field provides the link between logs and traces. By using - * this field, you can navigate from a log entry to a trace. - * @type string $span_id - * Optional. The ID of the [Cloud Trace](https://cloud.google.com/trace) span - * associated with the current operation in which the log is being written. - * For example, if a span has the REST resource name of - * "projects/some-project/traces/some-trace/spans/some-span-id", then the - * `span_id` field is "some-span-id". - * A - * [Span](https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) - * represents a single operation within a trace. Whereas a trace may involve - * multiple different microservices running on multiple different machines, - * a span generally corresponds to a single logical operation being performed - * in a single instance of a microservice on one specific machine. Spans - * are the nodes within the tree that is a trace. - * Applications that are [instrumented for - * tracing](https://cloud.google.com/trace/docs/setup) will generally assign a - * new, unique span ID on each incoming request. It is also common to create - * and record additional spans corresponding to internal processing elements - * as well as issuing requests to dependencies. - * The span ID is expected to be a 16-character, hexadecimal encoding of an - * 8-byte array and should not be zero. It should be unique within the trace - * and should, ideally, be generated in a manner that is uniformly random. - * Example values: - * - `000000000000004a` - * - `7a2190356c3fc94b` - * - `0000f00300090021` - * - `d39223e101960076` - * @type bool $trace_sampled - * Optional. The sampling decision of the trace associated with the log entry. - * True means that the trace resource name in the `trace` field was sampled - * for storage in a trace backend. False means that the trace was not sampled - * for storage when this log entry was written, or the sampling decision was - * unknown at the time. A non-sampled `trace` value is still useful as a - * request correlation identifier. The default is False. - * @type \Google\Cloud\Logging\V2\LogEntrySourceLocation $source_location - * Optional. Source code location information associated with the log entry, - * if any. - * @type \Google\Cloud\Logging\V2\LogSplit $split - * Optional. Information indicating this LogEntry is part of a sequence of - * multiple log entries split from a single LogEntry. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LogEntry::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the log to which this log entry belongs: - * "projects/[PROJECT_ID]/logs/[LOG_ID]" - * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * A project number may be used in place of PROJECT_ID. The project number is - * translated to its corresponding PROJECT_ID internally and the `log_name` - * field will contain PROJECT_ID in queries and exports. - * `[LOG_ID]` must be URL-encoded within `log_name`. Example: - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * `[LOG_ID]` must be less than 512 characters long and can only include the - * following characters: upper and lower case alphanumeric characters, - * forward-slash, underscore, hyphen, and period. - * For backward compatibility, if `log_name` begins with a forward-slash, such - * as `/projects/...`, then the log entry is ingested as usual, but the - * forward-slash is removed. Listing the log entry will not show the leading - * slash and filtering for a log name with a leading slash will never return - * any results. - * - * Generated from protobuf field string log_name = 12 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getLogName() - { - return $this->log_name; - } - - /** - * Required. The resource name of the log to which this log entry belongs: - * "projects/[PROJECT_ID]/logs/[LOG_ID]" - * "organizations/[ORGANIZATION_ID]/logs/[LOG_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]" - * "folders/[FOLDER_ID]/logs/[LOG_ID]" - * A project number may be used in place of PROJECT_ID. The project number is - * translated to its corresponding PROJECT_ID internally and the `log_name` - * field will contain PROJECT_ID in queries and exports. - * `[LOG_ID]` must be URL-encoded within `log_name`. Example: - * `"organizations/1234567890/logs/cloudresourcemanager.googleapis.com%2Factivity"`. - * `[LOG_ID]` must be less than 512 characters long and can only include the - * following characters: upper and lower case alphanumeric characters, - * forward-slash, underscore, hyphen, and period. - * For backward compatibility, if `log_name` begins with a forward-slash, such - * as `/projects/...`, then the log entry is ingested as usual, but the - * forward-slash is removed. Listing the log entry will not show the leading - * slash and filtering for a log name with a leading slash will never return - * any results. - * - * Generated from protobuf field string log_name = 12 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setLogName($var) - { - GPBUtil::checkString($var, True); - $this->log_name = $var; - - return $this; - } - - /** - * Required. The monitored resource that produced this log entry. - * Example: a log entry that reports a database error would be associated with - * the monitored resource designating the particular database that reported - * the error. - * - * Generated from protobuf field .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Api\MonitoredResource|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * Required. The monitored resource that produced this log entry. - * Example: a log entry that reports a database error would be associated with - * the monitored resource designating the particular database that reported - * the error. - * - * Generated from protobuf field .google.api.MonitoredResource resource = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Api\MonitoredResource $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Api\MonitoredResource::class); - $this->resource = $var; - - return $this; - } - - /** - * The log entry payload, represented as a protocol buffer. Some Google - * Cloud Platform services use this field for their log entry payloads. - * The following protocol buffer types are supported; user-defined types - * are not supported: - * "type.googleapis.com/google.cloud.audit.AuditLog" - * "type.googleapis.com/google.appengine.logging.v1.RequestLog" - * - * Generated from protobuf field .google.protobuf.Any proto_payload = 2; - * @return \Google\Protobuf\Any|null - */ - public function getProtoPayload() - { - return $this->readOneof(2); - } - - public function hasProtoPayload() - { - return $this->hasOneof(2); - } - - /** - * The log entry payload, represented as a protocol buffer. Some Google - * Cloud Platform services use this field for their log entry payloads. - * The following protocol buffer types are supported; user-defined types - * are not supported: - * "type.googleapis.com/google.cloud.audit.AuditLog" - * "type.googleapis.com/google.appengine.logging.v1.RequestLog" - * - * Generated from protobuf field .google.protobuf.Any proto_payload = 2; - * @param \Google\Protobuf\Any $var - * @return $this - */ - public function setProtoPayload($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The log entry payload, represented as a Unicode string (UTF-8). - * - * Generated from protobuf field string text_payload = 3; - * @return string - */ - public function getTextPayload() - { - return $this->readOneof(3); - } - - public function hasTextPayload() - { - return $this->hasOneof(3); - } - - /** - * The log entry payload, represented as a Unicode string (UTF-8). - * - * Generated from protobuf field string text_payload = 3; - * @param string $var - * @return $this - */ - public function setTextPayload($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The log entry payload, represented as a structure that is - * expressed as a JSON object. - * - * Generated from protobuf field .google.protobuf.Struct json_payload = 6; - * @return \Google\Protobuf\Struct|null - */ - public function getJsonPayload() - { - return $this->readOneof(6); - } - - public function hasJsonPayload() - { - return $this->hasOneof(6); - } - - /** - * The log entry payload, represented as a structure that is - * expressed as a JSON object. - * - * Generated from protobuf field .google.protobuf.Struct json_payload = 6; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setJsonPayload($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Optional. The time the event described by the log entry occurred. This time - * is used to compute the log entry's age and to enforce the logs retention - * period. If this field is omitted in a new log entry, then Logging assigns - * it the current time. Timestamps have nanosecond accuracy, but trailing - * zeros in the fractional seconds might be omitted when the timestamp is - * displayed. - * Incoming log entries must have timestamps that don't exceed the - * [logs retention - * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in - * the past, and that don't exceed 24 hours in the future. Log entries outside - * those time boundaries aren't ingested by Logging. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTimestamp() - { - return $this->timestamp; - } - - public function hasTimestamp() - { - return isset($this->timestamp); - } - - public function clearTimestamp() - { - unset($this->timestamp); - } - - /** - * Optional. The time the event described by the log entry occurred. This time - * is used to compute the log entry's age and to enforce the logs retention - * period. If this field is omitted in a new log entry, then Logging assigns - * it the current time. Timestamps have nanosecond accuracy, but trailing - * zeros in the fractional seconds might be omitted when the timestamp is - * displayed. - * Incoming log entries must have timestamps that don't exceed the - * [logs retention - * period](https://cloud.google.com/logging/quotas#logs_retention_periods) in - * the past, and that don't exceed 24 hours in the future. Log entries outside - * those time boundaries aren't ingested by Logging. - * - * Generated from protobuf field .google.protobuf.Timestamp timestamp = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTimestamp($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->timestamp = $var; - - return $this; - } - - /** - * Output only. The time the log entry was received by Logging. - * - * Generated from protobuf field .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getReceiveTimestamp() - { - return $this->receive_timestamp; - } - - public function hasReceiveTimestamp() - { - return isset($this->receive_timestamp); - } - - public function clearReceiveTimestamp() - { - unset($this->receive_timestamp); - } - - /** - * Output only. The time the log entry was received by Logging. - * - * Generated from protobuf field .google.protobuf.Timestamp receive_timestamp = 24 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setReceiveTimestamp($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->receive_timestamp = $var; - - return $this; - } - - /** - * Optional. The severity of the log entry. The default value is - * `LogSeverity.DEFAULT`. - * - * Generated from protobuf field .google.logging.type.LogSeverity severity = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getSeverity() - { - return $this->severity; - } - - /** - * Optional. The severity of the log entry. The default value is - * `LogSeverity.DEFAULT`. - * - * Generated from protobuf field .google.logging.type.LogSeverity severity = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setSeverity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Logging\Type\LogSeverity::class); - $this->severity = $var; - - return $this; - } - - /** - * Optional. A unique identifier for the log entry. If you provide a value, - * then Logging considers other log entries in the same project, with the same - * `timestamp`, and with the same `insert_id` to be duplicates which are - * removed in a single query result. However, there are no guarantees of - * de-duplication in the export of logs. - * If the `insert_id` is omitted when writing a log entry, the Logging API - * assigns its own unique identifier in this field. - * In queries, the `insert_id` is also used to order log entries that have - * the same `log_name` and `timestamp` values. - * - * Generated from protobuf field string insert_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getInsertId() - { - return $this->insert_id; - } - - /** - * Optional. A unique identifier for the log entry. If you provide a value, - * then Logging considers other log entries in the same project, with the same - * `timestamp`, and with the same `insert_id` to be duplicates which are - * removed in a single query result. However, there are no guarantees of - * de-duplication in the export of logs. - * If the `insert_id` is omitted when writing a log entry, the Logging API - * assigns its own unique identifier in this field. - * In queries, the `insert_id` is also used to order log entries that have - * the same `log_name` and `timestamp` values. - * - * Generated from protobuf field string insert_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setInsertId($var) - { - GPBUtil::checkString($var, True); - $this->insert_id = $var; - - return $this; - } - - /** - * Optional. Information about the HTTP request associated with this log - * entry, if applicable. - * - * Generated from protobuf field .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Logging\Type\HttpRequest|null - */ - public function getHttpRequest() - { - return $this->http_request; - } - - public function hasHttpRequest() - { - return isset($this->http_request); - } - - public function clearHttpRequest() - { - unset($this->http_request); - } - - /** - * Optional. Information about the HTTP request associated with this log - * entry, if applicable. - * - * Generated from protobuf field .google.logging.type.HttpRequest http_request = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Logging\Type\HttpRequest $var - * @return $this - */ - public function setHttpRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\Type\HttpRequest::class); - $this->http_request = $var; - - return $this; - } - - /** - * Optional. A map of key, value pairs that provides additional information - * about the log entry. The labels can be user-defined or system-defined. - * User-defined labels are arbitrary key, value pairs that you can use to - * classify logs. - * System-defined labels are defined by GCP services for platform logs. - * They have two components - a service namespace component and the - * attribute name. For example: `compute.googleapis.com/resource_name`. - * Cloud Logging truncates label keys that exceed 512 B and label - * values that exceed 64 KB upon their associated log entry being - * written. The truncation is indicated by an ellipsis at the - * end of the character string. - * - * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. A map of key, value pairs that provides additional information - * about the log entry. The labels can be user-defined or system-defined. - * User-defined labels are arbitrary key, value pairs that you can use to - * classify logs. - * System-defined labels are defined by GCP services for platform logs. - * They have two components - a service namespace component and the - * attribute name. For example: `compute.googleapis.com/resource_name`. - * Cloud Logging truncates label keys that exceed 512 B and label - * values that exceed 64 KB upon their associated log entry being - * written. The truncation is indicated by an ellipsis at the - * end of the character string. - * - * Generated from protobuf field map labels = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @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; - } - - /** - * Optional. Information about an operation associated with the log entry, if - * applicable. - * - * Generated from protobuf field .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Logging\V2\LogEntryOperation|null - */ - public function getOperation() - { - return $this->operation; - } - - public function hasOperation() - { - return isset($this->operation); - } - - public function clearOperation() - { - unset($this->operation); - } - - /** - * Optional. Information about an operation associated with the log entry, if - * applicable. - * - * Generated from protobuf field .google.logging.v2.LogEntryOperation operation = 15 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Logging\V2\LogEntryOperation $var - * @return $this - */ - public function setOperation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogEntryOperation::class); - $this->operation = $var; - - return $this; - } - - /** - * Optional. The REST resource name of the trace being written to - * [Cloud Trace](https://cloud.google.com/trace) in - * association with this log entry. For example, if your trace data is stored - * in the Cloud project "my-trace-project" and if the service that is creating - * the log entry receives a trace header that includes the trace ID "12345", - * then the service should use "projects/my-tracing-project/traces/12345". - * The `trace` field provides the link between logs and traces. By using - * this field, you can navigate from a log entry to a trace. - * - * Generated from protobuf field string trace = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTrace() - { - return $this->trace; - } - - /** - * Optional. The REST resource name of the trace being written to - * [Cloud Trace](https://cloud.google.com/trace) in - * association with this log entry. For example, if your trace data is stored - * in the Cloud project "my-trace-project" and if the service that is creating - * the log entry receives a trace header that includes the trace ID "12345", - * then the service should use "projects/my-tracing-project/traces/12345". - * The `trace` field provides the link between logs and traces. By using - * this field, you can navigate from a log entry to a trace. - * - * Generated from protobuf field string trace = 22 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTrace($var) - { - GPBUtil::checkString($var, True); - $this->trace = $var; - - return $this; - } - - /** - * Optional. The ID of the [Cloud Trace](https://cloud.google.com/trace) span - * associated with the current operation in which the log is being written. - * For example, if a span has the REST resource name of - * "projects/some-project/traces/some-trace/spans/some-span-id", then the - * `span_id` field is "some-span-id". - * A - * [Span](https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) - * represents a single operation within a trace. Whereas a trace may involve - * multiple different microservices running on multiple different machines, - * a span generally corresponds to a single logical operation being performed - * in a single instance of a microservice on one specific machine. Spans - * are the nodes within the tree that is a trace. - * Applications that are [instrumented for - * tracing](https://cloud.google.com/trace/docs/setup) will generally assign a - * new, unique span ID on each incoming request. It is also common to create - * and record additional spans corresponding to internal processing elements - * as well as issuing requests to dependencies. - * The span ID is expected to be a 16-character, hexadecimal encoding of an - * 8-byte array and should not be zero. It should be unique within the trace - * and should, ideally, be generated in a manner that is uniformly random. - * Example values: - * - `000000000000004a` - * - `7a2190356c3fc94b` - * - `0000f00300090021` - * - `d39223e101960076` - * - * Generated from protobuf field string span_id = 27 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSpanId() - { - return $this->span_id; - } - - /** - * Optional. The ID of the [Cloud Trace](https://cloud.google.com/trace) span - * associated with the current operation in which the log is being written. - * For example, if a span has the REST resource name of - * "projects/some-project/traces/some-trace/spans/some-span-id", then the - * `span_id` field is "some-span-id". - * A - * [Span](https://cloud.google.com/trace/docs/reference/v2/rest/v2/projects.traces/batchWrite#Span) - * represents a single operation within a trace. Whereas a trace may involve - * multiple different microservices running on multiple different machines, - * a span generally corresponds to a single logical operation being performed - * in a single instance of a microservice on one specific machine. Spans - * are the nodes within the tree that is a trace. - * Applications that are [instrumented for - * tracing](https://cloud.google.com/trace/docs/setup) will generally assign a - * new, unique span ID on each incoming request. It is also common to create - * and record additional spans corresponding to internal processing elements - * as well as issuing requests to dependencies. - * The span ID is expected to be a 16-character, hexadecimal encoding of an - * 8-byte array and should not be zero. It should be unique within the trace - * and should, ideally, be generated in a manner that is uniformly random. - * Example values: - * - `000000000000004a` - * - `7a2190356c3fc94b` - * - `0000f00300090021` - * - `d39223e101960076` - * - * Generated from protobuf field string span_id = 27 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSpanId($var) - { - GPBUtil::checkString($var, True); - $this->span_id = $var; - - return $this; - } - - /** - * Optional. The sampling decision of the trace associated with the log entry. - * True means that the trace resource name in the `trace` field was sampled - * for storage in a trace backend. False means that the trace was not sampled - * for storage when this log entry was written, or the sampling decision was - * unknown at the time. A non-sampled `trace` value is still useful as a - * request correlation identifier. The default is False. - * - * Generated from protobuf field bool trace_sampled = 30 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getTraceSampled() - { - return $this->trace_sampled; - } - - /** - * Optional. The sampling decision of the trace associated with the log entry. - * True means that the trace resource name in the `trace` field was sampled - * for storage in a trace backend. False means that the trace was not sampled - * for storage when this log entry was written, or the sampling decision was - * unknown at the time. A non-sampled `trace` value is still useful as a - * request correlation identifier. The default is False. - * - * Generated from protobuf field bool trace_sampled = 30 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setTraceSampled($var) - { - GPBUtil::checkBool($var); - $this->trace_sampled = $var; - - return $this; - } - - /** - * Optional. Source code location information associated with the log entry, - * if any. - * - * Generated from protobuf field .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Logging\V2\LogEntrySourceLocation|null - */ - public function getSourceLocation() - { - return $this->source_location; - } - - public function hasSourceLocation() - { - return isset($this->source_location); - } - - public function clearSourceLocation() - { - unset($this->source_location); - } - - /** - * Optional. Source code location information associated with the log entry, - * if any. - * - * Generated from protobuf field .google.logging.v2.LogEntrySourceLocation source_location = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Logging\V2\LogEntrySourceLocation $var - * @return $this - */ - public function setSourceLocation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogEntrySourceLocation::class); - $this->source_location = $var; - - return $this; - } - - /** - * Optional. Information indicating this LogEntry is part of a sequence of - * multiple log entries split from a single LogEntry. - * - * Generated from protobuf field .google.logging.v2.LogSplit split = 35 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Logging\V2\LogSplit|null - */ - public function getSplit() - { - return $this->split; - } - - public function hasSplit() - { - return isset($this->split); - } - - public function clearSplit() - { - unset($this->split); - } - - /** - * Optional. Information indicating this LogEntry is part of a sequence of - * multiple log entries split from a single LogEntry. - * - * Generated from protobuf field .google.logging.v2.LogSplit split = 35 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Logging\V2\LogSplit $var - * @return $this - */ - public function setSplit($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogSplit::class); - $this->split = $var; - - return $this; - } - - /** - * @return string - */ - public function getPayload() - { - return $this->whichOneof("payload"); - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntryOperation.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntryOperation.php deleted file mode 100644 index 8cbc98233916..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntryOperation.php +++ /dev/null @@ -1,182 +0,0 @@ -google.logging.v2.LogEntryOperation - */ -class LogEntryOperation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. An arbitrary operation identifier. Log entries with the same - * identifier are assumed to be part of the same operation. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $id = ''; - /** - * Optional. An arbitrary producer identifier. The combination of `id` and - * `producer` must be globally unique. Examples for `producer`: - * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. - * - * Generated from protobuf field string producer = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $producer = ''; - /** - * Optional. Set this to True if this is the first log entry in the operation. - * - * Generated from protobuf field bool first = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $first = false; - /** - * Optional. Set this to True if this is the last log entry in the operation. - * - * Generated from protobuf field bool last = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $last = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Optional. An arbitrary operation identifier. Log entries with the same - * identifier are assumed to be part of the same operation. - * @type string $producer - * Optional. An arbitrary producer identifier. The combination of `id` and - * `producer` must be globally unique. Examples for `producer`: - * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. - * @type bool $first - * Optional. Set this to True if this is the first log entry in the operation. - * @type bool $last - * Optional. Set this to True if this is the last log entry in the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LogEntry::initOnce(); - parent::__construct($data); - } - - /** - * Optional. An arbitrary operation identifier. Log entries with the same - * identifier are assumed to be part of the same operation. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Optional. An arbitrary operation identifier. Log entries with the same - * identifier are assumed to be part of the same operation. - * - * Generated from protobuf field string id = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * Optional. An arbitrary producer identifier. The combination of `id` and - * `producer` must be globally unique. Examples for `producer`: - * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. - * - * Generated from protobuf field string producer = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getProducer() - { - return $this->producer; - } - - /** - * Optional. An arbitrary producer identifier. The combination of `id` and - * `producer` must be globally unique. Examples for `producer`: - * `"MyDivision.MyBigCompany.com"`, `"github.com/MyProject/MyApplication"`. - * - * Generated from protobuf field string producer = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setProducer($var) - { - GPBUtil::checkString($var, True); - $this->producer = $var; - - return $this; - } - - /** - * Optional. Set this to True if this is the first log entry in the operation. - * - * Generated from protobuf field bool first = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getFirst() - { - return $this->first; - } - - /** - * Optional. Set this to True if this is the first log entry in the operation. - * - * Generated from protobuf field bool first = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setFirst($var) - { - GPBUtil::checkBool($var); - $this->first = $var; - - return $this; - } - - /** - * Optional. Set this to True if this is the last log entry in the operation. - * - * Generated from protobuf field bool last = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getLast() - { - return $this->last; - } - - /** - * Optional. Set this to True if this is the last log entry in the operation. - * - * Generated from protobuf field bool last = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setLast($var) - { - GPBUtil::checkBool($var); - $this->last = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntrySourceLocation.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntrySourceLocation.php deleted file mode 100644 index 32a557bacd22..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogEntrySourceLocation.php +++ /dev/null @@ -1,164 +0,0 @@ -google.logging.v2.LogEntrySourceLocation - */ -class LogEntrySourceLocation extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Source file name. Depending on the runtime environment, this - * might be a simple name or a fully-qualified name. - * - * Generated from protobuf field string file = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $file = ''; - /** - * Optional. Line within the source file. 1-based; 0 indicates no line number - * available. - * - * Generated from protobuf field int64 line = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $line = 0; - /** - * Optional. Human-readable name of the function or method being invoked, with - * optional context such as the class or package name. This information may be - * used in contexts such as the logs viewer, where a file and line number are - * less meaningful. The format can vary by language. For example: - * `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` - * (Python). - * - * Generated from protobuf field string function = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $function = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $file - * Optional. Source file name. Depending on the runtime environment, this - * might be a simple name or a fully-qualified name. - * @type int|string $line - * Optional. Line within the source file. 1-based; 0 indicates no line number - * available. - * @type string $function - * Optional. Human-readable name of the function or method being invoked, with - * optional context such as the class or package name. This information may be - * used in contexts such as the logs viewer, where a file and line number are - * less meaningful. The format can vary by language. For example: - * `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` - * (Python). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LogEntry::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Source file name. Depending on the runtime environment, this - * might be a simple name or a fully-qualified name. - * - * Generated from protobuf field string file = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFile() - { - return $this->file; - } - - /** - * Optional. Source file name. Depending on the runtime environment, this - * might be a simple name or a fully-qualified name. - * - * Generated from protobuf field string file = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFile($var) - { - GPBUtil::checkString($var, True); - $this->file = $var; - - return $this; - } - - /** - * Optional. Line within the source file. 1-based; 0 indicates no line number - * available. - * - * Generated from protobuf field int64 line = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getLine() - { - return $this->line; - } - - /** - * Optional. Line within the source file. 1-based; 0 indicates no line number - * available. - * - * Generated from protobuf field int64 line = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setLine($var) - { - GPBUtil::checkInt64($var); - $this->line = $var; - - return $this; - } - - /** - * Optional. Human-readable name of the function or method being invoked, with - * optional context such as the class or package name. This information may be - * used in contexts such as the logs viewer, where a file and line number are - * less meaningful. The format can vary by language. For example: - * `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` - * (Python). - * - * Generated from protobuf field string function = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFunction() - { - return $this->function; - } - - /** - * Optional. Human-readable name of the function or method being invoked, with - * optional context such as the class or package name. This information may be - * used in contexts such as the logs viewer, where a file and line number are - * less meaningful. The format can vary by language. For example: - * `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` - * (Python). - * - * Generated from protobuf field string function = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFunction($var) - { - GPBUtil::checkString($var, True); - $this->function = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogExclusion.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogExclusion.php deleted file mode 100644 index f68481385cca..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogExclusion.php +++ /dev/null @@ -1,321 +0,0 @@ -google.logging.v2.LogExclusion - */ -class LogExclusion extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A client-assigned identifier, such as - * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and - * can include only letters, digits, underscores, hyphens, and periods. First - * character has to be alphanumeric. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. A description of this exclusion. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced-queries) that - * matches the log entries to be excluded. By using the [sample - * function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), - * you can exclude less than 100% of the matching log entries. - * For example, the following query matches 99% of low-severity log entries - * from Google Cloud Storage buckets: - * `resource.type=gcs_bucket severitystring filter = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $filter = ''; - /** - * Optional. If set to True, then this exclusion is disabled and it does not - * exclude any log entries. You can [update an - * exclusion][google.logging.v2.ConfigServiceV2.UpdateExclusion] to change the - * value of this field. - * - * Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disabled = false; - /** - * Output only. The creation timestamp of the exclusion. - * This field may not be present for older exclusions. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last update timestamp of the exclusion. - * This field may not be present for older exclusions. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. A client-assigned identifier, such as - * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and - * can include only letters, digits, underscores, hyphens, and periods. First - * character has to be alphanumeric. - * @type string $description - * Optional. A description of this exclusion. - * @type string $filter - * Required. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced-queries) that - * matches the log entries to be excluded. By using the [sample - * function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), - * you can exclude less than 100% of the matching log entries. - * For example, the following query matches 99% of low-severity log entries - * from Google Cloud Storage buckets: - * `resource.type=gcs_bucket severitystring name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A client-assigned identifier, such as - * `"load-balancer-exclusion"`. Identifiers are limited to 100 characters and - * can include only letters, digits, underscores, hyphens, and periods. First - * character has to be alphanumeric. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A description of this exclusion. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A description of this exclusion. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced-queries) that - * matches the log entries to be excluded. By using the [sample - * function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), - * you can exclude less than 100% of the matching log entries. - * For example, the following query matches 99% of low-severity log entries - * from Google Cloud Storage buckets: - * `resource.type=gcs_bucket severitystring filter = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Required. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced-queries) that - * matches the log entries to be excluded. By using the [sample - * function](https://cloud.google.com/logging/docs/view/advanced-queries#sample), - * you can exclude less than 100% of the matching log entries. - * For example, the following query matches 99% of low-severity log entries - * from Google Cloud Storage buckets: - * `resource.type=gcs_bucket severitystring filter = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. If set to True, then this exclusion is disabled and it does not - * exclude any log entries. You can [update an - * exclusion][google.logging.v2.ConfigServiceV2.UpdateExclusion] to change the - * value of this field. - * - * Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisabled() - { - return $this->disabled; - } - - /** - * Optional. If set to True, then this exclusion is disabled and it does not - * exclude any log entries. You can [update an - * exclusion][google.logging.v2.ConfigServiceV2.UpdateExclusion] to change the - * value of this field. - * - * Generated from protobuf field bool disabled = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisabled($var) - { - GPBUtil::checkBool($var); - $this->disabled = $var; - - return $this; - } - - /** - * Output only. The creation timestamp of the exclusion. - * This field may not be present for older exclusions. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The creation timestamp of the exclusion. - * This field may not be present for older exclusions. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The last update timestamp of the exclusion. - * This field may not be present for older exclusions. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last update timestamp of the exclusion. - * This field may not be present for older exclusions. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric.php deleted file mode 100644 index 4b6d791db1a9..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric.php +++ /dev/null @@ -1,769 +0,0 @@ -google.logging.v2.LogMetric - */ -class LogMetric extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The client-assigned metric identifier. - * Examples: `"error_count"`, `"nginx/requests"`. - * Metric identifiers are limited to 100 characters and can include only the - * following characters: `A-Z`, `a-z`, `0-9`, and the special characters - * `_-.,+!*',()%/`. The forward-slash character (`/`) denotes a hierarchy of - * name pieces, and it cannot be the first character of the name. - * This field is the `[METRIC_ID]` part of a metric resource name in the - * format "projects/[PROJECT_ID]/metrics/[METRIC_ID]". Example: If the - * resource name of a metric is - * `"projects/my-project/metrics/nginx%2Frequests"`, this field's value is - * `"nginx/requests"`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Optional. A description of this metric, which is used in documentation. - * The maximum length of the description is 8000 characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Required. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced_filters) which - * is used to match log entries. Example: - * "resource.type=gae_app AND severity>=ERROR" - * The maximum length of the filter is 20000 characters. - * - * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $filter = ''; - /** - * Optional. The resource name of the Log Bucket that owns the Log Metric. - * Only Log Buckets in projects are supported. The bucket has to be in the - * same project as the metric. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket` - * If empty, then the Log Metric is considered a non-Bucket Log Metric. - * - * Generated from protobuf field string bucket_name = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $bucket_name = ''; - /** - * Optional. If set to True, then this metric is disabled and it does not - * generate any points. - * - * Generated from protobuf field bool disabled = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disabled = false; - /** - * Optional. The metric descriptor associated with the logs-based metric. - * If unspecified, it uses a default metric descriptor with a DELTA metric - * kind, INT64 value type, with no labels and a unit of "1". Such a metric - * counts the number of log entries matching the `filter` expression. - * The `name`, `type`, and `description` fields in the `metric_descriptor` - * are output only, and is constructed using the `name` and `description` - * field in the LogMetric. - * To create a logs-based metric that records a distribution of log values, a - * DELTA metric kind with a DISTRIBUTION value type must be used along with - * a `value_extractor` expression in the LogMetric. - * Each label in the metric descriptor must have a matching label - * name as the key and an extractor expression as the value in the - * `label_extractors` map. - * The `metric_kind` and `value_type` fields in the `metric_descriptor` cannot - * be updated once initially configured. New labels can be added in the - * `metric_descriptor`, but existing labels cannot be modified except for - * their description. - * - * Generated from protobuf field .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $metric_descriptor = null; - /** - * Optional. A `value_extractor` is required when using a distribution - * logs-based metric to extract the values to record from a log entry. - * Two functions are supported for value extraction: `EXTRACT(field)` or - * `REGEXP_EXTRACT(field, regex)`. The arguments are: - * 1. field: The name of the log entry field from which the value is to be - * extracted. - * 2. regex: A regular expression using the Google RE2 syntax - * (https://github.com/google/re2/wiki/Syntax) with a single capture - * group to extract data from the specified log entry field. The value - * of the field is converted to a string before applying the regex. - * It is an error to specify a regex that does not include exactly one - * capture group. - * The result of the extraction must be convertible to a double type, as the - * distribution always records double values. If either the extraction or - * the conversion to double fails, then those values are not recorded in the - * distribution. - * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` - * - * Generated from protobuf field string value_extractor = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $value_extractor = ''; - /** - * Optional. A map from a label key string to an extractor expression which is - * used to extract data from a log entry field and assign as the label value. - * Each label key specified in the LabelDescriptor must have an associated - * extractor expression in this map. The syntax of the extractor expression - * is the same as for the `value_extractor` field. - * The extracted value is converted to the type defined in the label - * descriptor. If either the extraction or the type conversion fails, - * the label will have a default value. The default value for a string - * label is an empty string, for an integer label its 0, and for a boolean - * label its `false`. - * Note that there are upper bounds on the maximum number of labels and the - * number of active time series that are allowed in a project. - * - * Generated from protobuf field map label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $label_extractors; - /** - * Optional. The `bucket_options` are required when the logs-based metric is - * using a DISTRIBUTION value type and it describes the bucket boundaries - * used to create a histogram of the extracted values. - * - * Generated from protobuf field .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $bucket_options = null; - /** - * Output only. The creation timestamp of the metric. - * This field may not be present for older metrics. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last update timestamp of the metric. - * This field may not be present for older metrics. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Deprecated. The API version that created or updated this metric. - * The v2 format is used by default and cannot be changed. - * - * Generated from protobuf field .google.logging.v2.LogMetric.ApiVersion version = 4 [deprecated = true]; - * @deprecated - */ - protected $version = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The client-assigned metric identifier. - * Examples: `"error_count"`, `"nginx/requests"`. - * Metric identifiers are limited to 100 characters and can include only the - * following characters: `A-Z`, `a-z`, `0-9`, and the special characters - * `_-.,+!*',()%/`. The forward-slash character (`/`) denotes a hierarchy of - * name pieces, and it cannot be the first character of the name. - * This field is the `[METRIC_ID]` part of a metric resource name in the - * format "projects/[PROJECT_ID]/metrics/[METRIC_ID]". Example: If the - * resource name of a metric is - * `"projects/my-project/metrics/nginx%2Frequests"`, this field's value is - * `"nginx/requests"`. - * @type string $description - * Optional. A description of this metric, which is used in documentation. - * The maximum length of the description is 8000 characters. - * @type string $filter - * Required. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced_filters) which - * is used to match log entries. Example: - * "resource.type=gae_app AND severity>=ERROR" - * The maximum length of the filter is 20000 characters. - * @type string $bucket_name - * Optional. The resource name of the Log Bucket that owns the Log Metric. - * Only Log Buckets in projects are supported. The bucket has to be in the - * same project as the metric. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket` - * If empty, then the Log Metric is considered a non-Bucket Log Metric. - * @type bool $disabled - * Optional. If set to True, then this metric is disabled and it does not - * generate any points. - * @type \Google\Api\MetricDescriptor $metric_descriptor - * Optional. The metric descriptor associated with the logs-based metric. - * If unspecified, it uses a default metric descriptor with a DELTA metric - * kind, INT64 value type, with no labels and a unit of "1". Such a metric - * counts the number of log entries matching the `filter` expression. - * The `name`, `type`, and `description` fields in the `metric_descriptor` - * are output only, and is constructed using the `name` and `description` - * field in the LogMetric. - * To create a logs-based metric that records a distribution of log values, a - * DELTA metric kind with a DISTRIBUTION value type must be used along with - * a `value_extractor` expression in the LogMetric. - * Each label in the metric descriptor must have a matching label - * name as the key and an extractor expression as the value in the - * `label_extractors` map. - * The `metric_kind` and `value_type` fields in the `metric_descriptor` cannot - * be updated once initially configured. New labels can be added in the - * `metric_descriptor`, but existing labels cannot be modified except for - * their description. - * @type string $value_extractor - * Optional. A `value_extractor` is required when using a distribution - * logs-based metric to extract the values to record from a log entry. - * Two functions are supported for value extraction: `EXTRACT(field)` or - * `REGEXP_EXTRACT(field, regex)`. The arguments are: - * 1. field: The name of the log entry field from which the value is to be - * extracted. - * 2. regex: A regular expression using the Google RE2 syntax - * (https://github.com/google/re2/wiki/Syntax) with a single capture - * group to extract data from the specified log entry field. The value - * of the field is converted to a string before applying the regex. - * It is an error to specify a regex that does not include exactly one - * capture group. - * The result of the extraction must be convertible to a double type, as the - * distribution always records double values. If either the extraction or - * the conversion to double fails, then those values are not recorded in the - * distribution. - * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` - * @type array|\Google\Protobuf\Internal\MapField $label_extractors - * Optional. A map from a label key string to an extractor expression which is - * used to extract data from a log entry field and assign as the label value. - * Each label key specified in the LabelDescriptor must have an associated - * extractor expression in this map. The syntax of the extractor expression - * is the same as for the `value_extractor` field. - * The extracted value is converted to the type defined in the label - * descriptor. If either the extraction or the type conversion fails, - * the label will have a default value. The default value for a string - * label is an empty string, for an integer label its 0, and for a boolean - * label its `false`. - * Note that there are upper bounds on the maximum number of labels and the - * number of active time series that are allowed in a project. - * @type \Google\Api\Distribution\BucketOptions $bucket_options - * Optional. The `bucket_options` are required when the logs-based metric is - * using a DISTRIBUTION value type and it describes the bucket boundaries - * used to create a histogram of the extracted values. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation timestamp of the metric. - * This field may not be present for older metrics. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update timestamp of the metric. - * This field may not be present for older metrics. - * @type int $version - * Deprecated. The API version that created or updated this metric. - * The v2 format is used by default and cannot be changed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); - parent::__construct($data); - } - - /** - * Required. The client-assigned metric identifier. - * Examples: `"error_count"`, `"nginx/requests"`. - * Metric identifiers are limited to 100 characters and can include only the - * following characters: `A-Z`, `a-z`, `0-9`, and the special characters - * `_-.,+!*',()%/`. The forward-slash character (`/`) denotes a hierarchy of - * name pieces, and it cannot be the first character of the name. - * This field is the `[METRIC_ID]` part of a metric resource name in the - * format "projects/[PROJECT_ID]/metrics/[METRIC_ID]". Example: If the - * resource name of a metric is - * `"projects/my-project/metrics/nginx%2Frequests"`, this field's value is - * `"nginx/requests"`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The client-assigned metric identifier. - * Examples: `"error_count"`, `"nginx/requests"`. - * Metric identifiers are limited to 100 characters and can include only the - * following characters: `A-Z`, `a-z`, `0-9`, and the special characters - * `_-.,+!*',()%/`. The forward-slash character (`/`) denotes a hierarchy of - * name pieces, and it cannot be the first character of the name. - * This field is the `[METRIC_ID]` part of a metric resource name in the - * format "projects/[PROJECT_ID]/metrics/[METRIC_ID]". Example: If the - * resource name of a metric is - * `"projects/my-project/metrics/nginx%2Frequests"`, this field's value is - * `"nginx/requests"`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. A description of this metric, which is used in documentation. - * The maximum length of the description is 8000 characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A description of this metric, which is used in documentation. - * The maximum length of the description is 8000 characters. - * - * Generated from protobuf field string description = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Required. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced_filters) which - * is used to match log entries. Example: - * "resource.type=gae_app AND severity>=ERROR" - * The maximum length of the filter is 20000 characters. - * - * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Required. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced_filters) which - * is used to match log entries. Example: - * "resource.type=gae_app AND severity>=ERROR" - * The maximum length of the filter is 20000 characters. - * - * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. The resource name of the Log Bucket that owns the Log Metric. - * Only Log Buckets in projects are supported. The bucket has to be in the - * same project as the metric. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket` - * If empty, then the Log Metric is considered a non-Bucket Log Metric. - * - * Generated from protobuf field string bucket_name = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBucketName() - { - return $this->bucket_name; - } - - /** - * Optional. The resource name of the Log Bucket that owns the Log Metric. - * Only Log Buckets in projects are supported. The bucket has to be in the - * same project as the metric. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket` - * If empty, then the Log Metric is considered a non-Bucket Log Metric. - * - * Generated from protobuf field string bucket_name = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBucketName($var) - { - GPBUtil::checkString($var, True); - $this->bucket_name = $var; - - return $this; - } - - /** - * Optional. If set to True, then this metric is disabled and it does not - * generate any points. - * - * Generated from protobuf field bool disabled = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisabled() - { - return $this->disabled; - } - - /** - * Optional. If set to True, then this metric is disabled and it does not - * generate any points. - * - * Generated from protobuf field bool disabled = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisabled($var) - { - GPBUtil::checkBool($var); - $this->disabled = $var; - - return $this; - } - - /** - * Optional. The metric descriptor associated with the logs-based metric. - * If unspecified, it uses a default metric descriptor with a DELTA metric - * kind, INT64 value type, with no labels and a unit of "1". Such a metric - * counts the number of log entries matching the `filter` expression. - * The `name`, `type`, and `description` fields in the `metric_descriptor` - * are output only, and is constructed using the `name` and `description` - * field in the LogMetric. - * To create a logs-based metric that records a distribution of log values, a - * DELTA metric kind with a DISTRIBUTION value type must be used along with - * a `value_extractor` expression in the LogMetric. - * Each label in the metric descriptor must have a matching label - * name as the key and an extractor expression as the value in the - * `label_extractors` map. - * The `metric_kind` and `value_type` fields in the `metric_descriptor` cannot - * be updated once initially configured. New labels can be added in the - * `metric_descriptor`, but existing labels cannot be modified except for - * their description. - * - * Generated from protobuf field .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Api\MetricDescriptor|null - */ - public function getMetricDescriptor() - { - return $this->metric_descriptor; - } - - public function hasMetricDescriptor() - { - return isset($this->metric_descriptor); - } - - public function clearMetricDescriptor() - { - unset($this->metric_descriptor); - } - - /** - * Optional. The metric descriptor associated with the logs-based metric. - * If unspecified, it uses a default metric descriptor with a DELTA metric - * kind, INT64 value type, with no labels and a unit of "1". Such a metric - * counts the number of log entries matching the `filter` expression. - * The `name`, `type`, and `description` fields in the `metric_descriptor` - * are output only, and is constructed using the `name` and `description` - * field in the LogMetric. - * To create a logs-based metric that records a distribution of log values, a - * DELTA metric kind with a DISTRIBUTION value type must be used along with - * a `value_extractor` expression in the LogMetric. - * Each label in the metric descriptor must have a matching label - * name as the key and an extractor expression as the value in the - * `label_extractors` map. - * The `metric_kind` and `value_type` fields in the `metric_descriptor` cannot - * be updated once initially configured. New labels can be added in the - * `metric_descriptor`, but existing labels cannot be modified except for - * their description. - * - * Generated from protobuf field .google.api.MetricDescriptor metric_descriptor = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Api\MetricDescriptor $var - * @return $this - */ - public function setMetricDescriptor($var) - { - GPBUtil::checkMessage($var, \Google\Api\MetricDescriptor::class); - $this->metric_descriptor = $var; - - return $this; - } - - /** - * Optional. A `value_extractor` is required when using a distribution - * logs-based metric to extract the values to record from a log entry. - * Two functions are supported for value extraction: `EXTRACT(field)` or - * `REGEXP_EXTRACT(field, regex)`. The arguments are: - * 1. field: The name of the log entry field from which the value is to be - * extracted. - * 2. regex: A regular expression using the Google RE2 syntax - * (https://github.com/google/re2/wiki/Syntax) with a single capture - * group to extract data from the specified log entry field. The value - * of the field is converted to a string before applying the regex. - * It is an error to specify a regex that does not include exactly one - * capture group. - * The result of the extraction must be convertible to a double type, as the - * distribution always records double values. If either the extraction or - * the conversion to double fails, then those values are not recorded in the - * distribution. - * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` - * - * Generated from protobuf field string value_extractor = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getValueExtractor() - { - return $this->value_extractor; - } - - /** - * Optional. A `value_extractor` is required when using a distribution - * logs-based metric to extract the values to record from a log entry. - * Two functions are supported for value extraction: `EXTRACT(field)` or - * `REGEXP_EXTRACT(field, regex)`. The arguments are: - * 1. field: The name of the log entry field from which the value is to be - * extracted. - * 2. regex: A regular expression using the Google RE2 syntax - * (https://github.com/google/re2/wiki/Syntax) with a single capture - * group to extract data from the specified log entry field. The value - * of the field is converted to a string before applying the regex. - * It is an error to specify a regex that does not include exactly one - * capture group. - * The result of the extraction must be convertible to a double type, as the - * distribution always records double values. If either the extraction or - * the conversion to double fails, then those values are not recorded in the - * distribution. - * Example: `REGEXP_EXTRACT(jsonPayload.request, ".*quantity=(\d+).*")` - * - * Generated from protobuf field string value_extractor = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setValueExtractor($var) - { - GPBUtil::checkString($var, True); - $this->value_extractor = $var; - - return $this; - } - - /** - * Optional. A map from a label key string to an extractor expression which is - * used to extract data from a log entry field and assign as the label value. - * Each label key specified in the LabelDescriptor must have an associated - * extractor expression in this map. The syntax of the extractor expression - * is the same as for the `value_extractor` field. - * The extracted value is converted to the type defined in the label - * descriptor. If either the extraction or the type conversion fails, - * the label will have a default value. The default value for a string - * label is an empty string, for an integer label its 0, and for a boolean - * label its `false`. - * Note that there are upper bounds on the maximum number of labels and the - * number of active time series that are allowed in a project. - * - * Generated from protobuf field map label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabelExtractors() - { - return $this->label_extractors; - } - - /** - * Optional. A map from a label key string to an extractor expression which is - * used to extract data from a log entry field and assign as the label value. - * Each label key specified in the LabelDescriptor must have an associated - * extractor expression in this map. The syntax of the extractor expression - * is the same as for the `value_extractor` field. - * The extracted value is converted to the type defined in the label - * descriptor. If either the extraction or the type conversion fails, - * the label will have a default value. The default value for a string - * label is an empty string, for an integer label its 0, and for a boolean - * label its `false`. - * Note that there are upper bounds on the maximum number of labels and the - * number of active time series that are allowed in a project. - * - * Generated from protobuf field map label_extractors = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabelExtractors($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->label_extractors = $arr; - - return $this; - } - - /** - * Optional. The `bucket_options` are required when the logs-based metric is - * using a DISTRIBUTION value type and it describes the bucket boundaries - * used to create a histogram of the extracted values. - * - * Generated from protobuf field .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Api\Distribution\BucketOptions|null - */ - public function getBucketOptions() - { - return $this->bucket_options; - } - - public function hasBucketOptions() - { - return isset($this->bucket_options); - } - - public function clearBucketOptions() - { - unset($this->bucket_options); - } - - /** - * Optional. The `bucket_options` are required when the logs-based metric is - * using a DISTRIBUTION value type and it describes the bucket boundaries - * used to create a histogram of the extracted values. - * - * Generated from protobuf field .google.api.Distribution.BucketOptions bucket_options = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Api\Distribution\BucketOptions $var - * @return $this - */ - public function setBucketOptions($var) - { - GPBUtil::checkMessage($var, \Google\Api\Distribution\BucketOptions::class); - $this->bucket_options = $var; - - return $this; - } - - /** - * Output only. The creation timestamp of the metric. - * This field may not be present for older metrics. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.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 creation timestamp of the metric. - * This field may not be present for older metrics. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The last update timestamp of the metric. - * This field may not be present for older metrics. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last update timestamp of the metric. - * This field may not be present for older metrics. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Deprecated. The API version that created or updated this metric. - * The v2 format is used by default and cannot be changed. - * - * Generated from protobuf field .google.logging.v2.LogMetric.ApiVersion version = 4 [deprecated = true]; - * @return int - * @deprecated - */ - public function getVersion() - { - if ($this->version !== 0) { - @trigger_error('version is deprecated.', E_USER_DEPRECATED); - } - return $this->version; - } - - /** - * Deprecated. The API version that created or updated this metric. - * The v2 format is used by default and cannot be changed. - * - * Generated from protobuf field .google.logging.v2.LogMetric.ApiVersion version = 4 [deprecated = true]; - * @param int $var - * @return $this - * @deprecated - */ - public function setVersion($var) - { - @trigger_error('version is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\LogMetric\ApiVersion::class); - $this->version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric/ApiVersion.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric/ApiVersion.php deleted file mode 100644 index ec8c6b760e98..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogMetric/ApiVersion.php +++ /dev/null @@ -1,54 +0,0 @@ -google.logging.v2.LogMetric.ApiVersion - */ -class ApiVersion -{ - /** - * Logging API v2. - * - * Generated from protobuf enum V2 = 0; - */ - const V2 = 0; - /** - * Logging API v1. - * - * Generated from protobuf enum V1 = 1; - */ - const V1 = 1; - - private static $valueToName = [ - self::V2 => 'V2', - self::V1 => 'V1', - ]; - - 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink.php deleted file mode 100644 index fcfc2ddd1aa5..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink.php +++ /dev/null @@ -1,688 +0,0 @@ -google.logging.v2.LogSink - */ -class LogSink extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The client-assigned sink identifier, unique within the project. - * For example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited - * to 100 characters and can include only the following characters: upper and - * lower-case alphanumeric characters, underscores, hyphens, and periods. - * First character has to be alphanumeric. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The export destination: - * "storage.googleapis.com/[GCS_BUCKET]" - * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" - * "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" - * The sink's `writer_identity`, set when the sink is created, must have - * permission to write to the destination or else the log entries are not - * exported. For more information, see - * [Exporting Logs with - * Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * - * Generated from protobuf field string destination = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $destination = ''; - /** - * Optional. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced-queries). The - * only exported log entries are those that are in the resource owning the - * sink and that match the filter. - * For example: - * `logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR` - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. A description of this sink. - * The maximum length of the description is 8000 characters. - * - * Generated from protobuf field string description = 18 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. If set to true, then this sink is disabled and it does not export - * any log entries. - * - * Generated from protobuf field bool disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disabled = false; - /** - * Optional. Log entries that match any of these exclusion filters will not be - * exported. - * If a log entry is matched by both `filter` and one of `exclusion_filters` - * it will not be exported. - * - * Generated from protobuf field repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $exclusions; - /** - * Deprecated. This field is unused. - * - * Generated from protobuf field .google.logging.v2.LogSink.VersionFormat output_version_format = 6 [deprecated = true]; - * @deprecated - */ - protected $output_version_format = 0; - /** - * Output only. An IAM identity—a service account or group—under - * which Cloud Logging writes the exported log entries to the sink's - * destination. This field is either set by specifying - * `custom_writer_identity` or set automatically by - * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and - * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the - * value of `unique_writer_identity` in those methods. - * Until you grant this identity write-access to the destination, log entry - * exports from this sink will fail. For more information, see [Granting - * Access for a - * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). - * Consult the destination service's documentation to determine the - * appropriate IAM roles to assign to the identity. - * Sinks that have a destination that is a log bucket in the same project as - * the sink cannot have a writer_identity and no additional permissions are - * required. - * - * Generated from protobuf field string writer_identity = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $writer_identity = ''; - /** - * Optional. This field applies only to sinks owned by organizations and - * folders. If the field is false, the default, only the logs owned by the - * sink's parent resource are available for export. If the field is true, then - * log entries from all the projects, folders, and billing accounts contained - * in the sink's parent resource are also available for export. Whether a - * particular log entry from the children is exported depends on the sink's - * filter expression. - * For example, if this field is true, then the filter - * `resource.type=gce_instance` would export all Compute Engine VM instance - * log entries from all projects in the sink's parent. - * To only export entries from certain child projects, filter on the project - * part of the log name: - * logName:("projects/test-project1/" OR "projects/test-project2/") AND - * resource.type=gce_instance - * - * Generated from protobuf field bool include_children = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $include_children = false; - /** - * Output only. The creation timestamp of the sink. - * This field may not be present for older sinks. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last update timestamp of the sink. - * This field may not be present for older sinks. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - protected $options; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The client-assigned sink identifier, unique within the project. - * For example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited - * to 100 characters and can include only the following characters: upper and - * lower-case alphanumeric characters, underscores, hyphens, and periods. - * First character has to be alphanumeric. - * @type string $destination - * Required. The export destination: - * "storage.googleapis.com/[GCS_BUCKET]" - * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" - * "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" - * The sink's `writer_identity`, set when the sink is created, must have - * permission to write to the destination or else the log entries are not - * exported. For more information, see - * [Exporting Logs with - * Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * @type string $filter - * Optional. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced-queries). The - * only exported log entries are those that are in the resource owning the - * sink and that match the filter. - * For example: - * `logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR` - * @type string $description - * Optional. A description of this sink. - * The maximum length of the description is 8000 characters. - * @type bool $disabled - * Optional. If set to true, then this sink is disabled and it does not export - * any log entries. - * @type \Google\Cloud\Logging\V2\LogExclusion[] $exclusions - * Optional. Log entries that match any of these exclusion filters will not be - * exported. - * If a log entry is matched by both `filter` and one of `exclusion_filters` - * it will not be exported. - * @type int $output_version_format - * Deprecated. This field is unused. - * @type string $writer_identity - * Output only. An IAM identity—a service account or group—under - * which Cloud Logging writes the exported log entries to the sink's - * destination. This field is either set by specifying - * `custom_writer_identity` or set automatically by - * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and - * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the - * value of `unique_writer_identity` in those methods. - * Until you grant this identity write-access to the destination, log entry - * exports from this sink will fail. For more information, see [Granting - * Access for a - * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). - * Consult the destination service's documentation to determine the - * appropriate IAM roles to assign to the identity. - * Sinks that have a destination that is a log bucket in the same project as - * the sink cannot have a writer_identity and no additional permissions are - * required. - * @type bool $include_children - * Optional. This field applies only to sinks owned by organizations and - * folders. If the field is false, the default, only the logs owned by the - * sink's parent resource are available for export. If the field is true, then - * log entries from all the projects, folders, and billing accounts contained - * in the sink's parent resource are also available for export. Whether a - * particular log entry from the children is exported depends on the sink's - * filter expression. - * For example, if this field is true, then the filter - * `resource.type=gce_instance` would export all Compute Engine VM instance - * log entries from all projects in the sink's parent. - * To only export entries from certain child projects, filter on the project - * part of the log name: - * logName:("projects/test-project1/" OR "projects/test-project2/") AND - * resource.type=gce_instance - * @type \Google\Cloud\Logging\V2\BigQueryOptions $bigquery_options - * Optional. Options that affect sinks exporting data to BigQuery. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation timestamp of the sink. - * This field may not be present for older sinks. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update timestamp of the sink. - * This field may not be present for older sinks. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The client-assigned sink identifier, unique within the project. - * For example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited - * to 100 characters and can include only the following characters: upper and - * lower-case alphanumeric characters, underscores, hyphens, and periods. - * First character has to be alphanumeric. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The client-assigned sink identifier, unique within the project. - * For example: `"my-syslog-errors-to-pubsub"`. Sink identifiers are limited - * to 100 characters and can include only the following characters: upper and - * lower-case alphanumeric characters, underscores, hyphens, and periods. - * First character has to be alphanumeric. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The export destination: - * "storage.googleapis.com/[GCS_BUCKET]" - * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" - * "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" - * The sink's `writer_identity`, set when the sink is created, must have - * permission to write to the destination or else the log entries are not - * exported. For more information, see - * [Exporting Logs with - * Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * - * Generated from protobuf field string destination = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getDestination() - { - return $this->destination; - } - - /** - * Required. The export destination: - * "storage.googleapis.com/[GCS_BUCKET]" - * "bigquery.googleapis.com/projects/[PROJECT_ID]/datasets/[DATASET]" - * "pubsub.googleapis.com/projects/[PROJECT_ID]/topics/[TOPIC_ID]" - * The sink's `writer_identity`, set when the sink is created, must have - * permission to write to the destination or else the log entries are not - * exported. For more information, see - * [Exporting Logs with - * Sinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * - * Generated from protobuf field string destination = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDestination($var) - { - GPBUtil::checkString($var, True); - $this->destination = $var; - - return $this; - } - - /** - * Optional. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced-queries). The - * only exported log entries are those that are in the resource owning the - * sink and that match the filter. - * For example: - * `logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR` - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. An [advanced logs - * filter](https://cloud.google.com/logging/docs/view/advanced-queries). The - * only exported log entries are those that are in the resource owning the - * sink and that match the filter. - * For example: - * `logName="projects/[PROJECT_ID]/logs/[LOG_ID]" AND severity>=ERROR` - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. A description of this sink. - * The maximum length of the description is 8000 characters. - * - * Generated from protobuf field string description = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A description of this sink. - * The maximum length of the description is 8000 characters. - * - * Generated from protobuf field string description = 18 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. If set to true, then this sink is disabled and it does not export - * any log entries. - * - * Generated from protobuf field bool disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisabled() - { - return $this->disabled; - } - - /** - * Optional. If set to true, then this sink is disabled and it does not export - * any log entries. - * - * Generated from protobuf field bool disabled = 19 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisabled($var) - { - GPBUtil::checkBool($var); - $this->disabled = $var; - - return $this; - } - - /** - * Optional. Log entries that match any of these exclusion filters will not be - * exported. - * If a log entry is matched by both `filter` and one of `exclusion_filters` - * it will not be exported. - * - * Generated from protobuf field repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField<\Google\Cloud\Logging\V2\LogExclusion> - */ - public function getExclusions() - { - return $this->exclusions; - } - - /** - * Optional. Log entries that match any of these exclusion filters will not be - * exported. - * If a log entry is matched by both `filter` and one of `exclusion_filters` - * it will not be exported. - * - * Generated from protobuf field repeated .google.logging.v2.LogExclusion exclusions = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Logging\V2\LogExclusion[] $var - * @return $this - */ - public function setExclusions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogExclusion::class); - $this->exclusions = $arr; - - return $this; - } - - /** - * Deprecated. This field is unused. - * - * Generated from protobuf field .google.logging.v2.LogSink.VersionFormat output_version_format = 6 [deprecated = true]; - * @return int - * @deprecated - */ - public function getOutputVersionFormat() - { - if ($this->output_version_format !== 0) { - @trigger_error('output_version_format is deprecated.', E_USER_DEPRECATED); - } - return $this->output_version_format; - } - - /** - * Deprecated. This field is unused. - * - * Generated from protobuf field .google.logging.v2.LogSink.VersionFormat output_version_format = 6 [deprecated = true]; - * @param int $var - * @return $this - * @deprecated - */ - public function setOutputVersionFormat($var) - { - @trigger_error('output_version_format is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\LogSink\VersionFormat::class); - $this->output_version_format = $var; - - return $this; - } - - /** - * Output only. An IAM identity—a service account or group—under - * which Cloud Logging writes the exported log entries to the sink's - * destination. This field is either set by specifying - * `custom_writer_identity` or set automatically by - * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and - * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the - * value of `unique_writer_identity` in those methods. - * Until you grant this identity write-access to the destination, log entry - * exports from this sink will fail. For more information, see [Granting - * Access for a - * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). - * Consult the destination service's documentation to determine the - * appropriate IAM roles to assign to the identity. - * Sinks that have a destination that is a log bucket in the same project as - * the sink cannot have a writer_identity and no additional permissions are - * required. - * - * Generated from protobuf field string writer_identity = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getWriterIdentity() - { - return $this->writer_identity; - } - - /** - * Output only. An IAM identity—a service account or group—under - * which Cloud Logging writes the exported log entries to the sink's - * destination. This field is either set by specifying - * `custom_writer_identity` or set automatically by - * [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] and - * [sinks.update][google.logging.v2.ConfigServiceV2.UpdateSink] based on the - * value of `unique_writer_identity` in those methods. - * Until you grant this identity write-access to the destination, log entry - * exports from this sink will fail. For more information, see [Granting - * Access for a - * Resource](https://cloud.google.com/iam/docs/granting-roles-to-service-accounts#granting_access_to_a_service_account_for_a_resource). - * Consult the destination service's documentation to determine the - * appropriate IAM roles to assign to the identity. - * Sinks that have a destination that is a log bucket in the same project as - * the sink cannot have a writer_identity and no additional permissions are - * required. - * - * Generated from protobuf field string writer_identity = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setWriterIdentity($var) - { - GPBUtil::checkString($var, True); - $this->writer_identity = $var; - - return $this; - } - - /** - * Optional. This field applies only to sinks owned by organizations and - * folders. If the field is false, the default, only the logs owned by the - * sink's parent resource are available for export. If the field is true, then - * log entries from all the projects, folders, and billing accounts contained - * in the sink's parent resource are also available for export. Whether a - * particular log entry from the children is exported depends on the sink's - * filter expression. - * For example, if this field is true, then the filter - * `resource.type=gce_instance` would export all Compute Engine VM instance - * log entries from all projects in the sink's parent. - * To only export entries from certain child projects, filter on the project - * part of the log name: - * logName:("projects/test-project1/" OR "projects/test-project2/") AND - * resource.type=gce_instance - * - * Generated from protobuf field bool include_children = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getIncludeChildren() - { - return $this->include_children; - } - - /** - * Optional. This field applies only to sinks owned by organizations and - * folders. If the field is false, the default, only the logs owned by the - * sink's parent resource are available for export. If the field is true, then - * log entries from all the projects, folders, and billing accounts contained - * in the sink's parent resource are also available for export. Whether a - * particular log entry from the children is exported depends on the sink's - * filter expression. - * For example, if this field is true, then the filter - * `resource.type=gce_instance` would export all Compute Engine VM instance - * log entries from all projects in the sink's parent. - * To only export entries from certain child projects, filter on the project - * part of the log name: - * logName:("projects/test-project1/" OR "projects/test-project2/") AND - * resource.type=gce_instance - * - * Generated from protobuf field bool include_children = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setIncludeChildren($var) - { - GPBUtil::checkBool($var); - $this->include_children = $var; - - return $this; - } - - /** - * Optional. Options that affect sinks exporting data to BigQuery. - * - * Generated from protobuf field .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Logging\V2\BigQueryOptions|null - */ - public function getBigqueryOptions() - { - return $this->readOneof(12); - } - - public function hasBigqueryOptions() - { - return $this->hasOneof(12); - } - - /** - * Optional. Options that affect sinks exporting data to BigQuery. - * - * Generated from protobuf field .google.logging.v2.BigQueryOptions bigquery_options = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Logging\V2\BigQueryOptions $var - * @return $this - */ - public function setBigqueryOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\BigQueryOptions::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Output only. The creation timestamp of the sink. - * This field may not be present for older sinks. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 creation timestamp of the sink. - * This field may not be present for older sinks. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The last update timestamp of the sink. - * This field may not be present for older sinks. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last update timestamp of the sink. - * This field may not be present for older sinks. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getOptions() - { - return $this->whichOneof("options"); - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink/VersionFormat.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink/VersionFormat.php deleted file mode 100644 index 8a232415f6f5..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSink/VersionFormat.php +++ /dev/null @@ -1,61 +0,0 @@ -google.logging.v2.LogSink.VersionFormat - */ -class VersionFormat -{ - /** - * An unspecified format version that will default to V2. - * - * Generated from protobuf enum VERSION_FORMAT_UNSPECIFIED = 0; - */ - const VERSION_FORMAT_UNSPECIFIED = 0; - /** - * `LogEntry` version 2 format. - * - * Generated from protobuf enum V2 = 1; - */ - const V2 = 1; - /** - * `LogEntry` version 1 format. - * - * Generated from protobuf enum V1 = 2; - */ - const V1 = 2; - - private static $valueToName = [ - self::VERSION_FORMAT_UNSPECIFIED => 'VERSION_FORMAT_UNSPECIFIED', - self::V2 => 'V2', - self::V1 => 'V1', - ]; - - 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSplit.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSplit.php deleted file mode 100644 index 3211d45b03b2..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogSplit.php +++ /dev/null @@ -1,153 +0,0 @@ -google.logging.v2.LogSplit - */ -class LogSplit extends \Google\Protobuf\Internal\Message -{ - /** - * A globally unique identifier for all log entries in a sequence of split log - * entries. All log entries with the same |LogSplit.uid| are assumed to be - * part of the same sequence of split log entries. - * - * Generated from protobuf field string uid = 1; - */ - protected $uid = ''; - /** - * The index of this LogEntry in the sequence of split log entries. Log - * entries are given |index| values 0, 1, ..., n-1 for a sequence of n log - * entries. - * - * Generated from protobuf field int32 index = 2; - */ - protected $index = 0; - /** - * The total number of log entries that the original LogEntry was split into. - * - * Generated from protobuf field int32 total_splits = 3; - */ - protected $total_splits = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uid - * A globally unique identifier for all log entries in a sequence of split log - * entries. All log entries with the same |LogSplit.uid| are assumed to be - * part of the same sequence of split log entries. - * @type int $index - * The index of this LogEntry in the sequence of split log entries. Log - * entries are given |index| values 0, 1, ..., n-1 for a sequence of n log - * entries. - * @type int $total_splits - * The total number of log entries that the original LogEntry was split into. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LogEntry::initOnce(); - parent::__construct($data); - } - - /** - * A globally unique identifier for all log entries in a sequence of split log - * entries. All log entries with the same |LogSplit.uid| are assumed to be - * part of the same sequence of split log entries. - * - * Generated from protobuf field string uid = 1; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * A globally unique identifier for all log entries in a sequence of split log - * entries. All log entries with the same |LogSplit.uid| are assumed to be - * part of the same sequence of split log entries. - * - * Generated from protobuf field string uid = 1; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - - /** - * The index of this LogEntry in the sequence of split log entries. Log - * entries are given |index| values 0, 1, ..., n-1 for a sequence of n log - * entries. - * - * Generated from protobuf field int32 index = 2; - * @return int - */ - public function getIndex() - { - return $this->index; - } - - /** - * The index of this LogEntry in the sequence of split log entries. Log - * entries are given |index| values 0, 1, ..., n-1 for a sequence of n log - * entries. - * - * Generated from protobuf field int32 index = 2; - * @param int $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkInt32($var); - $this->index = $var; - - return $this; - } - - /** - * The total number of log entries that the original LogEntry was split into. - * - * Generated from protobuf field int32 total_splits = 3; - * @return int - */ - public function getTotalSplits() - { - return $this->total_splits; - } - - /** - * The total number of log entries that the original LogEntry was split into. - * - * Generated from protobuf field int32 total_splits = 3; - * @param int $var - * @return $this - */ - public function setTotalSplits($var) - { - GPBUtil::checkInt32($var); - $this->total_splits = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogView.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogView.php deleted file mode 100644 index 1ee5cf2c8912..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/LogView.php +++ /dev/null @@ -1,267 +0,0 @@ -google.logging.v2.LogView - */ -class LogView extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the view. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket/views/my-view` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Describes this view. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * Output only. The creation timestamp of the view. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The last update timestamp of the view. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Filter that restricts which log entries in a bucket are visible in this - * view. - * Filters are restricted to be a logical AND of ==/!= of any of the - * following: - * - originating project/folder/organization/billing account. - * - resource type - * - log id - * For example: - * SOURCE("projects/myproject") AND resource.type = "gce_instance" - * AND LOG_ID("stdout") - * - * Generated from protobuf field string filter = 7; - */ - protected $filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the view. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket/views/my-view` - * @type string $description - * Describes this view. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The creation timestamp of the view. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The last update timestamp of the view. - * @type string $filter - * Filter that restricts which log entries in a bucket are visible in this - * view. - * Filters are restricted to be a logical AND of ==/!= of any of the - * following: - * - originating project/folder/organization/billing account. - * - resource type - * - log id - * For example: - * SOURCE("projects/myproject") AND resource.type = "gce_instance" - * AND LOG_ID("stdout") - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the view. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket/views/my-view` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the view. - * For example: - * `projects/my-project/locations/global/buckets/my-bucket/views/my-view` - * - * 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; - } - - /** - * Describes this view. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Describes this view. - * - * 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; - } - - /** - * Output only. The creation timestamp of the view. - * - * 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 creation timestamp of the view. - * - * 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; - } - - /** - * Output only. The last update timestamp of the view. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The last update timestamp of the view. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Filter that restricts which log entries in a bucket are visible in this - * view. - * Filters are restricted to be a logical AND of ==/!= of any of the - * following: - * - originating project/folder/organization/billing account. - * - resource type - * - log id - * For example: - * SOURCE("projects/myproject") AND resource.type = "gce_instance" - * AND LOG_ID("stdout") - * - * Generated from protobuf field string filter = 7; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filter that restricts which log entries in a bucket are visible in this - * view. - * Filters are restricted to be a logical AND of ==/!= of any of the - * following: - * - originating project/folder/organization/billing account. - * - resource type - * - log id - * For example: - * SOURCE("projects/myproject") AND resource.type = "gce_instance" - * AND LOG_ID("stdout") - * - * Generated from protobuf field string filter = 7; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/OperationState.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/OperationState.php deleted file mode 100644 index 32d50436ce86..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/OperationState.php +++ /dev/null @@ -1,93 +0,0 @@ -google.logging.v2.OperationState - */ -class OperationState -{ - /** - * Should not be used. - * - * Generated from protobuf enum OPERATION_STATE_UNSPECIFIED = 0; - */ - const OPERATION_STATE_UNSPECIFIED = 0; - /** - * The operation is scheduled. - * - * Generated from protobuf enum OPERATION_STATE_SCHEDULED = 1; - */ - const OPERATION_STATE_SCHEDULED = 1; - /** - * Waiting for necessary permissions. - * - * Generated from protobuf enum OPERATION_STATE_WAITING_FOR_PERMISSIONS = 2; - */ - const OPERATION_STATE_WAITING_FOR_PERMISSIONS = 2; - /** - * The operation is running. - * - * Generated from protobuf enum OPERATION_STATE_RUNNING = 3; - */ - const OPERATION_STATE_RUNNING = 3; - /** - * The operation was completed successfully. - * - * Generated from protobuf enum OPERATION_STATE_SUCCEEDED = 4; - */ - const OPERATION_STATE_SUCCEEDED = 4; - /** - * The operation failed. - * - * Generated from protobuf enum OPERATION_STATE_FAILED = 5; - */ - const OPERATION_STATE_FAILED = 5; - /** - * The operation was cancelled by the user. - * - * Generated from protobuf enum OPERATION_STATE_CANCELLED = 6; - */ - const OPERATION_STATE_CANCELLED = 6; - - private static $valueToName = [ - self::OPERATION_STATE_UNSPECIFIED => 'OPERATION_STATE_UNSPECIFIED', - self::OPERATION_STATE_SCHEDULED => 'OPERATION_STATE_SCHEDULED', - self::OPERATION_STATE_WAITING_FOR_PERMISSIONS => 'OPERATION_STATE_WAITING_FOR_PERMISSIONS', - self::OPERATION_STATE_RUNNING => 'OPERATION_STATE_RUNNING', - self::OPERATION_STATE_SUCCEEDED => 'OPERATION_STATE_SUCCEEDED', - self::OPERATION_STATE_FAILED => 'OPERATION_STATE_FAILED', - self::OPERATION_STATE_CANCELLED => 'OPERATION_STATE_CANCELLED', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/Settings.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/Settings.php deleted file mode 100644 index 0f5d208d9c82..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/Settings.php +++ /dev/null @@ -1,324 +0,0 @@ -google.logging.v2.Settings - */ -class Settings extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The resource name of the settings. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Optional. The resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - * To enable CMEK for the Log Router, set this field to a valid - * `kms_key_name` for which the associated service account has the required - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key. - * The Cloud KMS key used by the Log Router can be updated by changing the - * `kms_key_name` to a new valid key name. Encryption operations that are in - * progress will be completed with the key that was in use when they started. - * Decryption operations will be completed using the key that was used at the - * time of encryption unless access to that key has been revoked. - * To disable CMEK for the Log Router, set this field to an empty string. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $kms_key_name = ''; - /** - * Output only. The service account that will be used by the Log Router to - * access your Cloud KMS key. - * Before enabling CMEK for Log Router, you must first assign the role - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that - * the Log Router will use to access your Cloud KMS key. Use - * [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to - * obtain the service account ID. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string kms_service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $kms_service_account_id = ''; - /** - * Optional. The Cloud region that will be used for _Default and _Required log - * buckets for newly created projects and folders. For example `europe-west1`. - * This setting does not affect the location of custom log buckets. - * - * Generated from protobuf field string storage_location = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $storage_location = ''; - /** - * Optional. If set to true, the _Default sink in newly created projects and - * folders will created in a disabled state. This can be used to automatically - * disable log ingestion if there is already an aggregated sink configured in - * the hierarchy. The _Default sink can be re-enabled manually if needed. - * - * Generated from protobuf field bool disable_default_sink = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $disable_default_sink = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. The resource name of the settings. - * @type string $kms_key_name - * Optional. The resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - * To enable CMEK for the Log Router, set this field to a valid - * `kms_key_name` for which the associated service account has the required - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key. - * The Cloud KMS key used by the Log Router can be updated by changing the - * `kms_key_name` to a new valid key name. Encryption operations that are in - * progress will be completed with the key that was in use when they started. - * Decryption operations will be completed using the key that was used at the - * time of encryption unless access to that key has been revoked. - * To disable CMEK for the Log Router, set this field to an empty string. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * @type string $kms_service_account_id - * Output only. The service account that will be used by the Log Router to - * access your Cloud KMS key. - * Before enabling CMEK for Log Router, you must first assign the role - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that - * the Log Router will use to access your Cloud KMS key. Use - * [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to - * obtain the service account ID. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * @type string $storage_location - * Optional. The Cloud region that will be used for _Default and _Required log - * buckets for newly created projects and folders. For example `europe-west1`. - * This setting does not affect the location of custom log buckets. - * @type bool $disable_default_sink - * Optional. If set to true, the _Default sink in newly created projects and - * folders will created in a disabled state. This can be used to automatically - * disable log ingestion if there is already an aggregated sink configured in - * the hierarchy. The _Default sink can be re-enabled manually if needed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The resource name of the settings. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. The resource name of the settings. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - * To enable CMEK for the Log Router, set this field to a valid - * `kms_key_name` for which the associated service account has the required - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key. - * The Cloud KMS key used by the Log Router can be updated by changing the - * `kms_key_name` to a new valid key name. Encryption operations that are in - * progress will be completed with the key that was in use when they started. - * Decryption operations will be completed using the key that was used at the - * time of encryption unless access to that key has been revoked. - * To disable CMEK for the Log Router, set this field to an empty string. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getKmsKeyName() - { - return $this->kms_key_name; - } - - /** - * Optional. The resource name for the configured Cloud KMS key. - * KMS key name format: - * "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]" - * For example: - * `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"` - * To enable CMEK for the Log Router, set this field to a valid - * `kms_key_name` for which the associated service account has the required - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key. - * The Cloud KMS key used by the Log Router can be updated by changing the - * `kms_key_name` to a new valid key name. Encryption operations that are in - * progress will be completed with the key that was in use when they started. - * Decryption operations will be completed using the key that was used at the - * time of encryption unless access to that key has been revoked. - * To disable CMEK for the Log Router, set this field to an empty string. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setKmsKeyName($var) - { - GPBUtil::checkString($var, True); - $this->kms_key_name = $var; - - return $this; - } - - /** - * Output only. The service account that will be used by the Log Router to - * access your Cloud KMS key. - * Before enabling CMEK for Log Router, you must first assign the role - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that - * the Log Router will use to access your Cloud KMS key. Use - * [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to - * obtain the service account ID. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string kms_service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getKmsServiceAccountId() - { - return $this->kms_service_account_id; - } - - /** - * Output only. The service account that will be used by the Log Router to - * access your Cloud KMS key. - * Before enabling CMEK for Log Router, you must first assign the role - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that - * the Log Router will use to access your Cloud KMS key. Use - * [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to - * obtain the service account ID. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field string kms_service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setKmsServiceAccountId($var) - { - GPBUtil::checkString($var, True); - $this->kms_service_account_id = $var; - - return $this; - } - - /** - * Optional. The Cloud region that will be used for _Default and _Required log - * buckets for newly created projects and folders. For example `europe-west1`. - * This setting does not affect the location of custom log buckets. - * - * Generated from protobuf field string storage_location = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getStorageLocation() - { - return $this->storage_location; - } - - /** - * Optional. The Cloud region that will be used for _Default and _Required log - * buckets for newly created projects and folders. For example `europe-west1`. - * This setting does not affect the location of custom log buckets. - * - * Generated from protobuf field string storage_location = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setStorageLocation($var) - { - GPBUtil::checkString($var, True); - $this->storage_location = $var; - - return $this; - } - - /** - * Optional. If set to true, the _Default sink in newly created projects and - * folders will created in a disabled state. This can be used to automatically - * disable log ingestion if there is already an aggregated sink configured in - * the hierarchy. The _Default sink can be re-enabled manually if needed. - * - * Generated from protobuf field bool disable_default_sink = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDisableDefaultSink() - { - return $this->disable_default_sink; - } - - /** - * Optional. If set to true, the _Default sink in newly created projects and - * folders will created in a disabled state. This can be used to automatically - * disable log ingestion if there is already an aggregated sink configured in - * the hierarchy. The _Default sink can be re-enabled manually if needed. - * - * Generated from protobuf field bool disable_default_sink = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDisableDefaultSink($var) - { - GPBUtil::checkBool($var); - $this->disable_default_sink = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesRequest.php deleted file mode 100644 index c50511a9936d..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesRequest.php +++ /dev/null @@ -1,209 +0,0 @@ -google.logging.v2.TailLogEntriesRequest - */ -class TailLogEntriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of a parent resource from which to retrieve log entries: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * May alternatively be one or more views: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * - * Generated from protobuf field repeated string resource_names = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $resource_names; - /** - * Optional. Only log entries that match the filter are returned. An empty - * filter matches all log entries in the resources listed in `resource_names`. - * Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of a filter is - * 20,000 characters. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. The amount of time to buffer log entries at the server before - * being returned to prevent out of order results due to late arriving log - * entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 - * milliseconds. - * - * Generated from protobuf field .google.protobuf.Duration buffer_window = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $buffer_window = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $resource_names - * Required. Name of a parent resource from which to retrieve log entries: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * May alternatively be one or more views: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * @type string $filter - * Optional. Only log entries that match the filter are returned. An empty - * filter matches all log entries in the resources listed in `resource_names`. - * Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of a filter is - * 20,000 characters. - * @type \Google\Protobuf\Duration $buffer_window - * Optional. The amount of time to buffer log entries at the server before - * being returned to prevent out of order results due to late arriving log - * entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 - * milliseconds. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of a parent resource from which to retrieve log entries: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * May alternatively be one or more views: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * - * Generated from protobuf field repeated string resource_names = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField - */ - public function getResourceNames() - { - return $this->resource_names; - } - - /** - * Required. Name of a parent resource from which to retrieve log entries: - * * `projects/[PROJECT_ID]` - * * `organizations/[ORGANIZATION_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]` - * * `folders/[FOLDER_ID]` - * May alternatively be one or more views: - * * `projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * * `folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]` - * - * Generated from protobuf field repeated string resource_names = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string[] $var - * @return $this - */ - public function setResourceNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->resource_names = $arr; - - return $this; - } - - /** - * Optional. Only log entries that match the filter are returned. An empty - * filter matches all log entries in the resources listed in `resource_names`. - * Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of a filter is - * 20,000 characters. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Only log entries that match the filter are returned. An empty - * filter matches all log entries in the resources listed in `resource_names`. - * Referencing a parent resource that is not listed in `resource_names` will - * cause the filter to return no results. The maximum length of a filter is - * 20,000 characters. - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. The amount of time to buffer log entries at the server before - * being returned to prevent out of order results due to late arriving log - * entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 - * milliseconds. - * - * Generated from protobuf field .google.protobuf.Duration buffer_window = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getBufferWindow() - { - return $this->buffer_window; - } - - public function hasBufferWindow() - { - return isset($this->buffer_window); - } - - public function clearBufferWindow() - { - unset($this->buffer_window); - } - - /** - * Optional. The amount of time to buffer log entries at the server before - * being returned to prevent out of order results due to late arriving log - * entries. Valid values are between 0-60000 milliseconds. Defaults to 2000 - * milliseconds. - * - * Generated from protobuf field .google.protobuf.Duration buffer_window = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setBufferWindow($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->buffer_window = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse.php deleted file mode 100644 index 42c83a2d3bad..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse.php +++ /dev/null @@ -1,125 +0,0 @@ -google.logging.v2.TailLogEntriesResponse - */ -class TailLogEntriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of log entries. Each response in the stream will order entries with - * increasing values of `LogEntry.timestamp`. Ordering is not guaranteed - * between separate responses. - * - * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 1; - */ - private $entries; - /** - * If entries that otherwise would have been included in the session were not - * sent back to the client, counts of relevant entries omitted from the - * session with the reason that they were not included. There will be at most - * one of each reason per response. The counts represent the number of - * suppressed entries since the last streamed response. - * - * Generated from protobuf field repeated .google.logging.v2.TailLogEntriesResponse.SuppressionInfo suppression_info = 2; - */ - private $suppression_info; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Logging\V2\LogEntry[] $entries - * A list of log entries. Each response in the stream will order entries with - * increasing values of `LogEntry.timestamp`. Ordering is not guaranteed - * between separate responses. - * @type \Google\Cloud\Logging\V2\TailLogEntriesResponse\SuppressionInfo[] $suppression_info - * If entries that otherwise would have been included in the session were not - * sent back to the client, counts of relevant entries omitted from the - * session with the reason that they were not included. There will be at most - * one of each reason per response. The counts represent the number of - * suppressed entries since the last streamed response. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * A list of log entries. Each response in the stream will order entries with - * increasing values of `LogEntry.timestamp`. Ordering is not guaranteed - * between separate responses. - * - * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 1; - * @return RepeatedField<\Google\Cloud\Logging\V2\LogEntry> - */ - public function getEntries() - { - return $this->entries; - } - - /** - * A list of log entries. Each response in the stream will order entries with - * increasing values of `LogEntry.timestamp`. Ordering is not guaranteed - * between separate responses. - * - * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 1; - * @param \Google\Cloud\Logging\V2\LogEntry[] $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogEntry::class); - $this->entries = $arr; - - return $this; - } - - /** - * If entries that otherwise would have been included in the session were not - * sent back to the client, counts of relevant entries omitted from the - * session with the reason that they were not included. There will be at most - * one of each reason per response. The counts represent the number of - * suppressed entries since the last streamed response. - * - * Generated from protobuf field repeated .google.logging.v2.TailLogEntriesResponse.SuppressionInfo suppression_info = 2; - * @return RepeatedField<\Google\Cloud\Logging\V2\TailLogEntriesResponse\SuppressionInfo> - */ - public function getSuppressionInfo() - { - return $this->suppression_info; - } - - /** - * If entries that otherwise would have been included in the session were not - * sent back to the client, counts of relevant entries omitted from the - * session with the reason that they were not included. There will be at most - * one of each reason per response. The counts represent the number of - * suppressed entries since the last streamed response. - * - * Generated from protobuf field repeated .google.logging.v2.TailLogEntriesResponse.SuppressionInfo suppression_info = 2; - * @param \Google\Cloud\Logging\V2\TailLogEntriesResponse\SuppressionInfo[] $var - * @return $this - */ - public function setSuppressionInfo($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\TailLogEntriesResponse\SuppressionInfo::class); - $this->suppression_info = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo.php deleted file mode 100644 index dd12a4842950..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo.php +++ /dev/null @@ -1,101 +0,0 @@ -google.logging.v2.TailLogEntriesResponse.SuppressionInfo - */ -class SuppressionInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The reason that entries were omitted from the session. - * - * Generated from protobuf field .google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason reason = 1; - */ - protected $reason = 0; - /** - * A lower bound on the count of entries omitted due to `reason`. - * - * Generated from protobuf field int32 suppressed_count = 2; - */ - protected $suppressed_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $reason - * The reason that entries were omitted from the session. - * @type int $suppressed_count - * A lower bound on the count of entries omitted due to `reason`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * The reason that entries were omitted from the session. - * - * Generated from protobuf field .google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason reason = 1; - * @return int - */ - public function getReason() - { - return $this->reason; - } - - /** - * The reason that entries were omitted from the session. - * - * Generated from protobuf field .google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason reason = 1; - * @param int $var - * @return $this - */ - public function setReason($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Logging\V2\TailLogEntriesResponse\SuppressionInfo\Reason::class); - $this->reason = $var; - - return $this; - } - - /** - * A lower bound on the count of entries omitted due to `reason`. - * - * Generated from protobuf field int32 suppressed_count = 2; - * @return int - */ - public function getSuppressedCount() - { - return $this->suppressed_count; - } - - /** - * A lower bound on the count of entries omitted due to `reason`. - * - * Generated from protobuf field int32 suppressed_count = 2; - * @param int $var - * @return $this - */ - public function setSuppressedCount($var) - { - GPBUtil::checkInt32($var); - $this->suppressed_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo/Reason.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo/Reason.php deleted file mode 100644 index 3715139fa7b6..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/TailLogEntriesResponse/SuppressionInfo/Reason.php +++ /dev/null @@ -1,65 +0,0 @@ -google.logging.v2.TailLogEntriesResponse.SuppressionInfo.Reason - */ -class Reason -{ - /** - * Unexpected default. - * - * Generated from protobuf enum REASON_UNSPECIFIED = 0; - */ - const REASON_UNSPECIFIED = 0; - /** - * Indicates suppression occurred due to relevant entries being - * received in excess of rate limits. For quotas and limits, see - * [Logging API quotas and - * limits](https://cloud.google.com/logging/quotas#api-limits). - * - * Generated from protobuf enum RATE_LIMIT = 1; - */ - const RATE_LIMIT = 1; - /** - * Indicates suppression occurred due to the client not consuming - * responses quickly enough. - * - * Generated from protobuf enum NOT_CONSUMED = 2; - */ - const NOT_CONSUMED = 2; - - private static $valueToName = [ - self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED', - self::RATE_LIMIT => 'RATE_LIMIT', - self::NOT_CONSUMED => 'NOT_CONSUMED', - ]; - - 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UndeleteBucketRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UndeleteBucketRequest.php deleted file mode 100644 index 426d100d7ea7..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UndeleteBucketRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.logging.v2.UndeleteBucketRequest - */ -class UndeleteBucketRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the bucket to undelete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full resource name of the bucket to undelete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the bucket to undelete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full resource name of the bucket to undelete. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * 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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateBucketRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateBucketRequest.php deleted file mode 100644 index 96e2fcd53961..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateBucketRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.logging.v2.UpdateBucketRequest - */ -class UpdateBucketRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the bucket to update. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The updated bucket. - * - * Generated from protobuf field .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $bucket = null; - /** - * Required. Field mask that specifies the fields in `bucket` that need an - * update. A bucket field will be overwritten if, and only if, it is in the - * update mask. `name` and output only fields cannot be updated. - * For a detailed `FieldMask` definition, see: - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=retention_days` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full resource name of the bucket to update. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * @type \Google\Cloud\Logging\V2\LogBucket $bucket - * Required. The updated bucket. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask that specifies the fields in `bucket` that need an - * update. A bucket field will be overwritten if, and only if, it is in the - * update mask. `name` and output only fields cannot be updated. - * For a detailed `FieldMask` definition, see: - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=retention_days` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the bucket to update. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full resource name of the bucket to update. - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "organizations/[ORGANIZATION_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * "folders/[FOLDER_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket"` - * - * 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 updated bucket. - * - * Generated from protobuf field .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogBucket|null - */ - public function getBucket() - { - return $this->bucket; - } - - public function hasBucket() - { - return isset($this->bucket); - } - - public function clearBucket() - { - unset($this->bucket); - } - - /** - * Required. The updated bucket. - * - * Generated from protobuf field .google.logging.v2.LogBucket bucket = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogBucket $var - * @return $this - */ - public function setBucket($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogBucket::class); - $this->bucket = $var; - - return $this; - } - - /** - * Required. Field mask that specifies the fields in `bucket` that need an - * update. A bucket field will be overwritten if, and only if, it is in the - * update mask. `name` and output only fields cannot be updated. - * For a detailed `FieldMask` definition, see: - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=retention_days` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.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. Field mask that specifies the fields in `bucket` that need an - * update. A bucket field will be overwritten if, and only if, it is in the - * update mask. `name` and output only fields cannot be updated. - * For a detailed `FieldMask` definition, see: - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=retention_days` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateCmekSettingsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateCmekSettingsRequest.php deleted file mode 100644 index 5c14437eecab..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateCmekSettingsRequest.php +++ /dev/null @@ -1,223 +0,0 @@ -google.logging.v2.UpdateCmekSettingsRequest - */ -class UpdateCmekSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name for the CMEK settings to update. - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * For example: - * `"organizations/12345/cmekSettings"` - * Note: CMEK for the Log Router can currently only be configured for Google - * Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The CMEK settings to update. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cmek_settings = null; - /** - * Optional. Field mask identifying which fields from `cmek_settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * See [FieldMask][google.protobuf.FieldMask] for more information. - * For example: `"updateMask=kmsKeyName"` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name for the CMEK settings to update. - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * For example: - * `"organizations/12345/cmekSettings"` - * Note: CMEK for the Log Router can currently only be configured for Google - * Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * @type \Google\Cloud\Logging\V2\CmekSettings $cmek_settings - * Required. The CMEK settings to update. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask identifying which fields from `cmek_settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * See [FieldMask][google.protobuf.FieldMask] for more information. - * For example: `"updateMask=kmsKeyName"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name for the CMEK settings to update. - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * For example: - * `"organizations/12345/cmekSettings"` - * Note: CMEK for the Log Router can currently only be configured for Google - * Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name for the CMEK settings to update. - * "projects/[PROJECT_ID]/cmekSettings" - * "organizations/[ORGANIZATION_ID]/cmekSettings" - * "billingAccounts/[BILLING_ACCOUNT_ID]/cmekSettings" - * "folders/[FOLDER_ID]/cmekSettings" - * For example: - * `"organizations/12345/cmekSettings"` - * Note: CMEK for the Log Router can currently only be configured for Google - * Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The CMEK settings to update. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\CmekSettings|null - */ - public function getCmekSettings() - { - return $this->cmek_settings; - } - - public function hasCmekSettings() - { - return isset($this->cmek_settings); - } - - public function clearCmekSettings() - { - unset($this->cmek_settings); - } - - /** - * Required. The CMEK settings to update. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field .google.logging.v2.CmekSettings cmek_settings = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\CmekSettings $var - * @return $this - */ - public function setCmekSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\CmekSettings::class); - $this->cmek_settings = $var; - - return $this; - } - - /** - * Optional. Field mask identifying which fields from `cmek_settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * See [FieldMask][google.protobuf.FieldMask] for more information. - * For example: `"updateMask=kmsKeyName"` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Field mask identifying which fields from `cmek_settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * See [FieldMask][google.protobuf.FieldMask] for more information. - * For example: `"updateMask=kmsKeyName"` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateExclusionRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateExclusionRequest.php deleted file mode 100644 index 5f179cbabc8a..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateExclusionRequest.php +++ /dev/null @@ -1,242 +0,0 @@ -google.logging.v2.UpdateExclusionRequest - */ -class UpdateExclusionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the exclusion to update: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. New values for the existing exclusion. Only the fields specified - * in `update_mask` are relevant. - * - * Generated from protobuf field .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $exclusion = null; - /** - * Required. A non-empty list of fields to change in the existing exclusion. - * New values for the fields are taken from the corresponding fields in the - * [LogExclusion][google.logging.v2.LogExclusion] included in this request. - * Fields not mentioned in `update_mask` are not changed and are ignored in - * the request. - * For example, to change the filter and description of an exclusion, - * specify an `update_mask` of `"filter,description"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param string $name Required. The resource name of the exclusion to update: - * - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * - * For example: - * - * `"projects/my-project/exclusions/my-exclusion"` - * Please see {@see ConfigServiceV2Client::logExclusionName()} for help formatting this field. - * @param \Google\Cloud\Logging\V2\LogExclusion $exclusion Required. New values for the existing exclusion. Only the fields specified - * in `update_mask` are relevant. - * @param \Google\Protobuf\FieldMask $updateMask Required. A non-empty list of fields to change in the existing exclusion. - * New values for the fields are taken from the corresponding fields in the - * [LogExclusion][google.logging.v2.LogExclusion] included in this request. - * Fields not mentioned in `update_mask` are not changed and are ignored in - * the request. - * - * For example, to change the filter and description of an exclusion, - * specify an `update_mask` of `"filter,description"`. - * - * @return \Google\Cloud\Logging\V2\UpdateExclusionRequest - * - * @experimental - */ - public static function build(string $name, \Google\Cloud\Logging\V2\LogExclusion $exclusion, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setName($name) - ->setExclusion($exclusion) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the exclusion to update: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * @type \Google\Cloud\Logging\V2\LogExclusion $exclusion - * Required. New values for the existing exclusion. Only the fields specified - * in `update_mask` are relevant. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. A non-empty list of fields to change in the existing exclusion. - * New values for the fields are taken from the corresponding fields in the - * [LogExclusion][google.logging.v2.LogExclusion] included in this request. - * Fields not mentioned in `update_mask` are not changed and are ignored in - * the request. - * For example, to change the filter and description of an exclusion, - * specify an `update_mask` of `"filter,description"`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the exclusion to update: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the exclusion to update: - * "projects/[PROJECT_ID]/exclusions/[EXCLUSION_ID]" - * "organizations/[ORGANIZATION_ID]/exclusions/[EXCLUSION_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/exclusions/[EXCLUSION_ID]" - * "folders/[FOLDER_ID]/exclusions/[EXCLUSION_ID]" - * For example: - * `"projects/my-project/exclusions/my-exclusion"` - * - * 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. New values for the existing exclusion. Only the fields specified - * in `update_mask` are relevant. - * - * Generated from protobuf field .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogExclusion|null - */ - public function getExclusion() - { - return $this->exclusion; - } - - public function hasExclusion() - { - return isset($this->exclusion); - } - - public function clearExclusion() - { - unset($this->exclusion); - } - - /** - * Required. New values for the existing exclusion. Only the fields specified - * in `update_mask` are relevant. - * - * Generated from protobuf field .google.logging.v2.LogExclusion exclusion = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogExclusion $var - * @return $this - */ - public function setExclusion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogExclusion::class); - $this->exclusion = $var; - - return $this; - } - - /** - * Required. A non-empty list of fields to change in the existing exclusion. - * New values for the fields are taken from the corresponding fields in the - * [LogExclusion][google.logging.v2.LogExclusion] included in this request. - * Fields not mentioned in `update_mask` are not changed and are ignored in - * the request. - * For example, to change the filter and description of an exclusion, - * specify an `update_mask` of `"filter,description"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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 non-empty list of fields to change in the existing exclusion. - * New values for the fields are taken from the corresponding fields in the - * [LogExclusion][google.logging.v2.LogExclusion] included in this request. - * Fields not mentioned in `update_mask` are not changed and are ignored in - * the request. - * For example, to change the filter and description of an exclusion, - * specify an `update_mask` of `"filter,description"`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateLogMetricRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateLogMetricRequest.php deleted file mode 100644 index bae29fc5966d..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateLogMetricRequest.php +++ /dev/null @@ -1,149 +0,0 @@ -google.logging.v2.UpdateLogMetricRequest - */ -class UpdateLogMetricRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the metric to update: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * The updated metric must be provided in the request and it's - * `name` field must be the same as `[METRIC_ID]` If the metric - * does not exist in `[PROJECT_ID]`, then a new metric is created. - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $metric_name = ''; - /** - * Required. The updated metric. - * - * Generated from protobuf field .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $metric = null; - - /** - * @param string $metricName Required. The resource name of the metric to update: - * - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * - * The updated metric must be provided in the request and it's - * `name` field must be the same as `[METRIC_ID]` If the metric - * does not exist in `[PROJECT_ID]`, then a new metric is created. Please see - * {@see MetricsServiceV2Client::logMetricName()} for help formatting this field. - * @param \Google\Cloud\Logging\V2\LogMetric $metric Required. The updated metric. - * - * @return \Google\Cloud\Logging\V2\UpdateLogMetricRequest - * - * @experimental - */ - public static function build(string $metricName, \Google\Cloud\Logging\V2\LogMetric $metric): self - { - return (new self()) - ->setMetricName($metricName) - ->setMetric($metric); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $metric_name - * Required. The resource name of the metric to update: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * The updated metric must be provided in the request and it's - * `name` field must be the same as `[METRIC_ID]` If the metric - * does not exist in `[PROJECT_ID]`, then a new metric is created. - * @type \Google\Cloud\Logging\V2\LogMetric $metric - * Required. The updated metric. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingMetrics::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the metric to update: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * The updated metric must be provided in the request and it's - * `name` field must be the same as `[METRIC_ID]` If the metric - * does not exist in `[PROJECT_ID]`, then a new metric is created. - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getMetricName() - { - return $this->metric_name; - } - - /** - * Required. The resource name of the metric to update: - * "projects/[PROJECT_ID]/metrics/[METRIC_ID]" - * The updated metric must be provided in the request and it's - * `name` field must be the same as `[METRIC_ID]` If the metric - * does not exist in `[PROJECT_ID]`, then a new metric is created. - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMetricName($var) - { - GPBUtil::checkString($var, True); - $this->metric_name = $var; - - return $this; - } - - /** - * Required. The updated metric. - * - * Generated from protobuf field .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogMetric|null - */ - public function getMetric() - { - return $this->metric; - } - - public function hasMetric() - { - return isset($this->metric); - } - - public function clearMetric() - { - unset($this->metric); - } - - /** - * Required. The updated metric. - * - * Generated from protobuf field .google.logging.v2.LogMetric metric = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogMetric $var - * @return $this - */ - public function setMetric($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogMetric::class); - $this->metric = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSettingsRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSettingsRequest.php deleted file mode 100644 index 32a73be8bcd0..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSettingsRequest.php +++ /dev/null @@ -1,236 +0,0 @@ -google.logging.v2.UpdateSettingsRequest - */ -class UpdateSettingsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name for the settings to update. - * "organizations/[ORGANIZATION_ID]/settings" - * For example: - * `"organizations/12345/settings"` - * Note: Settings for the Log Router can currently only be configured for - * Google Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The settings to update. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field .google.logging.v2.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $settings = null; - /** - * Optional. Field mask identifying which fields from `settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * See [FieldMask][google.protobuf.FieldMask] for more information. - * For example: `"updateMask=kmsKeyName"` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Logging\V2\Settings $settings Required. The settings to update. - * - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask identifying which fields from `settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * - * See [FieldMask][google.protobuf.FieldMask] for more information. - * - * For example: `"updateMask=kmsKeyName"` - * - * @return \Google\Cloud\Logging\V2\UpdateSettingsRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Logging\V2\Settings $settings, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSettings($settings) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name for the settings to update. - * "organizations/[ORGANIZATION_ID]/settings" - * For example: - * `"organizations/12345/settings"` - * Note: Settings for the Log Router can currently only be configured for - * Google Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * @type \Google\Cloud\Logging\V2\Settings $settings - * Required. The settings to update. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask identifying which fields from `settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * See [FieldMask][google.protobuf.FieldMask] for more information. - * For example: `"updateMask=kmsKeyName"` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name for the settings to update. - * "organizations/[ORGANIZATION_ID]/settings" - * For example: - * `"organizations/12345/settings"` - * Note: Settings for the Log Router can currently only be configured for - * Google Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name for the settings to update. - * "organizations/[ORGANIZATION_ID]/settings" - * For example: - * `"organizations/12345/settings"` - * Note: Settings for the Log Router can currently only be configured for - * Google Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The settings to update. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field .google.logging.v2.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\Settings|null - */ - public function getSettings() - { - return $this->settings; - } - - public function hasSettings() - { - return isset($this->settings); - } - - public function clearSettings() - { - unset($this->settings); - } - - /** - * Required. The settings to update. - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * Generated from protobuf field .google.logging.v2.Settings settings = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\Settings $var - * @return $this - */ - public function setSettings($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\Settings::class); - $this->settings = $var; - - return $this; - } - - /** - * Optional. Field mask identifying which fields from `settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * See [FieldMask][google.protobuf.FieldMask] for more information. - * For example: `"updateMask=kmsKeyName"` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Field mask identifying which fields from `settings` should - * be updated. A field will be overwritten if and only if it is in the update - * mask. Output only fields cannot be updated. - * See [FieldMask][google.protobuf.FieldMask] for more information. - * For example: `"updateMask=kmsKeyName"` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSinkRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSinkRequest.php deleted file mode 100644 index 204cd0aa88a7..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateSinkRequest.php +++ /dev/null @@ -1,368 +0,0 @@ -google.logging.v2.UpdateSinkRequest - */ -class UpdateSinkRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the sink to update, including the - * parent resource and the sink identifier: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * - * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $sink_name = ''; - /** - * Required. The updated sink, whose name is the same identifier that appears - * as part of `sink_name`. - * - * Generated from protobuf field .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $sink = null; - /** - * Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] - * for a description of this field. When updating a sink, the effect of this - * field on the value of `writer_identity` in the updated sink depends on both - * the old and new values of this field: - * + If the old and new values of this field are both false or both true, - * then there is no change to the sink's `writer_identity`. - * + If the old value is false and the new value is true, then - * `writer_identity` is changed to a unique service account. - * + It is an error if the old value is true and the new value is - * set to false or defaulted to false. - * - * Generated from protobuf field bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $unique_writer_identity = false; - /** - * Optional. Field mask that specifies the fields in `sink` that need - * an update. A sink field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * An empty `updateMask` is temporarily treated as using the following mask - * for backwards compatibility purposes: - * `destination,filter,includeChildren` - * At some point in the future, behavior will be removed and specifying an - * empty `updateMask` will be an error. - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=filter` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param string $sinkName Required. The full resource name of the sink to update, including the - * parent resource and the sink identifier: - * - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * - * For example: - * - * `"projects/my-project/sinks/my-sink"` - * Please see {@see ConfigServiceV2Client::logSinkName()} for help formatting this field. - * @param \Google\Cloud\Logging\V2\LogSink $sink Required. The updated sink, whose name is the same identifier that appears - * as part of `sink_name`. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask that specifies the fields in `sink` that need - * an update. A sink field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * - * An empty `updateMask` is temporarily treated as using the following mask - * for backwards compatibility purposes: - * - * `destination,filter,includeChildren` - * - * At some point in the future, behavior will be removed and specifying an - * empty `updateMask` will be an error. - * - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * - * For example: `updateMask=filter` - * - * @return \Google\Cloud\Logging\V2\UpdateSinkRequest - * - * @experimental - */ - public static function build(string $sinkName, \Google\Cloud\Logging\V2\LogSink $sink, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSinkName($sinkName) - ->setSink($sink) - ->setUpdateMask($updateMask); - } - - /** - * @param string $sinkName Required. The full resource name of the sink to update, including the - * parent resource and the sink identifier: - * - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * - * For example: - * - * `"projects/my-project/sinks/my-sink"` - * Please see {@see ConfigServiceV2Client::logSinkName()} for help formatting this field. - * @param \Google\Cloud\Logging\V2\LogSink $sink Required. The updated sink, whose name is the same identifier that appears - * as part of `sink_name`. - * - * @return \Google\Cloud\Logging\V2\UpdateSinkRequest - * - * @experimental - */ - public static function buildFromSinkNameSink(string $sinkName, \Google\Cloud\Logging\V2\LogSink $sink): self - { - return (new self()) - ->setSinkName($sinkName) - ->setSink($sink); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $sink_name - * Required. The full resource name of the sink to update, including the - * parent resource and the sink identifier: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * @type \Google\Cloud\Logging\V2\LogSink $sink - * Required. The updated sink, whose name is the same identifier that appears - * as part of `sink_name`. - * @type bool $unique_writer_identity - * Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] - * for a description of this field. When updating a sink, the effect of this - * field on the value of `writer_identity` in the updated sink depends on both - * the old and new values of this field: - * + If the old and new values of this field are both false or both true, - * then there is no change to the sink's `writer_identity`. - * + If the old value is false and the new value is true, then - * `writer_identity` is changed to a unique service account. - * + It is an error if the old value is true and the new value is - * set to false or defaulted to false. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask that specifies the fields in `sink` that need - * an update. A sink field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * An empty `updateMask` is temporarily treated as using the following mask - * for backwards compatibility purposes: - * `destination,filter,includeChildren` - * At some point in the future, behavior will be removed and specifying an - * empty `updateMask` will be an error. - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=filter` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the sink to update, including the - * parent resource and the sink identifier: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * - * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getSinkName() - { - return $this->sink_name; - } - - /** - * Required. The full resource name of the sink to update, including the - * parent resource and the sink identifier: - * "projects/[PROJECT_ID]/sinks/[SINK_ID]" - * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" - * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" - * "folders/[FOLDER_ID]/sinks/[SINK_ID]" - * For example: - * `"projects/my-project/sinks/my-sink"` - * - * Generated from protobuf field string sink_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSinkName($var) - { - GPBUtil::checkString($var, True); - $this->sink_name = $var; - - return $this; - } - - /** - * Required. The updated sink, whose name is the same identifier that appears - * as part of `sink_name`. - * - * Generated from protobuf field .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogSink|null - */ - public function getSink() - { - return $this->sink; - } - - public function hasSink() - { - return isset($this->sink); - } - - public function clearSink() - { - unset($this->sink); - } - - /** - * Required. The updated sink, whose name is the same identifier that appears - * as part of `sink_name`. - * - * Generated from protobuf field .google.logging.v2.LogSink sink = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogSink $var - * @return $this - */ - public function setSink($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogSink::class); - $this->sink = $var; - - return $this; - } - - /** - * Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] - * for a description of this field. When updating a sink, the effect of this - * field on the value of `writer_identity` in the updated sink depends on both - * the old and new values of this field: - * + If the old and new values of this field are both false or both true, - * then there is no change to the sink's `writer_identity`. - * + If the old value is false and the new value is true, then - * `writer_identity` is changed to a unique service account. - * + It is an error if the old value is true and the new value is - * set to false or defaulted to false. - * - * Generated from protobuf field bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getUniqueWriterIdentity() - { - return $this->unique_writer_identity; - } - - /** - * Optional. See [sinks.create][google.logging.v2.ConfigServiceV2.CreateSink] - * for a description of this field. When updating a sink, the effect of this - * field on the value of `writer_identity` in the updated sink depends on both - * the old and new values of this field: - * + If the old and new values of this field are both false or both true, - * then there is no change to the sink's `writer_identity`. - * + If the old value is false and the new value is true, then - * `writer_identity` is changed to a unique service account. - * + It is an error if the old value is true and the new value is - * set to false or defaulted to false. - * - * Generated from protobuf field bool unique_writer_identity = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setUniqueWriterIdentity($var) - { - GPBUtil::checkBool($var); - $this->unique_writer_identity = $var; - - return $this; - } - - /** - * Optional. Field mask that specifies the fields in `sink` that need - * an update. A sink field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * An empty `updateMask` is temporarily treated as using the following mask - * for backwards compatibility purposes: - * `destination,filter,includeChildren` - * At some point in the future, behavior will be removed and specifying an - * empty `updateMask` will be an error. - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=filter` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Field mask that specifies the fields in `sink` that need - * an update. A sink field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * An empty `updateMask` is temporarily treated as using the following mask - * for backwards compatibility purposes: - * `destination,filter,includeChildren` - * At some point in the future, behavior will be removed and specifying an - * empty `updateMask` will be an error. - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=filter` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateViewRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateViewRequest.php deleted file mode 100644 index 8d2690cb2503..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/UpdateViewRequest.php +++ /dev/null @@ -1,187 +0,0 @@ -google.logging.v2.UpdateViewRequest - */ -class UpdateViewRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full resource name of the view to update - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The updated view. - * - * Generated from protobuf field .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $view = null; - /** - * Optional. Field mask that specifies the fields in `view` that need - * an update. A field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=filter` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The full resource name of the view to update - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * @type \Google\Cloud\Logging\V2\LogView $view - * Required. The updated view. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask that specifies the fields in `view` that need - * an update. A field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=filter` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\LoggingConfig::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full resource name of the view to update - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The full resource name of the view to update - * "projects/[PROJECT_ID]/locations/[LOCATION_ID]/buckets/[BUCKET_ID]/views/[VIEW_ID]" - * For example: - * `"projects/my-project/locations/global/buckets/my-bucket/views/my-view"` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The updated view. - * - * Generated from protobuf field .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Logging\V2\LogView|null - */ - public function getView() - { - return $this->view; - } - - public function hasView() - { - return isset($this->view); - } - - public function clearView() - { - unset($this->view); - } - - /** - * Required. The updated view. - * - * Generated from protobuf field .google.logging.v2.LogView view = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogView $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Logging\V2\LogView::class); - $this->view = $var; - - return $this; - } - - /** - * Optional. Field mask that specifies the fields in `view` that need - * an update. A field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=filter` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Field mask that specifies the fields in `view` that need - * an update. A field will be overwritten if, and only if, it is - * in the update mask. `name` and output only fields cannot be updated. - * For a detailed `FieldMask` definition, see - * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask - * For example: `updateMask=filter` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @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/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesPartialErrors.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesPartialErrors.php deleted file mode 100644 index b95e6669d6d9..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesPartialErrors.php +++ /dev/null @@ -1,83 +0,0 @@ -google.logging.v2.WriteLogEntriesPartialErrors - */ -class WriteLogEntriesPartialErrors extends \Google\Protobuf\Internal\Message -{ - /** - * When `WriteLogEntriesRequest.partial_success` is true, records the error - * status for entries that were not written due to a permanent error, keyed - * by the entry's zero-based index in `WriteLogEntriesRequest.entries`. - * Failed requests for which no entries are written will not include - * per-entry errors. - * - * Generated from protobuf field map log_entry_errors = 1; - */ - private $log_entry_errors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $log_entry_errors - * When `WriteLogEntriesRequest.partial_success` is true, records the error - * status for entries that were not written due to a permanent error, keyed - * by the entry's zero-based index in `WriteLogEntriesRequest.entries`. - * Failed requests for which no entries are written will not include - * per-entry errors. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * When `WriteLogEntriesRequest.partial_success` is true, records the error - * status for entries that were not written due to a permanent error, keyed - * by the entry's zero-based index in `WriteLogEntriesRequest.entries`. - * Failed requests for which no entries are written will not include - * per-entry errors. - * - * Generated from protobuf field map log_entry_errors = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLogEntryErrors() - { - return $this->log_entry_errors; - } - - /** - * When `WriteLogEntriesRequest.partial_success` is true, records the error - * status for entries that were not written due to a permanent error, keyed - * by the entry's zero-based index in `WriteLogEntriesRequest.entries`. - * Failed requests for which no entries are written will not include - * per-entry errors. - * - * Generated from protobuf field map log_entry_errors = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLogEntryErrors($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::INT32, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Rpc\Status::class); - $this->log_entry_errors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesRequest.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesRequest.php deleted file mode 100644 index 7da34f362e65..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesRequest.php +++ /dev/null @@ -1,507 +0,0 @@ -google.logging.v2.WriteLogEntriesRequest - */ -class WriteLogEntriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A default log resource name that is assigned to all log entries - * in `entries` that do not specify a value for `log_name`: - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * `[LOG_ID]` must be URL-encoded. For example: - * "projects/my-project-id/logs/syslog" - * "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" - * The permission `logging.logEntries.create` is needed on each project, - * organization, billing account, or folder that is receiving new log - * entries, whether the resource is specified in `logName` or in an - * individual log entry. - * - * Generated from protobuf field string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $log_name = ''; - /** - * Optional. A default monitored resource object that is assigned to all log - * entries in `entries` that do not specify a value for `resource`. Example: - * { "type": "gce_instance", - * "labels": { - * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} - * See [LogEntry][google.logging.v2.LogEntry]. - * - * Generated from protobuf field .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $resource = null; - /** - * Optional. Default labels that are added to the `labels` field of all log - * entries in `entries`. If a log entry already has a label with the same key - * as a label in this parameter, then the log entry's label is not changed. - * See [LogEntry][google.logging.v2.LogEntry]. - * - * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Required. The log entries to send to Logging. The order of log - * entries in this list does not matter. Values supplied in this method's - * `log_name`, `resource`, and `labels` fields are copied into those log - * entries in this list that do not include values for their corresponding - * fields. For more information, see the - * [LogEntry][google.logging.v2.LogEntry] type. - * If the `timestamp` or `insert_id` fields are missing in log entries, then - * this method supplies the current time or a unique identifier, respectively. - * The supplied values are chosen so that, among the log entries that did not - * supply their own values, the entries earlier in the list will sort before - * the entries later in the list. See the `entries.list` method. - * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quotas) in - * the past or more than 24 hours in the future will not be available when - * calling `entries.list`. However, those log entries can still be [exported - * with - * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quotas) for calls to - * `entries.write`, you should try to include several log entries in this - * list, rather than calling this method for each individual log entry. - * - * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - private $entries; - /** - * Optional. Whether a batch's valid entries should be written even if some - * other entry failed due to a permanent error such as INVALID_ARGUMENT or - * PERMISSION_DENIED. If any entry failed, then the response status is the - * response status of one of the failed entries. The response will include - * error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by - * the entries' zero-based index in the `entries`. Failed requests for which - * no entries are written will not include per-entry errors. - * - * Generated from protobuf field bool partial_success = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $partial_success = false; - /** - * Optional. If true, the request should expect normal response, but the - * entries won't be persisted nor exported. Useful for checking whether the - * logging API endpoints are working properly before sending valuable data. - * - * Generated from protobuf field bool dry_run = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $dry_run = false; - - /** - * @param string $logName Optional. A default log resource name that is assigned to all log entries - * in `entries` that do not specify a value for `log_name`: - * - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * - * `[LOG_ID]` must be URL-encoded. For example: - * - * "projects/my-project-id/logs/syslog" - * "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" - * - * The permission `logging.logEntries.create` is needed on each project, - * organization, billing account, or folder that is receiving new log - * entries, whether the resource is specified in `logName` or in an - * individual log entry. - * @param \Google\Api\MonitoredResource $resource Optional. A default monitored resource object that is assigned to all log - * entries in `entries` that do not specify a value for `resource`. Example: - * - * { "type": "gce_instance", - * "labels": { - * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} - * - * See [LogEntry][google.logging.v2.LogEntry]. - * @param array $labels Optional. Default labels that are added to the `labels` field of all log - * entries in `entries`. If a log entry already has a label with the same key - * as a label in this parameter, then the log entry's label is not changed. - * See [LogEntry][google.logging.v2.LogEntry]. - * @param \Google\Cloud\Logging\V2\LogEntry[] $entries Required. The log entries to send to Logging. The order of log - * entries in this list does not matter. Values supplied in this method's - * `log_name`, `resource`, and `labels` fields are copied into those log - * entries in this list that do not include values for their corresponding - * fields. For more information, see the - * [LogEntry][google.logging.v2.LogEntry] type. - * - * If the `timestamp` or `insert_id` fields are missing in log entries, then - * this method supplies the current time or a unique identifier, respectively. - * The supplied values are chosen so that, among the log entries that did not - * supply their own values, the entries earlier in the list will sort before - * the entries later in the list. See the `entries.list` method. - * - * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quotas) in - * the past or more than 24 hours in the future will not be available when - * calling `entries.list`. However, those log entries can still be [exported - * with - * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * - * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quotas) for calls to - * `entries.write`, you should try to include several log entries in this - * list, rather than calling this method for each individual log entry. - * - * @return \Google\Cloud\Logging\V2\WriteLogEntriesRequest - * - * @experimental - */ - public static function build(string $logName, \Google\Api\MonitoredResource $resource, array $labels, array $entries): self - { - return (new self()) - ->setLogName($logName) - ->setResource($resource) - ->setLabels($labels) - ->setEntries($entries); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $log_name - * Optional. A default log resource name that is assigned to all log entries - * in `entries` that do not specify a value for `log_name`: - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * `[LOG_ID]` must be URL-encoded. For example: - * "projects/my-project-id/logs/syslog" - * "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" - * The permission `logging.logEntries.create` is needed on each project, - * organization, billing account, or folder that is receiving new log - * entries, whether the resource is specified in `logName` or in an - * individual log entry. - * @type \Google\Api\MonitoredResource $resource - * Optional. A default monitored resource object that is assigned to all log - * entries in `entries` that do not specify a value for `resource`. Example: - * { "type": "gce_instance", - * "labels": { - * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} - * See [LogEntry][google.logging.v2.LogEntry]. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. Default labels that are added to the `labels` field of all log - * entries in `entries`. If a log entry already has a label with the same key - * as a label in this parameter, then the log entry's label is not changed. - * See [LogEntry][google.logging.v2.LogEntry]. - * @type \Google\Cloud\Logging\V2\LogEntry[] $entries - * Required. The log entries to send to Logging. The order of log - * entries in this list does not matter. Values supplied in this method's - * `log_name`, `resource`, and `labels` fields are copied into those log - * entries in this list that do not include values for their corresponding - * fields. For more information, see the - * [LogEntry][google.logging.v2.LogEntry] type. - * If the `timestamp` or `insert_id` fields are missing in log entries, then - * this method supplies the current time or a unique identifier, respectively. - * The supplied values are chosen so that, among the log entries that did not - * supply their own values, the entries earlier in the list will sort before - * the entries later in the list. See the `entries.list` method. - * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quotas) in - * the past or more than 24 hours in the future will not be available when - * calling `entries.list`. However, those log entries can still be [exported - * with - * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quotas) for calls to - * `entries.write`, you should try to include several log entries in this - * list, rather than calling this method for each individual log entry. - * @type bool $partial_success - * Optional. Whether a batch's valid entries should be written even if some - * other entry failed due to a permanent error such as INVALID_ARGUMENT or - * PERMISSION_DENIED. If any entry failed, then the response status is the - * response status of one of the failed entries. The response will include - * error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by - * the entries' zero-based index in the `entries`. Failed requests for which - * no entries are written will not include per-entry errors. - * @type bool $dry_run - * Optional. If true, the request should expect normal response, but the - * entries won't be persisted nor exported. Useful for checking whether the - * logging API endpoints are working properly before sending valuable data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A default log resource name that is assigned to all log entries - * in `entries` that do not specify a value for `log_name`: - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * `[LOG_ID]` must be URL-encoded. For example: - * "projects/my-project-id/logs/syslog" - * "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" - * The permission `logging.logEntries.create` is needed on each project, - * organization, billing account, or folder that is receiving new log - * entries, whether the resource is specified in `logName` or in an - * individual log entry. - * - * Generated from protobuf field string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getLogName() - { - return $this->log_name; - } - - /** - * Optional. A default log resource name that is assigned to all log entries - * in `entries` that do not specify a value for `log_name`: - * * `projects/[PROJECT_ID]/logs/[LOG_ID]` - * * `organizations/[ORGANIZATION_ID]/logs/[LOG_ID]` - * * `billingAccounts/[BILLING_ACCOUNT_ID]/logs/[LOG_ID]` - * * `folders/[FOLDER_ID]/logs/[LOG_ID]` - * `[LOG_ID]` must be URL-encoded. For example: - * "projects/my-project-id/logs/syslog" - * "organizations/123/logs/cloudaudit.googleapis.com%2Factivity" - * The permission `logging.logEntries.create` is needed on each project, - * organization, billing account, or folder that is receiving new log - * entries, whether the resource is specified in `logName` or in an - * individual log entry. - * - * Generated from protobuf field string log_name = 1 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setLogName($var) - { - GPBUtil::checkString($var, True); - $this->log_name = $var; - - return $this; - } - - /** - * Optional. A default monitored resource object that is assigned to all log - * entries in `entries` that do not specify a value for `resource`. Example: - * { "type": "gce_instance", - * "labels": { - * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} - * See [LogEntry][google.logging.v2.LogEntry]. - * - * Generated from protobuf field .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Api\MonitoredResource|null - */ - public function getResource() - { - return $this->resource; - } - - public function hasResource() - { - return isset($this->resource); - } - - public function clearResource() - { - unset($this->resource); - } - - /** - * Optional. A default monitored resource object that is assigned to all log - * entries in `entries` that do not specify a value for `resource`. Example: - * { "type": "gce_instance", - * "labels": { - * "zone": "us-central1-a", "instance_id": "00000000000000000000" }} - * See [LogEntry][google.logging.v2.LogEntry]. - * - * Generated from protobuf field .google.api.MonitoredResource resource = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Api\MonitoredResource $var - * @return $this - */ - public function setResource($var) - { - GPBUtil::checkMessage($var, \Google\Api\MonitoredResource::class); - $this->resource = $var; - - return $this; - } - - /** - * Optional. Default labels that are added to the `labels` field of all log - * entries in `entries`. If a log entry already has a label with the same key - * as a label in this parameter, then the log entry's label is not changed. - * See [LogEntry][google.logging.v2.LogEntry]. - * - * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. Default labels that are added to the `labels` field of all log - * entries in `entries`. If a log entry already has a label with the same key - * as a label in this parameter, then the log entry's label is not changed. - * See [LogEntry][google.logging.v2.LogEntry]. - * - * Generated from protobuf field map labels = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @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; - } - - /** - * Required. The log entries to send to Logging. The order of log - * entries in this list does not matter. Values supplied in this method's - * `log_name`, `resource`, and `labels` fields are copied into those log - * entries in this list that do not include values for their corresponding - * fields. For more information, see the - * [LogEntry][google.logging.v2.LogEntry] type. - * If the `timestamp` or `insert_id` fields are missing in log entries, then - * this method supplies the current time or a unique identifier, respectively. - * The supplied values are chosen so that, among the log entries that did not - * supply their own values, the entries earlier in the list will sort before - * the entries later in the list. See the `entries.list` method. - * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quotas) in - * the past or more than 24 hours in the future will not be available when - * calling `entries.list`. However, those log entries can still be [exported - * with - * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quotas) for calls to - * `entries.write`, you should try to include several log entries in this - * list, rather than calling this method for each individual log entry. - * - * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField<\Google\Cloud\Logging\V2\LogEntry> - */ - public function getEntries() - { - return $this->entries; - } - - /** - * Required. The log entries to send to Logging. The order of log - * entries in this list does not matter. Values supplied in this method's - * `log_name`, `resource`, and `labels` fields are copied into those log - * entries in this list that do not include values for their corresponding - * fields. For more information, see the - * [LogEntry][google.logging.v2.LogEntry] type. - * If the `timestamp` or `insert_id` fields are missing in log entries, then - * this method supplies the current time or a unique identifier, respectively. - * The supplied values are chosen so that, among the log entries that did not - * supply their own values, the entries earlier in the list will sort before - * the entries later in the list. See the `entries.list` method. - * Log entries with timestamps that are more than the - * [logs retention period](https://cloud.google.com/logging/quotas) in - * the past or more than 24 hours in the future will not be available when - * calling `entries.list`. However, those log entries can still be [exported - * with - * LogSinks](https://cloud.google.com/logging/docs/api/tasks/exporting-logs). - * To improve throughput and to avoid exceeding the - * [quota limit](https://cloud.google.com/logging/quotas) for calls to - * `entries.write`, you should try to include several log entries in this - * list, rather than calling this method for each individual log entry. - * - * Generated from protobuf field repeated .google.logging.v2.LogEntry entries = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Logging\V2\LogEntry[] $var - * @return $this - */ - public function setEntries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Logging\V2\LogEntry::class); - $this->entries = $arr; - - return $this; - } - - /** - * Optional. Whether a batch's valid entries should be written even if some - * other entry failed due to a permanent error such as INVALID_ARGUMENT or - * PERMISSION_DENIED. If any entry failed, then the response status is the - * response status of one of the failed entries. The response will include - * error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by - * the entries' zero-based index in the `entries`. Failed requests for which - * no entries are written will not include per-entry errors. - * - * Generated from protobuf field bool partial_success = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getPartialSuccess() - { - return $this->partial_success; - } - - /** - * Optional. Whether a batch's valid entries should be written even if some - * other entry failed due to a permanent error such as INVALID_ARGUMENT or - * PERMISSION_DENIED. If any entry failed, then the response status is the - * response status of one of the failed entries. The response will include - * error details in `WriteLogEntriesPartialErrors.log_entry_errors` keyed by - * the entries' zero-based index in the `entries`. Failed requests for which - * no entries are written will not include per-entry errors. - * - * Generated from protobuf field bool partial_success = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setPartialSuccess($var) - { - GPBUtil::checkBool($var); - $this->partial_success = $var; - - return $this; - } - - /** - * Optional. If true, the request should expect normal response, but the - * entries won't be persisted nor exported. Useful for checking whether the - * logging API endpoints are working properly before sending valuable data. - * - * Generated from protobuf field bool dry_run = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getDryRun() - { - return $this->dry_run; - } - - /** - * Optional. If true, the request should expect normal response, but the - * entries won't be persisted nor exported. Useful for checking whether the - * logging API endpoints are working properly before sending valuable data. - * - * Generated from protobuf field bool dry_run = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setDryRun($var) - { - GPBUtil::checkBool($var); - $this->dry_run = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesResponse.php b/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesResponse.php deleted file mode 100644 index b1a8c8f915b5..000000000000 --- a/owl-bot-staging/Logging/v2/proto/src/Google/Cloud/Logging/V2/WriteLogEntriesResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.logging.v2.WriteLogEntriesResponse - */ -class WriteLogEntriesResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Logging\V2\Logging::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/copy_log_entries.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/copy_log_entries.php deleted file mode 100644 index 9c3f034e864d..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/copy_log_entries.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($name) - ->setDestination($destination); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $configServiceV2Client->copyLogEntries($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CopyLogEntriesResponse $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]'; - $destination = '[DESTINATION]'; - - copy_log_entries_sample($name, $destination); -} -// [END logging_v2_generated_ConfigServiceV2_CopyLogEntries_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket.php deleted file mode 100644 index 458dcff8b55b..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent) - ->setBucketId($bucketId) - ->setBucket($bucket); - - // Call the API and handle any network failures. - try { - /** @var LogBucket $response */ - $response = $configServiceV2Client->createBucket($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ConfigServiceV2Client::organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $bucketId = '[BUCKET_ID]'; - - create_bucket_sample($formattedParent, $bucketId); -} -// [END logging_v2_generated_ConfigServiceV2_CreateBucket_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket_async.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket_async.php deleted file mode 100644 index d30360bc4259..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_bucket_async.php +++ /dev/null @@ -1,98 +0,0 @@ -setParent($formattedParent) - ->setBucketId($bucketId) - ->setBucket($bucket); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $configServiceV2Client->createBucketAsync($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var LogBucket $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 = ConfigServiceV2Client::organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $bucketId = '[BUCKET_ID]'; - - create_bucket_async_sample($formattedParent, $bucketId); -} -// [END logging_v2_generated_ConfigServiceV2_CreateBucketAsync_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_exclusion.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_exclusion.php deleted file mode 100644 index 4e93aeba45d1..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_exclusion.php +++ /dev/null @@ -1,106 +0,0 @@ -setName($exclusionName) - ->setFilter($exclusionFilter); - $request = (new CreateExclusionRequest()) - ->setParent($formattedParent) - ->setExclusion($exclusion); - - // Call the API and handle any network failures. - try { - /** @var LogExclusion $response */ - $response = $configServiceV2Client->createExclusion($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ConfigServiceV2Client::projectName('[PROJECT]'); - $exclusionName = '[NAME]'; - $exclusionFilter = '[FILTER]'; - - create_exclusion_sample($formattedParent, $exclusionName, $exclusionFilter); -} -// [END logging_v2_generated_ConfigServiceV2_CreateExclusion_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_link.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_link.php deleted file mode 100644 index 0239a2cf8083..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_link.php +++ /dev/null @@ -1,97 +0,0 @@ -setParent($formattedParent) - ->setLink($link) - ->setLinkId($linkId); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $configServiceV2Client->createLink($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Link $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 = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $linkId = '[LINK_ID]'; - - create_link_sample($formattedParent, $linkId); -} -// [END logging_v2_generated_ConfigServiceV2_CreateLink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_sink.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_sink.php deleted file mode 100644 index 56561a9d94a2..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_sink.php +++ /dev/null @@ -1,110 +0,0 @@ -setName($sinkName) - ->setDestination($sinkDestination); - $request = (new CreateSinkRequest()) - ->setParent($formattedParent) - ->setSink($sink); - - // Call the API and handle any network failures. - try { - /** @var LogSink $response */ - $response = $configServiceV2Client->createSink($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = ConfigServiceV2Client::projectName('[PROJECT]'); - $sinkName = '[NAME]'; - $sinkDestination = '[DESTINATION]'; - - create_sink_sample($formattedParent, $sinkName, $sinkDestination); -} -// [END logging_v2_generated_ConfigServiceV2_CreateSink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_view.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_view.php deleted file mode 100644 index 2bef426b760e..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/create_view.php +++ /dev/null @@ -1,84 +0,0 @@ -setParent($parent) - ->setViewId($viewId) - ->setView($view); - - // Call the API and handle any network failures. - try { - /** @var LogView $response */ - $response = $configServiceV2Client->createView($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - $viewId = '[VIEW_ID]'; - - create_view_sample($parent, $viewId); -} -// [END logging_v2_generated_ConfigServiceV2_CreateView_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_bucket.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_bucket.php deleted file mode 100644 index e9509f9682a7..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_bucket.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $configServiceV2Client->deleteBucket($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - - delete_bucket_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_DeleteBucket_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_exclusion.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_exclusion.php deleted file mode 100644 index b078c5539218..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_exclusion.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $configServiceV2Client->deleteExclusion($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ConfigServiceV2Client::logExclusionName('[PROJECT]', '[EXCLUSION]'); - - delete_exclusion_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_DeleteExclusion_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_link.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_link.php deleted file mode 100644 index 45da6115548a..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_link.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $configServiceV2Client->deleteLink($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ConfigServiceV2Client::linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); - - delete_link_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_DeleteLink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_sink.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_sink.php deleted file mode 100644 index 2ffdc424ccff..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_sink.php +++ /dev/null @@ -1,80 +0,0 @@ -setSinkName($formattedSinkName); - - // Call the API and handle any network failures. - try { - $configServiceV2Client->deleteSink($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedSinkName = ConfigServiceV2Client::logSinkName('[PROJECT]', '[SINK]'); - - delete_sink_sample($formattedSinkName); -} -// [END logging_v2_generated_ConfigServiceV2_DeleteSink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_view.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_view.php deleted file mode 100644 index e433b1f16e42..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/delete_view.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $configServiceV2Client->deleteView($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ConfigServiceV2Client::logViewName( - '[PROJECT]', - '[LOCATION]', - '[BUCKET]', - '[VIEW]' - ); - - delete_view_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_DeleteView_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_bucket.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_bucket.php deleted file mode 100644 index 0fd146716d4f..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_bucket.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var LogBucket $response */ - $response = $configServiceV2Client->getBucket($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - - get_bucket_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_GetBucket_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_cmek_settings.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_cmek_settings.php deleted file mode 100644 index 20c1b6738262..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_cmek_settings.php +++ /dev/null @@ -1,66 +0,0 @@ -getCmekSettings($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END logging_v2_generated_ConfigServiceV2_GetCmekSettings_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_exclusion.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_exclusion.php deleted file mode 100644 index 841601051f96..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_exclusion.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var LogExclusion $response */ - $response = $configServiceV2Client->getExclusion($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ConfigServiceV2Client::logExclusionName('[PROJECT]', '[EXCLUSION]'); - - get_exclusion_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_GetExclusion_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_link.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_link.php deleted file mode 100644 index 031c456969b8..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_link.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Link $response */ - $response = $configServiceV2Client->getLink($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ConfigServiceV2Client::linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); - - get_link_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_GetLink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_settings.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_settings.php deleted file mode 100644 index a9b8aa1e5bb7..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_settings.php +++ /dev/null @@ -1,94 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Settings $response */ - $response = $configServiceV2Client->getSettings($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ConfigServiceV2Client::settingsName('[PROJECT]'); - - get_settings_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_GetSettings_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_sink.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_sink.php deleted file mode 100644 index f78809abf90e..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_sink.php +++ /dev/null @@ -1,80 +0,0 @@ -setSinkName($formattedSinkName); - - // Call the API and handle any network failures. - try { - /** @var LogSink $response */ - $response = $configServiceV2Client->getSink($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedSinkName = ConfigServiceV2Client::logSinkName('[PROJECT]', '[SINK]'); - - get_sink_sample($formattedSinkName); -} -// [END logging_v2_generated_ConfigServiceV2_GetSink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_view.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_view.php deleted file mode 100644 index fe94019225f6..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/get_view.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var LogView $response */ - $response = $configServiceV2Client->getView($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ConfigServiceV2Client::logViewName( - '[PROJECT]', - '[LOCATION]', - '[BUCKET]', - '[VIEW]' - ); - - get_view_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_GetView_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_buckets.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_buckets.php deleted file mode 100644 index 8eb8418d16ed..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_buckets.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $configServiceV2Client->listBuckets($request); - - /** @var LogBucket $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 = ConfigServiceV2Client::organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - - list_buckets_sample($formattedParent); -} -// [END logging_v2_generated_ConfigServiceV2_ListBuckets_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_exclusions.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_exclusions.php deleted file mode 100644 index 653f3659dca6..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_exclusions.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $configServiceV2Client->listExclusions($request); - - /** @var LogExclusion $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 = ConfigServiceV2Client::projectName('[PROJECT]'); - - list_exclusions_sample($formattedParent); -} -// [END logging_v2_generated_ConfigServiceV2_ListExclusions_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_links.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_links.php deleted file mode 100644 index 32ebd931043f..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_links.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $configServiceV2Client->listLinks($request); - - /** @var Link $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 = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - - list_links_sample($formattedParent); -} -// [END logging_v2_generated_ConfigServiceV2_ListLinks_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_sinks.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_sinks.php deleted file mode 100644 index f049f6ec0f5c..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_sinks.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $configServiceV2Client->listSinks($request); - - /** @var LogSink $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 = ConfigServiceV2Client::projectName('[PROJECT]'); - - list_sinks_sample($formattedParent); -} -// [END logging_v2_generated_ConfigServiceV2_ListSinks_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_views.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_views.php deleted file mode 100644 index edf4e775501e..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/list_views.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $configServiceV2Client->listViews($request); - - /** @var LogView $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - list_views_sample($parent); -} -// [END logging_v2_generated_ConfigServiceV2_ListViews_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/undelete_bucket.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/undelete_bucket.php deleted file mode 100644 index 3f0fb01d7ff6..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/undelete_bucket.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $configServiceV2Client->undeleteBucket($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - - undelete_bucket_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_UndeleteBucket_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket.php deleted file mode 100644 index 394d07a6beaf..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName) - ->setBucket($bucket) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var LogBucket $response */ - $response = $configServiceV2Client->updateBucket($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - - update_bucket_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_UpdateBucket_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket_async.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket_async.php deleted file mode 100644 index d18d0836ff38..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_bucket_async.php +++ /dev/null @@ -1,102 +0,0 @@ -setName($formattedName) - ->setBucket($bucket) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $configServiceV2Client->updateBucketAsync($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var LogBucket $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 = ConfigServiceV2Client::logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - - update_bucket_async_sample($formattedName); -} -// [END logging_v2_generated_ConfigServiceV2_UpdateBucketAsync_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_cmek_settings.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_cmek_settings.php deleted file mode 100644 index 3fd6125cc6e4..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_cmek_settings.php +++ /dev/null @@ -1,71 +0,0 @@ -updateCmekSettings($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END logging_v2_generated_ConfigServiceV2_UpdateCmekSettings_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_exclusion.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_exclusion.php deleted file mode 100644 index 81ac5e077bc2..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_exclusion.php +++ /dev/null @@ -1,107 +0,0 @@ -setName($exclusionName) - ->setFilter($exclusionFilter); - $updateMask = new FieldMask(); - $request = (new UpdateExclusionRequest()) - ->setName($formattedName) - ->setExclusion($exclusion) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var LogExclusion $response */ - $response = $configServiceV2Client->updateExclusion($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = ConfigServiceV2Client::logExclusionName('[PROJECT]', '[EXCLUSION]'); - $exclusionName = '[NAME]'; - $exclusionFilter = '[FILTER]'; - - update_exclusion_sample($formattedName, $exclusionName, $exclusionFilter); -} -// [END logging_v2_generated_ConfigServiceV2_UpdateExclusion_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_settings.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_settings.php deleted file mode 100644 index eb2f8f1261fd..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_settings.php +++ /dev/null @@ -1,97 +0,0 @@ -setName($name) - ->setSettings($settings); - - // Call the API and handle any network failures. - try { - /** @var Settings $response */ - $response = $configServiceV2Client->updateSettings($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - update_settings_sample($name); -} -// [END logging_v2_generated_ConfigServiceV2_UpdateSettings_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_sink.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_sink.php deleted file mode 100644 index 031a022e8909..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_sink.php +++ /dev/null @@ -1,111 +0,0 @@ -setName($sinkName) - ->setDestination($sinkDestination); - $request = (new UpdateSinkRequest()) - ->setSinkName($formattedSinkName) - ->setSink($sink); - - // Call the API and handle any network failures. - try { - /** @var LogSink $response */ - $response = $configServiceV2Client->updateSink($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedSinkName = ConfigServiceV2Client::logSinkName('[PROJECT]', '[SINK]'); - $sinkName = '[NAME]'; - $sinkDestination = '[DESTINATION]'; - - update_sink_sample($formattedSinkName, $sinkName, $sinkDestination); -} -// [END logging_v2_generated_ConfigServiceV2_UpdateSink_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_view.php b/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_view.php deleted file mode 100644 index 60ba67ab4462..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/ConfigServiceV2Client/update_view.php +++ /dev/null @@ -1,82 +0,0 @@ -setName($name) - ->setView($view); - - // Call the API and handle any network failures. - try { - /** @var LogView $response */ - $response = $configServiceV2Client->updateView($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - - update_view_sample($name); -} -// [END logging_v2_generated_ConfigServiceV2_UpdateView_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/delete_log.php b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/delete_log.php deleted file mode 100644 index adb822ffb030..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/delete_log.php +++ /dev/null @@ -1,84 +0,0 @@ -setLogName($formattedLogName); - - // Call the API and handle any network failures. - try { - $loggingServiceV2Client->deleteLog($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedLogName = LoggingServiceV2Client::logName('[PROJECT]', '[LOG]'); - - delete_log_sample($formattedLogName); -} -// [END logging_v2_generated_LoggingServiceV2_DeleteLog_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_log_entries.php b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_log_entries.php deleted file mode 100644 index cbcc825da832..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_log_entries.php +++ /dev/null @@ -1,96 +0,0 @@ -setResourceNames($formattedResourceNames); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $loggingServiceV2Client->listLogEntries($request); - - /** @var LogEntry $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 -{ - $formattedResourceNamesElement = LoggingServiceV2Client::projectName('[PROJECT]'); - - list_log_entries_sample($formattedResourceNamesElement); -} -// [END logging_v2_generated_LoggingServiceV2_ListLogEntries_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_logs.php b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_logs.php deleted file mode 100644 index 624a78e3c253..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_logs.php +++ /dev/null @@ -1,81 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $loggingServiceV2Client->listLogs($request); - - /** @var string $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = LoggingServiceV2Client::projectName('[PROJECT]'); - - list_logs_sample($formattedParent); -} -// [END logging_v2_generated_LoggingServiceV2_ListLogs_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_monitored_resource_descriptors.php b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_monitored_resource_descriptors.php deleted file mode 100644 index 0ab5a81f9535..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/list_monitored_resource_descriptors.php +++ /dev/null @@ -1,62 +0,0 @@ -listMonitoredResourceDescriptors($request); - - /** @var MonitoredResourceDescriptor $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END logging_v2_generated_LoggingServiceV2_ListMonitoredResourceDescriptors_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/tail_log_entries.php b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/tail_log_entries.php deleted file mode 100644 index 9731b69f8ccd..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/tail_log_entries.php +++ /dev/null @@ -1,90 +0,0 @@ -setResourceNames($resourceNames); - - // Call the API and handle any network failures. - try { - /** @var BidiStream $stream */ - $stream = $loggingServiceV2Client->tailLogEntries(); - $stream->writeAll([$request,]); - - /** @var TailLogEntriesResponse $element */ - foreach ($stream->closeWriteAndReadAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $resourceNamesElement = '[RESOURCE_NAMES]'; - - tail_log_entries_sample($resourceNamesElement); -} -// [END logging_v2_generated_LoggingServiceV2_TailLogEntries_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/write_log_entries.php b/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/write_log_entries.php deleted file mode 100644 index 67ce8d49a46e..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/LoggingServiceV2Client/write_log_entries.php +++ /dev/null @@ -1,105 +0,0 @@ -setLogName($entriesLogName) - ->setResource($entriesResource); - $entries = [$logEntry,]; - $request = (new WriteLogEntriesRequest()) - ->setEntries($entries); - - // Call the API and handle any network failures. - try { - /** @var WriteLogEntriesResponse $response */ - $response = $loggingServiceV2Client->writeLogEntries($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $entriesLogName = '[LOG_NAME]'; - - write_log_entries_sample($entriesLogName); -} -// [END logging_v2_generated_LoggingServiceV2_WriteLogEntries_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/create_log_metric.php b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/create_log_metric.php deleted file mode 100644 index 9c9f45a3cad4..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/create_log_metric.php +++ /dev/null @@ -1,104 +0,0 @@ -=ERROR" - * - * The maximum length of the filter is 20000 characters. - */ -function create_log_metric_sample( - string $formattedParent, - string $metricName, - string $metricFilter -): void { - // Create a client. - $metricsServiceV2Client = new MetricsServiceV2Client(); - - // Prepare the request message. - $metric = (new LogMetric()) - ->setName($metricName) - ->setFilter($metricFilter); - $request = (new CreateLogMetricRequest()) - ->setParent($formattedParent) - ->setMetric($metric); - - // Call the API and handle any network failures. - try { - /** @var LogMetric $response */ - $response = $metricsServiceV2Client->createLogMetric($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = MetricsServiceV2Client::projectName('[PROJECT]'); - $metricName = '[NAME]'; - $metricFilter = '[FILTER]'; - - create_log_metric_sample($formattedParent, $metricName, $metricFilter); -} -// [END logging_v2_generated_MetricsServiceV2_CreateLogMetric_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/delete_log_metric.php b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/delete_log_metric.php deleted file mode 100644 index 482ff52e7117..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/delete_log_metric.php +++ /dev/null @@ -1,71 +0,0 @@ -setMetricName($formattedMetricName); - - // Call the API and handle any network failures. - try { - $metricsServiceV2Client->deleteLogMetric($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedMetricName = MetricsServiceV2Client::logMetricName('[PROJECT]', '[METRIC]'); - - delete_log_metric_sample($formattedMetricName); -} -// [END logging_v2_generated_MetricsServiceV2_DeleteLogMetric_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/get_log_metric.php b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/get_log_metric.php deleted file mode 100644 index f765dab60d1f..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/get_log_metric.php +++ /dev/null @@ -1,73 +0,0 @@ -setMetricName($formattedMetricName); - - // Call the API and handle any network failures. - try { - /** @var LogMetric $response */ - $response = $metricsServiceV2Client->getLogMetric($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedMetricName = MetricsServiceV2Client::logMetricName('[PROJECT]', '[METRIC]'); - - get_log_metric_sample($formattedMetricName); -} -// [END logging_v2_generated_MetricsServiceV2_GetLogMetric_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/list_log_metrics.php b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/list_log_metrics.php deleted file mode 100644 index cdff7285ac76..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/list_log_metrics.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $metricsServiceV2Client->listLogMetrics($request); - - /** @var LogMetric $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 = MetricsServiceV2Client::projectName('[PROJECT]'); - - list_log_metrics_sample($formattedParent); -} -// [END logging_v2_generated_MetricsServiceV2_ListLogMetrics_sync] diff --git a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/update_log_metric.php b/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/update_log_metric.php deleted file mode 100644 index a5456d044afb..000000000000 --- a/owl-bot-staging/Logging/v2/samples/V2/MetricsServiceV2Client/update_log_metric.php +++ /dev/null @@ -1,106 +0,0 @@ -=ERROR" - * - * The maximum length of the filter is 20000 characters. - */ -function update_log_metric_sample( - string $formattedMetricName, - string $metricName, - string $metricFilter -): void { - // Create a client. - $metricsServiceV2Client = new MetricsServiceV2Client(); - - // Prepare the request message. - $metric = (new LogMetric()) - ->setName($metricName) - ->setFilter($metricFilter); - $request = (new UpdateLogMetricRequest()) - ->setMetricName($formattedMetricName) - ->setMetric($metric); - - // Call the API and handle any network failures. - try { - /** @var LogMetric $response */ - $response = $metricsServiceV2Client->updateLogMetric($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedMetricName = MetricsServiceV2Client::logMetricName('[PROJECT]', '[METRIC]'); - $metricName = '[NAME]'; - $metricFilter = '[FILTER]'; - - update_log_metric_sample($formattedMetricName, $metricName, $metricFilter); -} -// [END logging_v2_generated_MetricsServiceV2_UpdateLogMetric_sync] diff --git a/owl-bot-staging/Logging/v2/src/V2/Client/ConfigServiceV2Client.php b/owl-bot-staging/Logging/v2/src/V2/Client/ConfigServiceV2Client.php deleted file mode 100644 index 9d0cb291521b..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/Client/ConfigServiceV2Client.php +++ /dev/null @@ -1,2039 +0,0 @@ - copyLogEntriesAsync(CopyLogEntriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface createBucketAsync(CreateBucketRequest $request, array $optionalArgs = []) - * @method PromiseInterface createBucketAsyncAsync(CreateBucketRequest $request, array $optionalArgs = []) - * @method PromiseInterface createExclusionAsync(CreateExclusionRequest $request, array $optionalArgs = []) - * @method PromiseInterface createLinkAsync(CreateLinkRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSinkAsync(CreateSinkRequest $request, array $optionalArgs = []) - * @method PromiseInterface createViewAsync(CreateViewRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteBucketAsync(DeleteBucketRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteExclusionAsync(DeleteExclusionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteLinkAsync(DeleteLinkRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSinkAsync(DeleteSinkRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteViewAsync(DeleteViewRequest $request, array $optionalArgs = []) - * @method PromiseInterface getBucketAsync(GetBucketRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCmekSettingsAsync(GetCmekSettingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getExclusionAsync(GetExclusionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLinkAsync(GetLinkRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSettingsAsync(GetSettingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSinkAsync(GetSinkRequest $request, array $optionalArgs = []) - * @method PromiseInterface getViewAsync(GetViewRequest $request, array $optionalArgs = []) - * @method PromiseInterface listBucketsAsync(ListBucketsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listExclusionsAsync(ListExclusionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLinksAsync(ListLinksRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSinksAsync(ListSinksRequest $request, array $optionalArgs = []) - * @method PromiseInterface listViewsAsync(ListViewsRequest $request, array $optionalArgs = []) - * @method PromiseInterface undeleteBucketAsync(UndeleteBucketRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBucketAsync(UpdateBucketRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateBucketAsyncAsync(UpdateBucketRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCmekSettingsAsync(UpdateCmekSettingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateExclusionAsync(UpdateExclusionRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSettingsAsync(UpdateSettingsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSinkAsync(UpdateSinkRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateViewAsync(UpdateViewRequest $request, array $optionalArgs = []) - */ -final class ConfigServiceV2Client -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.logging.v2.ConfigServiceV2'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'logging.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'logging.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/config_service_v2_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/config_service_v2_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/config_service_v2_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/config_service_v2_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account resource. - * - * @param string $billingAccount - * - * @return string The formatted billing_account resource. - */ - public static function billingAccountName(string $billingAccount): string - { - return self::getPathTemplate('billingAccount')->render([ - 'billing_account' => $billingAccount, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_cmekSettings resource. - * - * @param string $billingAccount - * - * @return string The formatted billing_account_cmekSettings resource. - */ - public static function billingAccountCmekSettingsName(string $billingAccount): string - { - return self::getPathTemplate('billingAccountCmekSettings')->render([ - 'billing_account' => $billingAccount, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_exclusion resource. - * - * @param string $billingAccount - * @param string $exclusion - * - * @return string The formatted billing_account_exclusion resource. - */ - public static function billingAccountExclusionName(string $billingAccount, string $exclusion): string - { - return self::getPathTemplate('billingAccountExclusion')->render([ - 'billing_account' => $billingAccount, - 'exclusion' => $exclusion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_location resource. - * - * @param string $billingAccount - * @param string $location - * - * @return string The formatted billing_account_location resource. - */ - public static function billingAccountLocationName(string $billingAccount, string $location): string - { - return self::getPathTemplate('billingAccountLocation')->render([ - 'billing_account' => $billingAccount, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_location_bucket resource. - * - * @param string $billingAccount - * @param string $location - * @param string $bucket - * - * @return string The formatted billing_account_location_bucket resource. - */ - public static function billingAccountLocationBucketName(string $billingAccount, string $location, string $bucket): string - { - return self::getPathTemplate('billingAccountLocationBucket')->render([ - 'billing_account' => $billingAccount, - 'location' => $location, - 'bucket' => $bucket, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_location_bucket_link resource. - * - * @param string $billingAccount - * @param string $location - * @param string $bucket - * @param string $link - * - * @return string The formatted billing_account_location_bucket_link resource. - */ - public static function billingAccountLocationBucketLinkName(string $billingAccount, string $location, string $bucket, string $link): string - { - return self::getPathTemplate('billingAccountLocationBucketLink')->render([ - 'billing_account' => $billingAccount, - 'location' => $location, - 'bucket' => $bucket, - 'link' => $link, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_location_bucket_view resource. - * - * @param string $billingAccount - * @param string $location - * @param string $bucket - * @param string $view - * - * @return string The formatted billing_account_location_bucket_view resource. - */ - public static function billingAccountLocationBucketViewName(string $billingAccount, string $location, string $bucket, string $view): string - { - return self::getPathTemplate('billingAccountLocationBucketView')->render([ - 'billing_account' => $billingAccount, - 'location' => $location, - 'bucket' => $bucket, - 'view' => $view, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_settings resource. - * - * @param string $billingAccount - * - * @return string The formatted billing_account_settings resource. - */ - public static function billingAccountSettingsName(string $billingAccount): string - { - return self::getPathTemplate('billingAccountSettings')->render([ - 'billing_account' => $billingAccount, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_sink resource. - * - * @param string $billingAccount - * @param string $sink - * - * @return string The formatted billing_account_sink resource. - */ - public static function billingAccountSinkName(string $billingAccount, string $sink): string - { - return self::getPathTemplate('billingAccountSink')->render([ - 'billing_account' => $billingAccount, - 'sink' => $sink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * cmek_settings resource. - * - * @param string $project - * - * @return string The formatted cmek_settings resource. - */ - public static function cmekSettingsName(string $project): string - { - return self::getPathTemplate('cmekSettings')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a folder - * resource. - * - * @param string $folder - * - * @return string The formatted folder resource. - */ - public static function folderName(string $folder): string - { - return self::getPathTemplate('folder')->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_cmekSettings resource. - * - * @param string $folder - * - * @return string The formatted folder_cmekSettings resource. - */ - public static function folderCmekSettingsName(string $folder): string - { - return self::getPathTemplate('folderCmekSettings')->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_exclusion resource. - * - * @param string $folder - * @param string $exclusion - * - * @return string The formatted folder_exclusion resource. - */ - public static function folderExclusionName(string $folder, string $exclusion): string - { - return self::getPathTemplate('folderExclusion')->render([ - 'folder' => $folder, - 'exclusion' => $exclusion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location resource. - * - * @param string $folder - * @param string $location - * - * @return string The formatted folder_location resource. - */ - public static function folderLocationName(string $folder, string $location): string - { - return self::getPathTemplate('folderLocation')->render([ - 'folder' => $folder, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_bucket resource. - * - * @param string $folder - * @param string $location - * @param string $bucket - * - * @return string The formatted folder_location_bucket resource. - */ - public static function folderLocationBucketName(string $folder, string $location, string $bucket): string - { - return self::getPathTemplate('folderLocationBucket')->render([ - 'folder' => $folder, - 'location' => $location, - 'bucket' => $bucket, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_bucket_link resource. - * - * @param string $folder - * @param string $location - * @param string $bucket - * @param string $link - * - * @return string The formatted folder_location_bucket_link resource. - */ - public static function folderLocationBucketLinkName(string $folder, string $location, string $bucket, string $link): string - { - return self::getPathTemplate('folderLocationBucketLink')->render([ - 'folder' => $folder, - 'location' => $location, - 'bucket' => $bucket, - 'link' => $link, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_location_bucket_view resource. - * - * @param string $folder - * @param string $location - * @param string $bucket - * @param string $view - * - * @return string The formatted folder_location_bucket_view resource. - */ - public static function folderLocationBucketViewName(string $folder, string $location, string $bucket, string $view): string - { - return self::getPathTemplate('folderLocationBucketView')->render([ - 'folder' => $folder, - 'location' => $location, - 'bucket' => $bucket, - 'view' => $view, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * folder_settings resource. - * - * @param string $folder - * - * @return string The formatted folder_settings resource. - */ - public static function folderSettingsName(string $folder): string - { - return self::getPathTemplate('folderSettings')->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a folder_sink - * resource. - * - * @param string $folder - * @param string $sink - * - * @return string The formatted folder_sink resource. - */ - public static function folderSinkName(string $folder, string $sink): string - { - return self::getPathTemplate('folderSink')->render([ - 'folder' => $folder, - 'sink' => $sink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a link - * resource. - * - * @param string $project - * @param string $location - * @param string $bucket - * @param string $link - * - * @return string The formatted link resource. - */ - public static function linkName(string $project, string $location, string $bucket, string $link): string - { - return self::getPathTemplate('link')->render([ - 'project' => $project, - 'location' => $location, - 'bucket' => $bucket, - 'link' => $link, - ]); - } - - /** - * 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 log_bucket - * resource. - * - * @param string $project - * @param string $location - * @param string $bucket - * - * @return string The formatted log_bucket resource. - */ - public static function logBucketName(string $project, string $location, string $bucket): string - { - return self::getPathTemplate('logBucket')->render([ - 'project' => $project, - 'location' => $location, - 'bucket' => $bucket, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * log_exclusion resource. - * - * @param string $project - * @param string $exclusion - * - * @return string The formatted log_exclusion resource. - */ - public static function logExclusionName(string $project, string $exclusion): string - { - return self::getPathTemplate('logExclusion')->render([ - 'project' => $project, - 'exclusion' => $exclusion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a log_sink - * resource. - * - * @param string $project - * @param string $sink - * - * @return string The formatted log_sink resource. - */ - public static function logSinkName(string $project, string $sink): string - { - return self::getPathTemplate('logSink')->render([ - 'project' => $project, - 'sink' => $sink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a log_view - * resource. - * - * @param string $project - * @param string $location - * @param string $bucket - * @param string $view - * - * @return string The formatted log_view resource. - */ - public static function logViewName(string $project, string $location, string $bucket, string $view): string - { - return self::getPathTemplate('logView')->render([ - 'project' => $project, - 'location' => $location, - 'bucket' => $bucket, - 'view' => $view, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - */ - public static function organizationName(string $organization): string - { - return self::getPathTemplate('organization')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_cmekSettings resource. - * - * @param string $organization - * - * @return string The formatted organization_cmekSettings resource. - */ - public static function organizationCmekSettingsName(string $organization): string - { - return self::getPathTemplate('organizationCmekSettings')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_exclusion resource. - * - * @param string $organization - * @param string $exclusion - * - * @return string The formatted organization_exclusion resource. - */ - public static function organizationExclusionName(string $organization, string $exclusion): string - { - return self::getPathTemplate('organizationExclusion')->render([ - 'organization' => $organization, - 'exclusion' => $exclusion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location resource. - * - * @param string $organization - * @param string $location - * - * @return string The formatted organization_location resource. - */ - public static function organizationLocationName(string $organization, string $location): string - { - return self::getPathTemplate('organizationLocation')->render([ - 'organization' => $organization, - 'location' => $location, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_bucket resource. - * - * @param string $organization - * @param string $location - * @param string $bucket - * - * @return string The formatted organization_location_bucket resource. - */ - public static function organizationLocationBucketName(string $organization, string $location, string $bucket): string - { - return self::getPathTemplate('organizationLocationBucket')->render([ - 'organization' => $organization, - 'location' => $location, - 'bucket' => $bucket, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_bucket_link resource. - * - * @param string $organization - * @param string $location - * @param string $bucket - * @param string $link - * - * @return string The formatted organization_location_bucket_link resource. - */ - public static function organizationLocationBucketLinkName(string $organization, string $location, string $bucket, string $link): string - { - return self::getPathTemplate('organizationLocationBucketLink')->render([ - 'organization' => $organization, - 'location' => $location, - 'bucket' => $bucket, - 'link' => $link, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_location_bucket_view resource. - * - * @param string $organization - * @param string $location - * @param string $bucket - * @param string $view - * - * @return string The formatted organization_location_bucket_view resource. - */ - public static function organizationLocationBucketViewName(string $organization, string $location, string $bucket, string $view): string - { - return self::getPathTemplate('organizationLocationBucketView')->render([ - 'organization' => $organization, - 'location' => $location, - 'bucket' => $bucket, - 'view' => $view, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_settings resource. - * - * @param string $organization - * - * @return string The formatted organization_settings resource. - */ - public static function organizationSettingsName(string $organization): string - { - return self::getPathTemplate('organizationSettings')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_sink resource. - * - * @param string $organization - * @param string $sink - * - * @return string The formatted organization_sink resource. - */ - public static function organizationSinkName(string $organization, string $sink): string - { - return self::getPathTemplate('organizationSink')->render([ - 'organization' => $organization, - 'sink' => $sink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_cmekSettings resource. - * - * @param string $project - * - * @return string The formatted project_cmekSettings resource. - */ - public static function projectCmekSettingsName(string $project): string - { - return self::getPathTemplate('projectCmekSettings')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_exclusion resource. - * - * @param string $project - * @param string $exclusion - * - * @return string The formatted project_exclusion resource. - */ - public static function projectExclusionName(string $project, string $exclusion): string - { - return self::getPathTemplate('projectExclusion')->render([ - 'project' => $project, - 'exclusion' => $exclusion, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_bucket resource. - * - * @param string $project - * @param string $location - * @param string $bucket - * - * @return string The formatted project_location_bucket resource. - */ - public static function projectLocationBucketName(string $project, string $location, string $bucket): string - { - return self::getPathTemplate('projectLocationBucket')->render([ - 'project' => $project, - 'location' => $location, - 'bucket' => $bucket, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_bucket_link resource. - * - * @param string $project - * @param string $location - * @param string $bucket - * @param string $link - * - * @return string The formatted project_location_bucket_link resource. - */ - public static function projectLocationBucketLinkName(string $project, string $location, string $bucket, string $link): string - { - return self::getPathTemplate('projectLocationBucketLink')->render([ - 'project' => $project, - 'location' => $location, - 'bucket' => $bucket, - 'link' => $link, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_location_bucket_view resource. - * - * @param string $project - * @param string $location - * @param string $bucket - * @param string $view - * - * @return string The formatted project_location_bucket_view resource. - */ - public static function projectLocationBucketViewName(string $project, string $location, string $bucket, string $view): string - { - return self::getPathTemplate('projectLocationBucketView')->render([ - 'project' => $project, - 'location' => $location, - 'bucket' => $bucket, - 'view' => $view, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_settings resource. - * - * @param string $project - * - * @return string The formatted project_settings resource. - */ - public static function projectSettingsName(string $project): string - { - return self::getPathTemplate('projectSettings')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_sink - * resource. - * - * @param string $project - * @param string $sink - * - * @return string The formatted project_sink resource. - */ - public static function projectSinkName(string $project, string $sink): string - { - return self::getPathTemplate('projectSink')->render([ - 'project' => $project, - 'sink' => $sink, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a settings - * resource. - * - * @param string $project - * - * @return string The formatted settings resource. - */ - public static function settingsName(string $project): string - { - return self::getPathTemplate('settings')->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 - * - billingAccount: billingAccounts/{billing_account} - * - billingAccountCmekSettings: billingAccounts/{billing_account}/cmekSettings - * - billingAccountExclusion: billingAccounts/{billing_account}/exclusions/{exclusion} - * - billingAccountLocation: billingAccounts/{billing_account}/locations/{location} - * - billingAccountLocationBucket: billingAccounts/{billing_account}/locations/{location}/buckets/{bucket} - * - billingAccountLocationBucketLink: billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link} - * - billingAccountLocationBucketView: billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view} - * - billingAccountSettings: billingAccounts/{billing_account}/settings - * - billingAccountSink: billingAccounts/{billing_account}/sinks/{sink} - * - cmekSettings: projects/{project}/cmekSettings - * - folder: folders/{folder} - * - folderCmekSettings: folders/{folder}/cmekSettings - * - folderExclusion: folders/{folder}/exclusions/{exclusion} - * - folderLocation: folders/{folder}/locations/{location} - * - folderLocationBucket: folders/{folder}/locations/{location}/buckets/{bucket} - * - folderLocationBucketLink: folders/{folder}/locations/{location}/buckets/{bucket}/links/{link} - * - folderLocationBucketView: folders/{folder}/locations/{location}/buckets/{bucket}/views/{view} - * - folderSettings: folders/{folder}/settings - * - folderSink: folders/{folder}/sinks/{sink} - * - link: projects/{project}/locations/{location}/buckets/{bucket}/links/{link} - * - location: projects/{project}/locations/{location} - * - logBucket: projects/{project}/locations/{location}/buckets/{bucket} - * - logExclusion: projects/{project}/exclusions/{exclusion} - * - logSink: projects/{project}/sinks/{sink} - * - logView: projects/{project}/locations/{location}/buckets/{bucket}/views/{view} - * - organization: organizations/{organization} - * - organizationCmekSettings: organizations/{organization}/cmekSettings - * - organizationExclusion: organizations/{organization}/exclusions/{exclusion} - * - organizationLocation: organizations/{organization}/locations/{location} - * - organizationLocationBucket: organizations/{organization}/locations/{location}/buckets/{bucket} - * - organizationLocationBucketLink: organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link} - * - organizationLocationBucketView: organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view} - * - organizationSettings: organizations/{organization}/settings - * - organizationSink: organizations/{organization}/sinks/{sink} - * - project: projects/{project} - * - projectCmekSettings: projects/{project}/cmekSettings - * - projectExclusion: projects/{project}/exclusions/{exclusion} - * - projectLocationBucket: projects/{project}/locations/{location}/buckets/{bucket} - * - projectLocationBucketLink: projects/{project}/locations/{location}/buckets/{bucket}/links/{link} - * - projectLocationBucketView: projects/{project}/locations/{location}/buckets/{bucket}/views/{view} - * - projectSettings: projects/{project}/settings - * - projectSink: projects/{project}/sinks/{sink} - * - settings: projects/{project}/settings - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'logging.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Logging\V2\ConfigServiceV2Client; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new ConfigServiceV2Client(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Copies a set of log entries from a log bucket to a Cloud Storage bucket. - * - * The async variant is {@see ConfigServiceV2Client::copyLogEntriesAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/copy_log_entries.php - * - * @param CopyLogEntriesRequest $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 copyLogEntries(CopyLogEntriesRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CopyLogEntries', $request, $callOptions)->wait(); - } - - /** - * Creates a log bucket that can be used to store log entries. After a bucket - * has been created, the bucket's location cannot be changed. - * - * The async variant is {@see ConfigServiceV2Client::createBucketAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/create_bucket.php - * - * @param CreateBucketRequest $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 LogBucket - * - * @throws ApiException Thrown if the API call fails. - */ - public function createBucket(CreateBucketRequest $request, array $callOptions = []): LogBucket - { - return $this->startApiCall('CreateBucket', $request, $callOptions)->wait(); - } - - /** - * Creates a log bucket asynchronously that can be used to store log entries. - * - * After a bucket has been created, the bucket's location cannot be changed. - * - * The async variant is {@see ConfigServiceV2Client::createBucketAsyncAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/create_bucket_async.php - * - * @param CreateBucketRequest $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 createBucketAsync(CreateBucketRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateBucketAsync', $request, $callOptions)->wait(); - } - - /** - * Creates a new exclusion in the _Default sink in a specified parent - * resource. Only log entries belonging to that resource can be excluded. You - * can have up to 10 exclusions in a resource. - * - * The async variant is {@see ConfigServiceV2Client::createExclusionAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/create_exclusion.php - * - * @param CreateExclusionRequest $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 LogExclusion - * - * @throws ApiException Thrown if the API call fails. - */ - public function createExclusion(CreateExclusionRequest $request, array $callOptions = []): LogExclusion - { - return $this->startApiCall('CreateExclusion', $request, $callOptions)->wait(); - } - - /** - * Asynchronously creates a linked dataset in BigQuery which makes it possible - * to use BigQuery to read the logs stored in the log bucket. A log bucket may - * currently only contain one link. - * - * The async variant is {@see ConfigServiceV2Client::createLinkAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/create_link.php - * - * @param CreateLinkRequest $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 createLink(CreateLinkRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateLink', $request, $callOptions)->wait(); - } - - /** - * Creates a sink that exports specified log entries to a destination. The - * export of newly-ingested log entries begins immediately, unless the sink's - * `writer_identity` is not permitted to write to the destination. A sink can - * export log entries only from the resource owning the sink. - * - * The async variant is {@see ConfigServiceV2Client::createSinkAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/create_sink.php - * - * @param CreateSinkRequest $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 LogSink - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSink(CreateSinkRequest $request, array $callOptions = []): LogSink - { - return $this->startApiCall('CreateSink', $request, $callOptions)->wait(); - } - - /** - * Creates a view over log entries in a log bucket. A bucket may contain a - * maximum of 30 views. - * - * The async variant is {@see ConfigServiceV2Client::createViewAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/create_view.php - * - * @param CreateViewRequest $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 LogView - * - * @throws ApiException Thrown if the API call fails. - */ - public function createView(CreateViewRequest $request, array $callOptions = []): LogView - { - return $this->startApiCall('CreateView', $request, $callOptions)->wait(); - } - - /** - * Deletes a log bucket. - * - * Changes the bucket's `lifecycle_state` to the `DELETE_REQUESTED` state. - * After 7 days, the bucket will be purged and all log entries in the bucket - * will be permanently deleted. - * - * The async variant is {@see ConfigServiceV2Client::deleteBucketAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/delete_bucket.php - * - * @param DeleteBucketRequest $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 deleteBucket(DeleteBucketRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteBucket', $request, $callOptions)->wait(); - } - - /** - * Deletes an exclusion in the _Default sink. - * - * The async variant is {@see ConfigServiceV2Client::deleteExclusionAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/delete_exclusion.php - * - * @param DeleteExclusionRequest $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 deleteExclusion(DeleteExclusionRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteExclusion', $request, $callOptions)->wait(); - } - - /** - * Deletes a link. This will also delete the corresponding BigQuery linked - * dataset. - * - * The async variant is {@see ConfigServiceV2Client::deleteLinkAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/delete_link.php - * - * @param DeleteLinkRequest $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 deleteLink(DeleteLinkRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteLink', $request, $callOptions)->wait(); - } - - /** - * Deletes a sink. If the sink has a unique `writer_identity`, then that - * service account is also deleted. - * - * The async variant is {@see ConfigServiceV2Client::deleteSinkAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/delete_sink.php - * - * @param DeleteSinkRequest $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 deleteSink(DeleteSinkRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteSink', $request, $callOptions)->wait(); - } - - /** - * Deletes a view on a log bucket. - * If an `UNAVAILABLE` error is returned, this indicates that system is not in - * a state where it can delete the view. If this occurs, please try again in a - * few minutes. - * - * The async variant is {@see ConfigServiceV2Client::deleteViewAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/delete_view.php - * - * @param DeleteViewRequest $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 deleteView(DeleteViewRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteView', $request, $callOptions)->wait(); - } - - /** - * Gets a log bucket. - * - * The async variant is {@see ConfigServiceV2Client::getBucketAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/get_bucket.php - * - * @param GetBucketRequest $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 LogBucket - * - * @throws ApiException Thrown if the API call fails. - */ - public function getBucket(GetBucketRequest $request, array $callOptions = []): LogBucket - { - return $this->startApiCall('GetBucket', $request, $callOptions)->wait(); - } - - /** - * Gets the Logging CMEK settings for the given resource. - * - * Note: CMEK for the Log Router can be configured for Google Cloud projects, - * folders, organizations and billing accounts. Once configured for an - * organization, it applies to all projects and folders in the Google Cloud - * organization. - * - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * The async variant is {@see ConfigServiceV2Client::getCmekSettingsAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/get_cmek_settings.php - * - * @param GetCmekSettingsRequest $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 CmekSettings - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCmekSettings(GetCmekSettingsRequest $request, array $callOptions = []): CmekSettings - { - return $this->startApiCall('GetCmekSettings', $request, $callOptions)->wait(); - } - - /** - * Gets the description of an exclusion in the _Default sink. - * - * The async variant is {@see ConfigServiceV2Client::getExclusionAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/get_exclusion.php - * - * @param GetExclusionRequest $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 LogExclusion - * - * @throws ApiException Thrown if the API call fails. - */ - public function getExclusion(GetExclusionRequest $request, array $callOptions = []): LogExclusion - { - return $this->startApiCall('GetExclusion', $request, $callOptions)->wait(); - } - - /** - * Gets a link. - * - * The async variant is {@see ConfigServiceV2Client::getLinkAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/get_link.php - * - * @param GetLinkRequest $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 Link - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLink(GetLinkRequest $request, array $callOptions = []): Link - { - return $this->startApiCall('GetLink', $request, $callOptions)->wait(); - } - - /** - * Gets the Log Router settings for the given resource. - * - * Note: Settings for the Log Router can be get for Google Cloud projects, - * folders, organizations and billing accounts. Currently it can only be - * configured for organizations. Once configured for an organization, it - * applies to all projects and folders in the Google Cloud organization. - * - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * The async variant is {@see ConfigServiceV2Client::getSettingsAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/get_settings.php - * - * @param GetSettingsRequest $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 Settings - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSettings(GetSettingsRequest $request, array $callOptions = []): Settings - { - return $this->startApiCall('GetSettings', $request, $callOptions)->wait(); - } - - /** - * Gets a sink. - * - * The async variant is {@see ConfigServiceV2Client::getSinkAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/get_sink.php - * - * @param GetSinkRequest $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 LogSink - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSink(GetSinkRequest $request, array $callOptions = []): LogSink - { - return $this->startApiCall('GetSink', $request, $callOptions)->wait(); - } - - /** - * Gets a view on a log bucket.. - * - * The async variant is {@see ConfigServiceV2Client::getViewAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/get_view.php - * - * @param GetViewRequest $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 LogView - * - * @throws ApiException Thrown if the API call fails. - */ - public function getView(GetViewRequest $request, array $callOptions = []): LogView - { - return $this->startApiCall('GetView', $request, $callOptions)->wait(); - } - - /** - * Lists log buckets. - * - * The async variant is {@see ConfigServiceV2Client::listBucketsAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/list_buckets.php - * - * @param ListBucketsRequest $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 listBuckets(ListBucketsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListBuckets', $request, $callOptions); - } - - /** - * Lists all the exclusions on the _Default sink in a parent resource. - * - * The async variant is {@see ConfigServiceV2Client::listExclusionsAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/list_exclusions.php - * - * @param ListExclusionsRequest $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 listExclusions(ListExclusionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListExclusions', $request, $callOptions); - } - - /** - * Lists links. - * - * The async variant is {@see ConfigServiceV2Client::listLinksAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/list_links.php - * - * @param ListLinksRequest $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 listLinks(ListLinksRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLinks', $request, $callOptions); - } - - /** - * Lists sinks. - * - * The async variant is {@see ConfigServiceV2Client::listSinksAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/list_sinks.php - * - * @param ListSinksRequest $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 listSinks(ListSinksRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSinks', $request, $callOptions); - } - - /** - * Lists views on a log bucket. - * - * The async variant is {@see ConfigServiceV2Client::listViewsAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/list_views.php - * - * @param ListViewsRequest $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 listViews(ListViewsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListViews', $request, $callOptions); - } - - /** - * Undeletes a log bucket. A bucket that has been deleted can be undeleted - * within the grace period of 7 days. - * - * The async variant is {@see ConfigServiceV2Client::undeleteBucketAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/undelete_bucket.php - * - * @param UndeleteBucketRequest $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 undeleteBucket(UndeleteBucketRequest $request, array $callOptions = []): void - { - $this->startApiCall('UndeleteBucket', $request, $callOptions)->wait(); - } - - /** - * Updates a log bucket. - * - * If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then - * `FAILED_PRECONDITION` will be returned. - * - * After a bucket has been created, the bucket's location cannot be changed. - * - * The async variant is {@see ConfigServiceV2Client::updateBucketAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/update_bucket.php - * - * @param UpdateBucketRequest $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 LogBucket - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateBucket(UpdateBucketRequest $request, array $callOptions = []): LogBucket - { - return $this->startApiCall('UpdateBucket', $request, $callOptions)->wait(); - } - - /** - * Updates a log bucket asynchronously. - * - * If the bucket has a `lifecycle_state` of `DELETE_REQUESTED`, then - * `FAILED_PRECONDITION` will be returned. - * - * After a bucket has been created, the bucket's location cannot be changed. - * - * The async variant is {@see ConfigServiceV2Client::updateBucketAsyncAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/update_bucket_async.php - * - * @param UpdateBucketRequest $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 updateBucketAsync(UpdateBucketRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateBucketAsync', $request, $callOptions)->wait(); - } - - /** - * Updates the Log Router CMEK settings for the given resource. - * - * Note: CMEK for the Log Router can currently only be configured for Google - * Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * - * [UpdateCmekSettings][google.logging.v2.ConfigServiceV2.UpdateCmekSettings] - * will fail if 1) `kms_key_name` is invalid, or 2) the associated service - * account does not have the required - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or - * 3) access to the key is disabled. - * - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * The async variant is {@see ConfigServiceV2Client::updateCmekSettingsAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/update_cmek_settings.php - * - * @param UpdateCmekSettingsRequest $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 CmekSettings - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateCmekSettings(UpdateCmekSettingsRequest $request, array $callOptions = []): CmekSettings - { - return $this->startApiCall('UpdateCmekSettings', $request, $callOptions)->wait(); - } - - /** - * Changes one or more properties of an existing exclusion in the _Default - * sink. - * - * The async variant is {@see ConfigServiceV2Client::updateExclusionAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/update_exclusion.php - * - * @param UpdateExclusionRequest $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 LogExclusion - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateExclusion(UpdateExclusionRequest $request, array $callOptions = []): LogExclusion - { - return $this->startApiCall('UpdateExclusion', $request, $callOptions)->wait(); - } - - /** - * Updates the Log Router settings for the given resource. - * - * Note: Settings for the Log Router can currently only be configured for - * Google Cloud organizations. Once configured, it applies to all projects and - * folders in the Google Cloud organization. - * - * [UpdateSettings][google.logging.v2.ConfigServiceV2.UpdateSettings] - * will fail if 1) `kms_key_name` is invalid, or 2) the associated service - * account does not have the required - * `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key, or - * 3) access to the key is disabled. 4) `location_id` is not supported by - * Logging. 5) `location_id` violate OrgPolicy. - * - * See [Enabling CMEK for Log - * Router](https://cloud.google.com/logging/docs/routing/managed-encryption) - * for more information. - * - * The async variant is {@see ConfigServiceV2Client::updateSettingsAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/update_settings.php - * - * @param UpdateSettingsRequest $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 Settings - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSettings(UpdateSettingsRequest $request, array $callOptions = []): Settings - { - return $this->startApiCall('UpdateSettings', $request, $callOptions)->wait(); - } - - /** - * Updates a sink. This method replaces the following fields in the existing - * sink with values from the new sink: `destination`, and `filter`. - * - * The updated sink might also have a new `writer_identity`; see the - * `unique_writer_identity` field. - * - * The async variant is {@see ConfigServiceV2Client::updateSinkAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/update_sink.php - * - * @param UpdateSinkRequest $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 LogSink - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSink(UpdateSinkRequest $request, array $callOptions = []): LogSink - { - return $this->startApiCall('UpdateSink', $request, $callOptions)->wait(); - } - - /** - * Updates a view on a log bucket. This method replaces the following fields - * in the existing view with values from the new view: `filter`. - * If an `UNAVAILABLE` error is returned, this indicates that system is not in - * a state where it can update the view. If this occurs, please try again in a - * few minutes. - * - * The async variant is {@see ConfigServiceV2Client::updateViewAsync()} . - * - * @example samples/V2/ConfigServiceV2Client/update_view.php - * - * @param UpdateViewRequest $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 LogView - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateView(UpdateViewRequest $request, array $callOptions = []): LogView - { - return $this->startApiCall('UpdateView', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Logging/v2/src/V2/Client/LoggingServiceV2Client.php b/owl-bot-staging/Logging/v2/src/V2/Client/LoggingServiceV2Client.php deleted file mode 100644 index c00f63c64088..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/Client/LoggingServiceV2Client.php +++ /dev/null @@ -1,541 +0,0 @@ - deleteLogAsync(DeleteLogRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLogEntriesAsync(ListLogEntriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLogsAsync(ListLogsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listMonitoredResourceDescriptorsAsync(ListMonitoredResourceDescriptorsRequest $request, array $optionalArgs = []) - * @method PromiseInterface writeLogEntriesAsync(WriteLogEntriesRequest $request, array $optionalArgs = []) - */ -final class LoggingServiceV2Client -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.logging.v2.LoggingServiceV2'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'logging.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'logging.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/logging_service_v2_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/logging_service_v2_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/logging_service_v2_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/logging_service_v2_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account resource. - * - * @param string $billingAccount - * - * @return string The formatted billing_account resource. - */ - public static function billingAccountName(string $billingAccount): string - { - return self::getPathTemplate('billingAccount')->render([ - 'billing_account' => $billingAccount, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * billing_account_log resource. - * - * @param string $billingAccount - * @param string $log - * - * @return string The formatted billing_account_log resource. - */ - public static function billingAccountLogName(string $billingAccount, string $log): string - { - return self::getPathTemplate('billingAccountLog')->render([ - 'billing_account' => $billingAccount, - 'log' => $log, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a folder - * resource. - * - * @param string $folder - * - * @return string The formatted folder resource. - */ - public static function folderName(string $folder): string - { - return self::getPathTemplate('folder')->render([ - 'folder' => $folder, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a folder_log - * resource. - * - * @param string $folder - * @param string $log - * - * @return string The formatted folder_log resource. - */ - public static function folderLogName(string $folder, string $log): string - { - return self::getPathTemplate('folderLog')->render([ - 'folder' => $folder, - 'log' => $log, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a log - * resource. - * - * @param string $project - * @param string $log - * - * @return string The formatted log resource. - */ - public static function logName(string $project, string $log): string - { - return self::getPathTemplate('log')->render([ - 'project' => $project, - 'log' => $log, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - */ - public static function organizationName(string $organization): string - { - return self::getPathTemplate('organization')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_log resource. - * - * @param string $organization - * @param string $log - * - * @return string The formatted organization_log resource. - */ - public static function organizationLogName(string $organization, string $log): string - { - return self::getPathTemplate('organizationLog')->render([ - 'organization' => $organization, - 'log' => $log, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_log - * resource. - * - * @param string $project - * @param string $log - * - * @return string The formatted project_log resource. - */ - public static function projectLogName(string $project, string $log): string - { - return self::getPathTemplate('projectLog')->render([ - 'project' => $project, - 'log' => $log, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - billingAccount: billingAccounts/{billing_account} - * - billingAccountLog: billingAccounts/{billing_account}/logs/{log} - * - folder: folders/{folder} - * - folderLog: folders/{folder}/logs/{log} - * - log: projects/{project}/logs/{log} - * - organization: organizations/{organization} - * - organizationLog: organizations/{organization}/logs/{log} - * - project: projects/{project} - * - projectLog: projects/{project}/logs/{log} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'logging.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Logging\V2\LoggingServiceV2Client; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new LoggingServiceV2Client(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Deletes all the log entries in a log for the _Default Log Bucket. The log - * reappears if it receives new entries. Log entries written shortly before - * the delete operation might not be deleted. Entries received after the - * delete operation with a timestamp before the operation will be deleted. - * - * The async variant is {@see LoggingServiceV2Client::deleteLogAsync()} . - * - * @example samples/V2/LoggingServiceV2Client/delete_log.php - * - * @param DeleteLogRequest $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 deleteLog(DeleteLogRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteLog', $request, $callOptions)->wait(); - } - - /** - * Lists log entries. Use this method to retrieve log entries that originated - * from a project/folder/organization/billing account. For ways to export log - * entries, see [Exporting - * Logs](https://cloud.google.com/logging/docs/export). - * - * The async variant is {@see LoggingServiceV2Client::listLogEntriesAsync()} . - * - * @example samples/V2/LoggingServiceV2Client/list_log_entries.php - * - * @param ListLogEntriesRequest $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 listLogEntries(ListLogEntriesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLogEntries', $request, $callOptions); - } - - /** - * Lists the logs in projects, organizations, folders, or billing accounts. - * Only logs that have entries are listed. - * - * The async variant is {@see LoggingServiceV2Client::listLogsAsync()} . - * - * @example samples/V2/LoggingServiceV2Client/list_logs.php - * - * @param ListLogsRequest $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 listLogs(ListLogsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLogs', $request, $callOptions); - } - - /** - * Lists the descriptors for monitored resource types used by Logging. - * - * The async variant is - * {@see LoggingServiceV2Client::listMonitoredResourceDescriptorsAsync()} . - * - * @example samples/V2/LoggingServiceV2Client/list_monitored_resource_descriptors.php - * - * @param ListMonitoredResourceDescriptorsRequest $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 listMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListMonitoredResourceDescriptors', $request, $callOptions); - } - - /** - * Streaming read of log entries as they are ingested. Until the stream is - * terminated, it will continue reading logs. - * - * @example samples/V2/LoggingServiceV2Client/tail_log_entries.php - * - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return BidiStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function tailLogEntries(array $callOptions = []): BidiStream - { - return $this->startApiCall('TailLogEntries', null, $callOptions); - } - - /** - * Writes log entries to Logging. This API method is the - * only way to send log entries to Logging. This method - * is used, directly or indirectly, by the Logging agent - * (fluentd) and all logging libraries configured to use Logging. - * A single request may contain log entries for a maximum of 1000 - * different resources (projects, organizations, billing accounts or - * folders) - * - * The async variant is {@see LoggingServiceV2Client::writeLogEntriesAsync()} . - * - * @example samples/V2/LoggingServiceV2Client/write_log_entries.php - * - * @param WriteLogEntriesRequest $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 WriteLogEntriesResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function writeLogEntries(WriteLogEntriesRequest $request, array $callOptions = []): WriteLogEntriesResponse - { - return $this->startApiCall('WriteLogEntries', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Logging/v2/src/V2/Client/MetricsServiceV2Client.php b/owl-bot-staging/Logging/v2/src/V2/Client/MetricsServiceV2Client.php deleted file mode 100644 index e5c778579939..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/Client/MetricsServiceV2Client.php +++ /dev/null @@ -1,384 +0,0 @@ - createLogMetricAsync(CreateLogMetricRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteLogMetricAsync(DeleteLogMetricRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLogMetricAsync(GetLogMetricRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLogMetricsAsync(ListLogMetricsRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateLogMetricAsync(UpdateLogMetricRequest $request, array $optionalArgs = []) - */ -final class MetricsServiceV2Client -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.logging.v2.MetricsServiceV2'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'logging.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'logging.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/cloud-platform.read-only', - 'https://www.googleapis.com/auth/logging.admin', - 'https://www.googleapis.com/auth/logging.read', - 'https://www.googleapis.com/auth/logging.write', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/metrics_service_v2_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/metrics_service_v2_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/metrics_service_v2_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/metrics_service_v2_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a log_metric - * resource. - * - * @param string $project - * @param string $metric - * - * @return string The formatted log_metric resource. - */ - public static function logMetricName(string $project, string $metric): string - { - return self::getPathTemplate('logMetric')->render([ - 'project' => $project, - 'metric' => $metric, - ]); - } - - /** - * 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 - * - logMetric: projects/{project}/metrics/{metric} - * - 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|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'logging.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Logging\V2\MetricsServiceV2Client; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new MetricsServiceV2Client(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a logs-based metric. - * - * The async variant is {@see MetricsServiceV2Client::createLogMetricAsync()} . - * - * @example samples/V2/MetricsServiceV2Client/create_log_metric.php - * - * @param CreateLogMetricRequest $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 LogMetric - * - * @throws ApiException Thrown if the API call fails. - */ - public function createLogMetric(CreateLogMetricRequest $request, array $callOptions = []): LogMetric - { - return $this->startApiCall('CreateLogMetric', $request, $callOptions)->wait(); - } - - /** - * Deletes a logs-based metric. - * - * The async variant is {@see MetricsServiceV2Client::deleteLogMetricAsync()} . - * - * @example samples/V2/MetricsServiceV2Client/delete_log_metric.php - * - * @param DeleteLogMetricRequest $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 deleteLogMetric(DeleteLogMetricRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteLogMetric', $request, $callOptions)->wait(); - } - - /** - * Gets a logs-based metric. - * - * The async variant is {@see MetricsServiceV2Client::getLogMetricAsync()} . - * - * @example samples/V2/MetricsServiceV2Client/get_log_metric.php - * - * @param GetLogMetricRequest $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 LogMetric - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLogMetric(GetLogMetricRequest $request, array $callOptions = []): LogMetric - { - return $this->startApiCall('GetLogMetric', $request, $callOptions)->wait(); - } - - /** - * Lists logs-based metrics. - * - * The async variant is {@see MetricsServiceV2Client::listLogMetricsAsync()} . - * - * @example samples/V2/MetricsServiceV2Client/list_log_metrics.php - * - * @param ListLogMetricsRequest $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 listLogMetrics(ListLogMetricsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLogMetrics', $request, $callOptions); - } - - /** - * Creates or updates a logs-based metric. - * - * The async variant is {@see MetricsServiceV2Client::updateLogMetricAsync()} . - * - * @example samples/V2/MetricsServiceV2Client/update_log_metric.php - * - * @param UpdateLogMetricRequest $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 LogMetric - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateLogMetric(UpdateLogMetricRequest $request, array $callOptions = []): LogMetric - { - return $this->startApiCall('UpdateLogMetric', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Logging/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Logging/v2/src/V2/gapic_metadata.json deleted file mode 100644 index 30328b652386..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/gapic_metadata.json +++ /dev/null @@ -1,251 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.logging.v2", - "libraryPackage": "Google\\Cloud\\Logging\\V2", - "services": { - "LoggingServiceV2": { - "clients": { - "grpc": { - "libraryClient": "LoggingServiceV2GapicClient", - "rpcs": { - "DeleteLog": { - "methods": [ - "deleteLog" - ] - }, - "ListLogEntries": { - "methods": [ - "listLogEntries" - ] - }, - "ListLogs": { - "methods": [ - "listLogs" - ] - }, - "ListMonitoredResourceDescriptors": { - "methods": [ - "listMonitoredResourceDescriptors" - ] - }, - "TailLogEntries": { - "methods": [ - "tailLogEntries" - ] - }, - "WriteLogEntries": { - "methods": [ - "writeLogEntries" - ] - } - } - } - } - }, - "ConfigServiceV2": { - "clients": { - "grpc": { - "libraryClient": "ConfigServiceV2GapicClient", - "rpcs": { - "CopyLogEntries": { - "methods": [ - "copyLogEntries" - ] - }, - "CreateBucket": { - "methods": [ - "createBucket" - ] - }, - "CreateBucketAsync": { - "methods": [ - "createBucketAsync" - ] - }, - "CreateExclusion": { - "methods": [ - "createExclusion" - ] - }, - "CreateLink": { - "methods": [ - "createLink" - ] - }, - "CreateSink": { - "methods": [ - "createSink" - ] - }, - "CreateView": { - "methods": [ - "createView" - ] - }, - "DeleteBucket": { - "methods": [ - "deleteBucket" - ] - }, - "DeleteExclusion": { - "methods": [ - "deleteExclusion" - ] - }, - "DeleteLink": { - "methods": [ - "deleteLink" - ] - }, - "DeleteSink": { - "methods": [ - "deleteSink" - ] - }, - "DeleteView": { - "methods": [ - "deleteView" - ] - }, - "GetBucket": { - "methods": [ - "getBucket" - ] - }, - "GetCmekSettings": { - "methods": [ - "getCmekSettings" - ] - }, - "GetExclusion": { - "methods": [ - "getExclusion" - ] - }, - "GetLink": { - "methods": [ - "getLink" - ] - }, - "GetSettings": { - "methods": [ - "getSettings" - ] - }, - "GetSink": { - "methods": [ - "getSink" - ] - }, - "GetView": { - "methods": [ - "getView" - ] - }, - "ListBuckets": { - "methods": [ - "listBuckets" - ] - }, - "ListExclusions": { - "methods": [ - "listExclusions" - ] - }, - "ListLinks": { - "methods": [ - "listLinks" - ] - }, - "ListSinks": { - "methods": [ - "listSinks" - ] - }, - "ListViews": { - "methods": [ - "listViews" - ] - }, - "UndeleteBucket": { - "methods": [ - "undeleteBucket" - ] - }, - "UpdateBucket": { - "methods": [ - "updateBucket" - ] - }, - "UpdateBucketAsync": { - "methods": [ - "updateBucketAsync" - ] - }, - "UpdateCmekSettings": { - "methods": [ - "updateCmekSettings" - ] - }, - "UpdateExclusion": { - "methods": [ - "updateExclusion" - ] - }, - "UpdateSettings": { - "methods": [ - "updateSettings" - ] - }, - "UpdateSink": { - "methods": [ - "updateSink" - ] - }, - "UpdateView": { - "methods": [ - "updateView" - ] - } - } - } - } - }, - "MetricsServiceV2": { - "clients": { - "grpc": { - "libraryClient": "MetricsServiceV2GapicClient", - "rpcs": { - "CreateLogMetric": { - "methods": [ - "createLogMetric" - ] - }, - "DeleteLogMetric": { - "methods": [ - "deleteLogMetric" - ] - }, - "GetLogMetric": { - "methods": [ - "getLogMetric" - ] - }, - "ListLogMetrics": { - "methods": [ - "listLogMetrics" - ] - }, - "UpdateLogMetric": { - "methods": [ - "updateLogMetric" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_client_config.json b/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_client_config.json deleted file mode 100644 index 02c54aca2baf..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_client_config.json +++ /dev/null @@ -1,206 +0,0 @@ -{ - "interfaces": { - "google.logging.v2.ConfigServiceV2": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_3_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE" - ], - "no_retry_2_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_3_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_2_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 120000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 120000, - "total_timeout_millis": 120000 - } - }, - "methods": { - "CopyLogEntries": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateBucket": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateBucketAsync": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateExclusion": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateLink": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateSink": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "CreateView": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteBucket": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteExclusion": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "DeleteLink": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteSink": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "DeleteView": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetBucket": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetCmekSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetExclusion": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "GetLink": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetSink": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "GetView": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListBuckets": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListExclusions": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListLinks": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListSinks": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "ListViews": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UndeleteBucket": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateBucket": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateBucketAsync": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateCmekSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateExclusion": { - "timeout_millis": 120000, - "retry_codes_name": "no_retry_2_codes", - "retry_params_name": "no_retry_2_params" - }, - "UpdateSettings": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateSink": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_3_codes", - "retry_params_name": "retry_policy_3_params" - }, - "UpdateView": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_descriptor_config.php b/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_descriptor_config.php deleted file mode 100644 index b7ee554eb744..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_descriptor_config.php +++ /dev/null @@ -1,524 +0,0 @@ - [ - 'google.logging.v2.ConfigServiceV2' => [ - 'CopyLogEntries' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Logging\V2\CopyLogEntriesResponse', - 'metadataReturnType' => '\Google\Cloud\Logging\V2\CopyLogEntriesMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - ], - 'CreateBucketAsync' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Logging\V2\LogBucket', - 'metadataReturnType' => '\Google\Cloud\Logging\V2\BucketMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateLink' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Logging\V2\Link', - 'metadataReturnType' => '\Google\Cloud\Logging\V2\LinkMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteLink' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\Logging\V2\LinkMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateBucketAsync' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\Logging\V2\LogBucket', - 'metadataReturnType' => '\Google\Cloud\Logging\V2\BucketMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateBucket' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogBucket', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateExclusion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogExclusion', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSink' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogSink', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateView' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogView', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteBucket' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteExclusion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSink' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'sink_name', - 'fieldAccessors' => [ - 'getSinkName', - ], - ], - ], - ], - 'DeleteView' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetBucket' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogBucket', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCmekSettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\CmekSettings', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetExclusion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogExclusion', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetLink' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\Link', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\Settings', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSink' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogSink', - 'headerParams' => [ - [ - 'keyName' => 'sink_name', - 'fieldAccessors' => [ - 'getSinkName', - ], - ], - ], - ], - 'GetView' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogView', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListBuckets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getBuckets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\ListBucketsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListExclusions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getExclusions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\ListExclusionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListLinks' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLinks', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\ListLinksResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSinks' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSinks', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\ListSinksResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListViews' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getViews', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\ListViewsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UndeleteBucket' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateBucket' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogBucket', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCmekSettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\CmekSettings', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateExclusion' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogExclusion', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateSettings' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\Settings', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateSink' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogSink', - 'headerParams' => [ - [ - 'keyName' => 'sink_name', - 'fieldAccessors' => [ - 'getSinkName', - ], - ], - ], - ], - 'UpdateView' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogView', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'billingAccount' => 'billingAccounts/{billing_account}', - 'billingAccountCmekSettings' => 'billingAccounts/{billing_account}/cmekSettings', - 'billingAccountExclusion' => 'billingAccounts/{billing_account}/exclusions/{exclusion}', - 'billingAccountLocation' => 'billingAccounts/{billing_account}/locations/{location}', - 'billingAccountLocationBucket' => 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}', - 'billingAccountLocationBucketLink' => 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/links/{link}', - 'billingAccountLocationBucketView' => 'billingAccounts/{billing_account}/locations/{location}/buckets/{bucket}/views/{view}', - 'billingAccountSettings' => 'billingAccounts/{billing_account}/settings', - 'billingAccountSink' => 'billingAccounts/{billing_account}/sinks/{sink}', - 'cmekSettings' => 'projects/{project}/cmekSettings', - 'folder' => 'folders/{folder}', - 'folderCmekSettings' => 'folders/{folder}/cmekSettings', - 'folderExclusion' => 'folders/{folder}/exclusions/{exclusion}', - 'folderLocation' => 'folders/{folder}/locations/{location}', - 'folderLocationBucket' => 'folders/{folder}/locations/{location}/buckets/{bucket}', - 'folderLocationBucketLink' => 'folders/{folder}/locations/{location}/buckets/{bucket}/links/{link}', - 'folderLocationBucketView' => 'folders/{folder}/locations/{location}/buckets/{bucket}/views/{view}', - 'folderSettings' => 'folders/{folder}/settings', - 'folderSink' => 'folders/{folder}/sinks/{sink}', - 'link' => 'projects/{project}/locations/{location}/buckets/{bucket}/links/{link}', - 'location' => 'projects/{project}/locations/{location}', - 'logBucket' => 'projects/{project}/locations/{location}/buckets/{bucket}', - 'logExclusion' => 'projects/{project}/exclusions/{exclusion}', - 'logSink' => 'projects/{project}/sinks/{sink}', - 'logView' => 'projects/{project}/locations/{location}/buckets/{bucket}/views/{view}', - 'organization' => 'organizations/{organization}', - 'organizationCmekSettings' => 'organizations/{organization}/cmekSettings', - 'organizationExclusion' => 'organizations/{organization}/exclusions/{exclusion}', - 'organizationLocation' => 'organizations/{organization}/locations/{location}', - 'organizationLocationBucket' => 'organizations/{organization}/locations/{location}/buckets/{bucket}', - 'organizationLocationBucketLink' => 'organizations/{organization}/locations/{location}/buckets/{bucket}/links/{link}', - 'organizationLocationBucketView' => 'organizations/{organization}/locations/{location}/buckets/{bucket}/views/{view}', - 'organizationSettings' => 'organizations/{organization}/settings', - 'organizationSink' => 'organizations/{organization}/sinks/{sink}', - 'project' => 'projects/{project}', - 'projectCmekSettings' => 'projects/{project}/cmekSettings', - 'projectExclusion' => 'projects/{project}/exclusions/{exclusion}', - 'projectLocationBucket' => 'projects/{project}/locations/{location}/buckets/{bucket}', - 'projectLocationBucketLink' => 'projects/{project}/locations/{location}/buckets/{bucket}/links/{link}', - 'projectLocationBucketView' => 'projects/{project}/locations/{location}/buckets/{bucket}/views/{view}', - 'projectSettings' => 'projects/{project}/settings', - 'projectSink' => 'projects/{project}/sinks/{sink}', - 'settings' => 'projects/{project}/settings', - ], - ], - ], -]; diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_rest_client_config.php b/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_rest_client_config.php deleted file mode 100644 index 41d00fa56dae..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/resources/config_service_v2_rest_client_config.php +++ /dev/null @@ -1,1167 +0,0 @@ - [ - 'google.logging.v2.ConfigServiceV2' => [ - 'CopyLogEntries' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/entries:copy', - 'body' => '*', - ], - 'CreateBucket' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=*/*/locations/*}/buckets', - 'body' => 'bucket', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/buckets', - 'body' => 'bucket', - 'queryParams' => [ - 'bucket_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*/locations/*}/buckets', - 'body' => 'bucket', - 'queryParams' => [ - 'bucket_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=folders/*/locations/*}/buckets', - 'body' => 'bucket', - 'queryParams' => [ - 'bucket_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*}/buckets', - 'body' => 'bucket', - 'queryParams' => [ - 'bucket_id', - ], - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'bucket_id', - ], - ], - 'CreateBucketAsync' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=*/*/locations/*}/buckets:createAsync', - 'body' => 'bucket', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/buckets:createAsync', - 'body' => 'bucket', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*/locations/*}/buckets:createAsync', - 'body' => 'bucket', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=folders/*/locations/*}/buckets:createAsync', - 'body' => 'bucket', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*}/buckets:createAsync', - 'body' => 'bucket', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateExclusion' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=*/*}/exclusions', - 'body' => 'exclusion', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/exclusions', - 'body' => 'exclusion', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*}/exclusions', - 'body' => 'exclusion', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=folders/*}/exclusions', - 'body' => 'exclusion', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=billingAccounts/*}/exclusions', - 'body' => 'exclusion', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateLink' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=*/*/locations/*/buckets/*}/links', - 'body' => 'link', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/buckets/*}/links', - 'body' => 'link', - 'queryParams' => [ - 'link_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*/locations/*/buckets/*}/links', - 'body' => 'link', - 'queryParams' => [ - 'link_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=folders/*/locations/*/buckets/*}/links', - 'body' => 'link', - 'queryParams' => [ - 'link_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*/buckets/*}/links', - 'body' => 'link', - 'queryParams' => [ - 'link_id', - ], - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'link_id', - ], - ], - 'CreateSink' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=*/*}/sinks', - 'body' => 'sink', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/sinks', - 'body' => 'sink', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*}/sinks', - 'body' => 'sink', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=folders/*}/sinks', - 'body' => 'sink', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=billingAccounts/*}/sinks', - 'body' => 'sink', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateView' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=*/*/locations/*/buckets/*}/views', - 'body' => 'view', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/buckets/*}/views', - 'body' => 'view', - 'queryParams' => [ - 'view_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*/locations/*/buckets/*}/views', - 'body' => 'view', - 'queryParams' => [ - 'view_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=folders/*/locations/*/buckets/*}/views', - 'body' => 'view', - 'queryParams' => [ - 'view_id', - ], - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views', - 'body' => 'view', - 'queryParams' => [ - 'view_id', - ], - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'view_id', - ], - ], - 'DeleteBucket' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteExclusion' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=*/*/exclusions/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/exclusions/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=organizations/*/exclusions/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=folders/*/exclusions/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=billingAccounts/*/exclusions/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteLink' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*/links/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*/links/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*/links/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*/links/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*/links/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSink' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{sink_name=*/*/sinks/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{sink_name=projects/*/sinks/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{sink_name=organizations/*/sinks/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{sink_name=folders/*/sinks/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{sink_name=billingAccounts/*/sinks/*}', - ], - ], - 'placeholders' => [ - 'sink_name' => [ - 'getters' => [ - 'getSinkName', - ], - ], - ], - ], - 'DeleteView' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*/views/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*/views/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*/views/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*/views/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetBucket' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCmekSettings' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*}/cmekSettings', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/cmekSettings', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*}/cmekSettings', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*}/cmekSettings', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*}/cmekSettings', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetExclusion' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/exclusions/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/exclusions/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/exclusions/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/exclusions/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/exclusions/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetLink' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*/links/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*/links/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*/links/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*/links/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*/links/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSettings' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*}/settings', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*}/settings', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*}/settings', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*}/settings', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*}/settings', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSink' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{sink_name=*/*/sinks/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{sink_name=projects/*/sinks/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{sink_name=organizations/*/sinks/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{sink_name=folders/*/sinks/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{sink_name=billingAccounts/*/sinks/*}', - ], - ], - 'placeholders' => [ - 'sink_name' => [ - 'getters' => [ - 'getSinkName', - ], - ], - ], - ], - 'GetView' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*/views/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*/views/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*/views/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*/views/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListBuckets' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=*/*/locations/*}/buckets', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*}/buckets', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*/locations/*}/buckets', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=folders/*/locations/*}/buckets', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*}/buckets', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListExclusions' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=*/*}/exclusions', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/exclusions', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*}/exclusions', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=folders/*}/exclusions', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=billingAccounts/*}/exclusions', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListLinks' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=*/*/locations/*/buckets/*}/links', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/buckets/*}/links', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*/locations/*/buckets/*}/links', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=folders/*/locations/*/buckets/*}/links', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*/buckets/*}/links', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSinks' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=*/*}/sinks', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/sinks', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*}/sinks', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=folders/*}/sinks', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=billingAccounts/*}/sinks', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListViews' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=*/*/locations/*/buckets/*}/views', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/buckets/*}/views', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*/locations/*/buckets/*}/views', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=folders/*/locations/*/buckets/*}/views', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*/buckets/*}/views', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UndeleteBucket' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*}:undelete', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*}:undelete', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*}:undelete', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*}:undelete', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*}:undelete', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateBucket' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*}', - 'body' => 'bucket', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*}', - 'body' => 'bucket', - 'queryParams' => [ - 'update_mask', - ], - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*}', - 'body' => 'bucket', - 'queryParams' => [ - 'update_mask', - ], - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*}', - 'body' => 'bucket', - 'queryParams' => [ - 'update_mask', - ], - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*}', - 'body' => 'bucket', - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateBucketAsync' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*}:updateAsync', - 'body' => 'bucket', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*}:updateAsync', - 'body' => 'bucket', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*}:updateAsync', - 'body' => 'bucket', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*}:updateAsync', - 'body' => 'bucket', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*}:updateAsync', - 'body' => 'bucket', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateCmekSettings' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=*/*}/cmekSettings', - 'body' => 'cmek_settings', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=organizations/*}/cmekSettings', - 'body' => 'cmek_settings', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateExclusion' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=*/*/exclusions/*}', - 'body' => 'exclusion', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=projects/*/exclusions/*}', - 'body' => 'exclusion', - 'queryParams' => [ - 'update_mask', - ], - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=organizations/*/exclusions/*}', - 'body' => 'exclusion', - 'queryParams' => [ - 'update_mask', - ], - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=folders/*/exclusions/*}', - 'body' => 'exclusion', - 'queryParams' => [ - 'update_mask', - ], - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=billingAccounts/*/exclusions/*}', - 'body' => 'exclusion', - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateSettings' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=*/*}/settings', - 'body' => 'settings', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=organizations/*}/settings', - 'body' => 'settings', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=folders/*}/settings', - 'body' => 'settings', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateSink' => [ - 'method' => 'put', - 'uriTemplate' => '/v2/{sink_name=*/*/sinks/*}', - 'body' => 'sink', - 'additionalBindings' => [ - [ - 'method' => 'put', - 'uriTemplate' => '/v2/{sink_name=projects/*/sinks/*}', - 'body' => 'sink', - ], - [ - 'method' => 'put', - 'uriTemplate' => '/v2/{sink_name=organizations/*/sinks/*}', - 'body' => 'sink', - ], - [ - 'method' => 'put', - 'uriTemplate' => '/v2/{sink_name=folders/*/sinks/*}', - 'body' => 'sink', - ], - [ - 'method' => 'put', - 'uriTemplate' => '/v2/{sink_name=billingAccounts/*/sinks/*}', - 'body' => 'sink', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{sink_name=projects/*/sinks/*}', - 'body' => 'sink', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{sink_name=organizations/*/sinks/*}', - 'body' => 'sink', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{sink_name=folders/*/sinks/*}', - 'body' => 'sink', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{sink_name=billingAccounts/*/sinks/*}', - 'body' => 'sink', - ], - ], - 'placeholders' => [ - 'sink_name' => [ - 'getters' => [ - 'getSinkName', - ], - ], - ], - ], - 'UpdateView' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=*/*/locations/*/buckets/*/views/*}', - 'body' => 'view', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/buckets/*/views/*}', - 'body' => 'view', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/buckets/*/views/*}', - 'body' => 'view', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/buckets/*/views/*}', - 'body' => 'view', - ], - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/buckets/*/views/*}', - 'body' => 'view', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=*/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/locations/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_client_config.json b/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_client_config.json deleted file mode 100644 index f5ac1a4d058e..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_client_config.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "interfaces": { - "google.logging.v2.LoggingServiceV2": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE" - ], - "retry_policy_2_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 3600000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 3600000, - "total_timeout_millis": 3600000 - } - }, - "methods": { - "DeleteLog": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLogEntries": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLogs": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListMonitoredResourceDescriptors": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "TailLogEntries": { - "timeout_millis": 3600000 - }, - "WriteLogEntries": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params", - "bundling": { - "delay_threshold_millis": 50, - "element_count_threshold": 1000, - "request_byte_threshold": 1048576 - } - } - } - } - } -} diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_descriptor_config.php b/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_descriptor_config.php deleted file mode 100644 index 3485fda7ca1d..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_descriptor_config.php +++ /dev/null @@ -1,106 +0,0 @@ - [ - 'google.logging.v2.LoggingServiceV2' => [ - 'DeleteLog' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'log_name', - 'fieldAccessors' => [ - 'getLogName', - ], - ], - ], - ], - 'ListLogEntries' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEntries', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\ListLogEntriesResponse', - ], - 'ListLogs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLogNames', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\ListLogsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListMonitoredResourceDescriptors' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getResourceDescriptors', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\ListMonitoredResourceDescriptorsResponse', - ], - 'TailLogEntries' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\TailLogEntriesResponse', - ], - 'WriteLogEntries' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\WriteLogEntriesResponse', - ], - 'templateMap' => [ - 'billingAccount' => 'billingAccounts/{billing_account}', - 'billingAccountLog' => 'billingAccounts/{billing_account}/logs/{log}', - 'folder' => 'folders/{folder}', - 'folderLog' => 'folders/{folder}/logs/{log}', - 'log' => 'projects/{project}/logs/{log}', - 'organization' => 'organizations/{organization}', - 'organizationLog' => 'organizations/{organization}/logs/{log}', - 'project' => 'projects/{project}', - 'projectLog' => 'projects/{project}/logs/{log}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_rest_client_config.php b/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_rest_client_config.php deleted file mode 100644 index 49f3db704496..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/resources/logging_service_v2_rest_client_config.php +++ /dev/null @@ -1,211 +0,0 @@ - [ - 'google.logging.v2.LoggingServiceV2' => [ - 'DeleteLog' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{log_name=projects/*/logs/*}', - 'additionalBindings' => [ - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{log_name=*/*/logs/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{log_name=organizations/*/logs/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{log_name=folders/*/logs/*}', - ], - [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{log_name=billingAccounts/*/logs/*}', - ], - ], - 'placeholders' => [ - 'log_name' => [ - 'getters' => [ - 'getLogName', - ], - ], - ], - ], - 'ListLogEntries' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/entries:list', - 'body' => '*', - ], - 'ListLogs' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=*/*}/logs', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/logs', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*}/logs', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=folders/*}/logs', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=billingAccounts/*}/logs', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/locations/*/buckets/*/views/*}/logs', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*/locations/*/buckets/*/views/*}/logs', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=folders/*/locations/*/buckets/*/views/*}/logs', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=billingAccounts/*/locations/*/buckets/*/views/*}/logs', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListMonitoredResourceDescriptors' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/monitoredResourceDescriptors', - ], - 'WriteLogEntries' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/entries:write', - 'body' => '*', - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=*/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/locations/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_client_config.json b/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_client_config.json deleted file mode 100644 index 8d1153764e81..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_client_config.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "interfaces": { - "google.logging.v2.MetricsServiceV2": { - "retry_codes": { - "no_retry_codes": [], - "no_retry_1_codes": [], - "retry_policy_4_codes": [ - "DEADLINE_EXCEEDED", - "INTERNAL", - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_4_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateLogMetric": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "DeleteLogMetric": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "GetLogMetric": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "ListLogMetrics": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - }, - "UpdateLogMetric": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_4_codes", - "retry_params_name": "retry_policy_4_params" - } - } - } - } -} diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_descriptor_config.php b/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_descriptor_config.php deleted file mode 100644 index 2c1bf2125fca..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_descriptor_config.php +++ /dev/null @@ -1,100 +0,0 @@ - [ - 'google.logging.v2.MetricsServiceV2' => [ - 'CreateLogMetric' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogMetric', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteLogMetric' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'metric_name', - 'fieldAccessors' => [ - 'getMetricName', - ], - ], - ], - ], - 'GetLogMetric' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogMetric', - 'headerParams' => [ - [ - 'keyName' => 'metric_name', - 'fieldAccessors' => [ - 'getMetricName', - ], - ], - ], - ], - 'ListLogMetrics' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getMetrics', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\ListLogMetricsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateLogMetric' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Logging\V2\LogMetric', - 'headerParams' => [ - [ - 'keyName' => 'metric_name', - 'fieldAccessors' => [ - 'getMetricName', - ], - ], - ], - ], - 'templateMap' => [ - 'logMetric' => 'projects/{project}/metrics/{metric}', - 'project' => 'projects/{project}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_rest_client_config.php b/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_rest_client_config.php deleted file mode 100644 index 195a52fc6a8d..000000000000 --- a/owl-bot-staging/Logging/v2/src/V2/resources/metrics_service_v2_rest_client_config.php +++ /dev/null @@ -1,180 +0,0 @@ - [ - 'google.logging.v2.MetricsServiceV2' => [ - 'CreateLogMetric' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/metrics', - 'body' => 'metric', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteLogMetric' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{metric_name=projects/*/metrics/*}', - 'placeholders' => [ - 'metric_name' => [ - 'getters' => [ - 'getMetricName', - ], - ], - ], - ], - 'GetLogMetric' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{metric_name=projects/*/metrics/*}', - 'placeholders' => [ - 'metric_name' => [ - 'getters' => [ - 'getMetricName', - ], - ], - ], - ], - 'ListLogMetrics' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/metrics', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateLogMetric' => [ - 'method' => 'put', - 'uriTemplate' => '/v2/{metric_name=projects/*/metrics/*}', - 'body' => 'metric', - 'placeholders' => [ - 'metric_name' => [ - 'getters' => [ - 'getMetricName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=*/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/operations/*}:cancel', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/locations/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/locations/*}/operations', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=folders/*/locations/*}/operations', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=billingAccounts/*/locations/*}/operations', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/ConfigServiceV2ClientTest.php b/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/ConfigServiceV2ClientTest.php deleted file mode 100644 index a4e0a05ccf7b..000000000000 --- a/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/ConfigServiceV2ClientTest.php +++ /dev/null @@ -1,2819 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ConfigServiceV2Client */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ConfigServiceV2Client($options); - } - - /** @test */ - public function copyLogEntriesTest() - { - $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/copyLogEntriesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $logEntriesCopiedCount = 2134326978; - $expectedResponse = new CopyLogEntriesResponse(); - $expectedResponse->setLogEntriesCopiedCount($logEntriesCopiedCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/copyLogEntriesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $destination = 'destination-1429847026'; - $request = (new CopyLogEntriesRequest()) - ->setName($name) - ->setDestination($destination); - $response = $gapicClient->copyLogEntries($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.logging.v2.ConfigServiceV2/CopyLogEntries', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualApiRequestObject->getDestination(); - $this->assertProtobufEquals($destination, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/copyLogEntriesTest'); - $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 copyLogEntriesExceptionTest() - { - $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/copyLogEntriesTest'); - $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'; - $destination = 'destination-1429847026'; - $request = (new CopyLogEntriesRequest()) - ->setName($name) - ->setDestination($destination); - $response = $gapicClient->copyLogEntries($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/copyLogEntriesTest'); - 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 createBucketTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $retentionDays = 1544391896; - $locked = true; - $analyticsEnabled = true; - $expectedResponse = new LogBucket(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setRetentionDays($retentionDays); - $expectedResponse->setLocked($locked); - $expectedResponse->setAnalyticsEnabled($analyticsEnabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $bucketId = 'bucketId1837164432'; - $bucket = new LogBucket(); - $request = (new CreateBucketRequest()) - ->setParent($formattedParent) - ->setBucketId($bucketId) - ->setBucket($bucket); - $response = $gapicClient->createBucket($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/CreateBucket', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getBucketId(); - $this->assertProtobufEquals($bucketId, $actualValue); - $actualValue = $actualRequestObject->getBucket(); - $this->assertProtobufEquals($bucket, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createBucketExceptionTest() - { - $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $bucketId = 'bucketId1837164432'; - $bucket = new LogBucket(); - $request = (new CreateBucketRequest()) - ->setParent($formattedParent) - ->setBucketId($bucketId) - ->setBucket($bucket); - try { - $gapicClient->createBucket($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 createBucketAsyncTest() - { - $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/createBucketAsyncTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $retentionDays = 1544391896; - $locked = true; - $analyticsEnabled = true; - $expectedResponse = new LogBucket(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setRetentionDays($retentionDays); - $expectedResponse->setLocked($locked); - $expectedResponse->setAnalyticsEnabled($analyticsEnabled); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createBucketAsyncTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $bucketId = 'bucketId1837164432'; - $bucket = new LogBucket(); - $request = (new CreateBucketRequest()) - ->setParent($formattedParent) - ->setBucketId($bucketId) - ->setBucket($bucket); - $response = $gapicClient->createBucketAsync($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.logging.v2.ConfigServiceV2/CreateBucketAsync', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getBucketId(); - $this->assertProtobufEquals($bucketId, $actualValue); - $actualValue = $actualApiRequestObject->getBucket(); - $this->assertProtobufEquals($bucket, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBucketAsyncTest'); - $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 createBucketAsyncExceptionTest() - { - $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/createBucketAsyncTest'); - $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $bucketId = 'bucketId1837164432'; - $bucket = new LogBucket(); - $request = (new CreateBucketRequest()) - ->setParent($formattedParent) - ->setBucketId($bucketId) - ->setBucket($bucket); - $response = $gapicClient->createBucketAsync($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createBucketAsyncTest'); - 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 createExclusionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $disabled = true; - $expectedResponse = new LogExclusion(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setDisabled($disabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $exclusion = new LogExclusion(); - $exclusionName = 'exclusionName1004344697'; - $exclusion->setName($exclusionName); - $exclusionFilter = 'exclusionFilter-1414044954'; - $exclusion->setFilter($exclusionFilter); - $request = (new CreateExclusionRequest()) - ->setParent($formattedParent) - ->setExclusion($exclusion); - $response = $gapicClient->createExclusion($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/CreateExclusion', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getExclusion(); - $this->assertProtobufEquals($exclusion, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createExclusionExceptionTest() - { - $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]'); - $exclusion = new LogExclusion(); - $exclusionName = 'exclusionName1004344697'; - $exclusion->setName($exclusionName); - $exclusionFilter = 'exclusionFilter-1414044954'; - $exclusion->setFilter($exclusionFilter); - $request = (new CreateExclusionRequest()) - ->setParent($formattedParent) - ->setExclusion($exclusion); - try { - $gapicClient->createExclusion($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 createLinkTest() - { - $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/createLinkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $description = 'description-1724546052'; - $expectedResponse = new Link(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createLinkTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $link = new Link(); - $linkId = 'linkId177080192'; - $request = (new CreateLinkRequest()) - ->setParent($formattedParent) - ->setLink($link) - ->setLinkId($linkId); - $response = $gapicClient->createLink($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.logging.v2.ConfigServiceV2/CreateLink', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getLink(); - $this->assertProtobufEquals($link, $actualValue); - $actualValue = $actualApiRequestObject->getLinkId(); - $this->assertProtobufEquals($linkId, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLinkTest'); - $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 createLinkExceptionTest() - { - $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/createLinkTest'); - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $link = new Link(); - $linkId = 'linkId177080192'; - $request = (new CreateLinkRequest()) - ->setParent($formattedParent) - ->setLink($link) - ->setLinkId($linkId); - $response = $gapicClient->createLink($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createLinkTest'); - 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 createSinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $destination = 'destination-1429847026'; - $filter = 'filter-1274492040'; - $description = 'description-1724546052'; - $disabled = true; - $writerIdentity = 'writerIdentity775638794'; - $includeChildren = true; - $expectedResponse = new LogSink(); - $expectedResponse->setName($name); - $expectedResponse->setDestination($destination); - $expectedResponse->setFilter($filter); - $expectedResponse->setDescription($description); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setWriterIdentity($writerIdentity); - $expectedResponse->setIncludeChildren($includeChildren); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $sink = new LogSink(); - $sinkName = 'sinkName508775358'; - $sink->setName($sinkName); - $sinkDestination = 'sinkDestination-1018870917'; - $sink->setDestination($sinkDestination); - $request = (new CreateSinkRequest()) - ->setParent($formattedParent) - ->setSink($sink); - $response = $gapicClient->createSink($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/CreateSink', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSink(); - $this->assertProtobufEquals($sink, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSinkExceptionTest() - { - $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]'); - $sink = new LogSink(); - $sinkName = 'sinkName508775358'; - $sink->setName($sinkName); - $sinkDestination = 'sinkDestination-1018870917'; - $sink->setDestination($sinkDestination); - $request = (new CreateSinkRequest()) - ->setParent($formattedParent) - ->setSink($sink); - try { - $gapicClient->createSink($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 createViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $expectedResponse = new LogView(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $viewId = 'viewId454228213'; - $view = new LogView(); - $request = (new CreateViewRequest()) - ->setParent($parent) - ->setViewId($viewId) - ->setView($view); - $response = $gapicClient->createView($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/CreateView', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualRequestObject->getViewId(); - $this->assertProtobufEquals($viewId, $actualValue); - $actualValue = $actualRequestObject->getView(); - $this->assertProtobufEquals($view, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createViewExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $viewId = 'viewId454228213'; - $view = new LogView(); - $request = (new CreateViewRequest()) - ->setParent($parent) - ->setViewId($viewId) - ->setView($view); - try { - $gapicClient->createView($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 deleteBucketTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $request = (new DeleteBucketRequest()) - ->setName($formattedName); - $gapicClient->deleteBucket($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/DeleteBucket', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteBucketExceptionTest() - { - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $request = (new DeleteBucketRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteBucket($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 deleteExclusionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logExclusionName('[PROJECT]', '[EXCLUSION]'); - $request = (new DeleteExclusionRequest()) - ->setName($formattedName); - $gapicClient->deleteExclusion($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/DeleteExclusion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteExclusionExceptionTest() - { - $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->logExclusionName('[PROJECT]', '[EXCLUSION]'); - $request = (new DeleteExclusionRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteExclusion($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 deleteLinkTest() - { - $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/deleteLinkTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteLinkTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); - $request = (new DeleteLinkRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteLink($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.logging.v2.ConfigServiceV2/DeleteLink', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLinkTest'); - $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 deleteLinkExceptionTest() - { - $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/deleteLinkTest'); - $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->linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); - $request = (new DeleteLinkRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteLink($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteLinkTest'); - 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 deleteSinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); - $request = (new DeleteSinkRequest()) - ->setSinkName($formattedSinkName); - $gapicClient->deleteSink($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/DeleteSink', $actualFuncCall); - $actualValue = $actualRequestObject->getSinkName(); - $this->assertProtobufEquals($formattedSinkName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSinkExceptionTest() - { - $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 - $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); - $request = (new DeleteSinkRequest()) - ->setSinkName($formattedSinkName); - try { - $gapicClient->deleteSink($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 deleteViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logViewName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[VIEW]'); - $request = (new DeleteViewRequest()) - ->setName($formattedName); - $gapicClient->deleteView($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/DeleteView', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteViewExceptionTest() - { - $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->logViewName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[VIEW]'); - $request = (new DeleteViewRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteView($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 getBucketTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $retentionDays = 1544391896; - $locked = true; - $analyticsEnabled = true; - $expectedResponse = new LogBucket(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setRetentionDays($retentionDays); - $expectedResponse->setLocked($locked); - $expectedResponse->setAnalyticsEnabled($analyticsEnabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $request = (new GetBucketRequest()) - ->setName($formattedName); - $response = $gapicClient->getBucket($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetBucket', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getBucketExceptionTest() - { - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $request = (new GetBucketRequest()) - ->setName($formattedName); - try { - $gapicClient->getBucket($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 getCmekSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $kmsKeyName = 'kmsKeyName2094986649'; - $kmsKeyVersionName = 'kmsKeyVersionName-1734350176'; - $serviceAccountId = 'serviceAccountId-111486921'; - $expectedResponse = new CmekSettings(); - $expectedResponse->setName($name2); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName); - $expectedResponse->setServiceAccountId($serviceAccountId); - $transport->addResponse($expectedResponse); - $request = new GetCmekSettingsRequest(); - $response = $gapicClient->getCmekSettings($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetCmekSettings', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCmekSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetCmekSettingsRequest(); - try { - $gapicClient->getCmekSettings($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 getExclusionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $disabled = true; - $expectedResponse = new LogExclusion(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setDisabled($disabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logExclusionName('[PROJECT]', '[EXCLUSION]'); - $request = (new GetExclusionRequest()) - ->setName($formattedName); - $response = $gapicClient->getExclusion($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetExclusion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getExclusionExceptionTest() - { - $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->logExclusionName('[PROJECT]', '[EXCLUSION]'); - $request = (new GetExclusionRequest()) - ->setName($formattedName); - try { - $gapicClient->getExclusion($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 getLinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $expectedResponse = new Link(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); - $request = (new GetLinkRequest()) - ->setName($formattedName); - $response = $gapicClient->getLink($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetLink', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLinkExceptionTest() - { - $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->linkName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[LINK]'); - $request = (new GetLinkRequest()) - ->setName($formattedName); - try { - $gapicClient->getLink($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 getSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $kmsKeyName = 'kmsKeyName2094986649'; - $kmsServiceAccountId = 'kmsServiceAccountId-263326747'; - $storageLocation = 'storageLocation-612882183'; - $disableDefaultSink = true; - $expectedResponse = new Settings(); - $expectedResponse->setName($name2); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setKmsServiceAccountId($kmsServiceAccountId); - $expectedResponse->setStorageLocation($storageLocation); - $expectedResponse->setDisableDefaultSink($disableDefaultSink); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->settingsName('[PROJECT]'); - $request = (new GetSettingsRequest()) - ->setName($formattedName); - $response = $gapicClient->getSettings($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSettingsExceptionTest() - { - $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->settingsName('[PROJECT]'); - $request = (new GetSettingsRequest()) - ->setName($formattedName); - try { - $gapicClient->getSettings($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 getSinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $destination = 'destination-1429847026'; - $filter = 'filter-1274492040'; - $description = 'description-1724546052'; - $disabled = true; - $writerIdentity = 'writerIdentity775638794'; - $includeChildren = true; - $expectedResponse = new LogSink(); - $expectedResponse->setName($name); - $expectedResponse->setDestination($destination); - $expectedResponse->setFilter($filter); - $expectedResponse->setDescription($description); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setWriterIdentity($writerIdentity); - $expectedResponse->setIncludeChildren($includeChildren); - $transport->addResponse($expectedResponse); - // Mock request - $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); - $request = (new GetSinkRequest()) - ->setSinkName($formattedSinkName); - $response = $gapicClient->getSink($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetSink', $actualFuncCall); - $actualValue = $actualRequestObject->getSinkName(); - $this->assertProtobufEquals($formattedSinkName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSinkExceptionTest() - { - $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 - $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); - $request = (new GetSinkRequest()) - ->setSinkName($formattedSinkName); - try { - $gapicClient->getSink($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 getViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $expectedResponse = new LogView(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logViewName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[VIEW]'); - $request = (new GetViewRequest()) - ->setName($formattedName); - $response = $gapicClient->getView($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/GetView', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getViewExceptionTest() - { - $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->logViewName('[PROJECT]', '[LOCATION]', '[BUCKET]', '[VIEW]'); - $request = (new GetViewRequest()) - ->setName($formattedName); - try { - $gapicClient->getView($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 listBucketsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $bucketsElement = new LogBucket(); - $buckets = [ - $bucketsElement, - ]; - $expectedResponse = new ListBucketsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setBuckets($buckets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListBucketsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listBuckets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getBuckets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/ListBuckets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listBucketsExceptionTest() - { - $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->organizationLocationName('[ORGANIZATION]', '[LOCATION]'); - $request = (new ListBucketsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listBuckets($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 listExclusionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $exclusionsElement = new LogExclusion(); - $exclusions = [ - $exclusionsElement, - ]; - $expectedResponse = new ListExclusionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setExclusions($exclusions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListExclusionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listExclusions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getExclusions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/ListExclusions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listExclusionsExceptionTest() - { - $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 ListExclusionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listExclusions($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 listLinksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $linksElement = new Link(); - $links = [ - $linksElement, - ]; - $expectedResponse = new ListLinksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLinks($links); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $request = (new ListLinksRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listLinks($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLinks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/ListLinks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLinksExceptionTest() - { - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $request = (new ListLinksRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listLinks($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 listSinksTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $sinksElement = new LogSink(); - $sinks = [ - $sinksElement, - ]; - $expectedResponse = new ListSinksResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSinks($sinks); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListSinksRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSinks($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSinks()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/ListSinks', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSinksExceptionTest() - { - $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 ListSinksRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSinks($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 listViewsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $viewsElement = new LogView(); - $views = [ - $viewsElement, - ]; - $expectedResponse = new ListViewsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setViews($views); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListViewsRequest()) - ->setParent($parent); - $response = $gapicClient->listViews($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getViews()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/ListViews', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listViewsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListViewsRequest()) - ->setParent($parent); - try { - $gapicClient->listViews($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 undeleteBucketTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $request = (new UndeleteBucketRequest()) - ->setName($formattedName); - $gapicClient->undeleteBucket($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UndeleteBucket', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function undeleteBucketExceptionTest() - { - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $request = (new UndeleteBucketRequest()) - ->setName($formattedName); - try { - $gapicClient->undeleteBucket($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 updateBucketTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $retentionDays = 1544391896; - $locked = true; - $analyticsEnabled = true; - $expectedResponse = new LogBucket(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setRetentionDays($retentionDays); - $expectedResponse->setLocked($locked); - $expectedResponse->setAnalyticsEnabled($analyticsEnabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $bucket = new LogBucket(); - $updateMask = new FieldMask(); - $request = (new UpdateBucketRequest()) - ->setName($formattedName) - ->setBucket($bucket) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateBucket($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateBucket', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getBucket(); - $this->assertProtobufEquals($bucket, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateBucketExceptionTest() - { - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $bucket = new LogBucket(); - $updateMask = new FieldMask(); - $request = (new UpdateBucketRequest()) - ->setName($formattedName) - ->setBucket($bucket) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateBucket($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 updateBucketAsyncTest() - { - $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/updateBucketAsyncTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $retentionDays = 1544391896; - $locked = true; - $analyticsEnabled = true; - $expectedResponse = new LogBucket(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setRetentionDays($retentionDays); - $expectedResponse->setLocked($locked); - $expectedResponse->setAnalyticsEnabled($analyticsEnabled); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateBucketAsyncTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $bucket = new LogBucket(); - $updateMask = new FieldMask(); - $request = (new UpdateBucketRequest()) - ->setName($formattedName) - ->setBucket($bucket) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateBucketAsync($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.logging.v2.ConfigServiceV2/UpdateBucketAsync', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getBucket(); - $this->assertProtobufEquals($bucket, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBucketAsyncTest'); - $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 updateBucketAsyncExceptionTest() - { - $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/updateBucketAsyncTest'); - $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->logBucketName('[PROJECT]', '[LOCATION]', '[BUCKET]'); - $bucket = new LogBucket(); - $updateMask = new FieldMask(); - $request = (new UpdateBucketRequest()) - ->setName($formattedName) - ->setBucket($bucket) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateBucketAsync($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateBucketAsyncTest'); - 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 updateCmekSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $kmsKeyName = 'kmsKeyName2094986649'; - $kmsKeyVersionName = 'kmsKeyVersionName-1734350176'; - $serviceAccountId = 'serviceAccountId-111486921'; - $expectedResponse = new CmekSettings(); - $expectedResponse->setName($name2); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setKmsKeyVersionName($kmsKeyVersionName); - $expectedResponse->setServiceAccountId($serviceAccountId); - $transport->addResponse($expectedResponse); - $request = new UpdateCmekSettingsRequest(); - $response = $gapicClient->updateCmekSettings($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateCmekSettings', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCmekSettingsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new UpdateCmekSettingsRequest(); - try { - $gapicClient->updateCmekSettings($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 updateExclusionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $disabled = true; - $expectedResponse = new LogExclusion(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setDisabled($disabled); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->logExclusionName('[PROJECT]', '[EXCLUSION]'); - $exclusion = new LogExclusion(); - $exclusionName = 'exclusionName1004344697'; - $exclusion->setName($exclusionName); - $exclusionFilter = 'exclusionFilter-1414044954'; - $exclusion->setFilter($exclusionFilter); - $updateMask = new FieldMask(); - $request = (new UpdateExclusionRequest()) - ->setName($formattedName) - ->setExclusion($exclusion) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateExclusion($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateExclusion', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getExclusion(); - $this->assertProtobufEquals($exclusion, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateExclusionExceptionTest() - { - $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->logExclusionName('[PROJECT]', '[EXCLUSION]'); - $exclusion = new LogExclusion(); - $exclusionName = 'exclusionName1004344697'; - $exclusion->setName($exclusionName); - $exclusionFilter = 'exclusionFilter-1414044954'; - $exclusion->setFilter($exclusionFilter); - $updateMask = new FieldMask(); - $request = (new UpdateExclusionRequest()) - ->setName($formattedName) - ->setExclusion($exclusion) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateExclusion($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 updateSettingsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $kmsKeyName = 'kmsKeyName2094986649'; - $kmsServiceAccountId = 'kmsServiceAccountId-263326747'; - $storageLocation = 'storageLocation-612882183'; - $disableDefaultSink = true; - $expectedResponse = new Settings(); - $expectedResponse->setName($name2); - $expectedResponse->setKmsKeyName($kmsKeyName); - $expectedResponse->setKmsServiceAccountId($kmsServiceAccountId); - $expectedResponse->setStorageLocation($storageLocation); - $expectedResponse->setDisableDefaultSink($disableDefaultSink); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $settings = new Settings(); - $request = (new UpdateSettingsRequest()) - ->setName($name) - ->setSettings($settings); - $response = $gapicClient->updateSettings($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateSettings', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getSettings(); - $this->assertProtobufEquals($settings, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSettingsExceptionTest() - { - $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'; - $settings = new Settings(); - $request = (new UpdateSettingsRequest()) - ->setName($name) - ->setSettings($settings); - try { - $gapicClient->updateSettings($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 updateSinkTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $destination = 'destination-1429847026'; - $filter = 'filter-1274492040'; - $description = 'description-1724546052'; - $disabled = true; - $writerIdentity = 'writerIdentity775638794'; - $includeChildren = true; - $expectedResponse = new LogSink(); - $expectedResponse->setName($name); - $expectedResponse->setDestination($destination); - $expectedResponse->setFilter($filter); - $expectedResponse->setDescription($description); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setWriterIdentity($writerIdentity); - $expectedResponse->setIncludeChildren($includeChildren); - $transport->addResponse($expectedResponse); - // Mock request - $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); - $sink = new LogSink(); - $sinkName = 'sinkName508775358'; - $sink->setName($sinkName); - $sinkDestination = 'sinkDestination-1018870917'; - $sink->setDestination($sinkDestination); - $request = (new UpdateSinkRequest()) - ->setSinkName($formattedSinkName) - ->setSink($sink); - $response = $gapicClient->updateSink($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateSink', $actualFuncCall); - $actualValue = $actualRequestObject->getSinkName(); - $this->assertProtobufEquals($formattedSinkName, $actualValue); - $actualValue = $actualRequestObject->getSink(); - $this->assertProtobufEquals($sink, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSinkExceptionTest() - { - $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 - $formattedSinkName = $gapicClient->logSinkName('[PROJECT]', '[SINK]'); - $sink = new LogSink(); - $sinkName = 'sinkName508775358'; - $sink->setName($sinkName); - $sinkDestination = 'sinkDestination-1018870917'; - $sink->setDestination($sinkDestination); - $request = (new UpdateSinkRequest()) - ->setSinkName($formattedSinkName) - ->setSink($sink); - try { - $gapicClient->updateSink($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 updateViewTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $expectedResponse = new LogView(); - $expectedResponse->setName($name2); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $view = new LogView(); - $request = (new UpdateViewRequest()) - ->setName($name) - ->setView($view); - $response = $gapicClient->updateView($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/UpdateView', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getView(); - $this->assertProtobufEquals($view, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateViewExceptionTest() - { - $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'; - $view = new LogView(); - $request = (new UpdateViewRequest()) - ->setName($name) - ->setView($view); - try { - $gapicClient->updateView($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 copyLogEntriesAsyncTest() - { - $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/copyLogEntriesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $logEntriesCopiedCount = 2134326978; - $expectedResponse = new CopyLogEntriesResponse(); - $expectedResponse->setLogEntriesCopiedCount($logEntriesCopiedCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/copyLogEntriesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $name = 'name3373707'; - $destination = 'destination-1429847026'; - $request = (new CopyLogEntriesRequest()) - ->setName($name) - ->setDestination($destination); - $response = $gapicClient->copyLogEntriesAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.ConfigServiceV2/CopyLogEntries', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualApiRequestObject->getDestination(); - $this->assertProtobufEquals($destination, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/copyLogEntriesTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/LoggingServiceV2ClientTest.php b/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/LoggingServiceV2ClientTest.php deleted file mode 100644 index a1e709afd967..000000000000 --- a/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/LoggingServiceV2ClientTest.php +++ /dev/null @@ -1,530 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return LoggingServiceV2Client */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new LoggingServiceV2Client($options); - } - - /** @test */ - public function deleteLogTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedLogName = $gapicClient->logName('[PROJECT]', '[LOG]'); - $request = (new DeleteLogRequest()) - ->setLogName($formattedLogName); - $gapicClient->deleteLog($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/DeleteLog', $actualFuncCall); - $actualValue = $actualRequestObject->getLogName(); - $this->assertProtobufEquals($formattedLogName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteLogExceptionTest() - { - $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 - $formattedLogName = $gapicClient->logName('[PROJECT]', '[LOG]'); - $request = (new DeleteLogRequest()) - ->setLogName($formattedLogName); - try { - $gapicClient->deleteLog($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 listLogEntriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $entriesElement = new LogEntry(); - $entries = [ - $entriesElement, - ]; - $expectedResponse = new ListLogEntriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEntries($entries); - $transport->addResponse($expectedResponse); - // Mock request - $formattedResourceNames = [ - $gapicClient->projectName('[PROJECT]'), - ]; - $request = (new ListLogEntriesRequest()) - ->setResourceNames($formattedResourceNames); - $response = $gapicClient->listLogEntries($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEntries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/ListLogEntries', $actualFuncCall); - $actualValue = $actualRequestObject->getResourceNames(); - $this->assertProtobufEquals($formattedResourceNames, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLogEntriesExceptionTest() - { - $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 - $formattedResourceNames = [ - $gapicClient->projectName('[PROJECT]'), - ]; - $request = (new ListLogEntriesRequest()) - ->setResourceNames($formattedResourceNames); - try { - $gapicClient->listLogEntries($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 listLogsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $logNamesElement = 'logNamesElement-1079688374'; - $logNames = [ - $logNamesElement, - ]; - $expectedResponse = new ListLogsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLogNames($logNames); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListLogsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listLogs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLogNames()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/ListLogs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLogsExceptionTest() - { - $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 ListLogsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listLogs($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 listMonitoredResourceDescriptorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $resourceDescriptorsElement = new MonitoredResourceDescriptor(); - $resourceDescriptors = [ - $resourceDescriptorsElement, - ]; - $expectedResponse = new ListMonitoredResourceDescriptorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setResourceDescriptors($resourceDescriptors); - $transport->addResponse($expectedResponse); - $request = new ListMonitoredResourceDescriptorsRequest(); - $response = $gapicClient->listMonitoredResourceDescriptors($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getResourceDescriptors()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/ListMonitoredResourceDescriptors', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMonitoredResourceDescriptorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListMonitoredResourceDescriptorsRequest(); - try { - $gapicClient->listMonitoredResourceDescriptors($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 tailLogEntriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new TailLogEntriesResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new TailLogEntriesResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new TailLogEntriesResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $resourceNames = []; - $request = new TailLogEntriesRequest(); - $request->setResourceNames($resourceNames); - $resourceNames2 = []; - $request2 = new TailLogEntriesRequest(); - $request2->setResourceNames($resourceNames2); - $resourceNames3 = []; - $request3 = new TailLogEntriesRequest(); - $request3->setResourceNames($resourceNames3); - $bidi = $gapicClient->tailLogEntries(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/TailLogEntries', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function tailLogEntriesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->tailLogEntries(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function writeLogEntriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new WriteLogEntriesResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $entries = []; - $request = (new WriteLogEntriesRequest()) - ->setEntries($entries); - $response = $gapicClient->writeLogEntries($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/WriteLogEntries', $actualFuncCall); - $actualValue = $actualRequestObject->getEntries(); - $this->assertProtobufEquals($entries, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function writeLogEntriesExceptionTest() - { - $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 - $entries = []; - $request = (new WriteLogEntriesRequest()) - ->setEntries($entries); - try { - $gapicClient->writeLogEntries($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 deleteLogAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedLogName = $gapicClient->logName('[PROJECT]', '[LOG]'); - $request = (new DeleteLogRequest()) - ->setLogName($formattedLogName); - $gapicClient->deleteLogAsync($request)->wait(); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.LoggingServiceV2/DeleteLog', $actualFuncCall); - $actualValue = $actualRequestObject->getLogName(); - $this->assertProtobufEquals($formattedLogName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/MetricsServiceV2ClientTest.php b/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/MetricsServiceV2ClientTest.php deleted file mode 100644 index 35ce817fb79a..000000000000 --- a/owl-bot-staging/Logging/v2/tests/Unit/V2/Client/MetricsServiceV2ClientTest.php +++ /dev/null @@ -1,498 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return MetricsServiceV2Client */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new MetricsServiceV2Client($options); - } - - /** @test */ - public function createLogMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $bucketName = 'bucketName283610048'; - $disabled = true; - $valueExtractor = 'valueExtractor2047672534'; - $expectedResponse = new LogMetric(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setBucketName($bucketName); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setValueExtractor($valueExtractor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $metric = new LogMetric(); - $metricName = 'metricName-610759589'; - $metric->setName($metricName); - $metricFilter = 'metricFilter1248897352'; - $metric->setFilter($metricFilter); - $request = (new CreateLogMetricRequest()) - ->setParent($formattedParent) - ->setMetric($metric); - $response = $gapicClient->createLogMetric($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.MetricsServiceV2/CreateLogMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getMetric(); - $this->assertProtobufEquals($metric, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createLogMetricExceptionTest() - { - $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]'); - $metric = new LogMetric(); - $metricName = 'metricName-610759589'; - $metric->setName($metricName); - $metricFilter = 'metricFilter1248897352'; - $metric->setFilter($metricFilter); - $request = (new CreateLogMetricRequest()) - ->setParent($formattedParent) - ->setMetric($metric); - try { - $gapicClient->createLogMetric($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 deleteLogMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); - $request = (new DeleteLogMetricRequest()) - ->setMetricName($formattedMetricName); - $gapicClient->deleteLogMetric($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.MetricsServiceV2/DeleteLogMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getMetricName(); - $this->assertProtobufEquals($formattedMetricName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteLogMetricExceptionTest() - { - $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 - $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); - $request = (new DeleteLogMetricRequest()) - ->setMetricName($formattedMetricName); - try { - $gapicClient->deleteLogMetric($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 getLogMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $bucketName = 'bucketName283610048'; - $disabled = true; - $valueExtractor = 'valueExtractor2047672534'; - $expectedResponse = new LogMetric(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setBucketName($bucketName); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setValueExtractor($valueExtractor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); - $request = (new GetLogMetricRequest()) - ->setMetricName($formattedMetricName); - $response = $gapicClient->getLogMetric($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.MetricsServiceV2/GetLogMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getMetricName(); - $this->assertProtobufEquals($formattedMetricName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLogMetricExceptionTest() - { - $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 - $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); - $request = (new GetLogMetricRequest()) - ->setMetricName($formattedMetricName); - try { - $gapicClient->getLogMetric($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 listLogMetricsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $metricsElement = new LogMetric(); - $metrics = [ - $metricsElement, - ]; - $expectedResponse = new ListLogMetricsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setMetrics($metrics); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListLogMetricsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listLogMetrics($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMetrics()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.MetricsServiceV2/ListLogMetrics', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLogMetricsExceptionTest() - { - $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 ListLogMetricsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listLogMetrics($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 updateLogMetricTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $bucketName = 'bucketName283610048'; - $disabled = true; - $valueExtractor = 'valueExtractor2047672534'; - $expectedResponse = new LogMetric(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setBucketName($bucketName); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setValueExtractor($valueExtractor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); - $metric = new LogMetric(); - $metricName = 'metricName-610759589'; - $metric->setName($metricName); - $metricFilter = 'metricFilter1248897352'; - $metric->setFilter($metricFilter); - $request = (new UpdateLogMetricRequest()) - ->setMetricName($formattedMetricName) - ->setMetric($metric); - $response = $gapicClient->updateLogMetric($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.logging.v2.MetricsServiceV2/UpdateLogMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getMetricName(); - $this->assertProtobufEquals($formattedMetricName, $actualValue); - $actualValue = $actualRequestObject->getMetric(); - $this->assertProtobufEquals($metric, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateLogMetricExceptionTest() - { - $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 - $formattedMetricName = $gapicClient->logMetricName('[PROJECT]', '[METRIC]'); - $metric = new LogMetric(); - $metricName = 'metricName-610759589'; - $metric->setName($metricName); - $metricFilter = 'metricFilter1248897352'; - $metric->setFilter($metricFilter); - $request = (new UpdateLogMetricRequest()) - ->setMetricName($formattedMetricName) - ->setMetric($metric); - try { - $gapicClient->updateLogMetric($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 createLogMetricAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $description = 'description-1724546052'; - $filter = 'filter-1274492040'; - $bucketName = 'bucketName283610048'; - $disabled = true; - $valueExtractor = 'valueExtractor2047672534'; - $expectedResponse = new LogMetric(); - $expectedResponse->setName($name); - $expectedResponse->setDescription($description); - $expectedResponse->setFilter($filter); - $expectedResponse->setBucketName($bucketName); - $expectedResponse->setDisabled($disabled); - $expectedResponse->setValueExtractor($valueExtractor); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $metric = new LogMetric(); - $metricName = 'metricName-610759589'; - $metric->setName($metricName); - $metricFilter = 'metricFilter1248897352'; - $metric->setFilter($metricFilter); - $request = (new CreateLogMetricRequest()) - ->setParent($formattedParent) - ->setMetric($metric); - $response = $gapicClient->createLogMetricAsync($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.logging.v2.MetricsServiceV2/CreateLogMetric', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getMetric(); - $this->assertProtobufEquals($metric, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/LongRunning/proto/src/GPBMetadata/Google/Longrunning/Operations.php b/owl-bot-staging/LongRunning/proto/src/GPBMetadata/Google/Longrunning/Operations.php deleted file mode 100644 index 2cb985dc9247..000000000000 --- a/owl-bot-staging/LongRunning/proto/src/GPBMetadata/Google/Longrunning/Operations.php +++ /dev/null @@ -1,31 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x8F\x0E\x0A#google/longrunning/operations.proto\x12\x12google.longrunning\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/protobuf/any.proto\x1A google/protobuf/descriptor.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A\x17google/rpc/status.proto\"\xA8\x01\x0A\x09Operation\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12&\x0A\x08metadata\x18\x02 \x01(\x0B2\x14.google.protobuf.Any\x12\x0C\x0A\x04done\x18\x03 \x01(\x08\x12#\x0A\x05error\x18\x04 \x01(\x0B2\x12.google.rpc.StatusH\x00\x12(\x0A\x08response\x18\x05 \x01(\x0B2\x14.google.protobuf.AnyH\x00B\x08\x0A\x06result\"#\x0A\x13GetOperationRequest\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\"|\x0A\x15ListOperationsRequest\x12\x0C\x0A\x04name\x18\x04 \x01(\x09\x12\x0E\x0A\x06filter\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x1E\x0A\x16return_partial_success\x18\x05 \x01(\x08\"~\x0A\x16ListOperationsResponse\x121\x0A\x0Aoperations\x18\x01 \x03(\x0B2\x1D.google.longrunning.Operation\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x18\x0A\x0Bunreachable\x18\x03 \x03(\x09B\x03\xE0A\x06\"&\x0A\x16CancelOperationRequest\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\"&\x0A\x16DeleteOperationRequest\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\"P\x0A\x14WaitOperationRequest\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12*\x0A\x07timeout\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\"=\x0A\x0DOperationInfo\x12\x15\x0A\x0Dresponse_type\x18\x01 \x01(\x09\x12\x15\x0A\x0Dmetadata_type\x18\x02 \x01(\x092\xAA\x05\x0A\x0AOperations\x12\x94\x01\x0A\x0EListOperations\x12).google.longrunning.ListOperationsRequest\x1A*.google.longrunning.ListOperationsResponse\"+\xDAA\x0Bname,filter\x82\xD3\xE4\x93\x02\x17\x12\x15/v1/{name=operations}\x12\x7F\x0A\x0CGetOperation\x12'.google.longrunning.GetOperationRequest\x1A\x1D.google.longrunning.Operation\"'\xDAA\x04name\x82\xD3\xE4\x93\x02\x1A\x12\x18/v1/{name=operations/**}\x12~\x0A\x0FDeleteOperation\x12*.google.longrunning.DeleteOperationRequest\x1A\x16.google.protobuf.Empty\"'\xDAA\x04name\x82\xD3\xE4\x93\x02\x1A*\x18/v1/{name=operations/**}\x12\x88\x01\x0A\x0FCancelOperation\x12*.google.longrunning.CancelOperationRequest\x1A\x16.google.protobuf.Empty\"1\xDAA\x04name\x82\xD3\xE4\x93\x02\$\"\x1F/v1/{name=operations/**}:cancel:\x01*\x12Z\x0A\x0DWaitOperation\x12(.google.longrunning.WaitOperationRequest\x1A\x1D.google.longrunning.Operation\"\x00\x1A\x1D\xCAA\x1Alongrunning.googleapis.comB\xA2\x01\x0A\x16com.google.longrunningB\x0FOperationsProtoP\x01ZCcloud.google.com/go/longrunning/autogen/longrunningpb;longrunningpb\xA2\x02\x05GLRUN\xAA\x02\x12Google.LongRunning\xCA\x02\x12Google\\LongRunningb\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/CancelOperationRequest.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/CancelOperationRequest.php deleted file mode 100644 index 58790425ede5..000000000000 --- a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/CancelOperationRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.longrunning.CancelOperationRequest - */ -class CancelOperationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the operation resource to be cancelled. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - - /** - * @param string $name The name of the operation resource to be cancelled. - * - * @return \Google\LongRunning\CancelOperationRequest - * - * @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 - * The name of the operation resource to be cancelled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Longrunning\Operations::initOnce(); - parent::__construct($data); - } - - /** - * The name of the operation resource to be cancelled. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the operation resource to be cancelled. - * - * 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; - } - -} - diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/DeleteOperationRequest.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/DeleteOperationRequest.php deleted file mode 100644 index 59dd77e6b61f..000000000000 --- a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/DeleteOperationRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.longrunning.DeleteOperationRequest - */ -class DeleteOperationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the operation resource to be deleted. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - - /** - * @param string $name The name of the operation resource to be deleted. - * - * @return \Google\LongRunning\DeleteOperationRequest - * - * @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 - * The name of the operation resource to be deleted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Longrunning\Operations::initOnce(); - parent::__construct($data); - } - - /** - * The name of the operation resource to be deleted. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the operation resource to be deleted. - * - * 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; - } - -} - diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/GetOperationRequest.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/GetOperationRequest.php deleted file mode 100644 index 53dfb8b5e851..000000000000 --- a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/GetOperationRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.longrunning.GetOperationRequest - */ -class GetOperationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the operation resource. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - - /** - * @param string $name The name of the operation resource. - * - * @return \Google\LongRunning\GetOperationRequest - * - * @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 - * The name of the operation resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Longrunning\Operations::initOnce(); - parent::__construct($data); - } - - /** - * The name of the operation resource. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the operation resource. - * - * 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; - } - -} - diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsRequest.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsRequest.php deleted file mode 100644 index 6abe7bd540ca..000000000000 --- a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsRequest.php +++ /dev/null @@ -1,247 +0,0 @@ -google.longrunning.ListOperationsRequest - */ -class ListOperationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the operation's parent resource. - * - * Generated from protobuf field string name = 4; - */ - protected $name = ''; - /** - * The standard list filter. - * - * Generated from protobuf field string filter = 1; - */ - protected $filter = ''; - /** - * The standard list page size. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The standard list page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * When set to `true`, operations that are reachable are returned as normal, - * and those that are unreachable are returned in the - * [ListOperationsResponse.unreachable] field. - * This can only be `true` when reading across collections e.g. when `parent` - * is set to `"projects/example/locations/-"`. - * This field is not by default supported and will result in an - * `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - * service or product specific documentation. - * - * Generated from protobuf field bool return_partial_success = 5; - */ - protected $return_partial_success = false; - - /** - * @param string $name The name of the operation's parent resource. - * @param string $filter The standard list filter. - * - * @return \Google\LongRunning\ListOperationsRequest - * - * @experimental - */ - public static function build(string $name, string $filter): self - { - return (new self()) - ->setName($name) - ->setFilter($filter); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the operation's parent resource. - * @type string $filter - * The standard list filter. - * @type int $page_size - * The standard list page size. - * @type string $page_token - * The standard list page token. - * @type bool $return_partial_success - * When set to `true`, operations that are reachable are returned as normal, - * and those that are unreachable are returned in the - * [ListOperationsResponse.unreachable] field. - * This can only be `true` when reading across collections e.g. when `parent` - * is set to `"projects/example/locations/-"`. - * This field is not by default supported and will result in an - * `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - * service or product specific documentation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Longrunning\Operations::initOnce(); - parent::__construct($data); - } - - /** - * The name of the operation's parent resource. - * - * Generated from protobuf field string name = 4; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the operation's parent resource. - * - * Generated from protobuf field string name = 4; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The standard list filter. - * - * Generated from protobuf field string filter = 1; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The standard list filter. - * - * Generated from protobuf field string filter = 1; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The standard list page size. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The standard list page size. - * - * 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 standard list page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The standard list page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * When set to `true`, operations that are reachable are returned as normal, - * and those that are unreachable are returned in the - * [ListOperationsResponse.unreachable] field. - * This can only be `true` when reading across collections e.g. when `parent` - * is set to `"projects/example/locations/-"`. - * This field is not by default supported and will result in an - * `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - * service or product specific documentation. - * - * Generated from protobuf field bool return_partial_success = 5; - * @return bool - */ - public function getReturnPartialSuccess() - { - return $this->return_partial_success; - } - - /** - * When set to `true`, operations that are reachable are returned as normal, - * and those that are unreachable are returned in the - * [ListOperationsResponse.unreachable] field. - * This can only be `true` when reading across collections e.g. when `parent` - * is set to `"projects/example/locations/-"`. - * This field is not by default supported and will result in an - * `UNIMPLEMENTED` error if set unless explicitly documented otherwise in - * service or product specific documentation. - * - * Generated from protobuf field bool return_partial_success = 5; - * @param bool $var - * @return $this - */ - public function setReturnPartialSuccess($var) - { - GPBUtil::checkBool($var); - $this->return_partial_success = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsResponse.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsResponse.php deleted file mode 100644 index 7aa1348e9916..000000000000 --- a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/ListOperationsResponse.php +++ /dev/null @@ -1,148 +0,0 @@ -google.longrunning.ListOperationsResponse - */ -class ListOperationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of operations that matches the specified filter in the request. - * - * Generated from protobuf field repeated .google.longrunning.Operation operations = 1; - */ - private $operations; - /** - * The standard List next-page token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Unordered list. Unreachable resources. Populated when the request sets - * `ListOperationsRequest.return_partial_success` and reads across - * collections e.g. when attempting to list all resources across all supported - * locations. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\LongRunning\Operation[] $operations - * A list of operations that matches the specified filter in the request. - * @type string $next_page_token - * The standard List next-page token. - * @type string[] $unreachable - * Unordered list. Unreachable resources. Populated when the request sets - * `ListOperationsRequest.return_partial_success` and reads across - * collections e.g. when attempting to list all resources across all supported - * locations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Longrunning\Operations::initOnce(); - parent::__construct($data); - } - - /** - * A list of operations that matches the specified filter in the request. - * - * Generated from protobuf field repeated .google.longrunning.Operation operations = 1; - * @return RepeatedField<\Google\LongRunning\Operation> - */ - public function getOperations() - { - return $this->operations; - } - - /** - * A list of operations that matches the specified filter in the request. - * - * Generated from protobuf field repeated .google.longrunning.Operation operations = 1; - * @param \Google\LongRunning\Operation[] $var - * @return $this - */ - public function setOperations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\LongRunning\Operation::class); - $this->operations = $arr; - - return $this; - } - - /** - * The standard List next-page token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The standard List next-page token. - * - * 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; - } - - /** - * Unordered list. Unreachable resources. Populated when the request sets - * `ListOperationsRequest.return_partial_success` and reads across - * collections e.g. when attempting to list all resources across all supported - * locations. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Unordered list. Unreachable resources. Populated when the request sets - * `ListOperationsRequest.return_partial_success` and reads across - * collections e.g. when attempting to list all resources across all supported - * locations. - * - * Generated from protobuf field repeated string unreachable = 3 [(.google.api.field_behavior) = UNORDERED_LIST]; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/Operation.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/Operation.php deleted file mode 100644 index 4bb21f0edac0..000000000000 --- a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/Operation.php +++ /dev/null @@ -1,270 +0,0 @@ -google.longrunning.Operation - */ -class Operation extends \Google\Protobuf\Internal\Message -{ - /** - * The server-assigned name, which is only unique within the same service that - * originally returns it. If you use the default HTTP mapping, the - * `name` should be a resource name ending with `operations/{unique_id}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Service-specific metadata associated with the operation. It typically - * contains progress information and common metadata such as create time. - * Some services might not provide such metadata. Any method that returns a - * long-running operation should document the metadata type, if any. - * - * Generated from protobuf field .google.protobuf.Any metadata = 2; - */ - protected $metadata = null; - /** - * If the value is `false`, it means the operation is still in progress. - * If `true`, the operation is completed, and either `error` or `response` is - * available. - * - * Generated from protobuf field bool done = 3; - */ - protected $done = false; - protected $result; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The server-assigned name, which is only unique within the same service that - * originally returns it. If you use the default HTTP mapping, the - * `name` should be a resource name ending with `operations/{unique_id}`. - * @type \Google\Protobuf\Any $metadata - * Service-specific metadata associated with the operation. It typically - * contains progress information and common metadata such as create time. - * Some services might not provide such metadata. Any method that returns a - * long-running operation should document the metadata type, if any. - * @type bool $done - * If the value is `false`, it means the operation is still in progress. - * If `true`, the operation is completed, and either `error` or `response` is - * available. - * @type \Google\Rpc\Status $error - * The error result of the operation in case of failure or cancellation. - * @type \Google\Protobuf\Any $response - * The normal, successful response of the operation. If the original - * method returns no data on success, such as `Delete`, the response is - * `google.protobuf.Empty`. If the original method is standard - * `Get`/`Create`/`Update`, the response should be the resource. For other - * methods, the response should have the type `XxxResponse`, where `Xxx` - * is the original method name. For example, if the original method name - * is `TakeSnapshot()`, the inferred response type is - * `TakeSnapshotResponse`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Longrunning\Operations::initOnce(); - parent::__construct($data); - } - - /** - * The server-assigned name, which is only unique within the same service that - * originally returns it. If you use the default HTTP mapping, the - * `name` should be a resource name ending with `operations/{unique_id}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The server-assigned name, which is only unique within the same service that - * originally returns it. If you use the default HTTP mapping, the - * `name` should be a resource name ending with `operations/{unique_id}`. - * - * 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; - } - - /** - * Service-specific metadata associated with the operation. It typically - * contains progress information and common metadata such as create time. - * Some services might not provide such metadata. Any method that returns a - * long-running operation should document the metadata type, if any. - * - * Generated from protobuf field .google.protobuf.Any metadata = 2; - * @return \Google\Protobuf\Any|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Service-specific metadata associated with the operation. It typically - * contains progress information and common metadata such as create time. - * Some services might not provide such metadata. Any method that returns a - * long-running operation should document the metadata type, if any. - * - * Generated from protobuf field .google.protobuf.Any metadata = 2; - * @param \Google\Protobuf\Any $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); - $this->metadata = $var; - - return $this; - } - - /** - * If the value is `false`, it means the operation is still in progress. - * If `true`, the operation is completed, and either `error` or `response` is - * available. - * - * Generated from protobuf field bool done = 3; - * @return bool - */ - public function getDone() - { - return $this->done; - } - - /** - * If the value is `false`, it means the operation is still in progress. - * If `true`, the operation is completed, and either `error` or `response` is - * available. - * - * Generated from protobuf field bool done = 3; - * @param bool $var - * @return $this - */ - public function setDone($var) - { - GPBUtil::checkBool($var); - $this->done = $var; - - return $this; - } - - /** - * The error result of the operation in case of failure or cancellation. - * - * Generated from protobuf field .google.rpc.Status error = 4; - * @return \Google\Rpc\Status|null - */ - public function getError() - { - return $this->readOneof(4); - } - - public function hasError() - { - return $this->hasOneof(4); - } - - /** - * The error result of the operation in case of failure or cancellation. - * - * Generated from protobuf field .google.rpc.Status error = 4; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setError($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * The normal, successful response of the operation. If the original - * method returns no data on success, such as `Delete`, the response is - * `google.protobuf.Empty`. If the original method is standard - * `Get`/`Create`/`Update`, the response should be the resource. For other - * methods, the response should have the type `XxxResponse`, where `Xxx` - * is the original method name. For example, if the original method name - * is `TakeSnapshot()`, the inferred response type is - * `TakeSnapshotResponse`. - * - * Generated from protobuf field .google.protobuf.Any response = 5; - * @return \Google\Protobuf\Any|null - */ - public function getResponse() - { - return $this->readOneof(5); - } - - public function hasResponse() - { - return $this->hasOneof(5); - } - - /** - * The normal, successful response of the operation. If the original - * method returns no data on success, such as `Delete`, the response is - * `google.protobuf.Empty`. If the original method is standard - * `Get`/`Create`/`Update`, the response should be the resource. For other - * methods, the response should have the type `XxxResponse`, where `Xxx` - * is the original method name. For example, if the original method name - * is `TakeSnapshot()`, the inferred response type is - * `TakeSnapshotResponse`. - * - * Generated from protobuf field .google.protobuf.Any response = 5; - * @param \Google\Protobuf\Any $var - * @return $this - */ - public function setResponse($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * @return string - */ - public function getResult() - { - return $this->whichOneof("result"); - } - -} - diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/OperationInfo.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/OperationInfo.php deleted file mode 100644 index e8d2bb3398a3..000000000000 --- a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/OperationInfo.php +++ /dev/null @@ -1,144 +0,0 @@ -google.longrunning.OperationInfo - */ -class OperationInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The message name of the primary return type for this - * long-running operation. - * This type will be used to deserialize the LRO's response. - * If the response is in a different package from the rpc, a fully-qualified - * message name must be used (e.g. `google.protobuf.Struct`). - * Note: Altering this value constitutes a breaking change. - * - * Generated from protobuf field string response_type = 1; - */ - protected $response_type = ''; - /** - * Required. The message name of the metadata type for this long-running - * operation. - * If the response is in a different package from the rpc, a fully-qualified - * message name must be used (e.g. `google.protobuf.Struct`). - * Note: Altering this value constitutes a breaking change. - * - * Generated from protobuf field string metadata_type = 2; - */ - protected $metadata_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $response_type - * Required. The message name of the primary return type for this - * long-running operation. - * This type will be used to deserialize the LRO's response. - * If the response is in a different package from the rpc, a fully-qualified - * message name must be used (e.g. `google.protobuf.Struct`). - * Note: Altering this value constitutes a breaking change. - * @type string $metadata_type - * Required. The message name of the metadata type for this long-running - * operation. - * If the response is in a different package from the rpc, a fully-qualified - * message name must be used (e.g. `google.protobuf.Struct`). - * Note: Altering this value constitutes a breaking change. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Longrunning\Operations::initOnce(); - parent::__construct($data); - } - - /** - * Required. The message name of the primary return type for this - * long-running operation. - * This type will be used to deserialize the LRO's response. - * If the response is in a different package from the rpc, a fully-qualified - * message name must be used (e.g. `google.protobuf.Struct`). - * Note: Altering this value constitutes a breaking change. - * - * Generated from protobuf field string response_type = 1; - * @return string - */ - public function getResponseType() - { - return $this->response_type; - } - - /** - * Required. The message name of the primary return type for this - * long-running operation. - * This type will be used to deserialize the LRO's response. - * If the response is in a different package from the rpc, a fully-qualified - * message name must be used (e.g. `google.protobuf.Struct`). - * Note: Altering this value constitutes a breaking change. - * - * Generated from protobuf field string response_type = 1; - * @param string $var - * @return $this - */ - public function setResponseType($var) - { - GPBUtil::checkString($var, True); - $this->response_type = $var; - - return $this; - } - - /** - * Required. The message name of the metadata type for this long-running - * operation. - * If the response is in a different package from the rpc, a fully-qualified - * message name must be used (e.g. `google.protobuf.Struct`). - * Note: Altering this value constitutes a breaking change. - * - * Generated from protobuf field string metadata_type = 2; - * @return string - */ - public function getMetadataType() - { - return $this->metadata_type; - } - - /** - * Required. The message name of the metadata type for this long-running - * operation. - * If the response is in a different package from the rpc, a fully-qualified - * message name must be used (e.g. `google.protobuf.Struct`). - * Note: Altering this value constitutes a breaking change. - * - * Generated from protobuf field string metadata_type = 2; - * @param string $var - * @return $this - */ - public function setMetadataType($var) - { - GPBUtil::checkString($var, True); - $this->metadata_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/WaitOperationRequest.php b/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/WaitOperationRequest.php deleted file mode 100644 index 957fff8419e3..000000000000 --- a/owl-bot-staging/LongRunning/proto/src/Google/LongRunning/WaitOperationRequest.php +++ /dev/null @@ -1,120 +0,0 @@ -google.longrunning.WaitOperationRequest - */ -class WaitOperationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the operation resource to wait on. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The maximum duration to wait before timing out. If left blank, the wait - * will be at most the time permitted by the underlying HTTP/RPC protocol. - * If RPC context deadline is also specified, the shorter one will be used. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 2; - */ - protected $timeout = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the operation resource to wait on. - * @type \Google\Protobuf\Duration $timeout - * The maximum duration to wait before timing out. If left blank, the wait - * will be at most the time permitted by the underlying HTTP/RPC protocol. - * If RPC context deadline is also specified, the shorter one will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Longrunning\Operations::initOnce(); - parent::__construct($data); - } - - /** - * The name of the operation resource to wait on. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the operation resource to wait on. - * - * 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 maximum duration to wait before timing out. If left blank, the wait - * will be at most the time permitted by the underlying HTTP/RPC protocol. - * If RPC context deadline is also specified, the shorter one will be used. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getTimeout() - { - return $this->timeout; - } - - public function hasTimeout() - { - return isset($this->timeout); - } - - public function clearTimeout() - { - unset($this->timeout); - } - - /** - * The maximum duration to wait before timing out. If left blank, the wait - * will be at most the time permitted by the underlying HTTP/RPC protocol. - * If RPC context deadline is also specified, the shorter one will be used. - * - * Generated from protobuf field .google.protobuf.Duration timeout = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTimeout($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->timeout = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/LongRunning/src/LongRunning/Client/OperationsClient.php b/owl-bot-staging/LongRunning/src/LongRunning/Client/OperationsClient.php deleted file mode 100644 index 787a39443797..000000000000 --- a/owl-bot-staging/LongRunning/src/LongRunning/Client/OperationsClient.php +++ /dev/null @@ -1,344 +0,0 @@ - cancelOperationAsync(CancelOperationRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteOperationAsync(DeleteOperationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getOperationAsync(GetOperationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listOperationsAsync(ListOperationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface waitOperationAsync(WaitOperationRequest $request, array $optionalArgs = []) - */ -final class OperationsClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.longrunning.Operations'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'longrunning.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'longrunning.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = []; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/operations_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/operations_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/operations_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/operations_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'longrunning.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\LongRunning\OperationsClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new OperationsClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Starts asynchronous cancellation on a long-running operation. The server - * makes a best effort to cancel the operation, but success is not - * guaranteed. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. Clients can use - * [Operations.GetOperation][google.longrunning.Operations.GetOperation] or - * other methods to check whether the cancellation succeeded or whether the - * operation completed despite cancellation. On successful cancellation, - * the operation is not deleted; instead, it becomes an operation with - * an [Operation.error][google.longrunning.Operation.error] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of `1`, corresponding to - * `Code.CANCELLED`. - * - * The async variant is {@see OperationsClient::cancelOperationAsync()} . - * - * @example samples/OperationsClient/cancel_operation.php - * - * @param CancelOperationRequest $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 cancelOperation(CancelOperationRequest $request, array $callOptions = []): void - { - $this->startApiCall('CancelOperation', $request, $callOptions)->wait(); - } - - /** - * Deletes a long-running operation. This method indicates that the client is - * no longer interested in the operation result. It does not cancel the - * operation. If the server doesn't support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * - * The async variant is {@see OperationsClient::deleteOperationAsync()} . - * - * @example samples/OperationsClient/delete_operation.php - * - * @param DeleteOperationRequest $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 deleteOperation(DeleteOperationRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteOperation', $request, $callOptions)->wait(); - } - - /** - * Gets the latest state of a long-running operation. Clients can use this - * method to poll the operation result at intervals as recommended by the API - * service. - * - * The async variant is {@see OperationsClient::getOperationAsync()} . - * - * @example samples/OperationsClient/get_operation.php - * - * @param GetOperationRequest $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 Operation - * - * @throws ApiException Thrown if the API call fails. - */ - public function getOperation(GetOperationRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('GetOperation', $request, $callOptions)->wait(); - } - - /** - * Lists operations that match the specified filter in the request. If the - * server doesn't support this method, it returns `UNIMPLEMENTED`. - * - * The async variant is {@see OperationsClient::listOperationsAsync()} . - * - * @example samples/OperationsClient/list_operations.php - * - * @param ListOperationsRequest $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 listOperations(ListOperationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListOperations', $request, $callOptions); - } - - /** - * Waits until the specified long-running operation is done or reaches at most - * a specified timeout, returning the latest state. If the operation is - * already done, the latest state is immediately returned. If the timeout - * specified is greater than the default HTTP/RPC timeout, the HTTP/RPC - * timeout is used. If the server does not support this method, it returns - * `google.rpc.Code.UNIMPLEMENTED`. - * Note that this method is on a best-effort basis. It may return the latest - * state before the specified timeout (including immediately), meaning even an - * immediate response is no guarantee that the operation is done. - * - * The async variant is {@see OperationsClient::waitOperationAsync()} . - * - * @example samples/OperationsClient/wait_operation.php - * - * @param WaitOperationRequest $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 Operation - * - * @throws ApiException Thrown if the API call fails. - */ - public function waitOperation(WaitOperationRequest $request, array $callOptions = []): Operation - { - return $this->startApiCall('WaitOperation', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/LongRunning/src/LongRunning/gapic_metadata.json b/owl-bot-staging/LongRunning/src/LongRunning/gapic_metadata.json deleted file mode 100644 index f31c63933dd7..000000000000 --- a/owl-bot-staging/LongRunning/src/LongRunning/gapic_metadata.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.longrunning", - "libraryPackage": "Google\\LongRunning", - "services": { - "Operations": { - "clients": { - "grpc": { - "libraryClient": "OperationsGapicClient", - "rpcs": { - "CancelOperation": { - "methods": [ - "cancelOperation" - ] - }, - "DeleteOperation": { - "methods": [ - "deleteOperation" - ] - }, - "GetOperation": { - "methods": [ - "getOperation" - ] - }, - "ListOperations": { - "methods": [ - "listOperations" - ] - }, - "WaitOperation": { - "methods": [ - "waitOperation" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_client_config.json b/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_client_config.json deleted file mode 100644 index cbc0a41eb225..000000000000 --- a/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_client_config.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "interfaces": { - "google.longrunning.Operations": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 500, - "retry_delay_multiplier": 2.0, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 10000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 10000, - "total_timeout_millis": 10000 - } - }, - "methods": { - "CancelOperation": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteOperation": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetOperation": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListOperations": { - "timeout_millis": 10000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "WaitOperation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_descriptor_config.php b/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_descriptor_config.php deleted file mode 100644 index 8f47a3a01c5f..000000000000 --- a/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_descriptor_config.php +++ /dev/null @@ -1,88 +0,0 @@ - [ - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\LongRunning\Operation', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getOperations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\LongRunning\ListOperationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'WaitOperation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\LongRunning\Operation', - ], - ], - ], -]; diff --git a/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_rest_client_config.php b/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_rest_client_config.php deleted file mode 100644 index f87ce69e0b6f..000000000000 --- a/owl-bot-staging/LongRunning/src/LongRunning/resources/operations_rest_client_config.php +++ /dev/null @@ -1,76 +0,0 @@ - [ - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=operations/**}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=operations/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=operations/**}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=operations}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - 'queryParams' => [ - 'filter', - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/LongRunning/tests/Unit/Client/OperationsClientTest.php b/owl-bot-staging/LongRunning/tests/Unit/Client/OperationsClientTest.php deleted file mode 100644 index 3a3319d7a627..000000000000 --- a/owl-bot-staging/LongRunning/tests/Unit/Client/OperationsClientTest.php +++ /dev/null @@ -1,418 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return OperationsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new OperationsClient($options); - } - - /** @test */ - public function cancelOperationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new CancelOperationRequest()) - ->setName($name); - $gapicClient->cancelOperation($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/CancelOperation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function cancelOperationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new CancelOperationRequest()) - ->setName($name); - try { - $gapicClient->cancelOperation($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 deleteOperationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new DeleteOperationRequest()) - ->setName($name); - $gapicClient->deleteOperation($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/DeleteOperation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteOperationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new DeleteOperationRequest()) - ->setName($name); - try { - $gapicClient->deleteOperation($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 getOperationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $done = true; - $expectedResponse = new Operation(); - $expectedResponse->setName($name2); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new GetOperationRequest()) - ->setName($name); - $response = $gapicClient->getOperation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOperationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $name = 'name3373707'; - $request = (new GetOperationRequest()) - ->setName($name); - try { - $gapicClient->getOperation($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 listOperationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $operationsElement = new Operation(); - $operations = [ - $operationsElement, - ]; - $expectedResponse = new ListOperationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setOperations($operations); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $filter = 'filter-1274492040'; - $request = (new ListOperationsRequest()) - ->setName($name) - ->setFilter($filter); - $response = $gapicClient->listOperations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getOperations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/ListOperations', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getFilter(); - $this->assertProtobufEquals($filter, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOperationsExceptionTest() - { - $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'; - $filter = 'filter-1274492040'; - $request = (new ListOperationsRequest()) - ->setName($name) - ->setFilter($filter); - try { - $gapicClient->listOperations($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 waitOperationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $done = true; - $expectedResponse = new Operation(); - $expectedResponse->setName($name2); - $expectedResponse->setDone($done); - $transport->addResponse($expectedResponse); - $request = new WaitOperationRequest(); - $response = $gapicClient->waitOperation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/WaitOperation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function waitOperationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new WaitOperationRequest(); - try { - $gapicClient->waitOperation($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 cancelOperationAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new CancelOperationRequest()) - ->setName($name); - $gapicClient->cancelOperationAsync($request)->wait(); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/CancelOperation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Trace/v1/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V1/Trace.php b/owl-bot-staging/Trace/v1/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V1/Trace.php deleted file mode 100644 index b8149934a377..000000000000 --- a/owl-bot-staging/Trace/v1/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V1/Trace.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x9A\x12\x0A)google/devtools/cloudtrace/v1/trace.proto\x12\x1Dgoogle.devtools.cloudtrace.v1\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Cgoogle/api/annotations.proto\"f\x0A\x05Trace\x12\x12\x0A\x0Aproject_id\x18\x01 \x01(\x09\x12\x10\x0A\x08trace_id\x18\x02 \x01(\x09\x127\x0A\x05spans\x18\x03 \x03(\x0B2(.google.devtools.cloudtrace.v1.TraceSpan\">\x0A\x06Traces\x124\x0A\x06traces\x18\x01 \x03(\x0B2\$.google.devtools.cloudtrace.v1.Trace\"\xA2\x03\x0A\x09TraceSpan\x12\x0F\x0A\x07span_id\x18\x01 \x01(\x06\x12?\x0A\x04kind\x18\x02 \x01(\x0E21.google.devtools.cloudtrace.v1.TraceSpan.SpanKind\x12\x0C\x0A\x04name\x18\x03 \x01(\x09\x12.\x0A\x0Astart_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x1B\x0A\x0Eparent_span_id\x18\x06 \x01(\x06B\x03\xE0A\x01\x12D\x0A\x06labels\x18\x07 \x03(\x0B24.google.devtools.cloudtrace.v1.TraceSpan.LabelsEntry\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"E\x0A\x08SpanKind\x12\x19\x0A\x15SPAN_KIND_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0ARPC_SERVER\x10\x01\x12\x0E\x0A\x0ARPC_CLIENT\x10\x02\"\x80\x03\x0A\x11ListTracesRequest\x12\x17\x0A\x0Aproject_id\x18\x01 \x01(\x09B\x03\xE0A\x02\x12L\x0A\x04view\x18\x02 \x01(\x0E29.google.devtools.cloudtrace.v1.ListTracesRequest.ViewTypeB\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\x12\x12\x0A\x0Apage_token\x18\x04 \x01(\x09\x12.\x0A\x0Astart_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x13\x0A\x06filter\x18\x07 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08order_by\x18\x08 \x01(\x09B\x03\xE0A\x01\"N\x0A\x08ViewType\x12\x19\x0A\x15VIEW_TYPE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07MINIMAL\x10\x01\x12\x0C\x0A\x08ROOTSPAN\x10\x02\x12\x0C\x0A\x08COMPLETE\x10\x03\"c\x0A\x12ListTracesResponse\x124\x0A\x06traces\x18\x01 \x03(\x0B2\$.google.devtools.cloudtrace.v1.Trace\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"A\x0A\x0FGetTraceRequest\x12\x17\x0A\x0Aproject_id\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x15\x0A\x08trace_id\x18\x02 \x01(\x09B\x03\xE0A\x02\"i\x0A\x12PatchTracesRequest\x12\x17\x0A\x0Aproject_id\x18\x01 \x01(\x09B\x03\xE0A\x02\x12:\x0A\x06traces\x18\x02 \x01(\x0B2%.google.devtools.cloudtrace.v1.TracesB\x03\xE0A\x022\xB5\x05\x0A\x0CTraceService\x12\xA8\x01\x0A\x0AListTraces\x120.google.devtools.cloudtrace.v1.ListTracesRequest\x1A1.google.devtools.cloudtrace.v1.ListTracesResponse\"5\xDAA\x0Aproject_id\x82\xD3\xE4\x93\x02\"\x12 /v1/projects/{project_id}/traces\x12\xAB\x01\x0A\x08GetTrace\x12..google.devtools.cloudtrace.v1.GetTraceRequest\x1A\$.google.devtools.cloudtrace.v1.Trace\"I\xDAA\x13project_id,trace_id\x82\xD3\xE4\x93\x02-\x12+/v1/projects/{project_id}/traces/{trace_id}\x12\x9E\x01\x0A\x0BPatchTraces\x121.google.devtools.cloudtrace.v1.PatchTracesRequest\x1A\x16.google.protobuf.Empty\"D\xDAA\x11project_id,traces\x82\xD3\xE4\x93\x02*2 /v1/projects/{project_id}/traces:\x06traces\x1A\xAA\x01\xCAA\x19cloudtrace.googleapis.com\xD2A\x8A\x01https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/trace.append,https://www.googleapis.com/auth/trace.readonlyB\xAD\x01\x0A!com.google.devtools.cloudtrace.v1B\x0ATraceProtoP\x01Z/cloud.google.com/go/trace/apiv1/tracepb;tracepb\xAA\x02\x15Google.Cloud.Trace.V1\xCA\x02\x15Google\\Cloud\\Trace\\V1\xEA\x02\x18Google::Cloud::Trace::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/GetTraceRequest.php b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/GetTraceRequest.php deleted file mode 100644 index f019550cf21a..000000000000 --- a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/GetTraceRequest.php +++ /dev/null @@ -1,116 +0,0 @@ -google.devtools.cloudtrace.v1.GetTraceRequest - */ -class GetTraceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. ID of the trace to return. - * - * Generated from protobuf field string trace_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $trace_id = ''; - - /** - * @param string $projectId Required. ID of the Cloud project where the trace data is stored. - * @param string $traceId Required. ID of the trace to return. - * - * @return \Google\Cloud\Trace\V1\GetTraceRequest - * - * @experimental - */ - public static function build(string $projectId, string $traceId): self - { - return (new self()) - ->setProjectId($projectId) - ->setTraceId($traceId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. ID of the Cloud project where the trace data is stored. - * @type string $trace_id - * Required. ID of the trace to return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Required. ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. ID of the trace to return. - * - * Generated from protobuf field string trace_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getTraceId() - { - return $this->trace_id; - } - - /** - * Required. ID of the trace to return. - * - * Generated from protobuf field string trace_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setTraceId($var) - { - GPBUtil::checkString($var, True); - $this->trace_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest.php b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest.php deleted file mode 100644 index 4d9925cffdf9..000000000000 --- a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest.php +++ /dev/null @@ -1,507 +0,0 @@ -google.devtools.cloudtrace.v1.ListTracesRequest - */ -class ListTracesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Optional. Type of data returned for traces in the list. Default is - * `MINIMAL`. - * - * Generated from protobuf field .google.devtools.cloudtrace.v1.ListTracesRequest.ViewType view = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $view = 0; - /** - * Optional. Maximum number of traces to return. If not specified or <= 0, the - * implementation selects a reasonable value. The implementation may - * return fewer traces than the requested page size. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Token identifying the page of results to return. If provided, use the - * value of the `next_page_token` field from a previous request. - * - * Generated from protobuf field string page_token = 4; - */ - protected $page_token = ''; - /** - * Start of the time interval (inclusive) during which the trace data was - * collected from the application. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; - */ - protected $start_time = null; - /** - * End of the time interval (inclusive) during which the trace data was - * collected from the application. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - */ - protected $end_time = null; - /** - * Optional. A filter against labels for the request. - * By default, searches use prefix matching. To specify exact match, prepend - * a plus symbol (`+`) to the search term. - * Multiple terms are ANDed. Syntax: - * * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root - * span starts with `NAME_PREFIX`. - * * `+root:NAME` or `+NAME`: Return traces where any root span's name is - * exactly `NAME`. - * * `span:NAME_PREFIX`: Return traces where any span starts with - * `NAME_PREFIX`. - * * `+span:NAME`: Return traces where any span's name is exactly - * `NAME`. - * * `latency:DURATION`: Return traces whose overall latency is - * greater or equal to than `DURATION`. Accepted units are nanoseconds - * (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For - * example, `latency:24ms` returns traces whose overall latency - * is greater than or equal to 24 milliseconds. - * * `label:LABEL_KEY`: Return all traces containing the specified - * label key (exact match, case-sensitive) regardless of the key:value - * pair's value (including empty values). - * * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified - * label key (exact match, case-sensitive) whose value starts with - * `VALUE_PREFIX`. Both a key and a value must be specified. - * * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair - * exactly matching the specified text. Both a key and a value must be - * specified. - * * `method:VALUE`: Equivalent to `/http/method:VALUE`. - * * `url:VALUE`: Equivalent to `/http/url:VALUE`. - * - * Generated from protobuf field string filter = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Field used to sort the returned traces. - * Can be one of the following: - * * `trace_id` - * * `name` (`name` field of root span in the trace) - * * `duration` (difference between `end_time` and `start_time` fields of - * the root span) - * * `start` (`start_time` field of the root span) - * Descending order can be specified by appending `desc` to the sort field - * (for example, `name desc`). - * Only one sort field is permitted. - * - * Generated from protobuf field string order_by = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * @param string $projectId Required. ID of the Cloud project where the trace data is stored. - * - * @return \Google\Cloud\Trace\V1\ListTracesRequest - * - * @experimental - */ - public static function build(string $projectId): self - { - return (new self()) - ->setProjectId($projectId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. ID of the Cloud project where the trace data is stored. - * @type int $view - * Optional. Type of data returned for traces in the list. Default is - * `MINIMAL`. - * @type int $page_size - * Optional. Maximum number of traces to return. If not specified or <= 0, the - * implementation selects a reasonable value. The implementation may - * return fewer traces than the requested page size. - * @type string $page_token - * Token identifying the page of results to return. If provided, use the - * value of the `next_page_token` field from a previous request. - * @type \Google\Protobuf\Timestamp $start_time - * Start of the time interval (inclusive) during which the trace data was - * collected from the application. - * @type \Google\Protobuf\Timestamp $end_time - * End of the time interval (inclusive) during which the trace data was - * collected from the application. - * @type string $filter - * Optional. A filter against labels for the request. - * By default, searches use prefix matching. To specify exact match, prepend - * a plus symbol (`+`) to the search term. - * Multiple terms are ANDed. Syntax: - * * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root - * span starts with `NAME_PREFIX`. - * * `+root:NAME` or `+NAME`: Return traces where any root span's name is - * exactly `NAME`. - * * `span:NAME_PREFIX`: Return traces where any span starts with - * `NAME_PREFIX`. - * * `+span:NAME`: Return traces where any span's name is exactly - * `NAME`. - * * `latency:DURATION`: Return traces whose overall latency is - * greater or equal to than `DURATION`. Accepted units are nanoseconds - * (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For - * example, `latency:24ms` returns traces whose overall latency - * is greater than or equal to 24 milliseconds. - * * `label:LABEL_KEY`: Return all traces containing the specified - * label key (exact match, case-sensitive) regardless of the key:value - * pair's value (including empty values). - * * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified - * label key (exact match, case-sensitive) whose value starts with - * `VALUE_PREFIX`. Both a key and a value must be specified. - * * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair - * exactly matching the specified text. Both a key and a value must be - * specified. - * * `method:VALUE`: Equivalent to `/http/method:VALUE`. - * * `url:VALUE`: Equivalent to `/http/url:VALUE`. - * @type string $order_by - * Optional. Field used to sort the returned traces. - * Can be one of the following: - * * `trace_id` - * * `name` (`name` field of root span in the trace) - * * `duration` (difference between `end_time` and `start_time` fields of - * the root span) - * * `start` (`start_time` field of the root span) - * Descending order can be specified by appending `desc` to the sort field - * (for example, `name desc`). - * Only one sort field is permitted. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Required. ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Optional. Type of data returned for traces in the list. Default is - * `MINIMAL`. - * - * Generated from protobuf field .google.devtools.cloudtrace.v1.ListTracesRequest.ViewType view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getView() - { - return $this->view; - } - - /** - * Optional. Type of data returned for traces in the list. Default is - * `MINIMAL`. - * - * Generated from protobuf field .google.devtools.cloudtrace.v1.ListTracesRequest.ViewType view = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setView($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Trace\V1\ListTracesRequest\ViewType::class); - $this->view = $var; - - return $this; - } - - /** - * Optional. Maximum number of traces to return. If not specified or <= 0, the - * implementation selects a reasonable value. The implementation may - * return fewer traces than the requested page size. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Maximum number of traces to return. If not specified or <= 0, the - * implementation selects a reasonable value. The implementation may - * return fewer traces than the requested page size. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Token identifying the page of results to return. If provided, use the - * value of the `next_page_token` field from a previous request. - * - * Generated from protobuf field string page_token = 4; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Token identifying the page of results to return. If provided, use the - * value of the `next_page_token` field from a previous request. - * - * Generated from protobuf field string page_token = 4; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Start of the time interval (inclusive) during which the trace data was - * collected from the application. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; - * @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); - } - - /** - * Start of the time interval (inclusive) during which the trace data was - * collected from the application. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 5; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * End of the time interval (inclusive) during which the trace data was - * collected from the application. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - * @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); - } - - /** - * End of the time interval (inclusive) during which the trace data was - * collected from the application. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * Optional. A filter against labels for the request. - * By default, searches use prefix matching. To specify exact match, prepend - * a plus symbol (`+`) to the search term. - * Multiple terms are ANDed. Syntax: - * * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root - * span starts with `NAME_PREFIX`. - * * `+root:NAME` or `+NAME`: Return traces where any root span's name is - * exactly `NAME`. - * * `span:NAME_PREFIX`: Return traces where any span starts with - * `NAME_PREFIX`. - * * `+span:NAME`: Return traces where any span's name is exactly - * `NAME`. - * * `latency:DURATION`: Return traces whose overall latency is - * greater or equal to than `DURATION`. Accepted units are nanoseconds - * (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For - * example, `latency:24ms` returns traces whose overall latency - * is greater than or equal to 24 milliseconds. - * * `label:LABEL_KEY`: Return all traces containing the specified - * label key (exact match, case-sensitive) regardless of the key:value - * pair's value (including empty values). - * * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified - * label key (exact match, case-sensitive) whose value starts with - * `VALUE_PREFIX`. Both a key and a value must be specified. - * * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair - * exactly matching the specified text. Both a key and a value must be - * specified. - * * `method:VALUE`: Equivalent to `/http/method:VALUE`. - * * `url:VALUE`: Equivalent to `/http/url:VALUE`. - * - * Generated from protobuf field string filter = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A filter against labels for the request. - * By default, searches use prefix matching. To specify exact match, prepend - * a plus symbol (`+`) to the search term. - * Multiple terms are ANDed. Syntax: - * * `root:NAME_PREFIX` or `NAME_PREFIX`: Return traces where any root - * span starts with `NAME_PREFIX`. - * * `+root:NAME` or `+NAME`: Return traces where any root span's name is - * exactly `NAME`. - * * `span:NAME_PREFIX`: Return traces where any span starts with - * `NAME_PREFIX`. - * * `+span:NAME`: Return traces where any span's name is exactly - * `NAME`. - * * `latency:DURATION`: Return traces whose overall latency is - * greater or equal to than `DURATION`. Accepted units are nanoseconds - * (`ns`), milliseconds (`ms`), and seconds (`s`). Default is `ms`. For - * example, `latency:24ms` returns traces whose overall latency - * is greater than or equal to 24 milliseconds. - * * `label:LABEL_KEY`: Return all traces containing the specified - * label key (exact match, case-sensitive) regardless of the key:value - * pair's value (including empty values). - * * `LABEL_KEY:VALUE_PREFIX`: Return all traces containing the specified - * label key (exact match, case-sensitive) whose value starts with - * `VALUE_PREFIX`. Both a key and a value must be specified. - * * `+LABEL_KEY:VALUE`: Return all traces containing a key:value pair - * exactly matching the specified text. Both a key and a value must be - * specified. - * * `method:VALUE`: Equivalent to `/http/method:VALUE`. - * * `url:VALUE`: Equivalent to `/http/url:VALUE`. - * - * Generated from protobuf field string filter = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Field used to sort the returned traces. - * Can be one of the following: - * * `trace_id` - * * `name` (`name` field of root span in the trace) - * * `duration` (difference between `end_time` and `start_time` fields of - * the root span) - * * `start` (`start_time` field of the root span) - * Descending order can be specified by appending `desc` to the sort field - * (for example, `name desc`). - * Only one sort field is permitted. - * - * Generated from protobuf field string order_by = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Field used to sort the returned traces. - * Can be one of the following: - * * `trace_id` - * * `name` (`name` field of root span in the trace) - * * `duration` (difference between `end_time` and `start_time` fields of - * the root span) - * * `start` (`start_time` field of the root span) - * Descending order can be specified by appending `desc` to the sort field - * (for example, `name desc`). - * Only one sort field is permitted. - * - * Generated from protobuf field string order_by = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest/ViewType.php b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest/ViewType.php deleted file mode 100644 index e66a0222867a..000000000000 --- a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesRequest/ViewType.php +++ /dev/null @@ -1,72 +0,0 @@ -google.devtools.cloudtrace.v1.ListTracesRequest.ViewType - */ -class ViewType -{ - /** - * Default is `MINIMAL` if unspecified. - * - * Generated from protobuf enum VIEW_TYPE_UNSPECIFIED = 0; - */ - const VIEW_TYPE_UNSPECIFIED = 0; - /** - * Minimal view of the trace record that contains only the project - * and trace IDs. - * - * Generated from protobuf enum MINIMAL = 1; - */ - const MINIMAL = 1; - /** - * Root span view of the trace record that returns the root spans along - * with the minimal trace data. - * - * Generated from protobuf enum ROOTSPAN = 2; - */ - const ROOTSPAN = 2; - /** - * Complete view of the trace record that contains the actual trace data. - * This is equivalent to calling the REST `get` or RPC `GetTrace` method - * using the ID of each listed trace. - * - * Generated from protobuf enum COMPLETE = 3; - */ - const COMPLETE = 3; - - private static $valueToName = [ - self::VIEW_TYPE_UNSPECIFIED => 'VIEW_TYPE_UNSPECIFIED', - self::MINIMAL => 'MINIMAL', - self::ROOTSPAN => 'ROOTSPAN', - self::COMPLETE => 'COMPLETE', - ]; - - 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/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesResponse.php b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesResponse.php deleted file mode 100644 index f7cfcbc991df..000000000000 --- a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/ListTracesResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.devtools.cloudtrace.v1.ListTracesResponse - */ -class ListTracesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of trace records as specified by the view parameter. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.Trace traces = 1; - */ - private $traces; - /** - * If defined, indicates that there are more traces that match the request - * and that this value should be passed to the next request to continue - * retrieving additional traces. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Trace\V1\Trace[] $traces - * List of trace records as specified by the view parameter. - * @type string $next_page_token - * If defined, indicates that there are more traces that match the request - * and that this value should be passed to the next request to continue - * retrieving additional traces. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * List of trace records as specified by the view parameter. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.Trace traces = 1; - * @return RepeatedField<\Google\Cloud\Trace\V1\Trace> - */ - public function getTraces() - { - return $this->traces; - } - - /** - * List of trace records as specified by the view parameter. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.Trace traces = 1; - * @param \Google\Cloud\Trace\V1\Trace[] $var - * @return $this - */ - public function setTraces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V1\Trace::class); - $this->traces = $arr; - - return $this; - } - - /** - * If defined, indicates that there are more traces that match the request - * and that this value should be passed to the next request to continue - * retrieving additional traces. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * If defined, indicates that there are more traces that match the request - * and that this value should be passed to the next request to continue - * retrieving additional traces. - * - * 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/Trace/v1/proto/src/Google/Cloud/Trace/V1/PatchTracesRequest.php b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/PatchTracesRequest.php deleted file mode 100644 index 362847f8ef8a..000000000000 --- a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/PatchTracesRequest.php +++ /dev/null @@ -1,126 +0,0 @@ -google.devtools.cloudtrace.v1.PatchTracesRequest - */ -class PatchTracesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $project_id = ''; - /** - * Required. The body of the message. - * - * Generated from protobuf field .google.devtools.cloudtrace.v1.Traces traces = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $traces = null; - - /** - * @param string $projectId Required. ID of the Cloud project where the trace data is stored. - * @param \Google\Cloud\Trace\V1\Traces $traces Required. The body of the message. - * - * @return \Google\Cloud\Trace\V1\PatchTracesRequest - * - * @experimental - */ - public static function build(string $projectId, \Google\Cloud\Trace\V1\Traces $traces): self - { - return (new self()) - ->setProjectId($projectId) - ->setTraces($traces); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Required. ID of the Cloud project where the trace data is stored. - * @type \Google\Cloud\Trace\V1\Traces $traces - * Required. The body of the message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Required. ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Required. ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Required. The body of the message. - * - * Generated from protobuf field .google.devtools.cloudtrace.v1.Traces traces = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Trace\V1\Traces|null - */ - public function getTraces() - { - return $this->traces; - } - - public function hasTraces() - { - return isset($this->traces); - } - - public function clearTraces() - { - unset($this->traces); - } - - /** - * Required. The body of the message. - * - * Generated from protobuf field .google.devtools.cloudtrace.v1.Traces traces = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Trace\V1\Traces $var - * @return $this - */ - public function setTraces($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V1\Traces::class); - $this->traces = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/Trace.php b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/Trace.php deleted file mode 100644 index 8caa6a030853..000000000000 --- a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/Trace.php +++ /dev/null @@ -1,145 +0,0 @@ -google.devtools.cloudtrace.v1.Trace - */ -class Trace extends \Google\Protobuf\Internal\Message -{ - /** - * Project ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1; - */ - protected $project_id = ''; - /** - * Globally unique identifier for the trace. This identifier is a 128-bit - * numeric value formatted as a 32-byte hex string. For example, - * `382d4f4c6b7bb2f4a972559d9085001d`. - * - * Generated from protobuf field string trace_id = 2; - */ - protected $trace_id = ''; - /** - * Collection of spans in the trace. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3; - */ - private $spans; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $project_id - * Project ID of the Cloud project where the trace data is stored. - * @type string $trace_id - * Globally unique identifier for the trace. This identifier is a 128-bit - * numeric value formatted as a 32-byte hex string. For example, - * `382d4f4c6b7bb2f4a972559d9085001d`. - * @type \Google\Cloud\Trace\V1\TraceSpan[] $spans - * Collection of spans in the trace. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Project ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1; - * @return string - */ - public function getProjectId() - { - return $this->project_id; - } - - /** - * Project ID of the Cloud project where the trace data is stored. - * - * Generated from protobuf field string project_id = 1; - * @param string $var - * @return $this - */ - public function setProjectId($var) - { - GPBUtil::checkString($var, True); - $this->project_id = $var; - - return $this; - } - - /** - * Globally unique identifier for the trace. This identifier is a 128-bit - * numeric value formatted as a 32-byte hex string. For example, - * `382d4f4c6b7bb2f4a972559d9085001d`. - * - * Generated from protobuf field string trace_id = 2; - * @return string - */ - public function getTraceId() - { - return $this->trace_id; - } - - /** - * Globally unique identifier for the trace. This identifier is a 128-bit - * numeric value formatted as a 32-byte hex string. For example, - * `382d4f4c6b7bb2f4a972559d9085001d`. - * - * Generated from protobuf field string trace_id = 2; - * @param string $var - * @return $this - */ - public function setTraceId($var) - { - GPBUtil::checkString($var, True); - $this->trace_id = $var; - - return $this; - } - - /** - * Collection of spans in the trace. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3; - * @return RepeatedField<\Google\Cloud\Trace\V1\TraceSpan> - */ - public function getSpans() - { - return $this->spans; - } - - /** - * Collection of spans in the trace. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3; - * @param \Google\Cloud\Trace\V1\TraceSpan[] $var - * @return $this - */ - public function setSpans($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V1\TraceSpan::class); - $this->spans = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/TraceSpan.php b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/TraceSpan.php deleted file mode 100644 index 9364dc166515..000000000000 --- a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/TraceSpan.php +++ /dev/null @@ -1,451 +0,0 @@ -google.devtools.cloudtrace.v1.TraceSpan - */ -class TraceSpan extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier for the span. Must be a 64-bit integer other than 0 and - * unique within a trace. For example, `2205310701640571284`. - * - * Generated from protobuf field fixed64 span_id = 1; - */ - protected $span_id = 0; - /** - * Distinguishes between spans generated in a particular context. For example, - * two spans with the same name may be distinguished using `RPC_CLIENT` - * and `RPC_SERVER` to identify queueing latency associated with the span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2; - */ - protected $kind = 0; - /** - * Name of the span. Must be less than 128 bytes. The span name is sanitized - * and displayed in the Stackdriver Trace tool in the - * Google Cloud Platform Console. - * The name may be a method name or some other per-call site name. - * For the same executable and the same call point, a best practice is - * to use a consistent name, which makes it easier to correlate - * cross-trace spans. - * - * Generated from protobuf field string name = 3; - */ - protected $name = ''; - /** - * Start time of the span in nanoseconds from the UNIX epoch. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - */ - protected $start_time = null; - /** - * End time of the span in nanoseconds from the UNIX epoch. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 5; - */ - protected $end_time = null; - /** - * Optional. ID of the parent span, if any. - * - * Generated from protobuf field fixed64 parent_span_id = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $parent_span_id = 0; - /** - * Collection of labels associated with the span. Label keys must be less than - * 128 bytes. Label values must be less than 16 kilobytes (10MB for - * `/stacktrace` values). - * Some predefined label keys exist, or you may create your own. When creating - * your own, we recommend the following formats: - * * `/category/product/key` for agents of well-known products (e.g. - * `/db/mongodb/read_size`). - * * `short_host/path/key` for domain-specific keys (e.g. - * `foo.com/myproduct/bar`) - * Predefined labels include: - * * `/agent` - * * `/component` - * * `/error/message` - * * `/error/name` - * * `/http/client_city` - * * `/http/client_country` - * * `/http/client_protocol` - * * `/http/client_region` - * * `/http/host` - * * `/http/method` - * * `/http/path` - * * `/http/redirected_url` - * * `/http/request/size` - * * `/http/response/size` - * * `/http/route` - * * `/http/status_code` - * * `/http/url` - * * `/http/user_agent` - * * `/pid` - * * `/stacktrace` - * * `/tid` - * - * Generated from protobuf field map labels = 7; - */ - private $labels; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $span_id - * Identifier for the span. Must be a 64-bit integer other than 0 and - * unique within a trace. For example, `2205310701640571284`. - * @type int $kind - * Distinguishes between spans generated in a particular context. For example, - * two spans with the same name may be distinguished using `RPC_CLIENT` - * and `RPC_SERVER` to identify queueing latency associated with the span. - * @type string $name - * Name of the span. Must be less than 128 bytes. The span name is sanitized - * and displayed in the Stackdriver Trace tool in the - * Google Cloud Platform Console. - * The name may be a method name or some other per-call site name. - * For the same executable and the same call point, a best practice is - * to use a consistent name, which makes it easier to correlate - * cross-trace spans. - * @type \Google\Protobuf\Timestamp $start_time - * Start time of the span in nanoseconds from the UNIX epoch. - * @type \Google\Protobuf\Timestamp $end_time - * End time of the span in nanoseconds from the UNIX epoch. - * @type int|string $parent_span_id - * Optional. ID of the parent span, if any. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Collection of labels associated with the span. Label keys must be less than - * 128 bytes. Label values must be less than 16 kilobytes (10MB for - * `/stacktrace` values). - * Some predefined label keys exist, or you may create your own. When creating - * your own, we recommend the following formats: - * * `/category/product/key` for agents of well-known products (e.g. - * `/db/mongodb/read_size`). - * * `short_host/path/key` for domain-specific keys (e.g. - * `foo.com/myproduct/bar`) - * Predefined labels include: - * * `/agent` - * * `/component` - * * `/error/message` - * * `/error/name` - * * `/http/client_city` - * * `/http/client_country` - * * `/http/client_protocol` - * * `/http/client_region` - * * `/http/host` - * * `/http/method` - * * `/http/path` - * * `/http/redirected_url` - * * `/http/request/size` - * * `/http/response/size` - * * `/http/route` - * * `/http/status_code` - * * `/http/url` - * * `/http/user_agent` - * * `/pid` - * * `/stacktrace` - * * `/tid` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Identifier for the span. Must be a 64-bit integer other than 0 and - * unique within a trace. For example, `2205310701640571284`. - * - * Generated from protobuf field fixed64 span_id = 1; - * @return int|string - */ - public function getSpanId() - { - return $this->span_id; - } - - /** - * Identifier for the span. Must be a 64-bit integer other than 0 and - * unique within a trace. For example, `2205310701640571284`. - * - * Generated from protobuf field fixed64 span_id = 1; - * @param int|string $var - * @return $this - */ - public function setSpanId($var) - { - GPBUtil::checkUint64($var); - $this->span_id = $var; - - return $this; - } - - /** - * Distinguishes between spans generated in a particular context. For example, - * two spans with the same name may be distinguished using `RPC_CLIENT` - * and `RPC_SERVER` to identify queueing latency associated with the span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2; - * @return int - */ - public function getKind() - { - return $this->kind; - } - - /** - * Distinguishes between spans generated in a particular context. For example, - * two spans with the same name may be distinguished using `RPC_CLIENT` - * and `RPC_SERVER` to identify queueing latency associated with the span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2; - * @param int $var - * @return $this - */ - public function setKind($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Trace\V1\TraceSpan\SpanKind::class); - $this->kind = $var; - - return $this; - } - - /** - * Name of the span. Must be less than 128 bytes. The span name is sanitized - * and displayed in the Stackdriver Trace tool in the - * Google Cloud Platform Console. - * The name may be a method name or some other per-call site name. - * For the same executable and the same call point, a best practice is - * to use a consistent name, which makes it easier to correlate - * cross-trace spans. - * - * Generated from protobuf field string name = 3; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the span. Must be less than 128 bytes. The span name is sanitized - * and displayed in the Stackdriver Trace tool in the - * Google Cloud Platform Console. - * The name may be a method name or some other per-call site name. - * For the same executable and the same call point, a best practice is - * to use a consistent name, which makes it easier to correlate - * cross-trace spans. - * - * Generated from protobuf field string name = 3; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Start time of the span in nanoseconds from the UNIX epoch. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 4; - * @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); - } - - /** - * Start time of the span in nanoseconds from the UNIX epoch. - * - * 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->start_time = $var; - - return $this; - } - - /** - * End time of the span in nanoseconds from the UNIX epoch. - * - * 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); - } - - /** - * End time of the span in nanoseconds from the UNIX epoch. - * - * 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; - } - - /** - * Optional. ID of the parent span, if any. - * - * Generated from protobuf field fixed64 parent_span_id = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|string - */ - public function getParentSpanId() - { - return $this->parent_span_id; - } - - /** - * Optional. ID of the parent span, if any. - * - * Generated from protobuf field fixed64 parent_span_id = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|string $var - * @return $this - */ - public function setParentSpanId($var) - { - GPBUtil::checkUint64($var); - $this->parent_span_id = $var; - - return $this; - } - - /** - * Collection of labels associated with the span. Label keys must be less than - * 128 bytes. Label values must be less than 16 kilobytes (10MB for - * `/stacktrace` values). - * Some predefined label keys exist, or you may create your own. When creating - * your own, we recommend the following formats: - * * `/category/product/key` for agents of well-known products (e.g. - * `/db/mongodb/read_size`). - * * `short_host/path/key` for domain-specific keys (e.g. - * `foo.com/myproduct/bar`) - * Predefined labels include: - * * `/agent` - * * `/component` - * * `/error/message` - * * `/error/name` - * * `/http/client_city` - * * `/http/client_country` - * * `/http/client_protocol` - * * `/http/client_region` - * * `/http/host` - * * `/http/method` - * * `/http/path` - * * `/http/redirected_url` - * * `/http/request/size` - * * `/http/response/size` - * * `/http/route` - * * `/http/status_code` - * * `/http/url` - * * `/http/user_agent` - * * `/pid` - * * `/stacktrace` - * * `/tid` - * - * Generated from protobuf field map labels = 7; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Collection of labels associated with the span. Label keys must be less than - * 128 bytes. Label values must be less than 16 kilobytes (10MB for - * `/stacktrace` values). - * Some predefined label keys exist, or you may create your own. When creating - * your own, we recommend the following formats: - * * `/category/product/key` for agents of well-known products (e.g. - * `/db/mongodb/read_size`). - * * `short_host/path/key` for domain-specific keys (e.g. - * `foo.com/myproduct/bar`) - * Predefined labels include: - * * `/agent` - * * `/component` - * * `/error/message` - * * `/error/name` - * * `/http/client_city` - * * `/http/client_country` - * * `/http/client_protocol` - * * `/http/client_region` - * * `/http/host` - * * `/http/method` - * * `/http/path` - * * `/http/redirected_url` - * * `/http/request/size` - * * `/http/response/size` - * * `/http/route` - * * `/http/status_code` - * * `/http/url` - * * `/http/user_agent` - * * `/pid` - * * `/stacktrace` - * * `/tid` - * - * Generated from protobuf field map labels = 7; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/TraceSpan/SpanKind.php b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/TraceSpan/SpanKind.php deleted file mode 100644 index 942aedebb833..000000000000 --- a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/TraceSpan/SpanKind.php +++ /dev/null @@ -1,64 +0,0 @@ -google.devtools.cloudtrace.v1.TraceSpan.SpanKind - */ -class SpanKind -{ - /** - * Unspecified. - * - * Generated from protobuf enum SPAN_KIND_UNSPECIFIED = 0; - */ - const SPAN_KIND_UNSPECIFIED = 0; - /** - * Indicates that the span covers server-side handling of an RPC or other - * remote network request. - * - * Generated from protobuf enum RPC_SERVER = 1; - */ - const RPC_SERVER = 1; - /** - * Indicates that the span covers the client-side wrapper around an RPC or - * other remote request. - * - * Generated from protobuf enum RPC_CLIENT = 2; - */ - const RPC_CLIENT = 2; - - private static $valueToName = [ - self::SPAN_KIND_UNSPECIFIED => 'SPAN_KIND_UNSPECIFIED', - self::RPC_SERVER => 'RPC_SERVER', - self::RPC_CLIENT => 'RPC_CLIENT', - ]; - - 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/Trace/v1/proto/src/Google/Cloud/Trace/V1/Traces.php b/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/Traces.php deleted file mode 100644 index 01f9ab1e640e..000000000000 --- a/owl-bot-staging/Trace/v1/proto/src/Google/Cloud/Trace/V1/Traces.php +++ /dev/null @@ -1,67 +0,0 @@ -google.devtools.cloudtrace.v1.Traces - */ -class Traces extends \Google\Protobuf\Internal\Message -{ - /** - * List of traces. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.Trace traces = 1; - */ - private $traces; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Trace\V1\Trace[] $traces - * List of traces. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V1\Trace::initOnce(); - parent::__construct($data); - } - - /** - * List of traces. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.Trace traces = 1; - * @return RepeatedField<\Google\Cloud\Trace\V1\Trace> - */ - public function getTraces() - { - return $this->traces; - } - - /** - * List of traces. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v1.Trace traces = 1; - * @param \Google\Cloud\Trace\V1\Trace[] $var - * @return $this - */ - public function setTraces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V1\Trace::class); - $this->traces = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/get_trace.php b/owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/get_trace.php deleted file mode 100644 index 4b813e4c2263..000000000000 --- a/owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/get_trace.php +++ /dev/null @@ -1,73 +0,0 @@ -setProjectId($projectId) - ->setTraceId($traceId); - - // Call the API and handle any network failures. - try { - /** @var Trace $response */ - $response = $traceServiceClient->getTrace($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $projectId = '[PROJECT_ID]'; - $traceId = '[TRACE_ID]'; - - get_trace_sample($projectId, $traceId); -} -// [END cloudtrace_v1_generated_TraceService_GetTrace_sync] diff --git a/owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/list_traces.php b/owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/list_traces.php deleted file mode 100644 index 663bbc384d0a..000000000000 --- a/owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/list_traces.php +++ /dev/null @@ -1,75 +0,0 @@ -setProjectId($projectId); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $traceServiceClient->listTraces($request); - - /** @var Trace $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 -{ - $projectId = '[PROJECT_ID]'; - - list_traces_sample($projectId); -} -// [END cloudtrace_v1_generated_TraceService_ListTraces_sync] diff --git a/owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/patch_traces.php b/owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/patch_traces.php deleted file mode 100644 index d8668ae741de..000000000000 --- a/owl-bot-staging/Trace/v1/samples/V1/TraceServiceClient/patch_traces.php +++ /dev/null @@ -1,75 +0,0 @@ -setProjectId($projectId) - ->setTraces($traces); - - // Call the API and handle any network failures. - try { - $traceServiceClient->patchTraces($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $projectId = '[PROJECT_ID]'; - - patch_traces_sample($projectId); -} -// [END cloudtrace_v1_generated_TraceService_PatchTraces_sync] diff --git a/owl-bot-staging/Trace/v1/src/V1/Client/TraceServiceClient.php b/owl-bot-staging/Trace/v1/src/V1/Client/TraceServiceClient.php deleted file mode 100644 index 99e30160e015..000000000000 --- a/owl-bot-staging/Trace/v1/src/V1/Client/TraceServiceClient.php +++ /dev/null @@ -1,270 +0,0 @@ - getTraceAsync(GetTraceRequest $request, array $optionalArgs = []) - * @method PromiseInterface listTracesAsync(ListTracesRequest $request, array $optionalArgs = []) - * @method PromiseInterface patchTracesAsync(PatchTracesRequest $request, array $optionalArgs = []) - */ -final class TraceServiceClient -{ - use GapicClientTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.devtools.cloudtrace.v1.TraceService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudtrace.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudtrace.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/trace.append', - 'https://www.googleapis.com/auth/trace.readonly', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/trace_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/trace_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/trace_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/trace_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'cloudtrace.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Trace\V1\TraceServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new TraceServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Gets a single trace by its ID. - * - * The async variant is {@see TraceServiceClient::getTraceAsync()} . - * - * @example samples/V1/TraceServiceClient/get_trace.php - * - * @param GetTraceRequest $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 Trace - * - * @throws ApiException Thrown if the API call fails. - */ - public function getTrace(GetTraceRequest $request, array $callOptions = []): Trace - { - return $this->startApiCall('GetTrace', $request, $callOptions)->wait(); - } - - /** - * Returns of a list of traces that match the specified filter conditions. - * - * The async variant is {@see TraceServiceClient::listTracesAsync()} . - * - * @example samples/V1/TraceServiceClient/list_traces.php - * - * @param ListTracesRequest $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 listTraces(ListTracesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListTraces', $request, $callOptions); - } - - /** - * Sends new traces to Stackdriver Trace or updates existing traces. If the ID - * of a trace that you send matches that of an existing trace, any fields - * in the existing trace and its spans are overwritten by the provided values, - * and any new fields provided are merged with the existing trace data. If the - * ID does not match, a new trace is created. - * - * The async variant is {@see TraceServiceClient::patchTracesAsync()} . - * - * @example samples/V1/TraceServiceClient/patch_traces.php - * - * @param PatchTracesRequest $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 patchTraces(PatchTracesRequest $request, array $callOptions = []): void - { - $this->startApiCall('PatchTraces', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Trace/v1/src/V1/gapic_metadata.json b/owl-bot-staging/Trace/v1/src/V1/gapic_metadata.json deleted file mode 100644 index da0965fdc210..000000000000 --- a/owl-bot-staging/Trace/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.devtools.cloudtrace.v1", - "libraryPackage": "Google\\Cloud\\Trace\\V1", - "services": { - "TraceService": { - "clients": { - "grpc": { - "libraryClient": "TraceServiceGapicClient", - "rpcs": { - "GetTrace": { - "methods": [ - "getTrace" - ] - }, - "ListTraces": { - "methods": [ - "listTraces" - ] - }, - "PatchTraces": { - "methods": [ - "patchTraces" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Trace/v1/src/V1/resources/trace_service_client_config.json b/owl-bot-staging/Trace/v1/src/V1/resources/trace_service_client_config.json deleted file mode 100644 index 7c905cf282d2..000000000000 --- a/owl-bot-staging/Trace/v1/src/V1/resources/trace_service_client_config.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "interfaces": { - "google.devtools.cloudtrace.v1.TraceService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.2, - "max_retry_delay_millis": 1000, - "initial_rpc_timeout_millis": 45000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 45000, - "total_timeout_millis": 45000 - } - }, - "methods": { - "GetTrace": { - "timeout_millis": 45000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListTraces": { - "timeout_millis": 45000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "PatchTraces": { - "timeout_millis": 45000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Trace/v1/src/V1/resources/trace_service_descriptor_config.php b/owl-bot-staging/Trace/v1/src/V1/resources/trace_service_descriptor_config.php deleted file mode 100644 index 42918bb58eaa..000000000000 --- a/owl-bot-staging/Trace/v1/src/V1/resources/trace_service_descriptor_config.php +++ /dev/null @@ -1,78 +0,0 @@ - [ - 'google.devtools.cloudtrace.v1.TraceService' => [ - 'GetTrace' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Trace\V1\Trace', - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - [ - 'keyName' => 'trace_id', - 'fieldAccessors' => [ - 'getTraceId', - ], - ], - ], - ], - 'ListTraces' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getTraces', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Trace\V1\ListTracesResponse', - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - ], - ], - 'PatchTraces' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'project_id', - 'fieldAccessors' => [ - 'getProjectId', - ], - ], - ], - ], - ], - ], -]; diff --git a/owl-bot-staging/Trace/v1/src/V1/resources/trace_service_rest_client_config.php b/owl-bot-staging/Trace/v1/src/V1/resources/trace_service_rest_client_config.php deleted file mode 100644 index c4ffa5774291..000000000000 --- a/owl-bot-staging/Trace/v1/src/V1/resources/trace_service_rest_client_config.php +++ /dev/null @@ -1,68 +0,0 @@ - [ - 'google.devtools.cloudtrace.v1.TraceService' => [ - 'GetTrace' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project_id}/traces/{trace_id}', - 'placeholders' => [ - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - 'trace_id' => [ - 'getters' => [ - 'getTraceId', - ], - ], - ], - ], - 'ListTraces' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/projects/{project_id}/traces', - 'placeholders' => [ - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - ], - ], - 'PatchTraces' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/projects/{project_id}/traces', - 'body' => 'traces', - 'placeholders' => [ - 'project_id' => [ - 'getters' => [ - 'getProjectId', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Trace/v1/tests/Unit/V1/Client/TraceServiceClientTest.php b/owl-bot-staging/Trace/v1/tests/Unit/V1/Client/TraceServiceClientTest.php deleted file mode 100644 index a67c6ecebd5d..000000000000 --- a/owl-bot-staging/Trace/v1/tests/Unit/V1/Client/TraceServiceClientTest.php +++ /dev/null @@ -1,313 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return TraceServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new TraceServiceClient($options); - } - - /** @test */ - public function getTraceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $projectId2 = 'projectId2939242356'; - $traceId2 = 'traceId2987826376'; - $expectedResponse = new Trace(); - $expectedResponse->setProjectId($projectId2); - $expectedResponse->setTraceId($traceId2); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $traceId = 'traceId1270300245'; - $request = (new GetTraceRequest()) - ->setProjectId($projectId) - ->setTraceId($traceId); - $response = $gapicClient->getTrace($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.cloudtrace.v1.TraceService/GetTrace', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getTraceId(); - $this->assertProtobufEquals($traceId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getTraceExceptionTest() - { - $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 - $projectId = 'projectId-1969970175'; - $traceId = 'traceId1270300245'; - $request = (new GetTraceRequest()) - ->setProjectId($projectId) - ->setTraceId($traceId); - try { - $gapicClient->getTrace($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 listTracesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $tracesElement = new Trace(); - $traces = [ - $tracesElement, - ]; - $expectedResponse = new ListTracesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTraces($traces); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $request = (new ListTracesRequest()) - ->setProjectId($projectId); - $response = $gapicClient->listTraces($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getTraces()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.cloudtrace.v1.TraceService/ListTraces', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listTracesExceptionTest() - { - $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 - $projectId = 'projectId-1969970175'; - $request = (new ListTracesRequest()) - ->setProjectId($projectId); - try { - $gapicClient->listTraces($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 patchTracesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $traces = new Traces(); - $request = (new PatchTracesRequest()) - ->setProjectId($projectId) - ->setTraces($traces); - $gapicClient->patchTraces($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.cloudtrace.v1.TraceService/PatchTraces', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getTraces(); - $this->assertProtobufEquals($traces, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function patchTracesExceptionTest() - { - $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 - $projectId = 'projectId-1969970175'; - $traces = new Traces(); - $request = (new PatchTracesRequest()) - ->setProjectId($projectId) - ->setTraces($traces); - try { - $gapicClient->patchTraces($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 getTraceAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $projectId2 = 'projectId2939242356'; - $traceId2 = 'traceId2987826376'; - $expectedResponse = new Trace(); - $expectedResponse->setProjectId($projectId2); - $expectedResponse->setTraceId($traceId2); - $transport->addResponse($expectedResponse); - // Mock request - $projectId = 'projectId-1969970175'; - $traceId = 'traceId1270300245'; - $request = (new GetTraceRequest()) - ->setProjectId($projectId) - ->setTraceId($traceId); - $response = $gapicClient->getTraceAsync($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.devtools.cloudtrace.v1.TraceService/GetTrace', $actualFuncCall); - $actualValue = $actualRequestObject->getProjectId(); - $this->assertProtobufEquals($projectId, $actualValue); - $actualValue = $actualRequestObject->getTraceId(); - $this->assertProtobufEquals($traceId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Trace/v2/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V2/Trace.php b/owl-bot-staging/Trace/v2/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V2/Trace.php deleted file mode 100644 index 5e3b5365f37b..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V2/Trace.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xDB\x1C\x0A)google/devtools/cloudtrace/v2/trace.proto\x12\x1Dgoogle.devtools.cloudtrace.v2\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x1Egoogle/protobuf/wrappers.proto\x1A\x17google/rpc/status.proto\"\xF1\x11\x0A\x04Span\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x14\x0A\x07span_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x16\x0A\x0Eparent_span_id\x18\x03 \x01(\x09\x12K\x0A\x0Cdisplay_name\x18\x04 \x01(\x0B20.google.devtools.cloudtrace.v2.TruncatableStringB\x03\xE0A\x02\x123\x0A\x0Astart_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x02\x121\x0A\x08end_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x02\x12B\x0A\x0Aattributes\x18\x07 \x01(\x0B2..google.devtools.cloudtrace.v2.Span.Attributes\x12>\x0A\x0Bstack_trace\x18\x08 \x01(\x0B2).google.devtools.cloudtrace.v2.StackTrace\x12C\x0A\x0Btime_events\x18\x09 \x01(\x0B2..google.devtools.cloudtrace.v2.Span.TimeEvents\x128\x0A\x05links\x18\x0A \x01(\x0B2).google.devtools.cloudtrace.v2.Span.Links\x12'\x0A\x06status\x18\x0B \x01(\x0B2\x12.google.rpc.StatusB\x03\xE0A\x01\x12D\x0A\x1Bsame_process_as_parent_span\x18\x0C \x01(\x0B2\x1A.google.protobuf.BoolValueB\x03\xE0A\x01\x12:\x0A\x10child_span_count\x18\x0D \x01(\x0B2\x1B.google.protobuf.Int32ValueB\x03\xE0A\x01\x12D\x0A\x09span_kind\x18\x0E \x01(\x0E2,.google.devtools.cloudtrace.v2.Span.SpanKindB\x03\xE0A\x01\x1A\xEB\x01\x0A\x0AAttributes\x12W\x0A\x0Dattribute_map\x18\x01 \x03(\x0B2@.google.devtools.cloudtrace.v2.Span.Attributes.AttributeMapEntry\x12 \x0A\x18dropped_attributes_count\x18\x02 \x01(\x05\x1Ab\x0A\x11AttributeMapEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12<\x0A\x05value\x18\x02 \x01(\x0B2-.google.devtools.cloudtrace.v2.AttributeValue:\x028\x01\x1A\xDF\x04\x0A\x09TimeEvent\x12(\x0A\x04time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12N\x0A\x0Aannotation\x18\x02 \x01(\x0B28.google.devtools.cloudtrace.v2.Span.TimeEvent.AnnotationH\x00\x12S\x0A\x0Dmessage_event\x18\x03 \x01(\x0B2:.google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEventH\x00\x1A\x97\x01\x0A\x0AAnnotation\x12E\x0A\x0Bdescription\x18\x01 \x01(\x0B20.google.devtools.cloudtrace.v2.TruncatableString\x12B\x0A\x0Aattributes\x18\x02 \x01(\x0B2..google.devtools.cloudtrace.v2.Span.Attributes\x1A\xDF\x01\x0A\x0CMessageEvent\x12M\x0A\x04type\x18\x01 \x01(\x0E2?.google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.Type\x12\x0A\x0A\x02id\x18\x02 \x01(\x03\x12\x1F\x0A\x17uncompressed_size_bytes\x18\x03 \x01(\x03\x12\x1D\x0A\x15compressed_size_bytes\x18\x04 \x01(\x03\"4\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04SENT\x10\x01\x12\x0C\x0A\x08RECEIVED\x10\x02B\x07\x0A\x05value\x1A\x98\x01\x0A\x0ATimeEvents\x12A\x0A\x0Atime_event\x18\x01 \x03(\x0B2-.google.devtools.cloudtrace.v2.Span.TimeEvent\x12!\x0A\x19dropped_annotations_count\x18\x02 \x01(\x05\x12\$\x0A\x1Cdropped_message_events_count\x18\x03 \x01(\x05\x1A\xF7\x01\x0A\x04Link\x12\x10\x0A\x08trace_id\x18\x01 \x01(\x09\x12\x0F\x0A\x07span_id\x18\x02 \x01(\x09\x12;\x0A\x04type\x18\x03 \x01(\x0E2-.google.devtools.cloudtrace.v2.Span.Link.Type\x12B\x0A\x0Aattributes\x18\x04 \x01(\x0B2..google.devtools.cloudtrace.v2.Span.Attributes\"K\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x15\x0A\x11CHILD_LINKED_SPAN\x10\x01\x12\x16\x0A\x12PARENT_LINKED_SPAN\x10\x02\x1A\\\x0A\x05Links\x126\x0A\x04link\x18\x01 \x03(\x0B2(.google.devtools.cloudtrace.v2.Span.Link\x12\x1B\x0A\x13dropped_links_count\x18\x02 \x01(\x05\"g\x0A\x08SpanKind\x12\x19\x0A\x15SPAN_KIND_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08INTERNAL\x10\x01\x12\x0A\x0A\x06SERVER\x10\x02\x12\x0A\x0A\x06CLIENT\x10\x03\x12\x0C\x0A\x08PRODUCER\x10\x04\x12\x0C\x0A\x08CONSUMER\x10\x05:S\xEAAP\x0A\x1Ecloudtrace.googleapis.com/Span\x12.projects/{project}/traces/{trace}/spans/{span}\"\x8E\x01\x0A\x0EAttributeValue\x12H\x0A\x0Cstring_value\x18\x01 \x01(\x0B20.google.devtools.cloudtrace.v2.TruncatableStringH\x00\x12\x13\x0A\x09int_value\x18\x02 \x01(\x03H\x00\x12\x14\x0A\x0Abool_value\x18\x03 \x01(\x08H\x00B\x07\x0A\x05value\"\x89\x05\x0A\x0AStackTrace\x12K\x0A\x0Cstack_frames\x18\x01 \x01(\x0B25.google.devtools.cloudtrace.v2.StackTrace.StackFrames\x12\x1B\x0A\x13stack_trace_hash_id\x18\x02 \x01(\x03\x1A\x9E\x03\x0A\x0AStackFrame\x12G\x0A\x0Dfunction_name\x18\x01 \x01(\x0B20.google.devtools.cloudtrace.v2.TruncatableString\x12P\x0A\x16original_function_name\x18\x02 \x01(\x0B20.google.devtools.cloudtrace.v2.TruncatableString\x12C\x0A\x09file_name\x18\x03 \x01(\x0B20.google.devtools.cloudtrace.v2.TruncatableString\x12\x13\x0A\x0Bline_number\x18\x04 \x01(\x03\x12\x15\x0A\x0Dcolumn_number\x18\x05 \x01(\x03\x12:\x0A\x0Bload_module\x18\x06 \x01(\x0B2%.google.devtools.cloudtrace.v2.Module\x12H\x0A\x0Esource_version\x18\x07 \x01(\x0B20.google.devtools.cloudtrace.v2.TruncatableString\x1Ap\x0A\x0BStackFrames\x12C\x0A\x05frame\x18\x01 \x03(\x0B24.google.devtools.cloudtrace.v2.StackTrace.StackFrame\x12\x1C\x0A\x14dropped_frames_count\x18\x02 \x01(\x05\"\x8E\x01\x0A\x06Module\x12@\x0A\x06module\x18\x01 \x01(\x0B20.google.devtools.cloudtrace.v2.TruncatableString\x12B\x0A\x08build_id\x18\x02 \x01(\x0B20.google.devtools.cloudtrace.v2.TruncatableString\"@\x0A\x11TruncatableString\x12\x0D\x0A\x05value\x18\x01 \x01(\x09\x12\x1C\x0A\x14truncated_byte_count\x18\x02 \x01(\x05B\xAD\x01\x0A!com.google.devtools.cloudtrace.v2B\x0ATraceProtoP\x01Z/cloud.google.com/go/trace/apiv2/tracepb;tracepb\xAA\x02\x15Google.Cloud.Trace.V2\xCA\x02\x15Google\\Cloud\\Trace\\V2\xEA\x02\x18Google::Cloud::Trace::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Trace/v2/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V2/Tracing.php b/owl-bot-staging/Trace/v2/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V2/Tracing.php deleted file mode 100644 index dae2966934fc..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/GPBMetadata/Google/Devtools/Cloudtrace/V2/Tracing.php +++ /dev/null @@ -1,30 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xF7\x07\x0A+google/devtools/cloudtrace/v2/tracing.proto\x12\x1Dgoogle.devtools.cloudtrace.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A)google/devtools/cloudtrace/v2/trace.proto\x1A\x1Bgoogle/protobuf/empty.proto\"\x94\x01\x0A\x16BatchWriteSpansRequest\x12A\x0A\x04name\x18\x01 \x01(\x09B3\xE0A\x02\xFAA-\x0A+cloudresourcemanager.googleapis.com/Project\x127\x0A\x05spans\x18\x02 \x03(\x0B2#.google.devtools.cloudtrace.v2.SpanB\x03\xE0A\x022\xBA\x03\x0A\x0CTraceService\x12\xA1\x01\x0A\x0FBatchWriteSpans\x125.google.devtools.cloudtrace.v2.BatchWriteSpansRequest\x1A\x16.google.protobuf.Empty\"?\xDAA\x0Aname,spans\x82\xD3\xE4\x93\x02,\"'/v2/{name=projects/*}/traces:batchWrite:\x01*\x12\x89\x01\x0A\x0ACreateSpan\x12#.google.devtools.cloudtrace.v2.Span\x1A#.google.devtools.cloudtrace.v2.Span\"1\x82\xD3\xE4\x93\x02+\"&/v2/{name=projects/*/traces/*/spans/*}:\x01*\x1Az\xCAA\x19cloudtrace.googleapis.com\xD2A[https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/trace.appendB\xAF\x01\x0A!com.google.devtools.cloudtrace.v2B\x0CTracingProtoP\x01Z/cloud.google.com/go/trace/apiv2/tracepb;tracepb\xAA\x02\x15Google.Cloud.Trace.V2\xCA\x02\x15Google\\Cloud\\Trace\\V2\xEA\x02\x18Google::Cloud::Trace::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/AttributeValue.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/AttributeValue.php deleted file mode 100644 index 00a274d4a79d..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/AttributeValue.php +++ /dev/null @@ -1,141 +0,0 @@ -google.devtools.cloudtrace.v2.AttributeValue - */ -class AttributeValue extends \Google\Protobuf\Internal\Message -{ - protected $value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Trace\V2\TruncatableString $string_value - * A string up to 256 bytes long. - * @type int|string $int_value - * A 64-bit signed integer. - * @type bool $bool_value - * A Boolean value represented by `true` or `false`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); - parent::__construct($data); - } - - /** - * A string up to 256 bytes long. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString string_value = 1; - * @return \Google\Cloud\Trace\V2\TruncatableString|null - */ - public function getStringValue() - { - return $this->readOneof(1); - } - - public function hasStringValue() - { - return $this->hasOneof(1); - } - - /** - * A string up to 256 bytes long. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString string_value = 1; - * @param \Google\Cloud\Trace\V2\TruncatableString $var - * @return $this - */ - public function setStringValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A 64-bit signed integer. - * - * Generated from protobuf field int64 int_value = 2; - * @return int|string - */ - public function getIntValue() - { - return $this->readOneof(2); - } - - public function hasIntValue() - { - return $this->hasOneof(2); - } - - /** - * A 64-bit signed integer. - * - * Generated from protobuf field int64 int_value = 2; - * @param int|string $var - * @return $this - */ - public function setIntValue($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A Boolean value represented by `true` or `false`. - * - * Generated from protobuf field bool bool_value = 3; - * @return bool - */ - public function getBoolValue() - { - return $this->readOneof(3); - } - - public function hasBoolValue() - { - return $this->hasOneof(3); - } - - /** - * A Boolean value represented by `true` or `false`. - * - * Generated from protobuf field bool bool_value = 3; - * @param bool $var - * @return $this - */ - public function setBoolValue($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getValue() - { - return $this->whichOneof("value"); - } - -} - diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/BatchWriteSpansRequest.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/BatchWriteSpansRequest.php deleted file mode 100644 index 063dda30c110..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/BatchWriteSpansRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.devtools.cloudtrace.v2.BatchWriteSpansRequest - */ -class BatchWriteSpansRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the project where the spans belong. The format is - * `projects/[PROJECT_ID]`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. A list of new spans. The span names must not match existing - * spans, otherwise the results are undefined. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span spans = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $spans; - - /** - * @param string $name Required. The name of the project where the spans belong. The format is - * `projects/[PROJECT_ID]`. Please see - * {@see TraceServiceClient::projectName()} for help formatting this field. - * @param \Google\Cloud\Trace\V2\Span[] $spans Required. A list of new spans. The span names must not match existing - * spans, otherwise the results are undefined. - * - * @return \Google\Cloud\Trace\V2\BatchWriteSpansRequest - * - * @experimental - */ - public static function build(string $name, array $spans): self - { - return (new self()) - ->setName($name) - ->setSpans($spans); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the project where the spans belong. The format is - * `projects/[PROJECT_ID]`. - * @type \Google\Cloud\Trace\V2\Span[] $spans - * Required. A list of new spans. The span names must not match existing - * spans, otherwise the results are undefined. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V2\Tracing::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the project where the spans belong. The format is - * `projects/[PROJECT_ID]`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the project where the spans belong. The format is - * `projects/[PROJECT_ID]`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. A list of new spans. The span names must not match existing - * spans, otherwise the results are undefined. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span spans = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField<\Google\Cloud\Trace\V2\Span> - */ - public function getSpans() - { - return $this->spans; - } - - /** - * Required. A list of new spans. The span names must not match existing - * spans, otherwise the results are undefined. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span spans = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Trace\V2\Span[] $var - * @return $this - */ - public function setSpans($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V2\Span::class); - $this->spans = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Module.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Module.php deleted file mode 100644 index 649c1d66c40f..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Module.php +++ /dev/null @@ -1,129 +0,0 @@ -google.devtools.cloudtrace.v2.Module - */ -class Module extends \Google\Protobuf\Internal\Message -{ - /** - * For example: main binary, kernel modules, and dynamic libraries - * such as libc.so, sharedlib.so (up to 256 bytes). - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString module = 1; - */ - protected $module = null; - /** - * A unique identifier for the module, usually a hash of its - * contents (up to 128 bytes). - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString build_id = 2; - */ - protected $build_id = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Trace\V2\TruncatableString $module - * For example: main binary, kernel modules, and dynamic libraries - * such as libc.so, sharedlib.so (up to 256 bytes). - * @type \Google\Cloud\Trace\V2\TruncatableString $build_id - * A unique identifier for the module, usually a hash of its - * contents (up to 128 bytes). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); - parent::__construct($data); - } - - /** - * For example: main binary, kernel modules, and dynamic libraries - * such as libc.so, sharedlib.so (up to 256 bytes). - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString module = 1; - * @return \Google\Cloud\Trace\V2\TruncatableString|null - */ - public function getModule() - { - return $this->module; - } - - public function hasModule() - { - return isset($this->module); - } - - public function clearModule() - { - unset($this->module); - } - - /** - * For example: main binary, kernel modules, and dynamic libraries - * such as libc.so, sharedlib.so (up to 256 bytes). - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString module = 1; - * @param \Google\Cloud\Trace\V2\TruncatableString $var - * @return $this - */ - public function setModule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class); - $this->module = $var; - - return $this; - } - - /** - * A unique identifier for the module, usually a hash of its - * contents (up to 128 bytes). - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString build_id = 2; - * @return \Google\Cloud\Trace\V2\TruncatableString|null - */ - public function getBuildId() - { - return $this->build_id; - } - - public function hasBuildId() - { - return isset($this->build_id); - } - - public function clearBuildId() - { - unset($this->build_id); - } - - /** - * A unique identifier for the module, usually a hash of its - * contents (up to 128 bytes). - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString build_id = 2; - * @param \Google\Cloud\Trace\V2\TruncatableString $var - * @return $this - */ - public function setBuildId($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class); - $this->build_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span.php deleted file mode 100644 index 0fcc11cda46c..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span.php +++ /dev/null @@ -1,783 +0,0 @@ -google.devtools.cloudtrace.v2.Span - */ -class Span extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the span in the following format: - * * `projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]` - * `[TRACE_ID]` is a unique identifier for a trace within a project; - * it is a 32-character hexadecimal encoding of a 16-byte array. It should - * not be zero. - * `[SPAN_ID]` is a unique identifier for a span within a trace; it - * is a 16-character hexadecimal encoding of an 8-byte array. It should not - * be zero. - * . - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * Required. The `[SPAN_ID]` portion of the span's resource name. - * - * Generated from protobuf field string span_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $span_id = ''; - /** - * The `[SPAN_ID]` of this span's parent span. If this is a root span, - * then this field must be empty. - * - * Generated from protobuf field string parent_span_id = 3; - */ - protected $parent_span_id = ''; - /** - * Required. A description of the span's operation (up to 128 bytes). - * Cloud Trace displays the description in the - * Cloud console. - * For example, the display name can be a qualified method name or a file name - * and a line number where the operation is called. A best practice is to use - * the same display name within an application and at the same call point. - * This makes it easier to correlate spans in different traces. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString display_name = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = null; - /** - * Required. The start time of the span. On the client side, this is the time - * kept by the local machine where the span execution starts. On the server - * side, this is the time when the server's application handler starts - * running. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $start_time = null; - /** - * Required. The end time of the span. On the client side, this is the time - * kept by the local machine where the span execution ends. On the server - * side, this is the time when the server application handler stops running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $end_time = null; - /** - * A set of attributes on the span. You can have up to 32 attributes per - * span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Attributes attributes = 7; - */ - protected $attributes = null; - /** - * Stack trace captured at the start of the span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.StackTrace stack_trace = 8; - */ - protected $stack_trace = null; - /** - * A set of time events. You can have up to 32 annotations and 128 message - * events per span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvents time_events = 9; - */ - protected $time_events = null; - /** - * Links associated with the span. You can have up to 128 links per Span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Links links = 10; - */ - protected $links = null; - /** - * Optional. The final status for this span. - * - * Generated from protobuf field .google.rpc.Status status = 11 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $status = null; - /** - * Optional. Set this parameter to indicate whether this span is in - * the same process as its parent. If you do not set this parameter, - * Trace is unable to take advantage of this helpful information. - * - * Generated from protobuf field .google.protobuf.BoolValue same_process_as_parent_span = 12 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $same_process_as_parent_span = null; - /** - * Optional. The number of child spans that were generated while this span - * was active. If set, allows implementation to detect missing child spans. - * - * Generated from protobuf field .google.protobuf.Int32Value child_span_count = 13 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $child_span_count = null; - /** - * Optional. Distinguishes between spans generated in a particular context. - * For example, two spans with the same name may be distinguished using - * `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.SpanKind span_kind = 14 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $span_kind = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the span in the following format: - * * `projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]` - * `[TRACE_ID]` is a unique identifier for a trace within a project; - * it is a 32-character hexadecimal encoding of a 16-byte array. It should - * not be zero. - * `[SPAN_ID]` is a unique identifier for a span within a trace; it - * is a 16-character hexadecimal encoding of an 8-byte array. It should not - * be zero. - * . - * @type string $span_id - * Required. The `[SPAN_ID]` portion of the span's resource name. - * @type string $parent_span_id - * The `[SPAN_ID]` of this span's parent span. If this is a root span, - * then this field must be empty. - * @type \Google\Cloud\Trace\V2\TruncatableString $display_name - * Required. A description of the span's operation (up to 128 bytes). - * Cloud Trace displays the description in the - * Cloud console. - * For example, the display name can be a qualified method name or a file name - * and a line number where the operation is called. A best practice is to use - * the same display name within an application and at the same call point. - * This makes it easier to correlate spans in different traces. - * @type \Google\Protobuf\Timestamp $start_time - * Required. The start time of the span. On the client side, this is the time - * kept by the local machine where the span execution starts. On the server - * side, this is the time when the server's application handler starts - * running. - * @type \Google\Protobuf\Timestamp $end_time - * Required. The end time of the span. On the client side, this is the time - * kept by the local machine where the span execution ends. On the server - * side, this is the time when the server application handler stops running. - * @type \Google\Cloud\Trace\V2\Span\Attributes $attributes - * A set of attributes on the span. You can have up to 32 attributes per - * span. - * @type \Google\Cloud\Trace\V2\StackTrace $stack_trace - * Stack trace captured at the start of the span. - * @type \Google\Cloud\Trace\V2\Span\TimeEvents $time_events - * A set of time events. You can have up to 32 annotations and 128 message - * events per span. - * @type \Google\Cloud\Trace\V2\Span\Links $links - * Links associated with the span. You can have up to 128 links per Span. - * @type \Google\Rpc\Status $status - * Optional. The final status for this span. - * @type \Google\Protobuf\BoolValue $same_process_as_parent_span - * Optional. Set this parameter to indicate whether this span is in - * the same process as its parent. If you do not set this parameter, - * Trace is unable to take advantage of this helpful information. - * @type \Google\Protobuf\Int32Value $child_span_count - * Optional. The number of child spans that were generated while this span - * was active. If set, allows implementation to detect missing child spans. - * @type int $span_kind - * Optional. Distinguishes between spans generated in a particular context. - * For example, two spans with the same name may be distinguished using - * `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the span in the following format: - * * `projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]` - * `[TRACE_ID]` is a unique identifier for a trace within a project; - * it is a 32-character hexadecimal encoding of a 16-byte array. It should - * not be zero. - * `[SPAN_ID]` is a unique identifier for a span within a trace; it - * is a 16-character hexadecimal encoding of an 8-byte array. It should not - * be zero. - * . - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the span in the following format: - * * `projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/[SPAN_ID]` - * `[TRACE_ID]` is a unique identifier for a trace within a project; - * it is a 32-character hexadecimal encoding of a 16-byte array. It should - * not be zero. - * `[SPAN_ID]` is a unique identifier for a span within a trace; it - * is a 16-character hexadecimal encoding of an 8-byte array. It should not - * be zero. - * . - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The `[SPAN_ID]` portion of the span's resource name. - * - * Generated from protobuf field string span_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSpanId() - { - return $this->span_id; - } - - /** - * Required. The `[SPAN_ID]` portion of the span's resource name. - * - * Generated from protobuf field string span_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSpanId($var) - { - GPBUtil::checkString($var, True); - $this->span_id = $var; - - return $this; - } - - /** - * The `[SPAN_ID]` of this span's parent span. If this is a root span, - * then this field must be empty. - * - * Generated from protobuf field string parent_span_id = 3; - * @return string - */ - public function getParentSpanId() - { - return $this->parent_span_id; - } - - /** - * The `[SPAN_ID]` of this span's parent span. If this is a root span, - * then this field must be empty. - * - * Generated from protobuf field string parent_span_id = 3; - * @param string $var - * @return $this - */ - public function setParentSpanId($var) - { - GPBUtil::checkString($var, True); - $this->parent_span_id = $var; - - return $this; - } - - /** - * Required. A description of the span's operation (up to 128 bytes). - * Cloud Trace displays the description in the - * Cloud console. - * For example, the display name can be a qualified method name or a file name - * and a line number where the operation is called. A best practice is to use - * the same display name within an application and at the same call point. - * This makes it easier to correlate spans in different traces. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString display_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Trace\V2\TruncatableString|null - */ - public function getDisplayName() - { - return $this->display_name; - } - - public function hasDisplayName() - { - return isset($this->display_name); - } - - public function clearDisplayName() - { - unset($this->display_name); - } - - /** - * Required. A description of the span's operation (up to 128 bytes). - * Cloud Trace displays the description in the - * Cloud console. - * For example, the display name can be a qualified method name or a file name - * and a line number where the operation is called. A best practice is to use - * the same display name within an application and at the same call point. - * This makes it easier to correlate spans in different traces. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString display_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Trace\V2\TruncatableString $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class); - $this->display_name = $var; - - return $this; - } - - /** - * Required. The start time of the span. On the client side, this is the time - * kept by the local machine where the span execution starts. On the server - * side, this is the time when the server's application handler starts - * running. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = REQUIRED]; - * @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); - } - - /** - * Required. The start time of the span. On the client side, this is the time - * kept by the local machine where the span execution starts. On the server - * side, this is the time when the server's application handler starts - * running. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * Required. The end time of the span. On the client side, this is the time - * kept by the local machine where the span execution ends. On the server - * side, this is the time when the server application handler stops running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = REQUIRED]; - * @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); - } - - /** - * Required. The end time of the span. On the client side, this is the time - * kept by the local machine where the span execution ends. On the server - * side, this is the time when the server application handler stops running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - - /** - * A set of attributes on the span. You can have up to 32 attributes per - * span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Attributes attributes = 7; - * @return \Google\Cloud\Trace\V2\Span\Attributes|null - */ - public function getAttributes() - { - return $this->attributes; - } - - public function hasAttributes() - { - return isset($this->attributes); - } - - public function clearAttributes() - { - unset($this->attributes); - } - - /** - * A set of attributes on the span. You can have up to 32 attributes per - * span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Attributes attributes = 7; - * @param \Google\Cloud\Trace\V2\Span\Attributes $var - * @return $this - */ - public function setAttributes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\Span\Attributes::class); - $this->attributes = $var; - - return $this; - } - - /** - * Stack trace captured at the start of the span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.StackTrace stack_trace = 8; - * @return \Google\Cloud\Trace\V2\StackTrace|null - */ - public function getStackTrace() - { - return $this->stack_trace; - } - - public function hasStackTrace() - { - return isset($this->stack_trace); - } - - public function clearStackTrace() - { - unset($this->stack_trace); - } - - /** - * Stack trace captured at the start of the span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.StackTrace stack_trace = 8; - * @param \Google\Cloud\Trace\V2\StackTrace $var - * @return $this - */ - public function setStackTrace($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\StackTrace::class); - $this->stack_trace = $var; - - return $this; - } - - /** - * A set of time events. You can have up to 32 annotations and 128 message - * events per span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvents time_events = 9; - * @return \Google\Cloud\Trace\V2\Span\TimeEvents|null - */ - public function getTimeEvents() - { - return $this->time_events; - } - - public function hasTimeEvents() - { - return isset($this->time_events); - } - - public function clearTimeEvents() - { - unset($this->time_events); - } - - /** - * A set of time events. You can have up to 32 annotations and 128 message - * events per span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvents time_events = 9; - * @param \Google\Cloud\Trace\V2\Span\TimeEvents $var - * @return $this - */ - public function setTimeEvents($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\Span\TimeEvents::class); - $this->time_events = $var; - - return $this; - } - - /** - * Links associated with the span. You can have up to 128 links per Span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Links links = 10; - * @return \Google\Cloud\Trace\V2\Span\Links|null - */ - public function getLinks() - { - return $this->links; - } - - public function hasLinks() - { - return isset($this->links); - } - - public function clearLinks() - { - unset($this->links); - } - - /** - * Links associated with the span. You can have up to 128 links per Span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Links links = 10; - * @param \Google\Cloud\Trace\V2\Span\Links $var - * @return $this - */ - public function setLinks($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\Span\Links::class); - $this->links = $var; - - return $this; - } - - /** - * Optional. The final status for this span. - * - * Generated from protobuf field .google.rpc.Status status = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Rpc\Status|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * Optional. The final status for this span. - * - * Generated from protobuf field .google.rpc.Status status = 11 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->status = $var; - - return $this; - } - - /** - * Optional. Set this parameter to indicate whether this span is in - * the same process as its parent. If you do not set this parameter, - * Trace is unable to take advantage of this helpful information. - * - * Generated from protobuf field .google.protobuf.BoolValue same_process_as_parent_span = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\BoolValue|null - */ - public function getSameProcessAsParentSpan() - { - return $this->same_process_as_parent_span; - } - - public function hasSameProcessAsParentSpan() - { - return isset($this->same_process_as_parent_span); - } - - public function clearSameProcessAsParentSpan() - { - unset($this->same_process_as_parent_span); - } - - /** - * Returns the unboxed value from getSameProcessAsParentSpan() - - * Optional. Set this parameter to indicate whether this span is in - * the same process as its parent. If you do not set this parameter, - * Trace is unable to take advantage of this helpful information. - * - * Generated from protobuf field .google.protobuf.BoolValue same_process_as_parent_span = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool|null - */ - public function getSameProcessAsParentSpanUnwrapped() - { - return $this->readWrapperValue("same_process_as_parent_span"); - } - - /** - * Optional. Set this parameter to indicate whether this span is in - * the same process as its parent. If you do not set this parameter, - * Trace is unable to take advantage of this helpful information. - * - * Generated from protobuf field .google.protobuf.BoolValue same_process_as_parent_span = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\BoolValue $var - * @return $this - */ - public function setSameProcessAsParentSpan($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\BoolValue::class); - $this->same_process_as_parent_span = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\BoolValue object. - - * Optional. Set this parameter to indicate whether this span is in - * the same process as its parent. If you do not set this parameter, - * Trace is unable to take advantage of this helpful information. - * - * Generated from protobuf field .google.protobuf.BoolValue same_process_as_parent_span = 12 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool|null $var - * @return $this - */ - public function setSameProcessAsParentSpanUnwrapped($var) - { - $this->writeWrapperValue("same_process_as_parent_span", $var); - return $this;} - - /** - * Optional. The number of child spans that were generated while this span - * was active. If set, allows implementation to detect missing child spans. - * - * Generated from protobuf field .google.protobuf.Int32Value child_span_count = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Int32Value|null - */ - public function getChildSpanCount() - { - return $this->child_span_count; - } - - public function hasChildSpanCount() - { - return isset($this->child_span_count); - } - - public function clearChildSpanCount() - { - unset($this->child_span_count); - } - - /** - * Returns the unboxed value from getChildSpanCount() - - * Optional. The number of child spans that were generated while this span - * was active. If set, allows implementation to detect missing child spans. - * - * Generated from protobuf field .google.protobuf.Int32Value child_span_count = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @return int|null - */ - public function getChildSpanCountUnwrapped() - { - return $this->readWrapperValue("child_span_count"); - } - - /** - * Optional. The number of child spans that were generated while this span - * was active. If set, allows implementation to detect missing child spans. - * - * Generated from protobuf field .google.protobuf.Int32Value child_span_count = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Int32Value $var - * @return $this - */ - public function setChildSpanCount($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Int32Value::class); - $this->child_span_count = $var; - - return $this; - } - - /** - * Sets the field by wrapping a primitive type in a Google\Protobuf\Int32Value object. - - * Optional. The number of child spans that were generated while this span - * was active. If set, allows implementation to detect missing child spans. - * - * Generated from protobuf field .google.protobuf.Int32Value child_span_count = 13 [(.google.api.field_behavior) = OPTIONAL]; - * @param int|null $var - * @return $this - */ - public function setChildSpanCountUnwrapped($var) - { - $this->writeWrapperValue("child_span_count", $var); - return $this;} - - /** - * Optional. Distinguishes between spans generated in a particular context. - * For example, two spans with the same name may be distinguished using - * `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.SpanKind span_kind = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getSpanKind() - { - return $this->span_kind; - } - - /** - * Optional. Distinguishes between spans generated in a particular context. - * For example, two spans with the same name may be distinguished using - * `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.SpanKind span_kind = 14 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setSpanKind($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Trace\V2\Span\SpanKind::class); - $this->span_kind = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Attributes.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Attributes.php deleted file mode 100644 index 56f9f3858eee..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Attributes.php +++ /dev/null @@ -1,129 +0,0 @@ -google.devtools.cloudtrace.v2.Span.Attributes - */ -class Attributes extends \Google\Protobuf\Internal\Message -{ - /** - * A set of attributes. Each attribute's key can be up to 128 bytes - * long. The value can be a string up to 256 bytes, a signed 64-bit integer, - * or the boolean values `true` or `false`. For example: - * "/instance_id": { "string_value": { "value": "my-instance" } } - * "/http/request_bytes": { "int_value": 300 } - * "abc.com/myattribute": { "bool_value": false } - * - * Generated from protobuf field map attribute_map = 1; - */ - private $attribute_map; - /** - * The number of attributes that were discarded. Attributes can be discarded - * because their keys are too long or because there are too many attributes. - * If this value is 0 then all attributes are valid. - * - * Generated from protobuf field int32 dropped_attributes_count = 2; - */ - protected $dropped_attributes_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $attribute_map - * A set of attributes. Each attribute's key can be up to 128 bytes - * long. The value can be a string up to 256 bytes, a signed 64-bit integer, - * or the boolean values `true` or `false`. For example: - * "/instance_id": { "string_value": { "value": "my-instance" } } - * "/http/request_bytes": { "int_value": 300 } - * "abc.com/myattribute": { "bool_value": false } - * @type int $dropped_attributes_count - * The number of attributes that were discarded. Attributes can be discarded - * because their keys are too long or because there are too many attributes. - * If this value is 0 then all attributes are valid. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); - parent::__construct($data); - } - - /** - * A set of attributes. Each attribute's key can be up to 128 bytes - * long. The value can be a string up to 256 bytes, a signed 64-bit integer, - * or the boolean values `true` or `false`. For example: - * "/instance_id": { "string_value": { "value": "my-instance" } } - * "/http/request_bytes": { "int_value": 300 } - * "abc.com/myattribute": { "bool_value": false } - * - * Generated from protobuf field map attribute_map = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAttributeMap() - { - return $this->attribute_map; - } - - /** - * A set of attributes. Each attribute's key can be up to 128 bytes - * long. The value can be a string up to 256 bytes, a signed 64-bit integer, - * or the boolean values `true` or `false`. For example: - * "/instance_id": { "string_value": { "value": "my-instance" } } - * "/http/request_bytes": { "int_value": 300 } - * "abc.com/myattribute": { "bool_value": false } - * - * Generated from protobuf field map attribute_map = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAttributeMap($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V2\AttributeValue::class); - $this->attribute_map = $arr; - - return $this; - } - - /** - * The number of attributes that were discarded. Attributes can be discarded - * because their keys are too long or because there are too many attributes. - * If this value is 0 then all attributes are valid. - * - * Generated from protobuf field int32 dropped_attributes_count = 2; - * @return int - */ - public function getDroppedAttributesCount() - { - return $this->dropped_attributes_count; - } - - /** - * The number of attributes that were discarded. Attributes can be discarded - * because their keys are too long or because there are too many attributes. - * If this value is 0 then all attributes are valid. - * - * Generated from protobuf field int32 dropped_attributes_count = 2; - * @param int $var - * @return $this - */ - public function setDroppedAttributesCount($var) - { - GPBUtil::checkInt32($var); - $this->dropped_attributes_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link.php deleted file mode 100644 index 7742324ce4d4..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link.php +++ /dev/null @@ -1,186 +0,0 @@ -google.devtools.cloudtrace.v2.Span.Link - */ -class Link extends \Google\Protobuf\Internal\Message -{ - /** - * The `[TRACE_ID]` for a trace within a project. - * - * Generated from protobuf field string trace_id = 1; - */ - protected $trace_id = ''; - /** - * The `[SPAN_ID]` for a span within a trace. - * - * Generated from protobuf field string span_id = 2; - */ - protected $span_id = ''; - /** - * The relationship of the current span relative to the linked span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Link.Type type = 3; - */ - protected $type = 0; - /** - * A set of attributes on the link. Up to 32 attributes can be - * specified per link. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Attributes attributes = 4; - */ - protected $attributes = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $trace_id - * The `[TRACE_ID]` for a trace within a project. - * @type string $span_id - * The `[SPAN_ID]` for a span within a trace. - * @type int $type - * The relationship of the current span relative to the linked span. - * @type \Google\Cloud\Trace\V2\Span\Attributes $attributes - * A set of attributes on the link. Up to 32 attributes can be - * specified per link. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); - parent::__construct($data); - } - - /** - * The `[TRACE_ID]` for a trace within a project. - * - * Generated from protobuf field string trace_id = 1; - * @return string - */ - public function getTraceId() - { - return $this->trace_id; - } - - /** - * The `[TRACE_ID]` for a trace within a project. - * - * Generated from protobuf field string trace_id = 1; - * @param string $var - * @return $this - */ - public function setTraceId($var) - { - GPBUtil::checkString($var, True); - $this->trace_id = $var; - - return $this; - } - - /** - * The `[SPAN_ID]` for a span within a trace. - * - * Generated from protobuf field string span_id = 2; - * @return string - */ - public function getSpanId() - { - return $this->span_id; - } - - /** - * The `[SPAN_ID]` for a span within a trace. - * - * Generated from protobuf field string span_id = 2; - * @param string $var - * @return $this - */ - public function setSpanId($var) - { - GPBUtil::checkString($var, True); - $this->span_id = $var; - - return $this; - } - - /** - * The relationship of the current span relative to the linked span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Link.Type type = 3; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The relationship of the current span relative to the linked span. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Link.Type type = 3; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Trace\V2\Span\Link\Type::class); - $this->type = $var; - - return $this; - } - - /** - * A set of attributes on the link. Up to 32 attributes can be - * specified per link. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Attributes attributes = 4; - * @return \Google\Cloud\Trace\V2\Span\Attributes|null - */ - public function getAttributes() - { - return $this->attributes; - } - - public function hasAttributes() - { - return isset($this->attributes); - } - - public function clearAttributes() - { - unset($this->attributes); - } - - /** - * A set of attributes on the link. Up to 32 attributes can be - * specified per link. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Attributes attributes = 4; - * @param \Google\Cloud\Trace\V2\Span\Attributes $var - * @return $this - */ - public function setAttributes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\Span\Attributes::class); - $this->attributes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link/Type.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link/Type.php deleted file mode 100644 index 906a4dbea490..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Link/Type.php +++ /dev/null @@ -1,62 +0,0 @@ -google.devtools.cloudtrace.v2.Span.Link.Type - */ -class Type -{ - /** - * The relationship of the two spans is unknown. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * The linked span is a child of the current span. - * - * Generated from protobuf enum CHILD_LINKED_SPAN = 1; - */ - const CHILD_LINKED_SPAN = 1; - /** - * The linked span is a parent of the current span. - * - * Generated from protobuf enum PARENT_LINKED_SPAN = 2; - */ - const PARENT_LINKED_SPAN = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::CHILD_LINKED_SPAN => 'CHILD_LINKED_SPAN', - self::PARENT_LINKED_SPAN => 'PARENT_LINKED_SPAN', - ]; - - 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/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Links.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Links.php deleted file mode 100644 index c8bd76c68205..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/Links.php +++ /dev/null @@ -1,106 +0,0 @@ -google.devtools.cloudtrace.v2.Span.Links - */ -class Links extends \Google\Protobuf\Internal\Message -{ - /** - * A collection of links. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span.Link link = 1; - */ - private $link; - /** - * The number of dropped links after the maximum size was enforced. If - * this value is 0, then no links were dropped. - * - * Generated from protobuf field int32 dropped_links_count = 2; - */ - protected $dropped_links_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Trace\V2\Span\Link[] $link - * A collection of links. - * @type int $dropped_links_count - * The number of dropped links after the maximum size was enforced. If - * this value is 0, then no links were dropped. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); - parent::__construct($data); - } - - /** - * A collection of links. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span.Link link = 1; - * @return RepeatedField<\Google\Cloud\Trace\V2\Span\Link> - */ - public function getLink() - { - return $this->link; - } - - /** - * A collection of links. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span.Link link = 1; - * @param \Google\Cloud\Trace\V2\Span\Link[] $var - * @return $this - */ - public function setLink($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V2\Span\Link::class); - $this->link = $arr; - - return $this; - } - - /** - * The number of dropped links after the maximum size was enforced. If - * this value is 0, then no links were dropped. - * - * Generated from protobuf field int32 dropped_links_count = 2; - * @return int - */ - public function getDroppedLinksCount() - { - return $this->dropped_links_count; - } - - /** - * The number of dropped links after the maximum size was enforced. If - * this value is 0, then no links were dropped. - * - * Generated from protobuf field int32 dropped_links_count = 2; - * @param int $var - * @return $this - */ - public function setDroppedLinksCount($var) - { - GPBUtil::checkInt32($var); - $this->dropped_links_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/SpanKind.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/SpanKind.php deleted file mode 100644 index 6e3ebcf26e50..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/SpanKind.php +++ /dev/null @@ -1,92 +0,0 @@ -google.devtools.cloudtrace.v2.Span.SpanKind - */ -class SpanKind -{ - /** - * Unspecified. Do NOT use as default. - * Implementations MAY assume SpanKind.INTERNAL to be default. - * - * Generated from protobuf enum SPAN_KIND_UNSPECIFIED = 0; - */ - const SPAN_KIND_UNSPECIFIED = 0; - /** - * Indicates that the span is used internally. Default value. - * - * Generated from protobuf enum INTERNAL = 1; - */ - const INTERNAL = 1; - /** - * Indicates that the span covers server-side handling of an RPC or other - * remote network request. - * - * Generated from protobuf enum SERVER = 2; - */ - const SERVER = 2; - /** - * Indicates that the span covers the client-side wrapper around an RPC or - * other remote request. - * - * Generated from protobuf enum CLIENT = 3; - */ - const CLIENT = 3; - /** - * Indicates that the span describes producer sending a message to a broker. - * Unlike client and server, there is no direct critical path latency - * relationship between producer and consumer spans (e.g. publishing a - * message to a pubsub service). - * - * Generated from protobuf enum PRODUCER = 4; - */ - const PRODUCER = 4; - /** - * Indicates that the span describes consumer receiving a message from a - * broker. Unlike client and server, there is no direct critical path - * latency relationship between producer and consumer spans (e.g. receiving - * a message from a pubsub service subscription). - * - * Generated from protobuf enum CONSUMER = 5; - */ - const CONSUMER = 5; - - private static $valueToName = [ - self::SPAN_KIND_UNSPECIFIED => 'SPAN_KIND_UNSPECIFIED', - self::INTERNAL => 'INTERNAL', - self::SERVER => 'SERVER', - self::CLIENT => 'CLIENT', - self::PRODUCER => 'PRODUCER', - self::CONSUMER => 'CONSUMER', - ]; - - 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/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent.php deleted file mode 100644 index b3f8fe87615f..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent.php +++ /dev/null @@ -1,152 +0,0 @@ -google.devtools.cloudtrace.v2.Span.TimeEvent - */ -class TimeEvent extends \Google\Protobuf\Internal\Message -{ - /** - * The timestamp indicating the time the event occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp time = 1; - */ - protected $time = null; - protected $value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $time - * The timestamp indicating the time the event occurred. - * @type \Google\Cloud\Trace\V2\Span\TimeEvent\Annotation $annotation - * Text annotation with a set of attributes. - * @type \Google\Cloud\Trace\V2\Span\TimeEvent\MessageEvent $message_event - * An event describing a message sent/received between Spans. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); - parent::__construct($data); - } - - /** - * The timestamp indicating the time the event occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getTime() - { - return $this->time; - } - - public function hasTime() - { - return isset($this->time); - } - - public function clearTime() - { - unset($this->time); - } - - /** - * The timestamp indicating the time the event occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->time = $var; - - return $this; - } - - /** - * Text annotation with a set of attributes. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation annotation = 2; - * @return \Google\Cloud\Trace\V2\Span\TimeEvent\Annotation|null - */ - public function getAnnotation() - { - return $this->readOneof(2); - } - - public function hasAnnotation() - { - return $this->hasOneof(2); - } - - /** - * Text annotation with a set of attributes. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation annotation = 2; - * @param \Google\Cloud\Trace\V2\Span\TimeEvent\Annotation $var - * @return $this - */ - public function setAnnotation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\Span\TimeEvent\Annotation::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * An event describing a message sent/received between Spans. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent message_event = 3; - * @return \Google\Cloud\Trace\V2\Span\TimeEvent\MessageEvent|null - */ - public function getMessageEvent() - { - return $this->readOneof(3); - } - - public function hasMessageEvent() - { - return $this->hasOneof(3); - } - - /** - * An event describing a message sent/received between Spans. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent message_event = 3; - * @param \Google\Cloud\Trace\V2\Span\TimeEvent\MessageEvent $var - * @return $this - */ - public function setMessageEvent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\Span\TimeEvent\MessageEvent::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getValue() - { - return $this->whichOneof("value"); - } - -} - diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/Annotation.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/Annotation.php deleted file mode 100644 index 826f24e7f966..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/Annotation.php +++ /dev/null @@ -1,129 +0,0 @@ -google.devtools.cloudtrace.v2.Span.TimeEvent.Annotation - */ -class Annotation extends \Google\Protobuf\Internal\Message -{ - /** - * A user-supplied message describing the event. The maximum length for - * the description is 256 bytes. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString description = 1; - */ - protected $description = null; - /** - * A set of attributes on the annotation. You can have up to 4 attributes - * per Annotation. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Attributes attributes = 2; - */ - protected $attributes = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Trace\V2\TruncatableString $description - * A user-supplied message describing the event. The maximum length for - * the description is 256 bytes. - * @type \Google\Cloud\Trace\V2\Span\Attributes $attributes - * A set of attributes on the annotation. You can have up to 4 attributes - * per Annotation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); - parent::__construct($data); - } - - /** - * A user-supplied message describing the event. The maximum length for - * the description is 256 bytes. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString description = 1; - * @return \Google\Cloud\Trace\V2\TruncatableString|null - */ - public function getDescription() - { - return $this->description; - } - - public function hasDescription() - { - return isset($this->description); - } - - public function clearDescription() - { - unset($this->description); - } - - /** - * A user-supplied message describing the event. The maximum length for - * the description is 256 bytes. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString description = 1; - * @param \Google\Cloud\Trace\V2\TruncatableString $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class); - $this->description = $var; - - return $this; - } - - /** - * A set of attributes on the annotation. You can have up to 4 attributes - * per Annotation. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Attributes attributes = 2; - * @return \Google\Cloud\Trace\V2\Span\Attributes|null - */ - public function getAttributes() - { - return $this->attributes; - } - - public function hasAttributes() - { - return isset($this->attributes); - } - - public function clearAttributes() - { - unset($this->attributes); - } - - /** - * A set of attributes on the annotation. You can have up to 4 attributes - * per Annotation. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.Attributes attributes = 2; - * @param \Google\Cloud\Trace\V2\Span\Attributes $var - * @return $this - */ - public function setAttributes($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\Span\Attributes::class); - $this->attributes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent.php deleted file mode 100644 index 0c34f5fc43e5..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent.php +++ /dev/null @@ -1,185 +0,0 @@ -google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent - */ -class MessageEvent extends \Google\Protobuf\Internal\Message -{ - /** - * Type of MessageEvent. Indicates whether the message was sent or - * received. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.Type type = 1; - */ - protected $type = 0; - /** - * An identifier for the MessageEvent's message that can be used to match - * `SENT` and `RECEIVED` MessageEvents. - * - * Generated from protobuf field int64 id = 2; - */ - protected $id = 0; - /** - * The number of uncompressed bytes sent or received. - * - * Generated from protobuf field int64 uncompressed_size_bytes = 3; - */ - protected $uncompressed_size_bytes = 0; - /** - * The number of compressed bytes sent or received. If missing, the - * compressed size is assumed to be the same size as the uncompressed - * size. - * - * Generated from protobuf field int64 compressed_size_bytes = 4; - */ - protected $compressed_size_bytes = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Type of MessageEvent. Indicates whether the message was sent or - * received. - * @type int|string $id - * An identifier for the MessageEvent's message that can be used to match - * `SENT` and `RECEIVED` MessageEvents. - * @type int|string $uncompressed_size_bytes - * The number of uncompressed bytes sent or received. - * @type int|string $compressed_size_bytes - * The number of compressed bytes sent or received. If missing, the - * compressed size is assumed to be the same size as the uncompressed - * size. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Type of MessageEvent. Indicates whether the message was sent or - * received. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Type of MessageEvent. Indicates whether the message was sent or - * received. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Trace\V2\Span\TimeEvent\MessageEvent\Type::class); - $this->type = $var; - - return $this; - } - - /** - * An identifier for the MessageEvent's message that can be used to match - * `SENT` and `RECEIVED` MessageEvents. - * - * Generated from protobuf field int64 id = 2; - * @return int|string - */ - public function getId() - { - return $this->id; - } - - /** - * An identifier for the MessageEvent's message that can be used to match - * `SENT` and `RECEIVED` MessageEvents. - * - * Generated from protobuf field int64 id = 2; - * @param int|string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkInt64($var); - $this->id = $var; - - return $this; - } - - /** - * The number of uncompressed bytes sent or received. - * - * Generated from protobuf field int64 uncompressed_size_bytes = 3; - * @return int|string - */ - public function getUncompressedSizeBytes() - { - return $this->uncompressed_size_bytes; - } - - /** - * The number of uncompressed bytes sent or received. - * - * Generated from protobuf field int64 uncompressed_size_bytes = 3; - * @param int|string $var - * @return $this - */ - public function setUncompressedSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->uncompressed_size_bytes = $var; - - return $this; - } - - /** - * The number of compressed bytes sent or received. If missing, the - * compressed size is assumed to be the same size as the uncompressed - * size. - * - * Generated from protobuf field int64 compressed_size_bytes = 4; - * @return int|string - */ - public function getCompressedSizeBytes() - { - return $this->compressed_size_bytes; - } - - /** - * The number of compressed bytes sent or received. If missing, the - * compressed size is assumed to be the same size as the uncompressed - * size. - * - * Generated from protobuf field int64 compressed_size_bytes = 4; - * @param int|string $var - * @return $this - */ - public function setCompressedSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->compressed_size_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent/Type.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent/Type.php deleted file mode 100644 index 7fcb66587fdf..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvent/MessageEvent/Type.php +++ /dev/null @@ -1,61 +0,0 @@ -google.devtools.cloudtrace.v2.Span.TimeEvent.MessageEvent.Type - */ -class Type -{ - /** - * Unknown event type. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Indicates a sent message. - * - * Generated from protobuf enum SENT = 1; - */ - const SENT = 1; - /** - * Indicates a received message. - * - * Generated from protobuf enum RECEIVED = 2; - */ - const RECEIVED = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::SENT => 'SENT', - self::RECEIVED => 'RECEIVED', - ]; - - 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/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvents.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvents.php deleted file mode 100644 index 9cb3408a24d7..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/Span/TimeEvents.php +++ /dev/null @@ -1,145 +0,0 @@ -google.devtools.cloudtrace.v2.Span.TimeEvents - */ -class TimeEvents extends \Google\Protobuf\Internal\Message -{ - /** - * A collection of `TimeEvent`s. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span.TimeEvent time_event = 1; - */ - private $time_event; - /** - * The number of dropped annotations in all the included time events. - * If the value is 0, then no annotations were dropped. - * - * Generated from protobuf field int32 dropped_annotations_count = 2; - */ - protected $dropped_annotations_count = 0; - /** - * The number of dropped message events in all the included time events. - * If the value is 0, then no message events were dropped. - * - * Generated from protobuf field int32 dropped_message_events_count = 3; - */ - protected $dropped_message_events_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Trace\V2\Span\TimeEvent[] $time_event - * A collection of `TimeEvent`s. - * @type int $dropped_annotations_count - * The number of dropped annotations in all the included time events. - * If the value is 0, then no annotations were dropped. - * @type int $dropped_message_events_count - * The number of dropped message events in all the included time events. - * If the value is 0, then no message events were dropped. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); - parent::__construct($data); - } - - /** - * A collection of `TimeEvent`s. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span.TimeEvent time_event = 1; - * @return RepeatedField<\Google\Cloud\Trace\V2\Span\TimeEvent> - */ - public function getTimeEvent() - { - return $this->time_event; - } - - /** - * A collection of `TimeEvent`s. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.Span.TimeEvent time_event = 1; - * @param \Google\Cloud\Trace\V2\Span\TimeEvent[] $var - * @return $this - */ - public function setTimeEvent($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V2\Span\TimeEvent::class); - $this->time_event = $arr; - - return $this; - } - - /** - * The number of dropped annotations in all the included time events. - * If the value is 0, then no annotations were dropped. - * - * Generated from protobuf field int32 dropped_annotations_count = 2; - * @return int - */ - public function getDroppedAnnotationsCount() - { - return $this->dropped_annotations_count; - } - - /** - * The number of dropped annotations in all the included time events. - * If the value is 0, then no annotations were dropped. - * - * Generated from protobuf field int32 dropped_annotations_count = 2; - * @param int $var - * @return $this - */ - public function setDroppedAnnotationsCount($var) - { - GPBUtil::checkInt32($var); - $this->dropped_annotations_count = $var; - - return $this; - } - - /** - * The number of dropped message events in all the included time events. - * If the value is 0, then no message events were dropped. - * - * Generated from protobuf field int32 dropped_message_events_count = 3; - * @return int - */ - public function getDroppedMessageEventsCount() - { - return $this->dropped_message_events_count; - } - - /** - * The number of dropped message events in all the included time events. - * If the value is 0, then no message events were dropped. - * - * Generated from protobuf field int32 dropped_message_events_count = 3; - * @param int $var - * @return $this - */ - public function setDroppedMessageEventsCount($var) - { - GPBUtil::checkInt32($var); - $this->dropped_message_events_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace.php deleted file mode 100644 index 6363d89a1388..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace.php +++ /dev/null @@ -1,135 +0,0 @@ -google.devtools.cloudtrace.v2.StackTrace - */ -class StackTrace extends \Google\Protobuf\Internal\Message -{ - /** - * Stack frames in this stack trace. A maximum of 128 frames are allowed. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.StackTrace.StackFrames stack_frames = 1; - */ - protected $stack_frames = null; - /** - * The hash ID is used to conserve network bandwidth for duplicate - * stack traces within a single trace. - * Often multiple spans will have identical stack traces. - * The first occurrence of a stack trace should contain both the - * `stackFrame` content and a value in `stackTraceHashId`. - * Subsequent spans within the same request can refer - * to that stack trace by only setting `stackTraceHashId`. - * - * Generated from protobuf field int64 stack_trace_hash_id = 2; - */ - protected $stack_trace_hash_id = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Trace\V2\StackTrace\StackFrames $stack_frames - * Stack frames in this stack trace. A maximum of 128 frames are allowed. - * @type int|string $stack_trace_hash_id - * The hash ID is used to conserve network bandwidth for duplicate - * stack traces within a single trace. - * Often multiple spans will have identical stack traces. - * The first occurrence of a stack trace should contain both the - * `stackFrame` content and a value in `stackTraceHashId`. - * Subsequent spans within the same request can refer - * to that stack trace by only setting `stackTraceHashId`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Stack frames in this stack trace. A maximum of 128 frames are allowed. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.StackTrace.StackFrames stack_frames = 1; - * @return \Google\Cloud\Trace\V2\StackTrace\StackFrames|null - */ - public function getStackFrames() - { - return $this->stack_frames; - } - - public function hasStackFrames() - { - return isset($this->stack_frames); - } - - public function clearStackFrames() - { - unset($this->stack_frames); - } - - /** - * Stack frames in this stack trace. A maximum of 128 frames are allowed. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.StackTrace.StackFrames stack_frames = 1; - * @param \Google\Cloud\Trace\V2\StackTrace\StackFrames $var - * @return $this - */ - public function setStackFrames($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\StackTrace\StackFrames::class); - $this->stack_frames = $var; - - return $this; - } - - /** - * The hash ID is used to conserve network bandwidth for duplicate - * stack traces within a single trace. - * Often multiple spans will have identical stack traces. - * The first occurrence of a stack trace should contain both the - * `stackFrame` content and a value in `stackTraceHashId`. - * Subsequent spans within the same request can refer - * to that stack trace by only setting `stackTraceHashId`. - * - * Generated from protobuf field int64 stack_trace_hash_id = 2; - * @return int|string - */ - public function getStackTraceHashId() - { - return $this->stack_trace_hash_id; - } - - /** - * The hash ID is used to conserve network bandwidth for duplicate - * stack traces within a single trace. - * Often multiple spans will have identical stack traces. - * The first occurrence of a stack trace should contain both the - * `stackFrame` content and a value in `stackTraceHashId`. - * Subsequent spans within the same request can refer - * to that stack trace by only setting `stackTraceHashId`. - * - * Generated from protobuf field int64 stack_trace_hash_id = 2; - * @param int|string $var - * @return $this - */ - public function setStackTraceHashId($var) - { - GPBUtil::checkInt64($var); - $this->stack_trace_hash_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrame.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrame.php deleted file mode 100644 index f2b789f56775..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrame.php +++ /dev/null @@ -1,345 +0,0 @@ -google.devtools.cloudtrace.v2.StackTrace.StackFrame - */ -class StackFrame extends \Google\Protobuf\Internal\Message -{ - /** - * The fully-qualified name that uniquely identifies the function or - * method that is active in this frame (up to 1024 bytes). - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString function_name = 1; - */ - protected $function_name = null; - /** - * An un-mangled function name, if `function_name` is mangled. - * To get information about name mangling, run - * [this search](https://www.google.com/search?q=cxx+name+mangling). - * The name can be fully-qualified (up to 1024 bytes). - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString original_function_name = 2; - */ - protected $original_function_name = null; - /** - * The name of the source file where the function call appears (up to 256 - * bytes). - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString file_name = 3; - */ - protected $file_name = null; - /** - * The line number in `file_name` where the function call appears. - * - * Generated from protobuf field int64 line_number = 4; - */ - protected $line_number = 0; - /** - * The column number where the function call appears, if available. - * This is important in JavaScript because of its anonymous functions. - * - * Generated from protobuf field int64 column_number = 5; - */ - protected $column_number = 0; - /** - * The binary module from where the code was loaded. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Module load_module = 6; - */ - protected $load_module = null; - /** - * The version of the deployed source code (up to 128 bytes). - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString source_version = 7; - */ - protected $source_version = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Trace\V2\TruncatableString $function_name - * The fully-qualified name that uniquely identifies the function or - * method that is active in this frame (up to 1024 bytes). - * @type \Google\Cloud\Trace\V2\TruncatableString $original_function_name - * An un-mangled function name, if `function_name` is mangled. - * To get information about name mangling, run - * [this search](https://www.google.com/search?q=cxx+name+mangling). - * The name can be fully-qualified (up to 1024 bytes). - * @type \Google\Cloud\Trace\V2\TruncatableString $file_name - * The name of the source file where the function call appears (up to 256 - * bytes). - * @type int|string $line_number - * The line number in `file_name` where the function call appears. - * @type int|string $column_number - * The column number where the function call appears, if available. - * This is important in JavaScript because of its anonymous functions. - * @type \Google\Cloud\Trace\V2\Module $load_module - * The binary module from where the code was loaded. - * @type \Google\Cloud\Trace\V2\TruncatableString $source_version - * The version of the deployed source code (up to 128 bytes). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); - parent::__construct($data); - } - - /** - * The fully-qualified name that uniquely identifies the function or - * method that is active in this frame (up to 1024 bytes). - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString function_name = 1; - * @return \Google\Cloud\Trace\V2\TruncatableString|null - */ - public function getFunctionName() - { - return $this->function_name; - } - - public function hasFunctionName() - { - return isset($this->function_name); - } - - public function clearFunctionName() - { - unset($this->function_name); - } - - /** - * The fully-qualified name that uniquely identifies the function or - * method that is active in this frame (up to 1024 bytes). - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString function_name = 1; - * @param \Google\Cloud\Trace\V2\TruncatableString $var - * @return $this - */ - public function setFunctionName($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class); - $this->function_name = $var; - - return $this; - } - - /** - * An un-mangled function name, if `function_name` is mangled. - * To get information about name mangling, run - * [this search](https://www.google.com/search?q=cxx+name+mangling). - * The name can be fully-qualified (up to 1024 bytes). - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString original_function_name = 2; - * @return \Google\Cloud\Trace\V2\TruncatableString|null - */ - public function getOriginalFunctionName() - { - return $this->original_function_name; - } - - public function hasOriginalFunctionName() - { - return isset($this->original_function_name); - } - - public function clearOriginalFunctionName() - { - unset($this->original_function_name); - } - - /** - * An un-mangled function name, if `function_name` is mangled. - * To get information about name mangling, run - * [this search](https://www.google.com/search?q=cxx+name+mangling). - * The name can be fully-qualified (up to 1024 bytes). - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString original_function_name = 2; - * @param \Google\Cloud\Trace\V2\TruncatableString $var - * @return $this - */ - public function setOriginalFunctionName($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class); - $this->original_function_name = $var; - - return $this; - } - - /** - * The name of the source file where the function call appears (up to 256 - * bytes). - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString file_name = 3; - * @return \Google\Cloud\Trace\V2\TruncatableString|null - */ - public function getFileName() - { - return $this->file_name; - } - - public function hasFileName() - { - return isset($this->file_name); - } - - public function clearFileName() - { - unset($this->file_name); - } - - /** - * The name of the source file where the function call appears (up to 256 - * bytes). - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString file_name = 3; - * @param \Google\Cloud\Trace\V2\TruncatableString $var - * @return $this - */ - public function setFileName($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class); - $this->file_name = $var; - - return $this; - } - - /** - * The line number in `file_name` where the function call appears. - * - * Generated from protobuf field int64 line_number = 4; - * @return int|string - */ - public function getLineNumber() - { - return $this->line_number; - } - - /** - * The line number in `file_name` where the function call appears. - * - * Generated from protobuf field int64 line_number = 4; - * @param int|string $var - * @return $this - */ - public function setLineNumber($var) - { - GPBUtil::checkInt64($var); - $this->line_number = $var; - - return $this; - } - - /** - * The column number where the function call appears, if available. - * This is important in JavaScript because of its anonymous functions. - * - * Generated from protobuf field int64 column_number = 5; - * @return int|string - */ - public function getColumnNumber() - { - return $this->column_number; - } - - /** - * The column number where the function call appears, if available. - * This is important in JavaScript because of its anonymous functions. - * - * Generated from protobuf field int64 column_number = 5; - * @param int|string $var - * @return $this - */ - public function setColumnNumber($var) - { - GPBUtil::checkInt64($var); - $this->column_number = $var; - - return $this; - } - - /** - * The binary module from where the code was loaded. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Module load_module = 6; - * @return \Google\Cloud\Trace\V2\Module|null - */ - public function getLoadModule() - { - return $this->load_module; - } - - public function hasLoadModule() - { - return isset($this->load_module); - } - - public function clearLoadModule() - { - unset($this->load_module); - } - - /** - * The binary module from where the code was loaded. - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.Module load_module = 6; - * @param \Google\Cloud\Trace\V2\Module $var - * @return $this - */ - public function setLoadModule($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\Module::class); - $this->load_module = $var; - - return $this; - } - - /** - * The version of the deployed source code (up to 128 bytes). - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString source_version = 7; - * @return \Google\Cloud\Trace\V2\TruncatableString|null - */ - public function getSourceVersion() - { - return $this->source_version; - } - - public function hasSourceVersion() - { - return isset($this->source_version); - } - - public function clearSourceVersion() - { - unset($this->source_version); - } - - /** - * The version of the deployed source code (up to 128 bytes). - * - * Generated from protobuf field .google.devtools.cloudtrace.v2.TruncatableString source_version = 7; - * @param \Google\Cloud\Trace\V2\TruncatableString $var - * @return $this - */ - public function setSourceVersion($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Trace\V2\TruncatableString::class); - $this->source_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrames.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrames.php deleted file mode 100644 index 29df626fb376..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/StackTrace/StackFrames.php +++ /dev/null @@ -1,109 +0,0 @@ -google.devtools.cloudtrace.v2.StackTrace.StackFrames - */ -class StackFrames extends \Google\Protobuf\Internal\Message -{ - /** - * Stack frames in this call stack. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.StackTrace.StackFrame frame = 1; - */ - private $frame; - /** - * The number of stack frames that were dropped because there - * were too many stack frames. - * If this value is 0, then no stack frames were dropped. - * - * Generated from protobuf field int32 dropped_frames_count = 2; - */ - protected $dropped_frames_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Trace\V2\StackTrace\StackFrame[] $frame - * Stack frames in this call stack. - * @type int $dropped_frames_count - * The number of stack frames that were dropped because there - * were too many stack frames. - * If this value is 0, then no stack frames were dropped. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); - parent::__construct($data); - } - - /** - * Stack frames in this call stack. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.StackTrace.StackFrame frame = 1; - * @return RepeatedField<\Google\Cloud\Trace\V2\StackTrace\StackFrame> - */ - public function getFrame() - { - return $this->frame; - } - - /** - * Stack frames in this call stack. - * - * Generated from protobuf field repeated .google.devtools.cloudtrace.v2.StackTrace.StackFrame frame = 1; - * @param \Google\Cloud\Trace\V2\StackTrace\StackFrame[] $var - * @return $this - */ - public function setFrame($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Trace\V2\StackTrace\StackFrame::class); - $this->frame = $arr; - - return $this; - } - - /** - * The number of stack frames that were dropped because there - * were too many stack frames. - * If this value is 0, then no stack frames were dropped. - * - * Generated from protobuf field int32 dropped_frames_count = 2; - * @return int - */ - public function getDroppedFramesCount() - { - return $this->dropped_frames_count; - } - - /** - * The number of stack frames that were dropped because there - * were too many stack frames. - * If this value is 0, then no stack frames were dropped. - * - * Generated from protobuf field int32 dropped_frames_count = 2; - * @param int $var - * @return $this - */ - public function setDroppedFramesCount($var) - { - GPBUtil::checkInt32($var); - $this->dropped_frames_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/TruncatableString.php b/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/TruncatableString.php deleted file mode 100644 index 0afad14951f8..000000000000 --- a/owl-bot-staging/Trace/v2/proto/src/Google/Cloud/Trace/V2/TruncatableString.php +++ /dev/null @@ -1,125 +0,0 @@ -google.devtools.cloudtrace.v2.TruncatableString - */ -class TruncatableString extends \Google\Protobuf\Internal\Message -{ - /** - * The shortened string. For example, if the original string is 500 - * bytes long and the limit of the string is 128 bytes, then - * `value` contains the first 128 bytes of the 500-byte string. - * Truncation always happens on a UTF8 character boundary. If there - * are multi-byte characters in the string, then the length of the - * shortened string might be less than the size limit. - * - * Generated from protobuf field string value = 1; - */ - protected $value = ''; - /** - * The number of bytes removed from the original string. If this - * value is 0, then the string was not shortened. - * - * Generated from protobuf field int32 truncated_byte_count = 2; - */ - protected $truncated_byte_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $value - * The shortened string. For example, if the original string is 500 - * bytes long and the limit of the string is 128 bytes, then - * `value` contains the first 128 bytes of the 500-byte string. - * Truncation always happens on a UTF8 character boundary. If there - * are multi-byte characters in the string, then the length of the - * shortened string might be less than the size limit. - * @type int $truncated_byte_count - * The number of bytes removed from the original string. If this - * value is 0, then the string was not shortened. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Devtools\Cloudtrace\V2\Trace::initOnce(); - parent::__construct($data); - } - - /** - * The shortened string. For example, if the original string is 500 - * bytes long and the limit of the string is 128 bytes, then - * `value` contains the first 128 bytes of the 500-byte string. - * Truncation always happens on a UTF8 character boundary. If there - * are multi-byte characters in the string, then the length of the - * shortened string might be less than the size limit. - * - * Generated from protobuf field string value = 1; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The shortened string. For example, if the original string is 500 - * bytes long and the limit of the string is 128 bytes, then - * `value` contains the first 128 bytes of the 500-byte string. - * Truncation always happens on a UTF8 character boundary. If there - * are multi-byte characters in the string, then the length of the - * shortened string might be less than the size limit. - * - * Generated from protobuf field string value = 1; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - - /** - * The number of bytes removed from the original string. If this - * value is 0, then the string was not shortened. - * - * Generated from protobuf field int32 truncated_byte_count = 2; - * @return int - */ - public function getTruncatedByteCount() - { - return $this->truncated_byte_count; - } - - /** - * The number of bytes removed from the original string. If this - * value is 0, then the string was not shortened. - * - * Generated from protobuf field int32 truncated_byte_count = 2; - * @param int $var - * @return $this - */ - public function setTruncatedByteCount($var) - { - GPBUtil::checkInt32($var); - $this->truncated_byte_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Trace/v2/samples/V2/TraceServiceClient/batch_write_spans.php b/owl-bot-staging/Trace/v2/samples/V2/TraceServiceClient/batch_write_spans.php deleted file mode 100644 index df92e0c777ac..000000000000 --- a/owl-bot-staging/Trace/v2/samples/V2/TraceServiceClient/batch_write_spans.php +++ /dev/null @@ -1,103 +0,0 @@ -setName($spansName) - ->setSpanId($spansSpanId) - ->setDisplayName($spansDisplayName) - ->setStartTime($spansStartTime) - ->setEndTime($spansEndTime); - $spans = [$span,]; - $request = (new BatchWriteSpansRequest()) - ->setName($formattedName) - ->setSpans($spans); - - // Call the API and handle any network failures. - try { - $traceServiceClient->batchWriteSpans($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = TraceServiceClient::projectName('[PROJECT]'); - $spansName = '[NAME]'; - $spansSpanId = '[SPAN_ID]'; - - batch_write_spans_sample($formattedName, $spansName, $spansSpanId); -} -// [END cloudtrace_v2_generated_TraceService_BatchWriteSpans_sync] diff --git a/owl-bot-staging/Trace/v2/samples/V2/TraceServiceClient/create_span.php b/owl-bot-staging/Trace/v2/samples/V2/TraceServiceClient/create_span.php deleted file mode 100644 index 6f1721930e63..000000000000 --- a/owl-bot-staging/Trace/v2/samples/V2/TraceServiceClient/create_span.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($name) - ->setSpanId($spanId) - ->setDisplayName($displayName) - ->setStartTime($startTime) - ->setEndTime($endTime); - - // Call the API and handle any network failures. - try { - /** @var Span $response */ - $response = $traceServiceClient->createSpan($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $name = '[NAME]'; - $spanId = '[SPAN_ID]'; - - create_span_sample($name, $spanId); -} -// [END cloudtrace_v2_generated_TraceService_CreateSpan_sync] diff --git a/owl-bot-staging/Trace/v2/src/V2/Client/TraceServiceClient.php b/owl-bot-staging/Trace/v2/src/V2/Client/TraceServiceClient.php deleted file mode 100644 index aa10f09aa88b..000000000000 --- a/owl-bot-staging/Trace/v2/src/V2/Client/TraceServiceClient.php +++ /dev/null @@ -1,304 +0,0 @@ - batchWriteSpansAsync(BatchWriteSpansRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSpanAsync(Span $request, array $optionalArgs = []) - */ -final class TraceServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.devtools.cloudtrace.v2.TraceService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudtrace.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudtrace.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - 'https://www.googleapis.com/auth/trace.append', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/trace_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/trace_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/trace_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/trace_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a span - * resource. - * - * @param string $project - * @param string $trace - * @param string $span - * - * @return string The formatted span resource. - */ - public static function spanName(string $project, string $trace, string $span): string - { - return self::getPathTemplate('span')->render([ - 'project' => $project, - 'trace' => $trace, - 'span' => $span, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - project: projects/{project} - * - span: projects/{project}/traces/{trace}/spans/{span} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'cloudtrace.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\Trace\V2\TraceServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new TraceServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Batch writes new spans to new or existing traces. You cannot update - * existing spans. - * - * The async variant is {@see TraceServiceClient::batchWriteSpansAsync()} . - * - * @example samples/V2/TraceServiceClient/batch_write_spans.php - * - * @param BatchWriteSpansRequest $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 batchWriteSpans(BatchWriteSpansRequest $request, array $callOptions = []): void - { - $this->startApiCall('BatchWriteSpans', $request, $callOptions)->wait(); - } - - /** - * Creates a new span. - * - * The async variant is {@see TraceServiceClient::createSpanAsync()} . - * - * @example samples/V2/TraceServiceClient/create_span.php - * - * @param Span $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 Span - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSpan(Span $request, array $callOptions = []): Span - { - return $this->startApiCall('CreateSpan', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Trace/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Trace/v2/src/V2/gapic_metadata.json deleted file mode 100644 index 5917f6fef5be..000000000000 --- a/owl-bot-staging/Trace/v2/src/V2/gapic_metadata.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.devtools.cloudtrace.v2", - "libraryPackage": "Google\\Cloud\\Trace\\V2", - "services": { - "TraceService": { - "clients": { - "grpc": { - "libraryClient": "TraceServiceGapicClient", - "rpcs": { - "BatchWriteSpans": { - "methods": [ - "batchWriteSpans" - ] - }, - "CreateSpan": { - "methods": [ - "createSpan" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Trace/v2/src/V2/resources/trace_service_client_config.json b/owl-bot-staging/Trace/v2/src/V2/resources/trace_service_client_config.json deleted file mode 100644 index 527565fb4b5c..000000000000 --- a/owl-bot-staging/Trace/v2/src/V2/resources/trace_service_client_config.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "interfaces": { - "google.devtools.cloudtrace.v2.TraceService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ], - "retry_policy_2_codes": [ - "UNAVAILABLE", - "DEADLINE_EXCEEDED" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 2.0, - "max_retry_delay_millis": 30000, - "initial_rpc_timeout_millis": 120000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 120000, - "total_timeout_millis": 120000 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.2, - "max_retry_delay_millis": 1000, - "initial_rpc_timeout_millis": 120000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 120000, - "total_timeout_millis": 120000 - } - }, - "methods": { - "BatchWriteSpans": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateSpan": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - } - } - } - } -} diff --git a/owl-bot-staging/Trace/v2/src/V2/resources/trace_service_descriptor_config.php b/owl-bot-staging/Trace/v2/src/V2/resources/trace_service_descriptor_config.php deleted file mode 100644 index 7e314c14a398..000000000000 --- a/owl-bot-staging/Trace/v2/src/V2/resources/trace_service_descriptor_config.php +++ /dev/null @@ -1,56 +0,0 @@ - [ - 'google.devtools.cloudtrace.v2.TraceService' => [ - 'BatchWriteSpans' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateSpan' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Trace\V2\Span', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'project' => 'projects/{project}', - 'span' => 'projects/{project}/traces/{trace}/spans/{span}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Trace/v2/src/V2/resources/trace_service_rest_client_config.php b/owl-bot-staging/Trace/v2/src/V2/resources/trace_service_rest_client_config.php deleted file mode 100644 index c03716ffd1e2..000000000000 --- a/owl-bot-staging/Trace/v2/src/V2/resources/trace_service_rest_client_config.php +++ /dev/null @@ -1,53 +0,0 @@ - [ - 'google.devtools.cloudtrace.v2.TraceService' => [ - 'BatchWriteSpans' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*}/traces:batchWrite', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateSpan' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/traces/*/spans/*}', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Trace/v2/tests/Unit/V2/Client/TraceServiceClientTest.php b/owl-bot-staging/Trace/v2/tests/Unit/V2/Client/TraceServiceClientTest.php deleted file mode 100644 index 9405c91e9a3e..000000000000 --- a/owl-bot-staging/Trace/v2/tests/Unit/V2/Client/TraceServiceClientTest.php +++ /dev/null @@ -1,254 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return TraceServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new TraceServiceClient($options); - } - - /** @test */ - public function batchWriteSpansTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->projectName('[PROJECT]'); - $spans = []; - $request = (new BatchWriteSpansRequest()) - ->setName($formattedName) - ->setSpans($spans); - $gapicClient->batchWriteSpans($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.cloudtrace.v2.TraceService/BatchWriteSpans', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getSpans(); - $this->assertProtobufEquals($spans, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function batchWriteSpansExceptionTest() - { - $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->projectName('[PROJECT]'); - $spans = []; - $request = (new BatchWriteSpansRequest()) - ->setName($formattedName) - ->setSpans($spans); - try { - $gapicClient->batchWriteSpans($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 createSpanTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $spanId2 = 'spanId2-643891741'; - $parentSpanId2 = 'parentSpanId2-1321225074'; - $expectedResponse = new Span(); - $expectedResponse->setName($name2); - $expectedResponse->setSpanId($spanId2); - $expectedResponse->setParentSpanId($parentSpanId2); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $spanId = 'spanId-2011840976'; - $displayName = new TruncatableString(); - $startTime = new Timestamp(); - $endTime = new Timestamp(); - $request = (new Span()) - ->setName($name) - ->setSpanId($spanId) - ->setDisplayName($displayName) - ->setStartTime($startTime) - ->setEndTime($endTime); - $response = $gapicClient->createSpan($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.cloudtrace.v2.TraceService/CreateSpan', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $actualValue = $actualRequestObject->getSpanId(); - $this->assertProtobufEquals($spanId, $actualValue); - $actualValue = $actualRequestObject->getDisplayName(); - $this->assertProtobufEquals($displayName, $actualValue); - $actualValue = $actualRequestObject->getStartTime(); - $this->assertProtobufEquals($startTime, $actualValue); - $actualValue = $actualRequestObject->getEndTime(); - $this->assertProtobufEquals($endTime, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSpanExceptionTest() - { - $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'; - $spanId = 'spanId-2011840976'; - $displayName = new TruncatableString(); - $startTime = new Timestamp(); - $endTime = new Timestamp(); - $request = (new Span()) - ->setName($name) - ->setSpanId($spanId) - ->setDisplayName($displayName) - ->setStartTime($startTime) - ->setEndTime($endTime); - try { - $gapicClient->createSpan($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 batchWriteSpansAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->projectName('[PROJECT]'); - $spans = []; - $request = (new BatchWriteSpansRequest()) - ->setName($formattedName) - ->setSpans($spans); - $gapicClient->batchWriteSpansAsync($request)->wait(); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.devtools.cloudtrace.v2.TraceService/BatchWriteSpans', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getSpans(); - $this->assertProtobufEquals($spans, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Annotations.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Annotations.php deleted file mode 100644 index 1ecba652a2f9..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Annotations.php +++ /dev/null @@ -1,26 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xA9@\x0A*google/cloud/visionai/v1/annotations.proto\x12\x18google.cloud.visionai.v1\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x95\x0D\x0A*PersonalProtectiveEquipmentDetectionOutput\x120\x0A\x0Ccurrent_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12m\x0A\x10detected_persons\x18\x02 \x03(\x0B2S.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson\x1A(\x0A\x0CPersonEntity\x12\x18\x0A\x10person_entity_id\x18\x01 \x01(\x03\x1Az\x0A\x09PPEEntity\x12\x14\x0A\x0Cppe_label_id\x18\x01 \x01(\x03\x12\x18\x0A\x10ppe_label_string\x18\x02 \x01(\x09\x12&\x0A\x1Eppe_supercategory_label_string\x18\x03 \x01(\x09\x12\x15\x0A\x0Dppe_entity_id\x18\x04 \x01(\x03\x1AR\x0A\x15NormalizedBoundingBox\x12\x0C\x0A\x04xmin\x18\x01 \x01(\x02\x12\x0C\x0A\x04ymin\x18\x02 \x01(\x02\x12\x0D\x0A\x05width\x18\x03 \x01(\x02\x12\x0E\x0A\x06height\x18\x04 \x01(\x02\x1A\xA6\x02\x0A\x13PersonIdentifiedBox\x12\x0E\x0A\x06box_id\x18\x01 \x01(\x03\x12{\x0A\x17normalized_bounding_box\x18\x02 \x01(\x0B2Z.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox\x12\x18\x0A\x10confidence_score\x18\x03 \x01(\x02\x12h\x0A\x0Dperson_entity\x18\x04 \x01(\x0B2Q.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity\x1A\x9D\x02\x0A\x10PPEIdentifiedBox\x12\x0E\x0A\x06box_id\x18\x01 \x01(\x03\x12{\x0A\x17normalized_bounding_box\x18\x02 \x01(\x0B2Z.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox\x12\x18\x0A\x10confidence_score\x18\x03 \x01(\x02\x12b\x0A\x0Appe_entity\x18\x04 \x01(\x0B2N.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity\x1A\x82\x05\x0A\x0EDetectedPerson\x12\x11\x0A\x09person_id\x18\x01 \x01(\x03\x12\x80\x01\x0A\x1Edetected_person_identified_box\x18\x02 \x01(\x0B2X.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox\x12|\x0A\x1Ddetected_ppe_identified_boxes\x18\x03 \x03(\x0B2U.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox\x12 \x0A\x13face_coverage_score\x18\x04 \x01(\x02H\x00\x88\x01\x01\x12 \x0A\x13eyes_coverage_score\x18\x05 \x01(\x02H\x01\x88\x01\x01\x12 \x0A\x13head_coverage_score\x18\x06 \x01(\x02H\x02\x88\x01\x01\x12!\x0A\x14hands_coverage_score\x18\x07 \x01(\x02H\x03\x88\x01\x01\x12 \x0A\x13body_coverage_score\x18\x08 \x01(\x02H\x04\x88\x01\x01\x12 \x0A\x13feet_coverage_score\x18\x09 \x01(\x02H\x05\x88\x01\x01B\x16\x0A\x14_face_coverage_scoreB\x16\x0A\x14_eyes_coverage_scoreB\x16\x0A\x14_head_coverage_scoreB\x17\x0A\x15_hands_coverage_scoreB\x16\x0A\x14_body_coverage_scoreB\x16\x0A\x14_feet_coverage_score\"\xCA\x04\x0A\x1FObjectDetectionPredictionResult\x120\x0A\x0Ccurrent_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12a\x0A\x10identified_boxes\x18\x02 \x03(\x0B2G.google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox\x1A0\x0A\x06Entity\x12\x10\x0A\x08label_id\x18\x01 \x01(\x03\x12\x14\x0A\x0Clabel_string\x18\x02 \x01(\x09\x1A\xDF\x02\x0A\x0DIdentifiedBox\x12\x0E\x0A\x06box_id\x18\x01 \x01(\x03\x12~\x0A\x17normalized_bounding_box\x18\x02 \x01(\x0B2].google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox\x12\x18\x0A\x10confidence_score\x18\x03 \x01(\x02\x12P\x0A\x06entity\x18\x04 \x01(\x0B2@.google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity\x1AR\x0A\x15NormalizedBoundingBox\x12\x0C\x0A\x04xmin\x18\x01 \x01(\x02\x12\x0C\x0A\x04ymin\x18\x02 \x01(\x02\x12\x0D\x0A\x05width\x18\x03 \x01(\x02\x12\x0E\x0A\x06height\x18\x04 \x01(\x02\"\x8B\x01\x0A\$ImageObjectDetectionPredictionResult\x12\x0B\x0A\x03ids\x18\x01 \x03(\x03\x12\x15\x0A\x0Ddisplay_names\x18\x02 \x03(\x09\x12\x13\x0A\x0Bconfidences\x18\x03 \x03(\x02\x12*\x0A\x06bboxes\x18\x04 \x03(\x0B2\x1A.google.protobuf.ListValue\"Y\x0A\x1EClassificationPredictionResult\x12\x0B\x0A\x03ids\x18\x01 \x03(\x03\x12\x15\x0A\x0Ddisplay_names\x18\x02 \x03(\x09\x12\x13\x0A\x0Bconfidences\x18\x03 \x03(\x02\"S\x0A!ImageSegmentationPredictionResult\x12\x15\x0A\x0Dcategory_mask\x18\x01 \x01(\x09\x12\x17\x0A\x0Fconfidence_mask\x18\x02 \x01(\x09\"\xC4\x02\x0A&VideoActionRecognitionPredictionResult\x126\x0A\x12segment_start_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x124\x0A\x10segment_end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12b\x0A\x07actions\x18\x03 \x03(\x0B2Q.google.cloud.visionai.v1.VideoActionRecognitionPredictionResult.IdentifiedAction\x1AH\x0A\x10IdentifiedAction\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12\x12\x0A\x0Aconfidence\x18\x03 \x01(\x02\"\xF9\x03\x0A#VideoObjectTrackingPredictionResult\x126\x0A\x12segment_start_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x124\x0A\x10segment_end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12]\x0A\x07objects\x18\x03 \x03(\x0B2L.google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.DetectedObject\x1AI\x0A\x0BBoundingBox\x12\x0D\x0A\x05x_min\x18\x01 \x01(\x02\x12\x0D\x0A\x05x_max\x18\x02 \x01(\x02\x12\x0D\x0A\x05y_min\x18\x03 \x01(\x02\x12\x0D\x0A\x05y_max\x18\x04 \x01(\x02\x1A\xB9\x01\x0A\x0EDetectedObject\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12_\x0A\x0Cbounding_box\x18\x03 \x01(\x0B2I.google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.BoundingBox\x12\x12\x0A\x0Aconfidence\x18\x04 \x01(\x02\x12\x10\x0A\x08track_id\x18\x05 \x01(\x03\"\xD6\x02\x0A#VideoClassificationPredictionResult\x126\x0A\x12segment_start_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x124\x0A\x10segment_end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12o\x0A\x0Fclassifications\x18\x03 \x03(\x0B2V.google.cloud.visionai.v1.VideoClassificationPredictionResult.IdentifiedClassification\x1AP\x0A\x18IdentifiedClassification\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12\x12\x0A\x0Aconfidence\x18\x03 \x01(\x02\"\xEB\x13\x0A!OccupancyCountingPredictionResult\x120\x0A\x0Ccurrent_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12c\x0A\x10identified_boxes\x18\x02 \x03(\x0B2I.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox\x12P\x0A\x05stats\x18\x03 \x01(\x0B2A.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats\x12Y\x0A\x0Atrack_info\x18\x04 \x03(\x0B2E.google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo\x12b\x0A\x0Fdwell_time_info\x18\x05 \x03(\x0B2I.google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo\x12\x10\x0A\x03pts\x18\x06 \x01(\x03H\x00\x88\x01\x01\x1A0\x0A\x06Entity\x12\x10\x0A\x08label_id\x18\x01 \x01(\x03\x12\x14\x0A\x0Clabel_string\x18\x02 \x01(\x09\x1A\xEB\x02\x0A\x0DIdentifiedBox\x12\x0E\x0A\x06box_id\x18\x01 \x01(\x03\x12\x80\x01\x0A\x17normalized_bounding_box\x18\x02 \x01(\x0B2_.google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox\x12\x0D\x0A\x05score\x18\x03 \x01(\x02\x12R\x0A\x06entity\x18\x04 \x01(\x0B2B.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity\x12\x10\x0A\x08track_id\x18\x05 \x01(\x03\x1AR\x0A\x15NormalizedBoundingBox\x12\x0C\x0A\x04xmin\x18\x01 \x01(\x02\x12\x0C\x0A\x04ymin\x18\x02 \x01(\x02\x12\x0D\x0A\x05width\x18\x03 \x01(\x02\x12\x0E\x0A\x06height\x18\x04 \x01(\x02\x1A\xF5\x0A\x0A\x05Stats\x12g\x0A\x10full_frame_count\x18\x01 \x03(\x0B2M.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount\x12q\x0A\x14crossing_line_counts\x18\x02 \x03(\x0B2S.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount\x12m\x0A\x12active_zone_counts\x18\x03 \x03(\x0B2Q.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount\x1Ap\x0A\x0BObjectCount\x12R\x0A\x06entity\x18\x01 \x01(\x0B2B.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity\x12\x0D\x0A\x05count\x18\x02 \x01(\x05\x1A\xAD\x01\x0A\x16AccumulatedObjectCount\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12c\x0A\x0Cobject_count\x18\x02 \x01(\x0B2M.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount\x1A\xCB\x04\x0A\x11CrossingLineCount\x12>\x0A\x0Aannotation\x18\x01 \x01(\x0B2*.google.cloud.visionai.v1.StreamAnnotation\x12p\x0A\x19positive_direction_counts\x18\x02 \x03(\x0B2M.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount\x12p\x0A\x19negative_direction_counts\x18\x03 \x03(\x0B2M.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount\x12\x87\x01\x0A%accumulated_positive_direction_counts\x18\x04 \x03(\x0B2X.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount\x12\x87\x01\x0A%accumulated_negative_direction_counts\x18\x05 \x03(\x0B2X.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount\x1A\xB0\x01\x0A\x0FActiveZoneCount\x12>\x0A\x0Aannotation\x18\x01 \x01(\x0B2*.google.cloud.visionai.v1.StreamAnnotation\x12]\x0A\x06counts\x18\x02 \x03(\x0B2M.google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount\x1AM\x0A\x09TrackInfo\x12\x10\x0A\x08track_id\x18\x01 \x01(\x09\x12.\x0A\x0Astart_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x1A\x9C\x01\x0A\x0DDwellTimeInfo\x12\x10\x0A\x08track_id\x18\x01 \x01(\x09\x12\x0F\x0A\x07zone_id\x18\x02 \x01(\x09\x124\x0A\x10dwell_start_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x122\x0A\x0Edwell_end_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x06\x0A\x04_pts\"\xAA\x02\x0A\x10StreamAnnotation\x12B\x0A\x0Bactive_zone\x18\x05 \x01(\x0B2+.google.cloud.visionai.v1.NormalizedPolygonH\x00\x12E\x0A\x0Dcrossing_line\x18\x06 \x01(\x0B2,.google.cloud.visionai.v1.NormalizedPolylineH\x00\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12\x15\x0A\x0Dsource_stream\x18\x03 \x01(\x09\x12<\x0A\x04type\x18\x04 \x01(\x0E2..google.cloud.visionai.v1.StreamAnnotationTypeB\x14\x0A\x12annotation_payload\"[\x0A\x11StreamAnnotations\x12F\x0A\x12stream_annotations\x18\x01 \x03(\x0B2*.google.cloud.visionai.v1.StreamAnnotation\"\\\x0A\x11NormalizedPolygon\x12G\x0A\x13normalized_vertices\x18\x01 \x03(\x0B2*.google.cloud.visionai.v1.NormalizedVertex\"]\x0A\x12NormalizedPolyline\x12G\x0A\x13normalized_vertices\x18\x01 \x03(\x0B2*.google.cloud.visionai.v1.NormalizedVertex\"(\x0A\x10NormalizedVertex\x12\x09\x0A\x01x\x18\x01 \x01(\x02\x12\x09\x0A\x01y\x18\x02 \x01(\x02\"`\x0A\x13AppPlatformMetadata\x12\x13\x0A\x0Bapplication\x18\x01 \x01(\x09\x12\x13\x0A\x0Binstance_id\x18\x02 \x01(\x09\x12\x0C\x0A\x04node\x18\x03 \x01(\x09\x12\x11\x0A\x09processor\x18\x04 \x01(\x09\"\xBE\x02\x0A\x1FAppPlatformCloudFunctionRequest\x12L\x0A\x15app_platform_metadata\x18\x01 \x01(\x0B2-.google.cloud.visionai.v1.AppPlatformMetadata\x12f\x0A\x0Bannotations\x18\x02 \x03(\x0B2Q.google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation\x1Ae\x0A\x17StructedInputAnnotation\x12\x1D\x0A\x15ingestion_time_micros\x18\x01 \x01(\x03\x12+\x0A\x0Aannotation\x18\x02 \x01(\x0B2\x17.google.protobuf.Struct\"\xB5\x02\x0A AppPlatformCloudFunctionResponse\x12h\x0A\x0Bannotations\x18\x02 \x03(\x0B2S.google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation\x12\x1E\x0A\x16annotation_passthrough\x18\x03 \x01(\x08\x12>\x0A\x06events\x18\x04 \x03(\x0B2..google.cloud.visionai.v1.AppPlatformEventBody\x1AG\x0A\x18StructedOutputAnnotation\x12+\x0A\x0Aannotation\x18\x01 \x01(\x0B2\x17.google.protobuf.Struct\"i\x0A\x14AppPlatformEventBody\x12\x15\x0A\x0Devent_message\x18\x01 \x01(\x09\x12(\x0A\x07payload\x18\x02 \x01(\x0B2\x17.google.protobuf.Struct\x12\x10\x0A\x08event_id\x18\x03 \x01(\x09*\x90\x01\x0A\x14StreamAnnotationType\x12&\x0A\"STREAM_ANNOTATION_TYPE_UNSPECIFIED\x10\x00\x12&\x0A\"STREAM_ANNOTATION_TYPE_ACTIVE_ZONE\x10\x01\x12(\x0A\$STREAM_ANNOTATION_TYPE_CROSSING_LINE\x10\x02B\xC0\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x10AnnotationsProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Common.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Common.php deleted file mode 100644 index 6b1a2c2c659f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Common.php +++ /dev/null @@ -1,27 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x95\x0A\x0A%google/cloud/visionai/v1/common.proto\x12\x18google.cloud.visionai.v1\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xAC\x05\x0A\x07Cluster\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12=\x0A\x06labels\x18\x04 \x03(\x0B2-.google.cloud.visionai.v1.Cluster.LabelsEntry\x12G\x0A\x0Bannotations\x18\x05 \x03(\x0B22.google.cloud.visionai.v1.Cluster.AnnotationsEntry\x12'\x0A\x1Adataplane_service_endpoint\x18\x06 \x01(\x09B\x03\xE0A\x03\x12;\x0A\x05state\x18\x07 \x01(\x0E2'.google.cloud.visionai.v1.Cluster.StateB\x03\xE0A\x03\x12\x17\x0A\x0Apsc_target\x18\x08 \x01(\x09B\x03\xE0A\x03\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"V\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CPROVISIONING\x10\x01\x12\x0B\x0A\x07RUNNING\x10\x02\x12\x0C\x0A\x08STOPPING\x10\x03\x12\x09\x0A\x05ERROR\x10\x04:`\xEAA]\x0A\x1Fvisionai.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}\"\x80\x02\x0A\x11OperationMetadata\x124\x0A\x0Bcreate_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x121\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x13\x0A\x06target\x18\x03 \x01(\x09B\x03\xE0A\x03\x12\x11\x0A\x04verb\x18\x04 \x01(\x09B\x03\xE0A\x03\x12\x1B\x0A\x0Estatus_message\x18\x05 \x01(\x09B\x03\xE0A\x03\x12#\x0A\x16requested_cancellation\x18\x06 \x01(\x08B\x03\xE0A\x03\x12\x18\x0A\x0Bapi_version\x18\x07 \x01(\x09B\x03\xE0A\x03\"\x1E\x0A\x09GcsSource\x12\x11\x0A\x04uris\x18\x01 \x03(\x09B\x03\xE0A\x02B\xBB\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x0BCommonProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/HealthService.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/HealthService.php deleted file mode 100644 index f5e7bf4439fc..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/HealthService.php +++ /dev/null @@ -1,27 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xE6\x06\x0A-google/cloud/visionai/v1/health_service.proto\x12\x18google.cloud.visionai.v1\x1A\x17google/api/client.proto\x1A\x19google/api/resource.proto\"K\x0A\x12HealthCheckRequest\x125\x0A\x07cluster\x18\x01 \x01(\x09B\$\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\"s\x0A\x13HealthCheckResponse\x12\x0F\x0A\x07healthy\x18\x01 \x01(\x08\x12\x0E\x0A\x06reason\x18\x02 \x01(\x09\x12;\x0A\x0Ccluster_info\x18\x03 \x01(\x0B2%.google.cloud.visionai.v1.ClusterInfo\"=\x0A\x0BClusterInfo\x12\x15\x0A\x0Dstreams_count\x18\x01 \x01(\x05\x12\x17\x0A\x0Fprocesses_count\x18\x02 \x01(\x052\x93\x02\x0A\x12HealthCheckService\x12\xAF\x01\x0A\x0BHealthCheck\x12,.google.cloud.visionai.v1.HealthCheckRequest\x1A-.google.cloud.visionai.v1.HealthCheckResponse\"C\x82\xD3\xE4\x93\x02=\x12;/v1/{cluster=projects/*/locations/*/clusters/*}:healthCheck\x1AK\xCAA\x17visionai.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xC7\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x17HealthCheckServiceProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Lva.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Lva.php deleted file mode 100644 index 2ed6022d7539..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Lva.php +++ /dev/null @@ -1,24 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xDB\x10\x0A\"google/cloud/visionai/v1/lva.proto\x12\x18google.cloud.visionai.v1\"\xCA\x04\x0A\x12OperatorDefinition\x12\x10\x0A\x08operator\x18\x01 \x01(\x09\x12S\x0A\x0Ainput_args\x18\x02 \x03(\x0B2?.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition\x12T\x0A\x0Boutput_args\x18\x03 \x03(\x0B2?.google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition\x12T\x0A\x0Aattributes\x18\x04 \x03(\x0B2@.google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition\x12B\x0A\x09resources\x18\x05 \x01(\x0B2/.google.cloud.visionai.v1.ResourceSpecification\x12\x19\x0A\x11short_description\x18\x06 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x07 \x01(\x09\x1A4\x0A\x12ArgumentDefinition\x12\x10\x0A\x08argument\x18\x01 \x01(\x09\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x1Aw\x0A\x13AttributeDefinition\x12\x11\x0A\x09attribute\x18\x01 \x01(\x09\x12\x0C\x0A\x04type\x18\x02 \x01(\x09\x12?\x0A\x0Ddefault_value\x18\x03 \x01(\x0B2(.google.cloud.visionai.v1.AttributeValue\"\x88\x01\x0A\x15ResourceSpecification\x12\x0B\x0A\x03cpu\x18\x01 \x01(\x09\x12\x12\x0A\x0Acpu_limits\x18\x05 \x01(\x09\x12\x0E\x0A\x06memory\x18\x02 \x01(\x09\x12\x15\x0A\x0Dmemory_limits\x18\x06 \x01(\x09\x12\x0C\x0A\x04gpus\x18\x03 \x01(\x05\x12\x19\x0A\x11latency_budget_ms\x18\x04 \x01(\x05\"M\x0A\x0EAttributeValue\x12\x0B\x0A\x01i\x18\x01 \x01(\x03H\x00\x12\x0B\x0A\x01f\x18\x02 \x01(\x02H\x00\x12\x0B\x0A\x01b\x18\x03 \x01(\x08H\x00\x12\x0B\x0A\x01s\x18\x04 \x01(\x0CH\x00B\x07\x0A\x05value\"\xDB\x05\x0A\x12AnalyzerDefinition\x12\x10\x0A\x08analyzer\x18\x01 \x01(\x09\x12\x10\x0A\x08operator\x18\x02 \x01(\x09\x12H\x0A\x06inputs\x18\x03 \x03(\x0B28.google.cloud.visionai.v1.AnalyzerDefinition.StreamInput\x12F\x0A\x05attrs\x18\x04 \x03(\x0B27.google.cloud.visionai.v1.AnalyzerDefinition.AttrsEntry\x12P\x0A\x0Ddebug_options\x18\x05 \x01(\x0B29.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions\x12T\x0A\x0Foperator_option\x18\x06 \x01(\x0B2;.google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption\x1A\x1C\x0A\x0BStreamInput\x12\x0D\x0A\x05input\x18\x01 \x01(\x09\x1A\xBF\x01\x0A\x0CDebugOptions\x12r\x0A\x15environment_variables\x18\x01 \x03(\x0B2S.google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions.EnvironmentVariablesEntry\x1A;\x0A\x19EnvironmentVariablesEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A/\x0A\x0EOperatorOption\x12\x0B\x0A\x03tag\x18\x01 \x01(\x09\x12\x10\x0A\x08registry\x18\x02 \x01(\x09\x1AV\x0A\x0AAttrsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x127\x0A\x05value\x18\x02 \x01(\x0B2(.google.cloud.visionai.v1.AttributeValue:\x028\x01\"U\x0A\x12AnalysisDefinition\x12?\x0A\x09analyzers\x18\x01 \x03(\x0B2,.google.cloud.visionai.v1.AnalyzerDefinition\"\xBC\x01\x0A\x09RunStatus\x128\x0A\x05state\x18\x01 \x01(\x0E2).google.cloud.visionai.v1.RunStatus.State\x12\x0E\x0A\x06reason\x18\x02 \x01(\x09\"e\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CINITIALIZING\x10\x01\x12\x0B\x0A\x07RUNNING\x10\x02\x12\x0D\x0A\x09COMPLETED\x10\x03\x12\x0A\x0A\x06FAILED\x10\x04\x12\x0B\x0A\x07PENDING\x10\x05*=\x0A\x07RunMode\x12\x18\x0A\x14RUN_MODE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04LIVE\x10\x01\x12\x0E\x0A\x0ASUBMISSION\x10\x02B\xB8\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x08LvaProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/LvaResources.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/LvaResources.php deleted file mode 100644 index ff8ceec2d44b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/LvaResources.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xD2\x10\x0A,google/cloud/visionai/v1/lva_resources.proto\x12\x18google.cloud.visionai.v1\x1A\x19google/api/resource.proto\x1A\"google/cloud/visionai/v1/lva.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB9\x03\x0A\x08Operator\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12>\x0A\x06labels\x18\x04 \x03(\x0B2..google.cloud.visionai.v1.Operator.LabelsEntry\x12I\x0A\x13operator_definition\x18\x05 \x01(\x0B2,.google.cloud.visionai.v1.OperatorDefinition\x12\x14\x0A\x0Cdocker_image\x18\x06 \x01(\x09\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:c\xEAA`\x0A visionai.googleapis.com/Operator\x12\x0A\x06labels\x18\x04 \x03(\x0B2..google.cloud.visionai.v1.Analysis.LabelsEntry\x12I\x0A\x13analysis_definition\x18\x05 \x01(\x0B2,.google.cloud.visionai.v1.AnalysisDefinition\x12Z\x0A\x15input_streams_mapping\x18\x06 \x03(\x0B2;.google.cloud.visionai.v1.Analysis.InputStreamsMappingEntry\x12\\\x0A\x16output_streams_mapping\x18\x07 \x03(\x0B2<.google.cloud.visionai.v1.Analysis.OutputStreamsMappingEntry\x12\x1B\x0A\x13disable_event_watch\x18\x08 \x01(\x08\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A:\x0A\x18InputStreamsMappingEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A;\x0A\x19OutputStreamsMappingEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:u\xEAAr\x0A visionai.googleapis.com/Analysis\x12Nprojects/{project}/locations/{location}/clusters/{cluster}/analyses/{analysis}\"\x97\x04\x0A\x07Process\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12:\x0A\x08analysis\x18\x04 \x01(\x09B(\xE0A\x02\xFAA\"\x0A visionai.googleapis.com/Analysis\x12 \x0A\x13attribute_overrides\x18\x05 \x03(\x09B\x03\xE0A\x01\x12<\x0A\x0Arun_status\x18\x06 \x01(\x0B2#.google.cloud.visionai.v1.RunStatusB\x03\xE0A\x01\x128\x0A\x08run_mode\x18\x07 \x01(\x0E2!.google.cloud.visionai.v1.RunModeB\x03\xE0A\x01\x12\x15\x0A\x08event_id\x18\x08 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08batch_id\x18\x09 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bretry_count\x18\x0A \x01(\x05B\x03\xE0A\x01:t\xEAAq\x0A\x1Fvisionai.googleapis.com/Process\x12Nprojects/{project}/locations/{location}/clusters/{cluster}/processes/{process}B\xC1\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x11LvaResourcesProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/LvaService.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/LvaService.php deleted file mode 100644 index 0cfd009e8cba..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/LvaService.php +++ /dev/null @@ -1,33 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xB1>\x0A*google/cloud/visionai/v1/lva_service.proto\x12\x18google.cloud.visionai.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A%google/cloud/visionai/v1/common.proto\x1A,google/cloud/visionai/v1/lva_resources.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\"\x9A\x01\x0A\x14ListOperatorsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"|\x0A\x15ListOperatorsResponse\x125\x0A\x09operators\x18\x01 \x03(\x0B2\".google.cloud.visionai.v1.Operator\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"L\x0A\x12GetOperatorRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A visionai.googleapis.com/Operator\"\xC0\x01\x0A\x15CreateOperatorRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x18\x0A\x0Boperator_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x129\x0A\x08operator\x18\x03 \x01(\x0B2\".google.cloud.visionai.v1.OperatorB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xA1\x01\x0A\x15UpdateOperatorRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x129\x0A\x08operator\x18\x02 \x01(\x0B2\".google.cloud.visionai.v1.OperatorB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"h\x0A\x15DeleteOperatorRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A visionai.googleapis.com/Operator\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\x97\x01\x0A\x13ListAnalysesRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"z\x0A\x14ListAnalysesResponse\x124\x0A\x08analyses\x18\x01 \x03(\x0B2\".google.cloud.visionai.v1.Analysis\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"L\x0A\x12GetAnalysisRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A visionai.googleapis.com/Analysis\"\xBE\x01\x0A\x15CreateAnalysisRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x18\x0A\x0Banalysis_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x129\x0A\x08analysis\x18\x03 \x01(\x0B2\".google.cloud.visionai.v1.AnalysisB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xA1\x01\x0A\x15UpdateAnalysisRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x129\x0A\x08analysis\x18\x02 \x01(\x0B2\".google.cloud.visionai.v1.AnalysisB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"h\x0A\x15DeleteAnalysisRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A visionai.googleapis.com/Analysis\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\x98\x01\x0A\x14ListProcessesRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"{\x0A\x15ListProcessesResponse\x124\x0A\x09processes\x18\x01 \x03(\x0B2!.google.cloud.visionai.v1.Process\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"J\x0A\x11GetProcessRequest\x125\x0A\x04name\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Process\"\xBA\x01\x0A\x14CreateProcessRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x17\x0A\x0Aprocess_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x127\x0A\x07process\x18\x03 \x01(\x0B2!.google.cloud.visionai.v1.ProcessB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\x9E\x01\x0A\x14UpdateProcessRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x127\x0A\x07process\x18\x02 \x01(\x0B2!.google.cloud.visionai.v1.ProcessB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"f\x0A\x14DeleteProcessRequest\x125\x0A\x04name\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Process\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\xD1\x02\x0A\x16BatchRunProcessRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12E\x0A\x08requests\x18\x02 \x03(\x0B2..google.cloud.visionai.v1.CreateProcessRequestB\x03\xE0A\x02\x12]\x0A\x07options\x18\x03 \x01(\x0B2G.google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptionsB\x03\xE0A\x01\x12\x15\x0A\x08batch_id\x18\x04 \x01(\x09B\x03\xE0A\x03\x1AA\x0A\x16BatchRunProcessOptions\x12\x13\x0A\x0Bretry_count\x18\x01 \x01(\x05\x12\x12\x0A\x0Abatch_size\x18\x02 \x01(\x05\"a\x0A\x17BatchRunProcessResponse\x12\x10\x0A\x08batch_id\x18\x01 \x01(\x09\x124\x0A\x09processes\x18\x02 \x03(\x0B2!.google.cloud.visionai.v1.Process\"\x96\x01\x0A\x1AResolveOperatorInfoRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12=\x0A\x07queries\x18\x02 \x03(\x0B2'.google.cloud.visionai.v1.OperatorQueryB\x03\xE0A\x02\"s\x0A\x0DOperatorQuery\x12\x15\x0A\x08operator\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x10\x0A\x03tag\x18\x02 \x01(\x09B\x03\xE0A\x01\x129\x0A\x08registry\x18\x03 \x01(\x0E2\".google.cloud.visionai.v1.RegistryB\x03\xE0A\x01\"T\x0A\x1BResolveOperatorInfoResponse\x125\x0A\x09operators\x18\x01 \x03(\x0B2\".google.cloud.visionai.v1.Operator\"\xA0\x01\x0A\x1AListPublicOperatorsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"m\x0A\x1BListPublicOperatorsResponse\x125\x0A\x09operators\x18\x01 \x03(\x0B2\".google.cloud.visionai.v1.Operator\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09*=\x0A\x08Registry\x12\x18\x0A\x14REGISTRY_UNSPECIFIED\x10\x00\x12\x0A\x0A\x06PUBLIC\x10\x01\x12\x0B\x0A\x07PRIVATE\x10\x022\x8D\x1E\x0A\x12LiveVideoAnalytics\x12\xCC\x01\x0A\x13ListPublicOperators\x124.google.cloud.visionai.v1.ListPublicOperatorsRequest\x1A5.google.cloud.visionai.v1.ListPublicOperatorsResponse\"H\xDAA\x06parent\x82\xD3\xE4\x93\x029\x127/v1/{parent=projects/*/locations/*}:listPublicOperators\x12\xD7\x01\x0A\x13ResolveOperatorInfo\x124.google.cloud.visionai.v1.ResolveOperatorInfoRequest\x1A5.google.cloud.visionai.v1.ResolveOperatorInfoResponse\"S\xDAA\x0Eparent,queries\x82\xD3\xE4\x93\x02<\"7/v1/{parent=projects/*/locations/*}:resolveOperatorInfo:\x01*\x12\xB0\x01\x0A\x0DListOperators\x12..google.cloud.visionai.v1.ListOperatorsRequest\x1A/.google.cloud.visionai.v1.ListOperatorsResponse\">\xDAA\x06parent\x82\xD3\xE4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/operators\x12\x9D\x01\x0A\x0BGetOperator\x12,.google.cloud.visionai.v1.GetOperatorRequest\x1A\".google.cloud.visionai.v1.Operator\"<\xDAA\x04name\x82\xD3\xE4\x93\x02/\x12-/v1/{name=projects/*/locations/*/operators/*}\x12\xDF\x01\x0A\x0ECreateOperator\x12/.google.cloud.visionai.v1.CreateOperatorRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA\x1D\x0A\x08Operator\x12\x11OperationMetadata\xDAA\x1Bparent,operator,operator_id\x82\xD3\xE4\x93\x029\"-/v1/{parent=projects/*/locations/*}/operators:\x08operator\x12\xE1\x01\x0A\x0EUpdateOperator\x12/.google.cloud.visionai.v1.UpdateOperatorRequest\x1A\x1D.google.longrunning.Operation\"\x7F\xCAA\x1D\x0A\x08Operator\x12\x11OperationMetadata\xDAA\x14operator,update_mask\x82\xD3\xE4\x93\x02B26/v1/{operator.name=projects/*/locations/*/operators/*}:\x08operator\x12\xCB\x01\x0A\x0EDeleteOperator\x12/.google.cloud.visionai.v1.DeleteOperatorRequest\x1A\x1D.google.longrunning.Operation\"i\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02/*-/v1/{name=projects/*/locations/*/operators/*}\x12\xB7\x01\x0A\x0CListAnalyses\x12-.google.cloud.visionai.v1.ListAnalysesRequest\x1A..google.cloud.visionai.v1.ListAnalysesResponse\"H\xDAA\x06parent\x82\xD3\xE4\x93\x029\x127/v1/{parent=projects/*/locations/*/clusters/*}/analyses\x12\xA7\x01\x0A\x0BGetAnalysis\x12,.google.cloud.visionai.v1.GetAnalysisRequest\x1A\".google.cloud.visionai.v1.Analysis\"F\xDAA\x04name\x82\xD3\xE4\x93\x029\x127/v1/{name=projects/*/locations/*/clusters/*/analyses/*}\x12\xEA\x01\x0A\x0ECreateAnalysis\x12/.google.cloud.visionai.v1.CreateAnalysisRequest\x1A\x1D.google.longrunning.Operation\"\x87\x01\xCAA\x1D\x0A\x08Analysis\x12\x11OperationMetadata\xDAA\x1Bparent,analysis,analysis_id\x82\xD3\xE4\x93\x02C\"7/v1/{parent=projects/*/locations/*/clusters/*}/analyses:\x08analysis\x12\xEC\x01\x0A\x0EUpdateAnalysis\x12/.google.cloud.visionai.v1.UpdateAnalysisRequest\x1A\x1D.google.longrunning.Operation\"\x89\x01\xCAA\x1D\x0A\x08Analysis\x12\x11OperationMetadata\xDAA\x14analysis,update_mask\x82\xD3\xE4\x93\x02L2@/v1/{analysis.name=projects/*/locations/*/clusters/*/analyses/*}:\x08analysis\x12\xD5\x01\x0A\x0EDeleteAnalysis\x12/.google.cloud.visionai.v1.DeleteAnalysisRequest\x1A\x1D.google.longrunning.Operation\"s\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x029*7/v1/{name=projects/*/locations/*/clusters/*/analyses/*}\x12\xBB\x01\x0A\x0DListProcesses\x12..google.cloud.visionai.v1.ListProcessesRequest\x1A/.google.cloud.visionai.v1.ListProcessesResponse\"I\xDAA\x06parent\x82\xD3\xE4\x93\x02:\x128/v1/{parent=projects/*/locations/*/clusters/*}/processes\x12\xA5\x01\x0A\x0AGetProcess\x12+.google.cloud.visionai.v1.GetProcessRequest\x1A!.google.cloud.visionai.v1.Process\"G\xDAA\x04name\x82\xD3\xE4\x93\x02:\x128/v1/{name=projects/*/locations/*/clusters/*/processes/*}\x12\xE5\x01\x0A\x0DCreateProcess\x12..google.cloud.visionai.v1.CreateProcessRequest\x1A\x1D.google.longrunning.Operation\"\x84\x01\xCAA\x1C\x0A\x07Process\x12\x11OperationMetadata\xDAA\x19parent,process,process_id\x82\xD3\xE4\x93\x02C\"8/v1/{parent=projects/*/locations/*/clusters/*}/processes:\x07process\x12\xE7\x01\x0A\x0DUpdateProcess\x12..google.cloud.visionai.v1.UpdateProcessRequest\x1A\x1D.google.longrunning.Operation\"\x86\x01\xCAA\x1C\x0A\x07Process\x12\x11OperationMetadata\xDAA\x13process,update_mask\x82\xD3\xE4\x93\x02K2@/v1/{process.name=projects/*/locations/*/clusters/*/processes/*}:\x07process\x12\xD4\x01\x0A\x0DDeleteProcess\x12..google.cloud.visionai.v1.DeleteProcessRequest\x1A\x1D.google.longrunning.Operation\"t\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02:*8/v1/{name=projects/*/locations/*/clusters/*/processes/*}\x12\xF2\x01\x0A\x0FBatchRunProcess\x120.google.cloud.visionai.v1.BatchRunProcessRequest\x1A\x1D.google.longrunning.Operation\"\x8D\x01\xCAA,\x0A\x17BatchRunProcessResponse\x12\x11OperationMetadata\xDAA\x0Fparent,requests\x82\xD3\xE4\x93\x02F\"A/v1/{parent=projects/*/locations/*/clusters/*}/processes:batchRun:\x01*\x1AK\xCAA\x17visionai.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xBF\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x0FLvaServiceProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Platform.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Platform.php deleted file mode 100644 index 259de146a890..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/Platform.php +++ /dev/null @@ -1,36 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x9B\xC0\x01\x0A'google/cloud/visionai/v1/platform.proto\x12\x18google.cloud.visionai.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A*google/cloud/visionai/v1/annotations.proto\x1A%google/cloud/visionai/v1/common.proto\x1A#google/longrunning/operations.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\$\x0A\"DeleteApplicationInstancesResponse\"\$\x0A\"CreateApplicationInstancesResponse\"\$\x0A\"UpdateApplicationInstancesResponse\"\xCA\x01\x0A!CreateApplicationInstancesRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\x12Q\x0A\x15application_instances\x18\x02 \x03(\x0B2-.google.cloud.visionai.v1.ApplicationInstanceB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xB7\x01\x0A!DeleteApplicationInstancesRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\x12>\x0A\x0Cinstance_ids\x18\x02 \x03(\x09B(\xE0A\x02\xFAA\"\x0A visionai.googleapis.com/Instance\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x1B\x0A\x19DeployApplicationResponse\"\x1D\x0A\x1BUndeployApplicationResponse\"&\x0A\$RemoveApplicationStreamInputResponse\"#\x0A!AddApplicationStreamInputResponse\"&\x0A\$UpdateApplicationStreamInputResponse\"\x9F\x01\x0A\x17ListApplicationsRequest\x12;\x0A\x06parent\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x12#visionai.googleapis.com/Application\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"\x85\x01\x0A\x18ListApplicationsResponse\x12;\x0A\x0Capplications\x18\x01 \x03(\x0B2%.google.cloud.visionai.v1.Application\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"R\x0A\x15GetApplicationRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\"\xCE\x01\x0A\x18CreateApplicationRequest\x12;\x0A\x06parent\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x12#visionai.googleapis.com/Application\x12\x1B\x0A\x0Eapplication_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12?\x0A\x0Bapplication\x18\x03 \x01(\x0B2%.google.cloud.visionai.v1.ApplicationB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xAA\x01\x0A\x18UpdateApplicationRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12?\x0A\x0Bapplication\x18\x02 \x01(\x0B2%.google.cloud.visionai.v1.ApplicationB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\x82\x01\x0A\x18DeleteApplicationRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x12\x0A\x05force\x18\x03 \x01(\x08B\x03\xE0A\x01\"\xA5\x01\x0A\x18DeployApplicationRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\x12\x15\x0A\x0Dvalidate_only\x18\x02 \x01(\x08\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x1E\x0A\x11enable_monitoring\x18\x04 \x01(\x08B\x03\xE0A\x01\"p\x0A\x1AUndeployApplicationRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"h\x0A\x16ApplicationStreamInput\x12N\x0A\x16stream_with_annotation\x18\x01 \x01(\x0B2..google.cloud.visionai.v1.StreamWithAnnotation\"\xCB\x01\x0A AddApplicationStreamInputRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\x12S\x0A\x19application_stream_inputs\x18\x02 \x03(\x0B20.google.cloud.visionai.v1.ApplicationStreamInput\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"\xE5\x01\x0A#UpdateApplicationStreamInputRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\x12S\x0A\x19application_stream_inputs\x18\x02 \x03(\x0B20.google.cloud.visionai.v1.ApplicationStreamInput\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x0Dallow_missing\x18\x04 \x01(\x08\"\xB2\x02\x0A#RemoveApplicationStreamInputRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\x12m\x0A\x14target_stream_inputs\x18\x02 \x03(\x0B2O.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\x1AH\x0A\x11TargetStreamInput\x123\x0A\x06stream\x18\x01 \x01(\x09B#\xFAA \x0A\x1Evisionai.googleapis.com/Stream\"\x99\x01\x0A\x14ListInstancesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 visionai.googleapis.com/Instance\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"|\x0A\x15ListInstancesResponse\x125\x0A\x09instances\x18\x01 \x03(\x0B2\".google.cloud.visionai.v1.Instance\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"L\x0A\x12GetInstanceRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A visionai.googleapis.com/Instance\"\x93\x01\x0A\x11ListDraftsRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x12\x1Dvisionai.googleapis.com/Draft\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"s\x0A\x12ListDraftsResponse\x12/\x0A\x06drafts\x18\x01 \x03(\x0B2\x1F.google.cloud.visionai.v1.Draft\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"F\x0A\x0FGetDraftRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Draft\"\xB0\x01\x0A\x12CreateDraftRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x12\x1Dvisionai.googleapis.com/Draft\x12\x15\x0A\x08draft_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x123\x0A\x05draft\x18\x03 \x01(\x0B2\x1F.google.cloud.visionai.v1.DraftB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xAF\x01\x0A\x12UpdateDraftRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x123\x0A\x05draft\x18\x02 \x01(\x0B2\x1F.google.cloud.visionai.v1.DraftB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x0Dallow_missing\x18\x04 \x01(\x08\"\xAD\x03\x0A!UpdateApplicationInstancesRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#visionai.googleapis.com/Application\x12t\x0A\x15application_instances\x18\x02 \x03(\x0B2U.google.cloud.visionai.v1.UpdateApplicationInstancesRequest.UpdateApplicationInstance\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x0Dallow_missing\x18\x04 \x01(\x08\x1A\xA6\x01\x0A\x19UpdateApplicationInstance\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x129\x0A\x08instance\x18\x02 \x01(\x0B2\".google.cloud.visionai.v1.InstanceB\x03\xE0A\x02\x12\x18\x0A\x0Binstance_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"b\x0A\x12DeleteDraftRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Draft\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\x9B\x01\x0A\x15ListProcessorsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!visionai.googleapis.com/Processor\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"\x7F\x0A\x16ListProcessorsResponse\x127\x0A\x0Aprocessors\x18\x01 \x03(\x0B2#.google.cloud.visionai.v1.Processor\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"Z\x0A\x1DListPrebuiltProcessorsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!visionai.googleapis.com/Processor\"Y\x0A\x1EListPrebuiltProcessorsResponse\x127\x0A\x0Aprocessors\x18\x01 \x03(\x0B2#.google.cloud.visionai.v1.Processor\"N\x0A\x13GetProcessorRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!visionai.googleapis.com/Processor\"\xC4\x01\x0A\x16CreateProcessorRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x12!visionai.googleapis.com/Processor\x12\x19\x0A\x0Cprocessor_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x12;\x0A\x09processor\x18\x03 \x01(\x0B2#.google.cloud.visionai.v1.ProcessorB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\xA4\x01\x0A\x16UpdateProcessorRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\x12;\x0A\x09processor\x18\x02 \x01(\x0B2#.google.cloud.visionai.v1.ProcessorB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"j\x0A\x16DeleteProcessorRequest\x127\x0A\x04name\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!visionai.googleapis.com/Processor\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\xDA\x0A\x0A\x0BApplication\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12A\x0A\x06labels\x18\x04 \x03(\x0B21.google.cloud.visionai.v1.Application.LabelsEntry\x12\x19\x0A\x0Cdisplay_name\x18\x05 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x0Bdescription\x18\x06 \x01(\x09\x12I\x0A\x13application_configs\x18\x07 \x01(\x0B2,.google.cloud.visionai.v1.ApplicationConfigs\x12W\x0A\x0Cruntime_info\x18\x08 \x01(\x0B2<.google.cloud.visionai.v1.Application.ApplicationRuntimeInfoB\x03\xE0A\x03\x12?\x0A\x05state\x18\x09 \x01(\x0E2+.google.cloud.visionai.v1.Application.StateB\x03\xE0A\x03\x12G\x0A\x0Cbilling_mode\x18\x0C \x01(\x0E21.google.cloud.visionai.v1.Application.BillingMode\x1A\xA1\x03\x0A\x16ApplicationRuntimeInfo\x12/\x0A\x0Bdeploy_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12r\x0A\x17global_output_resources\x18\x03 \x03(\x0B2Q.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource\x12h\x0A\x11monitoring_config\x18\x04 \x01(\x0B2M.google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig\x1AS\x0A\x14GlobalOutputResource\x12\x17\x0A\x0Foutput_resource\x18\x01 \x01(\x09\x12\x15\x0A\x0Dproducer_node\x18\x02 \x01(\x09\x12\x0B\x0A\x03key\x18\x03 \x01(\x09\x1A#\x0A\x10MonitoringConfig\x12\x0F\x0A\x07enabled\x18\x01 \x01(\x08\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"\xA7\x01\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07CREATED\x10\x01\x12\x0D\x0A\x09DEPLOYING\x10\x02\x12\x0C\x0A\x08DEPLOYED\x10\x03\x12\x0F\x0A\x0BUNDEPLOYING\x10\x04\x12\x0B\x0A\x07DELETED\x10\x05\x12\x09\x0A\x05ERROR\x10\x06\x12\x0C\x0A\x08CREATING\x10\x07\x12\x0C\x0A\x08UPDATING\x10\x08\x12\x0C\x0A\x08DELETING\x10\x09\x12\x0A\x0A\x06FIXING\x10\x0A\"B\x0A\x0BBillingMode\x12\x1C\x0A\x18BILLING_MODE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04PAYG\x10\x01\x12\x0B\x0A\x07MONTHLY\x10\x02:o\xEAAl\x0A#visionai.googleapis.com/Application\x12Bprojects/{project}/locations/{location}/applications/{application}R\x01\x01\"\x8A\x02\x0A\x12ApplicationConfigs\x12-\x0A\x05nodes\x18\x01 \x03(\x0B2\x1E.google.cloud.visionai.v1.Node\x12_\x0A\x15event_delivery_config\x18\x03 \x01(\x0B2@.google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig\x1Ad\x0A\x13EventDeliveryConfig\x12\x0F\x0A\x07channel\x18\x01 \x01(\x09\x12<\x0A\x19minimal_delivery_interval\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\"\xE7\x02\x0A\x04Node\x12.\x0A\$output_all_output_channels_to_stream\x18\x06 \x01(\x08H\x00\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12>\x0A\x0Bnode_config\x18\x03 \x01(\x0B2).google.cloud.visionai.v1.ProcessorConfig\x12\x11\x0A\x09processor\x18\x04 \x01(\x09\x129\x0A\x07parents\x18\x05 \x03(\x0B2(.google.cloud.visionai.v1.Node.InputEdge\x1A`\x0A\x09InputEdge\x12\x13\x0A\x0Bparent_node\x18\x01 \x01(\x09\x12\x1D\x0A\x15parent_output_channel\x18\x02 \x01(\x09\x12\x1F\x0A\x17connected_input_channel\x18\x03 \x01(\x09B\x16\x0A\x14stream_output_config\"\xE8\x03\x0A\x05Draft\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12;\x0A\x06labels\x18\x03 \x03(\x0B2+.google.cloud.visionai.v1.Draft.LabelsEntry\x12\x19\x0A\x0Cdisplay_name\x18\x04 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x0Bdescription\x18\x05 \x01(\x09\x12O\x0A\x19draft_application_configs\x18\x06 \x01(\x0B2,.google.cloud.visionai.v1.ApplicationConfigs\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:x\xEAAu\x0A\x1Dvisionai.googleapis.com/Draft\x12Qprojects/{project}/locations/{location}/applications/{application}/drafts/{draft}R\x01\x01\"\xD4\x0B\x0A\x08Instance\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12>\x0A\x06labels\x18\x03 \x03(\x0B2..google.cloud.visionai.v1.Instance.LabelsEntry\x12\x19\x0A\x0Cdisplay_name\x18\x04 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x0Bdescription\x18\x05 \x01(\x09\x12F\x0A\x0Dinstance_type\x18\x0A \x01(\x0E2/.google.cloud.visionai.v1.Instance.InstanceType\x12I\x0A\x0Finput_resources\x18\x06 \x03(\x0B20.google.cloud.visionai.v1.Instance.InputResource\x12K\x0A\x10output_resources\x18\x07 \x03(\x0B21.google.cloud.visionai.v1.Instance.OutputResource\x127\x0A\x05state\x18\x09 \x01(\x0E2(.google.cloud.visionai.v1.Instance.State\x1A\xC9\x02\x0A\x0DInputResource\x12\x18\x0A\x0Einput_resource\x18\x01 \x01(\x09H\x00\x12N\x0A\x10annotated_stream\x18\x04 \x01(\x0B2..google.cloud.visionai.v1.StreamWithAnnotationB\x02\x18\x01H\x00\x125\x0A\x09data_type\x18\x06 \x01(\x0E2\".google.cloud.visionai.v1.DataType\x12\x15\x0A\x0Dconsumer_node\x18\x02 \x01(\x09\x12\x1E\x0A\x16input_resource_binding\x18\x03 \x01(\x09\x12B\x0A\x0Bannotations\x18\x05 \x01(\x0B2-.google.cloud.visionai.v1.ResourceAnnotationsB\x1C\x0A\x1Ainput_resource_information\x1A\x92\x01\x0A\x0EOutputResource\x12\x17\x0A\x0Foutput_resource\x18\x01 \x01(\x09\x12\x15\x0A\x0Dproducer_node\x18\x02 \x01(\x09\x12\x1F\x0A\x17output_resource_binding\x18\x04 \x01(\x09\x12\x19\x0A\x0Cis_temporary\x18\x03 \x01(\x08B\x03\xE0A\x03\x12\x14\x0A\x07autogen\x18\x05 \x01(\x08B\x03\xE0A\x03\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"t\x0A\x0CInstanceType\x12\x1D\x0A\x19INSTANCE_TYPE_UNSPECIFIED\x10\x00\x12\x18\x0A\x14STREAMING_PREDICTION\x10\x01\x12\x14\x0A\x10BATCH_PREDICTION\x10\x02\x12\x15\x0A\x11ONLINE_PREDICTION\x10\x03\"\xB5\x01\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0B\x0A\x07CREATED\x10\x02\x12\x0D\x0A\x09DEPLOYING\x10\x03\x12\x0C\x0A\x08DEPLOYED\x10\x04\x12\x0F\x0A\x0BUNDEPLOYING\x10\x05\x12\x0B\x0A\x07DELETED\x10\x06\x12\x09\x0A\x05ERROR\x10\x07\x12\x0C\x0A\x08UPDATING\x10\x08\x12\x0C\x0A\x08DELETING\x10\x09\x12\x0A\x0A\x06FIXING\x10\x0A\x12\x0C\x0A\x08FINISHED\x10\x0B:\x81\x01\xEAA~\x0A visionai.googleapis.com/Instance\x12Wprojects/{project}/locations/{location}/applications/{application}/instances/{instance}R\x01\x01\"j\x0A\x13ApplicationInstance\x12\x18\x0A\x0Binstance_id\x18\x01 \x01(\x09B\x03\xE0A\x02\x129\x0A\x08instance\x18\x02 \x01(\x0B2\".google.cloud.visionai.v1.InstanceB\x03\xE0A\x02\"\xBC\x09\x0A\x09Processor\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12?\x0A\x06labels\x18\x04 \x03(\x0B2/.google.cloud.visionai.v1.Processor.LabelsEntry\x12\x19\x0A\x0Cdisplay_name\x18\x05 \x01(\x09B\x03\xE0A\x02\x12\x13\x0A\x0Bdescription\x18\x0A \x01(\x09\x12N\x0A\x0Eprocessor_type\x18\x06 \x01(\x0E21.google.cloud.visionai.v1.Processor.ProcessorTypeB\x03\xE0A\x03\x127\x0A\x0Amodel_type\x18\x0D \x01(\x0E2#.google.cloud.visionai.v1.ModelType\x12Y\x0A\x1Ccustom_processor_source_info\x18\x07 \x01(\x0B23.google.cloud.visionai.v1.CustomProcessorSourceInfo\x12F\x0A\x05state\x18\x08 \x01(\x0E22.google.cloud.visionai.v1.Processor.ProcessorStateB\x03\xE0A\x03\x12I\x0A\x11processor_io_spec\x18\x0B \x01(\x0B2).google.cloud.visionai.v1.ProcessorIOSpecB\x03\xE0A\x03\x12\"\x0A\x15configuration_typeurl\x18\x0E \x01(\x09B\x03\xE0A\x03\x12W\x0A\x1Asupported_annotation_types\x18\x0F \x03(\x0E2..google.cloud.visionai.v1.StreamAnnotationTypeB\x03\xE0A\x03\x12 \x0A\x18supports_post_processing\x18\x11 \x01(\x08\x12Q\x0A\x18supported_instance_types\x18\x12 \x03(\x0E2/.google.cloud.visionai.v1.Instance.InstanceType\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"Z\x0A\x0DProcessorType\x12\x1E\x0A\x1APROCESSOR_TYPE_UNSPECIFIED\x10\x00\x12\x0E\x0A\x0APRETRAINED\x10\x01\x12\x0A\x0A\x06CUSTOM\x10\x02\x12\x0D\x0A\x09CONNECTOR\x10\x03\"e\x0A\x0EProcessorState\x12\x1F\x0A\x1BPROCESSOR_STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0A\x0A\x06ACTIVE\x10\x02\x12\x0C\x0A\x08DELETING\x10\x03\x12\x0A\x0A\x06FAILED\x10\x04:i\xEAAf\x0A!visionai.googleapis.com/Processor\x12>projects/{project}/locations/{location}/processors/{processor}R\x01\x01\"\xD6\x07\x0A\x0FProcessorIOSpec\x12b\x0A\x19graph_input_channel_specs\x18\x03 \x03(\x0B2?.google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec\x12d\x0A\x1Agraph_output_channel_specs\x18\x04 \x03(\x0B2@.google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec\x12y\x0A%instance_resource_input_binding_specs\x18\x05 \x03(\x0B2J.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec\x12{\x0A&instance_resource_output_binding_specs\x18\x06 \x03(\x0B2K.google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec\x1A\xAF\x01\x0A\x15GraphInputChannelSpec\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x125\x0A\x09data_type\x18\x02 \x01(\x0E2\".google.cloud.visionai.v1.DataType\x12\x1F\x0A\x17accepted_data_type_uris\x18\x05 \x03(\x09\x12\x10\x0A\x08required\x18\x03 \x01(\x08\x12\x1E\x0A\x16max_connection_allowed\x18\x04 \x01(\x03\x1At\x0A\x16GraphOutputChannelSpec\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x125\x0A\x09data_type\x18\x02 \x01(\x0E2\".google.cloud.visionai.v1.DataType\x12\x15\x0A\x0Ddata_type_uri\x18\x03 \x01(\x09\x1Ay\x0A InstanceResourceInputBindingSpec\x12\x19\x0A\x0Fconfig_type_uri\x18\x02 \x01(\x09H\x00\x12\x1B\x0A\x11resource_type_uri\x18\x03 \x01(\x09H\x00\x12\x0C\x0A\x04name\x18\x01 \x01(\x09B\x0F\x0A\x0Dresource_type\x1A^\x0A!InstanceResourceOutputBindingSpec\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x19\x0A\x11resource_type_uri\x18\x02 \x01(\x09\x12\x10\x0A\x08explicit\x18\x03 \x01(\x08\"\xA4\x07\x0A\x19CustomProcessorSourceInfo\x12\x16\x0A\x0Cvertex_model\x18\x02 \x01(\x09H\x00\x12t\x0A\x1Bproduct_recognizer_artifact\x18\x03 \x01(\x0B2M.google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifactH\x00\x12S\x0A\x0Bsource_type\x18\x01 \x01(\x0E2>.google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType\x12e\x0A\x0Fadditional_info\x18\x04 \x03(\x0B2G.google.cloud.visionai.v1.CustomProcessorSourceInfo.AdditionalInfoEntryB\x03\xE0A\x03\x12U\x0A\x0Cmodel_schema\x18\x05 \x01(\x0B2?.google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema\x1Ae\x0A\x19ProductRecognizerArtifact\x12-\x0A retail_product_recognition_index\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x19\x0A\x0Cvertex_model\x18\x02 \x01(\x09B\x03\xE0A\x01\x1A\xCD\x01\x0A\x0BModelSchema\x12=\x0A\x10instances_schema\x18\x01 \x01(\x0B2#.google.cloud.visionai.v1.GcsSource\x12>\x0A\x11parameters_schema\x18\x02 \x01(\x0B2#.google.cloud.visionai.v1.GcsSource\x12?\x0A\x12predictions_schema\x18\x03 \x01(\x0B2#.google.cloud.visionai.v1.GcsSource\x1A5\x0A\x13AdditionalInfoEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"g\x0A\x0ASourceType\x12\x1B\x0A\x17SOURCE_TYPE_UNSPECIFIED\x10\x00\x12\x11\x0A\x0DVERTEX_AUTOML\x10\x01\x12\x11\x0A\x0DVERTEX_CUSTOM\x10\x02\x12\x16\x0A\x12PRODUCT_RECOGNIZER\x10\x03B\x0F\x0A\x0Dartifact_path\"\xD2\x0B\x0A\x0FProcessorConfig\x12U\x0A\x19video_stream_input_config\x18\x09 \x01(\x0B20.google.cloud.visionai.v1.VideoStreamInputConfigH\x00\x12`\x0A\x1Fai_enabled_devices_input_config\x18\x14 \x01(\x0B25.google.cloud.visionai.v1.AIEnabledDevicesInputConfigH\x00\x12P\x0A\x16media_warehouse_config\x18\x0A \x01(\x0B2..google.cloud.visionai.v1.MediaWarehouseConfigH\x00\x12H\x0A\x12person_blur_config\x18\x0B \x01(\x0B2*.google.cloud.visionai.v1.PersonBlurConfigH\x00\x12P\x0A\x16occupancy_count_config\x18\x0C \x01(\x0B2..google.cloud.visionai.v1.OccupancyCountConfigH\x00\x12a\x0A\x1Fperson_vehicle_detection_config\x18\x0F \x01(\x0B26.google.cloud.visionai.v1.PersonVehicleDetectionConfigH\x00\x12Y\x0A\x1Bvertex_automl_vision_config\x18\x0D \x01(\x0B22.google.cloud.visionai.v1.VertexAutoMLVisionConfigH\x00\x12W\x0A\x1Avertex_automl_video_config\x18\x0E \x01(\x0B21.google.cloud.visionai.v1.VertexAutoMLVideoConfigH\x00\x12L\x0A\x14vertex_custom_config\x18\x11 \x01(\x0B2,.google.cloud.visionai.v1.VertexCustomConfigH\x00\x12a\x0A\x1Fgeneral_object_detection_config\x18\x12 \x01(\x0B26.google.cloud.visionai.v1.GeneralObjectDetectionConfigH\x00\x12D\x0A\x10big_query_config\x18\x13 \x01(\x0B2(.google.cloud.visionai.v1.BigQueryConfigH\x00\x12F\x0A\x11gcs_output_config\x18\x1B \x01(\x0B2).google.cloud.visionai.v1.GcsOutputConfigH\x00\x12V\x0A\x19product_recognizer_config\x18\x15 \x01(\x0B21.google.cloud.visionai.v1.ProductRecognizerConfigH\x00\x12~\x0A.personal_protective_equipment_detection_config\x18\x16 \x01(\x0B2D.google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfigH\x00\x12N\x0A\x15tag_recognizer_config\x18\x19 \x01(\x0B2-.google.cloud.visionai.v1.TagRecognizerConfigH\x00\x12P\x0A\x16universal_input_config\x18\x1C \x01(\x0B2..google.cloud.visionai.v1.UniversalInputConfigH\x00\x124\x0A\x13experimental_config\x18\x1A \x01(\x0B2\x17.google.protobuf.StructB\x12\x0A\x10processor_config\"\xD2\x02\x0A\x14StreamWithAnnotation\x123\x0A\x06stream\x18\x01 \x01(\x09B#\xFAA \x0A\x1Evisionai.googleapis.com/Stream\x12K\x0A\x17application_annotations\x18\x02 \x03(\x0B2*.google.cloud.visionai.v1.StreamAnnotation\x12W\x0A\x10node_annotations\x18\x03 \x03(\x0B2=.google.cloud.visionai.v1.StreamWithAnnotation.NodeAnnotation\x1A_\x0A\x0ENodeAnnotation\x12\x0C\x0A\x04node\x18\x01 \x01(\x09\x12?\x0A\x0Bannotations\x18\x02 \x03(\x0B2*.google.cloud.visionai.v1.StreamAnnotation\"j\x0A\x19ApplicationNodeAnnotation\x12\x0C\x0A\x04node\x18\x01 \x01(\x09\x12?\x0A\x0Bannotations\x18\x02 \x03(\x0B2*.google.cloud.visionai.v1.StreamAnnotation\"\xB1\x01\x0A\x13ResourceAnnotations\x12K\x0A\x17application_annotations\x18\x01 \x03(\x0B2*.google.cloud.visionai.v1.StreamAnnotation\x12M\x0A\x10node_annotations\x18\x02 \x03(\x0B23.google.cloud.visionai.v1.ApplicationNodeAnnotation\"\x82\x01\x0A\x16VideoStreamInputConfig\x12\x13\x0A\x07streams\x18\x01 \x03(\x09B\x02\x18\x01\x12S\x0A\x17streams_with_annotation\x18\x02 \x03(\x0B2..google.cloud.visionai.v1.StreamWithAnnotationB\x02\x18\x01\"\x1D\x0A\x1BAIEnabledDevicesInputConfig\"b\x0A\x14MediaWarehouseConfig\x12\x0E\x0A\x06corpus\x18\x01 \x01(\x09\x12\x12\x0A\x06region\x18\x02 \x01(\x09B\x02\x18\x01\x12&\x0A\x03ttl\x18\x03 \x01(\x0B2\x19.google.protobuf.Duration\"\xD5\x01\x0A\x10PersonBlurConfig\x12S\x0A\x10person_blur_type\x18\x01 \x01(\x0E29.google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType\x12\x12\x0A\x0Afaces_only\x18\x02 \x01(\x08\"X\x0A\x0EPersonBlurType\x12 \x0A\x1CPERSON_BLUR_TYPE_UNSPECIFIED\x10\x00\x12\x13\x0A\x0FFULL_OCCULUSION\x10\x01\x12\x0F\x0A\x0BBLUR_FILTER\x10\x02\"~\x0A\x14OccupancyCountConfig\x12\x1E\x0A\x16enable_people_counting\x18\x01 \x01(\x08\x12\x1F\x0A\x17enable_vehicle_counting\x18\x02 \x01(\x08\x12%\x0A\x1Denable_dwelling_time_tracking\x18\x03 \x01(\x08\"_\x0A\x1CPersonVehicleDetectionConfig\x12\x1E\x0A\x16enable_people_counting\x18\x01 \x01(\x08\x12\x1F\x0A\x17enable_vehicle_counting\x18\x02 \x01(\x08\"\xA5\x01\x0A*PersonalProtectiveEquipmentDetectionConfig\x12&\x0A\x1Eenable_face_coverage_detection\x18\x01 \x01(\x08\x12&\x0A\x1Eenable_head_coverage_detection\x18\x02 \x01(\x08\x12'\x0A\x1Fenable_hands_coverage_detection\x18\x03 \x01(\x08\"\x1E\x0A\x1CGeneralObjectDetectionConfig\"\xEC\x01\x0A\x0EBigQueryConfig\x12\x0D\x0A\x05table\x18\x01 \x01(\x09\x12b\x0A\x16cloud_function_mapping\x18\x02 \x03(\x0B2B.google.cloud.visionai.v1.BigQueryConfig.CloudFunctionMappingEntry\x12*\x0A\"create_default_table_if_not_exists\x18\x03 \x01(\x08\x1A;\x0A\x19CloudFunctionMappingEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"Q\x0A\x18VertexAutoMLVisionConfig\x12\x1C\x0A\x14confidence_threshold\x18\x01 \x01(\x02\x12\x17\x0A\x0Fmax_predictions\x18\x02 \x01(\x05\"\x89\x01\x0A\x17VertexAutoMLVideoConfig\x12\x1C\x0A\x14confidence_threshold\x18\x01 \x01(\x02\x12\x16\x0A\x0Eblocked_labels\x18\x02 \x03(\x09\x12\x17\x0A\x0Fmax_predictions\x18\x03 \x01(\x05\x12\x1F\x0A\x17bounding_box_size_limit\x18\x04 \x01(\x02\"\x95\x02\x0A\x12VertexCustomConfig\x12\x1A\x0A\x12max_prediction_fps\x18\x01 \x01(\x05\x12I\x0A\x13dedicated_resources\x18\x02 \x01(\x0B2,.google.cloud.visionai.v1.DedicatedResources\x12&\x0A\x1Epost_processing_cloud_function\x18\x03 \x01(\x09\x12#\x0A\x1Battach_application_metadata\x18\x04 \x01(\x08\x12,\x0A\x1Adynamic_config_input_topic\x18\x06 \x01(\x09B\x03\xE0A\x01H\x00\x88\x01\x01B\x1D\x0A\x1B_dynamic_config_input_topic\"#\x0A\x0FGcsOutputConfig\x12\x10\x0A\x08gcs_path\x18\x01 \x01(\x09\"\x16\x0A\x14UniversalInputConfig\"\x8D\x01\x0A\x0BMachineSpec\x12\x19\x0A\x0Cmachine_type\x18\x01 \x01(\x09B\x03\xE0A\x05\x12H\x0A\x10accelerator_type\x18\x02 \x01(\x0E2).google.cloud.visionai.v1.AcceleratorTypeB\x03\xE0A\x05\x12\x19\x0A\x11accelerator_count\x18\x03 \x01(\x05\"A\x0A\x15AutoscalingMetricSpec\x12\x18\x0A\x0Bmetric_name\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x0E\x0A\x06target\x18\x02 \x01(\x05\"\xF4\x01\x0A\x12DedicatedResources\x12C\x0A\x0Cmachine_spec\x18\x01 \x01(\x0B2%.google.cloud.visionai.v1.MachineSpecB\x06\xE0A\x02\xE0A\x05\x12!\x0A\x11min_replica_count\x18\x02 \x01(\x05B\x06\xE0A\x02\xE0A\x05\x12\x1E\x0A\x11max_replica_count\x18\x03 \x01(\x05B\x03\xE0A\x05\x12V\x0A\x18autoscaling_metric_specs\x18\x04 \x03(\x0B2/.google.cloud.visionai.v1.AutoscalingMetricSpecB\x03\xE0A\x05\"\\\x0A\x17ProductRecognizerConfig\x12\x17\x0A\x0Fretail_endpoint\x18\x01 \x01(\x09\x12(\x0A recognition_confidence_threshold\x18\x02 \x01(\x02\"\x8C\x01\x0A\x13TagRecognizerConfig\x12-\x0A%entity_detection_confidence_threshold\x18\x01 \x01(\x02\x12F\x0A\x12tag_parsing_config\x18\x02 \x01(\x0B2*.google.cloud.visionai.v1.TagParsingConfig\"\xAA\x03\x0A\x10TagParsingConfig\x12^\x0A\x16entity_parsing_configs\x18\x01 \x03(\x0B2>.google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig\x1A\xB5\x02\x0A\x13EntityParsingConfig\x12\x19\x0A\x0Centity_class\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x12\x0A\x05regex\x18\x02 \x01(\x09B\x03\xE0A\x01\x12|\x0A\x18entity_matching_strategy\x18\x03 \x01(\x0E2U.google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig.EntityMatchingStrategyB\x03\xE0A\x01\"q\x0A\x16EntityMatchingStrategy\x12(\x0A\$ENTITY_MATCHING_STRATEGY_UNSPECIFIED\x10\x00\x12\x17\x0A\x13MULTI_LINE_MATCHING\x10\x01\x12\x14\x0A\x10MAX_OVERLAP_AREA\x10\x02*\xA0\x02\x0A\x09ModelType\x12\x1A\x0A\x16MODEL_TYPE_UNSPECIFIED\x10\x00\x12\x18\x0A\x14IMAGE_CLASSIFICATION\x10\x01\x12\x14\x0A\x10OBJECT_DETECTION\x10\x02\x12\x18\x0A\x14VIDEO_CLASSIFICATION\x10\x03\x12\x19\x0A\x15VIDEO_OBJECT_TRACKING\x10\x04\x12\x1C\x0A\x18VIDEO_ACTION_RECOGNITION\x10\x05\x12\x16\x0A\x12OCCUPANCY_COUNTING\x10\x06\x12\x0F\x0A\x0BPERSON_BLUR\x10\x07\x12\x11\x0A\x0DVERTEX_CUSTOM\x10\x08\x12\x16\x0A\x12PRODUCT_RECOGNIZER\x10\x09\x12\x12\x0A\x0ETAG_RECOGNIZER\x10\x0A\x12\x0C\x0A\x08SYNTH_ID\x10\x0F*\xD0\x01\x0A\x0FAcceleratorType\x12 \x0A\x1CACCELERATOR_TYPE_UNSPECIFIED\x10\x00\x12\x14\x0A\x10NVIDIA_TESLA_K80\x10\x01\x12\x15\x0A\x11NVIDIA_TESLA_P100\x10\x02\x12\x15\x0A\x11NVIDIA_TESLA_V100\x10\x03\x12\x13\x0A\x0FNVIDIA_TESLA_P4\x10\x04\x12\x13\x0A\x0FNVIDIA_TESLA_T4\x10\x05\x12\x15\x0A\x11NVIDIA_TESLA_A100\x10\x08\x12\x0A\x0A\x06TPU_V2\x10\x06\x12\x0A\x0A\x06TPU_V3\x10\x07*W\x0A\x08DataType\x12\x19\x0A\x15DATA_TYPE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05VIDEO\x10\x01\x12\x09\x0A\x05IMAGE\x10\x03\x12\x09\x0A\x05PROTO\x10\x02\x12\x0F\x0A\x0BPLACEHOLDER\x10\x042\xEA-\x0A\x0BAppPlatform\x12\xBC\x01\x0A\x10ListApplications\x121.google.cloud.visionai.v1.ListApplicationsRequest\x1A2.google.cloud.visionai.v1.ListApplicationsResponse\"A\xDAA\x06parent\x82\xD3\xE4\x93\x022\x120/v1/{parent=projects/*/locations/*}/applications\x12\xA9\x01\x0A\x0EGetApplication\x12/.google.cloud.visionai.v1.GetApplicationRequest\x1A%.google.cloud.visionai.v1.Application\"?\xDAA\x04name\x82\xD3\xE4\x93\x022\x120/v1/{name=projects/*/locations/*/applications/*}\x12\xE5\x01\x0A\x11CreateApplication\x122.google.cloud.visionai.v1.CreateApplicationRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA \x0A\x0BApplication\x12\x11OperationMetadata\xDAA\x12parent,application\x82\xD3\xE4\x93\x02?\"0/v1/{parent=projects/*/locations/*}/applications:\x0Bapplication\x12\xF7\x01\x0A\x11UpdateApplication\x122.google.cloud.visionai.v1.UpdateApplicationRequest\x1A\x1D.google.longrunning.Operation\"\x8E\x01\xCAA \x0A\x0BApplication\x12\x11OperationMetadata\xDAA\x17application,update_mask\x82\xD3\xE4\x93\x02K2\"9/v1/{name=projects/*/locations/*/applications/*}:undeploy:\x01*\x12\x83\x02\x0A\x19AddApplicationStreamInput\x12:.google.cloud.visionai.v1.AddApplicationStreamInputRequest\x1A\x1D.google.longrunning.Operation\"\x8A\x01\xCAA6\x0A!AddApplicationStreamInputResponse\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02D\"?/v1/{name=projects/*/locations/*/applications/*}:addStreamInput:\x01*\x12\x8F\x02\x0A\x1CRemoveApplicationStreamInput\x12=.google.cloud.visionai.v1.RemoveApplicationStreamInputRequest\x1A\x1D.google.longrunning.Operation\"\x90\x01\xCAA9\x0A\$RemoveApplicationStreamInputResponse\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02G\"B/v1/{name=projects/*/locations/*/applications/*}:removeStreamInput:\x01*\x12\x8F\x02\x0A\x1CUpdateApplicationStreamInput\x12=.google.cloud.visionai.v1.UpdateApplicationStreamInputRequest\x1A\x1D.google.longrunning.Operation\"\x90\x01\xCAA9\x0A\$UpdateApplicationStreamInputResponse\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02G\"B/v1/{name=projects/*/locations/*/applications/*}:updateStreamInput:\x01*\x12\xBF\x01\x0A\x0DListInstances\x12..google.cloud.visionai.v1.ListInstancesRequest\x1A/.google.cloud.visionai.v1.ListInstancesResponse\"M\xDAA\x06parent\x82\xD3\xE4\x93\x02>\x12\x12internalAddGeneratedFile( - "\x0A\xE1\x0C\x0A2google/cloud/visionai/v1/streaming_resources.proto\x12\x18google.cloud.visionai.v1\x1A\x19google/api/resource.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xCF\x01\x0A\x19GstreamerBufferDescriptor\x12\x13\x0A\x0Bcaps_string\x18\x01 \x01(\x09\x12\x14\x0A\x0Cis_key_frame\x18\x02 \x01(\x08\x12,\x0A\x08pts_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08dts_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12+\x0A\x08duration\x18\x05 \x01(\x0B2\x19.google.protobuf.Duration\"C\x0A\x12RawImageDescriptor\x12\x0E\x0A\x06format\x18\x01 \x01(\x09\x12\x0E\x0A\x06height\x18\x02 \x01(\x05\x12\x0D\x0A\x05width\x18\x03 \x01(\x05\"\xC9\x02\x0A\x0APacketType\x12\x12\x0A\x0Atype_class\x18\x01 \x01(\x09\x12L\x0A\x0Ftype_descriptor\x18\x02 \x01(\x0B23.google.cloud.visionai.v1.PacketType.TypeDescriptor\x1A\xD8\x01\x0A\x0ETypeDescriptor\x12Z\x0A\x1Bgstreamer_buffer_descriptor\x18\x02 \x01(\x0B23.google.cloud.visionai.v1.GstreamerBufferDescriptorH\x00\x12L\x0A\x14raw_image_descriptor\x18\x03 \x01(\x0B2,.google.cloud.visionai.v1.RawImageDescriptorH\x00\x12\x0C\x0A\x04type\x18\x01 \x01(\x09B\x0E\x0A\x0Ctype_details\"Q\x0A\x0EServerMetadata\x12\x0E\x0A\x06offset\x18\x01 \x01(\x03\x12/\x0A\x0Bingest_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\"E\x0A\x0ESeriesMetadata\x123\x0A\x06series\x18\x01 \x01(\x09B#\xFAA \x0A\x1Evisionai.googleapis.com/Series\"\xF4\x02\x0A\x0CPacketHeader\x125\x0A\x0Ccapture_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x04\x12:\x0A\x04type\x18\x02 \x01(\x0B2\$.google.cloud.visionai.v1.PacketTypeB\x06\xE0A\x04\xE0A\x05\x12.\x0A\x08metadata\x18\x03 \x01(\x0B2\x17.google.protobuf.StructB\x03\xE0A\x04\x12F\x0A\x0Fserver_metadata\x18\x04 \x01(\x0B2(.google.cloud.visionai.v1.ServerMetadataB\x03\xE0A\x03\x12I\x0A\x0Fseries_metadata\x18\x05 \x01(\x0B2(.google.cloud.visionai.v1.SeriesMetadataB\x06\xE0A\x04\xE0A\x05\x12\x12\x0A\x05flags\x18\x06 \x01(\x05B\x03\xE0A\x05\x12\x1A\x0A\x0Dtrace_context\x18\x07 \x01(\x09B\x03\xE0A\x05\"Q\x0A\x06Packet\x126\x0A\x06header\x18\x01 \x01(\x0B2&.google.cloud.visionai.v1.PacketHeader\x12\x0F\x0A\x07payload\x18\x02 \x01(\x0CB\xC7\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x17StreamingResourcesProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamingService.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamingService.php deleted file mode 100644 index be61f013f4a7..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamingService.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xBA \x0A0google/cloud/visionai/v1/streaming_service.proto\x12\x18google.cloud.visionai.v1\x1A\x17google/api/client.proto\x1A2google/cloud/visionai/v1/streaming_resources.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xB5\x03\x0A\x14ReceiveEventsRequest\x12T\x0A\x0Dsetup_request\x18\x01 \x01(\x0B2;.google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequestH\x00\x12A\x0A\x0Ecommit_request\x18\x02 \x01(\x0B2'.google.cloud.visionai.v1.CommitRequestH\x00\x1A\xF8\x01\x0A\x0CSetupRequest\x12\x0F\x0A\x07cluster\x18\x01 \x01(\x09\x12\x0E\x0A\x06stream\x18\x02 \x01(\x09\x12\x10\x0A\x08receiver\x18\x03 \x01(\x09\x12A\x0A\x0Fcontrolled_mode\x18\x04 \x01(\x0B2(.google.cloud.visionai.v1.ControlledMode\x125\x0A\x12heartbeat_interval\x18\x05 \x01(\x0B2\x19.google.protobuf.Duration\x12;\x0A\x18writes_done_grace_period\x18\x06 \x01(\x0B2\x19.google.protobuf.DurationB\x09\x0A\x07request\"}\x0A\x0BEventUpdate\x12\x0E\x0A\x06stream\x18\x01 \x01(\x09\x12\x0D\x0A\x05event\x18\x02 \x01(\x09\x12\x0E\x0A\x06series\x18\x03 \x01(\x09\x12/\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12\x0E\x0A\x06offset\x18\x05 \x01(\x03\"]\x0A\x1CReceiveEventsControlResponse\x12\x13\x0A\x09heartbeat\x18\x01 \x01(\x08H\x00\x12\x1D\x0A\x13writes_done_request\x18\x02 \x01(\x08H\x00B\x09\x0A\x07control\"\xAD\x01\x0A\x15ReceiveEventsResponse\x12=\x0A\x0Cevent_update\x18\x01 \x01(\x0B2%.google.cloud.visionai.v1.EventUpdateH\x00\x12I\x0A\x07control\x18\x02 \x01(\x0B26.google.cloud.visionai.v1.ReceiveEventsControlResponseH\x00B\x0A\x0A\x08response\"\x9C\x01\x0A\x05Lease\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x0E\x0A\x06series\x18\x02 \x01(\x09\x12\x0D\x0A\x05owner\x18\x03 \x01(\x09\x12/\x0A\x0Bexpire_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.Timestamp\x127\x0A\x0Alease_type\x18\x05 \x01(\x0E2#.google.cloud.visionai.v1.LeaseType\"\x96\x01\x0A\x13AcquireLeaseRequest\x12\x0E\x0A\x06series\x18\x01 \x01(\x09\x12\x0D\x0A\x05owner\x18\x02 \x01(\x09\x12'\x0A\x04term\x18\x03 \x01(\x0B2\x19.google.protobuf.Duration\x127\x0A\x0Alease_type\x18\x04 \x01(\x0E2#.google.cloud.visionai.v1.LeaseType\"g\x0A\x11RenewLeaseRequest\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x0E\x0A\x06series\x18\x02 \x01(\x09\x12\x0D\x0A\x05owner\x18\x03 \x01(\x09\x12'\x0A\x04term\x18\x04 \x01(\x0B2\x19.google.protobuf.Duration\"@\x0A\x13ReleaseLeaseRequest\x12\x0A\x0A\x02id\x18\x01 \x01(\x09\x12\x0E\x0A\x06series\x18\x02 \x01(\x09\x12\x0D\x0A\x05owner\x18\x03 \x01(\x09\"\x16\x0A\x14ReleaseLeaseResponse\"\x90\x01\x0A\x0FRequestMetadata\x12\x0E\x0A\x06stream\x18\x01 \x01(\x09\x12\x0D\x0A\x05event\x18\x02 \x01(\x09\x12\x0E\x0A\x06series\x18\x03 \x01(\x09\x12\x10\x0A\x08lease_id\x18\x04 \x01(\x09\x12\x0D\x0A\x05owner\x18\x05 \x01(\x09\x12-\x0A\x0Alease_term\x18\x06 \x01(\x0B2\x19.google.protobuf.Duration\"\x92\x01\x0A\x12SendPacketsRequest\x122\x0A\x06packet\x18\x01 \x01(\x0B2 .google.cloud.visionai.v1.PacketH\x00\x12=\x0A\x08metadata\x18\x02 \x01(\x0B2).google.cloud.visionai.v1.RequestMetadataH\x00B\x09\x0A\x07request\"\x15\x0A\x13SendPacketsResponse\"\xB1\x04\x0A\x15ReceivePacketsRequest\x12U\x0A\x0Dsetup_request\x18\x06 \x01(\x0B2<.google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequestH\x00\x12A\x0A\x0Ecommit_request\x18\x07 \x01(\x0B2'.google.cloud.visionai.v1.CommitRequestH\x00\x1A\xF2\x02\x0A\x0CSetupRequest\x12A\x0A\x12eager_receive_mode\x18\x03 \x01(\x0B2#.google.cloud.visionai.v1.EagerModeH\x00\x12K\x0A\x17controlled_receive_mode\x18\x04 \x01(\x0B2(.google.cloud.visionai.v1.ControlledModeH\x00\x12;\x0A\x08metadata\x18\x01 \x01(\x0B2).google.cloud.visionai.v1.RequestMetadata\x12\x10\x0A\x08receiver\x18\x02 \x01(\x09\x125\x0A\x12heartbeat_interval\x18\x05 \x01(\x0B2\x19.google.protobuf.Duration\x12;\x0A\x18writes_done_grace_period\x18\x06 \x01(\x0B2\x19.google.protobuf.DurationB\x0F\x0A\x0Dconsumer_modeB\x09\x0A\x07request\"^\x0A\x1DReceivePacketsControlResponse\x12\x13\x0A\x09heartbeat\x18\x01 \x01(\x08H\x00\x12\x1D\x0A\x13writes_done_request\x18\x02 \x01(\x08H\x00B\x09\x0A\x07control\"\xA4\x01\x0A\x16ReceivePacketsResponse\x122\x0A\x06packet\x18\x01 \x01(\x0B2 .google.cloud.visionai.v1.PacketH\x00\x12J\x0A\x07control\x18\x03 \x01(\x0B27.google.cloud.visionai.v1.ReceivePacketsControlResponseH\x00B\x0A\x0A\x08response\"\x0B\x0A\x09EagerMode\"h\x0A\x0EControlledMode\x12!\x0A\x17starting_logical_offset\x18\x01 \x01(\x09H\x00\x12 \x0A\x18fallback_starting_offset\x18\x02 \x01(\x09B\x11\x0A\x0Fstarting_offset\"\x1F\x0A\x0DCommitRequest\x12\x0E\x0A\x06offset\x18\x01 \x01(\x03*U\x0A\x09LeaseType\x12\x1A\x0A\x16LEASE_TYPE_UNSPECIFIED\x10\x00\x12\x15\x0A\x11LEASE_TYPE_READER\x10\x01\x12\x15\x0A\x11LEASE_TYPE_WRITER\x10\x022\xE3\x07\x0A\x10StreamingService\x12p\x0A\x0BSendPackets\x12,.google.cloud.visionai.v1.SendPacketsRequest\x1A-.google.cloud.visionai.v1.SendPacketsResponse\"\x00(\x010\x01\x12y\x0A\x0EReceivePackets\x12/.google.cloud.visionai.v1.ReceivePacketsRequest\x1A0.google.cloud.visionai.v1.ReceivePacketsResponse\"\x00(\x010\x01\x12v\x0A\x0DReceiveEvents\x12..google.cloud.visionai.v1.ReceiveEventsRequest\x1A/.google.cloud.visionai.v1.ReceiveEventsResponse\"\x00(\x010\x01\x12\xAF\x01\x0A\x0CAcquireLease\x12-.google.cloud.visionai.v1.AcquireLeaseRequest\x1A\x1F.google.cloud.visionai.v1.Lease\"O\x82\xD3\xE4\x93\x02I\"D/v1/{series=projects/*/locations/*/clusters/*/series/*}:acquireLease:\x01*\x12\xA9\x01\x0A\x0ARenewLease\x12+.google.cloud.visionai.v1.RenewLeaseRequest\x1A\x1F.google.cloud.visionai.v1.Lease\"M\x82\xD3\xE4\x93\x02G\"B/v1/{series=projects/*/locations/*/clusters/*/series/*}:renewLease:\x01*\x12\xBE\x01\x0A\x0CReleaseLease\x12-.google.cloud.visionai.v1.ReleaseLeaseRequest\x1A..google.cloud.visionai.v1.ReleaseLeaseResponse\"O\x82\xD3\xE4\x93\x02I\"D/v1/{series=projects/*/locations/*/clusters/*/series/*}:releaseLease:\x01*\x1AK\xCAA\x17visionai.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xC5\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x15StreamingServiceProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamsResources.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamsResources.php deleted file mode 100644 index 8c05b93e3826..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamsResources.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xCF\x15\x0A0google/cloud/visionai/v1/streams_resources.proto\x12\x18google.cloud.visionai.v1\x1A\x19google/api/resource.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xAF\x04\x0A\x06Stream\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12<\x0A\x06labels\x18\x04 \x03(\x0B2,.google.cloud.visionai.v1.Stream.LabelsEntry\x12F\x0A\x0Bannotations\x18\x05 \x03(\x0B21.google.cloud.visionai.v1.Stream.AnnotationsEntry\x12\x14\x0A\x0Cdisplay_name\x18\x06 \x01(\x09\x12\x1B\x0A\x13enable_hls_playback\x18\x07 \x01(\x08\x12\x1D\x0A\x15media_warehouse_asset\x18\x08 \x01(\x09\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:p\xEAAm\x0A\x1Evisionai.googleapis.com/Stream\x12Kprojects/{project}/locations/{location}/clusters/{cluster}/streams/{stream}\"\x81\x05\x0A\x05Event\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12;\x0A\x06labels\x18\x04 \x03(\x0B2+.google.cloud.visionai.v1.Event.LabelsEntry\x12E\x0A\x0Bannotations\x18\x05 \x03(\x0B20.google.cloud.visionai.v1.Event.AnnotationsEntry\x12>\x0A\x0Falignment_clock\x18\x06 \x01(\x0E2%.google.cloud.visionai.v1.Event.Clock\x12/\x0A\x0Cgrace_period\x18\x07 \x01(\x0B2\x19.google.protobuf.Duration\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"7\x0A\x05Clock\x12\x15\x0A\x11CLOCK_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07CAPTURE\x10\x01\x12\x0A\x0A\x06INGEST\x10\x02:m\xEAAj\x0A\x1Dvisionai.googleapis.com/Event\x12Iprojects/{project}/locations/{location}/clusters/{cluster}/events/{event}\"\xCA\x04\x0A\x06Series\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12<\x0A\x06labels\x18\x04 \x03(\x0B2,.google.cloud.visionai.v1.Series.LabelsEntry\x12F\x0A\x0Bannotations\x18\x05 \x03(\x0B21.google.cloud.visionai.v1.Series.AnnotationsEntry\x126\x0A\x06stream\x18\x06 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Stream\x124\x0A\x05event\x18\x07 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Event\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:o\xEAAl\x0A\x1Evisionai.googleapis.com/Series\x12Jprojects/{project}/locations/{location}/clusters/{cluster}/series/{series}\"\xD1\x04\x0A\x07Channel\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12=\x0A\x06labels\x18\x04 \x03(\x0B2-.google.cloud.visionai.v1.Channel.LabelsEntry\x12G\x0A\x0Bannotations\x18\x05 \x03(\x0B22.google.cloud.visionai.v1.Channel.AnnotationsEntry\x126\x0A\x06stream\x18\x06 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Stream\x124\x0A\x05event\x18\x07 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Event\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\x1A2\x0A\x10AnnotationsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01:s\xEAAp\x0A\x1Fvisionai.googleapis.com/Channel\x12Mprojects/{project}/locations/{location}/clusters/{cluster}/channels/{channel}B\xC5\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x15StreamsResourcesProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamsService.php b/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamsService.php deleted file mode 100644 index 9062b432eb9d..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/GPBMetadata/Google/Cloud/Visionai/V1/StreamsService.php +++ /dev/null @@ -1,34 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xE2F\x0A.google/cloud/visionai/v1/streams_service.proto\x12\x18google.cloud.visionai.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A%google/cloud/visionai/v1/common.proto\x1A0google/cloud/visionai/v1/streams_resources.proto\x1A#google/longrunning/operations.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x99\x01\x0A\x13ListClustersRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"y\x0A\x14ListClustersResponse\x123\x0A\x08clusters\x18\x01 \x03(\x0B2!.google.cloud.visionai.v1.Cluster\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"J\x0A\x11GetClusterRequest\x125\x0A\x04name\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\"\xBA\x01\x0A\x14CreateClusterRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x12\x1Fvisionai.googleapis.com/Cluster\x12\x17\x0A\x0Acluster_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x127\x0A\x07cluster\x18\x03 \x01(\x0B2!.google.cloud.visionai.v1.ClusterB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\x9E\x01\x0A\x14UpdateClusterRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x127\x0A\x07cluster\x18\x02 \x01(\x0B2!.google.cloud.visionai.v1.ClusterB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"f\x0A\x14DeleteClusterRequest\x125\x0A\x04name\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\x96\x01\x0A\x12ListStreamsRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"v\x0A\x13ListStreamsResponse\x121\x0A\x07streams\x18\x01 \x03(\x0B2 .google.cloud.visionai.v1.Stream\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"H\x0A\x10GetStreamRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Stream\"\xB6\x01\x0A\x13CreateStreamRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x16\x0A\x09stream_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x125\x0A\x06stream\x18\x03 \x01(\x0B2 .google.cloud.visionai.v1.StreamB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\x9B\x01\x0A\x13UpdateStreamRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x125\x0A\x06stream\x18\x02 \x01(\x0B2 .google.cloud.visionai.v1.StreamB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"d\x0A\x13DeleteStreamRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Stream\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"{\x0A\x19GetStreamThumbnailRequest\x12\x13\x0A\x06stream\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x1C\x0A\x0Fgcs_object_name\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x12\x0A\x05event\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\x1C\x0A\x1AGetStreamThumbnailResponse\"4\x0A\x1DGenerateStreamHlsTokenRequest\x12\x13\x0A\x06stream\x18\x01 \x01(\x09B\x03\xE0A\x02\"d\x0A\x1EGenerateStreamHlsTokenResponse\x12\x0D\x0A\x05token\x18\x01 \x01(\x09\x123\x0A\x0Fexpiration_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x95\x01\x0A\x11ListEventsRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"s\x0A\x12ListEventsResponse\x12/\x0A\x06events\x18\x01 \x03(\x0B2\x1F.google.cloud.visionai.v1.Event\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"F\x0A\x0FGetEventRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Event\"\xB2\x01\x0A\x12CreateEventRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x15\x0A\x08event_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x123\x0A\x05event\x18\x03 \x01(\x0B2\x1F.google.cloud.visionai.v1.EventB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\x98\x01\x0A\x12UpdateEventRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x123\x0A\x05event\x18\x02 \x01(\x0B2\x1F.google.cloud.visionai.v1.EventB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"b\x0A\x12DeleteEventRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Event\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\x95\x01\x0A\x11ListSeriesRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\x12\x10\x0A\x08order_by\x18\x05 \x01(\x09\"t\x0A\x12ListSeriesResponse\x120\x0A\x06series\x18\x01 \x03(\x0B2 .google.cloud.visionai.v1.Series\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x13\x0A\x0Bunreachable\x18\x03 \x03(\x09\"H\x0A\x10GetSeriesRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Series\"\xB6\x01\x0A\x13CreateSeriesRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x16\x0A\x09series_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x125\x0A\x06series\x18\x03 \x01(\x0B2 .google.cloud.visionai.v1.SeriesB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x01\"\x9B\x01\x0A\x13UpdateSeriesRequest\x124\x0A\x0Bupdate_mask\x18\x01 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x125\x0A\x06series\x18\x02 \x01(\x0B2 .google.cloud.visionai.v1.SeriesB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x03 \x01(\x09B\x03\xE0A\x01\"d\x0A\x13DeleteSeriesRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Series\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"\xBF\x01\x0A\x19MaterializeChannelRequest\x127\x0A\x06parent\x18\x01 \x01(\x09B'\xE0A\x02\xFAA!\x0A\x1Fvisionai.googleapis.com/Cluster\x12\x17\x0A\x0Achannel_id\x18\x02 \x01(\x09B\x03\xE0A\x02\x127\x0A\x07channel\x18\x03 \x01(\x0B2!.google.cloud.visionai.v1.ChannelB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x04 \x01(\x09B\x03\xE0A\x012\xBC%\x0A\x0EStreamsService\x12\xAC\x01\x0A\x0CListClusters\x12-.google.cloud.visionai.v1.ListClustersRequest\x1A..google.cloud.visionai.v1.ListClustersResponse\"=\xDAA\x06parent\x82\xD3\xE4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/clusters\x12\x99\x01\x0A\x0AGetCluster\x12+.google.cloud.visionai.v1.GetClusterRequest\x1A!.google.cloud.visionai.v1.Cluster\";\xDAA\x04name\x82\xD3\xE4\x93\x02.\x12,/v1/{name=projects/*/locations/*/clusters/*}\x12\xD8\x01\x0A\x0DCreateCluster\x12..google.cloud.visionai.v1.CreateClusterRequest\x1A\x1D.google.longrunning.Operation\"x\xCAA\x1C\x0A\x07Cluster\x12\x11OperationMetadata\xDAA\x19parent,cluster,cluster_id\x82\xD3\xE4\x93\x027\",/v1/{parent=projects/*/locations/*}/clusters:\x07cluster\x12\xDA\x01\x0A\x0DUpdateCluster\x12..google.cloud.visionai.v1.UpdateClusterRequest\x1A\x1D.google.longrunning.Operation\"z\xCAA\x1C\x0A\x07Cluster\x12\x11OperationMetadata\xDAA\x13cluster,update_mask\x82\xD3\xE4\x93\x02?24/v1/{cluster.name=projects/*/locations/*/clusters/*}:\x07cluster\x12\xC8\x01\x0A\x0DDeleteCluster\x12..google.cloud.visionai.v1.DeleteClusterRequest\x1A\x1D.google.longrunning.Operation\"h\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02.*,/v1/{name=projects/*/locations/*/clusters/*}\x12\xB3\x01\x0A\x0BListStreams\x12,.google.cloud.visionai.v1.ListStreamsRequest\x1A-.google.cloud.visionai.v1.ListStreamsResponse\"G\xDAA\x06parent\x82\xD3\xE4\x93\x028\x126/v1/{parent=projects/*/locations/*/clusters/*}/streams\x12\xA0\x01\x0A\x09GetStream\x12*.google.cloud.visionai.v1.GetStreamRequest\x1A .google.cloud.visionai.v1.Stream\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\x126/v1/{name=projects/*/locations/*/clusters/*/streams/*}\x12\xDC\x01\x0A\x0CCreateStream\x12-.google.cloud.visionai.v1.CreateStreamRequest\x1A\x1D.google.longrunning.Operation\"~\xCAA\x1B\x0A\x06Stream\x12\x11OperationMetadata\xDAA\x17parent,stream,stream_id\x82\xD3\xE4\x93\x02@\"6/v1/{parent=projects/*/locations/*/clusters/*}/streams:\x06stream\x12\xDF\x01\x0A\x0CUpdateStream\x12-.google.cloud.visionai.v1.UpdateStreamRequest\x1A\x1D.google.longrunning.Operation\"\x80\x01\xCAA\x1B\x0A\x06Stream\x12\x11OperationMetadata\xDAA\x12stream,update_mask\x82\xD3\xE4\x93\x02G2=/v1/{stream.name=projects/*/locations/*/clusters/*/streams/*}:\x06stream\x12\xD0\x01\x0A\x0CDeleteStream\x12-.google.cloud.visionai.v1.DeleteStreamRequest\x1A\x1D.google.longrunning.Operation\"r\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x028*6/v1/{name=projects/*/locations/*/clusters/*/streams/*}\x12\x86\x02\x0A\x12GetStreamThumbnail\x123.google.cloud.visionai.v1.GetStreamThumbnailRequest\x1A\x1D.google.longrunning.Operation\"\x9B\x01\xCAA/\x0A\x1AGetStreamThumbnailResponse\x12\x11OperationMetadata\xDAA\x16stream,gcs_object_name\x82\xD3\xE4\x93\x02J\"E/v1/{stream=projects/*/locations/*/clusters/*/streams/*}:getThumbnail:\x01*\x12\xF0\x01\x0A\x16GenerateStreamHlsToken\x127.google.cloud.visionai.v1.GenerateStreamHlsTokenRequest\x1A8.google.cloud.visionai.v1.GenerateStreamHlsTokenResponse\"c\xDAA\x06stream\x82\xD3\xE4\x93\x02T\"O/v1/{stream=projects/*/locations/*/clusters/*/streams/*}:generateStreamHlsToken:\x01*\x12\xAF\x01\x0A\x0AListEvents\x12+.google.cloud.visionai.v1.ListEventsRequest\x1A,.google.cloud.visionai.v1.ListEventsResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*/clusters/*}/events\x12\x9C\x01\x0A\x08GetEvent\x12).google.cloud.visionai.v1.GetEventRequest\x1A\x1F.google.cloud.visionai.v1.Event\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/clusters/*/events/*}\x12\xD5\x01\x0A\x0BCreateEvent\x12,.google.cloud.visionai.v1.CreateEventRequest\x1A\x1D.google.longrunning.Operation\"y\xCAA\x1A\x0A\x05Event\x12\x11OperationMetadata\xDAA\x15parent,event,event_id\x82\xD3\xE4\x93\x02>\"5/v1/{parent=projects/*/locations/*/clusters/*}/events:\x05event\x12\xD7\x01\x0A\x0BUpdateEvent\x12,.google.cloud.visionai.v1.UpdateEventRequest\x1A\x1D.google.longrunning.Operation\"{\xCAA\x1A\x0A\x05Event\x12\x11OperationMetadata\xDAA\x11event,update_mask\x82\xD3\xE4\x93\x02D2;/v1/{event.name=projects/*/locations/*/clusters/*/events/*}:\x05event\x12\xCD\x01\x0A\x0BDeleteEvent\x12,.google.cloud.visionai.v1.DeleteEventRequest\x1A\x1D.google.longrunning.Operation\"q\xCAA*\x0A\x15google.protobuf.Empty\x12\x11OperationMetadata\xDAA\x04name\x82\xD3\xE4\x93\x027*5/v1/{name=projects/*/locations/*/clusters/*/events/*}\x12\xAF\x01\x0A\x0AListSeries\x12+.google.cloud.visionai.v1.ListSeriesRequest\x1A,.google.cloud.visionai.v1.ListSeriesResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*/clusters/*}/series\x12\x9F\x01\x0A\x09GetSeries\x12*.google.cloud.visionai.v1.GetSeriesRequest\x1A .google.cloud.visionai.v1.Series\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/clusters/*/series/*}\x12\xDB\x01\x0A\x0CCreateSeries\x12-.google.cloud.visionai.v1.CreateSeriesRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA\x1B\x0A\x06Series\x12\x11OperationMetadata\xDAA\x17parent,series,series_id\x82\xD3\xE4\x93\x02?\"5/v1/{parent=projects/*/locations/*/clusters/*}/series:\x06series\x12\xDD\x01\x0A\x0CUpdateSeries\x12-.google.cloud.visionai.v1.UpdateSeriesRequest\x1A\x1D.google.longrunning.Operation\"\x7F\xCAA\x1B\x0A\x06Series\x12\x11OperationMetadata\xDAA\x12series,update_mask\x82\xD3\xE4\x93\x02F2internalAddGeneratedFile( - "\x0A\xDF\xB4\x02\x0A(google/cloud/visionai/v1/warehouse.proto\x12\x18google.cloud.visionai.v1\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A%google/cloud/visionai/v1/common.proto\x1A#google/longrunning/operations.proto\x1A\x19google/protobuf/any.proto\x1A\x1Egoogle/protobuf/duration.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\x1A\x1Cgoogle/protobuf/struct.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\x1A\x17google/rpc/status.proto\x1A\x1Agoogle/type/datetime.proto\"\xAA\x01\x0A\x12CreateAssetRequest\x126\x0A\x06parent\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Corpus\x123\x0A\x05asset\x18\x02 \x01(\x0B2\x1F.google.cloud.visionai.v1.AssetB\x03\xE0A\x02\x12\x1A\x0A\x08asset_id\x18\x03 \x01(\x09B\x03\xE0A\x01H\x00\x88\x01\x01B\x0B\x0A\x09_asset_id\"F\x0A\x0FGetAssetRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\"\x81\x01\x0A\x11ListAssetsRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x12\x1Dvisionai.googleapis.com/Asset\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x05 \x01(\x09\"^\x0A\x12ListAssetsResponse\x12/\x0A\x06assets\x18\x01 \x03(\x0B2\x1F.google.cloud.visionai.v1.Asset\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"z\x0A\x12UpdateAssetRequest\x123\x0A\x05asset\x18\x01 \x01(\x0B2\x1F.google.cloud.visionai.v1.AssetB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"I\x0A\x12DeleteAssetRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\"\x97\x02\x0A\x0BAssetSource\x12P\x0A\x10asset_gcs_source\x18\x01 \x01(\x0B24.google.cloud.visionai.v1.AssetSource.AssetGcsSourceH\x00\x12T\x0A\x12asset_content_data\x18\x02 \x01(\x0B26.google.cloud.visionai.v1.AssetSource.AssetContentDataH\x00\x1A!\x0A\x0EAssetGcsSource\x12\x0F\x0A\x07gcs_uri\x18\x01 \x01(\x09\x1A.\x0A\x10AssetContentData\x12\x1A\x0A\x12asset_content_data\x18\x01 \x01(\x0CB\x0D\x0A\x0Bsource_form\"\x86\x01\x0A\x12UploadAssetRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\x12;\x0A\x0Casset_source\x18\x02 \x01(\x0B2%.google.cloud.visionai.v1.AssetSource\"\x15\x0A\x13UploadAssetResponse\"v\x0A\x13UploadAssetMetadata\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bupdate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\"R\x0A\x1BGenerateRetrievalUrlRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\"2\x0A\x1CGenerateRetrievalUrlResponse\x12\x12\x0A\x0Asigned_uri\x18\x01 \x01(\x09\"\x86\x02\x0A\x05Asset\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12&\x0A\x03ttl\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration\x12S\x0A\x10asset_gcs_source\x18\x04 \x01(\x0B24.google.cloud.visionai.v1.AssetSource.AssetGcsSourceB\x03\xE0A\x03:r\xEAAo\x0A\x1Dvisionai.googleapis.com/Asset\x12Nprojects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}\"J\x0A\x13AnalyzeAssetRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\"\xE1\x03\x0A\x14AnalyzeAssetMetadata\x12V\x0A\x0Fanalysis_status\x18\x01 \x03(\x0B2=.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus\x12.\x0A\x0Astart_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\x1A\x8F\x02\x0A\x0EAnalysisStatus\x12R\x0A\x05state\x18\x02 \x01(\x0E2C.google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State\x12\x16\x0A\x0Estatus_message\x18\x03 \x01(\x09\x12E\x0A\x11search_capability\x18\x04 \x01(\x0B2*.google.cloud.visionai.v1.SearchCapability\"J\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0F\x0A\x0BIN_PROGRESS\x10\x01\x12\x0D\x0A\x09SUCCEEDED\x10\x02\x12\x0A\x0A\x06FAILED\x10\x03\"\x16\x0A\x14AnalyzeAssetResponse\"\xB8\x01\x0A\x0EIndexingStatus\x12B\x0A\x05state\x18\x02 \x01(\x0E2..google.cloud.visionai.v1.IndexingStatus.StateB\x03\xE0A\x03\x12\x16\x0A\x0Estatus_message\x18\x03 \x01(\x09\"J\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0F\x0A\x0BIN_PROGRESS\x10\x01\x12\x0D\x0A\x09SUCCEEDED\x10\x02\x12\x0A\x0A\x06FAILED\x10\x03\"~\x0A\x11IndexAssetRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\x124\x0A\x05index\x18\x02 \x01(\x09B%\xE0A\x01\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Index\"\xAF\x01\x0A\x12IndexAssetMetadata\x128\x0A\x06status\x18\x04 \x01(\x0B2(.google.cloud.visionai.v1.IndexingStatus\x12.\x0A\x0Astart_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x14\x0A\x12IndexAssetResponse\"\x84\x01\x0A\x17RemoveIndexAssetRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\x124\x0A\x05index\x18\x02 \x01(\x09B%\xE0A\x01\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Index\"\xBE\x01\x0A\x18RemoveIndexAssetMetadata\x12A\x0A\x0Findexing_status\x18\x01 \x01(\x0B2(.google.cloud.visionai.v1.IndexingStatus\x12.\x0A\x0Astart_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x1A\x0A\x18RemoveIndexAssetResponse\"\xE6\x01\x0A\x0CIndexedAsset\x124\x0A\x05index\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Index\x124\x0A\x05asset\x18\x02 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\x124\x0A\x0Bcreate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x04 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"\x87\x01\x0A\x18ViewIndexedAssetsRequest\x124\x0A\x05index\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Index\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\"t\x0A\x19ViewIndexedAssetsResponse\x12>\x0A\x0Eindexed_assets\x18\x01 \x03(\x0B2&.google.cloud.visionai.v1.IndexedAsset\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"a\x0A\x13CreateCorpusRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x125\x0A\x06corpus\x18\x02 \x01(\x0B2 .google.cloud.visionai.v1.CorpusB\x03\xE0A\x02\"x\x0A\x14CreateCorpusMetadata\x12/\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12/\x0A\x0Bupdate_time\x18\x03 \x01(\x0B2\x1A.google.protobuf.Timestamp\"\x85\x01\x0A\x10SearchCapability\x12=\x0A\x04type\x18\x01 \x01(\x0E2/.google.cloud.visionai.v1.SearchCapability.Type\"2\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x14\x0A\x10EMBEDDING_SEARCH\x10\x01\"b\x0A\x17SearchCapabilitySetting\x12G\x0A\x13search_capabilities\x18\x01 \x03(\x0B2*.google.cloud.visionai.v1.SearchCapability\"c\x0A\x18CreateCollectionMetadata\x12G\x0A\x12operation_metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\"\xC3\x01\x0A\x17CreateCollectionRequest\x126\x0A\x06parent\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Corpus\x12=\x0A\x0Acollection\x18\x02 \x01(\x0B2\$.google.cloud.visionai.v1.CollectionB\x03\xE0A\x02\x12\x1F\x0A\x0Dcollection_id\x18\x03 \x01(\x09B\x03\xE0A\x01H\x00\x88\x01\x01B\x10\x0A\x0E_collection_id\"c\x0A\x18DeleteCollectionMetadata\x12G\x0A\x12operation_metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\"S\x0A\x17DeleteCollectionRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"visionai.googleapis.com/Collection\"P\x0A\x14GetCollectionRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"visionai.googleapis.com/Collection\"\x89\x01\x0A\x17UpdateCollectionRequest\x12=\x0A\x0Acollection\x18\x01 \x01(\x0B2\$.google.cloud.visionai.v1.CollectionB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"{\x0A\x16ListCollectionsRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"visionai.googleapis.com/Collection\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"m\x0A\x17ListCollectionsResponse\x129\x0A\x0Bcollections\x18\x01 \x03(\x0B2\$.google.cloud.visionai.v1.Collection\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"W\x0A\x18AddCollectionItemRequest\x12;\x0A\x04item\x18\x01 \x01(\x0B2(.google.cloud.visionai.v1.CollectionItemB\x03\xE0A\x02\"S\x0A\x19AddCollectionItemResponse\x126\x0A\x04item\x18\x01 \x01(\x0B2(.google.cloud.visionai.v1.CollectionItem\"Z\x0A\x1BRemoveCollectionItemRequest\x12;\x0A\x04item\x18\x01 \x01(\x0B2(.google.cloud.visionai.v1.CollectionItemB\x03\xE0A\x02\"V\x0A\x1CRemoveCollectionItemResponse\x126\x0A\x04item\x18\x01 \x01(\x0B2(.google.cloud.visionai.v1.CollectionItem\"\x83\x01\x0A\x1AViewCollectionItemsRequest\x12>\x0A\x0Acollection\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"visionai.googleapis.com/Collection\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"o\x0A\x1BViewCollectionItemsResponse\x127\x0A\x05items\x18\x01 \x03(\x0B2(.google.cloud.visionai.v1.CollectionItem\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xD8\x01\x0A\x0ACollection\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bdescription\x18\x03 \x01(\x09B\x03\xE0A\x01:\x81\x01\xEAA~\x0A\"visionai.googleapis.com/Collection\x12Xprojects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}\"\xD7\x01\x0A\x0ECollectionItem\x12>\x0A\x0Acollection\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"visionai.googleapis.com/Collection\x12@\x0A\x04type\x18\x02 \x01(\x0E2-.google.cloud.visionai.v1.CollectionItem.TypeB\x03\xE0A\x02\x12\x1A\x0A\x0Ditem_resource\x18\x03 \x01(\x09B\x03\xE0A\x02\"'\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05ASSET\x10\x01\"\x98\x01\x0A\x12CreateIndexRequest\x126\x0A\x06parent\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Corpus\x12\x15\x0A\x08index_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x123\x0A\x05index\x18\x03 \x01(\x0B2\x1F.google.cloud.visionai.v1.IndexB\x03\xE0A\x02\"^\x0A\x13CreateIndexMetadata\x12G\x0A\x12operation_metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\"\x7F\x0A\x12UpdateIndexRequest\x123\x0A\x05index\x18\x01 \x01(\x0B2\x1F.google.cloud.visionai.v1.IndexB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\"^\x0A\x13UpdateIndexMetadata\x12G\x0A\x12operation_metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\"F\x0A\x0FGetIndexRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Index\"r\x0A\x12ListIndexesRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x12\x1Dvisionai.googleapis.com/Index\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"`\x0A\x13ListIndexesResponse\x120\x0A\x07indexes\x18\x01 \x03(\x0B2\x1F.google.cloud.visionai.v1.Index\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"I\x0A\x12DeleteIndexRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Index\"\x15\x0A\x13DeleteIndexMetadata\"\x94\x05\x0A\x05Index\x12\x17\x0A\x0Dentire_corpus\x18\x09 \x01(\x08H\x00\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bdescription\x18\x03 \x01(\x09B\x03\xE0A\x01\x129\x0A\x05state\x18\x04 \x01(\x0E2%.google.cloud.visionai.v1.Index.StateB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12O\x0A\x10deployed_indexes\x18\x08 \x03(\x0B20.google.cloud.visionai.v1.DeployedIndexReferenceB\x03\xE0A\x03\x12\x1F\x0A\x0Dsatisfies_pzs\x18\x0B \x01(\x08B\x03\xE0A\x03H\x01\x88\x01\x01\x12\x1F\x0A\x0Dsatisfies_pzi\x18\x0C \x01(\x08B\x03\xE0A\x03H\x02\x88\x01\x01\"G\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0B\x0A\x07CREATED\x10\x02\x12\x0C\x0A\x08UPDATING\x10\x03:s\xEAAp\x0A\x1Dvisionai.googleapis.com/Index\x12Oprojects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}B\x0E\x0A\x0Casset_filterB\x10\x0A\x0E_satisfies_pzsB\x10\x0A\x0E_satisfies_pzi\"_\x0A\x16DeployedIndexReference\x12E\x0A\x0Eindex_endpoint\x18\x01 \x01(\x09B-\xE0A\x05\xFAA'\x0A%visionai.googleapis.com/IndexEndpoint\"\xAC\x04\x0A\x06Corpus\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x02\x12\x18\x0A\x0Bdescription\x18\x03 \x01(\x09B\x03\xE0A\x01\x123\x0A\x0Bdefault_ttl\x18\x05 \x01(\x0B2\x19.google.protobuf.DurationB\x03\xE0A\x01\x128\x0A\x04type\x18\x07 \x01(\x0E2%.google.cloud.visionai.v1.Corpus.TypeB\x03\xE0A\x01\x12T\x0A\x19search_capability_setting\x18\x08 \x01(\x0B21.google.cloud.visionai.v1.SearchCapabilitySetting\x12\x1F\x0A\x0Dsatisfies_pzs\x18\x0B \x01(\x08B\x03\xE0A\x03H\x00\x88\x01\x01\x12\x1F\x0A\x0Dsatisfies_pzi\x18\x0C \x01(\x08B\x03\xE0A\x03H\x01\x88\x01\x01\"N\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CSTREAM_VIDEO\x10\x01\x12\x09\x0A\x05IMAGE\x10\x02\x12\x13\x0A\x0FVIDEO_ON_DEMAND\x10\x03:d\xEAAa\x0A\x1Evisionai.googleapis.com/Corpus\x12?projects/{project_number}/locations/{location}/corpora/{corpus}B\x10\x0A\x0E_satisfies_pzsB\x10\x0A\x0E_satisfies_pzi\"H\x0A\x10GetCorpusRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Corpus\"}\x0A\x13UpdateCorpusRequest\x125\x0A\x06corpus\x18\x01 \x01(\x0B2 .google.cloud.visionai.v1.CorpusB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"`\x0A\x12ListCorporaRequest\x12\x13\x0A\x06parent\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x05 \x01(\x09\"a\x0A\x13ListCorporaResponse\x121\x0A\x07corpora\x18\x01 \x03(\x0B2 .google.cloud.visionai.v1.Corpus\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"K\x0A\x13DeleteCorpusRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Corpus\"L\x0A\x14AnalyzeCorpusRequest\x124\x0A\x04name\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Corpus\"V\x0A\x15AnalyzeCorpusMetadata\x12=\x0A\x08metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\"\x17\x0A\x15AnalyzeCorpusResponse\"\x91\x01\x0A\x17CreateDataSchemaRequest\x126\x0A\x06parent\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Corpus\x12>\x0A\x0Bdata_schema\x18\x02 \x01(\x0B2\$.google.cloud.visionai.v1.DataSchemaB\x03\xE0A\x02\"\xF6\x01\x0A\x0ADataSchema\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x10\x0A\x03key\x18\x02 \x01(\x09B\x03\xE0A\x02\x12C\x0A\x0Eschema_details\x18\x03 \x01(\x0B2+.google.cloud.visionai.v1.DataSchemaDetails:\x82\x01\xEAA\x7F\x0A\"visionai.googleapis.com/DataSchema\x12Yprojects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}\"\xD4\x0C\x0A\x11DataSchemaDetails\x12G\x0A\x04type\x18\x01 \x01(\x0E24.google.cloud.visionai.v1.DataSchemaDetails.DataTypeH\x00\x88\x01\x01\x12T\x0A\x10proto_any_config\x18\x06 \x01(\x0B2:.google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig\x12K\x0A\x0Blist_config\x18\x08 \x01(\x0B26.google.cloud.visionai.v1.DataSchemaDetails.ListConfig\x12d\x0A\x18customized_struct_config\x18\x09 \x01(\x0B2B.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig\x12Q\x0A\x0Bgranularity\x18\x05 \x01(\x0E27.google.cloud.visionai.v1.DataSchemaDetails.GranularityH\x01\x88\x01\x01\x12S\x0A\x0Fsearch_strategy\x18\x07 \x01(\x0B2:.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy\x1A\"\x0A\x0EProtoAnyConfig\x12\x10\x0A\x08type_uri\x18\x01 \x01(\x09\x1AO\x0A\x0AListConfig\x12A\x0A\x0Cvalue_schema\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.DataSchemaDetails\x1A\xE7\x01\x0A\x16CustomizedStructConfig\x12k\x0A\x0Dfield_schemas\x18\x01 \x03(\x0B2T.google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig.FieldSchemasEntry\x1A`\x0A\x11FieldSchemasEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12:\x0A\x05value\x18\x02 \x01(\x0B2+.google.cloud.visionai.v1.DataSchemaDetails:\x028\x01\x1A\xB7\x03\x0A\x0ESearchStrategy\x12p\x0A\x14search_strategy_type\x18\x01 \x01(\x0E2M.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyTypeH\x00\x88\x01\x01\x12\x81\x01\x0A\x1Dconfidence_score_index_config\x18\x02 \x01(\x0B2U.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfigB\x03\xE0A\x01\x1AM\x0A\x1AConfidenceScoreIndexConfig\x12\x17\x0A\x0Afield_path\x18\x01 \x01(\x09B\x03\xE0A\x02\x12\x16\x0A\x09threshold\x18\x02 \x01(\x02B\x03\xE0A\x02\"G\x0A\x12SearchStrategyType\x12\x0D\x0A\x09NO_SEARCH\x10\x00\x12\x10\x0A\x0CEXACT_SEARCH\x10\x01\x12\x10\x0A\x0CSMART_SEARCH\x10\x02B\x17\x0A\x15_search_strategy_type\"\xA8\x01\x0A\x08DataType\x12\x19\x0A\x15DATA_TYPE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07INTEGER\x10\x01\x12\x09\x0A\x05FLOAT\x10\x02\x12\x0A\x0A\x06STRING\x10\x03\x12\x0C\x0A\x08DATETIME\x10\x05\x12\x12\x0A\x0EGEO_COORDINATE\x10\x07\x12\x0D\x0A\x09PROTO_ANY\x10\x08\x12\x0B\x0A\x07BOOLEAN\x10\x09\x12\x08\x0A\x04LIST\x10\x0A\x12\x15\x0A\x11CUSTOMIZED_STRUCT\x10\x06\"h\x0A\x0BGranularity\x12\x1B\x0A\x17GRANULARITY_UNSPECIFIED\x10\x00\x12\x1B\x0A\x17GRANULARITY_ASSET_LEVEL\x10\x01\x12\x1F\x0A\x1BGRANULARITY_PARTITION_LEVEL\x10\x02B\x07\x0A\x05_typeB\x0E\x0A\x0C_granularity\"\x8A\x01\x0A\x17UpdateDataSchemaRequest\x12>\x0A\x0Bdata_schema\x18\x01 \x01(\x0B2\$.google.cloud.visionai.v1.DataSchemaB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"P\x0A\x14GetDataSchemaRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"visionai.googleapis.com/DataSchema\"S\x0A\x17DeleteDataSchemaRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"visionai.googleapis.com/DataSchema\"{\x0A\x16ListDataSchemasRequest\x12:\x0A\x06parent\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x12\"visionai.googleapis.com/DataSchema\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"n\x0A\x17ListDataSchemasResponse\x12:\x0A\x0Cdata_schemas\x18\x01 \x03(\x0B2\$.google.cloud.visionai.v1.DataSchema\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xC2\x01\x0A\x17CreateAnnotationRequest\x125\x0A\x06parent\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\x12=\x0A\x0Aannotation\x18\x02 \x01(\x0B2\$.google.cloud.visionai.v1.AnnotationB\x03\xE0A\x02\x12\x1F\x0A\x0Dannotation_id\x18\x03 \x01(\x09B\x03\xE0A\x01H\x00\x88\x01\x01B\x10\x0A\x0E_annotation_id\"\x84\x02\x0A\x0AAnnotation\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12T\x0A\x19user_specified_annotation\x18\x02 \x01(\x0B21.google.cloud.visionai.v1.UserSpecifiedAnnotation:\x91\x01\xEAA\x8D\x01\x0A\"visionai.googleapis.com/Annotation\x12gprojects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}\"\x9D\x01\x0A\x17UserSpecifiedAnnotation\x12\x10\x0A\x03key\x18\x01 \x01(\x09B\x03\xE0A\x02\x128\x0A\x05value\x18\x02 \x01(\x0B2).google.cloud.visionai.v1.AnnotationValue\x126\x0A\x09partition\x18\x03 \x01(\x0B2#.google.cloud.visionai.v1.Partition\"4\x0A\x0DGeoCoordinate\x12\x10\x0A\x08latitude\x18\x01 \x01(\x01\x12\x11\x0A\x09longitude\x18\x02 \x01(\x01\"\xD9\x03\x0A\x0FAnnotationValue\x12\x13\x0A\x09int_value\x18\x01 \x01(\x03H\x00\x12\x15\x0A\x0Bfloat_value\x18\x02 \x01(\x02H\x00\x12\x13\x0A\x09str_value\x18\x03 \x01(\x09H\x00\x12\x18\x0A\x0Edatetime_value\x18\x05 \x01(\x09H\x00\x12A\x0A\x0Egeo_coordinate\x18\x07 \x01(\x0B2'.google.cloud.visionai.v1.GeoCoordinateH\x00\x12/\x0A\x0Fproto_any_value\x18\x08 \x01(\x0B2\x14.google.protobuf.AnyH\x00\x12\x14\x0A\x0Abool_value\x18\x09 \x01(\x08H\x00\x12?\x0A\x1Ccustomized_struct_data_value\x18\x0A \x01(\x0B2\x17.google.protobuf.StructH\x00\x12>\x0A\x0Alist_value\x18\x0B \x01(\x0B2(.google.cloud.visionai.v1.AnnotationListH\x00\x12W\x0A\x17customized_struct_value\x18\x06 \x01(\x0B24.google.cloud.visionai.v1.AnnotationCustomizedStructH\x00B\x07\x0A\x05value\"K\x0A\x0EAnnotationList\x129\x0A\x06values\x18\x01 \x03(\x0B2).google.cloud.visionai.v1.AnnotationValue\"\xCE\x01\x0A\x1AAnnotationCustomizedStruct\x12T\x0A\x08elements\x18\x02 \x03(\x0B2B.google.cloud.visionai.v1.AnnotationCustomizedStruct.ElementsEntry\x1AZ\x0A\x0DElementsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x128\x0A\x05value\x18\x02 \x01(\x0B2).google.cloud.visionai.v1.AnnotationValue:\x028\x01\"\x83\x01\x0A\x16ListAnnotationsRequest\x122\x0A\x06parent\x18\x01 \x01(\x09B\"\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x0E\x0A\x06filter\x18\x04 \x01(\x09\"m\x0A\x17ListAnnotationsResponse\x129\x0A\x0Bannotations\x18\x01 \x03(\x0B2\$.google.cloud.visionai.v1.Annotation\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"P\x0A\x14GetAnnotationRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"visionai.googleapis.com/Annotation\"\x89\x01\x0A\x17UpdateAnnotationRequest\x12=\x0A\x0Aannotation\x18\x01 \x01(\x0B2\$.google.cloud.visionai.v1.AnnotationB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"S\x0A\x17DeleteAnnotationRequest\x128\x0A\x04name\x18\x01 \x01(\x09B*\xE0A\x02\xFAA\$\x0A\"visionai.googleapis.com/Annotation\"q\x0A\x13ImportAssetsRequest\x12\x18\x0A\x0Eassets_gcs_uri\x18\x02 \x01(\x09H\x00\x126\x0A\x06parent\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/CorpusB\x08\x0A\x06source\"\x95\x01\x0A\x14ImportAssetsMetadata\x12=\x0A\x08metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\x12>\x0A\x06status\x18\x02 \x01(\x0B2..google.cloud.visionai.v1.BatchOperationStatus\"D\x0A\x14BatchOperationStatus\x12\x15\x0A\x0Dsuccess_count\x18\x01 \x01(\x05\x12\x15\x0A\x0Dfailure_count\x18\x02 \x01(\x05\"\x16\x0A\x14ImportAssetsResponse\"\xBC\x01\x0A\x19CreateSearchConfigRequest\x12<\x0A\x06parent\x18\x01 \x01(\x09B,\xE0A\x02\xFAA&\x12\$visionai.googleapis.com/SearchConfig\x12B\x0A\x0Dsearch_config\x18\x02 \x01(\x0B2&.google.cloud.visionai.v1.SearchConfigB\x03\xE0A\x02\x12\x1D\x0A\x10search_config_id\x18\x03 \x01(\x09B\x03\xE0A\x02\"\x90\x01\x0A\x19UpdateSearchConfigRequest\x12B\x0A\x0Dsearch_config\x18\x01 \x01(\x0B2&.google.cloud.visionai.v1.SearchConfigB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"T\x0A\x16GetSearchConfigRequest\x12:\x0A\x04name\x18\x01 \x01(\x09B,\xE0A\x02\xFAA&\x0A\$visionai.googleapis.com/SearchConfig\"W\x0A\x19DeleteSearchConfigRequest\x12:\x0A\x04name\x18\x01 \x01(\x09B,\xE0A\x02\xFAA&\x0A\$visionai.googleapis.com/SearchConfig\"\x7F\x0A\x18ListSearchConfigsRequest\x12<\x0A\x06parent\x18\x01 \x01(\x09B,\xE0A\x02\xFAA&\x12\$visionai.googleapis.com/SearchConfig\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"t\x0A\x19ListSearchConfigsResponse\x12>\x0A\x0Esearch_configs\x18\x01 \x03(\x0B2&.google.cloud.visionai.v1.SearchConfig\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xBD\x02\x0A\x0CSearchConfig\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12?\x0A\x0Efacet_property\x18\x02 \x01(\x0B2'.google.cloud.visionai.v1.FacetProperty\x12R\x0A\x18search_criteria_property\x18\x03 \x01(\x0B20.google.cloud.visionai.v1.SearchCriteriaProperty:\x89\x01\xEAA\x85\x01\x0A\$visionai.googleapis.com/SearchConfig\x12]projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}\"\xF5\x05\x0A\x0DIndexEndpoint\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x18\x0A\x0Bdescription\x18\x03 \x01(\x09B\x03\xE0A\x01\x12D\x0A\x0Edeployed_index\x18\x09 \x01(\x0B2'.google.cloud.visionai.v1.DeployedIndexB\x03\xE0A\x03\x12A\x0A\x05state\x18\x05 \x01(\x0E2-.google.cloud.visionai.v1.IndexEndpoint.StateB\x03\xE0A\x03\x12H\x0A\x06labels\x18\x06 \x03(\x0B23.google.cloud.visionai.v1.IndexEndpoint.LabelsEntryB\x03\xE0A\x01\x124\x0A\x0Bcreate_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x1F\x0A\x0Dsatisfies_pzs\x18\x0A \x01(\x08B\x03\xE0A\x03H\x00\x88\x01\x01\x12\x1F\x0A\x0Dsatisfies_pzi\x18\x0B \x01(\x08B\x03\xE0A\x03H\x01\x88\x01\x01\x1A-\x0A\x0BLabelsEntry\x12\x0B\x0A\x03key\x18\x01 \x01(\x09\x12\x0D\x0A\x05value\x18\x02 \x01(\x09:\x028\x01\"S\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0C\x0A\x08CREATING\x10\x01\x12\x0B\x0A\x07CREATED\x10\x02\x12\x0C\x0A\x08UPDATING\x10\x03\x12\x0A\x0A\x06FAILED\x10\x04:s\xEAAp\x0A%visionai.googleapis.com/IndexEndpoint\x12Gprojects/{project}/locations/{location}/indexEndpoints/{index_endpoint}B\x10\x0A\x0E_satisfies_pzsB\x10\x0A\x0E_satisfies_pzi\"\xBD\x01\x0A\x1ACreateIndexEndpointRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x1E\x0A\x11index_endpoint_id\x18\x02 \x01(\x09B\x03\xE0A\x01\x12D\x0A\x0Eindex_endpoint\x18\x03 \x01(\x0B2'.google.cloud.visionai.v1.IndexEndpointB\x03\xE0A\x02\"f\x0A\x1BCreateIndexEndpointMetadata\x12G\x0A\x12operation_metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\"V\x0A\x17GetIndexEndpointRequest\x12;\x0A\x04name\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x0A%visionai.googleapis.com/IndexEndpoint\"\x9C\x01\x0A\x19ListIndexEndpointsRequest\x129\x0A\x06parent\x18\x01 \x01(\x09B)\xE0A\x02\xFAA#\x0A!locations.googleapis.com/Location\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x04 \x01(\x09B\x03\xE0A\x01\"w\x0A\x1AListIndexEndpointsResponse\x12@\x0A\x0Findex_endpoints\x18\x01 \x03(\x0B2'.google.cloud.visionai.v1.IndexEndpoint\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x98\x01\x0A\x1AUpdateIndexEndpointRequest\x12D\x0A\x0Eindex_endpoint\x18\x01 \x01(\x0B2'.google.cloud.visionai.v1.IndexEndpointB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\"f\x0A\x1BUpdateIndexEndpointMetadata\x12G\x0A\x12operation_metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\"Y\x0A\x1ADeleteIndexEndpointRequest\x12;\x0A\x04name\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x0A%visionai.googleapis.com/IndexEndpoint\"f\x0A\x1BDeleteIndexEndpointMetadata\x12G\x0A\x12operation_metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\"\xA1\x01\x0A\x12DeployIndexRequest\x12E\x0A\x0Eindex_endpoint\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x0A%visionai.googleapis.com/IndexEndpoint\x12D\x0A\x0Edeployed_index\x18\x03 \x01(\x0B2'.google.cloud.visionai.v1.DeployedIndexB\x03\xE0A\x02\"\x15\x0A\x13DeployIndexResponse\"\x9D\x01\x0A\x13DeployIndexMetadata\x12G\x0A\x12operation_metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\x12=\x0A\x0Edeployed_index\x18\x02 \x01(\x09B%\xE0A\x03\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Index\"\x9F\x01\x0A\x15UndeployIndexMetadata\x12G\x0A\x12operation_metadata\x18\x01 \x01(\x0B2+.google.cloud.visionai.v1.OperationMetadata\x12=\x0A\x0Edeployed_index\x18\x02 \x01(\x09B%\xE0A\x03\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Index\"]\x0A\x14UndeployIndexRequest\x12E\x0A\x0Eindex_endpoint\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x0A%visionai.googleapis.com/IndexEndpoint\"\x17\x0A\x15UndeployIndexResponse\"E\x0A\x0DDeployedIndex\x124\x0A\x05index\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Index\"\x84\x07\x0A\x0DFacetProperty\x12_\x0A\x17fixed_range_bucket_spec\x18\x05 \x01(\x0B2<.google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpecH\x00\x12a\x0A\x18custom_range_bucket_spec\x18\x06 \x01(\x0B2=.google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpecH\x00\x12Z\x0A\x14datetime_bucket_spec\x18\x07 \x01(\x0B2:.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpecH\x00\x12\x15\x0A\x0Dmapped_fields\x18\x01 \x03(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12\x13\x0A\x0Bresult_size\x18\x03 \x01(\x03\x12>\x0A\x0Bbucket_type\x18\x04 \x01(\x0E2).google.cloud.visionai.v1.FacetBucketType\x1A\xAA\x01\x0A\x14FixedRangeBucketSpec\x12:\x0A\x0Cbucket_start\x18\x01 \x01(\x0B2\$.google.cloud.visionai.v1.FacetValue\x12@\x0A\x12bucket_granularity\x18\x02 \x01(\x0B2\$.google.cloud.visionai.v1.FacetValue\x12\x14\x0A\x0Cbucket_count\x18\x03 \x01(\x05\x1AP\x0A\x15CustomRangeBucketSpec\x127\x0A\x09endpoints\x18\x01 \x03(\x0B2\$.google.cloud.visionai.v1.FacetValue\x1A\xBB\x01\x0A\x12DateTimeBucketSpec\x12[\x0A\x0Bgranularity\x18\x01 \x01(\x0E2F.google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity\"H\x0A\x0BGranularity\x12\x1B\x0A\x17GRANULARITY_UNSPECIFIED\x10\x00\x12\x08\x0A\x04YEAR\x10\x01\x12\x09\x0A\x05MONTH\x10\x02\x12\x07\x0A\x03DAY\x10\x03B\x14\x0A\x12range_facet_config\"\xDE\x01\x0A\x0ESearchHypernym\x12\x0C\x0A\x04name\x18\x01 \x01(\x09\x12\x15\x0A\x08hypernym\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x15\x0A\x08hyponyms\x18\x03 \x03(\x09B\x03\xE0A\x01:\x8F\x01\xEAA\x8B\x01\x0A&visionai.googleapis.com/SearchHypernym\x12aprojects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}\"\xDA\x01\x0A\x1BCreateSearchHypernymRequest\x126\x0A\x06parent\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Corpus\x12F\x0A\x0Fsearch_hypernym\x18\x02 \x01(\x0B2(.google.cloud.visionai.v1.SearchHypernymB\x03\xE0A\x02\x12\$\x0A\x12search_hypernym_id\x18\x03 \x01(\x09B\x03\xE0A\x01H\x00\x88\x01\x01B\x15\x0A\x13_search_hypernym_id\"\x96\x01\x0A\x1BUpdateSearchHypernymRequest\x12F\x0A\x0Fsearch_hypernym\x18\x01 \x01(\x0B2(.google.cloud.visionai.v1.SearchHypernymB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"X\x0A\x18GetSearchHypernymRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&visionai.googleapis.com/SearchHypernym\"[\x0A\x1BDeleteSearchHypernymRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&visionai.googleapis.com/SearchHypernym\"\x83\x01\x0A\x1AListSearchHypernymsRequest\x12>\x0A\x06parent\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x12&visionai.googleapis.com/SearchHypernym\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"z\x0A\x1BListSearchHypernymsResponse\x12B\x0A\x10search_hypernyms\x18\x01 \x03(\x0B2(.google.cloud.visionai.v1.SearchHypernym\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"/\x0A\x16SearchCriteriaProperty\x12\x15\x0A\x0Dmapped_fields\x18\x01 \x03(\x09\"w\x0A\x0AFacetValue\x12\x16\x0A\x0Cstring_value\x18\x01 \x01(\x09H\x00\x12\x17\x0A\x0Dinteger_value\x18\x02 \x01(\x03H\x00\x12/\x0A\x0Edatetime_value\x18\x03 \x01(\x0B2\x15.google.type.DateTimeH\x00B\x07\x0A\x05value\"\x95\x02\x0A\x0BFacetBucket\x125\x0A\x05value\x18\x02 \x01(\x0B2\$.google.cloud.visionai.v1.FacetValueH\x00\x12<\x0A\x05range\x18\x04 \x01(\x0B2+.google.cloud.visionai.v1.FacetBucket.RangeH\x00\x12\x10\x0A\x08selected\x18\x03 \x01(\x08\x1Ao\x0A\x05Range\x123\x0A\x05start\x18\x01 \x01(\x0B2\$.google.cloud.visionai.v1.FacetValue\x121\x0A\x03end\x18\x02 \x01(\x0B2\$.google.cloud.visionai.v1.FacetValueB\x0E\x0A\x0Cbucket_value\"\xCF\x01\x0A\x0AFacetGroup\x12\x10\x0A\x08facet_id\x18\x01 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x126\x0A\x07buckets\x18\x03 \x03(\x0B2%.google.cloud.visionai.v1.FacetBucket\x12>\x0A\x0Bbucket_type\x18\x04 \x01(\x0E2).google.cloud.visionai.v1.FacetBucketType\x12!\x0A\x19fetch_matched_annotations\x18\x05 \x01(\x08\"\xA8\x05\x0A\x12IngestAssetRequest\x12E\x0A\x06config\x18\x01 \x01(\x0B23.google.cloud.visionai.v1.IngestAssetRequest.ConfigH\x00\x12Y\x0A\x11time_indexed_data\x18\x02 \x01(\x0B2<.google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedDataH\x00\x1A\xE6\x02\x0A\x06Config\x12S\x0A\x0Avideo_type\x18\x02 \x01(\x0B2=.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoTypeH\x00\x124\x0A\x05asset\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\x1A\xC3\x01\x0A\x09VideoType\x12g\x0A\x10container_format\x18\x01 \x01(\x0E2M.google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat\"M\x0A\x0FContainerFormat\x12 \x0A\x1CCONTAINER_FORMAT_UNSPECIFIED\x10\x00\x12\x18\x0A\x14CONTAINER_FORMAT_MP4\x10\x01B\x0B\x0A\x09data_type\x1Ar\x0A\x0FTimeIndexedData\x12\x0C\x0A\x04data\x18\x01 \x01(\x0C\x12Q\x0A\x12temporal_partition\x18\x02 \x01(\x0B25.google.cloud.visionai.v1.Partition.TemporalPartitionB\x13\x0A\x11streaming_request\"u\x0A\x13IngestAssetResponse\x12^\x0A\x1Fsuccessfully_ingested_partition\x18\x01 \x01(\x0B25.google.cloud.visionai.v1.Partition.TemporalPartition\"\x9F\x01\x0A\x10ClipAssetRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\x12V\x0A\x12temporal_partition\x18\x02 \x01(\x0B25.google.cloud.visionai.v1.Partition.TemporalPartitionB\x03\xE0A\x02\"\xDC\x01\x0A\x11ClipAssetResponse\x12U\x0A\x11time_indexed_uris\x18\x01 \x03(\x0B2:.google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri\x1Ap\x0A\x0ETimeIndexedUri\x12Q\x0A\x12temporal_partition\x18\x01 \x01(\x0B25.google.cloud.visionai.v1.Partition.TemporalPartition\x12\x0B\x0A\x03uri\x18\x02 \x01(\x09\"\xBB\x01\x0A\x15GenerateHlsUriRequest\x123\x0A\x04name\x18\x01 \x01(\x09B%\xE0A\x02\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/Asset\x12R\x0A\x13temporal_partitions\x18\x02 \x03(\x0B25.google.cloud.visionai.v1.Partition.TemporalPartition\x12\x19\x0A\x11live_view_enabled\x18\x03 \x01(\x08\"y\x0A\x16GenerateHlsUriResponse\x12\x0B\x0A\x03uri\x18\x01 \x01(\x09\x12R\x0A\x13temporal_partitions\x18\x02 \x03(\x0B25.google.cloud.visionai.v1.Partition.TemporalPartition\"\xD3\x03\x0A\x13SearchAssetsRequest\x12Y\x0A\x1Bschema_key_sorting_strategy\x18\x09 \x01(\x0B22.google.cloud.visionai.v1.SchemaKeySortingStrategyH\x00\x126\x0A\x06corpus\x18\x01 \x01(\x09B&\xE0A\x02\xFAA \x0A\x1Evisionai.googleapis.com/Corpus\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12I\x0A\x13content_time_ranges\x18\x05 \x01(\x0B2,.google.cloud.visionai.v1.DateTimeRangeArray\x124\x0A\x08criteria\x18\x04 \x03(\x0B2\".google.cloud.visionai.v1.Criteria\x12>\x0A\x10facet_selections\x18\x06 \x03(\x0B2\$.google.cloud.visionai.v1.FacetGroup\x12\x1E\x0A\x16result_annotation_keys\x18\x08 \x03(\x09\x12\x14\x0A\x0Csearch_query\x18\x0A \x01(\x09B\x0B\x0A\x09sort_spec\"\xDC\x02\x0A\x1ASearchIndexEndpointRequest\x12;\x0A\x0Bimage_query\x18\x02 \x01(\x0B2\$.google.cloud.visionai.v1.ImageQueryH\x00\x12\x14\x0A\x0Atext_query\x18\x03 \x01(\x09H\x00\x12E\x0A\x0Eindex_endpoint\x18\x01 \x01(\x09B-\xE0A\x02\xFAA'\x0A%visionai.googleapis.com/IndexEndpoint\x124\x0A\x08criteria\x18\x04 \x03(\x0B2\".google.cloud.visionai.v1.Criteria\x12>\x0A\x12exclusion_criteria\x18\x07 \x03(\x0B2\".google.cloud.visionai.v1.Criteria\x12\x11\x0A\x09page_size\x18\x05 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x06 \x01(\x09B\x07\x0A\x05query\"a\x0A\x0AImageQuery\x12\x15\x0A\x0Binput_image\x18\x01 \x01(\x0CH\x00\x123\x0A\x05asset\x18\x02 \x01(\x09B\"\xFAA\x1F\x0A\x1Dvisionai.googleapis.com/AssetH\x00B\x07\x0A\x05image\"\x94\x03\x0A\x18SchemaKeySortingStrategy\x12J\x0A\x07options\x18\x01 \x03(\x0B29.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option\x1A\xAB\x02\x0A\x06Option\x12\x17\x0A\x0Fdata_schema_key\x18\x01 \x01(\x09\x12\x17\x0A\x0Fsort_decreasing\x18\x02 \x01(\x08\x12h\x0A\x10aggregate_method\x18\x03 \x01(\x0E2I.google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethodH\x00\x88\x01\x01\"p\x0A\x0FAggregateMethod\x12 \x0A\x1CAGGREGATE_METHOD_UNSPECIFIED\x10\x00\x12\x1C\x0A\x18AGGREGATE_METHOD_LARGEST\x10\x01\x12\x1D\x0A\x19AGGREGATE_METHOD_SMALLEST\x10\x02B\x13\x0A\x11_aggregate_method\"\x15\x0A\x13DeleteAssetMetadata\"\xB7\x01\x0A\x18AnnotationMatchingResult\x124\x0A\x08criteria\x18\x01 \x01(\x0B2\".google.cloud.visionai.v1.Criteria\x12A\x0A\x13matched_annotations\x18\x02 \x03(\x0B2\$.google.cloud.visionai.v1.Annotation\x12\"\x0A\x06status\x18\x03 \x01(\x0B2\x12.google.rpc.Status\"\xE7\x02\x0A\x10SearchResultItem\x12\x0D\x0A\x05asset\x18\x01 \x01(\x09\x12K\x0A\x08segments\x18\x02 \x03(\x0B25.google.cloud.visionai.v1.Partition.TemporalPartitionB\x02\x18\x01\x12F\x0A\x07segment\x18\x05 \x01(\x0B25.google.cloud.visionai.v1.Partition.TemporalPartition\x12\x11\x0A\x09relevance\x18\x06 \x01(\x01\x12C\x0A\x15requested_annotations\x18\x03 \x03(\x0B2\$.google.cloud.visionai.v1.Annotation\x12W\x0A\x1Bannotation_matching_results\x18\x04 \x03(\x0B22.google.cloud.visionai.v1.AnnotationMatchingResult\"\xB5\x01\x0A\x14SearchAssetsResponse\x12G\x0A\x13search_result_items\x18\x01 \x03(\x0B2*.google.cloud.visionai.v1.SearchResultItem\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12;\x0A\x0Dfacet_results\x18\x03 \x03(\x0B2\$.google.cloud.visionai.v1.FacetGroup\"\x7F\x0A\x1BSearchIndexEndpointResponse\x12G\x0A\x13search_result_items\x18\x01 \x03(\x0B2*.google.cloud.visionai.v1.SearchResultItem\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"B\x0A\x08IntRange\x12\x12\x0A\x05start\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x10\x0A\x03end\x18\x02 \x01(\x03H\x01\x88\x01\x01B\x08\x0A\x06_startB\x06\x0A\x04_end\"D\x0A\x0AFloatRange\x12\x12\x0A\x05start\x18\x01 \x01(\x02H\x00\x88\x01\x01\x12\x10\x0A\x03end\x18\x02 \x01(\x02H\x01\x88\x01\x01B\x08\x0A\x06_startB\x06\x0A\x04_end\"!\x0A\x0BStringArray\x12\x12\x0A\x0Atxt_values\x18\x01 \x03(\x09\"G\x0A\x0DIntRangeArray\x126\x0A\x0Aint_ranges\x18\x01 \x03(\x0B2\".google.cloud.visionai.v1.IntRange\"M\x0A\x0FFloatRangeArray\x12:\x0A\x0Cfloat_ranges\x18\x01 \x03(\x0B2\$.google.cloud.visionai.v1.FloatRange\"Y\x0A\x0DDateTimeRange\x12\$\x0A\x05start\x18\x01 \x01(\x0B2\x15.google.type.DateTime\x12\"\x0A\x03end\x18\x02 \x01(\x0B2\x15.google.type.DateTime\"W\x0A\x12DateTimeRangeArray\x12A\x0A\x10date_time_ranges\x18\x01 \x03(\x0B2'.google.cloud.visionai.v1.DateTimeRange\"G\x0A\x0ACircleArea\x12\x10\x0A\x08latitude\x18\x01 \x01(\x01\x12\x11\x0A\x09longitude\x18\x02 \x01(\x01\x12\x14\x0A\x0Cradius_meter\x18\x03 \x01(\x01\"N\x0A\x10GeoLocationArray\x12:\x0A\x0Ccircle_areas\x18\x01 \x03(\x0B2\$.google.cloud.visionai.v1.CircleArea\"\x1A\x0A\x09BoolValue\x12\x0D\x0A\x05value\x18\x01 \x01(\x08\"\xE2\x03\x0A\x08Criteria\x12;\x0A\x0Atext_array\x18\x02 \x01(\x0B2%.google.cloud.visionai.v1.StringArrayH\x00\x12B\x0A\x0Fint_range_array\x18\x03 \x01(\x0B2'.google.cloud.visionai.v1.IntRangeArrayH\x00\x12F\x0A\x11float_range_array\x18\x04 \x01(\x0B2).google.cloud.visionai.v1.FloatRangeArrayH\x00\x12M\x0A\x15date_time_range_array\x18\x05 \x01(\x0B2,.google.cloud.visionai.v1.DateTimeRangeArrayH\x00\x12H\x0A\x12geo_location_array\x18\x06 \x01(\x0B2*.google.cloud.visionai.v1.GeoLocationArrayH\x00\x129\x0A\x0Abool_value\x18\x07 \x01(\x0B2#.google.cloud.visionai.v1.BoolValueH\x00\x12\x0D\x0A\x05field\x18\x01 \x01(\x09\x12!\x0A\x19fetch_matched_annotations\x18\x08 \x01(\x08B\x07\x0A\x05value\"\x90\x05\x0A\x09Partition\x12Q\x0A\x12temporal_partition\x18\x01 \x01(\x0B25.google.cloud.visionai.v1.Partition.TemporalPartition\x12O\x0A\x11spatial_partition\x18\x02 \x01(\x0B24.google.cloud.visionai.v1.Partition.SpatialPartition\x12b\x0A\x1Brelative_temporal_partition\x18\x03 \x01(\x0B2=.google.cloud.visionai.v1.Partition.RelativeTemporalPartition\x1Aq\x0A\x11TemporalPartition\x12.\x0A\x0Astart_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.Timestamp\x12,\x0A\x08end_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.Timestamp\x1A\x8A\x01\x0A\x10SpatialPartition\x12\x12\x0A\x05x_min\x18\x01 \x01(\x03H\x00\x88\x01\x01\x12\x12\x0A\x05y_min\x18\x02 \x01(\x03H\x01\x88\x01\x01\x12\x12\x0A\x05x_max\x18\x03 \x01(\x03H\x02\x88\x01\x01\x12\x12\x0A\x05y_max\x18\x04 \x01(\x03H\x03\x88\x01\x01B\x08\x0A\x06_x_minB\x08\x0A\x06_y_minB\x08\x0A\x06_x_maxB\x08\x0A\x06_y_max\x1A{\x0A\x19RelativeTemporalPartition\x12/\x0A\x0Cstart_offset\x18\x01 \x01(\x0B2\x19.google.protobuf.Duration\x12-\x0A\x0Aend_offset\x18\x02 \x01(\x0B2\x19.google.protobuf.Duration*\xB8\x01\x0A\x0FFacetBucketType\x12!\x0A\x1DFACET_BUCKET_TYPE_UNSPECIFIED\x10\x00\x12\x1B\x0A\x17FACET_BUCKET_TYPE_VALUE\x10\x01\x12\x1E\x0A\x1AFACET_BUCKET_TYPE_DATETIME\x10\x02\x12!\x0A\x1DFACET_BUCKET_TYPE_FIXED_RANGE\x10\x03\x12\"\x0A\x1EFACET_BUCKET_TYPE_CUSTOM_RANGE\x10\x042\x9Bf\x0A\x09Warehouse\x12\xB9\x01\x0A\x0BCreateAsset\x12,.google.cloud.visionai.v1.CreateAssetRequest\x1A\x1F.google.cloud.visionai.v1.Asset\"[\xDAA\x15parent,asset,asset_id\x82\xD3\xE4\x93\x02=\"4/v1/{parent=projects/*/locations/*/corpora/*}/assets:\x05asset\x12\xBB\x01\x0A\x0BUpdateAsset\x12,.google.cloud.visionai.v1.UpdateAssetRequest\x1A\x1F.google.cloud.visionai.v1.Asset\"]\xDAA\x11asset,update_mask\x82\xD3\xE4\x93\x02C2:/v1/{asset.name=projects/*/locations/*/corpora/*/assets/*}:\x05asset\x12\x9B\x01\x0A\x08GetAsset\x12).google.cloud.visionai.v1.GetAssetRequest\x1A\x1F.google.cloud.visionai.v1.Asset\"C\xDAA\x04name\x82\xD3\xE4\x93\x026\x124/v1/{name=projects/*/locations/*/corpora/*/assets/*}\x12\xAE\x01\x0A\x0AListAssets\x12+.google.cloud.visionai.v1.ListAssetsRequest\x1A,.google.cloud.visionai.v1.ListAssetsResponse\"E\xDAA\x06parent\x82\xD3\xE4\x93\x026\x124/v1/{parent=projects/*/locations/*/corpora/*}/assets\x12\xCE\x01\x0A\x0BDeleteAsset\x12,.google.cloud.visionai.v1.DeleteAssetRequest\x1A\x1D.google.longrunning.Operation\"r\xCAA,\x0A\x15google.protobuf.Empty\x12\x13DeleteAssetMetadata\xDAA\x04name\x82\xD3\xE4\x93\x026*4/v1/{name=projects/*/locations/*/corpora/*/assets/*}\x12\xCF\x01\x0A\x0BUploadAsset\x12,.google.cloud.visionai.v1.UploadAssetRequest\x1A\x1D.google.longrunning.Operation\"s\xCAA*\x0A\x13UploadAssetResponse\x12\x13UploadAssetMetadata\x82\xD3\xE4\x93\x02@\";/v1/{name=projects/*/locations/*/corpora/*/assets/*}:upload:\x01*\x12\xDB\x01\x0A\x14GenerateRetrievalUrl\x125.google.cloud.visionai.v1.GenerateRetrievalUrlRequest\x1A6.google.cloud.visionai.v1.GenerateRetrievalUrlResponse\"T\x82\xD3\xE4\x93\x02N\"I/v1/{name=projects/*/locations/*/corpora/*/assets/*}:generateRetrievalUrl:\x01*\x12\xD4\x01\x0A\x0CAnalyzeAsset\x12-.google.cloud.visionai.v1.AnalyzeAssetRequest\x1A\x1D.google.longrunning.Operation\"v\xCAA,\x0A\x14AnalyzeAssetResponse\x12\x14AnalyzeAssetMetadata\x82\xD3\xE4\x93\x02A\"\"5/v1/{parent=projects/*/locations/*/corpora/*}/indexes:\x05index\x12\xD9\x01\x0A\x0BUpdateIndex\x12,.google.cloud.visionai.v1.UpdateIndexRequest\x1A\x1D.google.longrunning.Operation\"}\xCAA\x1C\x0A\x05Index\x12\x13UpdateIndexMetadata\xDAA\x11index,update_mask\x82\xD3\xE4\x93\x02D2;/v1/{index.name=projects/*/locations/*/corpora/*/indexes/*}:\x05index\x12\x9C\x01\x0A\x08GetIndex\x12).google.cloud.visionai.v1.GetIndexRequest\x1A\x1F.google.cloud.visionai.v1.Index\"D\xDAA\x04name\x82\xD3\xE4\x93\x027\x125/v1/{name=projects/*/locations/*/corpora/*/indexes/*}\x12\xB2\x01\x0A\x0BListIndexes\x12,.google.cloud.visionai.v1.ListIndexesRequest\x1A-.google.cloud.visionai.v1.ListIndexesResponse\"F\xDAA\x06parent\x82\xD3\xE4\x93\x027\x125/v1/{parent=projects/*/locations/*/corpora/*}/indexes\x12\xCF\x01\x0A\x0BDeleteIndex\x12,.google.cloud.visionai.v1.DeleteIndexRequest\x1A\x1D.google.longrunning.Operation\"s\xCAA,\x0A\x15google.protobuf.Empty\x12\x13DeleteIndexMetadata\xDAA\x04name\x82\xD3\xE4\x93\x027*5/v1/{name=projects/*/locations/*/corpora/*/indexes/*}\x12\xCA\x01\x0A\x0CCreateCorpus\x12-.google.cloud.visionai.v1.CreateCorpusRequest\x1A\x1D.google.longrunning.Operation\"l\xCAA\x1E\x0A\x06Corpus\x12\x14CreateCorpusMetadata\xDAA\x0Dparent,corpus\x82\xD3\xE4\x93\x025\"+/v1/{parent=projects/*/locations/*}/corpora:\x06corpus\x12\x95\x01\x0A\x09GetCorpus\x12*.google.cloud.visionai.v1.GetCorpusRequest\x1A .google.cloud.visionai.v1.Corpus\":\xDAA\x04name\x82\xD3\xE4\x93\x02-\x12+/v1/{name=projects/*/locations/*/corpora/*}\x12\xB8\x01\x0A\x0CUpdateCorpus\x12-.google.cloud.visionai.v1.UpdateCorpusRequest\x1A .google.cloud.visionai.v1.Corpus\"W\xDAA\x12corpus,update_mask\x82\xD3\xE4\x93\x02<22/v1/{corpus.name=projects/*/locations/*/corpora/*}:\x06corpus\x12\xA8\x01\x0A\x0BListCorpora\x12,.google.cloud.visionai.v1.ListCorporaRequest\x1A-.google.cloud.visionai.v1.ListCorporaResponse\"<\xDAA\x06parent\x82\xD3\xE4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/corpora\x12\x91\x01\x0A\x0CDeleteCorpus\x12-.google.cloud.visionai.v1.DeleteCorpusRequest\x1A\x16.google.protobuf.Empty\":\xDAA\x04name\x82\xD3\xE4\x93\x02-*+/v1/{name=projects/*/locations/*/corpora/*}\x12\xCF\x01\x0A\x0DAnalyzeCorpus\x12..google.cloud.visionai.v1.AnalyzeCorpusRequest\x1A\x1D.google.longrunning.Operation\"o\xCAA.\x0A\x15AnalyzeCorpusResponse\x12\x15AnalyzeCorpusMetadata\x82\xD3\xE4\x93\x028\"3/v1/{name=projects/*/locations/*/corpora/*}:analyze:\x01*\x12\xD0\x01\x0A\x10CreateDataSchema\x121.google.cloud.visionai.v1.CreateDataSchemaRequest\x1A\$.google.cloud.visionai.v1.DataSchema\"c\xDAA\x12parent,data_schema\x82\xD3\xE4\x93\x02H\"9/v1/{parent=projects/*/locations/*/corpora/*}/dataSchemas:\x0Bdata_schema\x12\xE1\x01\x0A\x10UpdateDataSchema\x121.google.cloud.visionai.v1.UpdateDataSchemaRequest\x1A\$.google.cloud.visionai.v1.DataSchema\"t\xDAA\x17data_schema,update_mask\x82\xD3\xE4\x93\x02T2E/v1/{data_schema.name=projects/*/locations/*/corpora/*/dataSchemas/*}:\x0Bdata_schema\x12\xAF\x01\x0A\x0DGetDataSchema\x12..google.cloud.visionai.v1.GetDataSchemaRequest\x1A\$.google.cloud.visionai.v1.DataSchema\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=projects/*/locations/*/corpora/*/dataSchemas/*}\x12\xA7\x01\x0A\x10DeleteDataSchema\x121.google.cloud.visionai.v1.DeleteDataSchemaRequest\x1A\x16.google.protobuf.Empty\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=projects/*/locations/*/corpora/*/dataSchemas/*}\x12\xC2\x01\x0A\x0FListDataSchemas\x120.google.cloud.visionai.v1.ListDataSchemasRequest\x1A1.google.cloud.visionai.v1.ListDataSchemasResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=projects/*/locations/*/corpora/*}/dataSchemas\x12\xE5\x01\x0A\x10CreateAnnotation\x121.google.cloud.visionai.v1.CreateAnnotationRequest\x1A\$.google.cloud.visionai.v1.Annotation\"x\xDAA\x1Fparent,annotation,annotation_id\x82\xD3\xE4\x93\x02P\"B/v1/{parent=projects/*/locations/*/corpora/*/assets/*}/annotations:\x0Aannotation\x12\xB8\x01\x0A\x0DGetAnnotation\x12..google.cloud.visionai.v1.GetAnnotationRequest\x1A\$.google.cloud.visionai.v1.Annotation\"Q\xDAA\x04name\x82\xD3\xE4\x93\x02D\x12B/v1/{name=projects/*/locations/*/corpora/*/assets/*/annotations/*}\x12\xCB\x01\x0A\x0FListAnnotations\x120.google.cloud.visionai.v1.ListAnnotationsRequest\x1A1.google.cloud.visionai.v1.ListAnnotationsResponse\"S\xDAA\x06parent\x82\xD3\xE4\x93\x02D\x12B/v1/{parent=projects/*/locations/*/corpora/*/assets/*}/annotations\x12\xE7\x01\x0A\x10UpdateAnnotation\x121.google.cloud.visionai.v1.UpdateAnnotationRequest\x1A\$.google.cloud.visionai.v1.Annotation\"z\xDAA\x16annotation,update_mask\x82\xD3\xE4\x93\x02[2M/v1/{annotation.name=projects/*/locations/*/corpora/*/assets/*/annotations/*}:\x0Aannotation\x12\xB0\x01\x0A\x10DeleteAnnotation\x121.google.cloud.visionai.v1.DeleteAnnotationRequest\x1A\x16.google.protobuf.Empty\"Q\xDAA\x04name\x82\xD3\xE4\x93\x02D*B/v1/{name=projects/*/locations/*/corpora/*/assets/*/annotations/*}\x12p\x0A\x0BIngestAsset\x12,.google.cloud.visionai.v1.IngestAssetRequest\x1A-.google.cloud.visionai.v1.IngestAssetResponse\"\x00(\x010\x01\x12\xAA\x01\x0A\x09ClipAsset\x12*.google.cloud.visionai.v1.ClipAssetRequest\x1A+.google.cloud.visionai.v1.ClipAssetResponse\"D\x82\xD3\xE4\x93\x02>\"9/v1/{name=projects/*/locations/*/corpora/*/assets/*}:clip:\x01*\x12\xC3\x01\x0A\x0EGenerateHlsUri\x12/.google.cloud.visionai.v1.GenerateHlsUriRequest\x1A0.google.cloud.visionai.v1.GenerateHlsUriResponse\"N\x82\xD3\xE4\x93\x02H\"C/v1/{name=projects/*/locations/*/corpora/*/assets/*}:generateHlsUri:\x01*\x12\xD3\x01\x0A\x0CImportAssets\x12-.google.cloud.visionai.v1.ImportAssetsRequest\x1A\x1D.google.longrunning.Operation\"u\xCAA,\x0A\x14ImportAssetsResponse\x12\x14ImportAssetsMetadata\x82\xD3\xE4\x93\x02@\";/v1/{parent=projects/*/locations/*/corpora/*}/assets:import:\x01*\x12\xED\x01\x0A\x12CreateSearchConfig\x123.google.cloud.visionai.v1.CreateSearchConfigRequest\x1A&.google.cloud.visionai.v1.SearchConfig\"z\xDAA%parent,search_config,search_config_id\x82\xD3\xE4\x93\x02L\";/v1/{parent=projects/*/locations/*/corpora/*}/searchConfigs:\x0Dsearch_config\x12\xEF\x01\x0A\x12UpdateSearchConfig\x123.google.cloud.visionai.v1.UpdateSearchConfigRequest\x1A&.google.cloud.visionai.v1.SearchConfig\"|\xDAA\x19search_config,update_mask\x82\xD3\xE4\x93\x02Z2I/v1/{search_config.name=projects/*/locations/*/corpora/*/searchConfigs/*}:\x0Dsearch_config\x12\xB7\x01\x0A\x0FGetSearchConfig\x120.google.cloud.visionai.v1.GetSearchConfigRequest\x1A&.google.cloud.visionai.v1.SearchConfig\"J\xDAA\x04name\x82\xD3\xE4\x93\x02=\x12;/v1/{name=projects/*/locations/*/corpora/*/searchConfigs/*}\x12\xAD\x01\x0A\x12DeleteSearchConfig\x123.google.cloud.visionai.v1.DeleteSearchConfigRequest\x1A\x16.google.protobuf.Empty\"J\xDAA\x04name\x82\xD3\xE4\x93\x02=*;/v1/{name=projects/*/locations/*/corpora/*/searchConfigs/*}\x12\xCA\x01\x0A\x11ListSearchConfigs\x122.google.cloud.visionai.v1.ListSearchConfigsRequest\x1A3.google.cloud.visionai.v1.ListSearchConfigsResponse\"L\xDAA\x06parent\x82\xD3\xE4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/corpora/*}/searchConfigs\x12\xFC\x01\x0A\x14CreateSearchHypernym\x125.google.cloud.visionai.v1.CreateSearchHypernymRequest\x1A(.google.cloud.visionai.v1.SearchHypernym\"\x82\x01\xDAA)parent,search_hypernym,search_hypernym_id\x82\xD3\xE4\x93\x02P\"=/v1/{parent=projects/*/locations/*/corpora/*}/searchHypernyms:\x0Fsearch_hypernym\x12\xFE\x01\x0A\x14UpdateSearchHypernym\x125.google.cloud.visionai.v1.UpdateSearchHypernymRequest\x1A(.google.cloud.visionai.v1.SearchHypernym\"\x84\x01\xDAA\x1Bsearch_hypernym,update_mask\x82\xD3\xE4\x93\x02`2M/v1/{search_hypernym.name=projects/*/locations/*/corpora/*/searchHypernyms/*}:\x0Fsearch_hypernym\x12\xBF\x01\x0A\x11GetSearchHypernym\x122.google.cloud.visionai.v1.GetSearchHypernymRequest\x1A(.google.cloud.visionai.v1.SearchHypernym\"L\xDAA\x04name\x82\xD3\xE4\x93\x02?\x12=/v1/{name=projects/*/locations/*/corpora/*/searchHypernyms/*}\x12\xB3\x01\x0A\x14DeleteSearchHypernym\x125.google.cloud.visionai.v1.DeleteSearchHypernymRequest\x1A\x16.google.protobuf.Empty\"L\xDAA\x04name\x82\xD3\xE4\x93\x02?*=/v1/{name=projects/*/locations/*/corpora/*/searchHypernyms/*}\x12\xD2\x01\x0A\x13ListSearchHypernyms\x124.google.cloud.visionai.v1.ListSearchHypernymsRequest\x1A5.google.cloud.visionai.v1.ListSearchHypernymsResponse\"N\xDAA\x06parent\x82\xD3\xE4\x93\x02?\x12=/v1/{parent=projects/*/locations/*/corpora/*}/searchHypernyms\x12\xB4\x01\x0A\x0CSearchAssets\x12-.google.cloud.visionai.v1.SearchAssetsRequest\x1A..google.cloud.visionai.v1.SearchAssetsResponse\"E\x82\xD3\xE4\x93\x02?\":/v1/{corpus=projects/*/locations/*/corpora/*}:searchAssets:\x01*\x12\xDF\x01\x0A\x13SearchIndexEndpoint\x124.google.cloud.visionai.v1.SearchIndexEndpointRequest\x1A5.google.cloud.visionai.v1.SearchIndexEndpointResponse\"[\x82\xD3\xE4\x93\x02U\"P/v1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:searchIndexEndpoint:\x01*\x12\x90\x02\x0A\x13CreateIndexEndpoint\x124.google.cloud.visionai.v1.CreateIndexEndpointRequest\x1A\x1D.google.longrunning.Operation\"\xA3\x01\xCAA,\x0A\x0DIndexEndpoint\x12\x1BCreateIndexEndpointMetadata\xDAA'parent,index_endpoint,index_endpoint_id\x82\xD3\xE4\x93\x02D\"2/v1/{parent=projects/*/locations/*}/indexEndpoints:\x0Eindex_endpoint\x12\xB1\x01\x0A\x10GetIndexEndpoint\x121.google.cloud.visionai.v1.GetIndexEndpointRequest\x1A'.google.cloud.visionai.v1.IndexEndpoint\"A\xDAA\x04name\x82\xD3\xE4\x93\x024\x122/v1/{name=projects/*/locations/*/indexEndpoints/*}\x12\xC4\x01\x0A\x12ListIndexEndpoints\x123.google.cloud.visionai.v1.ListIndexEndpointsRequest\x1A4.google.cloud.visionai.v1.ListIndexEndpointsResponse\"C\xDAA\x06parent\x82\xD3\xE4\x93\x024\x122/v1/{parent=projects/*/locations/*}/indexEndpoints\x12\x92\x02\x0A\x13UpdateIndexEndpoint\x124.google.cloud.visionai.v1.UpdateIndexEndpointRequest\x1A\x1D.google.longrunning.Operation\"\xA5\x01\xCAA,\x0A\x0DIndexEndpoint\x12\x1BUpdateIndexEndpointMetadata\xDAA\x1Aindex_endpoint,update_mask\x82\xD3\xE4\x93\x02S2A/v1/{index_endpoint.name=projects/*/locations/*/indexEndpoints/*}:\x0Eindex_endpoint\x12\xE4\x01\x0A\x13DeleteIndexEndpoint\x124.google.cloud.visionai.v1.DeleteIndexEndpointRequest\x1A\x1D.google.longrunning.Operation\"x\xCAA4\x0A\x15google.protobuf.Empty\x12\x1BDeleteIndexEndpointMetadata\xDAA\x04name\x82\xD3\xE4\x93\x024*2/v1/{name=projects/*/locations/*/indexEndpoints/*}\x12\xDD\x01\x0A\x0BDeployIndex\x12,.google.cloud.visionai.v1.DeployIndexRequest\x1A\x1D.google.longrunning.Operation\"\x80\x01\xCAA*\x0A\x13DeployIndexResponse\x12\x13DeployIndexMetadata\x82\xD3\xE4\x93\x02M\"H/v1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:deployIndex:\x01*\x12\xE7\x01\x0A\x0DUndeployIndex\x12..google.cloud.visionai.v1.UndeployIndexRequest\x1A\x1D.google.longrunning.Operation\"\x86\x01\xCAA.\x0A\x15UndeployIndexResponse\x12\x15UndeployIndexMetadata\x82\xD3\xE4\x93\x02O\"J/v1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:undeployIndex:\x01*\x12\xFF\x01\x0A\x10CreateCollection\x121.google.cloud.visionai.v1.CreateCollectionRequest\x1A\x1D.google.longrunning.Operation\"\x98\x01\xCAA&\x0A\x0ACollection\x12\x18CreateCollectionMetadata\xDAA\x1Fparent,collection,collection_id\x82\xD3\xE4\x93\x02G\"9/v1/{parent=projects/*/locations/*/corpora/*}/collections:\x0Acollection\x12\xE2\x01\x0A\x10DeleteCollection\x121.google.cloud.visionai.v1.DeleteCollectionRequest\x1A\x1D.google.longrunning.Operation\"|\xCAA1\x0A\x15google.protobuf.Empty\x12\x18DeleteCollectionMetadata\xDAA\x04name\x82\xD3\xE4\x93\x02;*9/v1/{name=projects/*/locations/*/corpora/*/collections/*}\x12\xAF\x01\x0A\x0DGetCollection\x12..google.cloud.visionai.v1.GetCollectionRequest\x1A\$.google.cloud.visionai.v1.Collection\"H\xDAA\x04name\x82\xD3\xE4\x93\x02;\x129/v1/{name=projects/*/locations/*/corpora/*/collections/*}\x12\xDE\x01\x0A\x10UpdateCollection\x121.google.cloud.visionai.v1.UpdateCollectionRequest\x1A\$.google.cloud.visionai.v1.Collection\"q\xDAA\x16collection,update_mask\x82\xD3\xE4\x93\x02R2D/v1/{collection.name=projects/*/locations/*/corpora/*/collections/*}:\x0Acollection\x12\xC2\x01\x0A\x0FListCollections\x120.google.cloud.visionai.v1.ListCollectionsRequest\x1A1.google.cloud.visionai.v1.ListCollectionsResponse\"J\xDAA\x06parent\x82\xD3\xE4\x93\x02;\x129/v1/{parent=projects/*/locations/*/corpora/*}/collections\x12\xE6\x01\x0A\x11AddCollectionItem\x122.google.cloud.visionai.v1.AddCollectionItemRequest\x1A3.google.cloud.visionai.v1.AddCollectionItemResponse\"h\xDAA\x04item\x82\xD3\xE4\x93\x02[\"V/v1/{item.collection=projects/*/locations/*/corpora/*/collections/*}:addCollectionItem:\x01*\x12\xF2\x01\x0A\x14RemoveCollectionItem\x125.google.cloud.visionai.v1.RemoveCollectionItemRequest\x1A6.google.cloud.visionai.v1.RemoveCollectionItemResponse\"k\xDAA\x04item\x82\xD3\xE4\x93\x02^\"Y/v1/{item.collection=projects/*/locations/*/corpora/*/collections/*}:removeCollectionItem:\x01*\x12\xEC\x01\x0A\x13ViewCollectionItems\x124.google.cloud.visionai.v1.ViewCollectionItemsRequest\x1A5.google.cloud.visionai.v1.ViewCollectionItemsResponse\"h\xDAA\x0Acollection\x82\xD3\xE4\x93\x02U\x12S/v1/{collection=projects/*/locations/*/corpora/*/collections/*}:viewCollectionItems\x1AU\xCAA!warehouse-visionai.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xBE\x01\x0A\x1Ccom.google.cloud.visionai.v1B\x0EWarehouseProtoP\x01Z8cloud.google.com/go/visionai/apiv1/visionaipb;visionaipb\xAA\x02\x18Google.Cloud.VisionAI.V1\xCA\x02\x18Google\\Cloud\\VisionAI\\V1\xEA\x02\x1BGoogle::Cloud::VisionAI::V1b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AIEnabledDevicesInputConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AIEnabledDevicesInputConfig.php deleted file mode 100644 index f112055a62ed..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AIEnabledDevicesInputConfig.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.AIEnabledDevicesInputConfig - */ -class AIEnabledDevicesInputConfig extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AcceleratorType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AcceleratorType.php deleted file mode 100644 index 05680f1236ab..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AcceleratorType.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.visionai.v1.AcceleratorType - */ -class AcceleratorType -{ - /** - * Unspecified accelerator type, which means no accelerator. - * - * Generated from protobuf enum ACCELERATOR_TYPE_UNSPECIFIED = 0; - */ - const ACCELERATOR_TYPE_UNSPECIFIED = 0; - /** - * Nvidia Tesla K80 GPU. - * - * Generated from protobuf enum NVIDIA_TESLA_K80 = 1; - */ - const NVIDIA_TESLA_K80 = 1; - /** - * Nvidia Tesla P100 GPU. - * - * Generated from protobuf enum NVIDIA_TESLA_P100 = 2; - */ - const NVIDIA_TESLA_P100 = 2; - /** - * Nvidia Tesla V100 GPU. - * - * Generated from protobuf enum NVIDIA_TESLA_V100 = 3; - */ - const NVIDIA_TESLA_V100 = 3; - /** - * Nvidia Tesla P4 GPU. - * - * Generated from protobuf enum NVIDIA_TESLA_P4 = 4; - */ - const NVIDIA_TESLA_P4 = 4; - /** - * Nvidia Tesla T4 GPU. - * - * Generated from protobuf enum NVIDIA_TESLA_T4 = 5; - */ - const NVIDIA_TESLA_T4 = 5; - /** - * Nvidia Tesla A100 GPU. - * - * Generated from protobuf enum NVIDIA_TESLA_A100 = 8; - */ - const NVIDIA_TESLA_A100 = 8; - /** - * TPU v2. - * - * Generated from protobuf enum TPU_V2 = 6; - */ - const TPU_V2 = 6; - /** - * TPU v3. - * - * Generated from protobuf enum TPU_V3 = 7; - */ - const TPU_V3 = 7; - - private static $valueToName = [ - self::ACCELERATOR_TYPE_UNSPECIFIED => 'ACCELERATOR_TYPE_UNSPECIFIED', - self::NVIDIA_TESLA_K80 => 'NVIDIA_TESLA_K80', - self::NVIDIA_TESLA_P100 => 'NVIDIA_TESLA_P100', - self::NVIDIA_TESLA_V100 => 'NVIDIA_TESLA_V100', - self::NVIDIA_TESLA_P4 => 'NVIDIA_TESLA_P4', - self::NVIDIA_TESLA_T4 => 'NVIDIA_TESLA_T4', - self::NVIDIA_TESLA_A100 => 'NVIDIA_TESLA_A100', - self::TPU_V2 => 'TPU_V2', - self::TPU_V3 => 'TPU_V3', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AcquireLeaseRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AcquireLeaseRequest.php deleted file mode 100644 index cf25e5823be7..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AcquireLeaseRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.visionai.v1.AcquireLeaseRequest - */ -class AcquireLeaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The series name. - * - * Generated from protobuf field string series = 1; - */ - protected $series = ''; - /** - * The owner name. - * - * Generated from protobuf field string owner = 2; - */ - protected $owner = ''; - /** - * The lease term. - * - * Generated from protobuf field .google.protobuf.Duration term = 3; - */ - protected $term = null; - /** - * The lease type. - * - * Generated from protobuf field .google.cloud.visionai.v1.LeaseType lease_type = 4; - */ - protected $lease_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $series - * The series name. - * @type string $owner - * The owner name. - * @type \Google\Protobuf\Duration $term - * The lease term. - * @type int $lease_type - * The lease type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - - /** - * The series name. - * - * Generated from protobuf field string series = 1; - * @return string - */ - public function getSeries() - { - return $this->series; - } - - /** - * The series name. - * - * Generated from protobuf field string series = 1; - * @param string $var - * @return $this - */ - public function setSeries($var) - { - GPBUtil::checkString($var, True); - $this->series = $var; - - return $this; - } - - /** - * The owner name. - * - * Generated from protobuf field string owner = 2; - * @return string - */ - public function getOwner() - { - return $this->owner; - } - - /** - * The owner name. - * - * Generated from protobuf field string owner = 2; - * @param string $var - * @return $this - */ - public function setOwner($var) - { - GPBUtil::checkString($var, True); - $this->owner = $var; - - return $this; - } - - /** - * The lease term. - * - * Generated from protobuf field .google.protobuf.Duration term = 3; - * @return \Google\Protobuf\Duration|null - */ - public function getTerm() - { - return $this->term; - } - - public function hasTerm() - { - return isset($this->term); - } - - public function clearTerm() - { - unset($this->term); - } - - /** - * The lease term. - * - * Generated from protobuf field .google.protobuf.Duration term = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTerm($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->term = $var; - - return $this; - } - - /** - * The lease type. - * - * Generated from protobuf field .google.cloud.visionai.v1.LeaseType lease_type = 4; - * @return int - */ - public function getLeaseType() - { - return $this->lease_type; - } - - /** - * The lease type. - * - * Generated from protobuf field .google.cloud.visionai.v1.LeaseType lease_type = 4; - * @param int $var - * @return $this - */ - public function setLeaseType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\LeaseType::class); - $this->lease_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddApplicationStreamInputRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddApplicationStreamInputRequest.php deleted file mode 100644 index d1f89125e521..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddApplicationStreamInputRequest.php +++ /dev/null @@ -1,203 +0,0 @@ -google.cloud.visionai.v1.AddApplicationStreamInputRequest - */ -class AddApplicationStreamInputRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The stream inputs to add, the stream resource name is the key of each - * StreamInput, and it must be unique within each application. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; - */ - private $application_stream_inputs; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * Please see {@see AppPlatformClient::applicationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\AddApplicationStreamInputRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * @type \Google\Cloud\VisionAI\V1\ApplicationStreamInput[] $application_stream_inputs - * The stream inputs to add, the stream resource name is the key of each - * StreamInput, and it must be unique within each application. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * 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 stream inputs to add, the stream resource name is the key of each - * StreamInput, and it must be unique within each application. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\ApplicationStreamInput> - */ - public function getApplicationStreamInputs() - { - return $this->application_stream_inputs; - } - - /** - * The stream inputs to add, the stream resource name is the key of each - * StreamInput, and it must be unique within each application. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; - * @param \Google\Cloud\VisionAI\V1\ApplicationStreamInput[] $var - * @return $this - */ - public function setApplicationStreamInputs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ApplicationStreamInput::class); - $this->application_stream_inputs = $arr; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddApplicationStreamInputResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddApplicationStreamInputResponse.php deleted file mode 100644 index 243226a3e761..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddApplicationStreamInputResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.AddApplicationStreamInputResponse - */ -class AddApplicationStreamInputResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddCollectionItemRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddCollectionItemRequest.php deleted file mode 100644 index 93048bafe747..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddCollectionItemRequest.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.visionai.v1.AddCollectionItemRequest - */ -class AddCollectionItemRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The item to be added. - * - * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $item = null; - - /** - * @param \Google\Cloud\VisionAI\V1\CollectionItem $item Required. The item to be added. - * - * @return \Google\Cloud\VisionAI\V1\AddCollectionItemRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\CollectionItem $item): self - { - return (new self()) - ->setItem($item); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\CollectionItem $item - * Required. The item to be added. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The item to be added. - * - * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\CollectionItem|null - */ - public function getItem() - { - return $this->item; - } - - public function hasItem() - { - return isset($this->item); - } - - public function clearItem() - { - unset($this->item); - } - - /** - * Required. The item to be added. - * - * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\CollectionItem $var - * @return $this - */ - public function setItem($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\CollectionItem::class); - $this->item = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddCollectionItemResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddCollectionItemResponse.php deleted file mode 100644 index cace42561560..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AddCollectionItemResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.visionai.v1.AddCollectionItemResponse - */ -class AddCollectionItemResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The item that has already been added. - * - * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1; - */ - protected $item = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\CollectionItem $item - * The item that has already been added. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The item that has already been added. - * - * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1; - * @return \Google\Cloud\VisionAI\V1\CollectionItem|null - */ - public function getItem() - { - return $this->item; - } - - public function hasItem() - { - return isset($this->item); - } - - public function clearItem() - { - unset($this->item); - } - - /** - * The item that has already been added. - * - * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1; - * @param \Google\Cloud\VisionAI\V1\CollectionItem $var - * @return $this - */ - public function setItem($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\CollectionItem::class); - $this->item = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Analysis.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Analysis.php deleted file mode 100644 index 659a3a98f4e9..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Analysis.php +++ /dev/null @@ -1,371 +0,0 @@ -google.cloud.visionai.v1.Analysis - */ -class Analysis extends \Google\Protobuf\Internal\Message -{ - /** - * The name of resource. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * The definition of the analysis. - * - * Generated from protobuf field .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; - */ - protected $analysis_definition = null; - /** - * Map from the input parameter in the definition to the real stream. - * E.g., suppose you had a stream source operator named "input-0" and you try - * to receive from the real stream "stream-0". You can add the following - * mapping: [input-0: stream-0]. - * - * Generated from protobuf field map input_streams_mapping = 6; - */ - private $input_streams_mapping; - /** - * Map from the output parameter in the definition to the real stream. - * E.g., suppose you had a stream sink operator named "output-0" and you try - * to send to the real stream "stream-0". You can add the following - * mapping: [output-0: stream-0]. - * - * Generated from protobuf field map output_streams_mapping = 7; - */ - private $output_streams_mapping; - /** - * Boolean flag to indicate whether you would like to disable the ability - * to automatically start a Process when new event happening in the input - * Stream. If you would like to start a Process manually, the field needs - * to be set to true. - * - * Generated from protobuf field bool disable_event_watch = 8; - */ - protected $disable_event_watch = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update timestamp. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs. - * @type \Google\Cloud\VisionAI\V1\AnalysisDefinition $analysis_definition - * The definition of the analysis. - * @type array|\Google\Protobuf\Internal\MapField $input_streams_mapping - * Map from the input parameter in the definition to the real stream. - * E.g., suppose you had a stream source operator named "input-0" and you try - * to receive from the real stream "stream-0". You can add the following - * mapping: [input-0: stream-0]. - * @type array|\Google\Protobuf\Internal\MapField $output_streams_mapping - * Map from the output parameter in the definition to the real stream. - * E.g., suppose you had a stream sink operator named "output-0" and you try - * to send to the real stream "stream-0". You can add the following - * mapping: [output-0: stream-0]. - * @type bool $disable_event_watch - * Boolean flag to indicate whether you would like to disable the ability - * to automatically start a Process when new event happening in the input - * Stream. If you would like to start a Process manually, the field needs - * to be set to true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaResources::initOnce(); - parent::__construct($data); - } - - /** - * The name of resource. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of resource. - * - * 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 create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * The definition of the analysis. - * - * Generated from protobuf field .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; - * @return \Google\Cloud\VisionAI\V1\AnalysisDefinition|null - */ - public function getAnalysisDefinition() - { - return $this->analysis_definition; - } - - public function hasAnalysisDefinition() - { - return isset($this->analysis_definition); - } - - public function clearAnalysisDefinition() - { - unset($this->analysis_definition); - } - - /** - * The definition of the analysis. - * - * Generated from protobuf field .google.cloud.visionai.v1.AnalysisDefinition analysis_definition = 5; - * @param \Google\Cloud\VisionAI\V1\AnalysisDefinition $var - * @return $this - */ - public function setAnalysisDefinition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AnalysisDefinition::class); - $this->analysis_definition = $var; - - return $this; - } - - /** - * Map from the input parameter in the definition to the real stream. - * E.g., suppose you had a stream source operator named "input-0" and you try - * to receive from the real stream "stream-0". You can add the following - * mapping: [input-0: stream-0]. - * - * Generated from protobuf field map input_streams_mapping = 6; - * @return \Google\Protobuf\Internal\MapField - */ - public function getInputStreamsMapping() - { - return $this->input_streams_mapping; - } - - /** - * Map from the input parameter in the definition to the real stream. - * E.g., suppose you had a stream source operator named "input-0" and you try - * to receive from the real stream "stream-0". You can add the following - * mapping: [input-0: stream-0]. - * - * Generated from protobuf field map input_streams_mapping = 6; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setInputStreamsMapping($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->input_streams_mapping = $arr; - - return $this; - } - - /** - * Map from the output parameter in the definition to the real stream. - * E.g., suppose you had a stream sink operator named "output-0" and you try - * to send to the real stream "stream-0". You can add the following - * mapping: [output-0: stream-0]. - * - * Generated from protobuf field map output_streams_mapping = 7; - * @return \Google\Protobuf\Internal\MapField - */ - public function getOutputStreamsMapping() - { - return $this->output_streams_mapping; - } - - /** - * Map from the output parameter in the definition to the real stream. - * E.g., suppose you had a stream sink operator named "output-0" and you try - * to send to the real stream "stream-0". You can add the following - * mapping: [output-0: stream-0]. - * - * Generated from protobuf field map output_streams_mapping = 7; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setOutputStreamsMapping($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->output_streams_mapping = $arr; - - return $this; - } - - /** - * Boolean flag to indicate whether you would like to disable the ability - * to automatically start a Process when new event happening in the input - * Stream. If you would like to start a Process manually, the field needs - * to be set to true. - * - * Generated from protobuf field bool disable_event_watch = 8; - * @return bool - */ - public function getDisableEventWatch() - { - return $this->disable_event_watch; - } - - /** - * Boolean flag to indicate whether you would like to disable the ability - * to automatically start a Process when new event happening in the input - * Stream. If you would like to start a Process manually, the field needs - * to be set to true. - * - * Generated from protobuf field bool disable_event_watch = 8; - * @param bool $var - * @return $this - */ - public function setDisableEventWatch($var) - { - GPBUtil::checkBool($var); - $this->disable_event_watch = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalysisDefinition.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalysisDefinition.php deleted file mode 100644 index f1dfcf854272..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalysisDefinition.php +++ /dev/null @@ -1,72 +0,0 @@ -google.cloud.visionai.v1.AnalysisDefinition - */ -class AnalysisDefinition extends \Google\Protobuf\Internal\Message -{ - /** - * Analyzer definitions. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; - */ - private $analyzers; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\AnalyzerDefinition[] $analyzers - * Analyzer definitions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); - parent::__construct($data); - } - - /** - * Analyzer definitions. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\AnalyzerDefinition> - */ - public function getAnalyzers() - { - return $this->analyzers; - } - - /** - * Analyzer definitions. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AnalyzerDefinition analyzers = 1; - * @param \Google\Cloud\VisionAI\V1\AnalyzerDefinition[] $var - * @return $this - */ - public function setAnalyzers($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AnalyzerDefinition::class); - $this->analyzers = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata.php deleted file mode 100644 index d275381581e5..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.visionai.v1.AnalyzeAssetMetadata - */ -class AnalyzeAssetMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The status of analysis on all search capabilities. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; - */ - private $analysis_status; - /** - * The start time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - */ - protected $start_time = null; - /** - * The update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\AnalyzeAssetMetadata\AnalysisStatus[] $analysis_status - * The status of analysis on all search capabilities. - * @type \Google\Protobuf\Timestamp $start_time - * The start time of the operation. - * @type \Google\Protobuf\Timestamp $update_time - * The update time of the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The status of analysis on all search capabilities. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\AnalyzeAssetMetadata\AnalysisStatus> - */ - public function getAnalysisStatus() - { - return $this->analysis_status; - } - - /** - * The status of analysis on all search capabilities. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus analysis_status = 1; - * @param \Google\Cloud\VisionAI\V1\AnalyzeAssetMetadata\AnalysisStatus[] $var - * @return $this - */ - public function setAnalysisStatus($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AnalyzeAssetMetadata\AnalysisStatus::class); - $this->analysis_status = $arr; - - return $this; - } - - /** - * The start time of the operation. - * - * 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 of the operation. - * - * 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 update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata/AnalysisStatus.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata/AnalysisStatus.php deleted file mode 100644 index 5daf3d3c45b2..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata/AnalysisStatus.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus - */ -class AnalysisStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State state = 2; - */ - protected $state = 0; - /** - * Generated from protobuf field string status_message = 3; - */ - protected $status_message = ''; - /** - * The search capability requested. - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchCapability search_capability = 4; - */ - protected $search_capability = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * @type string $status_message - * @type \Google\Cloud\VisionAI\V1\SearchCapability $search_capability - * The search capability requested. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State state = 2; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Generated from protobuf field .google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State state = 2; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\AnalyzeAssetMetadata\AnalysisStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * Generated from protobuf field string status_message = 3; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Generated from protobuf field string status_message = 3; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * The search capability requested. - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchCapability search_capability = 4; - * @return \Google\Cloud\VisionAI\V1\SearchCapability|null - */ - public function getSearchCapability() - { - return $this->search_capability; - } - - public function hasSearchCapability() - { - return isset($this->search_capability); - } - - public function clearSearchCapability() - { - unset($this->search_capability); - } - - /** - * The search capability requested. - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchCapability search_capability = 4; - * @param \Google\Cloud\VisionAI\V1\SearchCapability $var - * @return $this - */ - public function setSearchCapability($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\SearchCapability::class); - $this->search_capability = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata/AnalysisStatus/State.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata/AnalysisStatus/State.php deleted file mode 100644 index 812af2314e68..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetMetadata/AnalysisStatus/State.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.visionai.v1.AnalyzeAssetMetadata.AnalysisStatus.State - */ -class State -{ - /** - * The default process state should never happen. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The ml model analysis is in progress. - * - * Generated from protobuf enum IN_PROGRESS = 1; - */ - const IN_PROGRESS = 1; - /** - * The ml model analysis is successfully done. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * The ml model analysis failed. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::IN_PROGRESS => 'IN_PROGRESS', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetRequest.php deleted file mode 100644 index 543d57ae25a8..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.visionai.v1.AnalyzeAssetRequest - */ -class AnalyzeAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the asset to analyze. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the asset to analyze. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the asset to analyze. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the asset to analyze. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetResponse.php deleted file mode 100644 index 2008be400e02..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeAssetResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.AnalyzeAssetResponse - */ -class AnalyzeAssetResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusMetadata.php deleted file mode 100644 index 0f43644a075e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusMetadata.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.visionai.v1.AnalyzeCorpusMetadata - */ -class AnalyzeCorpusMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The metadata of the operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata metadata = 1; - */ - protected $metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\OperationMetadata $metadata - * The metadata of the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The metadata of the operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata metadata = 1; - * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * The metadata of the operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata metadata = 1; - * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); - $this->metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusRequest.php deleted file mode 100644 index 5349383ebe8d..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.visionai.v1.AnalyzeCorpusRequest - */ -class AnalyzeCorpusRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent corpus resource where the assets will be analyzed. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The parent corpus resource where the assets will be analyzed. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent corpus resource where the assets will be analyzed. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The parent corpus resource where the assets will be analyzed. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusResponse.php deleted file mode 100644 index 1ecd2a2969ea..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzeCorpusResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.AnalyzeCorpusResponse - */ -class AnalyzeCorpusResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition.php deleted file mode 100644 index b309745cd537..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition.php +++ /dev/null @@ -1,280 +0,0 @@ -google.cloud.visionai.v1.AnalyzerDefinition - */ -class AnalyzerDefinition extends \Google\Protobuf\Internal\Message -{ - /** - * The name of this analyzer. - * Tentatively [a-z][a-z0-9]*(_[a-z0-9]+)*. - * - * Generated from protobuf field string analyzer = 1; - */ - protected $analyzer = ''; - /** - * The name of the operator that this analyzer runs. - * Must match the name of a supported operator. - * - * Generated from protobuf field string operator = 2; - */ - protected $operator = ''; - /** - * Input streams. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; - */ - private $inputs; - /** - * The attribute values that this analyzer applies to the operator. - * Supply a mapping between the attribute names and the actual value you wish - * to apply. If an attribute name is omitted, then it will take a - * preconfigured default value. - * - * Generated from protobuf field map attrs = 4; - */ - private $attrs; - /** - * Debug options. - * - * Generated from protobuf field .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; - */ - protected $debug_options = null; - /** - * Operator option. - * - * Generated from protobuf field .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; - */ - protected $operator_option = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $analyzer - * The name of this analyzer. - * Tentatively [a-z][a-z0-9]*(_[a-z0-9]+)*. - * @type string $operator - * The name of the operator that this analyzer runs. - * Must match the name of a supported operator. - * @type \Google\Cloud\VisionAI\V1\AnalyzerDefinition\StreamInput[] $inputs - * Input streams. - * @type array|\Google\Protobuf\Internal\MapField $attrs - * The attribute values that this analyzer applies to the operator. - * Supply a mapping between the attribute names and the actual value you wish - * to apply. If an attribute name is omitted, then it will take a - * preconfigured default value. - * @type \Google\Cloud\VisionAI\V1\AnalyzerDefinition\DebugOptions $debug_options - * Debug options. - * @type \Google\Cloud\VisionAI\V1\AnalyzerDefinition\OperatorOption $operator_option - * Operator option. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); - parent::__construct($data); - } - - /** - * The name of this analyzer. - * Tentatively [a-z][a-z0-9]*(_[a-z0-9]+)*. - * - * Generated from protobuf field string analyzer = 1; - * @return string - */ - public function getAnalyzer() - { - return $this->analyzer; - } - - /** - * The name of this analyzer. - * Tentatively [a-z][a-z0-9]*(_[a-z0-9]+)*. - * - * Generated from protobuf field string analyzer = 1; - * @param string $var - * @return $this - */ - public function setAnalyzer($var) - { - GPBUtil::checkString($var, True); - $this->analyzer = $var; - - return $this; - } - - /** - * The name of the operator that this analyzer runs. - * Must match the name of a supported operator. - * - * Generated from protobuf field string operator = 2; - * @return string - */ - public function getOperator() - { - return $this->operator; - } - - /** - * The name of the operator that this analyzer runs. - * Must match the name of a supported operator. - * - * Generated from protobuf field string operator = 2; - * @param string $var - * @return $this - */ - public function setOperator($var) - { - GPBUtil::checkString($var, True); - $this->operator = $var; - - return $this; - } - - /** - * Input streams. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\AnalyzerDefinition\StreamInput> - */ - public function getInputs() - { - return $this->inputs; - } - - /** - * Input streams. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AnalyzerDefinition.StreamInput inputs = 3; - * @param \Google\Cloud\VisionAI\V1\AnalyzerDefinition\StreamInput[] $var - * @return $this - */ - public function setInputs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AnalyzerDefinition\StreamInput::class); - $this->inputs = $arr; - - return $this; - } - - /** - * The attribute values that this analyzer applies to the operator. - * Supply a mapping between the attribute names and the actual value you wish - * to apply. If an attribute name is omitted, then it will take a - * preconfigured default value. - * - * Generated from protobuf field map attrs = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAttrs() - { - return $this->attrs; - } - - /** - * The attribute values that this analyzer applies to the operator. - * Supply a mapping between the attribute names and the actual value you wish - * to apply. If an attribute name is omitted, then it will take a - * preconfigured default value. - * - * Generated from protobuf field map attrs = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAttrs($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AttributeValue::class); - $this->attrs = $arr; - - return $this; - } - - /** - * Debug options. - * - * Generated from protobuf field .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; - * @return \Google\Cloud\VisionAI\V1\AnalyzerDefinition\DebugOptions|null - */ - public function getDebugOptions() - { - return $this->debug_options; - } - - public function hasDebugOptions() - { - return isset($this->debug_options); - } - - public function clearDebugOptions() - { - unset($this->debug_options); - } - - /** - * Debug options. - * - * Generated from protobuf field .google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions debug_options = 5; - * @param \Google\Cloud\VisionAI\V1\AnalyzerDefinition\DebugOptions $var - * @return $this - */ - public function setDebugOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AnalyzerDefinition\DebugOptions::class); - $this->debug_options = $var; - - return $this; - } - - /** - * Operator option. - * - * Generated from protobuf field .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; - * @return \Google\Cloud\VisionAI\V1\AnalyzerDefinition\OperatorOption|null - */ - public function getOperatorOption() - { - return $this->operator_option; - } - - public function hasOperatorOption() - { - return isset($this->operator_option); - } - - public function clearOperatorOption() - { - unset($this->operator_option); - } - - /** - * Operator option. - * - * Generated from protobuf field .google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption operator_option = 6; - * @param \Google\Cloud\VisionAI\V1\AnalyzerDefinition\OperatorOption $var - * @return $this - */ - public function setOperatorOption($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AnalyzerDefinition\OperatorOption::class); - $this->operator_option = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/DebugOptions.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/DebugOptions.php deleted file mode 100644 index 2c55ead13872..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/DebugOptions.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.AnalyzerDefinition.DebugOptions - */ -class DebugOptions extends \Google\Protobuf\Internal\Message -{ - /** - * Environment variables. - * - * Generated from protobuf field map environment_variables = 1; - */ - private $environment_variables; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $environment_variables - * Environment variables. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); - parent::__construct($data); - } - - /** - * Environment variables. - * - * Generated from protobuf field map environment_variables = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getEnvironmentVariables() - { - return $this->environment_variables; - } - - /** - * Environment variables. - * - * Generated from protobuf field map environment_variables = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setEnvironmentVariables($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->environment_variables = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/OperatorOption.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/OperatorOption.php deleted file mode 100644 index 514c2a141b11..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/OperatorOption.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.visionai.v1.AnalyzerDefinition.OperatorOption - */ -class OperatorOption extends \Google\Protobuf\Internal\Message -{ - /** - * Tag of the operator. - * - * Generated from protobuf field string tag = 1; - */ - protected $tag = ''; - /** - * Registry of the operator. e.g. public, dev. - * - * Generated from protobuf field string registry = 2; - */ - protected $registry = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $tag - * Tag of the operator. - * @type string $registry - * Registry of the operator. e.g. public, dev. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); - parent::__construct($data); - } - - /** - * Tag of the operator. - * - * Generated from protobuf field string tag = 1; - * @return string - */ - public function getTag() - { - return $this->tag; - } - - /** - * Tag of the operator. - * - * Generated from protobuf field string tag = 1; - * @param string $var - * @return $this - */ - public function setTag($var) - { - GPBUtil::checkString($var, True); - $this->tag = $var; - - return $this; - } - - /** - * Registry of the operator. e.g. public, dev. - * - * Generated from protobuf field string registry = 2; - * @return string - */ - public function getRegistry() - { - return $this->registry; - } - - /** - * Registry of the operator. e.g. public, dev. - * - * Generated from protobuf field string registry = 2; - * @param string $var - * @return $this - */ - public function setRegistry($var) - { - GPBUtil::checkString($var, True); - $this->registry = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/StreamInput.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/StreamInput.php deleted file mode 100644 index a1ddbc0e2ae3..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnalyzerDefinition/StreamInput.php +++ /dev/null @@ -1,79 +0,0 @@ -: - * Example: - * Suppose you had an operator named "SomeOp" that has 2 output - * arguments, the first of which is named "foo" and the second of which is - * named "bar", and an operator named "MyOp" that accepts 2 inputs. - * Also suppose that there is an analyzer named "some-analyzer" that is - * running "SomeOp" and another analyzer named "my-analyzer" running "MyOp". - * To indicate that "my-analyzer" is to consume "some-analyzer"'s "foo" - * output as its first input and "some-analyzer"'s "bar" output as its - * second input, you can set this field to the following: - * input = ["some-analyzer:foo", "some-analyzer:bar"] - * - * Generated from protobuf message google.cloud.visionai.v1.AnalyzerDefinition.StreamInput - */ -class StreamInput extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the stream input (as discussed above). - * - * Generated from protobuf field string input = 1; - */ - protected $input = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $input - * The name of the stream input (as discussed above). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); - parent::__construct($data); - } - - /** - * The name of the stream input (as discussed above). - * - * Generated from protobuf field string input = 1; - * @return string - */ - public function getInput() - { - return $this->input; - } - - /** - * The name of the stream input (as discussed above). - * - * Generated from protobuf field string input = 1; - * @param string $var - * @return $this - */ - public function setInput($var) - { - GPBUtil::checkString($var, True); - $this->input = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Annotation.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Annotation.php deleted file mode 100644 index 1dc16e0c00e6..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Annotation.php +++ /dev/null @@ -1,120 +0,0 @@ -google.cloud.visionai.v1.Annotation - */ -class Annotation extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the annotation. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * User provided annotation. - * - * Generated from protobuf field .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; - */ - protected $user_specified_annotation = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Resource name of the annotation. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` - * @type \Google\Cloud\VisionAI\V1\UserSpecifiedAnnotation $user_specified_annotation - * User provided annotation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the annotation. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource name of the annotation. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` - * - * 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; - } - - /** - * User provided annotation. - * - * Generated from protobuf field .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; - * @return \Google\Cloud\VisionAI\V1\UserSpecifiedAnnotation|null - */ - public function getUserSpecifiedAnnotation() - { - return $this->user_specified_annotation; - } - - public function hasUserSpecifiedAnnotation() - { - return isset($this->user_specified_annotation); - } - - public function clearUserSpecifiedAnnotation() - { - unset($this->user_specified_annotation); - } - - /** - * User provided annotation. - * - * Generated from protobuf field .google.cloud.visionai.v1.UserSpecifiedAnnotation user_specified_annotation = 2; - * @param \Google\Cloud\VisionAI\V1\UserSpecifiedAnnotation $var - * @return $this - */ - public function setUserSpecifiedAnnotation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\UserSpecifiedAnnotation::class); - $this->user_specified_annotation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationCustomizedStruct.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationCustomizedStruct.php deleted file mode 100644 index 2715fa950d8a..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationCustomizedStruct.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.AnnotationCustomizedStruct - */ -class AnnotationCustomizedStruct extends \Google\Protobuf\Internal\Message -{ - /** - * A map from elements' keys to element's annotation value. - * - * Generated from protobuf field map elements = 2; - */ - private $elements; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $elements - * A map from elements' keys to element's annotation value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * A map from elements' keys to element's annotation value. - * - * Generated from protobuf field map elements = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getElements() - { - return $this->elements; - } - - /** - * A map from elements' keys to element's annotation value. - * - * Generated from protobuf field map elements = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setElements($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AnnotationValue::class); - $this->elements = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationList.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationList.php deleted file mode 100644 index 6948dfe5da6d..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationList.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.AnnotationList - */ -class AnnotationList extends \Google\Protobuf\Internal\Message -{ - /** - * The values of `LIST` data type annotation. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AnnotationValue values = 1; - */ - private $values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\AnnotationValue[] $values - * The values of `LIST` data type annotation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The values of `LIST` data type annotation. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AnnotationValue values = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\AnnotationValue> - */ - public function getValues() - { - return $this->values; - } - - /** - * The values of `LIST` data type annotation. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AnnotationValue values = 1; - * @param \Google\Cloud\VisionAI\V1\AnnotationValue[] $var - * @return $this - */ - public function setValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AnnotationValue::class); - $this->values = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationMatchingResult.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationMatchingResult.php deleted file mode 100644 index 71dc52aebfb4..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationMatchingResult.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.visionai.v1.AnnotationMatchingResult - */ -class AnnotationMatchingResult extends \Google\Protobuf\Internal\Message -{ - /** - * The criteria used for matching. It can be an input search criteria or a - * criteria converted from a facet selection. - * - * Generated from protobuf field .google.cloud.visionai.v1.Criteria criteria = 1; - */ - protected $criteria = null; - /** - * Matched annotations for the criteria. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; - */ - private $matched_annotations; - /** - * Status of the match result. Possible values: - * FAILED_PRECONDITION - the criteria is not eligible for match. - * OK - matching is performed. - * - * Generated from protobuf field .google.rpc.Status status = 3; - */ - protected $status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Criteria $criteria - * The criteria used for matching. It can be an input search criteria or a - * criteria converted from a facet selection. - * @type \Google\Cloud\VisionAI\V1\Annotation[] $matched_annotations - * Matched annotations for the criteria. - * @type \Google\Rpc\Status $status - * Status of the match result. Possible values: - * FAILED_PRECONDITION - the criteria is not eligible for match. - * OK - matching is performed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The criteria used for matching. It can be an input search criteria or a - * criteria converted from a facet selection. - * - * Generated from protobuf field .google.cloud.visionai.v1.Criteria criteria = 1; - * @return \Google\Cloud\VisionAI\V1\Criteria|null - */ - public function getCriteria() - { - return $this->criteria; - } - - public function hasCriteria() - { - return isset($this->criteria); - } - - public function clearCriteria() - { - unset($this->criteria); - } - - /** - * The criteria used for matching. It can be an input search criteria or a - * criteria converted from a facet selection. - * - * Generated from protobuf field .google.cloud.visionai.v1.Criteria criteria = 1; - * @param \Google\Cloud\VisionAI\V1\Criteria $var - * @return $this - */ - public function setCriteria($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Criteria::class); - $this->criteria = $var; - - return $this; - } - - /** - * Matched annotations for the criteria. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Annotation> - */ - public function getMatchedAnnotations() - { - return $this->matched_annotations; - } - - /** - * Matched annotations for the criteria. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Annotation matched_annotations = 2; - * @param \Google\Cloud\VisionAI\V1\Annotation[] $var - * @return $this - */ - public function setMatchedAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Annotation::class); - $this->matched_annotations = $arr; - - return $this; - } - - /** - * Status of the match result. Possible values: - * FAILED_PRECONDITION - the criteria is not eligible for match. - * OK - matching is performed. - * - * Generated from protobuf field .google.rpc.Status status = 3; - * @return \Google\Rpc\Status|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * Status of the match result. Possible values: - * FAILED_PRECONDITION - the criteria is not eligible for match. - * OK - matching is performed. - * - * Generated from protobuf field .google.rpc.Status status = 3; - * @param \Google\Rpc\Status $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Rpc\Status::class); - $this->status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationValue.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationValue.php deleted file mode 100644 index f37f297d694f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AnnotationValue.php +++ /dev/null @@ -1,375 +0,0 @@ -google.cloud.visionai.v1.AnnotationValue - */ -class AnnotationValue extends \Google\Protobuf\Internal\Message -{ - protected $value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $int_value - * Value of int type annotation. - * @type float $float_value - * Value of float type annotation. - * @type string $str_value - * Value of string type annotation. - * @type string $datetime_value - * Value of date time type annotation. - * @type \Google\Cloud\VisionAI\V1\GeoCoordinate $geo_coordinate - * Value of geo coordinate type annotation. - * @type \Google\Protobuf\Any $proto_any_value - * Value of any proto value. - * @type bool $bool_value - * Value of boolean type annotation. - * @type \Google\Protobuf\Struct $customized_struct_data_value - * Value of customized struct annotation. This field does not have effects. - * Use customized_struct_value instead for customized struct annotation. - * @type \Google\Cloud\VisionAI\V1\AnnotationList $list_value - * Value of list type annotation. - * @type \Google\Cloud\VisionAI\V1\AnnotationCustomizedStruct $customized_struct_value - * Value of custom struct type annotation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Value of int type annotation. - * - * Generated from protobuf field int64 int_value = 1; - * @return int|string - */ - public function getIntValue() - { - return $this->readOneof(1); - } - - public function hasIntValue() - { - return $this->hasOneof(1); - } - - /** - * Value of int type annotation. - * - * Generated from protobuf field int64 int_value = 1; - * @param int|string $var - * @return $this - */ - public function setIntValue($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Value of float type annotation. - * - * Generated from protobuf field float float_value = 2; - * @return float - */ - public function getFloatValue() - { - return $this->readOneof(2); - } - - public function hasFloatValue() - { - return $this->hasOneof(2); - } - - /** - * Value of float type annotation. - * - * Generated from protobuf field float float_value = 2; - * @param float $var - * @return $this - */ - public function setFloatValue($var) - { - GPBUtil::checkFloat($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Value of string type annotation. - * - * Generated from protobuf field string str_value = 3; - * @return string - */ - public function getStrValue() - { - return $this->readOneof(3); - } - - public function hasStrValue() - { - return $this->hasOneof(3); - } - - /** - * Value of string type annotation. - * - * Generated from protobuf field string str_value = 3; - * @param string $var - * @return $this - */ - public function setStrValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Value of date time type annotation. - * - * Generated from protobuf field string datetime_value = 5; - * @return string - */ - public function getDatetimeValue() - { - return $this->readOneof(5); - } - - public function hasDatetimeValue() - { - return $this->hasOneof(5); - } - - /** - * Value of date time type annotation. - * - * Generated from protobuf field string datetime_value = 5; - * @param string $var - * @return $this - */ - public function setDatetimeValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Value of geo coordinate type annotation. - * - * Generated from protobuf field .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7; - * @return \Google\Cloud\VisionAI\V1\GeoCoordinate|null - */ - public function getGeoCoordinate() - { - return $this->readOneof(7); - } - - public function hasGeoCoordinate() - { - return $this->hasOneof(7); - } - - /** - * Value of geo coordinate type annotation. - * - * Generated from protobuf field .google.cloud.visionai.v1.GeoCoordinate geo_coordinate = 7; - * @param \Google\Cloud\VisionAI\V1\GeoCoordinate $var - * @return $this - */ - public function setGeoCoordinate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\GeoCoordinate::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Value of any proto value. - * - * Generated from protobuf field .google.protobuf.Any proto_any_value = 8; - * @return \Google\Protobuf\Any|null - */ - public function getProtoAnyValue() - { - return $this->readOneof(8); - } - - public function hasProtoAnyValue() - { - return $this->hasOneof(8); - } - - /** - * Value of any proto value. - * - * Generated from protobuf field .google.protobuf.Any proto_any_value = 8; - * @param \Google\Protobuf\Any $var - * @return $this - */ - public function setProtoAnyValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Any::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * Value of boolean type annotation. - * - * Generated from protobuf field bool bool_value = 9; - * @return bool - */ - public function getBoolValue() - { - return $this->readOneof(9); - } - - public function hasBoolValue() - { - return $this->hasOneof(9); - } - - /** - * Value of boolean type annotation. - * - * Generated from protobuf field bool bool_value = 9; - * @param bool $var - * @return $this - */ - public function setBoolValue($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Value of customized struct annotation. This field does not have effects. - * Use customized_struct_value instead for customized struct annotation. - * - * Generated from protobuf field .google.protobuf.Struct customized_struct_data_value = 10; - * @return \Google\Protobuf\Struct|null - */ - public function getCustomizedStructDataValue() - { - return $this->readOneof(10); - } - - public function hasCustomizedStructDataValue() - { - return $this->hasOneof(10); - } - - /** - * Value of customized struct annotation. This field does not have effects. - * Use customized_struct_value instead for customized struct annotation. - * - * Generated from protobuf field .google.protobuf.Struct customized_struct_data_value = 10; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setCustomizedStructDataValue($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Value of list type annotation. - * - * Generated from protobuf field .google.cloud.visionai.v1.AnnotationList list_value = 11; - * @return \Google\Cloud\VisionAI\V1\AnnotationList|null - */ - public function getListValue() - { - return $this->readOneof(11); - } - - public function hasListValue() - { - return $this->hasOneof(11); - } - - /** - * Value of list type annotation. - * - * Generated from protobuf field .google.cloud.visionai.v1.AnnotationList list_value = 11; - * @param \Google\Cloud\VisionAI\V1\AnnotationList $var - * @return $this - */ - public function setListValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AnnotationList::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Value of custom struct type annotation. - * - * Generated from protobuf field .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6; - * @return \Google\Cloud\VisionAI\V1\AnnotationCustomizedStruct|null - */ - public function getCustomizedStructValue() - { - return $this->readOneof(6); - } - - public function hasCustomizedStructValue() - { - return $this->hasOneof(6); - } - - /** - * Value of custom struct type annotation. - * - * Generated from protobuf field .google.cloud.visionai.v1.AnnotationCustomizedStruct customized_struct_value = 6; - * @param \Google\Cloud\VisionAI\V1\AnnotationCustomizedStruct $var - * @return $this - */ - public function setCustomizedStructValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AnnotationCustomizedStruct::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getValue() - { - return $this->whichOneof("value"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionRequest.php deleted file mode 100644 index 811c6ee8e423..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionRequest.php +++ /dev/null @@ -1,118 +0,0 @@ -google.cloud.visionai.v1.AppPlatformCloudFunctionRequest - */ -class AppPlatformCloudFunctionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The metadata of the AppPlatform for customer to identify the source of the - * payload. - * - * Generated from protobuf field .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; - */ - protected $app_platform_metadata = null; - /** - * The actual annotations to be processed by the customized Cloud Function. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; - */ - private $annotations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\AppPlatformMetadata $app_platform_metadata - * The metadata of the AppPlatform for customer to identify the source of the - * payload. - * @type \Google\Cloud\VisionAI\V1\AppPlatformCloudFunctionRequest\StructedInputAnnotation[] $annotations - * The actual annotations to be processed by the customized Cloud Function. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * The metadata of the AppPlatform for customer to identify the source of the - * payload. - * - * Generated from protobuf field .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; - * @return \Google\Cloud\VisionAI\V1\AppPlatformMetadata|null - */ - public function getAppPlatformMetadata() - { - return $this->app_platform_metadata; - } - - public function hasAppPlatformMetadata() - { - return isset($this->app_platform_metadata); - } - - public function clearAppPlatformMetadata() - { - unset($this->app_platform_metadata); - } - - /** - * The metadata of the AppPlatform for customer to identify the source of the - * payload. - * - * Generated from protobuf field .google.cloud.visionai.v1.AppPlatformMetadata app_platform_metadata = 1; - * @param \Google\Cloud\VisionAI\V1\AppPlatformMetadata $var - * @return $this - */ - public function setAppPlatformMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AppPlatformMetadata::class); - $this->app_platform_metadata = $var; - - return $this; - } - - /** - * The actual annotations to be processed by the customized Cloud Function. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\AppPlatformCloudFunctionRequest\StructedInputAnnotation> - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * The actual annotations to be processed by the customized Cloud Function. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation annotations = 2; - * @param \Google\Cloud\VisionAI\V1\AppPlatformCloudFunctionRequest\StructedInputAnnotation[] $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AppPlatformCloudFunctionRequest\StructedInputAnnotation::class); - $this->annotations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionRequest/StructedInputAnnotation.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionRequest/StructedInputAnnotation.php deleted file mode 100644 index 6ea53794ec49..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionRequest/StructedInputAnnotation.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.visionai.v1.AppPlatformCloudFunctionRequest.StructedInputAnnotation - */ -class StructedInputAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * The ingestion time of the current annotation. - * - * Generated from protobuf field int64 ingestion_time_micros = 1; - */ - protected $ingestion_time_micros = 0; - /** - * The struct format of the actual annotation. - * - * Generated from protobuf field .google.protobuf.Struct annotation = 2; - */ - protected $annotation = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $ingestion_time_micros - * The ingestion time of the current annotation. - * @type \Google\Protobuf\Struct $annotation - * The struct format of the actual annotation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * The ingestion time of the current annotation. - * - * Generated from protobuf field int64 ingestion_time_micros = 1; - * @return int|string - */ - public function getIngestionTimeMicros() - { - return $this->ingestion_time_micros; - } - - /** - * The ingestion time of the current annotation. - * - * Generated from protobuf field int64 ingestion_time_micros = 1; - * @param int|string $var - * @return $this - */ - public function setIngestionTimeMicros($var) - { - GPBUtil::checkInt64($var); - $this->ingestion_time_micros = $var; - - return $this; - } - - /** - * The struct format of the actual annotation. - * - * Generated from protobuf field .google.protobuf.Struct annotation = 2; - * @return \Google\Protobuf\Struct|null - */ - public function getAnnotation() - { - return $this->annotation; - } - - public function hasAnnotation() - { - return isset($this->annotation); - } - - public function clearAnnotation() - { - unset($this->annotation); - } - - /** - * The struct format of the actual annotation. - * - * Generated from protobuf field .google.protobuf.Struct annotation = 2; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setAnnotation($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->annotation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionResponse.php deleted file mode 100644 index 708fa510121f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionResponse.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.visionai.v1.AppPlatformCloudFunctionResponse - */ -class AppPlatformCloudFunctionResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The modified annotations that is returned back to AppPlatform. - * If the annotations fields are empty, then those annotations will be dropped - * by AppPlatform. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; - */ - private $annotations; - /** - * If set to true, AppPlatform will use original annotations instead of - * dropping them, even if it is empty in the annotations filed. - * - * Generated from protobuf field bool annotation_passthrough = 3; - */ - protected $annotation_passthrough = false; - /** - * The event notifications that is returned back to AppPlatform. Typically it - * will then be configured to be consumed/forwared to a operator that handles - * events, such as Pub/Sub operator. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; - */ - private $events; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\AppPlatformCloudFunctionResponse\StructedOutputAnnotation[] $annotations - * The modified annotations that is returned back to AppPlatform. - * If the annotations fields are empty, then those annotations will be dropped - * by AppPlatform. - * @type bool $annotation_passthrough - * If set to true, AppPlatform will use original annotations instead of - * dropping them, even if it is empty in the annotations filed. - * @type \Google\Cloud\VisionAI\V1\AppPlatformEventBody[] $events - * The event notifications that is returned back to AppPlatform. Typically it - * will then be configured to be consumed/forwared to a operator that handles - * events, such as Pub/Sub operator. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * The modified annotations that is returned back to AppPlatform. - * If the annotations fields are empty, then those annotations will be dropped - * by AppPlatform. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\AppPlatformCloudFunctionResponse\StructedOutputAnnotation> - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * The modified annotations that is returned back to AppPlatform. - * If the annotations fields are empty, then those annotations will be dropped - * by AppPlatform. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation annotations = 2; - * @param \Google\Cloud\VisionAI\V1\AppPlatformCloudFunctionResponse\StructedOutputAnnotation[] $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AppPlatformCloudFunctionResponse\StructedOutputAnnotation::class); - $this->annotations = $arr; - - return $this; - } - - /** - * If set to true, AppPlatform will use original annotations instead of - * dropping them, even if it is empty in the annotations filed. - * - * Generated from protobuf field bool annotation_passthrough = 3; - * @return bool - */ - public function getAnnotationPassthrough() - { - return $this->annotation_passthrough; - } - - /** - * If set to true, AppPlatform will use original annotations instead of - * dropping them, even if it is empty in the annotations filed. - * - * Generated from protobuf field bool annotation_passthrough = 3; - * @param bool $var - * @return $this - */ - public function setAnnotationPassthrough($var) - { - GPBUtil::checkBool($var); - $this->annotation_passthrough = $var; - - return $this; - } - - /** - * The event notifications that is returned back to AppPlatform. Typically it - * will then be configured to be consumed/forwared to a operator that handles - * events, such as Pub/Sub operator. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\AppPlatformEventBody> - */ - public function getEvents() - { - return $this->events; - } - - /** - * The event notifications that is returned back to AppPlatform. Typically it - * will then be configured to be consumed/forwared to a operator that handles - * events, such as Pub/Sub operator. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AppPlatformEventBody events = 4; - * @param \Google\Cloud\VisionAI\V1\AppPlatformEventBody[] $var - * @return $this - */ - public function setEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AppPlatformEventBody::class); - $this->events = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionResponse/StructedOutputAnnotation.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionResponse/StructedOutputAnnotation.php deleted file mode 100644 index b5a253b17c1e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformCloudFunctionResponse/StructedOutputAnnotation.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.visionai.v1.AppPlatformCloudFunctionResponse.StructedOutputAnnotation - */ -class StructedOutputAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * The struct format of the actual annotation. - * - * Generated from protobuf field .google.protobuf.Struct annotation = 1; - */ - protected $annotation = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Struct $annotation - * The struct format of the actual annotation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * The struct format of the actual annotation. - * - * Generated from protobuf field .google.protobuf.Struct annotation = 1; - * @return \Google\Protobuf\Struct|null - */ - public function getAnnotation() - { - return $this->annotation; - } - - public function hasAnnotation() - { - return isset($this->annotation); - } - - public function clearAnnotation() - { - unset($this->annotation); - } - - /** - * The struct format of the actual annotation. - * - * Generated from protobuf field .google.protobuf.Struct annotation = 1; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setAnnotation($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->annotation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformEventBody.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformEventBody.php deleted file mode 100644 index 0af6c3690231..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformEventBody.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.visionai.v1.AppPlatformEventBody - */ -class AppPlatformEventBody extends \Google\Protobuf\Internal\Message -{ - /** - * Human readable string of the event like "There are more than 6 people in - * the scene". or "Shelf is empty!". - * - * Generated from protobuf field string event_message = 1; - */ - protected $event_message = ''; - /** - * For the case of Pub/Sub, it will be stored in the message attributes. - * ​​pubsub.proto - * - * Generated from protobuf field .google.protobuf.Struct payload = 2; - */ - protected $payload = null; - /** - * User defined Event Id, used to classify event, within a delivery interval, - * events from the same application instance with the same id will be - * de-duplicated & only first one will be sent out. Empty event_id will be - * treated as "". - * - * Generated from protobuf field string event_id = 3; - */ - protected $event_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $event_message - * Human readable string of the event like "There are more than 6 people in - * the scene". or "Shelf is empty!". - * @type \Google\Protobuf\Struct $payload - * For the case of Pub/Sub, it will be stored in the message attributes. - * ​​pubsub.proto - * @type string $event_id - * User defined Event Id, used to classify event, within a delivery interval, - * events from the same application instance with the same id will be - * de-duplicated & only first one will be sent out. Empty event_id will be - * treated as "". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * Human readable string of the event like "There are more than 6 people in - * the scene". or "Shelf is empty!". - * - * Generated from protobuf field string event_message = 1; - * @return string - */ - public function getEventMessage() - { - return $this->event_message; - } - - /** - * Human readable string of the event like "There are more than 6 people in - * the scene". or "Shelf is empty!". - * - * Generated from protobuf field string event_message = 1; - * @param string $var - * @return $this - */ - public function setEventMessage($var) - { - GPBUtil::checkString($var, True); - $this->event_message = $var; - - return $this; - } - - /** - * For the case of Pub/Sub, it will be stored in the message attributes. - * ​​pubsub.proto - * - * Generated from protobuf field .google.protobuf.Struct payload = 2; - * @return \Google\Protobuf\Struct|null - */ - public function getPayload() - { - return $this->payload; - } - - public function hasPayload() - { - return isset($this->payload); - } - - public function clearPayload() - { - unset($this->payload); - } - - /** - * For the case of Pub/Sub, it will be stored in the message attributes. - * ​​pubsub.proto - * - * Generated from protobuf field .google.protobuf.Struct payload = 2; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setPayload($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->payload = $var; - - return $this; - } - - /** - * User defined Event Id, used to classify event, within a delivery interval, - * events from the same application instance with the same id will be - * de-duplicated & only first one will be sent out. Empty event_id will be - * treated as "". - * - * Generated from protobuf field string event_id = 3; - * @return string - */ - public function getEventId() - { - return $this->event_id; - } - - /** - * User defined Event Id, used to classify event, within a delivery interval, - * events from the same application instance with the same id will be - * de-duplicated & only first one will be sent out. Empty event_id will be - * treated as "". - * - * Generated from protobuf field string event_id = 3; - * @param string $var - * @return $this - */ - public function setEventId($var) - { - GPBUtil::checkString($var, True); - $this->event_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformMetadata.php deleted file mode 100644 index 6443fea5a72c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AppPlatformMetadata.php +++ /dev/null @@ -1,175 +0,0 @@ -google.cloud.visionai.v1.AppPlatformMetadata - */ -class AppPlatformMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The application resource name. - * - * Generated from protobuf field string application = 1; - */ - protected $application = ''; - /** - * The instance resource id. Instance is the nested resource of application - * under collection 'instances'. - * - * Generated from protobuf field string instance_id = 2; - */ - protected $instance_id = ''; - /** - * The node name of the application graph. - * - * Generated from protobuf field string node = 3; - */ - protected $node = ''; - /** - * The referred processor resource name of the application node. - * - * Generated from protobuf field string processor = 4; - */ - protected $processor = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $application - * The application resource name. - * @type string $instance_id - * The instance resource id. Instance is the nested resource of application - * under collection 'instances'. - * @type string $node - * The node name of the application graph. - * @type string $processor - * The referred processor resource name of the application node. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * The application resource name. - * - * Generated from protobuf field string application = 1; - * @return string - */ - public function getApplication() - { - return $this->application; - } - - /** - * The application resource name. - * - * Generated from protobuf field string application = 1; - * @param string $var - * @return $this - */ - public function setApplication($var) - { - GPBUtil::checkString($var, True); - $this->application = $var; - - return $this; - } - - /** - * The instance resource id. Instance is the nested resource of application - * under collection 'instances'. - * - * Generated from protobuf field string instance_id = 2; - * @return string - */ - public function getInstanceId() - { - return $this->instance_id; - } - - /** - * The instance resource id. Instance is the nested resource of application - * under collection 'instances'. - * - * Generated from protobuf field string instance_id = 2; - * @param string $var - * @return $this - */ - public function setInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->instance_id = $var; - - return $this; - } - - /** - * The node name of the application graph. - * - * Generated from protobuf field string node = 3; - * @return string - */ - public function getNode() - { - return $this->node; - } - - /** - * The node name of the application graph. - * - * Generated from protobuf field string node = 3; - * @param string $var - * @return $this - */ - public function setNode($var) - { - GPBUtil::checkString($var, True); - $this->node = $var; - - return $this; - } - - /** - * The referred processor resource name of the application node. - * - * Generated from protobuf field string processor = 4; - * @return string - */ - public function getProcessor() - { - return $this->processor; - } - - /** - * The referred processor resource name of the application node. - * - * Generated from protobuf field string processor = 4; - * @param string $var - * @return $this - */ - public function setProcessor($var) - { - GPBUtil::checkString($var, True); - $this->processor = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application.php deleted file mode 100644 index ad17c8e462b4..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application.php +++ /dev/null @@ -1,417 +0,0 @@ -google.cloud.visionai.v1.Application - */ -class Application extends \Google\Protobuf\Internal\Message -{ - /** - * name of resource - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. [Output only] Create timestamp - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. [Output only] Update timestamp - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Required. A user friendly display name for the solution. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * A description for this application. - * - * Generated from protobuf field string description = 6; - */ - protected $description = ''; - /** - * Application graph configuration. - * - * Generated from protobuf field .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; - */ - protected $application_configs = null; - /** - * Output only. Application graph runtime info. Only exists when application - * state equals to DEPLOYED. - * - * Generated from protobuf field .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $runtime_info = null; - /** - * Output only. State of the application. - * - * Generated from protobuf field .google.cloud.visionai.v1.Application.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Billing mode of the application. - * - * Generated from protobuf field .google.cloud.visionai.v1.Application.BillingMode billing_mode = 12; - */ - protected $billing_mode = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * name of resource - * @type \Google\Protobuf\Timestamp $create_time - * Output only. [Output only] Create timestamp - * @type \Google\Protobuf\Timestamp $update_time - * Output only. [Output only] Update timestamp - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs - * @type string $display_name - * Required. A user friendly display name for the solution. - * @type string $description - * A description for this application. - * @type \Google\Cloud\VisionAI\V1\ApplicationConfigs $application_configs - * Application graph configuration. - * @type \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo $runtime_info - * Output only. Application graph runtime info. Only exists when application - * state equals to DEPLOYED. - * @type int $state - * Output only. State of the application. - * @type int $billing_mode - * Billing mode of the application. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * name of resource - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * name of resource - * - * 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. [Output only] Create timestamp - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. [Output only] Create timestamp - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. [Output only] Update timestamp - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. [Output only] Update timestamp - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. A user friendly display name for the solution. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. A user friendly display name for the solution. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * A description for this application. - * - * Generated from protobuf field string description = 6; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A description for this application. - * - * Generated from protobuf field string description = 6; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Application graph configuration. - * - * Generated from protobuf field .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; - * @return \Google\Cloud\VisionAI\V1\ApplicationConfigs|null - */ - public function getApplicationConfigs() - { - return $this->application_configs; - } - - public function hasApplicationConfigs() - { - return isset($this->application_configs); - } - - public function clearApplicationConfigs() - { - unset($this->application_configs); - } - - /** - * Application graph configuration. - * - * Generated from protobuf field .google.cloud.visionai.v1.ApplicationConfigs application_configs = 7; - * @param \Google\Cloud\VisionAI\V1\ApplicationConfigs $var - * @return $this - */ - public function setApplicationConfigs($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ApplicationConfigs::class); - $this->application_configs = $var; - - return $this; - } - - /** - * Output only. Application graph runtime info. Only exists when application - * state equals to DEPLOYED. - * - * Generated from protobuf field .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo|null - */ - public function getRuntimeInfo() - { - return $this->runtime_info; - } - - public function hasRuntimeInfo() - { - return isset($this->runtime_info); - } - - public function clearRuntimeInfo() - { - unset($this->runtime_info); - } - - /** - * Output only. Application graph runtime info. Only exists when application - * state equals to DEPLOYED. - * - * Generated from protobuf field .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo runtime_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo $var - * @return $this - */ - public function setRuntimeInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo::class); - $this->runtime_info = $var; - - return $this; - } - - /** - * Output only. State of the application. - * - * Generated from protobuf field .google.cloud.visionai.v1.Application.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the application. - * - * Generated from protobuf field .google.cloud.visionai.v1.Application.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Application\State::class); - $this->state = $var; - - return $this; - } - - /** - * Billing mode of the application. - * - * Generated from protobuf field .google.cloud.visionai.v1.Application.BillingMode billing_mode = 12; - * @return int - */ - public function getBillingMode() - { - return $this->billing_mode; - } - - /** - * Billing mode of the application. - * - * Generated from protobuf field .google.cloud.visionai.v1.Application.BillingMode billing_mode = 12; - * @param int $var - * @return $this - */ - public function setBillingMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Application\BillingMode::class); - $this->billing_mode = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo.php deleted file mode 100644 index c17707846f72..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.visionai.v1.Application.ApplicationRuntimeInfo - */ -class ApplicationRuntimeInfo extends \Google\Protobuf\Internal\Message -{ - /** - * Timestamp when the engine be deployed - * - * Generated from protobuf field .google.protobuf.Timestamp deploy_time = 1; - */ - protected $deploy_time = null; - /** - * Globally created resources like warehouse dataschemas. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; - */ - private $global_output_resources; - /** - * Monitoring-related configuration for this application. - * - * Generated from protobuf field .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; - */ - protected $monitoring_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $deploy_time - * Timestamp when the engine be deployed - * @type \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo\GlobalOutputResource[] $global_output_resources - * Globally created resources like warehouse dataschemas. - * @type \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo\MonitoringConfig $monitoring_config - * Monitoring-related configuration for this application. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Timestamp when the engine be deployed - * - * Generated from protobuf field .google.protobuf.Timestamp deploy_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeployTime() - { - return $this->deploy_time; - } - - public function hasDeployTime() - { - return isset($this->deploy_time); - } - - public function clearDeployTime() - { - unset($this->deploy_time); - } - - /** - * Timestamp when the engine be deployed - * - * Generated from protobuf field .google.protobuf.Timestamp deploy_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeployTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->deploy_time = $var; - - return $this; - } - - /** - * Globally created resources like warehouse dataschemas. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo\GlobalOutputResource> - */ - public function getGlobalOutputResources() - { - return $this->global_output_resources; - } - - /** - * Globally created resources like warehouse dataschemas. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource global_output_resources = 3; - * @param \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo\GlobalOutputResource[] $var - * @return $this - */ - public function setGlobalOutputResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo\GlobalOutputResource::class); - $this->global_output_resources = $arr; - - return $this; - } - - /** - * Monitoring-related configuration for this application. - * - * Generated from protobuf field .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; - * @return \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo\MonitoringConfig|null - */ - public function getMonitoringConfig() - { - return $this->monitoring_config; - } - - public function hasMonitoringConfig() - { - return isset($this->monitoring_config); - } - - public function clearMonitoringConfig() - { - unset($this->monitoring_config); - } - - /** - * Monitoring-related configuration for this application. - * - * Generated from protobuf field .google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig monitoring_config = 4; - * @param \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo\MonitoringConfig $var - * @return $this - */ - public function setMonitoringConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Application\ApplicationRuntimeInfo\MonitoringConfig::class); - $this->monitoring_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo/GlobalOutputResource.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo/GlobalOutputResource.php deleted file mode 100644 index 2b661d1dc809..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo/GlobalOutputResource.php +++ /dev/null @@ -1,159 +0,0 @@ -google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.GlobalOutputResource - */ -class GlobalOutputResource extends \Google\Protobuf\Internal\Message -{ - /** - * The full resource name of the outputted resources. - * - * Generated from protobuf field string output_resource = 1; - */ - protected $output_resource = ''; - /** - * The name of graph node who produces the output resource name. - * For example: - * output_resource: - * /projects/123/locations/us-central1/corpora/my-corpus/dataSchemas/my-schema - * producer_node: occupancy-count - * - * Generated from protobuf field string producer_node = 2; - */ - protected $producer_node = ''; - /** - * The key of the output resource, it has to be unique within the same - * producer node. One producer node can output several output resources, - * the key can be used to match corresponding output resources. - * - * Generated from protobuf field string key = 3; - */ - protected $key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $output_resource - * The full resource name of the outputted resources. - * @type string $producer_node - * The name of graph node who produces the output resource name. - * For example: - * output_resource: - * /projects/123/locations/us-central1/corpora/my-corpus/dataSchemas/my-schema - * producer_node: occupancy-count - * @type string $key - * The key of the output resource, it has to be unique within the same - * producer node. One producer node can output several output resources, - * the key can be used to match corresponding output resources. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * The full resource name of the outputted resources. - * - * Generated from protobuf field string output_resource = 1; - * @return string - */ - public function getOutputResource() - { - return $this->output_resource; - } - - /** - * The full resource name of the outputted resources. - * - * Generated from protobuf field string output_resource = 1; - * @param string $var - * @return $this - */ - public function setOutputResource($var) - { - GPBUtil::checkString($var, True); - $this->output_resource = $var; - - return $this; - } - - /** - * The name of graph node who produces the output resource name. - * For example: - * output_resource: - * /projects/123/locations/us-central1/corpora/my-corpus/dataSchemas/my-schema - * producer_node: occupancy-count - * - * Generated from protobuf field string producer_node = 2; - * @return string - */ - public function getProducerNode() - { - return $this->producer_node; - } - - /** - * The name of graph node who produces the output resource name. - * For example: - * output_resource: - * /projects/123/locations/us-central1/corpora/my-corpus/dataSchemas/my-schema - * producer_node: occupancy-count - * - * Generated from protobuf field string producer_node = 2; - * @param string $var - * @return $this - */ - public function setProducerNode($var) - { - GPBUtil::checkString($var, True); - $this->producer_node = $var; - - return $this; - } - - /** - * The key of the output resource, it has to be unique within the same - * producer node. One producer node can output several output resources, - * the key can be used to match corresponding output resources. - * - * Generated from protobuf field string key = 3; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * The key of the output resource, it has to be unique within the same - * producer node. One producer node can output several output resources, - * the key can be used to match corresponding output resources. - * - * Generated from protobuf field string key = 3; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo/MonitoringConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo/MonitoringConfig.php deleted file mode 100644 index 908b01893eac..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/ApplicationRuntimeInfo/MonitoringConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.Application.ApplicationRuntimeInfo.MonitoringConfig - */ -class MonitoringConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Whether this application has monitoring enabled. - * - * Generated from protobuf field bool enabled = 1; - */ - protected $enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enabled - * Whether this application has monitoring enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Whether this application has monitoring enabled. - * - * Generated from protobuf field bool enabled = 1; - * @return bool - */ - public function getEnabled() - { - return $this->enabled; - } - - /** - * Whether this application has monitoring enabled. - * - * Generated from protobuf field bool enabled = 1; - * @param bool $var - * @return $this - */ - public function setEnabled($var) - { - GPBUtil::checkBool($var); - $this->enabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/BillingMode.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/BillingMode.php deleted file mode 100644 index 6955a560a80f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/BillingMode.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.visionai.v1.Application.BillingMode - */ -class BillingMode -{ - /** - * The default value. - * - * Generated from protobuf enum BILLING_MODE_UNSPECIFIED = 0; - */ - const BILLING_MODE_UNSPECIFIED = 0; - /** - * Pay as you go billing mode. - * - * Generated from protobuf enum PAYG = 1; - */ - const PAYG = 1; - /** - * Monthly billing mode. - * - * Generated from protobuf enum MONTHLY = 2; - */ - const MONTHLY = 2; - - private static $valueToName = [ - self::BILLING_MODE_UNSPECIFIED => 'BILLING_MODE_UNSPECIFIED', - self::PAYG => 'PAYG', - self::MONTHLY => 'MONTHLY', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/State.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/State.php deleted file mode 100644 index 137b8cd5064a..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Application/State.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.visionai.v1.Application.State - */ -class State -{ - /** - * The default value. This value is used if the state is omitted. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * State CREATED. - * - * Generated from protobuf enum CREATED = 1; - */ - const CREATED = 1; - /** - * State DEPLOYING. - * - * Generated from protobuf enum DEPLOYING = 2; - */ - const DEPLOYING = 2; - /** - * State DEPLOYED. - * - * Generated from protobuf enum DEPLOYED = 3; - */ - const DEPLOYED = 3; - /** - * State UNDEPLOYING. - * - * Generated from protobuf enum UNDEPLOYING = 4; - */ - const UNDEPLOYING = 4; - /** - * State DELETED. - * - * Generated from protobuf enum DELETED = 5; - */ - const DELETED = 5; - /** - * State ERROR. - * - * Generated from protobuf enum ERROR = 6; - */ - const ERROR = 6; - /** - * State CREATING. - * - * Generated from protobuf enum CREATING = 7; - */ - const CREATING = 7; - /** - * State Updating. - * - * Generated from protobuf enum UPDATING = 8; - */ - const UPDATING = 8; - /** - * State Deleting. - * - * Generated from protobuf enum DELETING = 9; - */ - const DELETING = 9; - /** - * State Fixing. - * - * Generated from protobuf enum FIXING = 10; - */ - const FIXING = 10; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATED => 'CREATED', - self::DEPLOYING => 'DEPLOYING', - self::DEPLOYED => 'DEPLOYED', - self::UNDEPLOYING => 'UNDEPLOYING', - self::DELETED => 'DELETED', - self::ERROR => 'ERROR', - self::CREATING => 'CREATING', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - self::FIXING => 'FIXING', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationConfigs.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationConfigs.php deleted file mode 100644 index 1e1abc340163..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationConfigs.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.visionai.v1.ApplicationConfigs - */ -class ApplicationConfigs extends \Google\Protobuf\Internal\Message -{ - /** - * A list of nodes in the application graph. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Node nodes = 1; - */ - private $nodes; - /** - * Event-related configuration for this application. - * - * Generated from protobuf field .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; - */ - protected $event_delivery_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Node[] $nodes - * A list of nodes in the application graph. - * @type \Google\Cloud\VisionAI\V1\ApplicationConfigs\EventDeliveryConfig $event_delivery_config - * Event-related configuration for this application. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * A list of nodes in the application graph. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Node nodes = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Node> - */ - public function getNodes() - { - return $this->nodes; - } - - /** - * A list of nodes in the application graph. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Node nodes = 1; - * @param \Google\Cloud\VisionAI\V1\Node[] $var - * @return $this - */ - public function setNodes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Node::class); - $this->nodes = $arr; - - return $this; - } - - /** - * Event-related configuration for this application. - * - * Generated from protobuf field .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; - * @return \Google\Cloud\VisionAI\V1\ApplicationConfigs\EventDeliveryConfig|null - */ - public function getEventDeliveryConfig() - { - return $this->event_delivery_config; - } - - public function hasEventDeliveryConfig() - { - return isset($this->event_delivery_config); - } - - public function clearEventDeliveryConfig() - { - unset($this->event_delivery_config); - } - - /** - * Event-related configuration for this application. - * - * Generated from protobuf field .google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig event_delivery_config = 3; - * @param \Google\Cloud\VisionAI\V1\ApplicationConfigs\EventDeliveryConfig $var - * @return $this - */ - public function setEventDeliveryConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ApplicationConfigs\EventDeliveryConfig::class); - $this->event_delivery_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationConfigs/EventDeliveryConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationConfigs/EventDeliveryConfig.php deleted file mode 100644 index 019a71704b1a..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationConfigs/EventDeliveryConfig.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.visionai.v1.ApplicationConfigs.EventDeliveryConfig - */ -class EventDeliveryConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The delivery channel for the event notification, only pub/sub topic is - * supported now. - * Example channel: - * [//pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic] - * - * Generated from protobuf field string channel = 1; - */ - protected $channel = ''; - /** - * The expected delivery interval for the same event. The same event won't - * be notified multiple times during this internal event that it is - * happening multiple times during the period of time.The same event is - * identified by . - * - * Generated from protobuf field .google.protobuf.Duration minimal_delivery_interval = 2; - */ - protected $minimal_delivery_interval = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $channel - * The delivery channel for the event notification, only pub/sub topic is - * supported now. - * Example channel: - * [//pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic] - * @type \Google\Protobuf\Duration $minimal_delivery_interval - * The expected delivery interval for the same event. The same event won't - * be notified multiple times during this internal event that it is - * happening multiple times during the period of time.The same event is - * identified by . - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * The delivery channel for the event notification, only pub/sub topic is - * supported now. - * Example channel: - * [//pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic] - * - * Generated from protobuf field string channel = 1; - * @return string - */ - public function getChannel() - { - return $this->channel; - } - - /** - * The delivery channel for the event notification, only pub/sub topic is - * supported now. - * Example channel: - * [//pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic] - * - * Generated from protobuf field string channel = 1; - * @param string $var - * @return $this - */ - public function setChannel($var) - { - GPBUtil::checkString($var, True); - $this->channel = $var; - - return $this; - } - - /** - * The expected delivery interval for the same event. The same event won't - * be notified multiple times during this internal event that it is - * happening multiple times during the period of time.The same event is - * identified by . - * - * Generated from protobuf field .google.protobuf.Duration minimal_delivery_interval = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getMinimalDeliveryInterval() - { - return $this->minimal_delivery_interval; - } - - public function hasMinimalDeliveryInterval() - { - return isset($this->minimal_delivery_interval); - } - - public function clearMinimalDeliveryInterval() - { - unset($this->minimal_delivery_interval); - } - - /** - * The expected delivery interval for the same event. The same event won't - * be notified multiple times during this internal event that it is - * happening multiple times during the period of time.The same event is - * identified by . - * - * Generated from protobuf field .google.protobuf.Duration minimal_delivery_interval = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setMinimalDeliveryInterval($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->minimal_delivery_interval = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationInstance.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationInstance.php deleted file mode 100644 index 9662ccf00eca..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationInstance.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.visionai.v1.ApplicationInstance - */ -class ApplicationInstance extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string instance_id = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance_id = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $instance_id - * Required. Id of the requesting object. - * @type \Google\Cloud\VisionAI\V1\Instance $instance - * Required. The resource being created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string instance_id = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInstanceId() - { - return $this->instance_id; - } - - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string instance_id = 1 [(.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 resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Instance::class); - $this->instance = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationNodeAnnotation.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationNodeAnnotation.php deleted file mode 100644 index d9e87e7c59f7..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationNodeAnnotation.php +++ /dev/null @@ -1,102 +0,0 @@ -google.cloud.visionai.v1.ApplicationNodeAnnotation - */ -class ApplicationNodeAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * The node name of the application graph. - * - * Generated from protobuf field string node = 1; - */ - protected $node = ''; - /** - * The node specific stream annotations. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; - */ - private $annotations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $node - * The node name of the application graph. - * @type \Google\Cloud\VisionAI\V1\StreamAnnotation[] $annotations - * The node specific stream annotations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * The node name of the application graph. - * - * Generated from protobuf field string node = 1; - * @return string - */ - public function getNode() - { - return $this->node; - } - - /** - * The node name of the application graph. - * - * Generated from protobuf field string node = 1; - * @param string $var - * @return $this - */ - public function setNode($var) - { - GPBUtil::checkString($var, True); - $this->node = $var; - - return $this; - } - - /** - * The node specific stream annotations. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\StreamAnnotation> - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * The node specific stream annotations. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; - * @param \Google\Cloud\VisionAI\V1\StreamAnnotation[] $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\StreamAnnotation::class); - $this->annotations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationStreamInput.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationStreamInput.php deleted file mode 100644 index 4488f0565444..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ApplicationStreamInput.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.visionai.v1.ApplicationStreamInput - */ -class ApplicationStreamInput extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; - */ - protected $stream_with_annotation = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\StreamWithAnnotation $stream_with_annotation - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; - * @return \Google\Cloud\VisionAI\V1\StreamWithAnnotation|null - */ - public function getStreamWithAnnotation() - { - return $this->stream_with_annotation; - } - - public function hasStreamWithAnnotation() - { - return isset($this->stream_with_annotation); - } - - public function clearStreamWithAnnotation() - { - unset($this->stream_with_annotation); - } - - /** - * Generated from protobuf field .google.cloud.visionai.v1.StreamWithAnnotation stream_with_annotation = 1; - * @param \Google\Cloud\VisionAI\V1\StreamWithAnnotation $var - * @return $this - */ - public function setStreamWithAnnotation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\StreamWithAnnotation::class); - $this->stream_with_annotation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Asset.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Asset.php deleted file mode 100644 index c633444e6803..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Asset.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.visionai.v1.Asset - */ -class Asset extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the asset. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The duration for which all media assets, associated metadata, and search - * documents can exist. If not set, then it will using the default ttl in the - * parent corpus resource. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 2; - */ - protected $ttl = null; - /** - * Output only. The original cloud storage source uri that is associated with - * this asset. - * - * Generated from protobuf field .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $asset_gcs_source = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Resource name of the asset. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * @type \Google\Protobuf\Duration $ttl - * The duration for which all media assets, associated metadata, and search - * documents can exist. If not set, then it will using the default ttl in the - * parent corpus resource. - * @type \Google\Cloud\VisionAI\V1\AssetSource\AssetGcsSource $asset_gcs_source - * Output only. The original cloud storage source uri that is associated with - * this asset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the asset. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource name of the asset. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * 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 duration for which all media assets, associated metadata, and search - * documents can exist. If not set, then it will using the default ttl in the - * parent corpus resource. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 2; - * @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 duration for which all media assets, associated metadata, and search - * documents can exist. If not set, then it will using the default ttl in the - * parent corpus resource. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->ttl = $var; - - return $this; - } - - /** - * Output only. The original cloud storage source uri that is associated with - * this asset. - * - * Generated from protobuf field .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VisionAI\V1\AssetSource\AssetGcsSource|null - */ - public function getAssetGcsSource() - { - return $this->asset_gcs_source; - } - - public function hasAssetGcsSource() - { - return isset($this->asset_gcs_source); - } - - public function clearAssetGcsSource() - { - unset($this->asset_gcs_source); - } - - /** - * Output only. The original cloud storage source uri that is associated with - * this asset. - * - * Generated from protobuf field .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VisionAI\V1\AssetSource\AssetGcsSource $var - * @return $this - */ - public function setAssetGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AssetSource\AssetGcsSource::class); - $this->asset_gcs_source = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource.php deleted file mode 100644 index ead441f9b1fe..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.visionai.v1.AssetSource - */ -class AssetSource extends \Google\Protobuf\Internal\Message -{ - protected $source_form; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\AssetSource\AssetGcsSource $asset_gcs_source - * The source of the asset is from Cloud Storage. - * @type \Google\Cloud\VisionAI\V1\AssetSource\AssetContentData $asset_content_data - * The source of the asset is from content bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The source of the asset is from Cloud Storage. - * - * Generated from protobuf field .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 1; - * @return \Google\Cloud\VisionAI\V1\AssetSource\AssetGcsSource|null - */ - public function getAssetGcsSource() - { - return $this->readOneof(1); - } - - public function hasAssetGcsSource() - { - return $this->hasOneof(1); - } - - /** - * The source of the asset is from Cloud Storage. - * - * Generated from protobuf field .google.cloud.visionai.v1.AssetSource.AssetGcsSource asset_gcs_source = 1; - * @param \Google\Cloud\VisionAI\V1\AssetSource\AssetGcsSource $var - * @return $this - */ - public function setAssetGcsSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AssetSource\AssetGcsSource::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The source of the asset is from content bytes. - * - * Generated from protobuf field .google.cloud.visionai.v1.AssetSource.AssetContentData asset_content_data = 2; - * @return \Google\Cloud\VisionAI\V1\AssetSource\AssetContentData|null - */ - public function getAssetContentData() - { - return $this->readOneof(2); - } - - public function hasAssetContentData() - { - return $this->hasOneof(2); - } - - /** - * The source of the asset is from content bytes. - * - * Generated from protobuf field .google.cloud.visionai.v1.AssetSource.AssetContentData asset_content_data = 2; - * @param \Google\Cloud\VisionAI\V1\AssetSource\AssetContentData $var - * @return $this - */ - public function setAssetContentData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AssetSource\AssetContentData::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getSourceForm() - { - return $this->whichOneof("source_form"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource/AssetContentData.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource/AssetContentData.php deleted file mode 100644 index 04cb10d6dd7e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource/AssetContentData.php +++ /dev/null @@ -1,60 +0,0 @@ -google.cloud.visionai.v1.AssetSource.AssetContentData - */ -class AssetContentData extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field bytes asset_content_data = 1; - */ - protected $asset_content_data = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $asset_content_data - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field bytes asset_content_data = 1; - * @return string - */ - public function getAssetContentData() - { - return $this->asset_content_data; - } - - /** - * Generated from protobuf field bytes asset_content_data = 1; - * @param string $var - * @return $this - */ - public function setAssetContentData($var) - { - GPBUtil::checkString($var, False); - $this->asset_content_data = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource/AssetGcsSource.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource/AssetGcsSource.php deleted file mode 100644 index ec9549782712..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AssetSource/AssetGcsSource.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.AssetSource.AssetGcsSource - */ -class AssetGcsSource extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud storage uri. - * - * Generated from protobuf field string gcs_uri = 1; - */ - protected $gcs_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_uri - * Cloud storage uri. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Cloud storage uri. - * - * Generated from protobuf field string gcs_uri = 1; - * @return string - */ - public function getGcsUri() - { - return $this->gcs_uri; - } - - /** - * Cloud storage uri. - * - * Generated from protobuf field string gcs_uri = 1; - * @param string $var - * @return $this - */ - public function setGcsUri($var) - { - GPBUtil::checkString($var, True); - $this->gcs_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AttributeValue.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AttributeValue.php deleted file mode 100644 index 4d61beaa1eb8..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AttributeValue.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.visionai.v1.AttributeValue - */ -class AttributeValue extends \Google\Protobuf\Internal\Message -{ - protected $value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $i - * int. - * @type float $f - * float. - * @type bool $b - * bool. - * @type string $s - * string. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); - parent::__construct($data); - } - - /** - * int. - * - * Generated from protobuf field int64 i = 1; - * @return int|string - */ - public function getI() - { - return $this->readOneof(1); - } - - public function hasI() - { - return $this->hasOneof(1); - } - - /** - * int. - * - * Generated from protobuf field int64 i = 1; - * @param int|string $var - * @return $this - */ - public function setI($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * float. - * - * Generated from protobuf field float f = 2; - * @return float - */ - public function getF() - { - return $this->readOneof(2); - } - - public function hasF() - { - return $this->hasOneof(2); - } - - /** - * float. - * - * Generated from protobuf field float f = 2; - * @param float $var - * @return $this - */ - public function setF($var) - { - GPBUtil::checkFloat($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * bool. - * - * Generated from protobuf field bool b = 3; - * @return bool - */ - public function getB() - { - return $this->readOneof(3); - } - - public function hasB() - { - return $this->hasOneof(3); - } - - /** - * bool. - * - * Generated from protobuf field bool b = 3; - * @param bool $var - * @return $this - */ - public function setB($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * string. - * - * Generated from protobuf field bytes s = 4; - * @return string - */ - public function getS() - { - return $this->readOneof(4); - } - - public function hasS() - { - return $this->hasOneof(4); - } - - /** - * string. - * - * Generated from protobuf field bytes s = 4; - * @param string $var - * @return $this - */ - public function setS($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getValue() - { - return $this->whichOneof("value"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AutoscalingMetricSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AutoscalingMetricSpec.php deleted file mode 100644 index f523ada0e392..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/AutoscalingMetricSpec.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.visionai.v1.AutoscalingMetricSpec - */ -class AutoscalingMetricSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource metric name. - * Supported metrics: - * * For Online Prediction: - * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` - * * `aiplatform.googleapis.com/prediction/online/cpu/utilization` - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $metric_name = ''; - /** - * The target resource utilization in percentage (1% - 100%) for the given - * metric; once the real usage deviates from the target by a certain - * percentage, the machine replicas change. The default value is 60 - * (representing 60%) if not provided. - * - * Generated from protobuf field int32 target = 2; - */ - protected $target = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $metric_name - * Required. The resource metric name. - * Supported metrics: - * * For Online Prediction: - * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` - * * `aiplatform.googleapis.com/prediction/online/cpu/utilization` - * @type int $target - * The target resource utilization in percentage (1% - 100%) for the given - * metric; once the real usage deviates from the target by a certain - * percentage, the machine replicas change. The default value is 60 - * (representing 60%) if not provided. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource metric name. - * Supported metrics: - * * For Online Prediction: - * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` - * * `aiplatform.googleapis.com/prediction/online/cpu/utilization` - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getMetricName() - { - return $this->metric_name; - } - - /** - * Required. The resource metric name. - * Supported metrics: - * * For Online Prediction: - * * `aiplatform.googleapis.com/prediction/online/accelerator/duty_cycle` - * * `aiplatform.googleapis.com/prediction/online/cpu/utilization` - * - * Generated from protobuf field string metric_name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setMetricName($var) - { - GPBUtil::checkString($var, True); - $this->metric_name = $var; - - return $this; - } - - /** - * The target resource utilization in percentage (1% - 100%) for the given - * metric; once the real usage deviates from the target by a certain - * percentage, the machine replicas change. The default value is 60 - * (representing 60%) if not provided. - * - * Generated from protobuf field int32 target = 2; - * @return int - */ - public function getTarget() - { - return $this->target; - } - - /** - * The target resource utilization in percentage (1% - 100%) for the given - * metric; once the real usage deviates from the target by a certain - * percentage, the machine replicas change. The default value is 60 - * (representing 60%) if not provided. - * - * Generated from protobuf field int32 target = 2; - * @param int $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkInt32($var); - $this->target = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchOperationStatus.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchOperationStatus.php deleted file mode 100644 index 0e6d7c04b9d0..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchOperationStatus.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.visionai.v1.BatchOperationStatus - */ -class BatchOperationStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The count of assets (together with their annotations if any) successfully - * ingested. - * - * Generated from protobuf field int32 success_count = 1; - */ - protected $success_count = 0; - /** - * The count of assets failed to ingested; it might be due to the annotation - * ingestion error. - * - * Generated from protobuf field int32 failure_count = 2; - */ - protected $failure_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $success_count - * The count of assets (together with their annotations if any) successfully - * ingested. - * @type int $failure_count - * The count of assets failed to ingested; it might be due to the annotation - * ingestion error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The count of assets (together with their annotations if any) successfully - * ingested. - * - * Generated from protobuf field int32 success_count = 1; - * @return int - */ - public function getSuccessCount() - { - return $this->success_count; - } - - /** - * The count of assets (together with their annotations if any) successfully - * ingested. - * - * Generated from protobuf field int32 success_count = 1; - * @param int $var - * @return $this - */ - public function setSuccessCount($var) - { - GPBUtil::checkInt32($var); - $this->success_count = $var; - - return $this; - } - - /** - * The count of assets failed to ingested; it might be due to the annotation - * ingestion error. - * - * Generated from protobuf field int32 failure_count = 2; - * @return int - */ - public function getFailureCount() - { - return $this->failure_count; - } - - /** - * The count of assets failed to ingested; it might be due to the annotation - * ingestion error. - * - * Generated from protobuf field int32 failure_count = 2; - * @param int $var - * @return $this - */ - public function setFailureCount($var) - { - GPBUtil::checkInt32($var); - $this->failure_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessRequest.php deleted file mode 100644 index 148176bcc498..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessRequest.php +++ /dev/null @@ -1,195 +0,0 @@ -google.cloud.visionai.v1.BatchRunProcessRequest - */ -class BatchRunProcessRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource shared by all processes being created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The create process requests. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $requests; - /** - * Optional. Options for batch processes. - * - * Generated from protobuf field .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $options = null; - /** - * Output only. The batch ID. - * - * Generated from protobuf field string batch_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $batch_id = ''; - - /** - * @param string $parent Required. The parent resource shared by all processes being created. Please see - * {@see LiveVideoAnalyticsClient::clusterName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\CreateProcessRequest[] $requests Required. The create process requests. - * - * @return \Google\Cloud\VisionAI\V1\BatchRunProcessRequest - * - * @experimental - */ - public static function build(string $parent, array $requests): self - { - return (new self()) - ->setParent($parent) - ->setRequests($requests); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource shared by all processes being created. - * @type \Google\Cloud\VisionAI\V1\CreateProcessRequest[] $requests - * Required. The create process requests. - * @type \Google\Cloud\VisionAI\V1\BatchRunProcessRequest\BatchRunProcessOptions $options - * Optional. Options for batch processes. - * @type string $batch_id - * Output only. The batch ID. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource shared by all processes being created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource shared by all processes being created. - * - * 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 create process requests. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\CreateProcessRequest> - */ - public function getRequests() - { - return $this->requests; - } - - /** - * Required. The create process requests. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.CreateProcessRequest requests = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\CreateProcessRequest[] $var - * @return $this - */ - public function setRequests($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\CreateProcessRequest::class); - $this->requests = $arr; - - return $this; - } - - /** - * Optional. Options for batch processes. - * - * Generated from protobuf field .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VisionAI\V1\BatchRunProcessRequest\BatchRunProcessOptions|null - */ - public function getOptions() - { - return $this->options; - } - - public function hasOptions() - { - return isset($this->options); - } - - public function clearOptions() - { - unset($this->options); - } - - /** - * Optional. Options for batch processes. - * - * Generated from protobuf field .google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions options = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VisionAI\V1\BatchRunProcessRequest\BatchRunProcessOptions $var - * @return $this - */ - public function setOptions($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\BatchRunProcessRequest\BatchRunProcessOptions::class); - $this->options = $var; - - return $this; - } - - /** - * Output only. The batch ID. - * - * Generated from protobuf field string batch_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getBatchId() - { - return $this->batch_id; - } - - /** - * Output only. The batch ID. - * - * Generated from protobuf field string batch_id = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setBatchId($var) - { - GPBUtil::checkString($var, True); - $this->batch_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessRequest/BatchRunProcessOptions.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessRequest/BatchRunProcessOptions.php deleted file mode 100644 index 9415e0de4aa0..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessRequest/BatchRunProcessOptions.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.visionai.v1.BatchRunProcessRequest.BatchRunProcessOptions - */ -class BatchRunProcessOptions extends \Google\Protobuf\Internal\Message -{ - /** - * The retry counts per process. Default: 3. - * - * Generated from protobuf field int32 retry_count = 1; - */ - protected $retry_count = 0; - /** - * The batch size. Default: 5, maximum: 100. - * - * Generated from protobuf field int32 batch_size = 2; - */ - protected $batch_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $retry_count - * The retry counts per process. Default: 3. - * @type int $batch_size - * The batch size. Default: 5, maximum: 100. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * The retry counts per process. Default: 3. - * - * Generated from protobuf field int32 retry_count = 1; - * @return int - */ - public function getRetryCount() - { - return $this->retry_count; - } - - /** - * The retry counts per process. Default: 3. - * - * Generated from protobuf field int32 retry_count = 1; - * @param int $var - * @return $this - */ - public function setRetryCount($var) - { - GPBUtil::checkInt32($var); - $this->retry_count = $var; - - return $this; - } - - /** - * The batch size. Default: 5, maximum: 100. - * - * Generated from protobuf field int32 batch_size = 2; - * @return int - */ - public function getBatchSize() - { - return $this->batch_size; - } - - /** - * The batch size. Default: 5, maximum: 100. - * - * Generated from protobuf field int32 batch_size = 2; - * @param int $var - * @return $this - */ - public function setBatchSize($var) - { - GPBUtil::checkInt32($var); - $this->batch_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessResponse.php deleted file mode 100644 index 6f39d400932c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BatchRunProcessResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.visionai.v1.BatchRunProcessResponse - */ -class BatchRunProcessResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The batch ID. - * - * Generated from protobuf field string batch_id = 1; - */ - protected $batch_id = ''; - /** - * Processes created. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Process processes = 2; - */ - private $processes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $batch_id - * The batch ID. - * @type \Google\Cloud\VisionAI\V1\Process[] $processes - * Processes created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * The batch ID. - * - * Generated from protobuf field string batch_id = 1; - * @return string - */ - public function getBatchId() - { - return $this->batch_id; - } - - /** - * The batch ID. - * - * Generated from protobuf field string batch_id = 1; - * @param string $var - * @return $this - */ - public function setBatchId($var) - { - GPBUtil::checkString($var, True); - $this->batch_id = $var; - - return $this; - } - - /** - * Processes created. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Process processes = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Process> - */ - public function getProcesses() - { - return $this->processes; - } - - /** - * Processes created. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Process processes = 2; - * @param \Google\Cloud\VisionAI\V1\Process[] $var - * @return $this - */ - public function setProcesses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Process::class); - $this->processes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BigQueryConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BigQueryConfig.php deleted file mode 100644 index be1bcbcaf7cd..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BigQueryConfig.php +++ /dev/null @@ -1,259 +0,0 @@ -google.cloud.visionai.v1.BigQueryConfig - */ -class BigQueryConfig extends \Google\Protobuf\Internal\Message -{ - /** - * BigQuery table resource for Vision AI Platform to ingest annotations to. - * - * Generated from protobuf field string table = 1; - */ - protected $table = ''; - /** - * Data Schema - * By default, Vision AI Application will try to write annotations to the - * target BigQuery table using the following schema: - * ingestion_time: TIMESTAMP, the ingestion time of the original data. - * application: STRING, name of the application which produces the annotation. - * instance: STRING, Id of the instance which produces the annotation. - * node: STRING, name of the application graph node which produces the - * annotation. - * annotation: STRING or JSON, the actual annotation protobuf will be - * converted to json string with bytes field as 64 encoded string. It can be - * written to both String or Json type column. - * To forward annotation data to an existing BigQuery table, customer needs to - * make sure the compatibility of the schema. - * The map maps application node name to its corresponding cloud function - * endpoint to transform the annotations directly to the - * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or - * proto_rows should be set). If configured, annotations produced by - * corresponding application node will sent to the Cloud Function at first - * before be forwarded to BigQuery. - * If the default table schema doesn't fit, customer is able to transform the - * annotation output from Vision AI Application to arbitrary BigQuery table - * schema with CloudFunction. - * * The cloud function will receive AppPlatformCloudFunctionRequest where - * the annotations field will be the json format of Vision AI annotation. - * * The cloud function should return AppPlatformCloudFunctionResponse with - * AppendRowsRequest stored in the annotations field. - * * To drop the annotation, simply clear the annotations field in the - * returned AppPlatformCloudFunctionResponse. - * - * Generated from protobuf field map cloud_function_mapping = 2; - */ - private $cloud_function_mapping; - /** - * If true, App Platform will create the BigQuery DataSet and the - * BigQuery Table with default schema if the specified table doesn't exist. - * This doesn't work if any cloud function customized schema is specified - * since the system doesn't know your desired schema. - * JSON column will be used in the default table created by App Platform. - * - * Generated from protobuf field bool create_default_table_if_not_exists = 3; - */ - protected $create_default_table_if_not_exists = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $table - * BigQuery table resource for Vision AI Platform to ingest annotations to. - * @type array|\Google\Protobuf\Internal\MapField $cloud_function_mapping - * Data Schema - * By default, Vision AI Application will try to write annotations to the - * target BigQuery table using the following schema: - * ingestion_time: TIMESTAMP, the ingestion time of the original data. - * application: STRING, name of the application which produces the annotation. - * instance: STRING, Id of the instance which produces the annotation. - * node: STRING, name of the application graph node which produces the - * annotation. - * annotation: STRING or JSON, the actual annotation protobuf will be - * converted to json string with bytes field as 64 encoded string. It can be - * written to both String or Json type column. - * To forward annotation data to an existing BigQuery table, customer needs to - * make sure the compatibility of the schema. - * The map maps application node name to its corresponding cloud function - * endpoint to transform the annotations directly to the - * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or - * proto_rows should be set). If configured, annotations produced by - * corresponding application node will sent to the Cloud Function at first - * before be forwarded to BigQuery. - * If the default table schema doesn't fit, customer is able to transform the - * annotation output from Vision AI Application to arbitrary BigQuery table - * schema with CloudFunction. - * * The cloud function will receive AppPlatformCloudFunctionRequest where - * the annotations field will be the json format of Vision AI annotation. - * * The cloud function should return AppPlatformCloudFunctionResponse with - * AppendRowsRequest stored in the annotations field. - * * To drop the annotation, simply clear the annotations field in the - * returned AppPlatformCloudFunctionResponse. - * @type bool $create_default_table_if_not_exists - * If true, App Platform will create the BigQuery DataSet and the - * BigQuery Table with default schema if the specified table doesn't exist. - * This doesn't work if any cloud function customized schema is specified - * since the system doesn't know your desired schema. - * JSON column will be used in the default table created by App Platform. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * BigQuery table resource for Vision AI Platform to ingest annotations to. - * - * Generated from protobuf field string table = 1; - * @return string - */ - public function getTable() - { - return $this->table; - } - - /** - * BigQuery table resource for Vision AI Platform to ingest annotations to. - * - * Generated from protobuf field string table = 1; - * @param string $var - * @return $this - */ - public function setTable($var) - { - GPBUtil::checkString($var, True); - $this->table = $var; - - return $this; - } - - /** - * Data Schema - * By default, Vision AI Application will try to write annotations to the - * target BigQuery table using the following schema: - * ingestion_time: TIMESTAMP, the ingestion time of the original data. - * application: STRING, name of the application which produces the annotation. - * instance: STRING, Id of the instance which produces the annotation. - * node: STRING, name of the application graph node which produces the - * annotation. - * annotation: STRING or JSON, the actual annotation protobuf will be - * converted to json string with bytes field as 64 encoded string. It can be - * written to both String or Json type column. - * To forward annotation data to an existing BigQuery table, customer needs to - * make sure the compatibility of the schema. - * The map maps application node name to its corresponding cloud function - * endpoint to transform the annotations directly to the - * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or - * proto_rows should be set). If configured, annotations produced by - * corresponding application node will sent to the Cloud Function at first - * before be forwarded to BigQuery. - * If the default table schema doesn't fit, customer is able to transform the - * annotation output from Vision AI Application to arbitrary BigQuery table - * schema with CloudFunction. - * * The cloud function will receive AppPlatformCloudFunctionRequest where - * the annotations field will be the json format of Vision AI annotation. - * * The cloud function should return AppPlatformCloudFunctionResponse with - * AppendRowsRequest stored in the annotations field. - * * To drop the annotation, simply clear the annotations field in the - * returned AppPlatformCloudFunctionResponse. - * - * Generated from protobuf field map cloud_function_mapping = 2; - * @return \Google\Protobuf\Internal\MapField - */ - public function getCloudFunctionMapping() - { - return $this->cloud_function_mapping; - } - - /** - * Data Schema - * By default, Vision AI Application will try to write annotations to the - * target BigQuery table using the following schema: - * ingestion_time: TIMESTAMP, the ingestion time of the original data. - * application: STRING, name of the application which produces the annotation. - * instance: STRING, Id of the instance which produces the annotation. - * node: STRING, name of the application graph node which produces the - * annotation. - * annotation: STRING or JSON, the actual annotation protobuf will be - * converted to json string with bytes field as 64 encoded string. It can be - * written to both String or Json type column. - * To forward annotation data to an existing BigQuery table, customer needs to - * make sure the compatibility of the schema. - * The map maps application node name to its corresponding cloud function - * endpoint to transform the annotations directly to the - * google.cloud.bigquery.storage.v1.AppendRowsRequest (only avro_rows or - * proto_rows should be set). If configured, annotations produced by - * corresponding application node will sent to the Cloud Function at first - * before be forwarded to BigQuery. - * If the default table schema doesn't fit, customer is able to transform the - * annotation output from Vision AI Application to arbitrary BigQuery table - * schema with CloudFunction. - * * The cloud function will receive AppPlatformCloudFunctionRequest where - * the annotations field will be the json format of Vision AI annotation. - * * The cloud function should return AppPlatformCloudFunctionResponse with - * AppendRowsRequest stored in the annotations field. - * * To drop the annotation, simply clear the annotations field in the - * returned AppPlatformCloudFunctionResponse. - * - * Generated from protobuf field map cloud_function_mapping = 2; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setCloudFunctionMapping($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->cloud_function_mapping = $arr; - - return $this; - } - - /** - * If true, App Platform will create the BigQuery DataSet and the - * BigQuery Table with default schema if the specified table doesn't exist. - * This doesn't work if any cloud function customized schema is specified - * since the system doesn't know your desired schema. - * JSON column will be used in the default table created by App Platform. - * - * Generated from protobuf field bool create_default_table_if_not_exists = 3; - * @return bool - */ - public function getCreateDefaultTableIfNotExists() - { - return $this->create_default_table_if_not_exists; - } - - /** - * If true, App Platform will create the BigQuery DataSet and the - * BigQuery Table with default schema if the specified table doesn't exist. - * This doesn't work if any cloud function customized schema is specified - * since the system doesn't know your desired schema. - * JSON column will be used in the default table created by App Platform. - * - * Generated from protobuf field bool create_default_table_if_not_exists = 3; - * @param bool $var - * @return $this - */ - public function setCreateDefaultTableIfNotExists($var) - { - GPBUtil::checkBool($var); - $this->create_default_table_if_not_exists = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BoolValue.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BoolValue.php deleted file mode 100644 index 9ab19ab4a176..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/BoolValue.php +++ /dev/null @@ -1,58 +0,0 @@ -google.cloud.visionai.v1.BoolValue - */ -class BoolValue extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field bool value = 1; - */ - protected $value = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $value - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field bool value = 1; - * @return bool - */ - public function getValue() - { - return $this->value; - } - - /** - * Generated from protobuf field bool value = 1; - * @param bool $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkBool($var); - $this->value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Channel.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Channel.php deleted file mode 100644 index 790a60b02556..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Channel.php +++ /dev/null @@ -1,291 +0,0 @@ -google.cloud.visionai.v1.Channel - */ -class Channel extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the resource. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Annotations to allow clients to store small amounts of arbitrary data. - * - * Generated from protobuf field map annotations = 5; - */ - private $annotations; - /** - * Required. Stream that is associated with this series. - * - * Generated from protobuf field string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $stream = ''; - /** - * Required. Event that is associated with this series. - * - * Generated from protobuf field string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $event = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update timestamp. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Annotations to allow clients to store small amounts of arbitrary data. - * @type string $stream - * Required. Stream that is associated with this series. - * @type string $event - * Required. Event that is associated with this series. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsResources::initOnce(); - parent::__construct($data); - } - - /** - * Name of the resource. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the resource. - * - * 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 create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Annotations to allow clients to store small amounts of arbitrary data. - * - * Generated from protobuf field map annotations = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Annotations to allow clients to store small amounts of arbitrary data. - * - * Generated from protobuf field map annotations = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Required. Stream that is associated with this series. - * - * Generated from protobuf field string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getStream() - { - return $this->stream; - } - - /** - * Required. Stream that is associated with this series. - * - * Generated from protobuf field string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setStream($var) - { - GPBUtil::checkString($var, True); - $this->stream = $var; - - return $this; - } - - /** - * Required. Event that is associated with this series. - * - * Generated from protobuf field string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getEvent() - { - return $this->event; - } - - /** - * Required. Event that is associated with this series. - * - * Generated from protobuf field string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEvent($var) - { - GPBUtil::checkString($var, True); - $this->event = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CircleArea.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CircleArea.php deleted file mode 100644 index d4904c24024d..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CircleArea.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.visionai.v1.CircleArea - */ -class CircleArea extends \Google\Protobuf\Internal\Message -{ - /** - * Latitude of circle area's center. Degrees [-90 .. 90] - * - * Generated from protobuf field double latitude = 1; - */ - protected $latitude = 0.0; - /** - * Longitude of circle area's center. Degrees [-180 .. 180] - * - * Generated from protobuf field double longitude = 2; - */ - protected $longitude = 0.0; - /** - * Radius of the circle area in meters. - * - * Generated from protobuf field double radius_meter = 3; - */ - protected $radius_meter = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $latitude - * Latitude of circle area's center. Degrees [-90 .. 90] - * @type float $longitude - * Longitude of circle area's center. Degrees [-180 .. 180] - * @type float $radius_meter - * Radius of the circle area in meters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Latitude of circle area's center. Degrees [-90 .. 90] - * - * Generated from protobuf field double latitude = 1; - * @return float - */ - public function getLatitude() - { - return $this->latitude; - } - - /** - * Latitude of circle area's center. Degrees [-90 .. 90] - * - * Generated from protobuf field double latitude = 1; - * @param float $var - * @return $this - */ - public function setLatitude($var) - { - GPBUtil::checkDouble($var); - $this->latitude = $var; - - return $this; - } - - /** - * Longitude of circle area's center. Degrees [-180 .. 180] - * - * Generated from protobuf field double longitude = 2; - * @return float - */ - public function getLongitude() - { - return $this->longitude; - } - - /** - * Longitude of circle area's center. Degrees [-180 .. 180] - * - * Generated from protobuf field double longitude = 2; - * @param float $var - * @return $this - */ - public function setLongitude($var) - { - GPBUtil::checkDouble($var); - $this->longitude = $var; - - return $this; - } - - /** - * Radius of the circle area in meters. - * - * Generated from protobuf field double radius_meter = 3; - * @return float - */ - public function getRadiusMeter() - { - return $this->radius_meter; - } - - /** - * Radius of the circle area in meters. - * - * Generated from protobuf field double radius_meter = 3; - * @param float $var - * @return $this - */ - public function setRadiusMeter($var) - { - GPBUtil::checkDouble($var); - $this->radius_meter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClassificationPredictionResult.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClassificationPredictionResult.php deleted file mode 100644 index 59479d31a6d2..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClassificationPredictionResult.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.visionai.v1.ClassificationPredictionResult - */ -class ClassificationPredictionResult extends \Google\Protobuf\Internal\Message -{ - /** - * The resource IDs of the AnnotationSpecs that had been identified. - * - * Generated from protobuf field repeated int64 ids = 1; - */ - private $ids; - /** - * The display names of the AnnotationSpecs that had been identified, order - * matches the IDs. - * - * Generated from protobuf field repeated string display_names = 2; - */ - private $display_names; - /** - * The Model's confidences in correctness of the predicted IDs, higher value - * means higher confidence. Order matches the Ids. - * - * Generated from protobuf field repeated float confidences = 3; - */ - private $confidences; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int[]|string[] $ids - * The resource IDs of the AnnotationSpecs that had been identified. - * @type string[] $display_names - * The display names of the AnnotationSpecs that had been identified, order - * matches the IDs. - * @type float[] $confidences - * The Model's confidences in correctness of the predicted IDs, higher value - * means higher confidence. Order matches the Ids. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * The resource IDs of the AnnotationSpecs that had been identified. - * - * Generated from protobuf field repeated int64 ids = 1; - * @return RepeatedField|RepeatedField - */ - public function getIds() - { - return $this->ids; - } - - /** - * The resource IDs of the AnnotationSpecs that had been identified. - * - * Generated from protobuf field repeated int64 ids = 1; - * @param int[]|string[] $var - * @return $this - */ - public function setIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); - $this->ids = $arr; - - return $this; - } - - /** - * The display names of the AnnotationSpecs that had been identified, order - * matches the IDs. - * - * Generated from protobuf field repeated string display_names = 2; - * @return RepeatedField - */ - public function getDisplayNames() - { - return $this->display_names; - } - - /** - * The display names of the AnnotationSpecs that had been identified, order - * matches the IDs. - * - * Generated from protobuf field repeated string display_names = 2; - * @param string[] $var - * @return $this - */ - public function setDisplayNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->display_names = $arr; - - return $this; - } - - /** - * The Model's confidences in correctness of the predicted IDs, higher value - * means higher confidence. Order matches the Ids. - * - * Generated from protobuf field repeated float confidences = 3; - * @return RepeatedField - */ - public function getConfidences() - { - return $this->confidences; - } - - /** - * The Model's confidences in correctness of the predicted IDs, higher value - * means higher confidence. Order matches the Ids. - * - * Generated from protobuf field repeated float confidences = 3; - * @param float[] $var - * @return $this - */ - public function setConfidences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FLOAT); - $this->confidences = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetRequest.php deleted file mode 100644 index f3161d4b4504..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.visionai.v1.ClipAssetRequest - */ -class ClipAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the asset to request clips for. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The time range to request clips for. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $temporal_partition = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the asset to request clips for. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * @type \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $temporal_partition - * Required. The time range to request clips for. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the asset to request clips for. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the asset to request clips for. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Required. The time range to request clips for. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Partition\TemporalPartition|null - */ - public function getTemporalPartition() - { - return $this->temporal_partition; - } - - public function hasTemporalPartition() - { - return isset($this->temporal_partition); - } - - public function clearTemporalPartition() - { - unset($this->temporal_partition); - } - - /** - * Required. The time range to request clips for. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $var - * @return $this - */ - public function setTemporalPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Partition\TemporalPartition::class); - $this->temporal_partition = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetResponse.php deleted file mode 100644 index a8e0e9ae75ee..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetResponse.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.visionai.v1.ClipAssetResponse - */ -class ClipAssetResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A list of signed uris to download the video clips that cover the requested - * time range ordered by time. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; - */ - private $time_indexed_uris; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\ClipAssetResponse\TimeIndexedUri[] $time_indexed_uris - * A list of signed uris to download the video clips that cover the requested - * time range ordered by time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * A list of signed uris to download the video clips that cover the requested - * time range ordered by time. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\ClipAssetResponse\TimeIndexedUri> - */ - public function getTimeIndexedUris() - { - return $this->time_indexed_uris; - } - - /** - * A list of signed uris to download the video clips that cover the requested - * time range ordered by time. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri time_indexed_uris = 1; - * @param \Google\Cloud\VisionAI\V1\ClipAssetResponse\TimeIndexedUri[] $var - * @return $this - */ - public function setTimeIndexedUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ClipAssetResponse\TimeIndexedUri::class); - $this->time_indexed_uris = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetResponse/TimeIndexedUri.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetResponse/TimeIndexedUri.php deleted file mode 100644 index 36e58634b6bf..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClipAssetResponse/TimeIndexedUri.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.visionai.v1.ClipAssetResponse.TimeIndexedUri - */ -class TimeIndexedUri extends \Google\Protobuf\Internal\Message -{ - /** - * Time range of the video that the uri is for. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; - */ - protected $temporal_partition = null; - /** - * Signed uri to download the video clip. - * - * Generated from protobuf field string uri = 2; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $temporal_partition - * Time range of the video that the uri is for. - * @type string $uri - * Signed uri to download the video clip. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Time range of the video that the uri is for. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; - * @return \Google\Cloud\VisionAI\V1\Partition\TemporalPartition|null - */ - public function getTemporalPartition() - { - return $this->temporal_partition; - } - - public function hasTemporalPartition() - { - return isset($this->temporal_partition); - } - - public function clearTemporalPartition() - { - unset($this->temporal_partition); - } - - /** - * Time range of the video that the uri is for. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; - * @param \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $var - * @return $this - */ - public function setTemporalPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Partition\TemporalPartition::class); - $this->temporal_partition = $var; - - return $this; - } - - /** - * Signed uri to download the video clip. - * - * Generated from protobuf field string uri = 2; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Signed uri to download the video clip. - * - * Generated from protobuf field string uri = 2; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Cluster.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Cluster.php deleted file mode 100644 index dc1b5248c8a5..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Cluster.php +++ /dev/null @@ -1,325 +0,0 @@ -google.cloud.visionai.v1.Cluster - */ -class Cluster extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Annotations to allow clients to store small amounts of arbitrary data. - * - * Generated from protobuf field map annotations = 5; - */ - private $annotations; - /** - * Output only. The DNS name of the data plane service - * - * Generated from protobuf field string dataplane_service_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $dataplane_service_endpoint = ''; - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.visionai.v1.Cluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The private service connection service target name. - * - * Generated from protobuf field string psc_target = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $psc_target = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Name of the resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update timestamp. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Annotations to allow clients to store small amounts of arbitrary data. - * @type string $dataplane_service_endpoint - * Output only. The DNS name of the data plane service - * @type int $state - * Output only. The current state of the cluster. - * @type string $psc_target - * Output only. The private service connection service target name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Annotations to allow clients to store small amounts of arbitrary data. - * - * Generated from protobuf field map annotations = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Annotations to allow clients to store small amounts of arbitrary data. - * - * Generated from protobuf field map annotations = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Output only. The DNS name of the data plane service - * - * Generated from protobuf field string dataplane_service_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDataplaneServiceEndpoint() - { - return $this->dataplane_service_endpoint; - } - - /** - * Output only. The DNS name of the data plane service - * - * Generated from protobuf field string dataplane_service_endpoint = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDataplaneServiceEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->dataplane_service_endpoint = $var; - - return $this; - } - - /** - * Output only. The current state of the cluster. - * - * Generated from protobuf field .google.cloud.visionai.v1.Cluster.State state = 7 [(.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.cloud.visionai.v1.Cluster.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Cluster\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The private service connection service target name. - * - * Generated from protobuf field string psc_target = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getPscTarget() - { - return $this->psc_target; - } - - /** - * Output only. The private service connection service target name. - * - * Generated from protobuf field string psc_target = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setPscTarget($var) - { - GPBUtil::checkString($var, True); - $this->psc_target = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Cluster/State.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Cluster/State.php deleted file mode 100644 index d8861d9cf0c3..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Cluster/State.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.visionai.v1.Cluster.State - */ -class State -{ - /** - * Not set. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The PROVISIONING state indicates the cluster is being created. - * - * Generated from protobuf enum PROVISIONING = 1; - */ - const PROVISIONING = 1; - /** - * The RUNNING state indicates the cluster has been created and is fully - * usable. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * The STOPPING state indicates the cluster is being deleted. - * - * Generated from protobuf enum STOPPING = 3; - */ - const STOPPING = 3; - /** - * The ERROR state indicates the cluster is unusable. It will be - * automatically deleted. - * - * Generated from protobuf enum ERROR = 4; - */ - const ERROR = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PROVISIONING => 'PROVISIONING', - self::RUNNING => 'RUNNING', - self::STOPPING => 'STOPPING', - self::ERROR => 'ERROR', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClusterInfo.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClusterInfo.php deleted file mode 100644 index ce6596dae6b5..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ClusterInfo.php +++ /dev/null @@ -1,99 +0,0 @@ -google.cloud.visionai.v1.ClusterInfo - */ -class ClusterInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The number of active streams in the cluster. - * - * Generated from protobuf field int32 streams_count = 1; - */ - protected $streams_count = 0; - /** - * The number of active processes in the cluster. - * - * Generated from protobuf field int32 processes_count = 2; - */ - protected $processes_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $streams_count - * The number of active streams in the cluster. - * @type int $processes_count - * The number of active processes in the cluster. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\HealthService::initOnce(); - parent::__construct($data); - } - - /** - * The number of active streams in the cluster. - * - * Generated from protobuf field int32 streams_count = 1; - * @return int - */ - public function getStreamsCount() - { - return $this->streams_count; - } - - /** - * The number of active streams in the cluster. - * - * Generated from protobuf field int32 streams_count = 1; - * @param int $var - * @return $this - */ - public function setStreamsCount($var) - { - GPBUtil::checkInt32($var); - $this->streams_count = $var; - - return $this; - } - - /** - * The number of active processes in the cluster. - * - * Generated from protobuf field int32 processes_count = 2; - * @return int - */ - public function getProcessesCount() - { - return $this->processes_count; - } - - /** - * The number of active processes in the cluster. - * - * Generated from protobuf field int32 processes_count = 2; - * @param int $var - * @return $this - */ - public function setProcessesCount($var) - { - GPBUtil::checkInt32($var); - $this->processes_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Collection.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Collection.php deleted file mode 100644 index 02675027c268..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Collection.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.visionai.v1.Collection - */ -class Collection extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Resource name of the collection. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Optional. The collection name for displaying. - * The name can be up to 256 characters long. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. Description of the collection. Can be up to 25000 characters - * long. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Resource name of the collection. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * @type string $display_name - * Optional. The collection name for displaying. - * The name can be up to 256 characters long. - * @type string $description - * Optional. Description of the collection. Can be up to 25000 characters - * long. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Resource name of the collection. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Resource name of the collection. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The collection name for displaying. - * The name can be up to 256 characters long. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. The collection name for displaying. - * The name can be up to 256 characters long. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. Description of the collection. Can be up to 25000 characters - * long. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the collection. Can be up to 25000 characters - * long. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CollectionItem.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CollectionItem.php deleted file mode 100644 index e4a5dd3684ae..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CollectionItem.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.visionai.v1.CollectionItem - */ -class CollectionItem extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The collection name that this item belongs to. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * - * Generated from protobuf field string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $collection = ''; - /** - * Required. The type of item. - * - * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $type = 0; - /** - * Required. The name of the CollectionItem. Its format depends on the `type` - * above. For ASSET: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` - * - * Generated from protobuf field string item_resource = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $item_resource = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $collection - * Required. The collection name that this item belongs to. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * @type int $type - * Required. The type of item. - * @type string $item_resource - * Required. The name of the CollectionItem. Its format depends on the `type` - * above. For ASSET: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The collection name that this item belongs to. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * - * Generated from protobuf field string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getCollection() - { - return $this->collection; - } - - /** - * Required. The collection name that this item belongs to. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * - * Generated from protobuf field string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCollection($var) - { - GPBUtil::checkString($var, True); - $this->collection = $var; - - return $this; - } - - /** - * Required. The type of item. - * - * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Required. The type of item. - * - * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem.Type type = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\CollectionItem\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Required. The name of the CollectionItem. Its format depends on the `type` - * above. For ASSET: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` - * - * Generated from protobuf field string item_resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getItemResource() - { - return $this->item_resource; - } - - /** - * Required. The name of the CollectionItem. Its format depends on the `type` - * above. For ASSET: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` - * - * Generated from protobuf field string item_resource = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setItemResource($var) - { - GPBUtil::checkString($var, True); - $this->item_resource = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CollectionItem/Type.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CollectionItem/Type.php deleted file mode 100644 index 72028409c845..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CollectionItem/Type.php +++ /dev/null @@ -1,54 +0,0 @@ -google.cloud.visionai.v1.CollectionItem.Type - */ -class Type -{ - /** - * The default type of item should never happen. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Asset type item. - * - * Generated from protobuf enum ASSET = 1; - */ - const ASSET = 1; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::ASSET => 'ASSET', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CommitRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CommitRequest.php deleted file mode 100644 index 5f56e3c8ad6c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CommitRequest.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.visionai.v1.CommitRequest - */ -class CommitRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The offset to commit. - * - * Generated from protobuf field int64 offset = 1; - */ - protected $offset = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $offset - * The offset to commit. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - - /** - * The offset to commit. - * - * Generated from protobuf field int64 offset = 1; - * @return int|string - */ - public function getOffset() - { - return $this->offset; - } - - /** - * The offset to commit. - * - * Generated from protobuf field int64 offset = 1; - * @param int|string $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkInt64($var); - $this->offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ControlledMode.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ControlledMode.php deleted file mode 100644 index 08d7cbc37d06..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ControlledMode.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.visionai.v1.ControlledMode - */ -class ControlledMode extends \Google\Protobuf\Internal\Message -{ - /** - * This is the logical starting point to fallback upon should the - * specified starting offset be unavailable. - * This can be one of the following values: - * "begin": This will read from the earliest available message. - * "end": This will read only future messages. - * - * Generated from protobuf field string fallback_starting_offset = 2; - */ - protected $fallback_starting_offset = ''; - protected $starting_offset; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $starting_logical_offset - * This can be set to the following logical starting points: - * "begin": This will read from the earliest available message. - * "most-recent": This will read from the latest available message. - * "end": This will read only future messages. - * "stored": This will resume reads one past the last committed offset. - * It is the only option that resumes progress; all others - * jump unilaterally. - * @type string $fallback_starting_offset - * This is the logical starting point to fallback upon should the - * specified starting offset be unavailable. - * This can be one of the following values: - * "begin": This will read from the earliest available message. - * "end": This will read only future messages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - - /** - * This can be set to the following logical starting points: - * "begin": This will read from the earliest available message. - * "most-recent": This will read from the latest available message. - * "end": This will read only future messages. - * "stored": This will resume reads one past the last committed offset. - * It is the only option that resumes progress; all others - * jump unilaterally. - * - * Generated from protobuf field string starting_logical_offset = 1; - * @return string - */ - public function getStartingLogicalOffset() - { - return $this->readOneof(1); - } - - public function hasStartingLogicalOffset() - { - return $this->hasOneof(1); - } - - /** - * This can be set to the following logical starting points: - * "begin": This will read from the earliest available message. - * "most-recent": This will read from the latest available message. - * "end": This will read only future messages. - * "stored": This will resume reads one past the last committed offset. - * It is the only option that resumes progress; all others - * jump unilaterally. - * - * Generated from protobuf field string starting_logical_offset = 1; - * @param string $var - * @return $this - */ - public function setStartingLogicalOffset($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * This is the logical starting point to fallback upon should the - * specified starting offset be unavailable. - * This can be one of the following values: - * "begin": This will read from the earliest available message. - * "end": This will read only future messages. - * - * Generated from protobuf field string fallback_starting_offset = 2; - * @return string - */ - public function getFallbackStartingOffset() - { - return $this->fallback_starting_offset; - } - - /** - * This is the logical starting point to fallback upon should the - * specified starting offset be unavailable. - * This can be one of the following values: - * "begin": This will read from the earliest available message. - * "end": This will read only future messages. - * - * Generated from protobuf field string fallback_starting_offset = 2; - * @param string $var - * @return $this - */ - public function setFallbackStartingOffset($var) - { - GPBUtil::checkString($var, True); - $this->fallback_starting_offset = $var; - - return $this; - } - - /** - * @return string - */ - public function getStartingOffset() - { - return $this->whichOneof("starting_offset"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Corpus.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Corpus.php deleted file mode 100644 index c8f73b73f81e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Corpus.php +++ /dev/null @@ -1,387 +0,0 @@ -google.cloud.visionai.v1.Corpus - */ -class Corpus extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the corpus. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The corpus name to shown in the UI. The name can be up to 32 - * characters long. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Optional. Description of the corpus. Can be up to 25000 characters long. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Optional. The default TTL value for all assets under the corpus without a - * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is - * required and the maximum allowed - * default_ttl is 10 years. - * - * Generated from protobuf field .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $default_ttl = null; - /** - * Optional. Type of the asset inside corpus. - * - * Generated from protobuf field .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $type = 0; - /** - * Default search capability setting on corpus level. - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; - */ - protected $search_capability_setting = null; - /** - * Output only. This boolean field is only set for projects that have Physical - * Zone Separation enabled via an Org Policy constraint. It is set to true - * when the corpus is a valid zone separated corpus and false if it isn't. - * - * Generated from protobuf field optional bool satisfies_pzs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = null; - /** - * Output only. This boolean field is only set for projects that have Physical - * Zone Isolation enabled via an Org Policy constraint. It is set to true when - * the corpus is a valid zone isolated corpus and false if it isn't. - * - * Generated from protobuf field optional bool satisfies_pzi = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzi = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Resource name of the corpus. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * @type string $display_name - * Required. The corpus name to shown in the UI. The name can be up to 32 - * characters long. - * @type string $description - * Optional. Description of the corpus. Can be up to 25000 characters long. - * @type \Google\Protobuf\Duration $default_ttl - * Optional. The default TTL value for all assets under the corpus without a - * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is - * required and the maximum allowed - * default_ttl is 10 years. - * @type int $type - * Optional. Type of the asset inside corpus. - * @type \Google\Cloud\VisionAI\V1\SearchCapabilitySetting $search_capability_setting - * Default search capability setting on corpus level. - * @type bool $satisfies_pzs - * Output only. This boolean field is only set for projects that have Physical - * Zone Separation enabled via an Org Policy constraint. It is set to true - * when the corpus is a valid zone separated corpus and false if it isn't. - * @type bool $satisfies_pzi - * Output only. This boolean field is only set for projects that have Physical - * Zone Isolation enabled via an Org Policy constraint. It is set to true when - * the corpus is a valid zone isolated corpus and false if it isn't. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the corpus. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource name of the corpus. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * 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 corpus name to shown in the UI. The name can be up to 32 - * characters long. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. The corpus name to shown in the UI. The name can be up to 32 - * characters long. - * - * 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; - } - - /** - * Optional. Description of the corpus. Can be up to 25000 characters long. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the corpus. Can be up to 25000 characters long. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. The default TTL value for all assets under the corpus without a - * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is - * required and the maximum allowed - * default_ttl is 10 years. - * - * Generated from protobuf field .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Duration|null - */ - public function getDefaultTtl() - { - return $this->default_ttl; - } - - public function hasDefaultTtl() - { - return isset($this->default_ttl); - } - - public function clearDefaultTtl() - { - unset($this->default_ttl); - } - - /** - * Optional. The default TTL value for all assets under the corpus without a - * asset level user-defined TTL. For STREAM_VIDEO type corpora, this is - * required and the maximum allowed - * default_ttl is 10 years. - * - * Generated from protobuf field .google.protobuf.Duration default_ttl = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDefaultTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->default_ttl = $var; - - return $this; - } - - /** - * Optional. Type of the asset inside corpus. - * - * Generated from protobuf field .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Optional. Type of the asset inside corpus. - * - * Generated from protobuf field .google.cloud.visionai.v1.Corpus.Type type = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Corpus\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Default search capability setting on corpus level. - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; - * @return \Google\Cloud\VisionAI\V1\SearchCapabilitySetting|null - */ - public function getSearchCapabilitySetting() - { - return $this->search_capability_setting; - } - - public function hasSearchCapabilitySetting() - { - return isset($this->search_capability_setting); - } - - public function clearSearchCapabilitySetting() - { - unset($this->search_capability_setting); - } - - /** - * Default search capability setting on corpus level. - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchCapabilitySetting search_capability_setting = 8; - * @param \Google\Cloud\VisionAI\V1\SearchCapabilitySetting $var - * @return $this - */ - public function setSearchCapabilitySetting($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\SearchCapabilitySetting::class); - $this->search_capability_setting = $var; - - return $this; - } - - /** - * Output only. This boolean field is only set for projects that have Physical - * Zone Separation enabled via an Org Policy constraint. It is set to true - * when the corpus is a valid zone separated corpus and false if it isn't. - * - * Generated from protobuf field optional bool satisfies_pzs = 11 [(.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. This boolean field is only set for projects that have Physical - * Zone Separation enabled via an Org Policy constraint. It is set to true - * when the corpus is a valid zone separated corpus and false if it isn't. - * - * Generated from protobuf field optional bool satisfies_pzs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * Output only. This boolean field is only set for projects that have Physical - * Zone Isolation enabled via an Org Policy constraint. It is set to true when - * the corpus is a valid zone isolated corpus and false if it isn't. - * - * Generated from protobuf field optional bool satisfies_pzi = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzi() - { - return isset($this->satisfies_pzi) ? $this->satisfies_pzi : false; - } - - public function hasSatisfiesPzi() - { - return isset($this->satisfies_pzi); - } - - public function clearSatisfiesPzi() - { - unset($this->satisfies_pzi); - } - - /** - * Output only. This boolean field is only set for projects that have Physical - * Zone Isolation enabled via an Org Policy constraint. It is set to true when - * the corpus is a valid zone isolated corpus and false if it isn't. - * - * Generated from protobuf field optional bool satisfies_pzi = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzi($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzi = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Corpus/Type.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Corpus/Type.php deleted file mode 100644 index be19ea0edcc6..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Corpus/Type.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.visionai.v1.Corpus.Type - */ -class Type -{ - /** - * The default type, not supposed to be used. If this default type is used, - * the corpus will be created as STREAM_VIDEO corpus. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Asset is a live streaming video. - * - * Generated from protobuf enum STREAM_VIDEO = 1; - */ - const STREAM_VIDEO = 1; - /** - * Asset is an image. - * - * Generated from protobuf enum IMAGE = 2; - */ - const IMAGE = 2; - /** - * Asset is a batch video. - * - * Generated from protobuf enum VIDEO_ON_DEMAND = 3; - */ - const VIDEO_ON_DEMAND = 3; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::STREAM_VIDEO => 'STREAM_VIDEO', - self::IMAGE => 'IMAGE', - self::VIDEO_ON_DEMAND => 'VIDEO_ON_DEMAND', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAnalysisRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAnalysisRequest.php deleted file mode 100644 index 3038aaa8b117..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAnalysisRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.visionai.v1.CreateAnalysisRequest - */ -class CreateAnalysisRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string analysis_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $analysis_id = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $analysis = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see LiveVideoAnalyticsClient::clusterName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\Analysis $analysis Required. The resource being created. - * @param string $analysisId Required. Id of the requesting object. - * - * @return \Google\Cloud\VisionAI\V1\CreateAnalysisRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\Analysis $analysis, string $analysisId): self - { - return (new self()) - ->setParent($parent) - ->setAnalysis($analysis) - ->setAnalysisId($analysisId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $analysis_id - * Required. Id of the requesting object. - * @type \Google\Cloud\VisionAI\V1\Analysis $analysis - * Required. The resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * 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. Value for parent. - * - * 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. Id of the requesting object. - * - * Generated from protobuf field string analysis_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getAnalysisId() - { - return $this->analysis_id; - } - - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string analysis_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setAnalysisId($var) - { - GPBUtil::checkString($var, True); - $this->analysis_id = $var; - - return $this; - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Analysis|null - */ - public function getAnalysis() - { - return $this->analysis; - } - - public function hasAnalysis() - { - return isset($this->analysis); - } - - public function clearAnalysis() - { - unset($this->analysis); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Analysis analysis = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Analysis $var - * @return $this - */ - public function setAnalysis($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Analysis::class); - $this->analysis = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAnnotationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAnnotationRequest.php deleted file mode 100644 index 187db2c477e0..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAnnotationRequest.php +++ /dev/null @@ -1,209 +0,0 @@ -google.cloud.visionai.v1.CreateAnnotationRequest - */ -class CreateAnnotationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this annotation will be created. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The annotation to create. - * - * Generated from protobuf field .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $annotation = null; - /** - * Optional. The ID to use for the annotation, which will become the final - * component of the annotation's resource name if user choose to specify. - * Otherwise, annotation id will be generated by system. - * This value should be up to 63 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * - * Generated from protobuf field optional string annotation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $annotation_id = null; - - /** - * @param string $parent Required. The parent resource where this annotation will be created. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * Please see {@see WarehouseClient::assetName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\Annotation $annotation Required. The annotation to create. - * @param string $annotationId Optional. The ID to use for the annotation, which will become the final - * component of the annotation's resource name if user choose to specify. - * Otherwise, annotation id will be generated by system. - * - * This value should be up to 63 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * - * @return \Google\Cloud\VisionAI\V1\CreateAnnotationRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\Annotation $annotation, string $annotationId): self - { - return (new self()) - ->setParent($parent) - ->setAnnotation($annotation) - ->setAnnotationId($annotationId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource where this annotation will be created. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * @type \Google\Cloud\VisionAI\V1\Annotation $annotation - * Required. The annotation to create. - * @type string $annotation_id - * Optional. The ID to use for the annotation, which will become the final - * component of the annotation's resource name if user choose to specify. - * Otherwise, annotation id will be generated by system. - * This value should be up to 63 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this annotation will be created. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource where this annotation will be created. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The annotation to create. - * - * Generated from protobuf field .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Annotation|null - */ - public function getAnnotation() - { - return $this->annotation; - } - - public function hasAnnotation() - { - return isset($this->annotation); - } - - public function clearAnnotation() - { - unset($this->annotation); - } - - /** - * Required. The annotation to create. - * - * Generated from protobuf field .google.cloud.visionai.v1.Annotation annotation = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Annotation $var - * @return $this - */ - public function setAnnotation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Annotation::class); - $this->annotation = $var; - - return $this; - } - - /** - * Optional. The ID to use for the annotation, which will become the final - * component of the annotation's resource name if user choose to specify. - * Otherwise, annotation id will be generated by system. - * This value should be up to 63 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * - * Generated from protobuf field optional string annotation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAnnotationId() - { - return isset($this->annotation_id) ? $this->annotation_id : ''; - } - - public function hasAnnotationId() - { - return isset($this->annotation_id); - } - - public function clearAnnotationId() - { - unset($this->annotation_id); - } - - /** - * Optional. The ID to use for the annotation, which will become the final - * component of the annotation's resource name if user choose to specify. - * Otherwise, annotation id will be generated by system. - * This value should be up to 63 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * - * Generated from protobuf field optional string annotation_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAnnotationId($var) - { - GPBUtil::checkString($var, True); - $this->annotation_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationInstancesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationInstancesRequest.php deleted file mode 100644 index 5ef5e8285f61..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationInstancesRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.visionai.v1.CreateApplicationInstancesRequest - */ -class CreateApplicationInstancesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. The resources being created. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $application_instances; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * Please see {@see AppPlatformClient::applicationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\CreateApplicationInstancesRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * @type \Google\Cloud\VisionAI\V1\ApplicationInstance[] $application_instances - * Required. The resources being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * 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 resources being created. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\ApplicationInstance> - */ - public function getApplicationInstances() - { - return $this->application_instances; - } - - /** - * Required. The resources being created. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationInstance application_instances = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\ApplicationInstance[] $var - * @return $this - */ - public function setApplicationInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ApplicationInstance::class); - $this->application_instances = $arr; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationInstancesResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationInstancesResponse.php deleted file mode 100644 index 012853feabfa..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationInstancesResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.CreateApplicationInstancesResponse - */ -class CreateApplicationInstancesResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationRequest.php deleted file mode 100644 index 645d9c345abe..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateApplicationRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.visionai.v1.CreateApplicationRequest - */ -class CreateApplicationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $application_id = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $application = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see AppPlatformClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\Application $application Required. The resource being created. - * - * @return \Google\Cloud\VisionAI\V1\CreateApplicationRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\Application $application): self - { - return (new self()) - ->setParent($parent) - ->setApplication($application); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $application_id - * Required. Id of the requesting object. - * @type \Google\Cloud\VisionAI\V1\Application $application - * Required. The resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * 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. Value for parent. - * - * 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. Id of the requesting object. - * - * Generated from protobuf field string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getApplicationId() - { - return $this->application_id; - } - - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string application_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setApplicationId($var) - { - GPBUtil::checkString($var, True); - $this->application_id = $var; - - return $this; - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Application|null - */ - public function getApplication() - { - return $this->application; - } - - public function hasApplication() - { - return isset($this->application); - } - - public function clearApplication() - { - unset($this->application); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Application application = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Application $var - * @return $this - */ - public function setApplication($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Application::class); - $this->application = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAssetRequest.php deleted file mode 100644 index b79991cb552f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateAssetRequest.php +++ /dev/null @@ -1,209 +0,0 @@ -google.cloud.visionai.v1.CreateAssetRequest - */ -class CreateAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this asset will be created. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The asset to create. - * - * Generated from protobuf field .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $asset = null; - /** - * Optional. The ID to use for the asset, which will become the final - * component of the asset's resource name if user choose to specify. - * Otherwise, asset id will be generated by system. - * This value should be up to 63 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * - * Generated from protobuf field optional string asset_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $asset_id = null; - - /** - * @param string $parent Required. The parent resource where this asset will be created. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * Please see {@see WarehouseClient::corpusName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\Asset $asset Required. The asset to create. - * @param string $assetId Optional. The ID to use for the asset, which will become the final - * component of the asset's resource name if user choose to specify. - * Otherwise, asset id will be generated by system. - * - * This value should be up to 63 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * - * @return \Google\Cloud\VisionAI\V1\CreateAssetRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\Asset $asset, string $assetId): self - { - return (new self()) - ->setParent($parent) - ->setAsset($asset) - ->setAssetId($assetId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource where this asset will be created. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * @type \Google\Cloud\VisionAI\V1\Asset $asset - * Required. The asset to create. - * @type string $asset_id - * Optional. The ID to use for the asset, which will become the final - * component of the asset's resource name if user choose to specify. - * Otherwise, asset id will be generated by system. - * This value should be up to 63 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this asset will be created. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource where this asset will be created. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The asset to create. - * - * Generated from protobuf field .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Asset|null - */ - public function getAsset() - { - return $this->asset; - } - - public function hasAsset() - { - return isset($this->asset); - } - - public function clearAsset() - { - unset($this->asset); - } - - /** - * Required. The asset to create. - * - * Generated from protobuf field .google.cloud.visionai.v1.Asset asset = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Asset $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Asset::class); - $this->asset = $var; - - return $this; - } - - /** - * Optional. The ID to use for the asset, which will become the final - * component of the asset's resource name if user choose to specify. - * Otherwise, asset id will be generated by system. - * This value should be up to 63 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * - * Generated from protobuf field optional string asset_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAssetId() - { - return isset($this->asset_id) ? $this->asset_id : ''; - } - - public function hasAssetId() - { - return isset($this->asset_id); - } - - public function clearAssetId() - { - unset($this->asset_id); - } - - /** - * Optional. The ID to use for the asset, which will become the final - * component of the asset's resource name if user choose to specify. - * Otherwise, asset id will be generated by system. - * This value should be up to 63 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * - * Generated from protobuf field optional string asset_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAssetId($var) - { - GPBUtil::checkString($var, True); - $this->asset_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateClusterRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateClusterRequest.php deleted file mode 100644 index e767a28bf3c6..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateClusterRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.visionai.v1.CreateClusterRequest - */ -class CreateClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster_id = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see StreamsServiceClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\Cluster $cluster Required. The resource being created. - * @param string $clusterId Required. Id of the requesting object. - * - * @return \Google\Cloud\VisionAI\V1\CreateClusterRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\Cluster $cluster, string $clusterId): self - { - return (new self()) - ->setParent($parent) - ->setCluster($cluster) - ->setClusterId($clusterId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $cluster_id - * Required. Id of the requesting object. - * @type \Google\Cloud\VisionAI\V1\Cluster $cluster - * Required. The resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * 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. Value for parent. - * - * 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. Id of the requesting object. - * - * Generated from protobuf field string cluster_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getClusterId() - { - return $this->cluster_id; - } - - /** - * Required. Id of the requesting object. - * - * 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 resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Cluster|null - */ - public function getCluster() - { - return $this->cluster; - } - - public function hasCluster() - { - return isset($this->cluster); - } - - public function clearCluster() - { - unset($this->cluster); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Cluster cluster = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Cluster $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Cluster::class); - $this->cluster = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCollectionMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCollectionMetadata.php deleted file mode 100644 index ab6a9ba38059..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCollectionMetadata.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.visionai.v1.CreateCollectionMetadata - */ -class CreateCollectionMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - */ - protected $operation_metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\OperationMetadata $operation_metadata - * Common metadata of the long-running operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null - */ - public function getOperationMetadata() - { - return $this->operation_metadata; - } - - public function hasOperationMetadata() - { - return isset($this->operation_metadata); - } - - public function clearOperationMetadata() - { - unset($this->operation_metadata); - } - - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var - * @return $this - */ - public function setOperationMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); - $this->operation_metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCollectionRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCollectionRequest.php deleted file mode 100644 index 211a5d7e2bc0..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCollectionRequest.php +++ /dev/null @@ -1,204 +0,0 @@ -google.cloud.visionai.v1.CreateCollectionRequest - */ -class CreateCollectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this collection will be created. - * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The collection resource to be created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $collection = null; - /** - * Optional. The ID to use for the collection, which will become the final - * component of the resource name if user choose to specify. Otherwise, - * collection id will be generated by system. - * This value should be up to 55 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * - * Generated from protobuf field optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $collection_id = null; - - /** - * @param string $parent Required. The parent resource where this collection will be created. - * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` - * Please see {@see WarehouseClient::corpusName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\Collection $collection Required. The collection resource to be created. - * @param string $collectionId Optional. The ID to use for the collection, which will become the final - * component of the resource name if user choose to specify. Otherwise, - * collection id will be generated by system. - * - * This value should be up to 55 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * - * @return \Google\Cloud\VisionAI\V1\CreateCollectionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\Collection $collection, string $collectionId): self - { - return (new self()) - ->setParent($parent) - ->setCollection($collection) - ->setCollectionId($collectionId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource where this collection will be created. - * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` - * @type \Google\Cloud\VisionAI\V1\Collection $collection - * Required. The collection resource to be created. - * @type string $collection_id - * Optional. The ID to use for the collection, which will become the final - * component of the resource name if user choose to specify. Otherwise, - * collection id will be generated by system. - * This value should be up to 55 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this collection will be created. - * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource where this collection will be created. - * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * 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 collection resource to be created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Collection|null - */ - public function getCollection() - { - return $this->collection; - } - - public function hasCollection() - { - return isset($this->collection); - } - - public function clearCollection() - { - unset($this->collection); - } - - /** - * Required. The collection resource to be created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Collection collection = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Collection $var - * @return $this - */ - public function setCollection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Collection::class); - $this->collection = $var; - - return $this; - } - - /** - * Optional. The ID to use for the collection, which will become the final - * component of the resource name if user choose to specify. Otherwise, - * collection id will be generated by system. - * This value should be up to 55 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * - * Generated from protobuf field optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getCollectionId() - { - return isset($this->collection_id) ? $this->collection_id : ''; - } - - public function hasCollectionId() - { - return isset($this->collection_id); - } - - public function clearCollectionId() - { - unset($this->collection_id); - } - - /** - * Optional. The ID to use for the collection, which will become the final - * component of the resource name if user choose to specify. Otherwise, - * collection id will be generated by system. - * This value should be up to 55 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * - * Generated from protobuf field optional string collection_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setCollectionId($var) - { - GPBUtil::checkString($var, True); - $this->collection_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCorpusMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCorpusMetadata.php deleted file mode 100644 index 476cec0221d2..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCorpusMetadata.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.visionai.v1.CreateCorpusMetadata - */ -class CreateCorpusMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The create time of the create corpus operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - */ - protected $create_time = null; - /** - * The update time of the create corpus operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * The create time of the create corpus operation. - * @type \Google\Protobuf\Timestamp $update_time - * The update time of the create corpus operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The create time of the create corpus operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - * @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); - } - - /** - * The create time of the create corpus operation. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2; - * @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 update time of the create corpus operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The update time of the create corpus operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCorpusRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCorpusRequest.php deleted file mode 100644 index c8b27751b970..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateCorpusRequest.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.visionai.v1.CreateCorpusRequest - */ -class CreateCorpusRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Form: `projects/{project_number}/locations/{location_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Required. The corpus to be created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $corpus = null; - - /** - * @param string $parent Required. Form: `projects/{project_number}/locations/{location_id}` - * @param \Google\Cloud\VisionAI\V1\Corpus $corpus Required. The corpus to be created. - * - * @return \Google\Cloud\VisionAI\V1\CreateCorpusRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\Corpus $corpus): self - { - return (new self()) - ->setParent($parent) - ->setCorpus($corpus); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Form: `projects/{project_number}/locations/{location_id}` - * @type \Google\Cloud\VisionAI\V1\Corpus $corpus - * Required. The corpus to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. Form: `projects/{project_number}/locations/{location_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Form: `projects/{project_number}/locations/{location_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The corpus to be created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Corpus|null - */ - public function getCorpus() - { - return $this->corpus; - } - - public function hasCorpus() - { - return isset($this->corpus); - } - - public function clearCorpus() - { - unset($this->corpus); - } - - /** - * Required. The corpus to be created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Corpus corpus = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Corpus $var - * @return $this - */ - public function setCorpus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Corpus::class); - $this->corpus = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateDataSchemaRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateDataSchemaRequest.php deleted file mode 100644 index 42876e401591..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateDataSchemaRequest.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.visionai.v1.CreateDataSchemaRequest - */ -class CreateDataSchemaRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this data schema will be created. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The data schema to create. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_schema = null; - - /** - * @param string $parent Required. The parent resource where this data schema will be created. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * Please see {@see WarehouseClient::corpusName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\DataSchema $dataSchema Required. The data schema to create. - * - * @return \Google\Cloud\VisionAI\V1\CreateDataSchemaRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\DataSchema $dataSchema): self - { - return (new self()) - ->setParent($parent) - ->setDataSchema($dataSchema); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource where this data schema will be created. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * @type \Google\Cloud\VisionAI\V1\DataSchema $data_schema - * Required. The data schema to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this data schema will be created. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource where this data schema will be created. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The data schema to create. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\DataSchema|null - */ - public function getDataSchema() - { - return $this->data_schema; - } - - public function hasDataSchema() - { - return isset($this->data_schema); - } - - public function clearDataSchema() - { - unset($this->data_schema); - } - - /** - * Required. The data schema to create. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchema data_schema = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\DataSchema $var - * @return $this - */ - public function setDataSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DataSchema::class); - $this->data_schema = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateDraftRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateDraftRequest.php deleted file mode 100644 index c9843ad39f4c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateDraftRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.visionai.v1.CreateDraftRequest - */ -class CreateDraftRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string draft_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $draft_id = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $draft = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see AppPlatformClient::applicationName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\Draft $draft Required. The resource being created. - * @param string $draftId Required. Id of the requesting object. - * - * @return \Google\Cloud\VisionAI\V1\CreateDraftRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\Draft $draft, string $draftId): self - { - return (new self()) - ->setParent($parent) - ->setDraft($draft) - ->setDraftId($draftId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $draft_id - * Required. Id of the requesting object. - * @type \Google\Cloud\VisionAI\V1\Draft $draft - * Required. The resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * 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. Value for parent. - * - * 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. Id of the requesting object. - * - * Generated from protobuf field string draft_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDraftId() - { - return $this->draft_id; - } - - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string draft_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDraftId($var) - { - GPBUtil::checkString($var, True); - $this->draft_id = $var; - - return $this; - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Draft|null - */ - public function getDraft() - { - return $this->draft; - } - - public function hasDraft() - { - return isset($this->draft); - } - - public function clearDraft() - { - unset($this->draft); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Draft draft = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Draft $var - * @return $this - */ - public function setDraft($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Draft::class); - $this->draft = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateEventRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateEventRequest.php deleted file mode 100644 index d695ee1d3d78..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateEventRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.visionai.v1.CreateEventRequest - */ -class CreateEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $event_id = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $event = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see StreamsServiceClient::clusterName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\Event $event Required. The resource being created. - * @param string $eventId Required. Id of the requesting object. - * - * @return \Google\Cloud\VisionAI\V1\CreateEventRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\Event $event, string $eventId): self - { - return (new self()) - ->setParent($parent) - ->setEvent($event) - ->setEventId($eventId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $event_id - * Required. Id of the requesting object. - * @type \Google\Cloud\VisionAI\V1\Event $event - * Required. The resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * 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. Value for parent. - * - * 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. Id of the requesting object. - * - * Generated from protobuf field string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEventId() - { - return $this->event_id; - } - - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string event_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEventId($var) - { - GPBUtil::checkString($var, True); - $this->event_id = $var; - - return $this; - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Event|null - */ - public function getEvent() - { - return $this->event; - } - - public function hasEvent() - { - return isset($this->event); - } - - public function clearEvent() - { - unset($this->event); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Event event = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Event $var - * @return $this - */ - public function setEvent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Event::class); - $this->event = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexEndpointMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexEndpointMetadata.php deleted file mode 100644 index ac9c1c21d5a3..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexEndpointMetadata.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.visionai.v1.CreateIndexEndpointMetadata - */ -class CreateIndexEndpointMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - */ - protected $operation_metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\OperationMetadata $operation_metadata - * Common metadata of the long-running operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null - */ - public function getOperationMetadata() - { - return $this->operation_metadata; - } - - public function hasOperationMetadata() - { - return isset($this->operation_metadata); - } - - public function clearOperationMetadata() - { - unset($this->operation_metadata); - } - - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var - * @return $this - */ - public function setOperationMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); - $this->operation_metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexEndpointRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexEndpointRequest.php deleted file mode 100644 index a735cde5006e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexEndpointRequest.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.visionai.v1.CreateIndexEndpointRequest - */ -class CreateIndexEndpointRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The ID to use for the IndexEndpoint, which will become the final - * component of the IndexEndpoint's resource name if the user specifies it. - * Otherwise, IndexEndpoint id will be autogenerated. - * This value should be up to 63 characters, and valid characters - * are a-z, 0-9 and dash (-). The first character must be a letter, the last - * must be a letter or a number. - * - * Generated from protobuf field string index_endpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $index_endpoint_id = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $index_endpoint = null; - - /** - * @param string $parent Required. Format: `projects/{project}/locations/{location}` - * Please see {@see WarehouseClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\IndexEndpoint $indexEndpoint Required. The resource being created. - * @param string $indexEndpointId Optional. The ID to use for the IndexEndpoint, which will become the final - * component of the IndexEndpoint's resource name if the user specifies it. - * Otherwise, IndexEndpoint id will be autogenerated. - * - * This value should be up to 63 characters, and valid characters - * are a-z, 0-9 and dash (-). The first character must be a letter, the last - * must be a letter or a number. - * - * @return \Google\Cloud\VisionAI\V1\CreateIndexEndpointRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\IndexEndpoint $indexEndpoint, string $indexEndpointId): self - { - return (new self()) - ->setParent($parent) - ->setIndexEndpoint($indexEndpoint) - ->setIndexEndpointId($indexEndpointId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Format: `projects/{project}/locations/{location}` - * @type string $index_endpoint_id - * Optional. The ID to use for the IndexEndpoint, which will become the final - * component of the IndexEndpoint's resource name if the user specifies it. - * Otherwise, IndexEndpoint id will be autogenerated. - * This value should be up to 63 characters, and valid characters - * are a-z, 0-9 and dash (-). The first character must be a letter, the last - * must be a letter or a number. - * @type \Google\Cloud\VisionAI\V1\IndexEndpoint $index_endpoint - * Required. The resource being created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: `projects/{project}/locations/{location}` - * - * 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. Format: `projects/{project}/locations/{location}` - * - * 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; - } - - /** - * Optional. The ID to use for the IndexEndpoint, which will become the final - * component of the IndexEndpoint's resource name if the user specifies it. - * Otherwise, IndexEndpoint id will be autogenerated. - * This value should be up to 63 characters, and valid characters - * are a-z, 0-9 and dash (-). The first character must be a letter, the last - * must be a letter or a number. - * - * Generated from protobuf field string index_endpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getIndexEndpointId() - { - return $this->index_endpoint_id; - } - - /** - * Optional. The ID to use for the IndexEndpoint, which will become the final - * component of the IndexEndpoint's resource name if the user specifies it. - * Otherwise, IndexEndpoint id will be autogenerated. - * This value should be up to 63 characters, and valid characters - * are a-z, 0-9 and dash (-). The first character must be a letter, the last - * must be a letter or a number. - * - * Generated from protobuf field string index_endpoint_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setIndexEndpointId($var) - { - GPBUtil::checkString($var, True); - $this->index_endpoint_id = $var; - - return $this; - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\IndexEndpoint|null - */ - public function getIndexEndpoint() - { - return $this->index_endpoint; - } - - public function hasIndexEndpoint() - { - return isset($this->index_endpoint); - } - - public function clearIndexEndpoint() - { - unset($this->index_endpoint); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\IndexEndpoint $var - * @return $this - */ - public function setIndexEndpoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\IndexEndpoint::class); - $this->index_endpoint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexMetadata.php deleted file mode 100644 index 9ee79340c56f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexMetadata.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.visionai.v1.CreateIndexMetadata - */ -class CreateIndexMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - */ - protected $operation_metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\OperationMetadata $operation_metadata - * Common metadata of the long-running operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null - */ - public function getOperationMetadata() - { - return $this->operation_metadata; - } - - public function hasOperationMetadata() - { - return isset($this->operation_metadata); - } - - public function clearOperationMetadata() - { - unset($this->operation_metadata); - } - - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var - * @return $this - */ - public function setOperationMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); - $this->operation_metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexRequest.php deleted file mode 100644 index c75a6cfbc77f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateIndexRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.visionai.v1.CreateIndexRequest - */ -class CreateIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for the parent. The resource name of the Corpus under which - * this index is created. Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The ID for the index. This will become the final resource name - * for the index. If the user does not specify this value, it will be - * generated by system. - * This value should be up to 63 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * - * Generated from protobuf field string index_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $index_id = ''; - /** - * Required. The index being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $index = null; - - /** - * @param string $parent Required. Value for the parent. The resource name of the Corpus under which - * this index is created. Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * Please see {@see WarehouseClient::corpusName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\Index $index Required. The index being created. - * @param string $indexId Optional. The ID for the index. This will become the final resource name - * for the index. If the user does not specify this value, it will be - * generated by system. - * - * This value should be up to 63 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * - * @return \Google\Cloud\VisionAI\V1\CreateIndexRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\Index $index, string $indexId): self - { - return (new self()) - ->setParent($parent) - ->setIndex($index) - ->setIndexId($indexId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for the parent. The resource name of the Corpus under which - * this index is created. Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * @type string $index_id - * Optional. The ID for the index. This will become the final resource name - * for the index. If the user does not specify this value, it will be - * generated by system. - * This value should be up to 63 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * @type \Google\Cloud\VisionAI\V1\Index $index - * Required. The index being created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for the parent. The resource name of the Corpus under which - * this index is created. Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Value for the parent. The resource name of the Corpus under which - * this index is created. Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Optional. The ID for the index. This will become the final resource name - * for the index. If the user does not specify this value, it will be - * generated by system. - * This value should be up to 63 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * - * Generated from protobuf field string index_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getIndexId() - { - return $this->index_id; - } - - /** - * Optional. The ID for the index. This will become the final resource name - * for the index. If the user does not specify this value, it will be - * generated by system. - * This value should be up to 63 characters, and valid characters - * are /[a-z][0-9]-/. The first character must be a letter, the last could be - * a letter or a number. - * - * Generated from protobuf field string index_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setIndexId($var) - { - GPBUtil::checkString($var, True); - $this->index_id = $var; - - return $this; - } - - /** - * Required. The index being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Index|null - */ - public function getIndex() - { - return $this->index; - } - - public function hasIndex() - { - return isset($this->index); - } - - public function clearIndex() - { - unset($this->index); - } - - /** - * Required. The index being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Index index = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Index $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Index::class); - $this->index = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateOperatorRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateOperatorRequest.php deleted file mode 100644 index b07cd75ebb9f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateOperatorRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.visionai.v1.CreateOperatorRequest - */ -class CreateOperatorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string operator_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $operator_id = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $operator = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see LiveVideoAnalyticsClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\Operator $operator Required. The resource being created. - * @param string $operatorId Required. Id of the requesting object. - * - * @return \Google\Cloud\VisionAI\V1\CreateOperatorRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\Operator $operator, string $operatorId): self - { - return (new self()) - ->setParent($parent) - ->setOperator($operator) - ->setOperatorId($operatorId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $operator_id - * Required. Id of the requesting object. - * @type \Google\Cloud\VisionAI\V1\Operator $operator - * Required. The resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * 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. Value for parent. - * - * 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. Id of the requesting object. - * - * Generated from protobuf field string operator_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getOperatorId() - { - return $this->operator_id; - } - - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string operator_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setOperatorId($var) - { - GPBUtil::checkString($var, True); - $this->operator_id = $var; - - return $this; - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Operator|null - */ - public function getOperator() - { - return $this->operator; - } - - public function hasOperator() - { - return isset($this->operator); - } - - public function clearOperator() - { - unset($this->operator); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Operator operator = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Operator $var - * @return $this - */ - public function setOperator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Operator::class); - $this->operator = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateProcessRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateProcessRequest.php deleted file mode 100644 index bdf12be7cf7e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateProcessRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.visionai.v1.CreateProcessRequest - */ -class CreateProcessRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string process_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $process_id = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $process = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see LiveVideoAnalyticsClient::clusterName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\Process $process Required. The resource being created. - * @param string $processId Required. Id of the requesting object. - * - * @return \Google\Cloud\VisionAI\V1\CreateProcessRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\Process $process, string $processId): self - { - return (new self()) - ->setParent($parent) - ->setProcess($process) - ->setProcessId($processId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $process_id - * Required. Id of the requesting object. - * @type \Google\Cloud\VisionAI\V1\Process $process - * Required. The resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * 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. Value for parent. - * - * 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. Id of the requesting object. - * - * Generated from protobuf field string process_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProcessId() - { - return $this->process_id; - } - - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string process_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProcessId($var) - { - GPBUtil::checkString($var, True); - $this->process_id = $var; - - return $this; - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Process|null - */ - public function getProcess() - { - return $this->process; - } - - public function hasProcess() - { - return isset($this->process); - } - - public function clearProcess() - { - unset($this->process); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Process process = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Process $var - * @return $this - */ - public function setProcess($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Process::class); - $this->process = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateProcessorRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateProcessorRequest.php deleted file mode 100644 index 93bf4b093abe..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateProcessorRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.visionai.v1.CreateProcessorRequest - */ -class CreateProcessorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string processor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $processor_id = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $processor = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see AppPlatformClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\Processor $processor Required. The resource being created. - * @param string $processorId Required. Id of the requesting object. - * - * @return \Google\Cloud\VisionAI\V1\CreateProcessorRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\Processor $processor, string $processorId): self - { - return (new self()) - ->setParent($parent) - ->setProcessor($processor) - ->setProcessorId($processorId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $processor_id - * Required. Id of the requesting object. - * @type \Google\Cloud\VisionAI\V1\Processor $processor - * Required. The resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * 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. Value for parent. - * - * 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. Id of the requesting object. - * - * Generated from protobuf field string processor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getProcessorId() - { - return $this->processor_id; - } - - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string processor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setProcessorId($var) - { - GPBUtil::checkString($var, True); - $this->processor_id = $var; - - return $this; - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Processor|null - */ - public function getProcessor() - { - return $this->processor; - } - - public function hasProcessor() - { - return isset($this->processor); - } - - public function clearProcessor() - { - unset($this->processor); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Processor processor = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Processor $var - * @return $this - */ - public function setProcessor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Processor::class); - $this->processor = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSearchConfigRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSearchConfigRequest.php deleted file mode 100644 index 0a20460800d7..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSearchConfigRequest.php +++ /dev/null @@ -1,188 +0,0 @@ -google.cloud.visionai.v1.CreateSearchConfigRequest - */ -class CreateSearchConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this search configuration will be - * created. Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The search config to create. - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $search_config = null; - /** - * Required. ID to use for the new search config. Will become the final - * component of the SearchConfig's resource name. This value should be up to - * 63 characters, and valid characters are /[a-z][0-9]-_/. The first character - * must be a letter, the last could be a letter or a number. - * - * Generated from protobuf field string search_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $search_config_id = ''; - - /** - * @param string $parent Required. The parent resource where this search configuration will be - * created. Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * Please see {@see WarehouseClient::corpusName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\SearchConfig $searchConfig Required. The search config to create. - * @param string $searchConfigId Required. ID to use for the new search config. Will become the final - * component of the SearchConfig's resource name. This value should be up to - * 63 characters, and valid characters are /[a-z][0-9]-_/. The first character - * must be a letter, the last could be a letter or a number. - * - * @return \Google\Cloud\VisionAI\V1\CreateSearchConfigRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\SearchConfig $searchConfig, string $searchConfigId): self - { - return (new self()) - ->setParent($parent) - ->setSearchConfig($searchConfig) - ->setSearchConfigId($searchConfigId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource where this search configuration will be - * created. Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * @type \Google\Cloud\VisionAI\V1\SearchConfig $search_config - * Required. The search config to create. - * @type string $search_config_id - * Required. ID to use for the new search config. Will become the final - * component of the SearchConfig's resource name. This value should be up to - * 63 characters, and valid characters are /[a-z][0-9]-_/. The first character - * must be a letter, the last could be a letter or a number. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this search configuration will be - * created. Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource where this search configuration will be - * created. Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Required. The search config to create. - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\SearchConfig|null - */ - public function getSearchConfig() - { - return $this->search_config; - } - - public function hasSearchConfig() - { - return isset($this->search_config); - } - - public function clearSearchConfig() - { - unset($this->search_config); - } - - /** - * Required. The search config to create. - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchConfig search_config = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\SearchConfig $var - * @return $this - */ - public function setSearchConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\SearchConfig::class); - $this->search_config = $var; - - return $this; - } - - /** - * Required. ID to use for the new search config. Will become the final - * component of the SearchConfig's resource name. This value should be up to - * 63 characters, and valid characters are /[a-z][0-9]-_/. The first character - * must be a letter, the last could be a letter or a number. - * - * Generated from protobuf field string search_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSearchConfigId() - { - return $this->search_config_id; - } - - /** - * Required. ID to use for the new search config. Will become the final - * component of the SearchConfig's resource name. This value should be up to - * 63 characters, and valid characters are /[a-z][0-9]-_/. The first character - * must be a letter, the last could be a letter or a number. - * - * Generated from protobuf field string search_config_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSearchConfigId($var) - { - GPBUtil::checkString($var, True); - $this->search_config_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSearchHypernymRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSearchHypernymRequest.php deleted file mode 100644 index f353d767c03c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSearchHypernymRequest.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.visionai.v1.CreateSearchHypernymRequest - */ -class CreateSearchHypernymRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource where this SearchHypernym will be created. - * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The SearchHypernym to create. - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $search_hypernym = null; - /** - * Optional. The search hypernym id. - * If omitted, a random UUID will be generated. - * - * Generated from protobuf field optional string search_hypernym_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $search_hypernym_id = null; - - /** - * @param string $parent Required. The parent resource where this SearchHypernym will be created. - * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` - * Please see {@see WarehouseClient::corpusName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\SearchHypernym $searchHypernym Required. The SearchHypernym to create. - * @param string $searchHypernymId Optional. The search hypernym id. - * If omitted, a random UUID will be generated. - * - * @return \Google\Cloud\VisionAI\V1\CreateSearchHypernymRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\SearchHypernym $searchHypernym, string $searchHypernymId): self - { - return (new self()) - ->setParent($parent) - ->setSearchHypernym($searchHypernym) - ->setSearchHypernymId($searchHypernymId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource where this SearchHypernym will be created. - * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` - * @type \Google\Cloud\VisionAI\V1\SearchHypernym $search_hypernym - * Required. The SearchHypernym to create. - * @type string $search_hypernym_id - * Optional. The search hypernym id. - * If omitted, a random UUID will be generated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource where this SearchHypernym will be created. - * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent resource where this SearchHypernym will be created. - * Format: `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * 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 SearchHypernym to create. - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\SearchHypernym|null - */ - public function getSearchHypernym() - { - return $this->search_hypernym; - } - - public function hasSearchHypernym() - { - return isset($this->search_hypernym); - } - - public function clearSearchHypernym() - { - unset($this->search_hypernym); - } - - /** - * Required. The SearchHypernym to create. - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchHypernym search_hypernym = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\SearchHypernym $var - * @return $this - */ - public function setSearchHypernym($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\SearchHypernym::class); - $this->search_hypernym = $var; - - return $this; - } - - /** - * Optional. The search hypernym id. - * If omitted, a random UUID will be generated. - * - * Generated from protobuf field optional string search_hypernym_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getSearchHypernymId() - { - return isset($this->search_hypernym_id) ? $this->search_hypernym_id : ''; - } - - public function hasSearchHypernymId() - { - return isset($this->search_hypernym_id); - } - - public function clearSearchHypernymId() - { - unset($this->search_hypernym_id); - } - - /** - * Optional. The search hypernym id. - * If omitted, a random UUID will be generated. - * - * Generated from protobuf field optional string search_hypernym_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setSearchHypernymId($var) - { - GPBUtil::checkString($var, True); - $this->search_hypernym_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSeriesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSeriesRequest.php deleted file mode 100644 index d738327ece8d..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateSeriesRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.visionai.v1.CreateSeriesRequest - */ -class CreateSeriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string series_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $series_id = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $series = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see StreamsServiceClient::clusterName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\Series $series Required. The resource being created. - * @param string $seriesId Required. Id of the requesting object. - * - * @return \Google\Cloud\VisionAI\V1\CreateSeriesRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\Series $series, string $seriesId): self - { - return (new self()) - ->setParent($parent) - ->setSeries($series) - ->setSeriesId($seriesId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $series_id - * Required. Id of the requesting object. - * @type \Google\Cloud\VisionAI\V1\Series $series - * Required. The resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * 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. Value for parent. - * - * 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. Id of the requesting object. - * - * Generated from protobuf field string series_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getSeriesId() - { - return $this->series_id; - } - - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string series_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setSeriesId($var) - { - GPBUtil::checkString($var, True); - $this->series_id = $var; - - return $this; - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Series|null - */ - public function getSeries() - { - return $this->series; - } - - public function hasSeries() - { - return isset($this->series); - } - - public function clearSeries() - { - unset($this->series); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Series series = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Series $var - * @return $this - */ - public function setSeries($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Series::class); - $this->series = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateStreamRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateStreamRequest.php deleted file mode 100644 index 2d57c7628a8f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CreateStreamRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.visionai.v1.CreateStreamRequest - */ -class CreateStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $stream_id = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $stream = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see StreamsServiceClient::clusterName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\Stream $stream Required. The resource being created. - * @param string $streamId Required. Id of the requesting object. - * - * @return \Google\Cloud\VisionAI\V1\CreateStreamRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\Stream $stream, string $streamId): self - { - return (new self()) - ->setParent($parent) - ->setStream($stream) - ->setStreamId($streamId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $stream_id - * Required. Id of the requesting object. - * @type \Google\Cloud\VisionAI\V1\Stream $stream - * Required. The resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * 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. Value for parent. - * - * 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. Id of the requesting object. - * - * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getStreamId() - { - return $this->stream_id; - } - - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field string stream_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setStreamId($var) - { - GPBUtil::checkString($var, True); - $this->stream_id = $var; - - return $this; - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Stream|null - */ - public function getStream() - { - return $this->stream; - } - - public function hasStream() - { - return isset($this->stream); - } - - public function clearStream() - { - unset($this->stream); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Stream stream = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Stream $var - * @return $this - */ - public function setStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Stream::class); - $this->stream = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Criteria.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Criteria.php deleted file mode 100644 index 49d090a199b6..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Criteria.php +++ /dev/null @@ -1,336 +0,0 @@ -google.cloud.visionai.v1.Criteria - */ -class Criteria extends \Google\Protobuf\Internal\Message -{ - /** - * The UGA field or ML field to apply filtering criteria. - * - * Generated from protobuf field string field = 1; - */ - protected $field = ''; - /** - * If true, return query matched annotations for this criteria. - * This option is only applicable for inclusion criteria, i.e., not exclusion - * criteria, with partition level annotations. It supports the following data - * types: - * - INTEGER - * - FLOAT - * - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only) - * - BOOLEAN - * - * Generated from protobuf field bool fetch_matched_annotations = 8; - */ - protected $fetch_matched_annotations = false; - protected $value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\StringArray $text_array - * The text values associated with the field. - * @type \Google\Cloud\VisionAI\V1\IntRangeArray $int_range_array - * The integer ranges associated with the field. - * @type \Google\Cloud\VisionAI\V1\FloatRangeArray $float_range_array - * The float ranges associated with the field. - * @type \Google\Cloud\VisionAI\V1\DateTimeRangeArray $date_time_range_array - * The datetime ranges associated with the field. - * @type \Google\Cloud\VisionAI\V1\GeoLocationArray $geo_location_array - * Geo Location array. - * @type \Google\Cloud\VisionAI\V1\BoolValue $bool_value - * A Boolean value. - * @type string $field - * The UGA field or ML field to apply filtering criteria. - * @type bool $fetch_matched_annotations - * If true, return query matched annotations for this criteria. - * This option is only applicable for inclusion criteria, i.e., not exclusion - * criteria, with partition level annotations. It supports the following data - * types: - * - INTEGER - * - FLOAT - * - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only) - * - BOOLEAN - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The text values associated with the field. - * - * Generated from protobuf field .google.cloud.visionai.v1.StringArray text_array = 2; - * @return \Google\Cloud\VisionAI\V1\StringArray|null - */ - public function getTextArray() - { - return $this->readOneof(2); - } - - public function hasTextArray() - { - return $this->hasOneof(2); - } - - /** - * The text values associated with the field. - * - * Generated from protobuf field .google.cloud.visionai.v1.StringArray text_array = 2; - * @param \Google\Cloud\VisionAI\V1\StringArray $var - * @return $this - */ - public function setTextArray($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\StringArray::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The integer ranges associated with the field. - * - * Generated from protobuf field .google.cloud.visionai.v1.IntRangeArray int_range_array = 3; - * @return \Google\Cloud\VisionAI\V1\IntRangeArray|null - */ - public function getIntRangeArray() - { - return $this->readOneof(3); - } - - public function hasIntRangeArray() - { - return $this->hasOneof(3); - } - - /** - * The integer ranges associated with the field. - * - * Generated from protobuf field .google.cloud.visionai.v1.IntRangeArray int_range_array = 3; - * @param \Google\Cloud\VisionAI\V1\IntRangeArray $var - * @return $this - */ - public function setIntRangeArray($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\IntRangeArray::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The float ranges associated with the field. - * - * Generated from protobuf field .google.cloud.visionai.v1.FloatRangeArray float_range_array = 4; - * @return \Google\Cloud\VisionAI\V1\FloatRangeArray|null - */ - public function getFloatRangeArray() - { - return $this->readOneof(4); - } - - public function hasFloatRangeArray() - { - return $this->hasOneof(4); - } - - /** - * The float ranges associated with the field. - * - * Generated from protobuf field .google.cloud.visionai.v1.FloatRangeArray float_range_array = 4; - * @param \Google\Cloud\VisionAI\V1\FloatRangeArray $var - * @return $this - */ - public function setFloatRangeArray($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FloatRangeArray::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * The datetime ranges associated with the field. - * - * Generated from protobuf field .google.cloud.visionai.v1.DateTimeRangeArray date_time_range_array = 5; - * @return \Google\Cloud\VisionAI\V1\DateTimeRangeArray|null - */ - public function getDateTimeRangeArray() - { - return $this->readOneof(5); - } - - public function hasDateTimeRangeArray() - { - return $this->hasOneof(5); - } - - /** - * The datetime ranges associated with the field. - * - * Generated from protobuf field .google.cloud.visionai.v1.DateTimeRangeArray date_time_range_array = 5; - * @param \Google\Cloud\VisionAI\V1\DateTimeRangeArray $var - * @return $this - */ - public function setDateTimeRangeArray($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DateTimeRangeArray::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Geo Location array. - * - * Generated from protobuf field .google.cloud.visionai.v1.GeoLocationArray geo_location_array = 6; - * @return \Google\Cloud\VisionAI\V1\GeoLocationArray|null - */ - public function getGeoLocationArray() - { - return $this->readOneof(6); - } - - public function hasGeoLocationArray() - { - return $this->hasOneof(6); - } - - /** - * Geo Location array. - * - * Generated from protobuf field .google.cloud.visionai.v1.GeoLocationArray geo_location_array = 6; - * @param \Google\Cloud\VisionAI\V1\GeoLocationArray $var - * @return $this - */ - public function setGeoLocationArray($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\GeoLocationArray::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * A Boolean value. - * - * Generated from protobuf field .google.cloud.visionai.v1.BoolValue bool_value = 7; - * @return \Google\Cloud\VisionAI\V1\BoolValue|null - */ - public function getBoolValue() - { - return $this->readOneof(7); - } - - public function hasBoolValue() - { - return $this->hasOneof(7); - } - - /** - * A Boolean value. - * - * Generated from protobuf field .google.cloud.visionai.v1.BoolValue bool_value = 7; - * @param \Google\Cloud\VisionAI\V1\BoolValue $var - * @return $this - */ - public function setBoolValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\BoolValue::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * The UGA field or ML field to apply filtering criteria. - * - * Generated from protobuf field string field = 1; - * @return string - */ - public function getField() - { - return $this->field; - } - - /** - * The UGA field or ML field to apply filtering criteria. - * - * Generated from protobuf field string field = 1; - * @param string $var - * @return $this - */ - public function setField($var) - { - GPBUtil::checkString($var, True); - $this->field = $var; - - return $this; - } - - /** - * If true, return query matched annotations for this criteria. - * This option is only applicable for inclusion criteria, i.e., not exclusion - * criteria, with partition level annotations. It supports the following data - * types: - * - INTEGER - * - FLOAT - * - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only) - * - BOOLEAN - * - * Generated from protobuf field bool fetch_matched_annotations = 8; - * @return bool - */ - public function getFetchMatchedAnnotations() - { - return $this->fetch_matched_annotations; - } - - /** - * If true, return query matched annotations for this criteria. - * This option is only applicable for inclusion criteria, i.e., not exclusion - * criteria, with partition level annotations. It supports the following data - * types: - * - INTEGER - * - FLOAT - * - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only) - * - BOOLEAN - * - * Generated from protobuf field bool fetch_matched_annotations = 8; - * @param bool $var - * @return $this - */ - public function setFetchMatchedAnnotations($var) - { - GPBUtil::checkBool($var); - $this->fetch_matched_annotations = $var; - - return $this; - } - - /** - * @return string - */ - public function getValue() - { - return $this->whichOneof("value"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo.php deleted file mode 100644 index ad6f4f33263b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo.php +++ /dev/null @@ -1,240 +0,0 @@ -google.cloud.visionai.v1.CustomProcessorSourceInfo - */ -class CustomProcessorSourceInfo extends \Google\Protobuf\Internal\Message -{ - /** - * The original product which holds the custom processor's functionality. - * - * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; - */ - protected $source_type = 0; - /** - * Output only. Additional info related to the imported custom processor. - * Data is filled in by app platform during the processor creation. - * - * Generated from protobuf field map additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $additional_info; - /** - * Model schema files which specifies the signature of the model. - * For VERTEX_CUSTOM models, instances schema is required. - * If instances schema is not specified during the processor creation, - * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the - * creation will fail. - * - * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; - */ - protected $model_schema = null; - protected $artifact_path; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $vertex_model - * The resource name original model hosted in the vertex AI platform. - * @type \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo\ProductRecognizerArtifact $product_recognizer_artifact - * Artifact for product recognizer. - * @type int $source_type - * The original product which holds the custom processor's functionality. - * @type array|\Google\Protobuf\Internal\MapField $additional_info - * Output only. Additional info related to the imported custom processor. - * Data is filled in by app platform during the processor creation. - * @type \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo\ModelSchema $model_schema - * Model schema files which specifies the signature of the model. - * For VERTEX_CUSTOM models, instances schema is required. - * If instances schema is not specified during the processor creation, - * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the - * creation will fail. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * The resource name original model hosted in the vertex AI platform. - * - * Generated from protobuf field string vertex_model = 2; - * @return string - */ - public function getVertexModel() - { - return $this->readOneof(2); - } - - public function hasVertexModel() - { - return $this->hasOneof(2); - } - - /** - * The resource name original model hosted in the vertex AI platform. - * - * Generated from protobuf field string vertex_model = 2; - * @param string $var - * @return $this - */ - public function setVertexModel($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Artifact for product recognizer. - * - * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; - * @return \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo\ProductRecognizerArtifact|null - */ - public function getProductRecognizerArtifact() - { - return $this->readOneof(3); - } - - public function hasProductRecognizerArtifact() - { - return $this->hasOneof(3); - } - - /** - * Artifact for product recognizer. - * - * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact product_recognizer_artifact = 3; - * @param \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo\ProductRecognizerArtifact $var - * @return $this - */ - public function setProductRecognizerArtifact($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo\ProductRecognizerArtifact::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The original product which holds the custom processor's functionality. - * - * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; - * @return int - */ - public function getSourceType() - { - return $this->source_type; - } - - /** - * The original product which holds the custom processor's functionality. - * - * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType source_type = 1; - * @param int $var - * @return $this - */ - public function setSourceType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo\SourceType::class); - $this->source_type = $var; - - return $this; - } - - /** - * Output only. Additional info related to the imported custom processor. - * Data is filled in by app platform during the processor creation. - * - * Generated from protobuf field map additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAdditionalInfo() - { - return $this->additional_info; - } - - /** - * Output only. Additional info related to the imported custom processor. - * Data is filled in by app platform during the processor creation. - * - * Generated from protobuf field map additional_info = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAdditionalInfo($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->additional_info = $arr; - - return $this; - } - - /** - * Model schema files which specifies the signature of the model. - * For VERTEX_CUSTOM models, instances schema is required. - * If instances schema is not specified during the processor creation, - * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the - * creation will fail. - * - * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; - * @return \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo\ModelSchema|null - */ - public function getModelSchema() - { - return $this->model_schema; - } - - public function hasModelSchema() - { - return isset($this->model_schema); - } - - public function clearModelSchema() - { - unset($this->model_schema); - } - - /** - * Model schema files which specifies the signature of the model. - * For VERTEX_CUSTOM models, instances schema is required. - * If instances schema is not specified during the processor creation, - * VisionAI Platform will try to get it from Vertex, if it doesn't exist, the - * creation will fail. - * - * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema model_schema = 5; - * @param \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo\ModelSchema $var - * @return $this - */ - public function setModelSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo\ModelSchema::class); - $this->model_schema = $var; - - return $this; - } - - /** - * @return string - */ - public function getArtifactPath() - { - return $this->whichOneof("artifact_path"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/ModelSchema.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/ModelSchema.php deleted file mode 100644 index 048786c95619..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/ModelSchema.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.visionai.v1.CustomProcessorSourceInfo.ModelSchema - */ -class ModelSchema extends \Google\Protobuf\Internal\Message -{ - /** - * Cloud Storage location to a YAML file that defines the format of a single - * instance used in prediction and explanation requests. - * - * Generated from protobuf field .google.cloud.visionai.v1.GcsSource instances_schema = 1; - */ - protected $instances_schema = null; - /** - * Cloud Storage location to a YAML file that defines the prediction and - * explanation parameters. - * - * Generated from protobuf field .google.cloud.visionai.v1.GcsSource parameters_schema = 2; - */ - protected $parameters_schema = null; - /** - * Cloud Storage location to a YAML file that defines the format of a single - * prediction or explanation. - * - * Generated from protobuf field .google.cloud.visionai.v1.GcsSource predictions_schema = 3; - */ - protected $predictions_schema = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\GcsSource $instances_schema - * Cloud Storage location to a YAML file that defines the format of a single - * instance used in prediction and explanation requests. - * @type \Google\Cloud\VisionAI\V1\GcsSource $parameters_schema - * Cloud Storage location to a YAML file that defines the prediction and - * explanation parameters. - * @type \Google\Cloud\VisionAI\V1\GcsSource $predictions_schema - * Cloud Storage location to a YAML file that defines the format of a single - * prediction or explanation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Cloud Storage location to a YAML file that defines the format of a single - * instance used in prediction and explanation requests. - * - * Generated from protobuf field .google.cloud.visionai.v1.GcsSource instances_schema = 1; - * @return \Google\Cloud\VisionAI\V1\GcsSource|null - */ - public function getInstancesSchema() - { - return $this->instances_schema; - } - - public function hasInstancesSchema() - { - return isset($this->instances_schema); - } - - public function clearInstancesSchema() - { - unset($this->instances_schema); - } - - /** - * Cloud Storage location to a YAML file that defines the format of a single - * instance used in prediction and explanation requests. - * - * Generated from protobuf field .google.cloud.visionai.v1.GcsSource instances_schema = 1; - * @param \Google\Cloud\VisionAI\V1\GcsSource $var - * @return $this - */ - public function setInstancesSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\GcsSource::class); - $this->instances_schema = $var; - - return $this; - } - - /** - * Cloud Storage location to a YAML file that defines the prediction and - * explanation parameters. - * - * Generated from protobuf field .google.cloud.visionai.v1.GcsSource parameters_schema = 2; - * @return \Google\Cloud\VisionAI\V1\GcsSource|null - */ - public function getParametersSchema() - { - return $this->parameters_schema; - } - - public function hasParametersSchema() - { - return isset($this->parameters_schema); - } - - public function clearParametersSchema() - { - unset($this->parameters_schema); - } - - /** - * Cloud Storage location to a YAML file that defines the prediction and - * explanation parameters. - * - * Generated from protobuf field .google.cloud.visionai.v1.GcsSource parameters_schema = 2; - * @param \Google\Cloud\VisionAI\V1\GcsSource $var - * @return $this - */ - public function setParametersSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\GcsSource::class); - $this->parameters_schema = $var; - - return $this; - } - - /** - * Cloud Storage location to a YAML file that defines the format of a single - * prediction or explanation. - * - * Generated from protobuf field .google.cloud.visionai.v1.GcsSource predictions_schema = 3; - * @return \Google\Cloud\VisionAI\V1\GcsSource|null - */ - public function getPredictionsSchema() - { - return $this->predictions_schema; - } - - public function hasPredictionsSchema() - { - return isset($this->predictions_schema); - } - - public function clearPredictionsSchema() - { - unset($this->predictions_schema); - } - - /** - * Cloud Storage location to a YAML file that defines the format of a single - * prediction or explanation. - * - * Generated from protobuf field .google.cloud.visionai.v1.GcsSource predictions_schema = 3; - * @param \Google\Cloud\VisionAI\V1\GcsSource $var - * @return $this - */ - public function setPredictionsSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\GcsSource::class); - $this->predictions_schema = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/ProductRecognizerArtifact.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/ProductRecognizerArtifact.php deleted file mode 100644 index 1f577b71cc48..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/ProductRecognizerArtifact.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.visionai.v1.CustomProcessorSourceInfo.ProductRecognizerArtifact - */ -class ProductRecognizerArtifact extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of RetailProductRecognitionIndex. - * Format is - * 'projects/{@*}locations/{@*}retailCatalogs/{@*}retailProductRecognitionIndexes/*' - * - * Generated from protobuf field string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $retail_product_recognition_index = ''; - /** - * Optional. The resource name of embedding model hosted in Vertex AI - * Platform. - * - * Generated from protobuf field string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $vertex_model = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $retail_product_recognition_index - * Required. Resource name of RetailProductRecognitionIndex. - * Format is - * 'projects/{@*}locations/{@*}retailCatalogs/{@*}retailProductRecognitionIndexes/*' - * @type string $vertex_model - * Optional. The resource name of embedding model hosted in Vertex AI - * Platform. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of RetailProductRecognitionIndex. - * Format is - * 'projects/{@*}locations/{@*}retailCatalogs/{@*}retailProductRecognitionIndexes/*' - * - * Generated from protobuf field string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getRetailProductRecognitionIndex() - { - return $this->retail_product_recognition_index; - } - - /** - * Required. Resource name of RetailProductRecognitionIndex. - * Format is - * 'projects/{@*}locations/{@*}retailCatalogs/{@*}retailProductRecognitionIndexes/*' - * - * Generated from protobuf field string retail_product_recognition_index = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setRetailProductRecognitionIndex($var) - { - GPBUtil::checkString($var, True); - $this->retail_product_recognition_index = $var; - - return $this; - } - - /** - * Optional. The resource name of embedding model hosted in Vertex AI - * Platform. - * - * Generated from protobuf field string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getVertexModel() - { - return $this->vertex_model; - } - - /** - * Optional. The resource name of embedding model hosted in Vertex AI - * Platform. - * - * Generated from protobuf field string vertex_model = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setVertexModel($var) - { - GPBUtil::checkString($var, True); - $this->vertex_model = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/SourceType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/SourceType.php deleted file mode 100644 index e168c6a873c8..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/CustomProcessorSourceInfo/SourceType.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.visionai.v1.CustomProcessorSourceInfo.SourceType - */ -class SourceType -{ - /** - * Source type unspecified. - * - * Generated from protobuf enum SOURCE_TYPE_UNSPECIFIED = 0; - */ - const SOURCE_TYPE_UNSPECIFIED = 0; - /** - * Custom processors coming from Vertex AutoML product. - * - * Generated from protobuf enum VERTEX_AUTOML = 1; - */ - const VERTEX_AUTOML = 1; - /** - * Custom processors coming from general custom models from Vertex. - * - * Generated from protobuf enum VERTEX_CUSTOM = 2; - */ - const VERTEX_CUSTOM = 2; - /** - * Source for Product Recognizer. - * - * Generated from protobuf enum PRODUCT_RECOGNIZER = 3; - */ - const PRODUCT_RECOGNIZER = 3; - - private static $valueToName = [ - self::SOURCE_TYPE_UNSPECIFIED => 'SOURCE_TYPE_UNSPECIFIED', - self::VERTEX_AUTOML => 'VERTEX_AUTOML', - self::VERTEX_CUSTOM => 'VERTEX_CUSTOM', - self::PRODUCT_RECOGNIZER => 'PRODUCT_RECOGNIZER', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchema.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchema.php deleted file mode 100644 index fa76b7726b00..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchema.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.visionai.v1.DataSchema - */ -class DataSchema extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the data schema in the form of: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` - * where {data_schema} part should be the same as the `key` field below. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Required. The key of this data schema. This key should be matching the key - * of user specified annotation and unique inside corpus. This value can be up - * to 63 characters, and valid characters are /[a-z][0-9]-/. The first - * character must be a letter, the last could be a letter or a number. - * - * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key = ''; - /** - * The schema details mapping to the key. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; - */ - protected $schema_details = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Resource name of the data schema in the form of: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` - * where {data_schema} part should be the same as the `key` field below. - * @type string $key - * Required. The key of this data schema. This key should be matching the key - * of user specified annotation and unique inside corpus. This value can be up - * to 63 characters, and valid characters are /[a-z][0-9]-/. The first - * character must be a letter, the last could be a letter or a number. - * @type \Google\Cloud\VisionAI\V1\DataSchemaDetails $schema_details - * The schema details mapping to the key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the data schema in the form of: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` - * where {data_schema} part should be the same as the `key` field below. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource name of the data schema in the form of: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` - * where {data_schema} part should be the same as the `key` field below. - * - * 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 key of this data schema. This key should be matching the key - * of user specified annotation and unique inside corpus. This value can be up - * to 63 characters, and valid characters are /[a-z][0-9]-/. The first - * character must be a letter, the last could be a letter or a number. - * - * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Required. The key of this data schema. This key should be matching the key - * of user specified annotation and unique inside corpus. This value can be up - * to 63 characters, and valid characters are /[a-z][0-9]-/. The first - * character must be a letter, the last could be a letter or a number. - * - * Generated from protobuf field string key = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * The schema details mapping to the key. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; - * @return \Google\Cloud\VisionAI\V1\DataSchemaDetails|null - */ - public function getSchemaDetails() - { - return $this->schema_details; - } - - public function hasSchemaDetails() - { - return isset($this->schema_details); - } - - public function clearSchemaDetails() - { - unset($this->schema_details); - } - - /** - * The schema details mapping to the key. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails schema_details = 3; - * @param \Google\Cloud\VisionAI\V1\DataSchemaDetails $var - * @return $this - */ - public function setSchemaDetails($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails::class); - $this->schema_details = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails.php deleted file mode 100644 index 3dfda71dfd7c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails.php +++ /dev/null @@ -1,298 +0,0 @@ -google.cloud.visionai.v1.DataSchemaDetails - */ -class DataSchemaDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Type of the annotation. - * - * Generated from protobuf field optional .google.cloud.visionai.v1.DataSchemaDetails.DataType type = 1; - */ - protected $type = null; - /** - * Config for protobuf any type. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; - */ - protected $proto_any_config = null; - /** - * Config for List data type. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; - */ - protected $list_config = null; - /** - * Config for CustomizedStruct data type. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; - */ - protected $customized_struct_config = null; - /** - * The granularity associated with this DataSchema. - * - * Generated from protobuf field optional .google.cloud.visionai.v1.DataSchemaDetails.Granularity granularity = 5; - */ - protected $granularity = null; - /** - * The search strategy to be applied on the `key` above. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; - */ - protected $search_strategy = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Type of the annotation. - * @type \Google\Cloud\VisionAI\V1\DataSchemaDetails\ProtoAnyConfig $proto_any_config - * Config for protobuf any type. - * @type \Google\Cloud\VisionAI\V1\DataSchemaDetails\ListConfig $list_config - * Config for List data type. - * @type \Google\Cloud\VisionAI\V1\DataSchemaDetails\CustomizedStructConfig $customized_struct_config - * Config for CustomizedStruct data type. - * @type int $granularity - * The granularity associated with this DataSchema. - * @type \Google\Cloud\VisionAI\V1\DataSchemaDetails\SearchStrategy $search_strategy - * The search strategy to be applied on the `key` above. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Type of the annotation. - * - * Generated from protobuf field optional .google.cloud.visionai.v1.DataSchemaDetails.DataType type = 1; - * @return int - */ - public function getType() - { - return isset($this->type) ? $this->type : 0; - } - - public function hasType() - { - return isset($this->type); - } - - public function clearType() - { - unset($this->type); - } - - /** - * Type of the annotation. - * - * Generated from protobuf field optional .google.cloud.visionai.v1.DataSchemaDetails.DataType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails\DataType::class); - $this->type = $var; - - return $this; - } - - /** - * Config for protobuf any type. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; - * @return \Google\Cloud\VisionAI\V1\DataSchemaDetails\ProtoAnyConfig|null - */ - public function getProtoAnyConfig() - { - return $this->proto_any_config; - } - - public function hasProtoAnyConfig() - { - return isset($this->proto_any_config); - } - - public function clearProtoAnyConfig() - { - unset($this->proto_any_config); - } - - /** - * Config for protobuf any type. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig proto_any_config = 6; - * @param \Google\Cloud\VisionAI\V1\DataSchemaDetails\ProtoAnyConfig $var - * @return $this - */ - public function setProtoAnyConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails\ProtoAnyConfig::class); - $this->proto_any_config = $var; - - return $this; - } - - /** - * Config for List data type. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; - * @return \Google\Cloud\VisionAI\V1\DataSchemaDetails\ListConfig|null - */ - public function getListConfig() - { - return $this->list_config; - } - - public function hasListConfig() - { - return isset($this->list_config); - } - - public function clearListConfig() - { - unset($this->list_config); - } - - /** - * Config for List data type. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.ListConfig list_config = 8; - * @param \Google\Cloud\VisionAI\V1\DataSchemaDetails\ListConfig $var - * @return $this - */ - public function setListConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails\ListConfig::class); - $this->list_config = $var; - - return $this; - } - - /** - * Config for CustomizedStruct data type. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; - * @return \Google\Cloud\VisionAI\V1\DataSchemaDetails\CustomizedStructConfig|null - */ - public function getCustomizedStructConfig() - { - return $this->customized_struct_config; - } - - public function hasCustomizedStructConfig() - { - return isset($this->customized_struct_config); - } - - public function clearCustomizedStructConfig() - { - unset($this->customized_struct_config); - } - - /** - * Config for CustomizedStruct data type. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig customized_struct_config = 9; - * @param \Google\Cloud\VisionAI\V1\DataSchemaDetails\CustomizedStructConfig $var - * @return $this - */ - public function setCustomizedStructConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails\CustomizedStructConfig::class); - $this->customized_struct_config = $var; - - return $this; - } - - /** - * The granularity associated with this DataSchema. - * - * Generated from protobuf field optional .google.cloud.visionai.v1.DataSchemaDetails.Granularity granularity = 5; - * @return int - */ - public function getGranularity() - { - return isset($this->granularity) ? $this->granularity : 0; - } - - public function hasGranularity() - { - return isset($this->granularity); - } - - public function clearGranularity() - { - unset($this->granularity); - } - - /** - * The granularity associated with this DataSchema. - * - * Generated from protobuf field optional .google.cloud.visionai.v1.DataSchemaDetails.Granularity granularity = 5; - * @param int $var - * @return $this - */ - public function setGranularity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails\Granularity::class); - $this->granularity = $var; - - return $this; - } - - /** - * The search strategy to be applied on the `key` above. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; - * @return \Google\Cloud\VisionAI\V1\DataSchemaDetails\SearchStrategy|null - */ - public function getSearchStrategy() - { - return $this->search_strategy; - } - - public function hasSearchStrategy() - { - return isset($this->search_strategy); - } - - public function clearSearchStrategy() - { - unset($this->search_strategy); - } - - /** - * The search strategy to be applied on the `key` above. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy search_strategy = 7; - * @param \Google\Cloud\VisionAI\V1\DataSchemaDetails\SearchStrategy $var - * @return $this - */ - public function setSearchStrategy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails\SearchStrategy::class); - $this->search_strategy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/CustomizedStructConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/CustomizedStructConfig.php deleted file mode 100644 index 806eaf501a6e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/CustomizedStructConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.DataSchemaDetails.CustomizedStructConfig - */ -class CustomizedStructConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Direct child elements data schemas. - * - * Generated from protobuf field map field_schemas = 1; - */ - private $field_schemas; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array|\Google\Protobuf\Internal\MapField $field_schemas - * Direct child elements data schemas. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Direct child elements data schemas. - * - * Generated from protobuf field map field_schemas = 1; - * @return \Google\Protobuf\Internal\MapField - */ - public function getFieldSchemas() - { - return $this->field_schemas; - } - - /** - * Direct child elements data schemas. - * - * Generated from protobuf field map field_schemas = 1; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setFieldSchemas($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\DataSchemaDetails::class); - $this->field_schemas = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/DataType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/DataType.php deleted file mode 100644 index a1ee8a987e2c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/DataType.php +++ /dev/null @@ -1,176 +0,0 @@ -google.cloud.visionai.v1.DataSchemaDetails.DataType - */ -class DataType -{ - /** - * Unspecified type. - * - * Generated from protobuf enum DATA_TYPE_UNSPECIFIED = 0; - */ - const DATA_TYPE_UNSPECIFIED = 0; - /** - * Integer type. - * Allowed search strategies: - * - DataSchema.SearchStrategy.NO_SEARCH, - * - DataSchema.SearchStrategy.EXACT_SEARCH. - * Supports query by IntRangeArray. - * - * Generated from protobuf enum INTEGER = 1; - */ - const INTEGER = 1; - /** - * Float type. - * Allowed search strategies: - * - DataSchema.SearchStrategy.NO_SEARCH, - * - DataSchema.SearchStrategy.EXACT_SEARCH. - * Supports query by FloatRangeArray. - * - * Generated from protobuf enum FLOAT = 2; - */ - const FLOAT = 2; - /** - * String type. - * Allowed search strategies: - * - DataSchema.SearchStrategy.NO_SEARCH, - * - DataSchema.SearchStrategy.EXACT_SEARCH, - * - DataSchema.SearchStrategy.SMART_SEARCH. - * - * Generated from protobuf enum STRING = 3; - */ - const STRING = 3; - /** - * Supported formats: - * %Y-%m-%dT%H:%M:%E*S%E*z (absl::RFC3339_full) - * %Y-%m-%dT%H:%M:%E*S - * %Y-%m-%dT%H:%M%E*z - * %Y-%m-%dT%H:%M - * %Y-%m-%dT%H%E*z - * %Y-%m-%dT%H - * %Y-%m-%d%E*z - * %Y-%m-%d - * %Y-%m - * %Y - * Allowed search strategies: - * - DataSchema.SearchStrategy.NO_SEARCH, - * - DataSchema.SearchStrategy.EXACT_SEARCH. - * Supports query by DateTimeRangeArray. - * - * Generated from protobuf enum DATETIME = 5; - */ - const DATETIME = 5; - /** - * Geo coordinate type. - * Allowed search strategies: - * - DataSchema.SearchStrategy.NO_SEARCH, - * - DataSchema.SearchStrategy.EXACT_SEARCH. - * Supports query by GeoLocationArray. - * - * Generated from protobuf enum GEO_COORDINATE = 7; - */ - const GEO_COORDINATE = 7; - /** - * Type to pass any proto as available in annotations.proto. Only use - * internally. - * Available proto types and its corresponding search behavior: - * - ImageObjectDetectionPredictionResult, allows SMART_SEARCH on - * display_names and NO_SEARCH. - * - ClassificationPredictionResult, allows SMART_SEARCH on display_names - * and NO_SEARCH. - * - ImageSegmentationPredictionResult, allows NO_SEARCH. - * - VideoActionRecognitionPredictionResult, allows SMART_SEARCH on - * display_name and NO_SEARCH. - * - VideoObjectTrackingPredictionResult, allows SMART_SEARCH on - * display_name and NO_SEARCH. - * - VideoClassificationPredictionResult, allows SMART_SEARCH on - * display_name and NO_SEARCH. - * - OccupancyCountingPredictionResult, allows EXACT_SEARCH on - * stats.full_frame_count.count and NO_SEARCH. - * - ObjectDetectionPredictionResult, allows SMART_SEARCH on - * identified_boxes.entity.label_string and NO_SEARCH. - * - * Generated from protobuf enum PROTO_ANY = 8; - */ - const PROTO_ANY = 8; - /** - * Boolean type. - * Allowed search strategies: - * - DataSchema.SearchStrategy.NO_SEARCH, - * - DataSchema.SearchStrategy.EXACT_SEARCH. - * - * Generated from protobuf enum BOOLEAN = 9; - */ - const BOOLEAN = 9; - /** - * List type. - * - Each element in the list must be of the exact same data schema; - * otherwise, they are invalid arguments. - * - List level cannot set search strategy. Leaf node level can do. - * - Elements cannot be another list (no list of list). - * - Elements can be CUSTOMIZED_STRUCT, and max number of layers is 10. - * - * Generated from protobuf enum LIST = 10; - */ - const PBLIST = 10; - /** - * Struct type. - * - SearchStrategy: - * * Data Schema that's CUSTOMIZED_STRUCT cannot set search strategy. - * * Leaf-node elements allow setting search strategy based on element's - * SearchStrategy restriction. - * - Nested layer restrictions: - * * Data Schema that's CUSTOMIZED_STRUCT allows its fields to be of - * CUSTOMIZED_STRUCT as well, but the overall layers restriction is 10. - * - * Generated from protobuf enum CUSTOMIZED_STRUCT = 6; - */ - const CUSTOMIZED_STRUCT = 6; - - private static $valueToName = [ - self::DATA_TYPE_UNSPECIFIED => 'DATA_TYPE_UNSPECIFIED', - self::INTEGER => 'INTEGER', - self::FLOAT => 'FLOAT', - self::STRING => 'STRING', - self::DATETIME => 'DATETIME', - self::GEO_COORDINATE => 'GEO_COORDINATE', - self::PROTO_ANY => 'PROTO_ANY', - self::BOOLEAN => 'BOOLEAN', - self::PBLIST => 'LIST', - self::CUSTOMIZED_STRUCT => 'CUSTOMIZED_STRUCT', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/Granularity.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/Granularity.php deleted file mode 100644 index 21306761f205..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/Granularity.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.visionai.v1.DataSchemaDetails.Granularity - */ -class Granularity -{ - /** - * Unspecified granularity. - * - * Generated from protobuf enum GRANULARITY_UNSPECIFIED = 0; - */ - const GRANULARITY_UNSPECIFIED = 0; - /** - * Asset-level granularity (annotations must not contain partition info). - * - * Generated from protobuf enum GRANULARITY_ASSET_LEVEL = 1; - */ - const GRANULARITY_ASSET_LEVEL = 1; - /** - * Partition-level granularity (annotations must contain partition info). - * - * Generated from protobuf enum GRANULARITY_PARTITION_LEVEL = 2; - */ - const GRANULARITY_PARTITION_LEVEL = 2; - - private static $valueToName = [ - self::GRANULARITY_UNSPECIFIED => 'GRANULARITY_UNSPECIFIED', - self::GRANULARITY_ASSET_LEVEL => 'GRANULARITY_ASSET_LEVEL', - self::GRANULARITY_PARTITION_LEVEL => 'GRANULARITY_PARTITION_LEVEL', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/ListConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/ListConfig.php deleted file mode 100644 index 6f334d263540..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/ListConfig.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.visionai.v1.DataSchemaDetails.ListConfig - */ -class ListConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The value's data schema in the list. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; - */ - protected $value_schema = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\DataSchemaDetails $value_schema - * The value's data schema in the list. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The value's data schema in the list. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; - * @return \Google\Cloud\VisionAI\V1\DataSchemaDetails|null - */ - public function getValueSchema() - { - return $this->value_schema; - } - - public function hasValueSchema() - { - return isset($this->value_schema); - } - - public function clearValueSchema() - { - unset($this->value_schema); - } - - /** - * The value's data schema in the list. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails value_schema = 1; - * @param \Google\Cloud\VisionAI\V1\DataSchemaDetails $var - * @return $this - */ - public function setValueSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails::class); - $this->value_schema = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/ProtoAnyConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/ProtoAnyConfig.php deleted file mode 100644 index 637d4b6cf497..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/ProtoAnyConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.DataSchemaDetails.ProtoAnyConfig - */ -class ProtoAnyConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The type URI of the proto message. - * - * Generated from protobuf field string type_uri = 1; - */ - protected $type_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type_uri - * The type URI of the proto message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The type URI of the proto message. - * - * Generated from protobuf field string type_uri = 1; - * @return string - */ - public function getTypeUri() - { - return $this->type_uri; - } - - /** - * The type URI of the proto message. - * - * Generated from protobuf field string type_uri = 1; - * @param string $var - * @return $this - */ - public function setTypeUri($var) - { - GPBUtil::checkString($var, True); - $this->type_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy.php deleted file mode 100644 index 4b036187b462..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy - */ -class SearchStrategy extends \Google\Protobuf\Internal\Message -{ - /** - * The type of search strategy to be applied on the `key` above. - * The allowed `search_strategy_type` is different for different data types, - * which is documented in the DataSchemaDetails.DataType. Specifying - * unsupported `search_strategy_type` for data types will result in - * INVALID_ARGUMENT error. - * - * Generated from protobuf field optional .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType search_strategy_type = 1; - */ - protected $search_strategy_type = null; - /** - * Optional. Configs the path to the confidence score, and the threshold. - * Only if the score is greater than the threshold, current field will be - * built into the index. Only applies to leaf nodes using EXACT_SEARCH or - * SMART_SEARCH. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $confidence_score_index_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $search_strategy_type - * The type of search strategy to be applied on the `key` above. - * The allowed `search_strategy_type` is different for different data types, - * which is documented in the DataSchemaDetails.DataType. Specifying - * unsupported `search_strategy_type` for data types will result in - * INVALID_ARGUMENT error. - * @type \Google\Cloud\VisionAI\V1\DataSchemaDetails\SearchStrategy\ConfidenceScoreIndexConfig $confidence_score_index_config - * Optional. Configs the path to the confidence score, and the threshold. - * Only if the score is greater than the threshold, current field will be - * built into the index. Only applies to leaf nodes using EXACT_SEARCH or - * SMART_SEARCH. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The type of search strategy to be applied on the `key` above. - * The allowed `search_strategy_type` is different for different data types, - * which is documented in the DataSchemaDetails.DataType. Specifying - * unsupported `search_strategy_type` for data types will result in - * INVALID_ARGUMENT error. - * - * Generated from protobuf field optional .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType search_strategy_type = 1; - * @return int - */ - public function getSearchStrategyType() - { - return isset($this->search_strategy_type) ? $this->search_strategy_type : 0; - } - - public function hasSearchStrategyType() - { - return isset($this->search_strategy_type); - } - - public function clearSearchStrategyType() - { - unset($this->search_strategy_type); - } - - /** - * The type of search strategy to be applied on the `key` above. - * The allowed `search_strategy_type` is different for different data types, - * which is documented in the DataSchemaDetails.DataType. Specifying - * unsupported `search_strategy_type` for data types will result in - * INVALID_ARGUMENT error. - * - * Generated from protobuf field optional .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType search_strategy_type = 1; - * @param int $var - * @return $this - */ - public function setSearchStrategyType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails\SearchStrategy\SearchStrategyType::class); - $this->search_strategy_type = $var; - - return $this; - } - - /** - * Optional. Configs the path to the confidence score, and the threshold. - * Only if the score is greater than the threshold, current field will be - * built into the index. Only applies to leaf nodes using EXACT_SEARCH or - * SMART_SEARCH. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VisionAI\V1\DataSchemaDetails\SearchStrategy\ConfidenceScoreIndexConfig|null - */ - public function getConfidenceScoreIndexConfig() - { - return $this->confidence_score_index_config; - } - - public function hasConfidenceScoreIndexConfig() - { - return isset($this->confidence_score_index_config); - } - - public function clearConfidenceScoreIndexConfig() - { - unset($this->confidence_score_index_config); - } - - /** - * Optional. Configs the path to the confidence score, and the threshold. - * Only if the score is greater than the threshold, current field will be - * built into the index. Only applies to leaf nodes using EXACT_SEARCH or - * SMART_SEARCH. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig confidence_score_index_config = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VisionAI\V1\DataSchemaDetails\SearchStrategy\ConfidenceScoreIndexConfig $var - * @return $this - */ - public function setConfidenceScoreIndexConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DataSchemaDetails\SearchStrategy\ConfidenceScoreIndexConfig::class); - $this->confidence_score_index_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy/ConfidenceScoreIndexConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy/ConfidenceScoreIndexConfig.php deleted file mode 100644 index f50e6fbe02e4..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy/ConfidenceScoreIndexConfig.php +++ /dev/null @@ -1,258 +0,0 @@ - 0.6 will be indexed. - * - * Generated from protobuf message google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig - */ -class ConfidenceScoreIndexConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The path to the confidence score field. It is a string that - * concatenates all the data schema keys along the path. See the example - * above. If the data schema contains LIST, use '_ENTRIES' to concatenate. - * Example data schema contains a list: - * "key": "list-name-score", - * "schemaDetails": { - * "type": "LIST", - * "granularity": "GRANULARITY_PARTITION_LEVEL", - * "listConfig": { - * "valueSchema": { - * "type": "CUSTOMIZED_STRUCT", - * "granularity": "GRANULARITY_PARTITION_LEVEL", - * "customizedStructConfig": { - * "fieldSchemas": { - * "name": { - * "type": "STRING", - * "granularity": "GRANULARITY_PARTITION_LEVEL", - * "searchStrategy": { - * "searchStrategyType": "SMART_SEARCH" - * "confidence_score_index_config": { - * "field_path": "list-name-score._ENTRIES.score", - * "threshold": "0.9", - * } - * } - * }, - * "score": { - * "type": "FLOAT", - * "granularity": "GRANULARITY_PARTITION_LEVEL", - * } - * } - * } - * } - * } - * } - * - * Generated from protobuf field string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $field_path = ''; - /** - * Required. The threshold. - * - * Generated from protobuf field float threshold = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $threshold = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $field_path - * Required. The path to the confidence score field. It is a string that - * concatenates all the data schema keys along the path. See the example - * above. If the data schema contains LIST, use '_ENTRIES' to concatenate. - * Example data schema contains a list: - * "key": "list-name-score", - * "schemaDetails": { - * "type": "LIST", - * "granularity": "GRANULARITY_PARTITION_LEVEL", - * "listConfig": { - * "valueSchema": { - * "type": "CUSTOMIZED_STRUCT", - * "granularity": "GRANULARITY_PARTITION_LEVEL", - * "customizedStructConfig": { - * "fieldSchemas": { - * "name": { - * "type": "STRING", - * "granularity": "GRANULARITY_PARTITION_LEVEL", - * "searchStrategy": { - * "searchStrategyType": "SMART_SEARCH" - * "confidence_score_index_config": { - * "field_path": "list-name-score._ENTRIES.score", - * "threshold": "0.9", - * } - * } - * }, - * "score": { - * "type": "FLOAT", - * "granularity": "GRANULARITY_PARTITION_LEVEL", - * } - * } - * } - * } - * } - * } - * @type float $threshold - * Required. The threshold. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The path to the confidence score field. It is a string that - * concatenates all the data schema keys along the path. See the example - * above. If the data schema contains LIST, use '_ENTRIES' to concatenate. - * Example data schema contains a list: - * "key": "list-name-score", - * "schemaDetails": { - * "type": "LIST", - * "granularity": "GRANULARITY_PARTITION_LEVEL", - * "listConfig": { - * "valueSchema": { - * "type": "CUSTOMIZED_STRUCT", - * "granularity": "GRANULARITY_PARTITION_LEVEL", - * "customizedStructConfig": { - * "fieldSchemas": { - * "name": { - * "type": "STRING", - * "granularity": "GRANULARITY_PARTITION_LEVEL", - * "searchStrategy": { - * "searchStrategyType": "SMART_SEARCH" - * "confidence_score_index_config": { - * "field_path": "list-name-score._ENTRIES.score", - * "threshold": "0.9", - * } - * } - * }, - * "score": { - * "type": "FLOAT", - * "granularity": "GRANULARITY_PARTITION_LEVEL", - * } - * } - * } - * } - * } - * } - * - * Generated from protobuf field string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFieldPath() - { - return $this->field_path; - } - - /** - * Required. The path to the confidence score field. It is a string that - * concatenates all the data schema keys along the path. See the example - * above. If the data schema contains LIST, use '_ENTRIES' to concatenate. - * Example data schema contains a list: - * "key": "list-name-score", - * "schemaDetails": { - * "type": "LIST", - * "granularity": "GRANULARITY_PARTITION_LEVEL", - * "listConfig": { - * "valueSchema": { - * "type": "CUSTOMIZED_STRUCT", - * "granularity": "GRANULARITY_PARTITION_LEVEL", - * "customizedStructConfig": { - * "fieldSchemas": { - * "name": { - * "type": "STRING", - * "granularity": "GRANULARITY_PARTITION_LEVEL", - * "searchStrategy": { - * "searchStrategyType": "SMART_SEARCH" - * "confidence_score_index_config": { - * "field_path": "list-name-score._ENTRIES.score", - * "threshold": "0.9", - * } - * } - * }, - * "score": { - * "type": "FLOAT", - * "granularity": "GRANULARITY_PARTITION_LEVEL", - * } - * } - * } - * } - * } - * } - * - * Generated from protobuf field string field_path = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFieldPath($var) - { - GPBUtil::checkString($var, True); - $this->field_path = $var; - - return $this; - } - - /** - * Required. The threshold. - * - * Generated from protobuf field float threshold = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return float - */ - public function getThreshold() - { - return $this->threshold; - } - - /** - * Required. The threshold. - * - * Generated from protobuf field float threshold = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param float $var - * @return $this - */ - public function setThreshold($var) - { - GPBUtil::checkFloat($var); - $this->threshold = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy/SearchStrategyType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy/SearchStrategyType.php deleted file mode 100644 index 35900935d831..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataSchemaDetails/SearchStrategy/SearchStrategyType.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.SearchStrategyType - */ -class SearchStrategyType -{ - /** - * Annotatation values of the `key` above will not be searchable. - * - * Generated from protobuf enum NO_SEARCH = 0; - */ - const NO_SEARCH = 0; - /** - * When searching with `key`, the value must be exactly as the annotation - * value that has been ingested. - * - * Generated from protobuf enum EXACT_SEARCH = 1; - */ - const EXACT_SEARCH = 1; - /** - * When searching with `key`, Warehouse will perform broad search based on - * semantic of the annotation value. - * - * Generated from protobuf enum SMART_SEARCH = 2; - */ - const SMART_SEARCH = 2; - - private static $valueToName = [ - self::NO_SEARCH => 'NO_SEARCH', - self::EXACT_SEARCH => 'EXACT_SEARCH', - self::SMART_SEARCH => 'SMART_SEARCH', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataType.php deleted file mode 100644 index 4cb35ad13cea..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DataType.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.visionai.v1.DataType - */ -class DataType -{ - /** - * The default value of DataType. - * - * Generated from protobuf enum DATA_TYPE_UNSPECIFIED = 0; - */ - const DATA_TYPE_UNSPECIFIED = 0; - /** - * Video data type like H264. - * - * Generated from protobuf enum VIDEO = 1; - */ - const VIDEO = 1; - /** - * Image data type. - * - * Generated from protobuf enum IMAGE = 3; - */ - const IMAGE = 3; - /** - * Protobuf data type, usually used for general data blob. - * - * Generated from protobuf enum PROTO = 2; - */ - const PROTO = 2; - /** - * A placeholder data type, applicable for the universal input processor which - * supports any data type. This will be instantiated and replaced by a - * concrete underlying `DataType` during instance deployment. - * - * Generated from protobuf enum PLACEHOLDER = 4; - */ - const PLACEHOLDER = 4; - - private static $valueToName = [ - self::DATA_TYPE_UNSPECIFIED => 'DATA_TYPE_UNSPECIFIED', - self::VIDEO => 'VIDEO', - self::IMAGE => 'IMAGE', - self::PROTO => 'PROTO', - self::PLACEHOLDER => 'PLACEHOLDER', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DateTimeRange.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DateTimeRange.php deleted file mode 100644 index ad56d84e7b5f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DateTimeRange.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.visionai.v1.DateTimeRange - */ -class DateTimeRange extends \Google\Protobuf\Internal\Message -{ - /** - * Start date time. - * - * Generated from protobuf field .google.type.DateTime start = 1; - */ - protected $start = null; - /** - * End data time. - * - * Generated from protobuf field .google.type.DateTime end = 2; - */ - protected $end = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Type\DateTime $start - * Start date time. - * @type \Google\Type\DateTime $end - * End data time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Start date time. - * - * Generated from protobuf field .google.type.DateTime start = 1; - * @return \Google\Type\DateTime|null - */ - public function getStart() - { - return $this->start; - } - - public function hasStart() - { - return isset($this->start); - } - - public function clearStart() - { - unset($this->start); - } - - /** - * Start date time. - * - * Generated from protobuf field .google.type.DateTime start = 1; - * @param \Google\Type\DateTime $var - * @return $this - */ - public function setStart($var) - { - GPBUtil::checkMessage($var, \Google\Type\DateTime::class); - $this->start = $var; - - return $this; - } - - /** - * End data time. - * - * Generated from protobuf field .google.type.DateTime end = 2; - * @return \Google\Type\DateTime|null - */ - public function getEnd() - { - return $this->end; - } - - public function hasEnd() - { - return isset($this->end); - } - - public function clearEnd() - { - unset($this->end); - } - - /** - * End data time. - * - * Generated from protobuf field .google.type.DateTime end = 2; - * @param \Google\Type\DateTime $var - * @return $this - */ - public function setEnd($var) - { - GPBUtil::checkMessage($var, \Google\Type\DateTime::class); - $this->end = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DateTimeRangeArray.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DateTimeRangeArray.php deleted file mode 100644 index 35719c712c23..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DateTimeRangeArray.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.DateTimeRangeArray - */ -class DateTimeRangeArray extends \Google\Protobuf\Internal\Message -{ - /** - * Date time ranges. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; - */ - private $date_time_ranges; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\DateTimeRange[] $date_time_ranges - * Date time ranges. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Date time ranges. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\DateTimeRange> - */ - public function getDateTimeRanges() - { - return $this->date_time_ranges; - } - - /** - * Date time ranges. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.DateTimeRange date_time_ranges = 1; - * @param \Google\Cloud\VisionAI\V1\DateTimeRange[] $var - * @return $this - */ - public function setDateTimeRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\DateTimeRange::class); - $this->date_time_ranges = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DedicatedResources.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DedicatedResources.php deleted file mode 100644 index 058183fd617f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DedicatedResources.php +++ /dev/null @@ -1,328 +0,0 @@ -google.cloud.visionai.v1.DedicatedResources - */ -class DedicatedResources extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Immutable. The specification of a single machine used by the - * prediction. - * - * Generated from protobuf field .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $machine_spec = null; - /** - * Required. Immutable. The minimum number of machine replicas this - * DeployedModel will be always deployed on. This value must be greater than - * or equal to 1. - * If traffic against the DeployedModel increases, it may dynamically be - * deployed onto more replicas, and as traffic decreases, some of these extra - * replicas may be freed. - * - * Generated from protobuf field int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $min_replica_count = 0; - /** - * Immutable. The maximum number of replicas this DeployedModel may be - * deployed on when the traffic against it increases. If the requested value - * is too large, the deployment will error, but if deployment succeeds then - * the ability to scale the model to that many replicas is guaranteed (barring - * service outages). If traffic against the DeployedModel increases beyond - * what its replicas at maximum may handle, a portion of the traffic will be - * dropped. If this value is not provided, will use - * [min_replica_count][google.cloud.visionai.v1.DedicatedResources.min_replica_count] - * as the default value. - * The value of this field impacts the charge against Vertex CPU and GPU - * quotas. Specifically, you will be charged for max_replica_count * - * number of cores in the selected machine type) and (max_replica_count * - * number of GPUs per replica in the selected machine type). - * - * Generated from protobuf field int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $max_replica_count = 0; - /** - * Immutable. The metric specifications that overrides a resource - * utilization metric (CPU utilization, accelerator's duty cycle, and so on) - * target value (default to 60 if not set). At most one entry is allowed per - * metric. - * If - * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count] - * is above 0, the autoscaling will be based on both CPU utilization and - * accelerator's duty cycle metrics and scale up when either metrics exceeds - * its target value while scale down if both metrics are under their target - * value. The default target value is 60 for both metrics. - * If - * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count] - * is 0, the autoscaling will be based on CPU utilization metric only with - * default target value 60 if not explicitly set. - * For example, in the case of Online Prediction, if you want to override - * target CPU utilization to 80, you should set - * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name] - * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and - * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target] - * to `80`. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - */ - private $autoscaling_metric_specs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\MachineSpec $machine_spec - * Required. Immutable. The specification of a single machine used by the - * prediction. - * @type int $min_replica_count - * Required. Immutable. The minimum number of machine replicas this - * DeployedModel will be always deployed on. This value must be greater than - * or equal to 1. - * If traffic against the DeployedModel increases, it may dynamically be - * deployed onto more replicas, and as traffic decreases, some of these extra - * replicas may be freed. - * @type int $max_replica_count - * Immutable. The maximum number of replicas this DeployedModel may be - * deployed on when the traffic against it increases. If the requested value - * is too large, the deployment will error, but if deployment succeeds then - * the ability to scale the model to that many replicas is guaranteed (barring - * service outages). If traffic against the DeployedModel increases beyond - * what its replicas at maximum may handle, a portion of the traffic will be - * dropped. If this value is not provided, will use - * [min_replica_count][google.cloud.visionai.v1.DedicatedResources.min_replica_count] - * as the default value. - * The value of this field impacts the charge against Vertex CPU and GPU - * quotas. Specifically, you will be charged for max_replica_count * - * number of cores in the selected machine type) and (max_replica_count * - * number of GPUs per replica in the selected machine type). - * @type \Google\Cloud\VisionAI\V1\AutoscalingMetricSpec[] $autoscaling_metric_specs - * Immutable. The metric specifications that overrides a resource - * utilization metric (CPU utilization, accelerator's duty cycle, and so on) - * target value (default to 60 if not set). At most one entry is allowed per - * metric. - * If - * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count] - * is above 0, the autoscaling will be based on both CPU utilization and - * accelerator's duty cycle metrics and scale up when either metrics exceeds - * its target value while scale down if both metrics are under their target - * value. The default target value is 60 for both metrics. - * If - * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count] - * is 0, the autoscaling will be based on CPU utilization metric only with - * default target value 60 if not explicitly set. - * For example, in the case of Online Prediction, if you want to override - * target CPU utilization to 80, you should set - * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name] - * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and - * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target] - * to `80`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. Immutable. The specification of a single machine used by the - * prediction. - * - * Generated from protobuf field .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\VisionAI\V1\MachineSpec|null - */ - public function getMachineSpec() - { - return $this->machine_spec; - } - - public function hasMachineSpec() - { - return isset($this->machine_spec); - } - - public function clearMachineSpec() - { - unset($this->machine_spec); - } - - /** - * Required. Immutable. The specification of a single machine used by the - * prediction. - * - * Generated from protobuf field .google.cloud.visionai.v1.MachineSpec machine_spec = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\VisionAI\V1\MachineSpec $var - * @return $this - */ - public function setMachineSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\MachineSpec::class); - $this->machine_spec = $var; - - return $this; - } - - /** - * Required. Immutable. The minimum number of machine replicas this - * DeployedModel will be always deployed on. This value must be greater than - * or equal to 1. - * If traffic against the DeployedModel increases, it may dynamically be - * deployed onto more replicas, and as traffic decreases, some of these extra - * replicas may be freed. - * - * Generated from protobuf field int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getMinReplicaCount() - { - return $this->min_replica_count; - } - - /** - * Required. Immutable. The minimum number of machine replicas this - * DeployedModel will be always deployed on. This value must be greater than - * or equal to 1. - * If traffic against the DeployedModel increases, it may dynamically be - * deployed onto more replicas, and as traffic decreases, some of these extra - * replicas may be freed. - * - * Generated from protobuf field int32 min_replica_count = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setMinReplicaCount($var) - { - GPBUtil::checkInt32($var); - $this->min_replica_count = $var; - - return $this; - } - - /** - * Immutable. The maximum number of replicas this DeployedModel may be - * deployed on when the traffic against it increases. If the requested value - * is too large, the deployment will error, but if deployment succeeds then - * the ability to scale the model to that many replicas is guaranteed (barring - * service outages). If traffic against the DeployedModel increases beyond - * what its replicas at maximum may handle, a portion of the traffic will be - * dropped. If this value is not provided, will use - * [min_replica_count][google.cloud.visionai.v1.DedicatedResources.min_replica_count] - * as the default value. - * The value of this field impacts the charge against Vertex CPU and GPU - * quotas. Specifically, you will be charged for max_replica_count * - * number of cores in the selected machine type) and (max_replica_count * - * number of GPUs per replica in the selected machine type). - * - * Generated from protobuf field int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getMaxReplicaCount() - { - return $this->max_replica_count; - } - - /** - * Immutable. The maximum number of replicas this DeployedModel may be - * deployed on when the traffic against it increases. If the requested value - * is too large, the deployment will error, but if deployment succeeds then - * the ability to scale the model to that many replicas is guaranteed (barring - * service outages). If traffic against the DeployedModel increases beyond - * what its replicas at maximum may handle, a portion of the traffic will be - * dropped. If this value is not provided, will use - * [min_replica_count][google.cloud.visionai.v1.DedicatedResources.min_replica_count] - * as the default value. - * The value of this field impacts the charge against Vertex CPU and GPU - * quotas. Specifically, you will be charged for max_replica_count * - * number of cores in the selected machine type) and (max_replica_count * - * number of GPUs per replica in the selected machine type). - * - * Generated from protobuf field int32 max_replica_count = 3 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setMaxReplicaCount($var) - { - GPBUtil::checkInt32($var); - $this->max_replica_count = $var; - - return $this; - } - - /** - * Immutable. The metric specifications that overrides a resource - * utilization metric (CPU utilization, accelerator's duty cycle, and so on) - * target value (default to 60 if not set). At most one entry is allowed per - * metric. - * If - * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count] - * is above 0, the autoscaling will be based on both CPU utilization and - * accelerator's duty cycle metrics and scale up when either metrics exceeds - * its target value while scale down if both metrics are under their target - * value. The default target value is 60 for both metrics. - * If - * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count] - * is 0, the autoscaling will be based on CPU utilization metric only with - * default target value 60 if not explicitly set. - * For example, in the case of Online Prediction, if you want to override - * target CPU utilization to 80, you should set - * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name] - * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and - * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target] - * to `80`. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\AutoscalingMetricSpec> - */ - public function getAutoscalingMetricSpecs() - { - return $this->autoscaling_metric_specs; - } - - /** - * Immutable. The metric specifications that overrides a resource - * utilization metric (CPU utilization, accelerator's duty cycle, and so on) - * target value (default to 60 if not set). At most one entry is allowed per - * metric. - * If - * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count] - * is above 0, the autoscaling will be based on both CPU utilization and - * accelerator's duty cycle metrics and scale up when either metrics exceeds - * its target value while scale down if both metrics are under their target - * value. The default target value is 60 for both metrics. - * If - * [machine_spec.accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count] - * is 0, the autoscaling will be based on CPU utilization metric only with - * default target value 60 if not explicitly set. - * For example, in the case of Online Prediction, if you want to override - * target CPU utilization to 80, you should set - * [autoscaling_metric_specs.metric_name][google.cloud.visionai.v1.AutoscalingMetricSpec.metric_name] - * to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and - * [autoscaling_metric_specs.target][google.cloud.visionai.v1.AutoscalingMetricSpec.target] - * to `80`. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AutoscalingMetricSpec autoscaling_metric_specs = 4 [(.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\VisionAI\V1\AutoscalingMetricSpec[] $var - * @return $this - */ - public function setAutoscalingMetricSpecs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AutoscalingMetricSpec::class); - $this->autoscaling_metric_specs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAnalysisRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAnalysisRequest.php deleted file mode 100644 index 5658c12ec947..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAnalysisRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.visionai.v1.DeleteAnalysisRequest - */ -class DeleteAnalysisRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see LiveVideoAnalyticsClient::analysisName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeleteAnalysisRequest - * - * @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 resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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 resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAnnotationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAnnotationRequest.php deleted file mode 100644 index 8c1d044976a7..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAnnotationRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.visionai.v1.DeleteAnnotationRequest - */ -class DeleteAnnotationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the annotation to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the annotation to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` - * Please see {@see WarehouseClient::annotationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeleteAnnotationRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the annotation to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the annotation to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the annotation to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationInstancesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationInstancesRequest.php deleted file mode 100644 index 1c6262e22106..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationInstancesRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.visionai.v1.DeleteApplicationInstancesRequest - */ -class DeleteApplicationInstancesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - private $instance_ids; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * Please see {@see AppPlatformClient::applicationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeleteApplicationInstancesRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * @type string[] $instance_ids - * Required. Id of the requesting object. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * 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. Id of the requesting object. - * - * Generated from protobuf field repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return RepeatedField - */ - public function getInstanceIds() - { - return $this->instance_ids; - } - - /** - * Required. Id of the requesting object. - * - * Generated from protobuf field repeated string instance_ids = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string[] $var - * @return $this - */ - public function setInstanceIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->instance_ids = $arr; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationInstancesResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationInstancesResponse.php deleted file mode 100644 index 6639869a6e32..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationInstancesResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.DeleteApplicationInstancesResponse - */ -class DeleteApplicationInstancesResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationRequest.php deleted file mode 100644 index 5a1cce55d659..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteApplicationRequest.php +++ /dev/null @@ -1,197 +0,0 @@ -google.cloud.visionai.v1.DeleteApplicationRequest - */ -class DeleteApplicationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. If set to true, any instances and drafts from this application - * will also be deleted. (Otherwise, the request will only work if the - * application has no instances and drafts.) - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $force = false; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see AppPlatformClient::applicationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeleteApplicationRequest - * - * @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 resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $force - * Optional. If set to true, any instances and drafts from this application - * will also be deleted. (Otherwise, the request will only work if the - * application has no instances and drafts.) - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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 resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. If set to true, any instances and drafts from this application - * will also be deleted. (Otherwise, the request will only work if the - * application has no instances and drafts.) - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * Optional. If set to true, any instances and drafts from this application - * will also be deleted. (Otherwise, the request will only work if the - * application has no instances and drafts.) - * - * Generated from protobuf field bool force = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAssetMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAssetMetadata.php deleted file mode 100644 index 619ebee1ddf8..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAssetMetadata.php +++ /dev/null @@ -1,34 +0,0 @@ -google.cloud.visionai.v1.DeleteAssetMetadata - */ -class DeleteAssetMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAssetRequest.php deleted file mode 100644 index 5f287c5b92a0..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteAssetRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.visionai.v1.DeleteAssetRequest - */ -class DeleteAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the asset to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the asset to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` - * Please see {@see WarehouseClient::assetName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeleteAssetRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the asset to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the asset to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the asset to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteClusterRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteClusterRequest.php deleted file mode 100644 index ffe21a44616b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteClusterRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.visionai.v1.DeleteClusterRequest - */ -class DeleteClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the resource - * Please see {@see StreamsServiceClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\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. Name of the resource - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource - * - * 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 resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCollectionMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCollectionMetadata.php deleted file mode 100644 index 21c6ddbb0d10..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCollectionMetadata.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.visionai.v1.DeleteCollectionMetadata - */ -class DeleteCollectionMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - */ - protected $operation_metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\OperationMetadata $operation_metadata - * Common metadata of the long-running operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null - */ - public function getOperationMetadata() - { - return $this->operation_metadata; - } - - public function hasOperationMetadata() - { - return isset($this->operation_metadata); - } - - public function clearOperationMetadata() - { - unset($this->operation_metadata); - } - - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var - * @return $this - */ - public function setOperationMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); - $this->operation_metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCollectionRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCollectionRequest.php deleted file mode 100644 index 8543be3ee99b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCollectionRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.visionai.v1.DeleteCollectionRequest - */ -class DeleteCollectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the collection to delete. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the collection to delete. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * Please see {@see WarehouseClient::collectionName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeleteCollectionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the collection to delete. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the collection to delete. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the collection to delete. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCorpusRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCorpusRequest.php deleted file mode 100644 index b498c647dc70..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteCorpusRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.visionai.v1.DeleteCorpusRequest - */ -class DeleteCorpusRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the corpus to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the corpus to delete. Please see - * {@see WarehouseClient::corpusName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeleteCorpusRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the corpus to delete. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the corpus to delete. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the corpus to delete. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteDataSchemaRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteDataSchemaRequest.php deleted file mode 100644 index 95ef12345233..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteDataSchemaRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.visionai.v1.DeleteDataSchemaRequest - */ -class DeleteDataSchemaRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the data schema to delete. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the data schema to delete. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` - * Please see {@see WarehouseClient::dataSchemaName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeleteDataSchemaRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the data schema to delete. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the data schema to delete. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the data schema to delete. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteDraftRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteDraftRequest.php deleted file mode 100644 index af9bf47e607a..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteDraftRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.visionai.v1.DeleteDraftRequest - */ -class DeleteDraftRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see AppPlatformClient::draftName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeleteDraftRequest - * - * @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 resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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 resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteEventRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteEventRequest.php deleted file mode 100644 index 2e1ec7d70945..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteEventRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.visionai.v1.DeleteEventRequest - */ -class DeleteEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see StreamsServiceClient::eventName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeleteEventRequest - * - * @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 resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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 resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexEndpointMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexEndpointMetadata.php deleted file mode 100644 index 41e56e755d94..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexEndpointMetadata.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.visionai.v1.DeleteIndexEndpointMetadata - */ -class DeleteIndexEndpointMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - */ - protected $operation_metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\OperationMetadata $operation_metadata - * Common metadata of the long-running operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null - */ - public function getOperationMetadata() - { - return $this->operation_metadata; - } - - public function hasOperationMetadata() - { - return isset($this->operation_metadata); - } - - public function clearOperationMetadata() - { - unset($this->operation_metadata); - } - - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var - * @return $this - */ - public function setOperationMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); - $this->operation_metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexEndpointRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexEndpointRequest.php deleted file mode 100644 index 6b867f691d2e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexEndpointRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.visionai.v1.DeleteIndexEndpointRequest - */ -class DeleteIndexEndpointRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * 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 resource. Please see - * {@see WarehouseClient::indexEndpointName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeleteIndexEndpointRequest - * - * @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 resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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 resource. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexMetadata.php deleted file mode 100644 index 837eaa5cbe72..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexMetadata.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.DeleteIndexMetadata - */ -class DeleteIndexMetadata extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexRequest.php deleted file mode 100644 index 8e3f48470d4f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteIndexRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.visionai.v1.DeleteIndexRequest - */ -class DeleteIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the index to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the index to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * Please see {@see WarehouseClient::indexName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeleteIndexRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the index to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the index to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the index to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteOperatorRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteOperatorRequest.php deleted file mode 100644 index c1897ce316ed..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteOperatorRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.visionai.v1.DeleteOperatorRequest - */ -class DeleteOperatorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the resource - * Please see {@see LiveVideoAnalyticsClient::operatorName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeleteOperatorRequest - * - * @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 resource - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource - * - * 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 resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteProcessRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteProcessRequest.php deleted file mode 100644 index 4b0279a12296..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteProcessRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.visionai.v1.DeleteProcessRequest - */ -class DeleteProcessRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see LiveVideoAnalyticsClient::processName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeleteProcessRequest - * - * @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 resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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 resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteProcessorRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteProcessorRequest.php deleted file mode 100644 index f42a12d90175..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteProcessorRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.visionai.v1.DeleteProcessorRequest - */ -class DeleteProcessorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the resource - * Please see {@see AppPlatformClient::processorName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeleteProcessorRequest - * - * @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 resource - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource - * - * 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 resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSearchConfigRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSearchConfigRequest.php deleted file mode 100644 index df56c6d9dfcc..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSearchConfigRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.visionai.v1.DeleteSearchConfigRequest - */ -class DeleteSearchConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the search configuration to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the search configuration to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` - * Please see {@see WarehouseClient::searchConfigName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeleteSearchConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the search configuration to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the search configuration to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the search configuration to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSearchHypernymRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSearchHypernymRequest.php deleted file mode 100644 index b6cf51b22ae5..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSearchHypernymRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.visionai.v1.DeleteSearchHypernymRequest - */ -class DeleteSearchHypernymRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the SearchHypernym to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the SearchHypernym to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` - * Please see {@see WarehouseClient::searchHypernymName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeleteSearchHypernymRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the SearchHypernym to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the SearchHypernym to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the SearchHypernym to delete. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSeriesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSeriesRequest.php deleted file mode 100644 index ced26faa3df5..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteSeriesRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.visionai.v1.DeleteSeriesRequest - */ -class DeleteSeriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see StreamsServiceClient::seriesName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeleteSeriesRequest - * - * @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 resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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 resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteStreamRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteStreamRequest.php deleted file mode 100644 index c3125881e5b7..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeleteStreamRequest.php +++ /dev/null @@ -1,155 +0,0 @@ -google.cloud.visionai.v1.DeleteStreamRequest - */ -class DeleteStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. Name of the resource. Please see - * {@see StreamsServiceClient::streamName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeleteStreamRequest - * - * @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 resource. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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 resource. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes after the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployApplicationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployApplicationRequest.php deleted file mode 100644 index 078bf7361e4b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployApplicationRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.visionai.v1.DeployApplicationRequest - */ -class DeployApplicationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * If set, validate the request and preview the application graph, but do not - * actually deploy it. - * - * Generated from protobuf field bool validate_only = 2; - */ - protected $validate_only = false; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. Whether or not to enable monitoring for the application on - * deployment. - * - * Generated from protobuf field bool enable_monitoring = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $enable_monitoring = false; - - /** - * @param string $name Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * Please see {@see AppPlatformClient::applicationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\DeployApplicationRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * @type bool $validate_only - * If set, validate the request and preview the application graph, but do not - * actually deploy it. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $enable_monitoring - * Optional. Whether or not to enable monitoring for the application on - * deployment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * 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; - } - - /** - * If set, validate the request and preview the application graph, but do not - * actually deploy it. - * - * Generated from protobuf field bool validate_only = 2; - * @return bool - */ - public function getValidateOnly() - { - return $this->validate_only; - } - - /** - * If set, validate the request and preview the application graph, but do not - * actually deploy it. - * - * Generated from protobuf field bool validate_only = 2; - * @param bool $var - * @return $this - */ - public function setValidateOnly($var) - { - GPBUtil::checkBool($var); - $this->validate_only = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. Whether or not to enable monitoring for the application on - * deployment. - * - * Generated from protobuf field bool enable_monitoring = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getEnableMonitoring() - { - return $this->enable_monitoring; - } - - /** - * Optional. Whether or not to enable monitoring for the application on - * deployment. - * - * Generated from protobuf field bool enable_monitoring = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setEnableMonitoring($var) - { - GPBUtil::checkBool($var); - $this->enable_monitoring = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployApplicationResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployApplicationResponse.php deleted file mode 100644 index 6f8675f33f00..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployApplicationResponse.php +++ /dev/null @@ -1,34 +0,0 @@ -google.cloud.visionai.v1.DeployApplicationResponse - */ -class DeployApplicationResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexMetadata.php deleted file mode 100644 index 507d6534547e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexMetadata.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.visionai.v1.DeployIndexMetadata - */ -class DeployIndexMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - */ - protected $operation_metadata = null; - /** - * Output only. The index being deployed. - * - * Generated from protobuf field string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $deployed_index = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\OperationMetadata $operation_metadata - * Common metadata of the long-running operation. - * @type string $deployed_index - * Output only. The index being deployed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null - */ - public function getOperationMetadata() - { - return $this->operation_metadata; - } - - public function hasOperationMetadata() - { - return isset($this->operation_metadata); - } - - public function clearOperationMetadata() - { - unset($this->operation_metadata); - } - - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var - * @return $this - */ - public function setOperationMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); - $this->operation_metadata = $var; - - return $this; - } - - /** - * Output only. The index being deployed. - * - * Generated from protobuf field string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getDeployedIndex() - { - return $this->deployed_index; - } - - /** - * Output only. The index being deployed. - * - * Generated from protobuf field string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDeployedIndex($var) - { - GPBUtil::checkString($var, True); - $this->deployed_index = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexRequest.php deleted file mode 100644 index 65c579f46479..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.visionai.v1.DeployIndexRequest - */ -class DeployIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. IndexEndpoint the index is deployed to. - * Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` - * - * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $index_endpoint = ''; - /** - * Required. Index to deploy. - * - * Generated from protobuf field .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $deployed_index = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $index_endpoint - * Required. IndexEndpoint the index is deployed to. - * Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` - * @type \Google\Cloud\VisionAI\V1\DeployedIndex $deployed_index - * Required. Index to deploy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. IndexEndpoint the index is deployed to. - * Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` - * - * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getIndexEndpoint() - { - return $this->index_endpoint; - } - - /** - * Required. IndexEndpoint the index is deployed to. - * Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` - * - * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setIndexEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->index_endpoint = $var; - - return $this; - } - - /** - * Required. Index to deploy. - * - * Generated from protobuf field .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\DeployedIndex|null - */ - public function getDeployedIndex() - { - return $this->deployed_index; - } - - public function hasDeployedIndex() - { - return isset($this->deployed_index); - } - - public function clearDeployedIndex() - { - unset($this->deployed_index); - } - - /** - * Required. Index to deploy. - * - * Generated from protobuf field .google.cloud.visionai.v1.DeployedIndex deployed_index = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\DeployedIndex $var - * @return $this - */ - public function setDeployedIndex($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DeployedIndex::class); - $this->deployed_index = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexResponse.php deleted file mode 100644 index cdc4ce60f89c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployIndexResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.DeployIndexResponse - */ -class DeployIndexResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployedIndex.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployedIndex.php deleted file mode 100644 index aa161daa9e2c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployedIndex.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.visionai.v1.DeployedIndex - */ -class DeployedIndex extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the deployed Index. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}` - * - * Generated from protobuf field string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $index = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $index - * Required. Name of the deployed Index. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the deployed Index. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}` - * - * Generated from protobuf field string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getIndex() - { - return $this->index; - } - - /** - * Required. Name of the deployed Index. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}` - * - * Generated from protobuf field string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkString($var, True); - $this->index = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployedIndexReference.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployedIndexReference.php deleted file mode 100644 index 3f59a61c809f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/DeployedIndexReference.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.DeployedIndexReference - */ -class DeployedIndexReference extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. A resource name of the IndexEndpoint. - * - * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - */ - protected $index_endpoint = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $index_endpoint - * Immutable. A resource name of the IndexEndpoint. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. A resource name of the IndexEndpoint. - * - * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @return string - */ - public function getIndexEndpoint() - { - return $this->index_endpoint; - } - - /** - * Immutable. A resource name of the IndexEndpoint. - * - * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setIndexEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->index_endpoint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Draft.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Draft.php deleted file mode 100644 index 94fd0425a320..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Draft.php +++ /dev/null @@ -1,301 +0,0 @@ -google.cloud.visionai.v1.Draft - */ -class Draft extends \Google\Protobuf\Internal\Message -{ - /** - * name of resource - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. [Output only] Create timestamp - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. [Output only] Create timestamp - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 3; - */ - private $labels; - /** - * Required. A user friendly display name for the solution. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * A description for this application. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * The draft application configs which haven't been updated to an application. - * - * Generated from protobuf field .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; - */ - protected $draft_application_configs = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * name of resource - * @type \Google\Protobuf\Timestamp $create_time - * Output only. [Output only] Create timestamp - * @type \Google\Protobuf\Timestamp $update_time - * Output only. [Output only] Create timestamp - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs - * @type string $display_name - * Required. A user friendly display name for the solution. - * @type string $description - * A description for this application. - * @type \Google\Cloud\VisionAI\V1\ApplicationConfigs $draft_application_configs - * The draft application configs which haven't been updated to an application. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * name of resource - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * name of resource - * - * 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. [Output only] Create timestamp - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. [Output only] Create timestamp - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. [Output only] Create timestamp - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. [Output only] Create timestamp - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. A user friendly display name for the solution. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. A user friendly display name for the solution. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * A description for this application. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A description for this application. - * - * 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; - } - - /** - * The draft application configs which haven't been updated to an application. - * - * Generated from protobuf field .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; - * @return \Google\Cloud\VisionAI\V1\ApplicationConfigs|null - */ - public function getDraftApplicationConfigs() - { - return $this->draft_application_configs; - } - - public function hasDraftApplicationConfigs() - { - return isset($this->draft_application_configs); - } - - public function clearDraftApplicationConfigs() - { - unset($this->draft_application_configs); - } - - /** - * The draft application configs which haven't been updated to an application. - * - * Generated from protobuf field .google.cloud.visionai.v1.ApplicationConfigs draft_application_configs = 6; - * @param \Google\Cloud\VisionAI\V1\ApplicationConfigs $var - * @return $this - */ - public function setDraftApplicationConfigs($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ApplicationConfigs::class); - $this->draft_application_configs = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/EagerMode.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/EagerMode.php deleted file mode 100644 index 60161051f0ae..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/EagerMode.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.EagerMode - */ -class EagerMode extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Event.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Event.php deleted file mode 100644 index dd4482c6fe4d..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Event.php +++ /dev/null @@ -1,313 +0,0 @@ -google.cloud.visionai.v1.Event - */ -class Event extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the resource. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Annotations to allow clients to store small amounts of arbitrary data. - * - * Generated from protobuf field map annotations = 5; - */ - private $annotations; - /** - * The clock used for joining streams. - * - * Generated from protobuf field .google.cloud.visionai.v1.Event.Clock alignment_clock = 6; - */ - protected $alignment_clock = 0; - /** - * Grace period for cleaning up the event. This is the time the controller - * waits for before deleting the event. During this period, if there is any - * active channel on the event. The deletion of the event after grace_period - * will be ignored. - * - * Generated from protobuf field .google.protobuf.Duration grace_period = 7; - */ - protected $grace_period = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update timestamp. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Annotations to allow clients to store small amounts of arbitrary data. - * @type int $alignment_clock - * The clock used for joining streams. - * @type \Google\Protobuf\Duration $grace_period - * Grace period for cleaning up the event. This is the time the controller - * waits for before deleting the event. During this period, if there is any - * active channel on the event. The deletion of the event after grace_period - * will be ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsResources::initOnce(); - parent::__construct($data); - } - - /** - * Name of the resource. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the resource. - * - * 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 create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Annotations to allow clients to store small amounts of arbitrary data. - * - * Generated from protobuf field map annotations = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Annotations to allow clients to store small amounts of arbitrary data. - * - * Generated from protobuf field map annotations = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * The clock used for joining streams. - * - * Generated from protobuf field .google.cloud.visionai.v1.Event.Clock alignment_clock = 6; - * @return int - */ - public function getAlignmentClock() - { - return $this->alignment_clock; - } - - /** - * The clock used for joining streams. - * - * Generated from protobuf field .google.cloud.visionai.v1.Event.Clock alignment_clock = 6; - * @param int $var - * @return $this - */ - public function setAlignmentClock($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Event\Clock::class); - $this->alignment_clock = $var; - - return $this; - } - - /** - * Grace period for cleaning up the event. This is the time the controller - * waits for before deleting the event. During this period, if there is any - * active channel on the event. The deletion of the event after grace_period - * will be ignored. - * - * Generated from protobuf field .google.protobuf.Duration grace_period = 7; - * @return \Google\Protobuf\Duration|null - */ - public function getGracePeriod() - { - return $this->grace_period; - } - - public function hasGracePeriod() - { - return isset($this->grace_period); - } - - public function clearGracePeriod() - { - unset($this->grace_period); - } - - /** - * Grace period for cleaning up the event. This is the time the controller - * waits for before deleting the event. During this period, if there is any - * active channel on the event. The deletion of the event after grace_period - * will be ignored. - * - * Generated from protobuf field .google.protobuf.Duration grace_period = 7; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setGracePeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->grace_period = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Event/Clock.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Event/Clock.php deleted file mode 100644 index b5add37772a9..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Event/Clock.php +++ /dev/null @@ -1,62 +0,0 @@ -google.cloud.visionai.v1.Event.Clock - */ -class Clock -{ - /** - * Clock is not specified. - * - * Generated from protobuf enum CLOCK_UNSPECIFIED = 0; - */ - const CLOCK_UNSPECIFIED = 0; - /** - * Use the timestamp when the data is captured. Clients need to sync the - * clock. - * - * Generated from protobuf enum CAPTURE = 1; - */ - const CAPTURE = 1; - /** - * Use the timestamp when the data is received. - * - * Generated from protobuf enum INGEST = 2; - */ - const INGEST = 2; - - private static $valueToName = [ - self::CLOCK_UNSPECIFIED => 'CLOCK_UNSPECIFIED', - self::CAPTURE => 'CAPTURE', - self::INGEST => 'INGEST', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/EventUpdate.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/EventUpdate.php deleted file mode 100644 index e8bbf180ae94..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/EventUpdate.php +++ /dev/null @@ -1,217 +0,0 @@ -google.cloud.visionai.v1.EventUpdate - */ -class EventUpdate extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the stream that the event is attached to. - * - * Generated from protobuf field string stream = 1; - */ - protected $stream = ''; - /** - * The name of the event. - * - * Generated from protobuf field string event = 2; - */ - protected $event = ''; - /** - * The name of the series. - * - * Generated from protobuf field string series = 3; - */ - protected $series = ''; - /** - * The timestamp when the Event update happens. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - */ - protected $update_time = null; - /** - * The offset of the message that will be used to acknowledge of the message - * receiving. - * - * Generated from protobuf field int64 offset = 5; - */ - protected $offset = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $stream - * The name of the stream that the event is attached to. - * @type string $event - * The name of the event. - * @type string $series - * The name of the series. - * @type \Google\Protobuf\Timestamp $update_time - * The timestamp when the Event update happens. - * @type int|string $offset - * The offset of the message that will be used to acknowledge of the message - * receiving. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - - /** - * The name of the stream that the event is attached to. - * - * Generated from protobuf field string stream = 1; - * @return string - */ - public function getStream() - { - return $this->stream; - } - - /** - * The name of the stream that the event is attached to. - * - * Generated from protobuf field string stream = 1; - * @param string $var - * @return $this - */ - public function setStream($var) - { - GPBUtil::checkString($var, True); - $this->stream = $var; - - return $this; - } - - /** - * The name of the event. - * - * Generated from protobuf field string event = 2; - * @return string - */ - public function getEvent() - { - return $this->event; - } - - /** - * The name of the event. - * - * Generated from protobuf field string event = 2; - * @param string $var - * @return $this - */ - public function setEvent($var) - { - GPBUtil::checkString($var, True); - $this->event = $var; - - return $this; - } - - /** - * The name of the series. - * - * Generated from protobuf field string series = 3; - * @return string - */ - public function getSeries() - { - return $this->series; - } - - /** - * The name of the series. - * - * Generated from protobuf field string series = 3; - * @param string $var - * @return $this - */ - public function setSeries($var) - { - GPBUtil::checkString($var, True); - $this->series = $var; - - return $this; - } - - /** - * The timestamp when the Event update happens. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The timestamp when the Event update happens. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * The offset of the message that will be used to acknowledge of the message - * receiving. - * - * Generated from protobuf field int64 offset = 5; - * @return int|string - */ - public function getOffset() - { - return $this->offset; - } - - /** - * The offset of the message that will be used to acknowledge of the message - * receiving. - * - * Generated from protobuf field int64 offset = 5; - * @param int|string $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkInt64($var); - $this->offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucket.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucket.php deleted file mode 100644 index 9cf0f0d6c598..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucket.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.visionai.v1.FacetBucket - */ -class FacetBucket extends \Google\Protobuf\Internal\Message -{ - /** - * Whether one facet bucket is selected. This field represents user's facet - * selection. It is set by frontend in SearchVideosRequest. - * - * Generated from protobuf field bool selected = 3; - */ - protected $selected = false; - protected $bucket_value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\FacetValue $value - * Singular value. - * @type \Google\Cloud\VisionAI\V1\FacetBucket\Range $range - * Range value. - * @type bool $selected - * Whether one facet bucket is selected. This field represents user's facet - * selection. It is set by frontend in SearchVideosRequest. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Singular value. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetValue value = 2; - * @return \Google\Cloud\VisionAI\V1\FacetValue|null - */ - public function getValue() - { - return $this->readOneof(2); - } - - public function hasValue() - { - return $this->hasOneof(2); - } - - /** - * Singular value. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetValue value = 2; - * @param \Google\Cloud\VisionAI\V1\FacetValue $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetValue::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Range value. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetBucket.Range range = 4; - * @return \Google\Cloud\VisionAI\V1\FacetBucket\Range|null - */ - public function getRange() - { - return $this->readOneof(4); - } - - public function hasRange() - { - return $this->hasOneof(4); - } - - /** - * Range value. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetBucket.Range range = 4; - * @param \Google\Cloud\VisionAI\V1\FacetBucket\Range $var - * @return $this - */ - public function setRange($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetBucket\Range::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Whether one facet bucket is selected. This field represents user's facet - * selection. It is set by frontend in SearchVideosRequest. - * - * Generated from protobuf field bool selected = 3; - * @return bool - */ - public function getSelected() - { - return $this->selected; - } - - /** - * Whether one facet bucket is selected. This field represents user's facet - * selection. It is set by frontend in SearchVideosRequest. - * - * Generated from protobuf field bool selected = 3; - * @param bool $var - * @return $this - */ - public function setSelected($var) - { - GPBUtil::checkBool($var); - $this->selected = $var; - - return $this; - } - - /** - * @return string - */ - public function getBucketValue() - { - return $this->whichOneof("bucket_value"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucket/Range.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucket/Range.php deleted file mode 100644 index 2330b162d28e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucket/Range.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.visionai.v1.FacetBucket.Range - */ -class Range extends \Google\Protobuf\Internal\Message -{ - /** - * Start of the range. Non-existence indicates some bound (e.g. -inf). - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetValue start = 1; - */ - protected $start = null; - /** - * End of the range. Non-existence indicates some bound (e.g. inf). - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetValue end = 2; - */ - protected $end = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\FacetValue $start - * Start of the range. Non-existence indicates some bound (e.g. -inf). - * @type \Google\Cloud\VisionAI\V1\FacetValue $end - * End of the range. Non-existence indicates some bound (e.g. inf). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Start of the range. Non-existence indicates some bound (e.g. -inf). - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetValue start = 1; - * @return \Google\Cloud\VisionAI\V1\FacetValue|null - */ - public function getStart() - { - return $this->start; - } - - public function hasStart() - { - return isset($this->start); - } - - public function clearStart() - { - unset($this->start); - } - - /** - * Start of the range. Non-existence indicates some bound (e.g. -inf). - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetValue start = 1; - * @param \Google\Cloud\VisionAI\V1\FacetValue $var - * @return $this - */ - public function setStart($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetValue::class); - $this->start = $var; - - return $this; - } - - /** - * End of the range. Non-existence indicates some bound (e.g. inf). - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetValue end = 2; - * @return \Google\Cloud\VisionAI\V1\FacetValue|null - */ - public function getEnd() - { - return $this->end; - } - - public function hasEnd() - { - return isset($this->end); - } - - public function clearEnd() - { - unset($this->end); - } - - /** - * End of the range. Non-existence indicates some bound (e.g. inf). - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetValue end = 2; - * @param \Google\Cloud\VisionAI\V1\FacetValue $var - * @return $this - */ - public function setEnd($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetValue::class); - $this->end = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucketType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucketType.php deleted file mode 100644 index 29836710ce5a..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetBucketType.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.visionai.v1.FacetBucketType - */ -class FacetBucketType -{ - /** - * Unspecified type. - * - * Generated from protobuf enum FACET_BUCKET_TYPE_UNSPECIFIED = 0; - */ - const FACET_BUCKET_TYPE_UNSPECIFIED = 0; - /** - * Value type. - * - * Generated from protobuf enum FACET_BUCKET_TYPE_VALUE = 1; - */ - const FACET_BUCKET_TYPE_VALUE = 1; - /** - * Datetime type. - * - * Generated from protobuf enum FACET_BUCKET_TYPE_DATETIME = 2; - */ - const FACET_BUCKET_TYPE_DATETIME = 2; - /** - * Fixed Range type. - * - * Generated from protobuf enum FACET_BUCKET_TYPE_FIXED_RANGE = 3; - */ - const FACET_BUCKET_TYPE_FIXED_RANGE = 3; - /** - * Custom Range type. - * - * Generated from protobuf enum FACET_BUCKET_TYPE_CUSTOM_RANGE = 4; - */ - const FACET_BUCKET_TYPE_CUSTOM_RANGE = 4; - - private static $valueToName = [ - self::FACET_BUCKET_TYPE_UNSPECIFIED => 'FACET_BUCKET_TYPE_UNSPECIFIED', - self::FACET_BUCKET_TYPE_VALUE => 'FACET_BUCKET_TYPE_VALUE', - self::FACET_BUCKET_TYPE_DATETIME => 'FACET_BUCKET_TYPE_DATETIME', - self::FACET_BUCKET_TYPE_FIXED_RANGE => 'FACET_BUCKET_TYPE_FIXED_RANGE', - self::FACET_BUCKET_TYPE_CUSTOM_RANGE => 'FACET_BUCKET_TYPE_CUSTOM_RANGE', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetGroup.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetGroup.php deleted file mode 100644 index fab8822be591..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetGroup.php +++ /dev/null @@ -1,224 +0,0 @@ -google.cloud.visionai.v1.FacetGroup - */ -class FacetGroup extends \Google\Protobuf\Internal\Message -{ - /** - * Unique id of the facet group. - * - * Generated from protobuf field string facet_id = 1; - */ - protected $facet_id = ''; - /** - * Display name of the facet. To be used by UI for facet rendering. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Buckets associated with the facet. E.g. for "Team" facet, the bucket - * can be 49ers, patriots, etc. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; - */ - private $buckets; - /** - * Facet bucket type. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; - */ - protected $bucket_type = 0; - /** - * If true, return query matched annotations for this facet group's selection. - * This option is only applicable for facets based on partition level - * annotations. It supports the following facet values: - * - INTEGER - * - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only) - * - * Generated from protobuf field bool fetch_matched_annotations = 5; - */ - protected $fetch_matched_annotations = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $facet_id - * Unique id of the facet group. - * @type string $display_name - * Display name of the facet. To be used by UI for facet rendering. - * @type \Google\Cloud\VisionAI\V1\FacetBucket[] $buckets - * Buckets associated with the facet. E.g. for "Team" facet, the bucket - * can be 49ers, patriots, etc. - * @type int $bucket_type - * Facet bucket type. - * @type bool $fetch_matched_annotations - * If true, return query matched annotations for this facet group's selection. - * This option is only applicable for facets based on partition level - * annotations. It supports the following facet values: - * - INTEGER - * - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only) - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Unique id of the facet group. - * - * Generated from protobuf field string facet_id = 1; - * @return string - */ - public function getFacetId() - { - return $this->facet_id; - } - - /** - * Unique id of the facet group. - * - * Generated from protobuf field string facet_id = 1; - * @param string $var - * @return $this - */ - public function setFacetId($var) - { - GPBUtil::checkString($var, True); - $this->facet_id = $var; - - return $this; - } - - /** - * Display name of the facet. To be used by UI for facet rendering. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Display name of the facet. To be used by UI for facet rendering. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Buckets associated with the facet. E.g. for "Team" facet, the bucket - * can be 49ers, patriots, etc. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\FacetBucket> - */ - public function getBuckets() - { - return $this->buckets; - } - - /** - * Buckets associated with the facet. E.g. for "Team" facet, the bucket - * can be 49ers, patriots, etc. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetBucket buckets = 3; - * @param \Google\Cloud\VisionAI\V1\FacetBucket[] $var - * @return $this - */ - public function setBuckets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\FacetBucket::class); - $this->buckets = $arr; - - return $this; - } - - /** - * Facet bucket type. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; - * @return int - */ - public function getBucketType() - { - return $this->bucket_type; - } - - /** - * Facet bucket type. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; - * @param int $var - * @return $this - */ - public function setBucketType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\FacetBucketType::class); - $this->bucket_type = $var; - - return $this; - } - - /** - * If true, return query matched annotations for this facet group's selection. - * This option is only applicable for facets based on partition level - * annotations. It supports the following facet values: - * - INTEGER - * - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only) - * - * Generated from protobuf field bool fetch_matched_annotations = 5; - * @return bool - */ - public function getFetchMatchedAnnotations() - { - return $this->fetch_matched_annotations; - } - - /** - * If true, return query matched annotations for this facet group's selection. - * This option is only applicable for facets based on partition level - * annotations. It supports the following facet values: - * - INTEGER - * - STRING (DataSchema.SearchStrategy.EXACT_SEARCH only) - * - * Generated from protobuf field bool fetch_matched_annotations = 5; - * @param bool $var - * @return $this - */ - public function setFetchMatchedAnnotations($var) - { - GPBUtil::checkBool($var); - $this->fetch_matched_annotations = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty.php deleted file mode 100644 index 915b8bdba03f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty.php +++ /dev/null @@ -1,329 +0,0 @@ -google.cloud.visionai.v1.FacetProperty - */ -class FacetProperty extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the facets, which are the dimensions users want to use to refine - * search results. `mapped_fields` will match UserSpecifiedDataSchema keys. - * For example, user can add a bunch of UGAs with the same key, such as - * player:adam, player:bob, player:charles. When multiple mapped_fields are - * specified, will merge their value together as final facet value. E.g. - * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field = - * [home_team, away_team], facet_value will be [a, b, c]. - * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the - * mapped_field equals the parent SearchConfig.name, the parent must - * also contain a SearchCriteriaProperty that maps to the same fields. - * mapped_fields must not be empty. - * - * Generated from protobuf field repeated string mapped_fields = 1; - */ - private $mapped_fields; - /** - * Display name of the facet. To be used by UI for facet rendering. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Maximum number of unique bucket to return for one facet. Bucket number can - * be large for high-cardinality facet such as "player". We only return top-n - * most related ones to user. If it's <= 0, the server will decide the - * appropriate result_size. - * - * Generated from protobuf field int64 result_size = 3; - */ - protected $result_size = 0; - /** - * Facet bucket type e.g. value, range. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; - */ - protected $bucket_type = 0; - protected $range_facet_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\FacetProperty\FixedRangeBucketSpec $fixed_range_bucket_spec - * Fixed range facet bucket config. - * @type \Google\Cloud\VisionAI\V1\FacetProperty\CustomRangeBucketSpec $custom_range_bucket_spec - * Custom range facet bucket config. - * @type \Google\Cloud\VisionAI\V1\FacetProperty\DateTimeBucketSpec $datetime_bucket_spec - * Datetime range facet bucket config. - * @type string[] $mapped_fields - * Name of the facets, which are the dimensions users want to use to refine - * search results. `mapped_fields` will match UserSpecifiedDataSchema keys. - * For example, user can add a bunch of UGAs with the same key, such as - * player:adam, player:bob, player:charles. When multiple mapped_fields are - * specified, will merge their value together as final facet value. E.g. - * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field = - * [home_team, away_team], facet_value will be [a, b, c]. - * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the - * mapped_field equals the parent SearchConfig.name, the parent must - * also contain a SearchCriteriaProperty that maps to the same fields. - * mapped_fields must not be empty. - * @type string $display_name - * Display name of the facet. To be used by UI for facet rendering. - * @type int|string $result_size - * Maximum number of unique bucket to return for one facet. Bucket number can - * be large for high-cardinality facet such as "player". We only return top-n - * most related ones to user. If it's <= 0, the server will decide the - * appropriate result_size. - * @type int $bucket_type - * Facet bucket type e.g. value, range. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Fixed range facet bucket config. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5; - * @return \Google\Cloud\VisionAI\V1\FacetProperty\FixedRangeBucketSpec|null - */ - public function getFixedRangeBucketSpec() - { - return $this->readOneof(5); - } - - public function hasFixedRangeBucketSpec() - { - return $this->hasOneof(5); - } - - /** - * Fixed range facet bucket config. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec fixed_range_bucket_spec = 5; - * @param \Google\Cloud\VisionAI\V1\FacetProperty\FixedRangeBucketSpec $var - * @return $this - */ - public function setFixedRangeBucketSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetProperty\FixedRangeBucketSpec::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Custom range facet bucket config. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6; - * @return \Google\Cloud\VisionAI\V1\FacetProperty\CustomRangeBucketSpec|null - */ - public function getCustomRangeBucketSpec() - { - return $this->readOneof(6); - } - - public function hasCustomRangeBucketSpec() - { - return $this->hasOneof(6); - } - - /** - * Custom range facet bucket config. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec custom_range_bucket_spec = 6; - * @param \Google\Cloud\VisionAI\V1\FacetProperty\CustomRangeBucketSpec $var - * @return $this - */ - public function setCustomRangeBucketSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetProperty\CustomRangeBucketSpec::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Datetime range facet bucket config. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7; - * @return \Google\Cloud\VisionAI\V1\FacetProperty\DateTimeBucketSpec|null - */ - public function getDatetimeBucketSpec() - { - return $this->readOneof(7); - } - - public function hasDatetimeBucketSpec() - { - return $this->hasOneof(7); - } - - /** - * Datetime range facet bucket config. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec datetime_bucket_spec = 7; - * @param \Google\Cloud\VisionAI\V1\FacetProperty\DateTimeBucketSpec $var - * @return $this - */ - public function setDatetimeBucketSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetProperty\DateTimeBucketSpec::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Name of the facets, which are the dimensions users want to use to refine - * search results. `mapped_fields` will match UserSpecifiedDataSchema keys. - * For example, user can add a bunch of UGAs with the same key, such as - * player:adam, player:bob, player:charles. When multiple mapped_fields are - * specified, will merge their value together as final facet value. E.g. - * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field = - * [home_team, away_team], facet_value will be [a, b, c]. - * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the - * mapped_field equals the parent SearchConfig.name, the parent must - * also contain a SearchCriteriaProperty that maps to the same fields. - * mapped_fields must not be empty. - * - * Generated from protobuf field repeated string mapped_fields = 1; - * @return RepeatedField - */ - public function getMappedFields() - { - return $this->mapped_fields; - } - - /** - * Name of the facets, which are the dimensions users want to use to refine - * search results. `mapped_fields` will match UserSpecifiedDataSchema keys. - * For example, user can add a bunch of UGAs with the same key, such as - * player:adam, player:bob, player:charles. When multiple mapped_fields are - * specified, will merge their value together as final facet value. E.g. - * home_team: a, home_team:b, away_team:a, away_team:c, when facet_field = - * [home_team, away_team], facet_value will be [a, b, c]. - * UNLESS this is a 1:1 facet dimension (mapped_fields.size() == 1) AND the - * mapped_field equals the parent SearchConfig.name, the parent must - * also contain a SearchCriteriaProperty that maps to the same fields. - * mapped_fields must not be empty. - * - * Generated from protobuf field repeated string mapped_fields = 1; - * @param string[] $var - * @return $this - */ - public function setMappedFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->mapped_fields = $arr; - - return $this; - } - - /** - * Display name of the facet. To be used by UI for facet rendering. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Display name of the facet. To be used by UI for facet rendering. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Maximum number of unique bucket to return for one facet. Bucket number can - * be large for high-cardinality facet such as "player". We only return top-n - * most related ones to user. If it's <= 0, the server will decide the - * appropriate result_size. - * - * Generated from protobuf field int64 result_size = 3; - * @return int|string - */ - public function getResultSize() - { - return $this->result_size; - } - - /** - * Maximum number of unique bucket to return for one facet. Bucket number can - * be large for high-cardinality facet such as "player". We only return top-n - * most related ones to user. If it's <= 0, the server will decide the - * appropriate result_size. - * - * Generated from protobuf field int64 result_size = 3; - * @param int|string $var - * @return $this - */ - public function setResultSize($var) - { - GPBUtil::checkInt64($var); - $this->result_size = $var; - - return $this; - } - - /** - * Facet bucket type e.g. value, range. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; - * @return int - */ - public function getBucketType() - { - return $this->bucket_type; - } - - /** - * Facet bucket type e.g. value, range. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetBucketType bucket_type = 4; - * @param int $var - * @return $this - */ - public function setBucketType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\FacetBucketType::class); - $this->bucket_type = $var; - - return $this; - } - - /** - * @return string - */ - public function getRangeFacetConfig() - { - return $this->whichOneof("range_facet_config"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/CustomRangeBucketSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/CustomRangeBucketSpec.php deleted file mode 100644 index cdedcb07e040..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/CustomRangeBucketSpec.php +++ /dev/null @@ -1,74 +0,0 @@ -google.cloud.visionai.v1.FacetProperty.CustomRangeBucketSpec - */ -class CustomRangeBucketSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Currently, only integer type is supported for this field. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; - */ - private $endpoints; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\FacetValue[] $endpoints - * Currently, only integer type is supported for this field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Currently, only integer type is supported for this field. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\FacetValue> - */ - public function getEndpoints() - { - return $this->endpoints; - } - - /** - * Currently, only integer type is supported for this field. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetValue endpoints = 1; - * @param \Google\Cloud\VisionAI\V1\FacetValue[] $var - * @return $this - */ - public function setEndpoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\FacetValue::class); - $this->endpoints = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/DateTimeBucketSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/DateTimeBucketSpec.php deleted file mode 100644 index 667fa8856f67..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/DateTimeBucketSpec.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec - */ -class DateTimeBucketSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Granularity of date type facet. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity granularity = 1; - */ - protected $granularity = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $granularity - * Granularity of date type facet. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Granularity of date type facet. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity granularity = 1; - * @return int - */ - public function getGranularity() - { - return $this->granularity; - } - - /** - * Granularity of date type facet. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity granularity = 1; - * @param int $var - * @return $this - */ - public function setGranularity($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\FacetProperty\DateTimeBucketSpec\Granularity::class); - $this->granularity = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/DateTimeBucketSpec/Granularity.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/DateTimeBucketSpec/Granularity.php deleted file mode 100644 index a858537b2482..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/DateTimeBucketSpec/Granularity.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.visionai.v1.FacetProperty.DateTimeBucketSpec.Granularity - */ -class Granularity -{ - /** - * Unspecified granularity. - * - * Generated from protobuf enum GRANULARITY_UNSPECIFIED = 0; - */ - const GRANULARITY_UNSPECIFIED = 0; - /** - * Granularity is year. - * - * Generated from protobuf enum YEAR = 1; - */ - const YEAR = 1; - /** - * Granularity is month. - * - * Generated from protobuf enum MONTH = 2; - */ - const MONTH = 2; - /** - * Granularity is day. - * - * Generated from protobuf enum DAY = 3; - */ - const DAY = 3; - - private static $valueToName = [ - self::GRANULARITY_UNSPECIFIED => 'GRANULARITY_UNSPECIFIED', - self::YEAR => 'YEAR', - self::MONTH => 'MONTH', - self::DAY => 'DAY', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/FixedRangeBucketSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/FixedRangeBucketSpec.php deleted file mode 100644 index fbcc8cb0bd3a..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetProperty/FixedRangeBucketSpec.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.visionai.v1.FacetProperty.FixedRangeBucketSpec - */ -class FixedRangeBucketSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Lower bound of the bucket. NOTE: Only integer type is currently supported - * for this field. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetValue bucket_start = 1; - */ - protected $bucket_start = null; - /** - * Bucket granularity. NOTE: Only integer type is currently supported for - * this field. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; - */ - protected $bucket_granularity = null; - /** - * Total number of buckets. - * - * Generated from protobuf field int32 bucket_count = 3; - */ - protected $bucket_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\FacetValue $bucket_start - * Lower bound of the bucket. NOTE: Only integer type is currently supported - * for this field. - * @type \Google\Cloud\VisionAI\V1\FacetValue $bucket_granularity - * Bucket granularity. NOTE: Only integer type is currently supported for - * this field. - * @type int $bucket_count - * Total number of buckets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Lower bound of the bucket. NOTE: Only integer type is currently supported - * for this field. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetValue bucket_start = 1; - * @return \Google\Cloud\VisionAI\V1\FacetValue|null - */ - public function getBucketStart() - { - return $this->bucket_start; - } - - public function hasBucketStart() - { - return isset($this->bucket_start); - } - - public function clearBucketStart() - { - unset($this->bucket_start); - } - - /** - * Lower bound of the bucket. NOTE: Only integer type is currently supported - * for this field. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetValue bucket_start = 1; - * @param \Google\Cloud\VisionAI\V1\FacetValue $var - * @return $this - */ - public function setBucketStart($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetValue::class); - $this->bucket_start = $var; - - return $this; - } - - /** - * Bucket granularity. NOTE: Only integer type is currently supported for - * this field. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; - * @return \Google\Cloud\VisionAI\V1\FacetValue|null - */ - public function getBucketGranularity() - { - return $this->bucket_granularity; - } - - public function hasBucketGranularity() - { - return isset($this->bucket_granularity); - } - - public function clearBucketGranularity() - { - unset($this->bucket_granularity); - } - - /** - * Bucket granularity. NOTE: Only integer type is currently supported for - * this field. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetValue bucket_granularity = 2; - * @param \Google\Cloud\VisionAI\V1\FacetValue $var - * @return $this - */ - public function setBucketGranularity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetValue::class); - $this->bucket_granularity = $var; - - return $this; - } - - /** - * Total number of buckets. - * - * Generated from protobuf field int32 bucket_count = 3; - * @return int - */ - public function getBucketCount() - { - return $this->bucket_count; - } - - /** - * Total number of buckets. - * - * Generated from protobuf field int32 bucket_count = 3; - * @param int $var - * @return $this - */ - public function setBucketCount($var) - { - GPBUtil::checkInt32($var); - $this->bucket_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetValue.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetValue.php deleted file mode 100644 index 5bab50ba7e65..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FacetValue.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.visionai.v1.FacetValue - */ -class FacetValue extends \Google\Protobuf\Internal\Message -{ - protected $value; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $string_value - * String type value. - * @type int|string $integer_value - * Integer type value. - * @type \Google\Type\DateTime $datetime_value - * Datetime type value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * String type value. - * - * Generated from protobuf field string string_value = 1; - * @return string - */ - public function getStringValue() - { - return $this->readOneof(1); - } - - public function hasStringValue() - { - return $this->hasOneof(1); - } - - /** - * String type value. - * - * Generated from protobuf field string string_value = 1; - * @param string $var - * @return $this - */ - public function setStringValue($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Integer type value. - * - * Generated from protobuf field int64 integer_value = 2; - * @return int|string - */ - public function getIntegerValue() - { - return $this->readOneof(2); - } - - public function hasIntegerValue() - { - return $this->hasOneof(2); - } - - /** - * Integer type value. - * - * Generated from protobuf field int64 integer_value = 2; - * @param int|string $var - * @return $this - */ - public function setIntegerValue($var) - { - GPBUtil::checkInt64($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Datetime type value. - * - * Generated from protobuf field .google.type.DateTime datetime_value = 3; - * @return \Google\Type\DateTime|null - */ - public function getDatetimeValue() - { - return $this->readOneof(3); - } - - public function hasDatetimeValue() - { - return $this->hasOneof(3); - } - - /** - * Datetime type value. - * - * Generated from protobuf field .google.type.DateTime datetime_value = 3; - * @param \Google\Type\DateTime $var - * @return $this - */ - public function setDatetimeValue($var) - { - GPBUtil::checkMessage($var, \Google\Type\DateTime::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getValue() - { - return $this->whichOneof("value"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FloatRange.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FloatRange.php deleted file mode 100644 index e8b722731500..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FloatRange.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.visionai.v1.FloatRange - */ -class FloatRange extends \Google\Protobuf\Internal\Message -{ - /** - * Start of the float range. - * - * Generated from protobuf field optional float start = 1; - */ - protected $start = null; - /** - * End of the float range. - * - * Generated from protobuf field optional float end = 2; - */ - protected $end = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $start - * Start of the float range. - * @type float $end - * End of the float range. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Start of the float range. - * - * Generated from protobuf field optional float start = 1; - * @return float - */ - public function getStart() - { - return isset($this->start) ? $this->start : 0.0; - } - - public function hasStart() - { - return isset($this->start); - } - - public function clearStart() - { - unset($this->start); - } - - /** - * Start of the float range. - * - * Generated from protobuf field optional float start = 1; - * @param float $var - * @return $this - */ - public function setStart($var) - { - GPBUtil::checkFloat($var); - $this->start = $var; - - return $this; - } - - /** - * End of the float range. - * - * Generated from protobuf field optional float end = 2; - * @return float - */ - public function getEnd() - { - return isset($this->end) ? $this->end : 0.0; - } - - public function hasEnd() - { - return isset($this->end); - } - - public function clearEnd() - { - unset($this->end); - } - - /** - * End of the float range. - * - * Generated from protobuf field optional float end = 2; - * @param float $var - * @return $this - */ - public function setEnd($var) - { - GPBUtil::checkFloat($var); - $this->end = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FloatRangeArray.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FloatRangeArray.php deleted file mode 100644 index 686d4d7b3f66..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/FloatRangeArray.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.FloatRangeArray - */ -class FloatRangeArray extends \Google\Protobuf\Internal\Message -{ - /** - * Float range values. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; - */ - private $float_ranges; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\FloatRange[] $float_ranges - * Float range values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Float range values. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\FloatRange> - */ - public function getFloatRanges() - { - return $this->float_ranges; - } - - /** - * Float range values. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.FloatRange float_ranges = 1; - * @param \Google\Cloud\VisionAI\V1\FloatRange[] $var - * @return $this - */ - public function setFloatRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\FloatRange::class); - $this->float_ranges = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GcsOutputConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GcsOutputConfig.php deleted file mode 100644 index 05143623b491..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GcsOutputConfig.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.GcsOutputConfig - */ -class GcsOutputConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The Cloud Storage path for Vision AI Platform to ingest annotations to. - * - * Generated from protobuf field string gcs_path = 1; - */ - protected $gcs_path = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $gcs_path - * The Cloud Storage path for Vision AI Platform to ingest annotations to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * The Cloud Storage path for Vision AI Platform to ingest annotations to. - * - * Generated from protobuf field string gcs_path = 1; - * @return string - */ - public function getGcsPath() - { - return $this->gcs_path; - } - - /** - * The Cloud Storage path for Vision AI Platform to ingest annotations to. - * - * Generated from protobuf field string gcs_path = 1; - * @param string $var - * @return $this - */ - public function setGcsPath($var) - { - GPBUtil::checkString($var, True); - $this->gcs_path = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GcsSource.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GcsSource.php deleted file mode 100644 index 4c1063058a5d..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GcsSource.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.GcsSource - */ -class GcsSource extends \Google\Protobuf\Internal\Message -{ - /** - * Required. References to a Google Cloud Storage paths. - * - * Generated from protobuf field repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - private $uris; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $uris - * Required. References to a Google Cloud Storage paths. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Required. References to a Google Cloud Storage paths. - * - * Generated from protobuf field repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField - */ - public function getUris() - { - return $this->uris; - } - - /** - * Required. References to a Google Cloud Storage paths. - * - * Generated from protobuf field repeated string uris = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string[] $var - * @return $this - */ - public function setUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->uris = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeneralObjectDetectionConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeneralObjectDetectionConfig.php deleted file mode 100644 index e755d890a4f7..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeneralObjectDetectionConfig.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.GeneralObjectDetectionConfig - */ -class GeneralObjectDetectionConfig extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateHlsUriRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateHlsUriRequest.php deleted file mode 100644 index fe71fa49dea1..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateHlsUriRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.visionai.v1.GenerateHlsUriRequest - */ -class GenerateHlsUriRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the asset to request clips for. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The time range to request clips for. Will be ignored if `get_live_view` is - * set to True. The total time range requested should be smaller than 24h. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; - */ - private $temporal_partitions; - /** - * Option to exclusively show a livestream of the asset with up to 3 minutes - * of backlog data. - * - * Generated from protobuf field bool live_view_enabled = 3; - */ - protected $live_view_enabled = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the asset to request clips for. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * @type \Google\Cloud\VisionAI\V1\Partition\TemporalPartition[] $temporal_partitions - * The time range to request clips for. Will be ignored if `get_live_view` is - * set to True. The total time range requested should be smaller than 24h. - * @type bool $live_view_enabled - * Option to exclusively show a livestream of the asset with up to 3 minutes - * of backlog data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the asset to request clips for. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the asset to request clips for. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The time range to request clips for. Will be ignored if `get_live_view` is - * set to True. The total time range requested should be smaller than 24h. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Partition\TemporalPartition> - */ - public function getTemporalPartitions() - { - return $this->temporal_partitions; - } - - /** - * The time range to request clips for. Will be ignored if `get_live_view` is - * set to True. The total time range requested should be smaller than 24h. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; - * @param \Google\Cloud\VisionAI\V1\Partition\TemporalPartition[] $var - * @return $this - */ - public function setTemporalPartitions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Partition\TemporalPartition::class); - $this->temporal_partitions = $arr; - - return $this; - } - - /** - * Option to exclusively show a livestream of the asset with up to 3 minutes - * of backlog data. - * - * Generated from protobuf field bool live_view_enabled = 3; - * @return bool - */ - public function getLiveViewEnabled() - { - return $this->live_view_enabled; - } - - /** - * Option to exclusively show a livestream of the asset with up to 3 minutes - * of backlog data. - * - * Generated from protobuf field bool live_view_enabled = 3; - * @param bool $var - * @return $this - */ - public function setLiveViewEnabled($var) - { - GPBUtil::checkBool($var); - $this->live_view_enabled = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateHlsUriResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateHlsUriResponse.php deleted file mode 100644 index 9ca10d650efa..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateHlsUriResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.visionai.v1.GenerateHlsUriResponse - */ -class GenerateHlsUriResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A signed uri to download the HLS manifest corresponding to the requested - * times. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - /** - * A list of temporal partitions of the content returned in the order they - * appear in the stream. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; - */ - private $temporal_partitions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * A signed uri to download the HLS manifest corresponding to the requested - * times. - * @type \Google\Cloud\VisionAI\V1\Partition\TemporalPartition[] $temporal_partitions - * A list of temporal partitions of the content returned in the order they - * appear in the stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * A signed uri to download the HLS manifest corresponding to the requested - * times. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * A signed uri to download the HLS manifest corresponding to the requested - * times. - * - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * A list of temporal partitions of the content returned in the order they - * appear in the stream. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Partition\TemporalPartition> - */ - public function getTemporalPartitions() - { - return $this->temporal_partitions; - } - - /** - * A list of temporal partitions of the content returned in the order they - * appear in the stream. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partitions = 2; - * @param \Google\Cloud\VisionAI\V1\Partition\TemporalPartition[] $var - * @return $this - */ - public function setTemporalPartitions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Partition\TemporalPartition::class); - $this->temporal_partitions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateRetrievalUrlRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateRetrievalUrlRequest.php deleted file mode 100644 index ef1dce3b8733..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateRetrievalUrlRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.visionai.v1.GenerateRetrievalUrlRequest - */ -class GenerateRetrievalUrlRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the asset to request signed url for. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the asset to request signed url for. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the asset to request signed url for. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the asset to request signed url for. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateRetrievalUrlResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateRetrievalUrlResponse.php deleted file mode 100644 index 957b8531550c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateRetrievalUrlResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.GenerateRetrievalUrlResponse - */ -class GenerateRetrievalUrlResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A signed url to download the content of the asset. - * - * Generated from protobuf field string signed_uri = 1; - */ - protected $signed_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $signed_uri - * A signed url to download the content of the asset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * A signed url to download the content of the asset. - * - * Generated from protobuf field string signed_uri = 1; - * @return string - */ - public function getSignedUri() - { - return $this->signed_uri; - } - - /** - * A signed url to download the content of the asset. - * - * Generated from protobuf field string signed_uri = 1; - * @param string $var - * @return $this - */ - public function setSignedUri($var) - { - GPBUtil::checkString($var, True); - $this->signed_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateStreamHlsTokenRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateStreamHlsTokenRequest.php deleted file mode 100644 index eec595a8a4b8..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateStreamHlsTokenRequest.php +++ /dev/null @@ -1,80 +0,0 @@ -google.cloud.visionai.v1.GenerateStreamHlsTokenRequest - */ -class GenerateStreamHlsTokenRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the stream. - * - * Generated from protobuf field string stream = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $stream = ''; - - /** - * @param string $stream Required. The name of the stream. - * - * @return \Google\Cloud\VisionAI\V1\GenerateStreamHlsTokenRequest - * - * @experimental - */ - public static function build(string $stream): self - { - return (new self()) - ->setStream($stream); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $stream - * Required. The name of the stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the stream. - * - * Generated from protobuf field string stream = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getStream() - { - return $this->stream; - } - - /** - * Required. The name of the stream. - * - * Generated from protobuf field string stream = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setStream($var) - { - GPBUtil::checkString($var, True); - $this->stream = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateStreamHlsTokenResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateStreamHlsTokenResponse.php deleted file mode 100644 index b6069895af4e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GenerateStreamHlsTokenResponse.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.visionai.v1.GenerateStreamHlsTokenResponse - */ -class GenerateStreamHlsTokenResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The generated JWT token. - * The caller should insert this token to the authorization header of the HTTP - * requests to get the HLS playlist manifest and the video chunks. - * eg: curl -H "Authorization: Bearer $TOKEN" - * https://domain.com/test-stream.playback/master.m3u8 - * - * Generated from protobuf field string token = 1; - */ - protected $token = ''; - /** - * The expiration time of the token. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2; - */ - protected $expiration_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $token - * The generated JWT token. - * The caller should insert this token to the authorization header of the HTTP - * requests to get the HLS playlist manifest and the video chunks. - * eg: curl -H "Authorization: Bearer $TOKEN" - * https://domain.com/test-stream.playback/master.m3u8 - * @type \Google\Protobuf\Timestamp $expiration_time - * The expiration time of the token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * The generated JWT token. - * The caller should insert this token to the authorization header of the HTTP - * requests to get the HLS playlist manifest and the video chunks. - * eg: curl -H "Authorization: Bearer $TOKEN" - * https://domain.com/test-stream.playback/master.m3u8 - * - * Generated from protobuf field string token = 1; - * @return string - */ - public function getToken() - { - return $this->token; - } - - /** - * The generated JWT token. - * The caller should insert this token to the authorization header of the HTTP - * requests to get the HLS playlist manifest and the video chunks. - * eg: curl -H "Authorization: Bearer $TOKEN" - * https://domain.com/test-stream.playback/master.m3u8 - * - * Generated from protobuf field string token = 1; - * @param string $var - * @return $this - */ - public function setToken($var) - { - GPBUtil::checkString($var, True); - $this->token = $var; - - return $this; - } - - /** - * The expiration time of the token. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getExpirationTime() - { - return $this->expiration_time; - } - - public function hasExpirationTime() - { - return isset($this->expiration_time); - } - - public function clearExpirationTime() - { - unset($this->expiration_time); - } - - /** - * The expiration time of the token. - * - * Generated from protobuf field .google.protobuf.Timestamp expiration_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpirationTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expiration_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeoCoordinate.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeoCoordinate.php deleted file mode 100644 index 8e27e4dc371a..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeoCoordinate.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.visionai.v1.GeoCoordinate - */ -class GeoCoordinate extends \Google\Protobuf\Internal\Message -{ - /** - * Latitude Coordinate. Degrees [-90 .. 90] - * - * Generated from protobuf field double latitude = 1; - */ - protected $latitude = 0.0; - /** - * Longitude Coordinate. Degrees [-180 .. 180] - * - * Generated from protobuf field double longitude = 2; - */ - protected $longitude = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $latitude - * Latitude Coordinate. Degrees [-90 .. 90] - * @type float $longitude - * Longitude Coordinate. Degrees [-180 .. 180] - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Latitude Coordinate. Degrees [-90 .. 90] - * - * Generated from protobuf field double latitude = 1; - * @return float - */ - public function getLatitude() - { - return $this->latitude; - } - - /** - * Latitude Coordinate. Degrees [-90 .. 90] - * - * Generated from protobuf field double latitude = 1; - * @param float $var - * @return $this - */ - public function setLatitude($var) - { - GPBUtil::checkDouble($var); - $this->latitude = $var; - - return $this; - } - - /** - * Longitude Coordinate. Degrees [-180 .. 180] - * - * Generated from protobuf field double longitude = 2; - * @return float - */ - public function getLongitude() - { - return $this->longitude; - } - - /** - * Longitude Coordinate. Degrees [-180 .. 180] - * - * Generated from protobuf field double longitude = 2; - * @param float $var - * @return $this - */ - public function setLongitude($var) - { - GPBUtil::checkDouble($var); - $this->longitude = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeoLocationArray.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeoLocationArray.php deleted file mode 100644 index 15ec29e0347c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GeoLocationArray.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.GeoLocationArray - */ -class GeoLocationArray extends \Google\Protobuf\Internal\Message -{ - /** - * A list of circle areas. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; - */ - private $circle_areas; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\CircleArea[] $circle_areas - * A list of circle areas. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * A list of circle areas. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\CircleArea> - */ - public function getCircleAreas() - { - return $this->circle_areas; - } - - /** - * A list of circle areas. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.CircleArea circle_areas = 1; - * @param \Google\Cloud\VisionAI\V1\CircleArea[] $var - * @return $this - */ - public function setCircleAreas($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\CircleArea::class); - $this->circle_areas = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAnalysisRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAnalysisRequest.php deleted file mode 100644 index f410e8e6dcca..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAnalysisRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.visionai.v1.GetAnalysisRequest - */ -class GetAnalysisRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * 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 resource. Please see - * {@see LiveVideoAnalyticsClient::analysisName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\GetAnalysisRequest - * - * @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 resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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 resource. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAnnotationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAnnotationRequest.php deleted file mode 100644 index c122ff03401f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAnnotationRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.visionai.v1.GetAnnotationRequest - */ -class GetAnnotationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the annotation to retrieve. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the annotation to retrieve. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` - * Please see {@see WarehouseClient::annotationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\GetAnnotationRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the annotation to retrieve. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the annotation to retrieve. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the annotation to retrieve. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetApplicationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetApplicationRequest.php deleted file mode 100644 index 39d6a1ea1e3f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetApplicationRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.visionai.v1.GetApplicationRequest - */ -class GetApplicationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * 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 resource. Please see - * {@see AppPlatformClient::applicationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\GetApplicationRequest - * - * @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 resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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 resource. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAssetRequest.php deleted file mode 100644 index e9d6b921667c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetAssetRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.visionai.v1.GetAssetRequest - */ -class GetAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the asset to retrieve. - * Format: - * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the asset to retrieve. - * Format: - * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} - * Please see {@see WarehouseClient::assetName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\GetAssetRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the asset to retrieve. - * Format: - * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the asset to retrieve. - * Format: - * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the asset to retrieve. - * Format: - * projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetClusterRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetClusterRequest.php deleted file mode 100644 index daeea0ab30a8..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetClusterRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.visionai.v1.GetClusterRequest - */ -class GetClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * 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 resource. Please see - * {@see StreamsServiceClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\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. Name of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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 resource. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetCollectionRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetCollectionRequest.php deleted file mode 100644 index 855c273c922d..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetCollectionRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.visionai.v1.GetCollectionRequest - */ -class GetCollectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the collection to retrieve. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the collection to retrieve. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * Please see {@see WarehouseClient::collectionName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\GetCollectionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the collection to retrieve. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the collection to retrieve. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the collection to retrieve. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetCorpusRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetCorpusRequest.php deleted file mode 100644 index 859154d92aff..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetCorpusRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.visionai.v1.GetCorpusRequest - */ -class GetCorpusRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the corpus to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the corpus to retrieve. Please see - * {@see WarehouseClient::corpusName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\GetCorpusRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the corpus to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the corpus to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the corpus to retrieve. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetDataSchemaRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetDataSchemaRequest.php deleted file mode 100644 index e7db27657c6b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetDataSchemaRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.visionai.v1.GetDataSchemaRequest - */ -class GetDataSchemaRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the data schema to retrieve. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the data schema to retrieve. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` - * Please see {@see WarehouseClient::dataSchemaName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\GetDataSchemaRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the data schema to retrieve. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the data schema to retrieve. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the data schema to retrieve. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/dataSchemas/{data_schema_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetDraftRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetDraftRequest.php deleted file mode 100644 index f74a4692e54d..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetDraftRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.visionai.v1.GetDraftRequest - */ -class GetDraftRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * 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 resource. Please see - * {@see AppPlatformClient::draftName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\GetDraftRequest - * - * @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 resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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 resource. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetEventRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetEventRequest.php deleted file mode 100644 index 194138daa1b5..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetEventRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.visionai.v1.GetEventRequest - */ -class GetEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * 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 resource. Please see - * {@see StreamsServiceClient::eventName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\GetEventRequest - * - * @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 resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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 resource. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetIndexEndpointRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetIndexEndpointRequest.php deleted file mode 100644 index 1748fcf55bf7..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetIndexEndpointRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.visionai.v1.GetIndexEndpointRequest - */ -class GetIndexEndpointRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the IndexEndpoint resource. - * - * 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 IndexEndpoint resource. Please see - * {@see WarehouseClient::indexEndpointName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\GetIndexEndpointRequest - * - * @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 IndexEndpoint resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the IndexEndpoint resource. - * - * 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 IndexEndpoint resource. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetIndexRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetIndexRequest.php deleted file mode 100644 index dd0ed8e9243b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetIndexRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.visionai.v1.GetIndexRequest - */ -class GetIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the Index resource. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * - * 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 Index resource. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * Please see {@see WarehouseClient::indexName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\GetIndexRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the Index resource. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the Index resource. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * - * 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 Index resource. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetInstanceRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetInstanceRequest.php deleted file mode 100644 index 96eb0d1a4367..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetInstanceRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.visionai.v1.GetInstanceRequest - */ -class GetInstanceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * 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 resource. Please see - * {@see AppPlatformClient::instanceName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\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. Name of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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 resource. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetOperatorRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetOperatorRequest.php deleted file mode 100644 index e918c49c8988..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetOperatorRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.visionai.v1.GetOperatorRequest - */ -class GetOperatorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * 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 resource. Please see - * {@see LiveVideoAnalyticsClient::operatorName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\GetOperatorRequest - * - * @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 resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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 resource. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetProcessRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetProcessRequest.php deleted file mode 100644 index c7f8d00158a4..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetProcessRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.visionai.v1.GetProcessRequest - */ -class GetProcessRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * 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 resource. Please see - * {@see LiveVideoAnalyticsClient::processName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\GetProcessRequest - * - * @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 resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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 resource. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetProcessorRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetProcessorRequest.php deleted file mode 100644 index 359eb870f41c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetProcessorRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.visionai.v1.GetProcessorRequest - */ -class GetProcessorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * 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 resource. Please see - * {@see AppPlatformClient::processorName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\GetProcessorRequest - * - * @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 resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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 resource. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSearchConfigRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSearchConfigRequest.php deleted file mode 100644 index 4a0623bcfee5..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSearchConfigRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.visionai.v1.GetSearchConfigRequest - */ -class GetSearchConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the search configuration to retrieve. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the search configuration to retrieve. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` - * Please see {@see WarehouseClient::searchConfigName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\GetSearchConfigRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the search configuration to retrieve. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the search configuration to retrieve. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the search configuration to retrieve. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSearchHypernymRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSearchHypernymRequest.php deleted file mode 100644 index 13d3e0a48843..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSearchHypernymRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.visionai.v1.GetSearchHypernymRequest - */ -class GetSearchHypernymRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the SearchHypernym to retrieve. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the SearchHypernym to retrieve. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` - * Please see {@see WarehouseClient::searchHypernymName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\GetSearchHypernymRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the SearchHypernym to retrieve. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the SearchHypernym to retrieve. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The name of the SearchHypernym to retrieve. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSeriesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSeriesRequest.php deleted file mode 100644 index 5d3184b6ceaa..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetSeriesRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.visionai.v1.GetSeriesRequest - */ -class GetSeriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * 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 resource. Please see - * {@see StreamsServiceClient::seriesName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\GetSeriesRequest - * - * @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 resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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 resource. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamRequest.php deleted file mode 100644 index b2f8ba0f8ab3..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.visionai.v1.GetStreamRequest - */ -class GetStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the resource. - * - * 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 resource. Please see - * {@see StreamsServiceClient::streamName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\GetStreamRequest - * - * @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 resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the resource. - * - * 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 resource. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamThumbnailRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamThumbnailRequest.php deleted file mode 100644 index 009595e0c95b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamThumbnailRequest.php +++ /dev/null @@ -1,228 +0,0 @@ -google.cloud.visionai.v1.GetStreamThumbnailRequest - */ -class GetStreamThumbnailRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the stream for to get the thumbnail from. - * - * Generated from protobuf field string stream = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $stream = ''; - /** - * Required. The name of the GCS object to store the thumbnail image. - * - * Generated from protobuf field string gcs_object_name = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $gcs_object_name = ''; - /** - * Optional. The name of the event. If unspecified, the thumbnail will be - * retrieved from the latest event. - * - * Generated from protobuf field string event = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $event = ''; - /** - * Optional. An optional request ID to identify the requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $stream Required. The name of the stream for to get the thumbnail from. - * @param string $gcsObjectName Required. The name of the GCS object to store the thumbnail image. - * - * @return \Google\Cloud\VisionAI\V1\GetStreamThumbnailRequest - * - * @experimental - */ - public static function build(string $stream, string $gcsObjectName): self - { - return (new self()) - ->setStream($stream) - ->setGcsObjectName($gcsObjectName); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $stream - * Required. The name of the stream for to get the thumbnail from. - * @type string $gcs_object_name - * Required. The name of the GCS object to store the thumbnail image. - * @type string $event - * Optional. The name of the event. If unspecified, the thumbnail will be - * retrieved from the latest event. - * @type string $request_id - * Optional. An optional request ID to identify the requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the stream for to get the thumbnail from. - * - * Generated from protobuf field string stream = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getStream() - { - return $this->stream; - } - - /** - * Required. The name of the stream for to get the thumbnail from. - * - * Generated from protobuf field string stream = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setStream($var) - { - GPBUtil::checkString($var, True); - $this->stream = $var; - - return $this; - } - - /** - * Required. The name of the GCS object to store the thumbnail image. - * - * Generated from protobuf field string gcs_object_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getGcsObjectName() - { - return $this->gcs_object_name; - } - - /** - * Required. The name of the GCS object to store the thumbnail image. - * - * Generated from protobuf field string gcs_object_name = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setGcsObjectName($var) - { - GPBUtil::checkString($var, True); - $this->gcs_object_name = $var; - - return $this; - } - - /** - * Optional. The name of the event. If unspecified, the thumbnail will be - * retrieved from the latest event. - * - * Generated from protobuf field string event = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEvent() - { - return $this->event; - } - - /** - * Optional. The name of the event. If unspecified, the thumbnail will be - * retrieved from the latest event. - * - * Generated from protobuf field string event = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEvent($var) - { - GPBUtil::checkString($var, True); - $this->event = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify the requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify the requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamThumbnailResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamThumbnailResponse.php deleted file mode 100644 index ea4eaa66aa14..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GetStreamThumbnailResponse.php +++ /dev/null @@ -1,34 +0,0 @@ -google.cloud.visionai.v1.GetStreamThumbnailResponse - */ -class GetStreamThumbnailResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GstreamerBufferDescriptor.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GstreamerBufferDescriptor.php deleted file mode 100644 index 8b0fc331ebb5..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/GstreamerBufferDescriptor.php +++ /dev/null @@ -1,233 +0,0 @@ -google.cloud.visionai.v1.GstreamerBufferDescriptor - */ -class GstreamerBufferDescriptor extends \Google\Protobuf\Internal\Message -{ - /** - * The caps string of the payload. - * - * Generated from protobuf field string caps_string = 1; - */ - protected $caps_string = ''; - /** - * Whether the buffer is a key frame. - * - * Generated from protobuf field bool is_key_frame = 2; - */ - protected $is_key_frame = false; - /** - * PTS of the frame. - * - * Generated from protobuf field .google.protobuf.Timestamp pts_time = 3; - */ - protected $pts_time = null; - /** - * DTS of the frame. - * - * Generated from protobuf field .google.protobuf.Timestamp dts_time = 4; - */ - protected $dts_time = null; - /** - * Duration of the frame. - * - * Generated from protobuf field .google.protobuf.Duration duration = 5; - */ - protected $duration = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $caps_string - * The caps string of the payload. - * @type bool $is_key_frame - * Whether the buffer is a key frame. - * @type \Google\Protobuf\Timestamp $pts_time - * PTS of the frame. - * @type \Google\Protobuf\Timestamp $dts_time - * DTS of the frame. - * @type \Google\Protobuf\Duration $duration - * Duration of the frame. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingResources::initOnce(); - parent::__construct($data); - } - - /** - * The caps string of the payload. - * - * Generated from protobuf field string caps_string = 1; - * @return string - */ - public function getCapsString() - { - return $this->caps_string; - } - - /** - * The caps string of the payload. - * - * Generated from protobuf field string caps_string = 1; - * @param string $var - * @return $this - */ - public function setCapsString($var) - { - GPBUtil::checkString($var, True); - $this->caps_string = $var; - - return $this; - } - - /** - * Whether the buffer is a key frame. - * - * Generated from protobuf field bool is_key_frame = 2; - * @return bool - */ - public function getIsKeyFrame() - { - return $this->is_key_frame; - } - - /** - * Whether the buffer is a key frame. - * - * Generated from protobuf field bool is_key_frame = 2; - * @param bool $var - * @return $this - */ - public function setIsKeyFrame($var) - { - GPBUtil::checkBool($var); - $this->is_key_frame = $var; - - return $this; - } - - /** - * PTS of the frame. - * - * Generated from protobuf field .google.protobuf.Timestamp pts_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPtsTime() - { - return $this->pts_time; - } - - public function hasPtsTime() - { - return isset($this->pts_time); - } - - public function clearPtsTime() - { - unset($this->pts_time); - } - - /** - * PTS of the frame. - * - * Generated from protobuf field .google.protobuf.Timestamp pts_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPtsTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->pts_time = $var; - - return $this; - } - - /** - * DTS of the frame. - * - * Generated from protobuf field .google.protobuf.Timestamp dts_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDtsTime() - { - return $this->dts_time; - } - - public function hasDtsTime() - { - return isset($this->dts_time); - } - - public function clearDtsTime() - { - unset($this->dts_time); - } - - /** - * DTS of the frame. - * - * Generated from protobuf field .google.protobuf.Timestamp dts_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDtsTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->dts_time = $var; - - return $this; - } - - /** - * Duration of the frame. - * - * Generated from protobuf field .google.protobuf.Duration duration = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getDuration() - { - return $this->duration; - } - - public function hasDuration() - { - return isset($this->duration); - } - - public function clearDuration() - { - unset($this->duration); - } - - /** - * Duration of the frame. - * - * Generated from protobuf field .google.protobuf.Duration duration = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setDuration($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->duration = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/HealthCheckRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/HealthCheckRequest.php deleted file mode 100644 index 4033d15f21b2..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/HealthCheckRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.HealthCheckRequest - */ -class HealthCheckRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The parent of the resource. - * - * Generated from protobuf field string cluster = 1 [(.google.api.resource_reference) = { - */ - protected $cluster = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster - * The parent of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\HealthService::initOnce(); - parent::__construct($data); - } - - /** - * The parent of the resource. - * - * Generated from protobuf field string cluster = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * The parent of the resource. - * - * Generated from protobuf field string cluster = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/HealthCheckResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/HealthCheckResponse.php deleted file mode 100644 index f64bc29bd54c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/HealthCheckResponse.php +++ /dev/null @@ -1,145 +0,0 @@ -google.cloud.visionai.v1.HealthCheckResponse - */ -class HealthCheckResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Indicates whether the cluster is in healthy state or not. - * - * Generated from protobuf field bool healthy = 1; - */ - protected $healthy = false; - /** - * Reason of why the cluster is in unhealthy state. - * - * Generated from protobuf field string reason = 2; - */ - protected $reason = ''; - /** - * Other information of the cluster client may be interested. - * - * Generated from protobuf field .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; - */ - protected $cluster_info = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $healthy - * Indicates whether the cluster is in healthy state or not. - * @type string $reason - * Reason of why the cluster is in unhealthy state. - * @type \Google\Cloud\VisionAI\V1\ClusterInfo $cluster_info - * Other information of the cluster client may be interested. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\HealthService::initOnce(); - parent::__construct($data); - } - - /** - * Indicates whether the cluster is in healthy state or not. - * - * Generated from protobuf field bool healthy = 1; - * @return bool - */ - public function getHealthy() - { - return $this->healthy; - } - - /** - * Indicates whether the cluster is in healthy state or not. - * - * Generated from protobuf field bool healthy = 1; - * @param bool $var - * @return $this - */ - public function setHealthy($var) - { - GPBUtil::checkBool($var); - $this->healthy = $var; - - return $this; - } - - /** - * Reason of why the cluster is in unhealthy state. - * - * Generated from protobuf field string reason = 2; - * @return string - */ - public function getReason() - { - return $this->reason; - } - - /** - * Reason of why the cluster is in unhealthy state. - * - * Generated from protobuf field string reason = 2; - * @param string $var - * @return $this - */ - public function setReason($var) - { - GPBUtil::checkString($var, True); - $this->reason = $var; - - return $this; - } - - /** - * Other information of the cluster client may be interested. - * - * Generated from protobuf field .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; - * @return \Google\Cloud\VisionAI\V1\ClusterInfo|null - */ - public function getClusterInfo() - { - return $this->cluster_info; - } - - public function hasClusterInfo() - { - return isset($this->cluster_info); - } - - public function clearClusterInfo() - { - unset($this->cluster_info); - } - - /** - * Other information of the cluster client may be interested. - * - * Generated from protobuf field .google.cloud.visionai.v1.ClusterInfo cluster_info = 3; - * @param \Google\Cloud\VisionAI\V1\ClusterInfo $var - * @return $this - */ - public function setClusterInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ClusterInfo::class); - $this->cluster_info = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageObjectDetectionPredictionResult.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageObjectDetectionPredictionResult.php deleted file mode 100644 index 95155b137ac4..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageObjectDetectionPredictionResult.php +++ /dev/null @@ -1,205 +0,0 @@ -google.cloud.visionai.v1.ImageObjectDetectionPredictionResult - */ -class ImageObjectDetectionPredictionResult extends \Google\Protobuf\Internal\Message -{ - /** - * The resource IDs of the AnnotationSpecs that had been identified, ordered - * by the confidence score descendingly. It is the id segment instead of full - * resource name. - * - * Generated from protobuf field repeated int64 ids = 1; - */ - private $ids; - /** - * The display names of the AnnotationSpecs that had been identified, order - * matches the IDs. - * - * Generated from protobuf field repeated string display_names = 2; - */ - private $display_names; - /** - * The Model's confidences in correctness of the predicted IDs, higher value - * means higher confidence. Order matches the Ids. - * - * Generated from protobuf field repeated float confidences = 3; - */ - private $confidences; - /** - * Bounding boxes, i.e. the rectangles over the image, that pinpoint - * the found AnnotationSpecs. Given in order that matches the IDs. Each - * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and - * `yMax`, which represent the extremal coordinates of the box. They are - * relative to the image size, and the point 0,0 is in the top left - * of the image. - * - * Generated from protobuf field repeated .google.protobuf.ListValue bboxes = 4; - */ - private $bboxes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int[]|string[] $ids - * The resource IDs of the AnnotationSpecs that had been identified, ordered - * by the confidence score descendingly. It is the id segment instead of full - * resource name. - * @type string[] $display_names - * The display names of the AnnotationSpecs that had been identified, order - * matches the IDs. - * @type float[] $confidences - * The Model's confidences in correctness of the predicted IDs, higher value - * means higher confidence. Order matches the Ids. - * @type \Google\Protobuf\ListValue[] $bboxes - * Bounding boxes, i.e. the rectangles over the image, that pinpoint - * the found AnnotationSpecs. Given in order that matches the IDs. Each - * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and - * `yMax`, which represent the extremal coordinates of the box. They are - * relative to the image size, and the point 0,0 is in the top left - * of the image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * The resource IDs of the AnnotationSpecs that had been identified, ordered - * by the confidence score descendingly. It is the id segment instead of full - * resource name. - * - * Generated from protobuf field repeated int64 ids = 1; - * @return RepeatedField|RepeatedField - */ - public function getIds() - { - return $this->ids; - } - - /** - * The resource IDs of the AnnotationSpecs that had been identified, ordered - * by the confidence score descendingly. It is the id segment instead of full - * resource name. - * - * Generated from protobuf field repeated int64 ids = 1; - * @param int[]|string[] $var - * @return $this - */ - public function setIds($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::INT64); - $this->ids = $arr; - - return $this; - } - - /** - * The display names of the AnnotationSpecs that had been identified, order - * matches the IDs. - * - * Generated from protobuf field repeated string display_names = 2; - * @return RepeatedField - */ - public function getDisplayNames() - { - return $this->display_names; - } - - /** - * The display names of the AnnotationSpecs that had been identified, order - * matches the IDs. - * - * Generated from protobuf field repeated string display_names = 2; - * @param string[] $var - * @return $this - */ - public function setDisplayNames($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->display_names = $arr; - - return $this; - } - - /** - * The Model's confidences in correctness of the predicted IDs, higher value - * means higher confidence. Order matches the Ids. - * - * Generated from protobuf field repeated float confidences = 3; - * @return RepeatedField - */ - public function getConfidences() - { - return $this->confidences; - } - - /** - * The Model's confidences in correctness of the predicted IDs, higher value - * means higher confidence. Order matches the Ids. - * - * Generated from protobuf field repeated float confidences = 3; - * @param float[] $var - * @return $this - */ - public function setConfidences($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::FLOAT); - $this->confidences = $arr; - - return $this; - } - - /** - * Bounding boxes, i.e. the rectangles over the image, that pinpoint - * the found AnnotationSpecs. Given in order that matches the IDs. Each - * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and - * `yMax`, which represent the extremal coordinates of the box. They are - * relative to the image size, and the point 0,0 is in the top left - * of the image. - * - * Generated from protobuf field repeated .google.protobuf.ListValue bboxes = 4; - * @return RepeatedField<\Google\Protobuf\ListValue> - */ - public function getBboxes() - { - return $this->bboxes; - } - - /** - * Bounding boxes, i.e. the rectangles over the image, that pinpoint - * the found AnnotationSpecs. Given in order that matches the IDs. Each - * bounding box is an array of 4 numbers `xMin`, `xMax`, `yMin`, and - * `yMax`, which represent the extremal coordinates of the box. They are - * relative to the image size, and the point 0,0 is in the top left - * of the image. - * - * Generated from protobuf field repeated .google.protobuf.ListValue bboxes = 4; - * @param \Google\Protobuf\ListValue[] $var - * @return $this - */ - public function setBboxes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\ListValue::class); - $this->bboxes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageQuery.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageQuery.php deleted file mode 100644 index d1add05b0504..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageQuery.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.visionai.v1.ImageQuery - */ -class ImageQuery extends \Google\Protobuf\Internal\Message -{ - protected $image; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $input_image - * Input image in raw bytes. - * @type string $asset - * Resource name of the asset. Only supported in IMAGE corpus type. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Input image in raw bytes. - * - * Generated from protobuf field bytes input_image = 1; - * @return string - */ - public function getInputImage() - { - return $this->readOneof(1); - } - - public function hasInputImage() - { - return $this->hasOneof(1); - } - - /** - * Input image in raw bytes. - * - * Generated from protobuf field bytes input_image = 1; - * @param string $var - * @return $this - */ - public function setInputImage($var) - { - GPBUtil::checkString($var, False); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Resource name of the asset. Only supported in IMAGE corpus type. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string asset = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getAsset() - { - return $this->readOneof(2); - } - - public function hasAsset() - { - return $this->hasOneof(2); - } - - /** - * Resource name of the asset. Only supported in IMAGE corpus type. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string asset = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getImage() - { - return $this->whichOneof("image"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageSegmentationPredictionResult.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageSegmentationPredictionResult.php deleted file mode 100644 index 6715f9b30a1c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImageSegmentationPredictionResult.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.visionai.v1.ImageSegmentationPredictionResult - */ -class ImageSegmentationPredictionResult extends \Google\Protobuf\Internal\Message -{ - /** - * A PNG image where each pixel in the mask represents the category in which - * the pixel in the original image was predicted to belong to. The size of - * this image will be the same as the original image. The mapping between the - * AnntoationSpec and the color can be found in model's metadata. The model - * will choose the most likely category and if none of the categories reach - * the confidence threshold, the pixel will be marked as background. - * - * Generated from protobuf field string category_mask = 1; - */ - protected $category_mask = ''; - /** - * A one channel image which is encoded as an 8bit lossless PNG. The size of - * the image will be the same as the original image. For a specific pixel, - * darker color means less confidence in correctness of the cateogry in the - * categoryMask for the corresponding pixel. Black means no confidence and - * white means complete confidence. - * - * Generated from protobuf field string confidence_mask = 2; - */ - protected $confidence_mask = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $category_mask - * A PNG image where each pixel in the mask represents the category in which - * the pixel in the original image was predicted to belong to. The size of - * this image will be the same as the original image. The mapping between the - * AnntoationSpec and the color can be found in model's metadata. The model - * will choose the most likely category and if none of the categories reach - * the confidence threshold, the pixel will be marked as background. - * @type string $confidence_mask - * A one channel image which is encoded as an 8bit lossless PNG. The size of - * the image will be the same as the original image. For a specific pixel, - * darker color means less confidence in correctness of the cateogry in the - * categoryMask for the corresponding pixel. Black means no confidence and - * white means complete confidence. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * A PNG image where each pixel in the mask represents the category in which - * the pixel in the original image was predicted to belong to. The size of - * this image will be the same as the original image. The mapping between the - * AnntoationSpec and the color can be found in model's metadata. The model - * will choose the most likely category and if none of the categories reach - * the confidence threshold, the pixel will be marked as background. - * - * Generated from protobuf field string category_mask = 1; - * @return string - */ - public function getCategoryMask() - { - return $this->category_mask; - } - - /** - * A PNG image where each pixel in the mask represents the category in which - * the pixel in the original image was predicted to belong to. The size of - * this image will be the same as the original image. The mapping between the - * AnntoationSpec and the color can be found in model's metadata. The model - * will choose the most likely category and if none of the categories reach - * the confidence threshold, the pixel will be marked as background. - * - * Generated from protobuf field string category_mask = 1; - * @param string $var - * @return $this - */ - public function setCategoryMask($var) - { - GPBUtil::checkString($var, True); - $this->category_mask = $var; - - return $this; - } - - /** - * A one channel image which is encoded as an 8bit lossless PNG. The size of - * the image will be the same as the original image. For a specific pixel, - * darker color means less confidence in correctness of the cateogry in the - * categoryMask for the corresponding pixel. Black means no confidence and - * white means complete confidence. - * - * Generated from protobuf field string confidence_mask = 2; - * @return string - */ - public function getConfidenceMask() - { - return $this->confidence_mask; - } - - /** - * A one channel image which is encoded as an 8bit lossless PNG. The size of - * the image will be the same as the original image. For a specific pixel, - * darker color means less confidence in correctness of the cateogry in the - * categoryMask for the corresponding pixel. Black means no confidence and - * white means complete confidence. - * - * Generated from protobuf field string confidence_mask = 2; - * @param string $var - * @return $this - */ - public function setConfidenceMask($var) - { - GPBUtil::checkString($var, True); - $this->confidence_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsMetadata.php deleted file mode 100644 index 8aaf0aa7347e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsMetadata.php +++ /dev/null @@ -1,125 +0,0 @@ -google.cloud.visionai.v1.ImportAssetsMetadata - */ -class ImportAssetsMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The metadata of the operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata metadata = 1; - */ - protected $metadata = null; - /** - * The importing status including partial failures, if the implementation can - * provide such information during the progress of the ImportAssets. - * - * Generated from protobuf field .google.cloud.visionai.v1.BatchOperationStatus status = 2; - */ - protected $status = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\OperationMetadata $metadata - * The metadata of the operation. - * @type \Google\Cloud\VisionAI\V1\BatchOperationStatus $status - * The importing status including partial failures, if the implementation can - * provide such information during the progress of the ImportAssets. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The metadata of the operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata metadata = 1; - * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * The metadata of the operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata metadata = 1; - * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); - $this->metadata = $var; - - return $this; - } - - /** - * The importing status including partial failures, if the implementation can - * provide such information during the progress of the ImportAssets. - * - * Generated from protobuf field .google.cloud.visionai.v1.BatchOperationStatus status = 2; - * @return \Google\Cloud\VisionAI\V1\BatchOperationStatus|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * The importing status including partial failures, if the implementation can - * provide such information during the progress of the ImportAssets. - * - * Generated from protobuf field .google.cloud.visionai.v1.BatchOperationStatus status = 2; - * @param \Google\Cloud\VisionAI\V1\BatchOperationStatus $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\BatchOperationStatus::class); - $this->status = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsRequest.php deleted file mode 100644 index 64d7ee2eaff4..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsRequest.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.visionai.v1.ImportAssetsRequest - */ -class ImportAssetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent corpus resource where the assets will be imported. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - protected $source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $assets_gcs_uri - * The file contains all assets information to be imported. - * * The file is in JSONL format. - * * Each line corresponding to one asset. - * * Each line will be converted into InputImageAsset proto. - * @type string $parent - * Required. The parent corpus resource where the assets will be imported. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The file contains all assets information to be imported. - * * The file is in JSONL format. - * * Each line corresponding to one asset. - * * Each line will be converted into InputImageAsset proto. - * - * Generated from protobuf field string assets_gcs_uri = 2; - * @return string - */ - public function getAssetsGcsUri() - { - return $this->readOneof(2); - } - - public function hasAssetsGcsUri() - { - return $this->hasOneof(2); - } - - /** - * The file contains all assets information to be imported. - * * The file is in JSONL format. - * * Each line corresponding to one asset. - * * Each line will be converted into InputImageAsset proto. - * - * Generated from protobuf field string assets_gcs_uri = 2; - * @param string $var - * @return $this - */ - public function setAssetsGcsUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Required. The parent corpus resource where the assets will be imported. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent corpus resource where the assets will be imported. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * @return string - */ - public function getSource() - { - return $this->whichOneof("source"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsResponse.php deleted file mode 100644 index 8eea5c5af0c2..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ImportAssetsResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.ImportAssetsResponse - */ -class ImportAssetsResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Index.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Index.php deleted file mode 100644 index 58bfd604d84e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Index.php +++ /dev/null @@ -1,455 +0,0 @@ -google.cloud.visionai.v1.Index - */ -class Index extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Resource name of the Index resource. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Optional. Optional user-specified display name of the index. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. Optional description of the index. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. State of the index. - * - * Generated from protobuf field .google.cloud.visionai.v1.Index.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. References to the deployed index instance. - * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index. - * Index of IMAGE corpus can have multiple deployed indexes. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $deployed_indexes; - /** - * Output only. This boolean field is only set for projects that have Physical - * Zone Separation enabled via an Org Policy constraint. It is set to true - * when the index is a valid zone separated index and false if it isn't. - * - * Generated from protobuf field optional bool satisfies_pzs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = null; - /** - * Output only. This boolean field is only set for projects that have Physical - * Zone Isolation enabled via an Org Policy constraint. It is set to true when - * the index is a valid zone isolated index and false if it isn't. - * - * Generated from protobuf field optional bool satisfies_pzi = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzi = null; - protected $asset_filter; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $entire_corpus - * Include all assets under the corpus. - * @type string $name - * Output only. Resource name of the Index resource. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}` - * @type string $display_name - * Optional. Optional user-specified display name of the index. - * @type string $description - * Optional. Optional description of the index. - * @type int $state - * Output only. State of the index. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update timestamp. - * @type \Google\Cloud\VisionAI\V1\DeployedIndexReference[] $deployed_indexes - * Output only. References to the deployed index instance. - * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index. - * Index of IMAGE corpus can have multiple deployed indexes. - * @type bool $satisfies_pzs - * Output only. This boolean field is only set for projects that have Physical - * Zone Separation enabled via an Org Policy constraint. It is set to true - * when the index is a valid zone separated index and false if it isn't. - * @type bool $satisfies_pzi - * Output only. This boolean field is only set for projects that have Physical - * Zone Isolation enabled via an Org Policy constraint. It is set to true when - * the index is a valid zone isolated index and false if it isn't. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Include all assets under the corpus. - * - * Generated from protobuf field bool entire_corpus = 9; - * @return bool - */ - public function getEntireCorpus() - { - return $this->readOneof(9); - } - - public function hasEntireCorpus() - { - return $this->hasOneof(9); - } - - /** - * Include all assets under the corpus. - * - * Generated from protobuf field bool entire_corpus = 9; - * @param bool $var - * @return $this - */ - public function setEntireCorpus($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Output only. Resource name of the Index resource. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Resource name of the Index resource. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/indexes/{index_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Optional user-specified display name of the index. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. Optional user-specified display name of the index. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. Optional description of the index. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Optional description of the index. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. State of the index. - * - * Generated from protobuf field .google.cloud.visionai.v1.Index.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the index. - * - * Generated from protobuf field .google.cloud.visionai.v1.Index.State state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Index\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. References to the deployed index instance. - * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index. - * Index of IMAGE corpus can have multiple deployed indexes. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\DeployedIndexReference> - */ - public function getDeployedIndexes() - { - return $this->deployed_indexes; - } - - /** - * Output only. References to the deployed index instance. - * Index of VIDEO_ON_DEMAND corpus can have at most one deployed index. - * Index of IMAGE corpus can have multiple deployed indexes. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.DeployedIndexReference deployed_indexes = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VisionAI\V1\DeployedIndexReference[] $var - * @return $this - */ - public function setDeployedIndexes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\DeployedIndexReference::class); - $this->deployed_indexes = $arr; - - return $this; - } - - /** - * Output only. This boolean field is only set for projects that have Physical - * Zone Separation enabled via an Org Policy constraint. It is set to true - * when the index is a valid zone separated index and false if it isn't. - * - * Generated from protobuf field optional bool satisfies_pzs = 11 [(.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. This boolean field is only set for projects that have Physical - * Zone Separation enabled via an Org Policy constraint. It is set to true - * when the index is a valid zone separated index and false if it isn't. - * - * Generated from protobuf field optional bool satisfies_pzs = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * Output only. This boolean field is only set for projects that have Physical - * Zone Isolation enabled via an Org Policy constraint. It is set to true when - * the index is a valid zone isolated index and false if it isn't. - * - * Generated from protobuf field optional bool satisfies_pzi = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzi() - { - return isset($this->satisfies_pzi) ? $this->satisfies_pzi : false; - } - - public function hasSatisfiesPzi() - { - return isset($this->satisfies_pzi); - } - - public function clearSatisfiesPzi() - { - unset($this->satisfies_pzi); - } - - /** - * Output only. This boolean field is only set for projects that have Physical - * Zone Isolation enabled via an Org Policy constraint. It is set to true when - * the index is a valid zone isolated index and false if it isn't. - * - * Generated from protobuf field optional bool satisfies_pzi = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzi($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzi = $var; - - return $this; - } - - /** - * @return string - */ - public function getAssetFilter() - { - return $this->whichOneof("asset_filter"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Index/State.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Index/State.php deleted file mode 100644 index 67fdc0fc7288..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Index/State.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.visionai.v1.Index.State - */ -class State -{ - /** - * The default value. Should not be used. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * State CREATING. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * State CREATED. - * - * Generated from protobuf enum CREATED = 2; - */ - const CREATED = 2; - /** - * State UPDATING. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::CREATED => 'CREATED', - self::UPDATING => 'UPDATING', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetMetadata.php deleted file mode 100644 index fb87db3b5bbb..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetMetadata.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.visionai.v1.IndexAssetMetadata - */ -class IndexAssetMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The status of indexing this asset. - * - * Generated from protobuf field .google.cloud.visionai.v1.IndexingStatus status = 4; - */ - protected $status = null; - /** - * The start time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - */ - protected $start_time = null; - /** - * The update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\IndexingStatus $status - * The status of indexing this asset. - * @type \Google\Protobuf\Timestamp $start_time - * The start time of the operation. - * @type \Google\Protobuf\Timestamp $update_time - * The update time of the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The status of indexing this asset. - * - * Generated from protobuf field .google.cloud.visionai.v1.IndexingStatus status = 4; - * @return \Google\Cloud\VisionAI\V1\IndexingStatus|null - */ - public function getStatus() - { - return $this->status; - } - - public function hasStatus() - { - return isset($this->status); - } - - public function clearStatus() - { - unset($this->status); - } - - /** - * The status of indexing this asset. - * - * Generated from protobuf field .google.cloud.visionai.v1.IndexingStatus status = 4; - * @param \Google\Cloud\VisionAI\V1\IndexingStatus $var - * @return $this - */ - public function setStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\IndexingStatus::class); - $this->status = $var; - - return $this; - } - - /** - * The start time of the operation. - * - * 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 of the operation. - * - * 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 update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetRequest.php deleted file mode 100644 index 853e3d50ba1c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetRequest.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.visionai.v1.IndexAssetRequest - */ -class IndexAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the asset to index. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The name of the index. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * - * Generated from protobuf field string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $index = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the asset to index. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * @type string $index - * Optional. The name of the index. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the asset to index. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the asset to index. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The name of the index. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * - * Generated from protobuf field string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getIndex() - { - return $this->index; - } - - /** - * Optional. The name of the index. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * - * Generated from protobuf field string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkString($var, True); - $this->index = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetResponse.php deleted file mode 100644 index 8cfb7c1e9eb6..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexAssetResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.IndexAssetResponse - */ -class IndexAssetResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexEndpoint.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexEndpoint.php deleted file mode 100644 index cfdc9cc63d2b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexEndpoint.php +++ /dev/null @@ -1,523 +0,0 @@ -google.cloud.visionai.v1.IndexEndpoint - */ -class IndexEndpoint extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Resource name of the IndexEndpoint. - * Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Optional. Display name of the IndexEndpoint. Can be up to 32 characters - * long. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $display_name = ''; - /** - * Optional. Description of the IndexEndpoint. Can be up to 25000 characters - * long. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $description = ''; - /** - * Output only. The Index deployed in this IndexEndpoint. - * - * Generated from protobuf field .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $deployed_index = null; - /** - * Output only. IndexEndpoint state. - * - * Generated from protobuf field .google.cloud.visionai.v1.IndexEndpoint.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Optional. The labels applied to a resource must meet the following - * requirements: - * * Each resource can have multiple labels, up to a maximum of 64. - * * Each label must be a key-value pair. - * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters and cannot be empty. Values can be empty and have a maximum - * length of 63 characters. - * * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. All characters must use UTF-8 encoding, and - * international characters are allowed. - * * The key portion of a label must be unique. However, you can use the same - * key with multiple resources. - * * Keys must start with a lowercase letter or international character. - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $labels; - /** - * Output only. Create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. This boolean field is only set for projects that have Physical - * Zone Separation enabled via an Org Policy constraint. It is set to true - * when the index endpoint is a valid zone separated index endpoint and false - * if it isn't. - * - * Generated from protobuf field optional bool satisfies_pzs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzs = null; - /** - * Output only. This boolean field is only set for projects that have Physical - * Zone Isolation enabled via an Org Policy constraint. It is set to true when - * the index endpoint is a valid zone isolated index endpoint and false if it - * isn't. - * - * Generated from protobuf field optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $satisfies_pzi = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Resource name of the IndexEndpoint. - * Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint_id}` - * @type string $display_name - * Optional. Display name of the IndexEndpoint. Can be up to 32 characters - * long. - * @type string $description - * Optional. Description of the IndexEndpoint. Can be up to 25000 characters - * long. - * @type \Google\Cloud\VisionAI\V1\DeployedIndex $deployed_index - * Output only. The Index deployed in this IndexEndpoint. - * @type int $state - * Output only. IndexEndpoint state. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Optional. The labels applied to a resource must meet the following - * requirements: - * * Each resource can have multiple labels, up to a maximum of 64. - * * Each label must be a key-value pair. - * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters and cannot be empty. Values can be empty and have a maximum - * length of 63 characters. - * * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. All characters must use UTF-8 encoding, and - * international characters are allowed. - * * The key portion of a label must be unique. However, you can use the same - * key with multiple resources. - * * Keys must start with a lowercase letter or international character. - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Create timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. Update timestamp. - * @type bool $satisfies_pzs - * Output only. This boolean field is only set for projects that have Physical - * Zone Separation enabled via an Org Policy constraint. It is set to true - * when the index endpoint is a valid zone separated index endpoint and false - * if it isn't. - * @type bool $satisfies_pzi - * Output only. This boolean field is only set for projects that have Physical - * Zone Isolation enabled via an Org Policy constraint. It is set to true when - * the index endpoint is a valid zone isolated index endpoint and false if it - * isn't. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Resource name of the IndexEndpoint. - * Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Resource name of the IndexEndpoint. - * Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Display name of the IndexEndpoint. Can be up to 32 characters - * long. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Optional. Display name of the IndexEndpoint. Can be up to 32 characters - * long. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Optional. Description of the IndexEndpoint. Can be up to 25000 characters - * long. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. Description of the IndexEndpoint. Can be up to 25000 characters - * long. - * - * Generated from protobuf field string description = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. The Index deployed in this IndexEndpoint. - * - * Generated from protobuf field .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VisionAI\V1\DeployedIndex|null - */ - public function getDeployedIndex() - { - return $this->deployed_index; - } - - public function hasDeployedIndex() - { - return isset($this->deployed_index); - } - - public function clearDeployedIndex() - { - unset($this->deployed_index); - } - - /** - * Output only. The Index deployed in this IndexEndpoint. - * - * Generated from protobuf field .google.cloud.visionai.v1.DeployedIndex deployed_index = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VisionAI\V1\DeployedIndex $var - * @return $this - */ - public function setDeployedIndex($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DeployedIndex::class); - $this->deployed_index = $var; - - return $this; - } - - /** - * Output only. IndexEndpoint state. - * - * Generated from protobuf field .google.cloud.visionai.v1.IndexEndpoint.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. IndexEndpoint state. - * - * Generated from protobuf field .google.cloud.visionai.v1.IndexEndpoint.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\IndexEndpoint\State::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. The labels applied to a resource must meet the following - * requirements: - * * Each resource can have multiple labels, up to a maximum of 64. - * * Each label must be a key-value pair. - * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters and cannot be empty. Values can be empty and have a maximum - * length of 63 characters. - * * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. All characters must use UTF-8 encoding, and - * international characters are allowed. - * * The key portion of a label must be unique. However, you can use the same - * key with multiple resources. - * * Keys must start with a lowercase letter or international character. - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Optional. The labels applied to a resource must meet the following - * requirements: - * * Each resource can have multiple labels, up to a maximum of 64. - * * Each label must be a key-value pair. - * * Keys have a minimum length of 1 character and a maximum length of 63 - * characters and cannot be empty. Values can be empty and have a maximum - * length of 63 characters. - * * Keys and values can contain only lowercase letters, numeric characters, - * underscores, and dashes. All characters must use UTF-8 encoding, and - * international characters are allowed. - * * The key portion of a label must be unique. However, you can use the same - * key with multiple resources. - * * Keys must start with a lowercase letter or international character. - * See [Google Cloud - * Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) - * for more details. - * - * Generated from protobuf field map labels = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @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. Create timestamp. - * - * 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. Create timestamp. - * - * 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. Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Output only. This boolean field is only set for projects that have Physical - * Zone Separation enabled via an Org Policy constraint. It is set to true - * when the index endpoint is a valid zone separated index endpoint and false - * if it isn't. - * - * Generated from protobuf field optional bool satisfies_pzs = 10 [(.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. This boolean field is only set for projects that have Physical - * Zone Separation enabled via an Org Policy constraint. It is set to true - * when the index endpoint is a valid zone separated index endpoint and false - * if it isn't. - * - * Generated from protobuf field optional bool satisfies_pzs = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzs($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzs = $var; - - return $this; - } - - /** - * Output only. This boolean field is only set for projects that have Physical - * Zone Isolation enabled via an Org Policy constraint. It is set to true when - * the index endpoint is a valid zone isolated index endpoint and false if it - * isn't. - * - * Generated from protobuf field optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getSatisfiesPzi() - { - return isset($this->satisfies_pzi) ? $this->satisfies_pzi : false; - } - - public function hasSatisfiesPzi() - { - return isset($this->satisfies_pzi); - } - - public function clearSatisfiesPzi() - { - unset($this->satisfies_pzi); - } - - /** - * Output only. This boolean field is only set for projects that have Physical - * Zone Isolation enabled via an Org Policy constraint. It is set to true when - * the index endpoint is a valid zone isolated index endpoint and false if it - * isn't. - * - * Generated from protobuf field optional bool satisfies_pzi = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setSatisfiesPzi($var) - { - GPBUtil::checkBool($var); - $this->satisfies_pzi = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexEndpoint/State.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexEndpoint/State.php deleted file mode 100644 index 1b58f983772b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexEndpoint/State.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.visionai.v1.IndexEndpoint.State - */ -class State -{ - /** - * The default value. Should not be used. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * State CREATING. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * State CREATED. - * - * Generated from protobuf enum CREATED = 2; - */ - const CREATED = 2; - /** - * State UPDATING. - * - * Generated from protobuf enum UPDATING = 3; - */ - const UPDATING = 3; - /** - * State FAILED. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::CREATED => 'CREATED', - self::UPDATING => 'UPDATING', - self::FAILED => 'FAILED', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexedAsset.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexedAsset.php deleted file mode 100644 index 8a9f8bb46eb1..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexedAsset.php +++ /dev/null @@ -1,205 +0,0 @@ -google.cloud.visionai.v1.IndexedAsset - */ -class IndexedAsset extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The index that this indexed asset belongs to. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * - * Generated from protobuf field string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $index = ''; - /** - * Required. The resource name of the asset. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string asset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $asset = ''; - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $index - * Required. The index that this indexed asset belongs to. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * @type string $asset - * Required. The resource name of the asset. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update timestamp. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The index that this indexed asset belongs to. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * - * Generated from protobuf field string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getIndex() - { - return $this->index; - } - - /** - * Required. The index that this indexed asset belongs to. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * - * Generated from protobuf field string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkString($var, True); - $this->index = $var; - - return $this; - } - - /** - * Required. The resource name of the asset. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string asset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAsset() - { - return $this->asset; - } - - /** - * Required. The resource name of the asset. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string asset = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkString($var, True); - $this->asset = $var; - - return $this; - } - - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexingStatus.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexingStatus.php deleted file mode 100644 index a90beed88f5d..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexingStatus.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.visionai.v1.IndexingStatus - */ -class IndexingStatus extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. State of this asset's indexing. - * - * Generated from protobuf field .google.cloud.visionai.v1.IndexingStatus.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Detailed message describing the state. - * - * Generated from protobuf field string status_message = 3; - */ - protected $status_message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * Output only. State of this asset's indexing. - * @type string $status_message - * Detailed message describing the state. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Output only. State of this asset's indexing. - * - * Generated from protobuf field .google.cloud.visionai.v1.IndexingStatus.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of this asset's indexing. - * - * Generated from protobuf field .google.cloud.visionai.v1.IndexingStatus.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\IndexingStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * Detailed message describing the state. - * - * Generated from protobuf field string status_message = 3; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Detailed message describing the state. - * - * Generated from protobuf field string status_message = 3; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexingStatus/State.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexingStatus/State.php deleted file mode 100644 index c7c69699568e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IndexingStatus/State.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.visionai.v1.IndexingStatus.State - */ -class State -{ - /** - * The default process state should never happen. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The indexing is in progress. - * - * Generated from protobuf enum IN_PROGRESS = 1; - */ - const IN_PROGRESS = 1; - /** - * The process is successfully done. - * - * Generated from protobuf enum SUCCEEDED = 2; - */ - const SUCCEEDED = 2; - /** - * The process failed. - * - * Generated from protobuf enum FAILED = 3; - */ - const FAILED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::IN_PROGRESS => 'IN_PROGRESS', - self::SUCCEEDED => 'SUCCEEDED', - self::FAILED => 'FAILED', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest.php deleted file mode 100644 index deaaa5773486..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.visionai.v1.IngestAssetRequest - */ -class IngestAssetRequest extends \Google\Protobuf\Internal\Message -{ - protected $streaming_request; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\IngestAssetRequest\Config $config - * Provides information for the data and the asset resource name that the - * data belongs to. The first `IngestAssetRequest` message must only contain - * a `Config` message. - * @type \Google\Cloud\VisionAI\V1\IngestAssetRequest\TimeIndexedData $time_indexed_data - * Data to be ingested. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Provides information for the data and the asset resource name that the - * data belongs to. The first `IngestAssetRequest` message must only contain - * a `Config` message. - * - * Generated from protobuf field .google.cloud.visionai.v1.IngestAssetRequest.Config config = 1; - * @return \Google\Cloud\VisionAI\V1\IngestAssetRequest\Config|null - */ - public function getConfig() - { - return $this->readOneof(1); - } - - public function hasConfig() - { - return $this->hasOneof(1); - } - - /** - * Provides information for the data and the asset resource name that the - * data belongs to. The first `IngestAssetRequest` message must only contain - * a `Config` message. - * - * Generated from protobuf field .google.cloud.visionai.v1.IngestAssetRequest.Config config = 1; - * @param \Google\Cloud\VisionAI\V1\IngestAssetRequest\Config $var - * @return $this - */ - public function setConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\IngestAssetRequest\Config::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Data to be ingested. - * - * Generated from protobuf field .google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData time_indexed_data = 2; - * @return \Google\Cloud\VisionAI\V1\IngestAssetRequest\TimeIndexedData|null - */ - public function getTimeIndexedData() - { - return $this->readOneof(2); - } - - public function hasTimeIndexedData() - { - return $this->hasOneof(2); - } - - /** - * Data to be ingested. - * - * Generated from protobuf field .google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData time_indexed_data = 2; - * @param \Google\Cloud\VisionAI\V1\IngestAssetRequest\TimeIndexedData $var - * @return $this - */ - public function setTimeIndexedData($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\IngestAssetRequest\TimeIndexedData::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getStreamingRequest() - { - return $this->whichOneof("streaming_request"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config.php deleted file mode 100644 index 6bac853c87ab..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.visionai.v1.IngestAssetRequest.Config - */ -class Config extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the asset that the ingested data belongs - * to. - * - * Generated from protobuf field string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $asset = ''; - protected $data_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\IngestAssetRequest\Config\VideoType $video_type - * Type information for video data. - * @type string $asset - * Required. The resource name of the asset that the ingested data belongs - * to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Type information for video data. - * - * Generated from protobuf field .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType video_type = 2; - * @return \Google\Cloud\VisionAI\V1\IngestAssetRequest\Config\VideoType|null - */ - public function getVideoType() - { - return $this->readOneof(2); - } - - public function hasVideoType() - { - return $this->hasOneof(2); - } - - /** - * Type information for video data. - * - * Generated from protobuf field .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType video_type = 2; - * @param \Google\Cloud\VisionAI\V1\IngestAssetRequest\Config\VideoType $var - * @return $this - */ - public function setVideoType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\IngestAssetRequest\Config\VideoType::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Required. The resource name of the asset that the ingested data belongs - * to. - * - * Generated from protobuf field string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAsset() - { - return $this->asset; - } - - /** - * Required. The resource name of the asset that the ingested data belongs - * to. - * - * Generated from protobuf field string asset = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkString($var, True); - $this->asset = $var; - - return $this; - } - - /** - * @return string - */ - public function getDataType() - { - return $this->whichOneof("data_type"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config/VideoType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config/VideoType.php deleted file mode 100644 index 2f413b08a2c1..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config/VideoType.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType - */ -class VideoType extends \Google\Protobuf\Internal\Message -{ - /** - * Container format of the video data. - * - * Generated from protobuf field .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat container_format = 1; - */ - protected $container_format = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $container_format - * Container format of the video data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Container format of the video data. - * - * Generated from protobuf field .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat container_format = 1; - * @return int - */ - public function getContainerFormat() - { - return $this->container_format; - } - - /** - * Container format of the video data. - * - * Generated from protobuf field .google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat container_format = 1; - * @param int $var - * @return $this - */ - public function setContainerFormat($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\IngestAssetRequest\Config\VideoType\ContainerFormat::class); - $this->container_format = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config/VideoType/ContainerFormat.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config/VideoType/ContainerFormat.php deleted file mode 100644 index b8ecbe51dd8b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/Config/VideoType/ContainerFormat.php +++ /dev/null @@ -1,54 +0,0 @@ -google.cloud.visionai.v1.IngestAssetRequest.Config.VideoType.ContainerFormat - */ -class ContainerFormat -{ - /** - * The default type, not supposed to be used. - * - * Generated from protobuf enum CONTAINER_FORMAT_UNSPECIFIED = 0; - */ - const CONTAINER_FORMAT_UNSPECIFIED = 0; - /** - * Mp4 container format. - * - * Generated from protobuf enum CONTAINER_FORMAT_MP4 = 1; - */ - const CONTAINER_FORMAT_MP4 = 1; - - private static $valueToName = [ - self::CONTAINER_FORMAT_UNSPECIFIED => 'CONTAINER_FORMAT_UNSPECIFIED', - self::CONTAINER_FORMAT_MP4 => 'CONTAINER_FORMAT_MP4', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/TimeIndexedData.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/TimeIndexedData.php deleted file mode 100644 index 20ca4f5720a8..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetRequest/TimeIndexedData.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.visionai.v1.IngestAssetRequest.TimeIndexedData - */ -class TimeIndexedData extends \Google\Protobuf\Internal\Message -{ - /** - * Data to be ingested. - * - * Generated from protobuf field bytes data = 1; - */ - protected $data = ''; - /** - * Time range of the data. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; - */ - protected $temporal_partition = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $data - * Data to be ingested. - * @type \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $temporal_partition - * Time range of the data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Data to be ingested. - * - * Generated from protobuf field bytes data = 1; - * @return string - */ - public function getData() - { - return $this->data; - } - - /** - * Data to be ingested. - * - * Generated from protobuf field bytes data = 1; - * @param string $var - * @return $this - */ - public function setData($var) - { - GPBUtil::checkString($var, False); - $this->data = $var; - - return $this; - } - - /** - * Time range of the data. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; - * @return \Google\Cloud\VisionAI\V1\Partition\TemporalPartition|null - */ - public function getTemporalPartition() - { - return $this->temporal_partition; - } - - public function hasTemporalPartition() - { - return isset($this->temporal_partition); - } - - public function clearTemporalPartition() - { - unset($this->temporal_partition); - } - - /** - * Time range of the data. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 2; - * @param \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $var - * @return $this - */ - public function setTemporalPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Partition\TemporalPartition::class); - $this->temporal_partition = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetResponse.php deleted file mode 100644 index 7ce9f6a61afc..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IngestAssetResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.visionai.v1.IngestAssetResponse - */ -class IngestAssetResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Time range of the data that has been successfully ingested. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; - */ - protected $successfully_ingested_partition = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $successfully_ingested_partition - * Time range of the data that has been successfully ingested. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Time range of the data that has been successfully ingested. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; - * @return \Google\Cloud\VisionAI\V1\Partition\TemporalPartition|null - */ - public function getSuccessfullyIngestedPartition() - { - return $this->successfully_ingested_partition; - } - - public function hasSuccessfullyIngestedPartition() - { - return isset($this->successfully_ingested_partition); - } - - public function clearSuccessfullyIngestedPartition() - { - unset($this->successfully_ingested_partition); - } - - /** - * Time range of the data that has been successfully ingested. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition successfully_ingested_partition = 1; - * @param \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $var - * @return $this - */ - public function setSuccessfullyIngestedPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Partition\TemporalPartition::class); - $this->successfully_ingested_partition = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance.php deleted file mode 100644 index 45b543fb8b9a..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance.php +++ /dev/null @@ -1,406 +0,0 @@ -google.cloud.visionai.v1.Instance - */ -class Instance extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. name of resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. [Output only] Create timestamp - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. [Output only] Update timestamp - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 3; - */ - private $labels; - /** - * Required. A user friendly display name for the solution. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * A description for this instance. - * - * Generated from protobuf field string description = 5; - */ - protected $description = ''; - /** - * The instance type for the current instance. - * - * Generated from protobuf field .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10; - */ - protected $instance_type = 0; - /** - * The input resources for the current application instance. - * For example: - * input_resources: - * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; - */ - private $input_resources; - /** - * All the output resources associated to one application instance. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; - */ - private $output_resources; - /** - * State of the instance. - * - * Generated from protobuf field .google.cloud.visionai.v1.Instance.State state = 9; - */ - protected $state = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. name of resource - * @type \Google\Protobuf\Timestamp $create_time - * Output only. [Output only] Create timestamp - * @type \Google\Protobuf\Timestamp $update_time - * Output only. [Output only] Update timestamp - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs - * @type string $display_name - * Required. A user friendly display name for the solution. - * @type string $description - * A description for this instance. - * @type int $instance_type - * The instance type for the current instance. - * @type \Google\Cloud\VisionAI\V1\Instance\InputResource[] $input_resources - * The input resources for the current application instance. - * For example: - * input_resources: - * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a - * @type \Google\Cloud\VisionAI\V1\Instance\OutputResource[] $output_resources - * All the output resources associated to one application instance. - * @type int $state - * State of the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Output only. name of resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. name of resource - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. [Output only] Create timestamp - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. [Output only] Create timestamp - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. [Output only] Update timestamp - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. [Output only] Update timestamp - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 3; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs - * - * Generated from protobuf field map labels = 3; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. A user friendly display name for the solution. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. A user friendly display name for the solution. - * - * Generated from protobuf field string display_name = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * A description for this instance. - * - * Generated from protobuf field string description = 5; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A description for this instance. - * - * 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; - } - - /** - * The instance type for the current instance. - * - * Generated from protobuf field .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10; - * @return int - */ - public function getInstanceType() - { - return $this->instance_type; - } - - /** - * The instance type for the current instance. - * - * Generated from protobuf field .google.cloud.visionai.v1.Instance.InstanceType instance_type = 10; - * @param int $var - * @return $this - */ - public function setInstanceType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Instance\InstanceType::class); - $this->instance_type = $var; - - return $this; - } - - /** - * The input resources for the current application instance. - * For example: - * input_resources: - * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Instance\InputResource> - */ - public function getInputResources() - { - return $this->input_resources; - } - - /** - * The input resources for the current application instance. - * For example: - * input_resources: - * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/stream-a - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance.InputResource input_resources = 6; - * @param \Google\Cloud\VisionAI\V1\Instance\InputResource[] $var - * @return $this - */ - public function setInputResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Instance\InputResource::class); - $this->input_resources = $arr; - - return $this; - } - - /** - * All the output resources associated to one application instance. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Instance\OutputResource> - */ - public function getOutputResources() - { - return $this->output_resources; - } - - /** - * All the output resources associated to one application instance. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance.OutputResource output_resources = 7; - * @param \Google\Cloud\VisionAI\V1\Instance\OutputResource[] $var - * @return $this - */ - public function setOutputResources($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Instance\OutputResource::class); - $this->output_resources = $arr; - - return $this; - } - - /** - * State of the instance. - * - * Generated from protobuf field .google.cloud.visionai.v1.Instance.State state = 9; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * State of the instance. - * - * Generated from protobuf field .google.cloud.visionai.v1.Instance.State state = 9; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Instance\State::class); - $this->state = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/InputResource.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/InputResource.php deleted file mode 100644 index f82fdbbde7cb..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/InputResource.php +++ /dev/null @@ -1,301 +0,0 @@ -google.cloud.visionai.v1.Instance.InputResource - */ -class InputResource extends \Google\Protobuf\Internal\Message -{ - /** - * Data type for the current input resource. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataType data_type = 6; - */ - protected $data_type = 0; - /** - * The name of graph node who receives the input resource. - * For example: - * input_resource: - * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a - * consumer_node: stream-input - * - * Generated from protobuf field string consumer_node = 2; - */ - protected $consumer_node = ''; - /** - * The specific input resource binding which will consume the current Input - * Resource, can be ignored is there is only 1 input binding. - * - * Generated from protobuf field string input_resource_binding = 3; - */ - protected $input_resource_binding = ''; - /** - * Contains resource annotations. - * - * Generated from protobuf field .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; - */ - protected $annotations = null; - protected $input_resource_information; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $input_resource - * The direct input resource name. - * If the instance type is STREAMING_PREDICTION, the input resource is in - * format of - * "projects/123/locations/us-central1/clusters/456/streams/stream-a". - * If the instance type is BATCH_PREDICTION from Cloud Storage input - * container, the input resource is in format of "gs://bucket-a". - * @type \Google\Cloud\VisionAI\V1\StreamWithAnnotation $annotated_stream - * If the input resource is VisionAI Stream, the associated annotations - * can be specified using annotated_stream instead. - * @type int $data_type - * Data type for the current input resource. - * @type string $consumer_node - * The name of graph node who receives the input resource. - * For example: - * input_resource: - * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a - * consumer_node: stream-input - * @type string $input_resource_binding - * The specific input resource binding which will consume the current Input - * Resource, can be ignored is there is only 1 input binding. - * @type \Google\Cloud\VisionAI\V1\ResourceAnnotations $annotations - * Contains resource annotations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * The direct input resource name. - * If the instance type is STREAMING_PREDICTION, the input resource is in - * format of - * "projects/123/locations/us-central1/clusters/456/streams/stream-a". - * If the instance type is BATCH_PREDICTION from Cloud Storage input - * container, the input resource is in format of "gs://bucket-a". - * - * Generated from protobuf field string input_resource = 1; - * @return string - */ - public function getInputResource() - { - return $this->readOneof(1); - } - - public function hasInputResource() - { - return $this->hasOneof(1); - } - - /** - * The direct input resource name. - * If the instance type is STREAMING_PREDICTION, the input resource is in - * format of - * "projects/123/locations/us-central1/clusters/456/streams/stream-a". - * If the instance type is BATCH_PREDICTION from Cloud Storage input - * container, the input resource is in format of "gs://bucket-a". - * - * Generated from protobuf field string input_resource = 1; - * @param string $var - * @return $this - */ - public function setInputResource($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * If the input resource is VisionAI Stream, the associated annotations - * can be specified using annotated_stream instead. - * - * Generated from protobuf field .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true]; - * @return \Google\Cloud\VisionAI\V1\StreamWithAnnotation|null - * @deprecated - */ - public function getAnnotatedStream() - { - if ($this->hasOneof(4)) { - @trigger_error('annotated_stream is deprecated.', E_USER_DEPRECATED); - } - return $this->readOneof(4); - } - - public function hasAnnotatedStream() - { - if ($this->hasOneof(4)) { - @trigger_error('annotated_stream is deprecated.', E_USER_DEPRECATED); - } - return $this->hasOneof(4); - } - - /** - * If the input resource is VisionAI Stream, the associated annotations - * can be specified using annotated_stream instead. - * - * Generated from protobuf field .google.cloud.visionai.v1.StreamWithAnnotation annotated_stream = 4 [deprecated = true]; - * @param \Google\Cloud\VisionAI\V1\StreamWithAnnotation $var - * @return $this - * @deprecated - */ - public function setAnnotatedStream($var) - { - @trigger_error('annotated_stream is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\StreamWithAnnotation::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Data type for the current input resource. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataType data_type = 6; - * @return int - */ - public function getDataType() - { - return $this->data_type; - } - - /** - * Data type for the current input resource. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataType data_type = 6; - * @param int $var - * @return $this - */ - public function setDataType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\DataType::class); - $this->data_type = $var; - - return $this; - } - - /** - * The name of graph node who receives the input resource. - * For example: - * input_resource: - * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a - * consumer_node: stream-input - * - * Generated from protobuf field string consumer_node = 2; - * @return string - */ - public function getConsumerNode() - { - return $this->consumer_node; - } - - /** - * The name of graph node who receives the input resource. - * For example: - * input_resource: - * visionai.googleapis.com/v1/projects/123/locations/us-central1/clusters/456/streams/input-stream-a - * consumer_node: stream-input - * - * Generated from protobuf field string consumer_node = 2; - * @param string $var - * @return $this - */ - public function setConsumerNode($var) - { - GPBUtil::checkString($var, True); - $this->consumer_node = $var; - - return $this; - } - - /** - * The specific input resource binding which will consume the current Input - * Resource, can be ignored is there is only 1 input binding. - * - * Generated from protobuf field string input_resource_binding = 3; - * @return string - */ - public function getInputResourceBinding() - { - return $this->input_resource_binding; - } - - /** - * The specific input resource binding which will consume the current Input - * Resource, can be ignored is there is only 1 input binding. - * - * Generated from protobuf field string input_resource_binding = 3; - * @param string $var - * @return $this - */ - public function setInputResourceBinding($var) - { - GPBUtil::checkString($var, True); - $this->input_resource_binding = $var; - - return $this; - } - - /** - * Contains resource annotations. - * - * Generated from protobuf field .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; - * @return \Google\Cloud\VisionAI\V1\ResourceAnnotations|null - */ - public function getAnnotations() - { - return $this->annotations; - } - - public function hasAnnotations() - { - return isset($this->annotations); - } - - public function clearAnnotations() - { - unset($this->annotations); - } - - /** - * Contains resource annotations. - * - * Generated from protobuf field .google.cloud.visionai.v1.ResourceAnnotations annotations = 5; - * @param \Google\Cloud\VisionAI\V1\ResourceAnnotations $var - * @return $this - */ - public function setAnnotations($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ResourceAnnotations::class); - $this->annotations = $var; - - return $this; - } - - /** - * @return string - */ - public function getInputResourceInformation() - { - return $this->whichOneof("input_resource_information"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/InstanceType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/InstanceType.php deleted file mode 100644 index a888a9c8f516..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/InstanceType.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.visionai.v1.Instance.InstanceType - */ -class InstanceType -{ - /** - * Unspecified instance type. - * If the instance type is not specified, the default one is - * STREAMING_PREDICTION. - * - * Generated from protobuf enum INSTANCE_TYPE_UNSPECIFIED = 0; - */ - const INSTANCE_TYPE_UNSPECIFIED = 0; - /** - * Instance type for streaming prediction. - * - * Generated from protobuf enum STREAMING_PREDICTION = 1; - */ - const STREAMING_PREDICTION = 1; - /** - * Instance type for batch prediction. - * - * Generated from protobuf enum BATCH_PREDICTION = 2; - */ - const BATCH_PREDICTION = 2; - /** - * Instance type for online prediction. - * - * Generated from protobuf enum ONLINE_PREDICTION = 3; - */ - const ONLINE_PREDICTION = 3; - - private static $valueToName = [ - self::INSTANCE_TYPE_UNSPECIFIED => 'INSTANCE_TYPE_UNSPECIFIED', - self::STREAMING_PREDICTION => 'STREAMING_PREDICTION', - self::BATCH_PREDICTION => 'BATCH_PREDICTION', - self::ONLINE_PREDICTION => 'ONLINE_PREDICTION', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/OutputResource.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/OutputResource.php deleted file mode 100644 index ebe88a0dce7d..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/OutputResource.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.visionai.v1.Instance.OutputResource - */ -class OutputResource extends \Google\Protobuf\Internal\Message -{ - /** - * The output resource name for the current application instance. - * - * Generated from protobuf field string output_resource = 1; - */ - protected $output_resource = ''; - /** - * The name of graph node who produces the output resource name. - * For example: - * output_resource: - * /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting - * producer_node: occupancy-counting - * - * Generated from protobuf field string producer_node = 2; - */ - protected $producer_node = ''; - /** - * The specific output resource binding which produces the current - * OutputResource. - * - * Generated from protobuf field string output_resource_binding = 4; - */ - protected $output_resource_binding = ''; - /** - * Output only. Whether the output resource is temporary which means the - * resource is generated during the deployment of the application. Temporary - * resource will be deleted during the undeployment of the application. - * - * Generated from protobuf field bool is_temporary = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $is_temporary = false; - /** - * Output only. Whether the output resource is created automatically by the - * Vision AI App Platform. - * - * Generated from protobuf field bool autogen = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $autogen = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $output_resource - * The output resource name for the current application instance. - * @type string $producer_node - * The name of graph node who produces the output resource name. - * For example: - * output_resource: - * /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting - * producer_node: occupancy-counting - * @type string $output_resource_binding - * The specific output resource binding which produces the current - * OutputResource. - * @type bool $is_temporary - * Output only. Whether the output resource is temporary which means the - * resource is generated during the deployment of the application. Temporary - * resource will be deleted during the undeployment of the application. - * @type bool $autogen - * Output only. Whether the output resource is created automatically by the - * Vision AI App Platform. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * The output resource name for the current application instance. - * - * Generated from protobuf field string output_resource = 1; - * @return string - */ - public function getOutputResource() - { - return $this->output_resource; - } - - /** - * The output resource name for the current application instance. - * - * Generated from protobuf field string output_resource = 1; - * @param string $var - * @return $this - */ - public function setOutputResource($var) - { - GPBUtil::checkString($var, True); - $this->output_resource = $var; - - return $this; - } - - /** - * The name of graph node who produces the output resource name. - * For example: - * output_resource: - * /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting - * producer_node: occupancy-counting - * - * Generated from protobuf field string producer_node = 2; - * @return string - */ - public function getProducerNode() - { - return $this->producer_node; - } - - /** - * The name of graph node who produces the output resource name. - * For example: - * output_resource: - * /projects/123/locations/us-central1/clusters/456/streams/output-application-789-stream-a-occupancy-counting - * producer_node: occupancy-counting - * - * Generated from protobuf field string producer_node = 2; - * @param string $var - * @return $this - */ - public function setProducerNode($var) - { - GPBUtil::checkString($var, True); - $this->producer_node = $var; - - return $this; - } - - /** - * The specific output resource binding which produces the current - * OutputResource. - * - * Generated from protobuf field string output_resource_binding = 4; - * @return string - */ - public function getOutputResourceBinding() - { - return $this->output_resource_binding; - } - - /** - * The specific output resource binding which produces the current - * OutputResource. - * - * Generated from protobuf field string output_resource_binding = 4; - * @param string $var - * @return $this - */ - public function setOutputResourceBinding($var) - { - GPBUtil::checkString($var, True); - $this->output_resource_binding = $var; - - return $this; - } - - /** - * Output only. Whether the output resource is temporary which means the - * resource is generated during the deployment of the application. Temporary - * resource will be deleted during the undeployment of the application. - * - * Generated from protobuf field bool is_temporary = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getIsTemporary() - { - return $this->is_temporary; - } - - /** - * Output only. Whether the output resource is temporary which means the - * resource is generated during the deployment of the application. Temporary - * resource will be deleted during the undeployment of the application. - * - * Generated from protobuf field bool is_temporary = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setIsTemporary($var) - { - GPBUtil::checkBool($var); - $this->is_temporary = $var; - - return $this; - } - - /** - * Output only. Whether the output resource is created automatically by the - * Vision AI App Platform. - * - * Generated from protobuf field bool autogen = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getAutogen() - { - return $this->autogen; - } - - /** - * Output only. Whether the output resource is created automatically by the - * Vision AI App Platform. - * - * Generated from protobuf field bool autogen = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setAutogen($var) - { - GPBUtil::checkBool($var); - $this->autogen = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/State.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/State.php deleted file mode 100644 index 0e70174e907b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Instance/State.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.visionai.v1.Instance.State - */ -class State -{ - /** - * The default value. This value is used if the state is omitted. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * State CREATING. - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * State CREATED. - * - * Generated from protobuf enum CREATED = 2; - */ - const CREATED = 2; - /** - * State DEPLOYING. - * - * Generated from protobuf enum DEPLOYING = 3; - */ - const DEPLOYING = 3; - /** - * State DEPLOYED. - * - * Generated from protobuf enum DEPLOYED = 4; - */ - const DEPLOYED = 4; - /** - * State UNDEPLOYING. - * - * Generated from protobuf enum UNDEPLOYING = 5; - */ - const UNDEPLOYING = 5; - /** - * State DELETED. - * - * Generated from protobuf enum DELETED = 6; - */ - const DELETED = 6; - /** - * State ERROR. - * - * Generated from protobuf enum ERROR = 7; - */ - const ERROR = 7; - /** - * State Updating - * - * Generated from protobuf enum UPDATING = 8; - */ - const UPDATING = 8; - /** - * State Deleting. - * - * Generated from protobuf enum DELETING = 9; - */ - const DELETING = 9; - /** - * State Fixing. - * - * Generated from protobuf enum FIXING = 10; - */ - const FIXING = 10; - /** - * State Finished. - * - * Generated from protobuf enum FINISHED = 11; - */ - const FINISHED = 11; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::CREATED => 'CREATED', - self::DEPLOYING => 'DEPLOYING', - self::DEPLOYED => 'DEPLOYED', - self::UNDEPLOYING => 'UNDEPLOYING', - self::DELETED => 'DELETED', - self::ERROR => 'ERROR', - self::UPDATING => 'UPDATING', - self::DELETING => 'DELETING', - self::FIXING => 'FIXING', - self::FINISHED => 'FINISHED', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IntRange.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IntRange.php deleted file mode 100644 index 0ac149676be8..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IntRange.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.visionai.v1.IntRange - */ -class IntRange extends \Google\Protobuf\Internal\Message -{ - /** - * Start of the int range. - * - * Generated from protobuf field optional int64 start = 1; - */ - protected $start = null; - /** - * End of the int range. - * - * Generated from protobuf field optional int64 end = 2; - */ - protected $end = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $start - * Start of the int range. - * @type int|string $end - * End of the int range. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Start of the int range. - * - * Generated from protobuf field optional int64 start = 1; - * @return int|string - */ - public function getStart() - { - return isset($this->start) ? $this->start : 0; - } - - public function hasStart() - { - return isset($this->start); - } - - public function clearStart() - { - unset($this->start); - } - - /** - * Start of the int range. - * - * Generated from protobuf field optional int64 start = 1; - * @param int|string $var - * @return $this - */ - public function setStart($var) - { - GPBUtil::checkInt64($var); - $this->start = $var; - - return $this; - } - - /** - * End of the int range. - * - * Generated from protobuf field optional int64 end = 2; - * @return int|string - */ - public function getEnd() - { - return isset($this->end) ? $this->end : 0; - } - - public function hasEnd() - { - return isset($this->end); - } - - public function clearEnd() - { - unset($this->end); - } - - /** - * End of the int range. - * - * Generated from protobuf field optional int64 end = 2; - * @param int|string $var - * @return $this - */ - public function setEnd($var) - { - GPBUtil::checkInt64($var); - $this->end = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IntRangeArray.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IntRangeArray.php deleted file mode 100644 index 4849ac10542d..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/IntRangeArray.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.IntRangeArray - */ -class IntRangeArray extends \Google\Protobuf\Internal\Message -{ - /** - * Int range values. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; - */ - private $int_ranges; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\IntRange[] $int_ranges - * Int range values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Int range values. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\IntRange> - */ - public function getIntRanges() - { - return $this->int_ranges; - } - - /** - * Int range values. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.IntRange int_ranges = 1; - * @param \Google\Cloud\VisionAI\V1\IntRange[] $var - * @return $this - */ - public function setIntRanges($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\IntRange::class); - $this->int_ranges = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Lease.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Lease.php deleted file mode 100644 index b99527194d0a..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Lease.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.visionai.v1.Lease - */ -class Lease extends \Google\Protobuf\Internal\Message -{ - /** - * The lease id. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * The series name. - * - * Generated from protobuf field string series = 2; - */ - protected $series = ''; - /** - * The owner name. - * - * Generated from protobuf field string owner = 3; - */ - protected $owner = ''; - /** - * The lease expire time. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4; - */ - protected $expire_time = null; - /** - * The lease type. - * - * Generated from protobuf field .google.cloud.visionai.v1.LeaseType lease_type = 5; - */ - protected $lease_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * The lease id. - * @type string $series - * The series name. - * @type string $owner - * The owner name. - * @type \Google\Protobuf\Timestamp $expire_time - * The lease expire time. - * @type int $lease_type - * The lease type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - - /** - * The lease id. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The lease id. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The series name. - * - * Generated from protobuf field string series = 2; - * @return string - */ - public function getSeries() - { - return $this->series; - } - - /** - * The series name. - * - * Generated from protobuf field string series = 2; - * @param string $var - * @return $this - */ - public function setSeries($var) - { - GPBUtil::checkString($var, True); - $this->series = $var; - - return $this; - } - - /** - * The owner name. - * - * Generated from protobuf field string owner = 3; - * @return string - */ - public function getOwner() - { - return $this->owner; - } - - /** - * The owner name. - * - * Generated from protobuf field string owner = 3; - * @param string $var - * @return $this - */ - public function setOwner($var) - { - GPBUtil::checkString($var, True); - $this->owner = $var; - - return $this; - } - - /** - * The lease expire time. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4; - * @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); - } - - /** - * The lease expire time. - * - * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->expire_time = $var; - - return $this; - } - - /** - * The lease type. - * - * Generated from protobuf field .google.cloud.visionai.v1.LeaseType lease_type = 5; - * @return int - */ - public function getLeaseType() - { - return $this->lease_type; - } - - /** - * The lease type. - * - * Generated from protobuf field .google.cloud.visionai.v1.LeaseType lease_type = 5; - * @param int $var - * @return $this - */ - public function setLeaseType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\LeaseType::class); - $this->lease_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/LeaseType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/LeaseType.php deleted file mode 100644 index 2f9790f890f0..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/LeaseType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.visionai.v1.LeaseType - */ -class LeaseType -{ - /** - * Lease type unspecified. - * - * Generated from protobuf enum LEASE_TYPE_UNSPECIFIED = 0; - */ - const LEASE_TYPE_UNSPECIFIED = 0; - /** - * Lease for stream reader. - * - * Generated from protobuf enum LEASE_TYPE_READER = 1; - */ - const LEASE_TYPE_READER = 1; - /** - * Lease for stream writer. - * - * Generated from protobuf enum LEASE_TYPE_WRITER = 2; - */ - const LEASE_TYPE_WRITER = 2; - - private static $valueToName = [ - self::LEASE_TYPE_UNSPECIFIED => 'LEASE_TYPE_UNSPECIFIED', - self::LEASE_TYPE_READER => 'LEASE_TYPE_READER', - self::LEASE_TYPE_WRITER => 'LEASE_TYPE_WRITER', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnalysesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnalysesRequest.php deleted file mode 100644 index fb697f920fdb..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnalysesRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.visionai.v1.ListAnalysesRequest - */ -class ListAnalysesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListAnalysesRequest - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListAnalysesRequest - * Please see {@see LiveVideoAnalyticsClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ListAnalysesRequest - * - * @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. Parent value for ListAnalysesRequest - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results - * @type string $order_by - * Hint for how to order the results - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListAnalysesRequest - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for ListAnalysesRequest - * - * 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; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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; - } - - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnalysesResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnalysesResponse.php deleted file mode 100644 index 859a37b755ae..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnalysesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.visionai.v1.ListAnalysesResponse - */ -class ListAnalysesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Analysis - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Analysis analyses = 1; - */ - private $analyses; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Analysis[] $analyses - * The list of Analysis - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type string[] $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * The list of Analysis - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Analysis analyses = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Analysis> - */ - public function getAnalyses() - { - return $this->analyses; - } - - /** - * The list of Analysis - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Analysis analyses = 1; - * @param \Google\Cloud\VisionAI\V1\Analysis[] $var - * @return $this - */ - public function setAnalyses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Analysis::class); - $this->analyses = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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 that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnnotationsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnnotationsRequest.php deleted file mode 100644 index f8ebf8560dd8..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnnotationsRequest.php +++ /dev/null @@ -1,268 +0,0 @@ -google.cloud.visionai.v1.ListAnnotationsRequest - */ -class ListAnnotationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The parent, which owns this collection of annotations. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` - * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of annotations to return. The service may return fewer - * than this value. If unspecified, at most 50 annotations will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListAnnotations` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAnnotations` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The filter applied to the returned list. - * We only support filtering for the following fields: - * For corpus of STREAM_VIDEO type: - * `partition.temporal_partition.start_time`, - * `partition.temporal_partition.end_time`, and `key`. - * For corpus of VIDEO_ON_DEMAND type, - * `partition.relative_temporal_partition.start_offset`, - * `partition.relative_temporal_partition.end_offset`, and `key`. - * For corpus of IMAGE type, only `key` is supported. - * Timestamps are specified in the RFC-3339 format, and only one restriction - * may be applied per field, joined by conjunctions. - * Format: - * "partition.temporal_partition.start_time > "2012-04-21T11:30:00-04:00" AND - * partition.temporal_partition.end_time < "2012-04-22T11:30:00-04:00" AND - * key = "example_key"" - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * @param string $parent The parent, which owns this collection of annotations. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` - * - * @return \Google\Cloud\VisionAI\V1\ListAnnotationsRequest - * - * @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 - * The parent, which owns this collection of annotations. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` - * @type int $page_size - * The maximum number of annotations to return. The service may return fewer - * than this value. If unspecified, at most 50 annotations will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * A page token, received from a previous `ListAnnotations` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAnnotations` must - * match the call that provided the page token. - * @type string $filter - * The filter applied to the returned list. - * We only support filtering for the following fields: - * For corpus of STREAM_VIDEO type: - * `partition.temporal_partition.start_time`, - * `partition.temporal_partition.end_time`, and `key`. - * For corpus of VIDEO_ON_DEMAND type, - * `partition.relative_temporal_partition.start_offset`, - * `partition.relative_temporal_partition.end_offset`, and `key`. - * For corpus of IMAGE type, only `key` is supported. - * Timestamps are specified in the RFC-3339 format, and only one restriction - * may be applied per field, joined by conjunctions. - * Format: - * "partition.temporal_partition.start_time > "2012-04-21T11:30:00-04:00" AND - * partition.temporal_partition.end_time < "2012-04-22T11:30:00-04:00" AND - * key = "example_key"" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The parent, which owns this collection of annotations. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` - * - * Generated from protobuf field string parent = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The parent, which owns this collection of annotations. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` - * - * Generated from protobuf field string parent = 1 [(.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 annotations to return. The service may return fewer - * than this value. If unspecified, at most 50 annotations will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of annotations to return. The service may return fewer - * than this value. If unspecified, at most 50 annotations will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListAnnotations` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAnnotations` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListAnnotations` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAnnotations` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The filter applied to the returned list. - * We only support filtering for the following fields: - * For corpus of STREAM_VIDEO type: - * `partition.temporal_partition.start_time`, - * `partition.temporal_partition.end_time`, and `key`. - * For corpus of VIDEO_ON_DEMAND type, - * `partition.relative_temporal_partition.start_offset`, - * `partition.relative_temporal_partition.end_offset`, and `key`. - * For corpus of IMAGE type, only `key` is supported. - * Timestamps are specified in the RFC-3339 format, and only one restriction - * may be applied per field, joined by conjunctions. - * Format: - * "partition.temporal_partition.start_time > "2012-04-21T11:30:00-04:00" AND - * partition.temporal_partition.end_time < "2012-04-22T11:30:00-04:00" AND - * key = "example_key"" - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter applied to the returned list. - * We only support filtering for the following fields: - * For corpus of STREAM_VIDEO type: - * `partition.temporal_partition.start_time`, - * `partition.temporal_partition.end_time`, and `key`. - * For corpus of VIDEO_ON_DEMAND type, - * `partition.relative_temporal_partition.start_offset`, - * `partition.relative_temporal_partition.end_offset`, and `key`. - * For corpus of IMAGE type, only `key` is supported. - * Timestamps are specified in the RFC-3339 format, and only one restriction - * may be applied per field, joined by conjunctions. - * Format: - * "partition.temporal_partition.start_time > "2012-04-21T11:30:00-04:00" AND - * partition.temporal_partition.end_time < "2012-04-22T11:30:00-04:00" AND - * key = "example_key"" - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnnotationsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnnotationsResponse.php deleted file mode 100644 index 96825955ebf4..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAnnotationsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.visionai.v1.ListAnnotationsResponse - */ -class ListAnnotationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The annotations from the specified asset. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Annotation annotations = 1; - */ - private $annotations; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Annotation[] $annotations - * The annotations from the specified asset. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The annotations from the specified asset. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Annotation annotations = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Annotation> - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * The annotations from the specified asset. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Annotation annotations = 1; - * @param \Google\Cloud\VisionAI\V1\Annotation[] $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Annotation::class); - $this->annotations = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListApplicationsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListApplicationsRequest.php deleted file mode 100644 index bdbe1cff6b17..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListApplicationsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.visionai.v1.ListApplicationsRequest - */ -class ListApplicationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListApplicationsRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListApplicationsRequest. Please see - * {@see AppPlatformClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ListApplicationsRequest - * - * @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. Parent value for ListApplicationsRequest. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results. - * @type string $order_by - * Hint for how to order the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListApplicationsRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for ListApplicationsRequest. - * - * 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; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListApplicationsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListApplicationsResponse.php deleted file mode 100644 index e58e1107093c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListApplicationsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.visionai.v1.ListApplicationsResponse - */ -class ListApplicationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Application. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Application applications = 1; - */ - private $applications; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Application[] $applications - * The list of Application. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type string[] $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * The list of Application. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Application applications = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Application> - */ - public function getApplications() - { - return $this->applications; - } - - /** - * The list of Application. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Application applications = 1; - * @param \Google\Cloud\VisionAI\V1\Application[] $var - * @return $this - */ - public function setApplications($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Application::class); - $this->applications = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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 that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAssetsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAssetsRequest.php deleted file mode 100644 index 02a3bd60fc49..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAssetsRequest.php +++ /dev/null @@ -1,229 +0,0 @@ -google.cloud.visionai.v1.ListAssetsRequest - */ -class ListAssetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of assets. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of assets to return. The service may return fewer than - * this value. - * If unspecified, at most 50 assets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListAssets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAssets` must match - * the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The filter applied to the returned list. - * Only the following filterings are supported: - * "assets_with_contents = true", which returns assets with contents uploaded; - * "assets_with_contents = false", which returns assets without contents. - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of assets. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * Please see {@see WarehouseClient::corpusName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ListAssetsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent, which owns this collection of assets. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * @type int $page_size - * The maximum number of assets to return. The service may return fewer than - * this value. - * If unspecified, at most 50 assets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * A page token, received from a previous `ListAssets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAssets` must match - * the call that provided the page token. - * @type string $filter - * The filter applied to the returned list. - * Only the following filterings are supported: - * "assets_with_contents = true", which returns assets with contents uploaded; - * "assets_with_contents = false", which returns assets without contents. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of assets. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent, which owns this collection of assets. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * 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 assets to return. The service may return fewer than - * this value. - * If unspecified, at most 50 assets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of assets to return. The service may return fewer than - * this value. - * If unspecified, at most 50 assets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListAssets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAssets` must match - * the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListAssets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListAssets` must match - * the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The filter applied to the returned list. - * Only the following filterings are supported: - * "assets_with_contents = true", which returns assets with contents uploaded; - * "assets_with_contents = false", which returns assets without contents. - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter applied to the returned list. - * Only the following filterings are supported: - * "assets_with_contents = true", which returns assets with contents uploaded; - * "assets_with_contents = false", which returns assets without contents. - * - * Generated from protobuf field string filter = 5; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAssetsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAssetsResponse.php deleted file mode 100644 index 6d4c9d427d3b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListAssetsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.visionai.v1.ListAssetsResponse - */ -class ListAssetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The assets from the specified corpus. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Asset assets = 1; - */ - private $assets; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Asset[] $assets - * The assets from the specified corpus. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The assets from the specified corpus. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Asset assets = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Asset> - */ - public function getAssets() - { - return $this->assets; - } - - /** - * The assets from the specified corpus. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Asset assets = 1; - * @param \Google\Cloud\VisionAI\V1\Asset[] $var - * @return $this - */ - public function setAssets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Asset::class); - $this->assets = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListClustersRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListClustersRequest.php deleted file mode 100644 index d58c7da5a38d..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListClustersRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.visionai.v1.ListClustersRequest - */ -class ListClustersRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListClustersRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListClustersRequest. Please see - * {@see StreamsServiceClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\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. Parent value for ListClustersRequest. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results. - * @type string $order_by - * Hint for how to order the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListClustersRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for ListClustersRequest. - * - * 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; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListClustersResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListClustersResponse.php deleted file mode 100644 index a7adf43c0e80..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListClustersResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.visionai.v1.ListClustersResponse - */ -class ListClustersResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Cluster. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Cluster clusters = 1; - */ - private $clusters; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Cluster[] $clusters - * The list of Cluster. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type string[] $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * The list of Cluster. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Cluster clusters = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Cluster> - */ - public function getClusters() - { - return $this->clusters; - } - - /** - * The list of Cluster. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Cluster clusters = 1; - * @param \Google\Cloud\VisionAI\V1\Cluster[] $var - * @return $this - */ - public function setClusters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Cluster::class); - $this->clusters = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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 that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCollectionsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCollectionsRequest.php deleted file mode 100644 index 7ec9b0adf3d2..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCollectionsRequest.php +++ /dev/null @@ -1,174 +0,0 @@ -google.cloud.visionai.v1.ListCollectionsRequest - */ -class ListCollectionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent corpus. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of collections to return. The service may return fewer - * than this value. If unspecified, at most 50 collections will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListCollectionsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCollectionsRequest` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent corpus. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * Please see {@see WarehouseClient::corpusName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ListCollectionsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent corpus. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * @type int $page_size - * The maximum number of collections to return. The service may return fewer - * than this value. If unspecified, at most 50 collections will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * A page token, received from a previous `ListCollectionsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCollectionsRequest` - * must match the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent corpus. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent corpus. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * 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 collections to return. The service may return fewer - * than this value. If unspecified, at most 50 collections will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of collections to return. The service may return fewer - * than this value. If unspecified, at most 50 collections will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListCollectionsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCollectionsRequest` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListCollectionsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListCollectionsRequest` - * must match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCollectionsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCollectionsResponse.php deleted file mode 100644 index 275dc563c677..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCollectionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.visionai.v1.ListCollectionsResponse - */ -class ListCollectionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The collections from the specified corpus. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Collection collections = 1; - */ - private $collections; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Collection[] $collections - * The collections from the specified corpus. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The collections from the specified corpus. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Collection collections = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Collection> - */ - public function getCollections() - { - return $this->collections; - } - - /** - * The collections from the specified corpus. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Collection collections = 1; - * @param \Google\Cloud\VisionAI\V1\Collection[] $var - * @return $this - */ - public function setCollections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Collection::class); - $this->collections = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCorporaRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCorporaRequest.php deleted file mode 100644 index 2641cca03488..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCorporaRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.visionai.v1.ListCorporaRequest - */ -class ListCorporaRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the project from which to list corpora. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $parent = ''; - /** - * Requested page size. API may return fewer results than requested. - * If negative, INVALID_ARGUMENT error will be returned. - * If unspecified or 0, API will pick a default size, which is 10. - * If the requested page size is larger than the maximum size, API will pick - * use the maximum size, which is 20. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results for the server to return. - * Typically obtained via - * [ListCorporaResponse.next_page_token][google.cloud.visionai.v1.ListCorporaResponse.next_page_token] - * of the previous - * [Warehouse.ListCorpora][google.cloud.visionai.v1.Warehouse.ListCorpora] - * call. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The filter applied to the returned corpora list. - * Only the following restrictions are supported: - * `type=`, - * `type!=`. - * - * Generated from protobuf field string filter = 5; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The resource name of the project from which to list corpora. - * - * @return \Google\Cloud\VisionAI\V1\ListCorporaRequest - * - * @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 resource name of the project from which to list corpora. - * @type int $page_size - * Requested page size. API may return fewer results than requested. - * If negative, INVALID_ARGUMENT error will be returned. - * If unspecified or 0, API will pick a default size, which is 10. - * If the requested page size is larger than the maximum size, API will pick - * use the maximum size, which is 20. - * @type string $page_token - * A token identifying a page of results for the server to return. - * Typically obtained via - * [ListCorporaResponse.next_page_token][google.cloud.visionai.v1.ListCorporaResponse.next_page_token] - * of the previous - * [Warehouse.ListCorpora][google.cloud.visionai.v1.Warehouse.ListCorpora] - * call. - * @type string $filter - * The filter applied to the returned corpora list. - * Only the following restrictions are supported: - * `type=`, - * `type!=`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the project from which to list corpora. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The resource name of the project from which to list corpora. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * Requested page size. API may return fewer results than requested. - * If negative, INVALID_ARGUMENT error will be returned. - * If unspecified or 0, API will pick a default size, which is 10. - * If the requested page size is larger than the maximum size, API will pick - * use the maximum size, which is 20. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. API may return fewer results than requested. - * If negative, INVALID_ARGUMENT error will be returned. - * If unspecified or 0, API will pick a default size, which is 10. - * If the requested page size is larger than the maximum size, API will pick - * use the maximum size, which is 20. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results for the server to return. - * Typically obtained via - * [ListCorporaResponse.next_page_token][google.cloud.visionai.v1.ListCorporaResponse.next_page_token] - * of the previous - * [Warehouse.ListCorpora][google.cloud.visionai.v1.Warehouse.ListCorpora] - * call. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results for the server to return. - * Typically obtained via - * [ListCorporaResponse.next_page_token][google.cloud.visionai.v1.ListCorporaResponse.next_page_token] - * of the previous - * [Warehouse.ListCorpora][google.cloud.visionai.v1.Warehouse.ListCorpora] - * 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; - } - - /** - * The filter applied to the returned corpora list. - * Only the following restrictions are supported: - * `type=`, - * `type!=`. - * - * Generated from protobuf field string filter = 5; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter applied to the returned corpora list. - * Only the following restrictions are supported: - * `type=`, - * `type!=`. - * - * Generated from protobuf field string filter = 5; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCorporaResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCorporaResponse.php deleted file mode 100644 index d5823dbd1d5c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListCorporaResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.visionai.v1.ListCorporaResponse - */ -class ListCorporaResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The corpora in the project. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Corpus corpora = 1; - */ - private $corpora; - /** - * A token to retrieve next page of results. - * Pass to - * [ListCorporaRequest.page_token][google.cloud.visionai.v1.ListCorporaRequest.page_token] - * to obtain that page. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Corpus[] $corpora - * The corpora in the project. - * @type string $next_page_token - * A token to retrieve next page of results. - * Pass to - * [ListCorporaRequest.page_token][google.cloud.visionai.v1.ListCorporaRequest.page_token] - * to obtain that page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The corpora in the project. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Corpus corpora = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Corpus> - */ - public function getCorpora() - { - return $this->corpora; - } - - /** - * The corpora in the project. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Corpus corpora = 1; - * @param \Google\Cloud\VisionAI\V1\Corpus[] $var - * @return $this - */ - public function setCorpora($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Corpus::class); - $this->corpora = $arr; - - return $this; - } - - /** - * A token to retrieve next page of results. - * Pass to - * [ListCorporaRequest.page_token][google.cloud.visionai.v1.ListCorporaRequest.page_token] - * to obtain that page. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve next page of results. - * Pass to - * [ListCorporaRequest.page_token][google.cloud.visionai.v1.ListCorporaRequest.page_token] - * to obtain that page. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDataSchemasRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDataSchemasRequest.php deleted file mode 100644 index 5188f3a82c27..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDataSchemasRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.visionai.v1.ListDataSchemasRequest - */ -class ListDataSchemasRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of data schemas. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of data schemas to return. The service may return fewer - * than this value. If unspecified, at most 50 data schemas will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListDataSchemas` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListDataSchemas` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of data schemas. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * Please see {@see WarehouseClient::corpusName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ListDataSchemasRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent, which owns this collection of data schemas. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * @type int $page_size - * The maximum number of data schemas to return. The service may return fewer - * than this value. If unspecified, at most 50 data schemas will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * A page token, received from a previous `ListDataSchemas` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListDataSchemas` must - * match the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of data schemas. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent, which owns this collection of data schemas. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * The maximum number of data schemas to return. The service may return fewer - * than this value. If unspecified, at most 50 data schemas will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of data schemas to return. The service may return fewer - * than this value. If unspecified, at most 50 data schemas will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListDataSchemas` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListDataSchemas` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListDataSchemas` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListDataSchemas` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDataSchemasResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDataSchemasResponse.php deleted file mode 100644 index 8a2e6e294fd4..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDataSchemasResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.visionai.v1.ListDataSchemasResponse - */ -class ListDataSchemasResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The data schemas from the specified corpus. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; - */ - private $data_schemas; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\DataSchema[] $data_schemas - * The data schemas from the specified corpus. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The data schemas from the specified corpus. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\DataSchema> - */ - public function getDataSchemas() - { - return $this->data_schemas; - } - - /** - * The data schemas from the specified corpus. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.DataSchema data_schemas = 1; - * @param \Google\Cloud\VisionAI\V1\DataSchema[] $var - * @return $this - */ - public function setDataSchemas($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\DataSchema::class); - $this->data_schemas = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDraftsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDraftsRequest.php deleted file mode 100644 index fe24d0820c1a..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDraftsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.visionai.v1.ListDraftsRequest - */ -class ListDraftsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListDraftsRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListDraftsRequest. Please see - * {@see AppPlatformClient::applicationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ListDraftsRequest - * - * @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. Parent value for ListDraftsRequest. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results. - * @type string $order_by - * Hint for how to order the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListDraftsRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for ListDraftsRequest. - * - * 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; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDraftsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDraftsResponse.php deleted file mode 100644 index e29257059ad9..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListDraftsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.visionai.v1.ListDraftsResponse - */ -class ListDraftsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Draft. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Draft drafts = 1; - */ - private $drafts; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Draft[] $drafts - * The list of Draft. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type string[] $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * The list of Draft. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Draft drafts = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Draft> - */ - public function getDrafts() - { - return $this->drafts; - } - - /** - * The list of Draft. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Draft drafts = 1; - * @param \Google\Cloud\VisionAI\V1\Draft[] $var - * @return $this - */ - public function setDrafts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Draft::class); - $this->drafts = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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 that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListEventsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListEventsRequest.php deleted file mode 100644 index 16feac57a49b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListEventsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.visionai.v1.ListEventsRequest - */ -class ListEventsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListEventsRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListEventsRequest. Please see - * {@see StreamsServiceClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ListEventsRequest - * - * @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. Parent value for ListEventsRequest. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results. - * @type string $order_by - * Hint for how to order the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListEventsRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for ListEventsRequest. - * - * 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; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListEventsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListEventsResponse.php deleted file mode 100644 index b765242f83e3..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListEventsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.visionai.v1.ListEventsResponse - */ -class ListEventsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Event. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Event events = 1; - */ - private $events; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Event[] $events - * The list of Event. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type string[] $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * The list of Event. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Event events = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Event> - */ - public function getEvents() - { - return $this->events; - } - - /** - * The list of Event. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Event events = 1; - * @param \Google\Cloud\VisionAI\V1\Event[] $var - * @return $this - */ - public function setEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Event::class); - $this->events = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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 that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexEndpointsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexEndpointsRequest.php deleted file mode 100644 index a909bd850fa8..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexEndpointsRequest.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.visionai.v1.ListIndexEndpointsRequest - */ -class ListIndexEndpointsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Format: `projects/{project}/locations/{location}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Requested page size. Server may return fewer items than - * requested. The service may return fewer than this value. If unspecified, a - * page size of 50 will be used. The maximum value is 1000; values above 1000 - * will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. The filter applied to the returned list. - * We only support filtering for the `deployed_image_index.image_index` field. - * However, to filter by a corpus instead of an image index, simply use - * `deployed_image_index.corpus`, which will return all endpoints with - * `deployed_image_index.image_index` inside of the given corpus. - * A basic filter on image index would look like: - * deployed_image_index.image_index = - * "projects/123/locations/us-central1/corpora/my_corpus/imageIndexes/my_image_index" - * A basic filter on corpus would look like: - * deployed_image_index.corpus = - * "projects/123/locations/us-central1/corpora/my_corpus" - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. Format: `projects/{project}/locations/{location}` - * Please see {@see WarehouseClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ListIndexEndpointsRequest - * - * @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. Format: `projects/{project}/locations/{location}` - * @type int $page_size - * Optional. Requested page size. Server may return fewer items than - * requested. The service may return fewer than this value. If unspecified, a - * page size of 50 will be used. The maximum value is 1000; values above 1000 - * will be coerced to 1000. - * @type string $page_token - * Optional. A token identifying a page of results the server should return. - * @type string $filter - * Optional. The filter applied to the returned list. - * We only support filtering for the `deployed_image_index.image_index` field. - * However, to filter by a corpus instead of an image index, simply use - * `deployed_image_index.corpus`, which will return all endpoints with - * `deployed_image_index.image_index` inside of the given corpus. - * A basic filter on image index would look like: - * deployed_image_index.image_index = - * "projects/123/locations/us-central1/corpora/my_corpus/imageIndexes/my_image_index" - * A basic filter on corpus would look like: - * deployed_image_index.corpus = - * "projects/123/locations/us-central1/corpora/my_corpus" - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. Format: `projects/{project}/locations/{location}` - * - * 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. Format: `projects/{project}/locations/{location}` - * - * 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; - } - - /** - * Optional. Requested page size. Server may return fewer items than - * requested. The service may return fewer than this value. If unspecified, a - * page size of 50 will be used. The maximum value is 1000; values above 1000 - * will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. Requested page size. Server may return fewer items than - * requested. The service may return fewer than this value. If unspecified, a - * page size of 50 will be used. The maximum value is 1000; values above 1000 - * will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The filter applied to the returned list. - * We only support filtering for the `deployed_image_index.image_index` field. - * However, to filter by a corpus instead of an image index, simply use - * `deployed_image_index.corpus`, which will return all endpoints with - * `deployed_image_index.image_index` inside of the given corpus. - * A basic filter on image index would look like: - * deployed_image_index.image_index = - * "projects/123/locations/us-central1/corpora/my_corpus/imageIndexes/my_image_index" - * A basic filter on corpus would look like: - * deployed_image_index.corpus = - * "projects/123/locations/us-central1/corpora/my_corpus" - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. The filter applied to the returned list. - * We only support filtering for the `deployed_image_index.image_index` field. - * However, to filter by a corpus instead of an image index, simply use - * `deployed_image_index.corpus`, which will return all endpoints with - * `deployed_image_index.image_index` inside of the given corpus. - * A basic filter on image index would look like: - * deployed_image_index.image_index = - * "projects/123/locations/us-central1/corpora/my_corpus/imageIndexes/my_image_index" - * A basic filter on corpus would look like: - * deployed_image_index.corpus = - * "projects/123/locations/us-central1/corpora/my_corpus" - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexEndpointsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexEndpointsResponse.php deleted file mode 100644 index 11781024e737..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexEndpointsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.visionai.v1.ListIndexEndpointsResponse - */ -class ListIndexEndpointsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of IndexEndpoints. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; - */ - private $index_endpoints; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\IndexEndpoint[] $index_endpoints - * The list of IndexEndpoints. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The list of IndexEndpoints. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\IndexEndpoint> - */ - public function getIndexEndpoints() - { - return $this->index_endpoints; - } - - /** - * The list of IndexEndpoints. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.IndexEndpoint index_endpoints = 1; - * @param \Google\Cloud\VisionAI\V1\IndexEndpoint[] $var - * @return $this - */ - public function setIndexEndpoints($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\IndexEndpoint::class); - $this->index_endpoints = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexesRequest.php deleted file mode 100644 index a1eb5291572e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexesRequest.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.visionai.v1.ListIndexesRequest - */ -class ListIndexesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent corpus that owns this collection of indexes. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of indexes to return. The service may return fewer than - * this value. - * If unspecified, at most 50 indexes will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListIndexes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListIndexes` must match - * the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent corpus that owns this collection of indexes. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * Please see {@see WarehouseClient::corpusName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ListIndexesRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent corpus that owns this collection of indexes. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * @type int $page_size - * The maximum number of indexes to return. The service may return fewer than - * this value. - * If unspecified, at most 50 indexes will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * A page token, received from a previous `ListIndexes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListIndexes` must match - * the call that provided the page token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent corpus that owns this collection of indexes. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent corpus that owns this collection of indexes. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * 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 indexes to return. The service may return fewer than - * this value. - * If unspecified, at most 50 indexes will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of indexes to return. The service may return fewer than - * this value. - * If unspecified, at most 50 indexes will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListIndexes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListIndexes` must match - * the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListIndexes` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListIndexes` must match - * the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexesResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexesResponse.php deleted file mode 100644 index 4aa1ca56da82..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListIndexesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.visionai.v1.ListIndexesResponse - */ -class ListIndexesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The indexes under the specified corpus. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Index indexes = 1; - */ - private $indexes; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Index[] $indexes - * The indexes under the specified corpus. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The indexes under the specified corpus. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Index indexes = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Index> - */ - public function getIndexes() - { - return $this->indexes; - } - - /** - * The indexes under the specified corpus. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Index indexes = 1; - * @param \Google\Cloud\VisionAI\V1\Index[] $var - * @return $this - */ - public function setIndexes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Index::class); - $this->indexes = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListInstancesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListInstancesRequest.php deleted file mode 100644 index 2533b684c231..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListInstancesRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.visionai.v1.ListInstancesRequest - */ -class ListInstancesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListInstancesRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListInstancesRequest. Please see - * {@see AppPlatformClient::applicationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\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. Parent value for ListInstancesRequest. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results. - * @type string $order_by - * Hint for how to order the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListInstancesRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for ListInstancesRequest. - * - * 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; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListInstancesResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListInstancesResponse.php deleted file mode 100644 index dfa7c80ac4af..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListInstancesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.visionai.v1.ListInstancesResponse - */ -class ListInstancesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Instance. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance instances = 1; - */ - private $instances; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Instance[] $instances - * The list of Instance. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type string[] $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * The list of Instance. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance instances = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Instance> - */ - public function getInstances() - { - return $this->instances; - } - - /** - * The list of Instance. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance instances = 1; - * @param \Google\Cloud\VisionAI\V1\Instance[] $var - * @return $this - */ - public function setInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Instance::class); - $this->instances = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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 that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListOperatorsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListOperatorsRequest.php deleted file mode 100644 index 8248975dc97a..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListOperatorsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.visionai.v1.ListOperatorsRequest - */ -class ListOperatorsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListOperatorsRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListOperatorsRequest. Please see - * {@see LiveVideoAnalyticsClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ListOperatorsRequest - * - * @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. Parent value for ListOperatorsRequest. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results. - * @type string $order_by - * Hint for how to order the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListOperatorsRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for ListOperatorsRequest. - * - * 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; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListOperatorsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListOperatorsResponse.php deleted file mode 100644 index 408959ce1d5d..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListOperatorsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.visionai.v1.ListOperatorsResponse - */ -class ListOperatorsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Operator - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Operator operators = 1; - */ - private $operators; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Operator[] $operators - * The list of Operator - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type string[] $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * The list of Operator - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Operator operators = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Operator> - */ - public function getOperators() - { - return $this->operators; - } - - /** - * The list of Operator - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Operator operators = 1; - * @param \Google\Cloud\VisionAI\V1\Operator[] $var - * @return $this - */ - public function setOperators($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Operator::class); - $this->operators = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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 that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPrebuiltProcessorsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPrebuiltProcessorsRequest.php deleted file mode 100644 index e281eb19f5dc..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPrebuiltProcessorsRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.visionai.v1.ListPrebuiltProcessorsRequest - */ -class ListPrebuiltProcessorsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent path. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - - /** - * @param string $parent Required. Parent path. Please see - * {@see AppPlatformClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ListPrebuiltProcessorsRequest - * - * @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. Parent path. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent path. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent path. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPrebuiltProcessorsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPrebuiltProcessorsResponse.php deleted file mode 100644 index ef472a2723af..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPrebuiltProcessorsResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.ListPrebuiltProcessorsResponse - */ -class ListPrebuiltProcessorsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Processor. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Processor processors = 1; - */ - private $processors; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Processor[] $processors - * The list of Processor. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * The list of Processor. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Processor processors = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Processor> - */ - public function getProcessors() - { - return $this->processors; - } - - /** - * The list of Processor. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Processor processors = 1; - * @param \Google\Cloud\VisionAI\V1\Processor[] $var - * @return $this - */ - public function setProcessors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Processor::class); - $this->processors = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessesRequest.php deleted file mode 100644 index 4d73c2503df2..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessesRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.visionai.v1.ListProcessesRequest - */ -class ListProcessesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListProcessesRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListProcessesRequest. Please see - * {@see LiveVideoAnalyticsClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ListProcessesRequest - * - * @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. Parent value for ListProcessesRequest. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results - * @type string $order_by - * Hint for how to order the results - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListProcessesRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for ListProcessesRequest. - * - * 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; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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; - } - - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Hint for how to order the results - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessesResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessesResponse.php deleted file mode 100644 index 087267126f94..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.visionai.v1.ListProcessesResponse - */ -class ListProcessesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Processes. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Process processes = 1; - */ - private $processes; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Process[] $processes - * The list of Processes. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type string[] $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * The list of Processes. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Process processes = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Process> - */ - public function getProcesses() - { - return $this->processes; - } - - /** - * The list of Processes. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Process processes = 1; - * @param \Google\Cloud\VisionAI\V1\Process[] $var - * @return $this - */ - public function setProcesses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Process::class); - $this->processes = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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 that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessorsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessorsRequest.php deleted file mode 100644 index f79099ec7918..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessorsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.visionai.v1.ListProcessorsRequest - */ -class ListProcessorsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListProcessorsRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListProcessorsRequest. Please see - * {@see AppPlatformClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ListProcessorsRequest - * - * @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. Parent value for ListProcessorsRequest. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results. - * @type string $order_by - * Hint for how to order the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListProcessorsRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for ListProcessorsRequest. - * - * 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; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessorsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessorsResponse.php deleted file mode 100644 index 04f01171026d..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListProcessorsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.visionai.v1.ListProcessorsResponse - */ -class ListProcessorsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Processor. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Processor processors = 1; - */ - private $processors; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Processor[] $processors - * The list of Processor. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type string[] $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * The list of Processor. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Processor processors = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Processor> - */ - public function getProcessors() - { - return $this->processors; - } - - /** - * The list of Processor. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Processor processors = 1; - * @param \Google\Cloud\VisionAI\V1\Processor[] $var - * @return $this - */ - public function setProcessors($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Processor::class); - $this->processors = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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 that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPublicOperatorsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPublicOperatorsRequest.php deleted file mode 100644 index fe575060e21c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPublicOperatorsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.visionai.v1.ListPublicOperatorsRequest - */ -class ListPublicOperatorsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListPublicOperatorsRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListPublicOperatorsRequest. Please see - * {@see LiveVideoAnalyticsClient::locationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ListPublicOperatorsRequest - * - * @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. Parent value for ListPublicOperatorsRequest. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results. - * @type string $order_by - * Hint for how to order the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListPublicOperatorsRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for ListPublicOperatorsRequest. - * - * 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; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPublicOperatorsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPublicOperatorsResponse.php deleted file mode 100644 index ee979ce3d4e1..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListPublicOperatorsResponse.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.visionai.v1.ListPublicOperatorsResponse - */ -class ListPublicOperatorsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Operator - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Operator operators = 1; - */ - private $operators; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Operator[] $operators - * The list of Operator - * @type string $next_page_token - * A token identifying a page of results the server should return. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * The list of Operator - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Operator operators = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Operator> - */ - public function getOperators() - { - return $this->operators; - } - - /** - * The list of Operator - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Operator operators = 1; - * @param \Google\Cloud\VisionAI\V1\Operator[] $var - * @return $this - */ - public function setOperators($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Operator::class); - $this->operators = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchConfigsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchConfigsRequest.php deleted file mode 100644 index e0f2e9031307..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchConfigsRequest.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.visionai.v1.ListSearchConfigsRequest - */ -class ListSearchConfigsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of search configurations. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of search configurations to return. The service may - * return fewer than this value. If unspecified, a page size of 50 will be - * used. The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ListSearchConfigs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListSearchConfigs` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of search configurations. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * Please see {@see WarehouseClient::corpusName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ListSearchConfigsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent, which owns this collection of search configurations. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * @type int $page_size - * The maximum number of search configurations to return. The service may - * return fewer than this value. If unspecified, a page size of 50 will be - * used. The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * A page token, received from a previous `ListSearchConfigs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListSearchConfigs` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of search configurations. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent, which owns this collection of search configurations. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * 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 search configurations to return. The service may - * return fewer than this value. If unspecified, a page size of 50 will be - * used. The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of search configurations to return. The service may - * return fewer than this value. If unspecified, a page size of 50 will be - * used. The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ListSearchConfigs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListSearchConfigs` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ListSearchConfigs` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ListSearchConfigs` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchConfigsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchConfigsResponse.php deleted file mode 100644 index a3376cfd13cc..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchConfigsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.visionai.v1.ListSearchConfigsResponse - */ -class ListSearchConfigsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The search configurations from the specified corpus. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; - */ - private $search_configs; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\SearchConfig[] $search_configs - * The search configurations from the specified corpus. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The search configurations from the specified corpus. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\SearchConfig> - */ - public function getSearchConfigs() - { - return $this->search_configs; - } - - /** - * The search configurations from the specified corpus. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchConfig search_configs = 1; - * @param \Google\Cloud\VisionAI\V1\SearchConfig[] $var - * @return $this - */ - public function setSearchConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\SearchConfig::class); - $this->search_configs = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchHypernymsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchHypernymsRequest.php deleted file mode 100644 index 6501a681a3df..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchHypernymsRequest.php +++ /dev/null @@ -1,183 +0,0 @@ -google.cloud.visionai.v1.ListSearchHypernymsRequest - */ -class ListSearchHypernymsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent, which owns this collection of SearchHypernyms. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of SearchHypernyms returned. The service may - * return fewer than this value. If unspecified, a page size of 50 will be - * used. The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `SearchHypernym` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `SearchHypernym` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The parent, which owns this collection of SearchHypernyms. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * Please see {@see WarehouseClient::corpusName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ListSearchHypernymsRequest - * - * @experimental - */ - public static function build(string $parent): self - { - return (new self()) - ->setParent($parent); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent, which owns this collection of SearchHypernyms. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * @type int $page_size - * The maximum number of SearchHypernyms returned. The service may - * return fewer than this value. If unspecified, a page size of 50 will be - * used. The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * A page token, received from a previous `SearchHypernym` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `SearchHypernym` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent, which owns this collection of SearchHypernyms. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. The parent, which owns this collection of SearchHypernyms. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}` - * - * 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 SearchHypernyms returned. The service may - * return fewer than this value. If unspecified, a page size of 50 will be - * used. The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of SearchHypernyms returned. The service may - * return fewer than this value. If unspecified, a page size of 50 will be - * used. The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `SearchHypernym` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `SearchHypernym` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `SearchHypernym` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `SearchHypernym` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchHypernymsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchHypernymsResponse.php deleted file mode 100644 index f3adb2d6225a..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSearchHypernymsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.visionai.v1.ListSearchHypernymsResponse - */ -class ListSearchHypernymsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The SearchHypernyms from the specified corpus. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; - */ - private $search_hypernyms; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\SearchHypernym[] $search_hypernyms - * The SearchHypernyms from the specified corpus. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The SearchHypernyms from the specified corpus. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\SearchHypernym> - */ - public function getSearchHypernyms() - { - return $this->search_hypernyms; - } - - /** - * The SearchHypernyms from the specified corpus. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchHypernym search_hypernyms = 1; - * @param \Google\Cloud\VisionAI\V1\SearchHypernym[] $var - * @return $this - */ - public function setSearchHypernyms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\SearchHypernym::class); - $this->search_hypernyms = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSeriesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSeriesRequest.php deleted file mode 100644 index 36ab4dca9a27..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSeriesRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.visionai.v1.ListSeriesRequest - */ -class ListSeriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListSeriesRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListSeriesRequest. Please see - * {@see StreamsServiceClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ListSeriesRequest - * - * @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. Parent value for ListSeriesRequest. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results. - * @type string $order_by - * Hint for how to order the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListSeriesRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for ListSeriesRequest. - * - * 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; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSeriesResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSeriesResponse.php deleted file mode 100644 index 0dd2c593fe6e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListSeriesResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.visionai.v1.ListSeriesResponse - */ -class ListSeriesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Series. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Series series = 1; - */ - private $series; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Series[] $series - * The list of Series. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type string[] $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * The list of Series. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Series series = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Series> - */ - public function getSeries() - { - return $this->series; - } - - /** - * The list of Series. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Series series = 1; - * @param \Google\Cloud\VisionAI\V1\Series[] $var - * @return $this - */ - public function setSeries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Series::class); - $this->series = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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 that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListStreamsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListStreamsRequest.php deleted file mode 100644 index ff5a69a8ae63..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListStreamsRequest.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.visionai.v1.ListStreamsRequest - */ -class ListStreamsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ListStreamsRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - - /** - * @param string $parent Required. Parent value for ListStreamsRequest. Please see - * {@see StreamsServiceClient::clusterName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ListStreamsRequest - * - * @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. Parent value for ListStreamsRequest. - * @type int $page_size - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * @type string $page_token - * A token identifying a page of results the server should return. - * @type string $filter - * Filtering results. - * @type string $order_by - * Hint for how to order the results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ListStreamsRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for ListStreamsRequest. - * - * 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; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. Server may return fewer items than requested. - * If unspecified, server will pick an appropriate default. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Filtering results. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Hint for how to order the results. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListStreamsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListStreamsResponse.php deleted file mode 100644 index 3a8d48527806..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ListStreamsResponse.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.visionai.v1.ListStreamsResponse - */ -class ListStreamsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of Stream. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Stream streams = 1; - */ - private $streams; - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - */ - private $unreachable; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Stream[] $streams - * The list of Stream. - * @type string $next_page_token - * A token identifying a page of results the server should return. - * @type string[] $unreachable - * Locations that could not be reached. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * The list of Stream. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Stream streams = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Stream> - */ - public function getStreams() - { - return $this->streams; - } - - /** - * The list of Stream. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Stream streams = 1; - * @param \Google\Cloud\VisionAI\V1\Stream[] $var - * @return $this - */ - public function setStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Stream::class); - $this->streams = $arr; - - return $this; - } - - /** - * A token identifying a page of results the server should return. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token identifying a page of results the server should return. - * - * 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 that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @return RepeatedField - */ - public function getUnreachable() - { - return $this->unreachable; - } - - /** - * Locations that could not be reached. - * - * Generated from protobuf field repeated string unreachable = 3; - * @param string[] $var - * @return $this - */ - public function setUnreachable($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->unreachable = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MachineSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MachineSpec.php deleted file mode 100644 index ee014a3886a1..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MachineSpec.php +++ /dev/null @@ -1,171 +0,0 @@ -google.cloud.visionai.v1.MachineSpec - */ -class MachineSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Immutable. The type of the machine. - * See the [list of machine types supported for - * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) - * See the [list of machine types supported for custom - * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). - * For [DeployedModel][] this field is optional, and the default - * value is `n1-standard-2`. For [BatchPredictionJob][] or as part of - * [WorkerPoolSpec][] this field is required. - * - * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $machine_type = ''; - /** - * Immutable. The type of accelerator(s) that may be attached to the machine - * as per - * [accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]. - * - * Generated from protobuf field .google.cloud.visionai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $accelerator_type = 0; - /** - * The number of accelerators to attach to the machine. - * - * Generated from protobuf field int32 accelerator_count = 3; - */ - protected $accelerator_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $machine_type - * Immutable. The type of the machine. - * See the [list of machine types supported for - * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) - * See the [list of machine types supported for custom - * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). - * For [DeployedModel][] this field is optional, and the default - * value is `n1-standard-2`. For [BatchPredictionJob][] or as part of - * [WorkerPoolSpec][] this field is required. - * @type int $accelerator_type - * Immutable. The type of accelerator(s) that may be attached to the machine - * as per - * [accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]. - * @type int $accelerator_count - * The number of accelerators to attach to the machine. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Immutable. The type of the machine. - * See the [list of machine types supported for - * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) - * See the [list of machine types supported for custom - * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). - * For [DeployedModel][] this field is optional, and the default - * value is `n1-standard-2`. For [BatchPredictionJob][] or as part of - * [WorkerPoolSpec][] this field is required. - * - * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getMachineType() - { - return $this->machine_type; - } - - /** - * Immutable. The type of the machine. - * See the [list of machine types supported for - * prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) - * See the [list of machine types supported for custom - * training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). - * For [DeployedModel][] this field is optional, and the default - * value is `n1-standard-2`. For [BatchPredictionJob][] or as part of - * [WorkerPoolSpec][] this field is required. - * - * Generated from protobuf field string machine_type = 1 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setMachineType($var) - { - GPBUtil::checkString($var, True); - $this->machine_type = $var; - - return $this; - } - - /** - * Immutable. The type of accelerator(s) that may be attached to the machine - * as per - * [accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]. - * - * Generated from protobuf field .google.cloud.visionai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getAcceleratorType() - { - return $this->accelerator_type; - } - - /** - * Immutable. The type of accelerator(s) that may be attached to the machine - * as per - * [accelerator_count][google.cloud.visionai.v1.MachineSpec.accelerator_count]. - * - * Generated from protobuf field .google.cloud.visionai.v1.AcceleratorType accelerator_type = 2 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setAcceleratorType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\AcceleratorType::class); - $this->accelerator_type = $var; - - return $this; - } - - /** - * The number of accelerators to attach to the machine. - * - * Generated from protobuf field int32 accelerator_count = 3; - * @return int - */ - public function getAcceleratorCount() - { - return $this->accelerator_count; - } - - /** - * The number of accelerators to attach to the machine. - * - * Generated from protobuf field int32 accelerator_count = 3; - * @param int $var - * @return $this - */ - public function setAcceleratorCount($var) - { - GPBUtil::checkInt32($var); - $this->accelerator_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MaterializeChannelRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MaterializeChannelRequest.php deleted file mode 100644 index eb7a5ee9abac..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MaterializeChannelRequest.php +++ /dev/null @@ -1,237 +0,0 @@ -google.cloud.visionai.v1.MaterializeChannelRequest - */ -class MaterializeChannelRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Value for parent. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Id of the channel. - * - * Generated from protobuf field string channel_id = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $channel_id = ''; - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $channel = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $parent Required. Value for parent. Please see - * {@see StreamsServiceClient::clusterName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\Channel $channel Required. The resource being created. - * @param string $channelId Required. Id of the channel. - * - * @return \Google\Cloud\VisionAI\V1\MaterializeChannelRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\VisionAI\V1\Channel $channel, string $channelId): self - { - return (new self()) - ->setParent($parent) - ->setChannel($channel) - ->setChannelId($channelId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Value for parent. - * @type string $channel_id - * Required. Id of the channel. - * @type \Google\Cloud\VisionAI\V1\Channel $channel - * Required. The resource being created. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Value for parent. - * - * 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. Value for parent. - * - * 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. Id of the channel. - * - * Generated from protobuf field string channel_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getChannelId() - { - return $this->channel_id; - } - - /** - * Required. Id of the channel. - * - * Generated from protobuf field string channel_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setChannelId($var) - { - GPBUtil::checkString($var, True); - $this->channel_id = $var; - - return $this; - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Channel|null - */ - public function getChannel() - { - return $this->channel; - } - - public function hasChannel() - { - return isset($this->channel); - } - - public function clearChannel() - { - unset($this->channel); - } - - /** - * Required. The resource being created. - * - * Generated from protobuf field .google.cloud.visionai.v1.Channel channel = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Channel $var - * @return $this - */ - public function setChannel($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Channel::class); - $this->channel = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MediaWarehouseConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MediaWarehouseConfig.php deleted file mode 100644 index 429f87d15704..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/MediaWarehouseConfig.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.visionai.v1.MediaWarehouseConfig - */ -class MediaWarehouseConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the Media Warehouse corpus. - * Format: - * projects/${project_id}/locations/${location_id}/corpora/${corpus_id} - * - * Generated from protobuf field string corpus = 1; - */ - protected $corpus = ''; - /** - * Deprecated. - * - * Generated from protobuf field string region = 2 [deprecated = true]; - * @deprecated - */ - protected $region = ''; - /** - * The duration for which all media assets, associated metadata, and search - * documents can exist. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 3; - */ - protected $ttl = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $corpus - * Resource name of the Media Warehouse corpus. - * Format: - * projects/${project_id}/locations/${location_id}/corpora/${corpus_id} - * @type string $region - * Deprecated. - * @type \Google\Protobuf\Duration $ttl - * The duration for which all media assets, associated metadata, and search - * documents can exist. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the Media Warehouse corpus. - * Format: - * projects/${project_id}/locations/${location_id}/corpora/${corpus_id} - * - * Generated from protobuf field string corpus = 1; - * @return string - */ - public function getCorpus() - { - return $this->corpus; - } - - /** - * Resource name of the Media Warehouse corpus. - * Format: - * projects/${project_id}/locations/${location_id}/corpora/${corpus_id} - * - * Generated from protobuf field string corpus = 1; - * @param string $var - * @return $this - */ - public function setCorpus($var) - { - GPBUtil::checkString($var, True); - $this->corpus = $var; - - return $this; - } - - /** - * Deprecated. - * - * Generated from protobuf field string region = 2 [deprecated = true]; - * @return string - * @deprecated - */ - public function getRegion() - { - if ($this->region !== '') { - @trigger_error('region is deprecated.', E_USER_DEPRECATED); - } - return $this->region; - } - - /** - * Deprecated. - * - * Generated from protobuf field string region = 2 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setRegion($var) - { - @trigger_error('region is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->region = $var; - - return $this; - } - - /** - * The duration for which all media assets, associated metadata, and search - * documents can exist. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 3; - * @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 duration for which all media assets, associated metadata, and search - * documents can exist. - * - * Generated from protobuf field .google.protobuf.Duration ttl = 3; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTtl($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->ttl = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ModelType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ModelType.php deleted file mode 100644 index 64157f6e7274..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ModelType.php +++ /dev/null @@ -1,124 +0,0 @@ -google.cloud.visionai.v1.ModelType - */ -class ModelType -{ - /** - * Processor Type UNSPECIFIED. - * - * Generated from protobuf enum MODEL_TYPE_UNSPECIFIED = 0; - */ - const MODEL_TYPE_UNSPECIFIED = 0; - /** - * Model Type Image Classification. - * - * Generated from protobuf enum IMAGE_CLASSIFICATION = 1; - */ - const IMAGE_CLASSIFICATION = 1; - /** - * Model Type Object Detection. - * - * Generated from protobuf enum OBJECT_DETECTION = 2; - */ - const OBJECT_DETECTION = 2; - /** - * Model Type Video Classification. - * - * Generated from protobuf enum VIDEO_CLASSIFICATION = 3; - */ - const VIDEO_CLASSIFICATION = 3; - /** - * Model Type Object Tracking. - * - * Generated from protobuf enum VIDEO_OBJECT_TRACKING = 4; - */ - const VIDEO_OBJECT_TRACKING = 4; - /** - * Model Type Action Recognition. - * - * Generated from protobuf enum VIDEO_ACTION_RECOGNITION = 5; - */ - const VIDEO_ACTION_RECOGNITION = 5; - /** - * Model Type Occupancy Counting. - * - * Generated from protobuf enum OCCUPANCY_COUNTING = 6; - */ - const OCCUPANCY_COUNTING = 6; - /** - * Model Type Person Blur. - * - * Generated from protobuf enum PERSON_BLUR = 7; - */ - const PERSON_BLUR = 7; - /** - * Model Type Vertex Custom. - * - * Generated from protobuf enum VERTEX_CUSTOM = 8; - */ - const VERTEX_CUSTOM = 8; - /** - * Model Type Product Recognizer. - * - * Generated from protobuf enum PRODUCT_RECOGNIZER = 9; - */ - const PRODUCT_RECOGNIZER = 9; - /** - * Model Type Tag Recognizer. - * - * Generated from protobuf enum TAG_RECOGNIZER = 10; - */ - const TAG_RECOGNIZER = 10; - /** - * Model Type SynthID. - * - * Generated from protobuf enum SYNTH_ID = 15; - */ - const SYNTH_ID = 15; - - private static $valueToName = [ - self::MODEL_TYPE_UNSPECIFIED => 'MODEL_TYPE_UNSPECIFIED', - self::IMAGE_CLASSIFICATION => 'IMAGE_CLASSIFICATION', - self::OBJECT_DETECTION => 'OBJECT_DETECTION', - self::VIDEO_CLASSIFICATION => 'VIDEO_CLASSIFICATION', - self::VIDEO_OBJECT_TRACKING => 'VIDEO_OBJECT_TRACKING', - self::VIDEO_ACTION_RECOGNITION => 'VIDEO_ACTION_RECOGNITION', - self::OCCUPANCY_COUNTING => 'OCCUPANCY_COUNTING', - self::PERSON_BLUR => 'PERSON_BLUR', - self::VERTEX_CUSTOM => 'VERTEX_CUSTOM', - self::PRODUCT_RECOGNIZER => 'PRODUCT_RECOGNIZER', - self::TAG_RECOGNIZER => 'TAG_RECOGNIZER', - self::SYNTH_ID => 'SYNTH_ID', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Node.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Node.php deleted file mode 100644 index aa404f8ac2bd..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Node.php +++ /dev/null @@ -1,305 +0,0 @@ -google.cloud.visionai.v1.Node - */ -class Node extends \Google\Protobuf\Internal\Message -{ - /** - * Required. A unique name for the node. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - /** - * A user friendly display name for the node. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Node config. - * - * Generated from protobuf field .google.cloud.visionai.v1.ProcessorConfig node_config = 3; - */ - protected $node_config = null; - /** - * Processor name refer to the chosen processor resource. - * - * Generated from protobuf field string processor = 4; - */ - protected $processor = ''; - /** - * Parent node. Input node should not have parent node. For V1 Alpha1/Beta - * only media warehouse node can have multiple parents, other types of nodes - * will only have one parent. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; - */ - private $parents; - protected $stream_output_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $output_all_output_channels_to_stream - * By default, the output of the node will only be available to downstream - * nodes. To consume the direct output from the application node, the output - * must be sent to Vision AI Streams at first. - * By setting output_all_output_channels_to_stream to true, App Platform - * will automatically send all the outputs of the current node to Vision AI - * Stream resources (one stream per output channel). The output stream - * resource will be created by App Platform automatically during deployment - * and deleted after application un-deployment. - * Note that this config applies to all the Application Instances. - * The output stream can be override at instance level by - * configuring the `output_resources` section of Instance resource. - * `producer_node` should be current node, `output_resource_binding` should - * be the output channel name (or leave it blank if there is only 1 output - * channel of the processor) and `output_resource` should be the target - * output stream. - * @type string $name - * Required. A unique name for the node. - * @type string $display_name - * A user friendly display name for the node. - * @type \Google\Cloud\VisionAI\V1\ProcessorConfig $node_config - * Node config. - * @type string $processor - * Processor name refer to the chosen processor resource. - * @type \Google\Cloud\VisionAI\V1\Node\InputEdge[] $parents - * Parent node. Input node should not have parent node. For V1 Alpha1/Beta - * only media warehouse node can have multiple parents, other types of nodes - * will only have one parent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * By default, the output of the node will only be available to downstream - * nodes. To consume the direct output from the application node, the output - * must be sent to Vision AI Streams at first. - * By setting output_all_output_channels_to_stream to true, App Platform - * will automatically send all the outputs of the current node to Vision AI - * Stream resources (one stream per output channel). The output stream - * resource will be created by App Platform automatically during deployment - * and deleted after application un-deployment. - * Note that this config applies to all the Application Instances. - * The output stream can be override at instance level by - * configuring the `output_resources` section of Instance resource. - * `producer_node` should be current node, `output_resource_binding` should - * be the output channel name (or leave it blank if there is only 1 output - * channel of the processor) and `output_resource` should be the target - * output stream. - * - * Generated from protobuf field bool output_all_output_channels_to_stream = 6; - * @return bool - */ - public function getOutputAllOutputChannelsToStream() - { - return $this->readOneof(6); - } - - public function hasOutputAllOutputChannelsToStream() - { - return $this->hasOneof(6); - } - - /** - * By default, the output of the node will only be available to downstream - * nodes. To consume the direct output from the application node, the output - * must be sent to Vision AI Streams at first. - * By setting output_all_output_channels_to_stream to true, App Platform - * will automatically send all the outputs of the current node to Vision AI - * Stream resources (one stream per output channel). The output stream - * resource will be created by App Platform automatically during deployment - * and deleted after application un-deployment. - * Note that this config applies to all the Application Instances. - * The output stream can be override at instance level by - * configuring the `output_resources` section of Instance resource. - * `producer_node` should be current node, `output_resource_binding` should - * be the output channel name (or leave it blank if there is only 1 output - * channel of the processor) and `output_resource` should be the target - * output stream. - * - * Generated from protobuf field bool output_all_output_channels_to_stream = 6; - * @param bool $var - * @return $this - */ - public function setOutputAllOutputChannelsToStream($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Required. A unique name for the node. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. A unique name for the node. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * A user friendly display name for the node. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * A user friendly display name for the node. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Node config. - * - * Generated from protobuf field .google.cloud.visionai.v1.ProcessorConfig node_config = 3; - * @return \Google\Cloud\VisionAI\V1\ProcessorConfig|null - */ - public function getNodeConfig() - { - return $this->node_config; - } - - public function hasNodeConfig() - { - return isset($this->node_config); - } - - public function clearNodeConfig() - { - unset($this->node_config); - } - - /** - * Node config. - * - * Generated from protobuf field .google.cloud.visionai.v1.ProcessorConfig node_config = 3; - * @param \Google\Cloud\VisionAI\V1\ProcessorConfig $var - * @return $this - */ - public function setNodeConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ProcessorConfig::class); - $this->node_config = $var; - - return $this; - } - - /** - * Processor name refer to the chosen processor resource. - * - * Generated from protobuf field string processor = 4; - * @return string - */ - public function getProcessor() - { - return $this->processor; - } - - /** - * Processor name refer to the chosen processor resource. - * - * Generated from protobuf field string processor = 4; - * @param string $var - * @return $this - */ - public function setProcessor($var) - { - GPBUtil::checkString($var, True); - $this->processor = $var; - - return $this; - } - - /** - * Parent node. Input node should not have parent node. For V1 Alpha1/Beta - * only media warehouse node can have multiple parents, other types of nodes - * will only have one parent. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Node\InputEdge> - */ - public function getParents() - { - return $this->parents; - } - - /** - * Parent node. Input node should not have parent node. For V1 Alpha1/Beta - * only media warehouse node can have multiple parents, other types of nodes - * will only have one parent. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Node.InputEdge parents = 5; - * @param \Google\Cloud\VisionAI\V1\Node\InputEdge[] $var - * @return $this - */ - public function setParents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Node\InputEdge::class); - $this->parents = $arr; - - return $this; - } - - /** - * @return string - */ - public function getStreamOutputConfig() - { - return $this->whichOneof("stream_output_config"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Node/InputEdge.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Node/InputEdge.php deleted file mode 100644 index 358ef861dcde..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Node/InputEdge.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.visionai.v1.Node.InputEdge - */ -class InputEdge extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the parent node. - * - * Generated from protobuf field string parent_node = 1; - */ - protected $parent_node = ''; - /** - * The connected output artifact of the parent node. - * It can be omitted if target processor only has 1 output artifact. - * - * Generated from protobuf field string parent_output_channel = 2; - */ - protected $parent_output_channel = ''; - /** - * The connected input channel of the current node's processor. - * It can be omitted if target processor only has 1 input channel. - * - * Generated from protobuf field string connected_input_channel = 3; - */ - protected $connected_input_channel = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent_node - * The name of the parent node. - * @type string $parent_output_channel - * The connected output artifact of the parent node. - * It can be omitted if target processor only has 1 output artifact. - * @type string $connected_input_channel - * The connected input channel of the current node's processor. - * It can be omitted if target processor only has 1 input channel. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * The name of the parent node. - * - * Generated from protobuf field string parent_node = 1; - * @return string - */ - public function getParentNode() - { - return $this->parent_node; - } - - /** - * The name of the parent node. - * - * Generated from protobuf field string parent_node = 1; - * @param string $var - * @return $this - */ - public function setParentNode($var) - { - GPBUtil::checkString($var, True); - $this->parent_node = $var; - - return $this; - } - - /** - * The connected output artifact of the parent node. - * It can be omitted if target processor only has 1 output artifact. - * - * Generated from protobuf field string parent_output_channel = 2; - * @return string - */ - public function getParentOutputChannel() - { - return $this->parent_output_channel; - } - - /** - * The connected output artifact of the parent node. - * It can be omitted if target processor only has 1 output artifact. - * - * Generated from protobuf field string parent_output_channel = 2; - * @param string $var - * @return $this - */ - public function setParentOutputChannel($var) - { - GPBUtil::checkString($var, True); - $this->parent_output_channel = $var; - - return $this; - } - - /** - * The connected input channel of the current node's processor. - * It can be omitted if target processor only has 1 input channel. - * - * Generated from protobuf field string connected_input_channel = 3; - * @return string - */ - public function getConnectedInputChannel() - { - return $this->connected_input_channel; - } - - /** - * The connected input channel of the current node's processor. - * It can be omitted if target processor only has 1 input channel. - * - * Generated from protobuf field string connected_input_channel = 3; - * @param string $var - * @return $this - */ - public function setConnectedInputChannel($var) - { - GPBUtil::checkString($var, True); - $this->connected_input_channel = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedPolygon.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedPolygon.php deleted file mode 100644 index da5b4df197be..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedPolygon.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.visionai.v1.NormalizedPolygon - */ -class NormalizedPolygon extends \Google\Protobuf\Internal\Message -{ - /** - * The bounding polygon normalized vertices. Top left corner of the image - * will be [0, 0]. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; - */ - private $normalized_vertices; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\NormalizedVertex[] $normalized_vertices - * The bounding polygon normalized vertices. Top left corner of the image - * will be [0, 0]. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * The bounding polygon normalized vertices. Top left corner of the image - * will be [0, 0]. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\NormalizedVertex> - */ - public function getNormalizedVertices() - { - return $this->normalized_vertices; - } - - /** - * The bounding polygon normalized vertices. Top left corner of the image - * will be [0, 0]. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; - * @param \Google\Cloud\VisionAI\V1\NormalizedVertex[] $var - * @return $this - */ - public function setNormalizedVertices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\NormalizedVertex::class); - $this->normalized_vertices = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedPolyline.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedPolyline.php deleted file mode 100644 index 16c09077f807..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedPolyline.php +++ /dev/null @@ -1,68 +0,0 @@ -google.cloud.visionai.v1.NormalizedPolyline - */ -class NormalizedPolyline extends \Google\Protobuf\Internal\Message -{ - /** - * A sequence of vertices connected by straight lines. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; - */ - private $normalized_vertices; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\NormalizedVertex[] $normalized_vertices - * A sequence of vertices connected by straight lines. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * A sequence of vertices connected by straight lines. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\NormalizedVertex> - */ - public function getNormalizedVertices() - { - return $this->normalized_vertices; - } - - /** - * A sequence of vertices connected by straight lines. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.NormalizedVertex normalized_vertices = 1; - * @param \Google\Cloud\VisionAI\V1\NormalizedVertex[] $var - * @return $this - */ - public function setNormalizedVertices($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\NormalizedVertex::class); - $this->normalized_vertices = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedVertex.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedVertex.php deleted file mode 100644 index 570bede03536..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/NormalizedVertex.php +++ /dev/null @@ -1,103 +0,0 @@ -google.cloud.visionai.v1.NormalizedVertex - */ -class NormalizedVertex extends \Google\Protobuf\Internal\Message -{ - /** - * X coordinate. - * - * Generated from protobuf field float x = 1; - */ - protected $x = 0.0; - /** - * Y coordinate. - * - * Generated from protobuf field float y = 2; - */ - protected $y = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $x - * X coordinate. - * @type float $y - * Y coordinate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * X coordinate. - * - * Generated from protobuf field float x = 1; - * @return float - */ - public function getX() - { - return $this->x; - } - - /** - * X coordinate. - * - * Generated from protobuf field float x = 1; - * @param float $var - * @return $this - */ - public function setX($var) - { - GPBUtil::checkFloat($var); - $this->x = $var; - - return $this; - } - - /** - * Y coordinate. - * - * Generated from protobuf field float y = 2; - * @return float - */ - public function getY() - { - return $this->y; - } - - /** - * Y coordinate. - * - * Generated from protobuf field float y = 2; - * @param float $var - * @return $this - */ - public function setY($var) - { - GPBUtil::checkFloat($var); - $this->y = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult.php deleted file mode 100644 index f7ef0f797244..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.visionai.v1.ObjectDetectionPredictionResult - */ -class ObjectDetectionPredictionResult extends \Google\Protobuf\Internal\Message -{ - /** - * Current timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp current_time = 1; - */ - protected $current_time = null; - /** - * A list of identified boxes. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; - */ - private $identified_boxes; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $current_time - * Current timestamp. - * @type \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\IdentifiedBox[] $identified_boxes - * A list of identified boxes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * Current timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp current_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCurrentTime() - { - return $this->current_time; - } - - public function hasCurrentTime() - { - return isset($this->current_time); - } - - public function clearCurrentTime() - { - unset($this->current_time); - } - - /** - * Current timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp current_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCurrentTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->current_time = $var; - - return $this; - } - - /** - * A list of identified boxes. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\IdentifiedBox> - */ - public function getIdentifiedBoxes() - { - return $this->identified_boxes; - } - - /** - * A list of identified boxes. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox identified_boxes = 2; - * @param \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\IdentifiedBox[] $var - * @return $this - */ - public function setIdentifiedBoxes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\IdentifiedBox::class); - $this->identified_boxes = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/Entity.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/Entity.php deleted file mode 100644 index a7ae797f24c4..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/Entity.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity - */ -class Entity extends \Google\Protobuf\Internal\Message -{ - /** - * Label id. - * - * Generated from protobuf field int64 label_id = 1; - */ - protected $label_id = 0; - /** - * Human readable string of the label. - * - * Generated from protobuf field string label_string = 2; - */ - protected $label_string = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $label_id - * Label id. - * @type string $label_string - * Human readable string of the label. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * Label id. - * - * Generated from protobuf field int64 label_id = 1; - * @return int|string - */ - public function getLabelId() - { - return $this->label_id; - } - - /** - * Label id. - * - * Generated from protobuf field int64 label_id = 1; - * @param int|string $var - * @return $this - */ - public function setLabelId($var) - { - GPBUtil::checkInt64($var); - $this->label_id = $var; - - return $this; - } - - /** - * Human readable string of the label. - * - * Generated from protobuf field string label_string = 2; - * @return string - */ - public function getLabelString() - { - return $this->label_string; - } - - /** - * Human readable string of the label. - * - * Generated from protobuf field string label_string = 2; - * @param string $var - * @return $this - */ - public function setLabelString($var) - { - GPBUtil::checkString($var, True); - $this->label_string = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/IdentifiedBox.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/IdentifiedBox.php deleted file mode 100644 index 8379574a25f9..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/IdentifiedBox.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox - */ -class IdentifiedBox extends \Google\Protobuf\Internal\Message -{ - /** - * An unique id for this box. - * - * Generated from protobuf field int64 box_id = 1; - */ - protected $box_id = 0; - /** - * Bounding Box in the normalized coordinates. - * - * Generated from protobuf field .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; - */ - protected $normalized_bounding_box = null; - /** - * Confidence score associated with this box. - * - * Generated from protobuf field float confidence_score = 3; - */ - protected $confidence_score = 0.0; - /** - * Entity of this box. - * - * Generated from protobuf field .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; - */ - protected $entity = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $box_id - * An unique id for this box. - * @type \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\IdentifiedBox\NormalizedBoundingBox $normalized_bounding_box - * Bounding Box in the normalized coordinates. - * @type float $confidence_score - * Confidence score associated with this box. - * @type \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\Entity $entity - * Entity of this box. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * An unique id for this box. - * - * Generated from protobuf field int64 box_id = 1; - * @return int|string - */ - public function getBoxId() - { - return $this->box_id; - } - - /** - * An unique id for this box. - * - * Generated from protobuf field int64 box_id = 1; - * @param int|string $var - * @return $this - */ - public function setBoxId($var) - { - GPBUtil::checkInt64($var); - $this->box_id = $var; - - return $this; - } - - /** - * Bounding Box in the normalized coordinates. - * - * Generated from protobuf field .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; - * @return \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\IdentifiedBox\NormalizedBoundingBox|null - */ - public function getNormalizedBoundingBox() - { - return $this->normalized_bounding_box; - } - - public function hasNormalizedBoundingBox() - { - return isset($this->normalized_bounding_box); - } - - public function clearNormalizedBoundingBox() - { - unset($this->normalized_bounding_box); - } - - /** - * Bounding Box in the normalized coordinates. - * - * Generated from protobuf field .google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; - * @param \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\IdentifiedBox\NormalizedBoundingBox $var - * @return $this - */ - public function setNormalizedBoundingBox($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\IdentifiedBox\NormalizedBoundingBox::class); - $this->normalized_bounding_box = $var; - - return $this; - } - - /** - * Confidence score associated with this box. - * - * Generated from protobuf field float confidence_score = 3; - * @return float - */ - public function getConfidenceScore() - { - return $this->confidence_score; - } - - /** - * Confidence score associated with this box. - * - * Generated from protobuf field float confidence_score = 3; - * @param float $var - * @return $this - */ - public function setConfidenceScore($var) - { - GPBUtil::checkFloat($var); - $this->confidence_score = $var; - - return $this; - } - - /** - * Entity of this box. - * - * Generated from protobuf field .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; - * @return \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\Entity|null - */ - public function getEntity() - { - return $this->entity; - } - - public function hasEntity() - { - return isset($this->entity); - } - - public function clearEntity() - { - unset($this->entity); - } - - /** - * Entity of this box. - * - * Generated from protobuf field .google.cloud.visionai.v1.ObjectDetectionPredictionResult.Entity entity = 4; - * @param \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\Entity $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ObjectDetectionPredictionResult\Entity::class); - $this->entity = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/IdentifiedBox/NormalizedBoundingBox.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/IdentifiedBox/NormalizedBoundingBox.php deleted file mode 100644 index 29ee067c3105..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ObjectDetectionPredictionResult/IdentifiedBox/NormalizedBoundingBox.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.visionai.v1.ObjectDetectionPredictionResult.IdentifiedBox.NormalizedBoundingBox - */ -class NormalizedBoundingBox extends \Google\Protobuf\Internal\Message -{ - /** - * Min in x coordinate. - * - * Generated from protobuf field float xmin = 1; - */ - protected $xmin = 0.0; - /** - * Min in y coordinate. - * - * Generated from protobuf field float ymin = 2; - */ - protected $ymin = 0.0; - /** - * Width of the bounding box. - * - * Generated from protobuf field float width = 3; - */ - protected $width = 0.0; - /** - * Height of the bounding box. - * - * Generated from protobuf field float height = 4; - */ - protected $height = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $xmin - * Min in x coordinate. - * @type float $ymin - * Min in y coordinate. - * @type float $width - * Width of the bounding box. - * @type float $height - * Height of the bounding box. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * Min in x coordinate. - * - * Generated from protobuf field float xmin = 1; - * @return float - */ - public function getXmin() - { - return $this->xmin; - } - - /** - * Min in x coordinate. - * - * Generated from protobuf field float xmin = 1; - * @param float $var - * @return $this - */ - public function setXmin($var) - { - GPBUtil::checkFloat($var); - $this->xmin = $var; - - return $this; - } - - /** - * Min in y coordinate. - * - * Generated from protobuf field float ymin = 2; - * @return float - */ - public function getYmin() - { - return $this->ymin; - } - - /** - * Min in y coordinate. - * - * Generated from protobuf field float ymin = 2; - * @param float $var - * @return $this - */ - public function setYmin($var) - { - GPBUtil::checkFloat($var); - $this->ymin = $var; - - return $this; - } - - /** - * Width of the bounding box. - * - * Generated from protobuf field float width = 3; - * @return float - */ - public function getWidth() - { - return $this->width; - } - - /** - * Width of the bounding box. - * - * Generated from protobuf field float width = 3; - * @param float $var - * @return $this - */ - public function setWidth($var) - { - GPBUtil::checkFloat($var); - $this->width = $var; - - return $this; - } - - /** - * Height of the bounding box. - * - * Generated from protobuf field float height = 4; - * @return float - */ - public function getHeight() - { - return $this->height; - } - - /** - * Height of the bounding box. - * - * Generated from protobuf field float height = 4; - * @param float $var - * @return $this - */ - public function setHeight($var) - { - GPBUtil::checkFloat($var); - $this->height = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountConfig.php deleted file mode 100644 index 296fb4a9548d..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountConfig.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.visionai.v1.OccupancyCountConfig - */ -class OccupancyCountConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Whether to count the appearances of people, output counts have 'people' as - * the key. - * - * Generated from protobuf field bool enable_people_counting = 1; - */ - protected $enable_people_counting = false; - /** - * Whether to count the appearances of vehicles, output counts will have - * 'vehicle' as the key. - * - * Generated from protobuf field bool enable_vehicle_counting = 2; - */ - protected $enable_vehicle_counting = false; - /** - * Whether to track each invidual object's loitering time inside the scene or - * specific zone. - * - * Generated from protobuf field bool enable_dwelling_time_tracking = 3; - */ - protected $enable_dwelling_time_tracking = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_people_counting - * Whether to count the appearances of people, output counts have 'people' as - * the key. - * @type bool $enable_vehicle_counting - * Whether to count the appearances of vehicles, output counts will have - * 'vehicle' as the key. - * @type bool $enable_dwelling_time_tracking - * Whether to track each invidual object's loitering time inside the scene or - * specific zone. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Whether to count the appearances of people, output counts have 'people' as - * the key. - * - * Generated from protobuf field bool enable_people_counting = 1; - * @return bool - */ - public function getEnablePeopleCounting() - { - return $this->enable_people_counting; - } - - /** - * Whether to count the appearances of people, output counts have 'people' as - * the key. - * - * Generated from protobuf field bool enable_people_counting = 1; - * @param bool $var - * @return $this - */ - public function setEnablePeopleCounting($var) - { - GPBUtil::checkBool($var); - $this->enable_people_counting = $var; - - return $this; - } - - /** - * Whether to count the appearances of vehicles, output counts will have - * 'vehicle' as the key. - * - * Generated from protobuf field bool enable_vehicle_counting = 2; - * @return bool - */ - public function getEnableVehicleCounting() - { - return $this->enable_vehicle_counting; - } - - /** - * Whether to count the appearances of vehicles, output counts will have - * 'vehicle' as the key. - * - * Generated from protobuf field bool enable_vehicle_counting = 2; - * @param bool $var - * @return $this - */ - public function setEnableVehicleCounting($var) - { - GPBUtil::checkBool($var); - $this->enable_vehicle_counting = $var; - - return $this; - } - - /** - * Whether to track each invidual object's loitering time inside the scene or - * specific zone. - * - * Generated from protobuf field bool enable_dwelling_time_tracking = 3; - * @return bool - */ - public function getEnableDwellingTimeTracking() - { - return $this->enable_dwelling_time_tracking; - } - - /** - * Whether to track each invidual object's loitering time inside the scene or - * specific zone. - * - * Generated from protobuf field bool enable_dwelling_time_tracking = 3; - * @param bool $var - * @return $this - */ - public function setEnableDwellingTimeTracking($var) - { - GPBUtil::checkBool($var); - $this->enable_dwelling_time_tracking = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult.php deleted file mode 100644 index cd5ce7a6cf95..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult.php +++ /dev/null @@ -1,275 +0,0 @@ -google.cloud.visionai.v1.OccupancyCountingPredictionResult - */ -class OccupancyCountingPredictionResult extends \Google\Protobuf\Internal\Message -{ - /** - * Current timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp current_time = 1; - */ - protected $current_time = null; - /** - * A list of identified boxes. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; - */ - private $identified_boxes; - /** - * Detection statistics. - * - * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; - */ - protected $stats = null; - /** - * Track related information. All the tracks that are live at this timestamp. - * It only exists if tracking is enabled. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; - */ - private $track_info; - /** - * Dwell time related information. All the tracks that are live in a given - * zone with a start and end dwell time timestamp - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; - */ - private $dwell_time_info; - /** - * The presentation timestamp of the frame. - * - * Generated from protobuf field optional int64 pts = 6; - */ - protected $pts = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $current_time - * Current timestamp. - * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\IdentifiedBox[] $identified_boxes - * A list of identified boxes. - * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats $stats - * Detection statistics. - * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\TrackInfo[] $track_info - * Track related information. All the tracks that are live at this timestamp. - * It only exists if tracking is enabled. - * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\DwellTimeInfo[] $dwell_time_info - * Dwell time related information. All the tracks that are live in a given - * zone with a start and end dwell time timestamp - * @type int|string $pts - * The presentation timestamp of the frame. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * Current timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp current_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCurrentTime() - { - return $this->current_time; - } - - public function hasCurrentTime() - { - return isset($this->current_time); - } - - public function clearCurrentTime() - { - unset($this->current_time); - } - - /** - * Current timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp current_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCurrentTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->current_time = $var; - - return $this; - } - - /** - * A list of identified boxes. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\IdentifiedBox> - */ - public function getIdentifiedBoxes() - { - return $this->identified_boxes; - } - - /** - * A list of identified boxes. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox identified_boxes = 2; - * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\IdentifiedBox[] $var - * @return $this - */ - public function setIdentifiedBoxes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\IdentifiedBox::class); - $this->identified_boxes = $arr; - - return $this; - } - - /** - * Detection statistics. - * - * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; - * @return \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats|null - */ - public function getStats() - { - return $this->stats; - } - - public function hasStats() - { - return isset($this->stats); - } - - public function clearStats() - { - unset($this->stats); - } - - /** - * Detection statistics. - * - * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats stats = 3; - * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats $var - * @return $this - */ - public function setStats($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats::class); - $this->stats = $var; - - return $this; - } - - /** - * Track related information. All the tracks that are live at this timestamp. - * It only exists if tracking is enabled. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\TrackInfo> - */ - public function getTrackInfo() - { - return $this->track_info; - } - - /** - * Track related information. All the tracks that are live at this timestamp. - * It only exists if tracking is enabled. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo track_info = 4; - * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\TrackInfo[] $var - * @return $this - */ - public function setTrackInfo($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\TrackInfo::class); - $this->track_info = $arr; - - return $this; - } - - /** - * Dwell time related information. All the tracks that are live in a given - * zone with a start and end dwell time timestamp - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\DwellTimeInfo> - */ - public function getDwellTimeInfo() - { - return $this->dwell_time_info; - } - - /** - * Dwell time related information. All the tracks that are live in a given - * zone with a start and end dwell time timestamp - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo dwell_time_info = 5; - * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\DwellTimeInfo[] $var - * @return $this - */ - public function setDwellTimeInfo($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\DwellTimeInfo::class); - $this->dwell_time_info = $arr; - - return $this; - } - - /** - * The presentation timestamp of the frame. - * - * Generated from protobuf field optional int64 pts = 6; - * @return int|string - */ - public function getPts() - { - return isset($this->pts) ? $this->pts : 0; - } - - public function hasPts() - { - return isset($this->pts); - } - - public function clearPts() - { - unset($this->pts); - } - - /** - * The presentation timestamp of the frame. - * - * Generated from protobuf field optional int64 pts = 6; - * @param int|string $var - * @return $this - */ - public function setPts($var) - { - GPBUtil::checkInt64($var); - $this->pts = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/DwellTimeInfo.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/DwellTimeInfo.php deleted file mode 100644 index be94ecca45e0..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/DwellTimeInfo.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.visionai.v1.OccupancyCountingPredictionResult.DwellTimeInfo - */ -class DwellTimeInfo extends \Google\Protobuf\Internal\Message -{ - /** - * An unique id to identify a track. It should be consistent across frames. - * - * Generated from protobuf field string track_id = 1; - */ - protected $track_id = ''; - /** - * The unique id for the zone in which the object is dwelling/waiting. - * - * Generated from protobuf field string zone_id = 2; - */ - protected $zone_id = ''; - /** - * The beginning time when a dwelling object has been identified in a zone. - * - * Generated from protobuf field .google.protobuf.Timestamp dwell_start_time = 3; - */ - protected $dwell_start_time = null; - /** - * The end time when a dwelling object has exited in a zone. - * - * Generated from protobuf field .google.protobuf.Timestamp dwell_end_time = 4; - */ - protected $dwell_end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $track_id - * An unique id to identify a track. It should be consistent across frames. - * @type string $zone_id - * The unique id for the zone in which the object is dwelling/waiting. - * @type \Google\Protobuf\Timestamp $dwell_start_time - * The beginning time when a dwelling object has been identified in a zone. - * @type \Google\Protobuf\Timestamp $dwell_end_time - * The end time when a dwelling object has exited in a zone. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * An unique id to identify a track. It should be consistent across frames. - * - * Generated from protobuf field string track_id = 1; - * @return string - */ - public function getTrackId() - { - return $this->track_id; - } - - /** - * An unique id to identify a track. It should be consistent across frames. - * - * Generated from protobuf field string track_id = 1; - * @param string $var - * @return $this - */ - public function setTrackId($var) - { - GPBUtil::checkString($var, True); - $this->track_id = $var; - - return $this; - } - - /** - * The unique id for the zone in which the object is dwelling/waiting. - * - * Generated from protobuf field string zone_id = 2; - * @return string - */ - public function getZoneId() - { - return $this->zone_id; - } - - /** - * The unique id for the zone in which the object is dwelling/waiting. - * - * Generated from protobuf field string zone_id = 2; - * @param string $var - * @return $this - */ - public function setZoneId($var) - { - GPBUtil::checkString($var, True); - $this->zone_id = $var; - - return $this; - } - - /** - * The beginning time when a dwelling object has been identified in a zone. - * - * Generated from protobuf field .google.protobuf.Timestamp dwell_start_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDwellStartTime() - { - return $this->dwell_start_time; - } - - public function hasDwellStartTime() - { - return isset($this->dwell_start_time); - } - - public function clearDwellStartTime() - { - unset($this->dwell_start_time); - } - - /** - * The beginning time when a dwelling object has been identified in a zone. - * - * Generated from protobuf field .google.protobuf.Timestamp dwell_start_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDwellStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->dwell_start_time = $var; - - return $this; - } - - /** - * The end time when a dwelling object has exited in a zone. - * - * Generated from protobuf field .google.protobuf.Timestamp dwell_end_time = 4; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDwellEndTime() - { - return $this->dwell_end_time; - } - - public function hasDwellEndTime() - { - return isset($this->dwell_end_time); - } - - public function clearDwellEndTime() - { - unset($this->dwell_end_time); - } - - /** - * The end time when a dwelling object has exited in a zone. - * - * Generated from protobuf field .google.protobuf.Timestamp dwell_end_time = 4; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDwellEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->dwell_end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Entity.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Entity.php deleted file mode 100644 index c60f5782ee8c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Entity.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity - */ -class Entity extends \Google\Protobuf\Internal\Message -{ - /** - * Label id. - * - * Generated from protobuf field int64 label_id = 1; - */ - protected $label_id = 0; - /** - * Human readable string of the label. - * - * Generated from protobuf field string label_string = 2; - */ - protected $label_string = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $label_id - * Label id. - * @type string $label_string - * Human readable string of the label. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * Label id. - * - * Generated from protobuf field int64 label_id = 1; - * @return int|string - */ - public function getLabelId() - { - return $this->label_id; - } - - /** - * Label id. - * - * Generated from protobuf field int64 label_id = 1; - * @param int|string $var - * @return $this - */ - public function setLabelId($var) - { - GPBUtil::checkInt64($var); - $this->label_id = $var; - - return $this; - } - - /** - * Human readable string of the label. - * - * Generated from protobuf field string label_string = 2; - * @return string - */ - public function getLabelString() - { - return $this->label_string; - } - - /** - * Human readable string of the label. - * - * Generated from protobuf field string label_string = 2; - * @param string $var - * @return $this - */ - public function setLabelString($var) - { - GPBUtil::checkString($var, True); - $this->label_string = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/IdentifiedBox.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/IdentifiedBox.php deleted file mode 100644 index 98bb80e6de9c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/IdentifiedBox.php +++ /dev/null @@ -1,227 +0,0 @@ -google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox - */ -class IdentifiedBox extends \Google\Protobuf\Internal\Message -{ - /** - * An unique id for this box. - * - * Generated from protobuf field int64 box_id = 1; - */ - protected $box_id = 0; - /** - * Bounding Box in the normalized coordinates. - * - * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; - */ - protected $normalized_bounding_box = null; - /** - * Confidence score associated with this box. - * - * Generated from protobuf field float score = 3; - */ - protected $score = 0.0; - /** - * Entity of this box. - * - * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; - */ - protected $entity = null; - /** - * An unique id to identify a track. It should be consistent across frames. - * It only exists if tracking is enabled. - * - * Generated from protobuf field int64 track_id = 5; - */ - protected $track_id = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $box_id - * An unique id for this box. - * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\IdentifiedBox\NormalizedBoundingBox $normalized_bounding_box - * Bounding Box in the normalized coordinates. - * @type float $score - * Confidence score associated with this box. - * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Entity $entity - * Entity of this box. - * @type int|string $track_id - * An unique id to identify a track. It should be consistent across frames. - * It only exists if tracking is enabled. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * An unique id for this box. - * - * Generated from protobuf field int64 box_id = 1; - * @return int|string - */ - public function getBoxId() - { - return $this->box_id; - } - - /** - * An unique id for this box. - * - * Generated from protobuf field int64 box_id = 1; - * @param int|string $var - * @return $this - */ - public function setBoxId($var) - { - GPBUtil::checkInt64($var); - $this->box_id = $var; - - return $this; - } - - /** - * Bounding Box in the normalized coordinates. - * - * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; - * @return \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\IdentifiedBox\NormalizedBoundingBox|null - */ - public function getNormalizedBoundingBox() - { - return $this->normalized_bounding_box; - } - - public function hasNormalizedBoundingBox() - { - return isset($this->normalized_bounding_box); - } - - public function clearNormalizedBoundingBox() - { - unset($this->normalized_bounding_box); - } - - /** - * Bounding Box in the normalized coordinates. - * - * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox normalized_bounding_box = 2; - * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\IdentifiedBox\NormalizedBoundingBox $var - * @return $this - */ - public function setNormalizedBoundingBox($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\IdentifiedBox\NormalizedBoundingBox::class); - $this->normalized_bounding_box = $var; - - return $this; - } - - /** - * Confidence score associated with this box. - * - * Generated from protobuf field float score = 3; - * @return float - */ - public function getScore() - { - return $this->score; - } - - /** - * Confidence score associated with this box. - * - * Generated from protobuf field float score = 3; - * @param float $var - * @return $this - */ - public function setScore($var) - { - GPBUtil::checkFloat($var); - $this->score = $var; - - return $this; - } - - /** - * Entity of this box. - * - * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; - * @return \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Entity|null - */ - public function getEntity() - { - return $this->entity; - } - - public function hasEntity() - { - return isset($this->entity); - } - - public function clearEntity() - { - unset($this->entity); - } - - /** - * Entity of this box. - * - * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 4; - * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Entity $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Entity::class); - $this->entity = $var; - - return $this; - } - - /** - * An unique id to identify a track. It should be consistent across frames. - * It only exists if tracking is enabled. - * - * Generated from protobuf field int64 track_id = 5; - * @return int|string - */ - public function getTrackId() - { - return $this->track_id; - } - - /** - * An unique id to identify a track. It should be consistent across frames. - * It only exists if tracking is enabled. - * - * Generated from protobuf field int64 track_id = 5; - * @param int|string $var - * @return $this - */ - public function setTrackId($var) - { - GPBUtil::checkInt64($var); - $this->track_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/IdentifiedBox/NormalizedBoundingBox.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/IdentifiedBox/NormalizedBoundingBox.php deleted file mode 100644 index c0bf087d4415..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/IdentifiedBox/NormalizedBoundingBox.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.visionai.v1.OccupancyCountingPredictionResult.IdentifiedBox.NormalizedBoundingBox - */ -class NormalizedBoundingBox extends \Google\Protobuf\Internal\Message -{ - /** - * Min in x coordinate. - * - * Generated from protobuf field float xmin = 1; - */ - protected $xmin = 0.0; - /** - * Min in y coordinate. - * - * Generated from protobuf field float ymin = 2; - */ - protected $ymin = 0.0; - /** - * Width of the bounding box. - * - * Generated from protobuf field float width = 3; - */ - protected $width = 0.0; - /** - * Height of the bounding box. - * - * Generated from protobuf field float height = 4; - */ - protected $height = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $xmin - * Min in x coordinate. - * @type float $ymin - * Min in y coordinate. - * @type float $width - * Width of the bounding box. - * @type float $height - * Height of the bounding box. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * Min in x coordinate. - * - * Generated from protobuf field float xmin = 1; - * @return float - */ - public function getXmin() - { - return $this->xmin; - } - - /** - * Min in x coordinate. - * - * Generated from protobuf field float xmin = 1; - * @param float $var - * @return $this - */ - public function setXmin($var) - { - GPBUtil::checkFloat($var); - $this->xmin = $var; - - return $this; - } - - /** - * Min in y coordinate. - * - * Generated from protobuf field float ymin = 2; - * @return float - */ - public function getYmin() - { - return $this->ymin; - } - - /** - * Min in y coordinate. - * - * Generated from protobuf field float ymin = 2; - * @param float $var - * @return $this - */ - public function setYmin($var) - { - GPBUtil::checkFloat($var); - $this->ymin = $var; - - return $this; - } - - /** - * Width of the bounding box. - * - * Generated from protobuf field float width = 3; - * @return float - */ - public function getWidth() - { - return $this->width; - } - - /** - * Width of the bounding box. - * - * Generated from protobuf field float width = 3; - * @param float $var - * @return $this - */ - public function setWidth($var) - { - GPBUtil::checkFloat($var); - $this->width = $var; - - return $this; - } - - /** - * Height of the bounding box. - * - * Generated from protobuf field float height = 4; - * @return float - */ - public function getHeight() - { - return $this->height; - } - - /** - * Height of the bounding box. - * - * Generated from protobuf field float height = 4; - * @param float $var - * @return $this - */ - public function setHeight($var) - { - GPBUtil::checkFloat($var); - $this->height = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats.php deleted file mode 100644 index 4f80addc012b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats - */ -class Stats extends \Google\Protobuf\Internal\Message -{ - /** - * Counts of the full frame. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; - */ - private $full_frame_count; - /** - * Crossing line counts. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; - */ - private $crossing_line_counts; - /** - * Active zone counts. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; - */ - private $active_zone_counts; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount[] $full_frame_count - * Counts of the full frame. - * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\CrossingLineCount[] $crossing_line_counts - * Crossing line counts. - * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ActiveZoneCount[] $active_zone_counts - * Active zone counts. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * Counts of the full frame. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount> - */ - public function getFullFrameCount() - { - return $this->full_frame_count; - } - - /** - * Counts of the full frame. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount full_frame_count = 1; - * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount[] $var - * @return $this - */ - public function setFullFrameCount($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount::class); - $this->full_frame_count = $arr; - - return $this; - } - - /** - * Crossing line counts. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\CrossingLineCount> - */ - public function getCrossingLineCounts() - { - return $this->crossing_line_counts; - } - - /** - * Crossing line counts. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount crossing_line_counts = 2; - * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\CrossingLineCount[] $var - * @return $this - */ - public function setCrossingLineCounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\CrossingLineCount::class); - $this->crossing_line_counts = $arr; - - return $this; - } - - /** - * Active zone counts. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ActiveZoneCount> - */ - public function getActiveZoneCounts() - { - return $this->active_zone_counts; - } - - /** - * Active zone counts. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount active_zone_counts = 3; - * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ActiveZoneCount[] $var - * @return $this - */ - public function setActiveZoneCounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ActiveZoneCount::class); - $this->active_zone_counts = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/AccumulatedObjectCount.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/AccumulatedObjectCount.php deleted file mode 100644 index 99a0fe51c4b3..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/AccumulatedObjectCount.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount - */ -class AccumulatedObjectCount extends \Google\Protobuf\Internal\Message -{ - /** - * The start time of the accumulated count. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The object count for the accumulated count. - * - * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; - */ - protected $object_count = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The start time of the accumulated count. - * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount $object_count - * The object count for the accumulated count. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * The start time of the accumulated count. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The start time of the accumulated count. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The object count for the accumulated count. - * - * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; - * @return \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount|null - */ - public function getObjectCount() - { - return $this->object_count; - } - - public function hasObjectCount() - { - return isset($this->object_count); - } - - public function clearObjectCount() - { - unset($this->object_count); - } - - /** - * The object count for the accumulated count. - * - * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount object_count = 2; - * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount $var - * @return $this - */ - public function setObjectCount($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount::class); - $this->object_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/ActiveZoneCount.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/ActiveZoneCount.php deleted file mode 100644 index 32b6b9996576..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/ActiveZoneCount.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ActiveZoneCount - */ -class ActiveZoneCount extends \Google\Protobuf\Internal\Message -{ - /** - * Active zone annotation from the user. - * - * Generated from protobuf field .google.cloud.visionai.v1.StreamAnnotation annotation = 1; - */ - protected $annotation = null; - /** - * Counts in the zone. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; - */ - private $counts; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\StreamAnnotation $annotation - * Active zone annotation from the user. - * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount[] $counts - * Counts in the zone. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * Active zone annotation from the user. - * - * Generated from protobuf field .google.cloud.visionai.v1.StreamAnnotation annotation = 1; - * @return \Google\Cloud\VisionAI\V1\StreamAnnotation|null - */ - public function getAnnotation() - { - return $this->annotation; - } - - public function hasAnnotation() - { - return isset($this->annotation); - } - - public function clearAnnotation() - { - unset($this->annotation); - } - - /** - * Active zone annotation from the user. - * - * Generated from protobuf field .google.cloud.visionai.v1.StreamAnnotation annotation = 1; - * @param \Google\Cloud\VisionAI\V1\StreamAnnotation $var - * @return $this - */ - public function setAnnotation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\StreamAnnotation::class); - $this->annotation = $var; - - return $this; - } - - /** - * Counts in the zone. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount> - */ - public function getCounts() - { - return $this->counts; - } - - /** - * Counts in the zone. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount counts = 2; - * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount[] $var - * @return $this - */ - public function setCounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount::class); - $this->counts = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/CrossingLineCount.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/CrossingLineCount.php deleted file mode 100644 index 59299acf3847..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/CrossingLineCount.php +++ /dev/null @@ -1,213 +0,0 @@ -google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.CrossingLineCount - */ -class CrossingLineCount extends \Google\Protobuf\Internal\Message -{ - /** - * Line annotation from the user. - * - * Generated from protobuf field .google.cloud.visionai.v1.StreamAnnotation annotation = 1; - */ - protected $annotation = null; - /** - * The direction that follows the right hand rule. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; - */ - private $positive_direction_counts; - /** - * The direction that is opposite to the right hand rule. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; - */ - private $negative_direction_counts; - /** - * The accumulated positive count. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; - */ - private $accumulated_positive_direction_counts; - /** - * The accumulated negative count. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; - */ - private $accumulated_negative_direction_counts; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\StreamAnnotation $annotation - * Line annotation from the user. - * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount[] $positive_direction_counts - * The direction that follows the right hand rule. - * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount[] $negative_direction_counts - * The direction that is opposite to the right hand rule. - * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\AccumulatedObjectCount[] $accumulated_positive_direction_counts - * The accumulated positive count. - * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\AccumulatedObjectCount[] $accumulated_negative_direction_counts - * The accumulated negative count. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * Line annotation from the user. - * - * Generated from protobuf field .google.cloud.visionai.v1.StreamAnnotation annotation = 1; - * @return \Google\Cloud\VisionAI\V1\StreamAnnotation|null - */ - public function getAnnotation() - { - return $this->annotation; - } - - public function hasAnnotation() - { - return isset($this->annotation); - } - - public function clearAnnotation() - { - unset($this->annotation); - } - - /** - * Line annotation from the user. - * - * Generated from protobuf field .google.cloud.visionai.v1.StreamAnnotation annotation = 1; - * @param \Google\Cloud\VisionAI\V1\StreamAnnotation $var - * @return $this - */ - public function setAnnotation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\StreamAnnotation::class); - $this->annotation = $var; - - return $this; - } - - /** - * The direction that follows the right hand rule. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount> - */ - public function getPositiveDirectionCounts() - { - return $this->positive_direction_counts; - } - - /** - * The direction that follows the right hand rule. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount positive_direction_counts = 2; - * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount[] $var - * @return $this - */ - public function setPositiveDirectionCounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount::class); - $this->positive_direction_counts = $arr; - - return $this; - } - - /** - * The direction that is opposite to the right hand rule. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount> - */ - public function getNegativeDirectionCounts() - { - return $this->negative_direction_counts; - } - - /** - * The direction that is opposite to the right hand rule. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount negative_direction_counts = 3; - * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount[] $var - * @return $this - */ - public function setNegativeDirectionCounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\ObjectCount::class); - $this->negative_direction_counts = $arr; - - return $this; - } - - /** - * The accumulated positive count. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\AccumulatedObjectCount> - */ - public function getAccumulatedPositiveDirectionCounts() - { - return $this->accumulated_positive_direction_counts; - } - - /** - * The accumulated positive count. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_positive_direction_counts = 4; - * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\AccumulatedObjectCount[] $var - * @return $this - */ - public function setAccumulatedPositiveDirectionCounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\AccumulatedObjectCount::class); - $this->accumulated_positive_direction_counts = $arr; - - return $this; - } - - /** - * The accumulated negative count. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\AccumulatedObjectCount> - */ - public function getAccumulatedNegativeDirectionCounts() - { - return $this->accumulated_negative_direction_counts; - } - - /** - * The accumulated negative count. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.AccumulatedObjectCount accumulated_negative_direction_counts = 5; - * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\AccumulatedObjectCount[] $var - * @return $this - */ - public function setAccumulatedNegativeDirectionCounts($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Stats\AccumulatedObjectCount::class); - $this->accumulated_negative_direction_counts = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/ObjectCount.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/ObjectCount.php deleted file mode 100644 index c5547eb02d7b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/Stats/ObjectCount.php +++ /dev/null @@ -1,112 +0,0 @@ -google.cloud.visionai.v1.OccupancyCountingPredictionResult.Stats.ObjectCount - */ -class ObjectCount extends \Google\Protobuf\Internal\Message -{ - /** - * Entity of this object. - * - * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; - */ - protected $entity = null; - /** - * Count of the object. - * - * Generated from protobuf field int32 count = 2; - */ - protected $count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Entity $entity - * Entity of this object. - * @type int $count - * Count of the object. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * Entity of this object. - * - * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; - * @return \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Entity|null - */ - public function getEntity() - { - return $this->entity; - } - - public function hasEntity() - { - return isset($this->entity); - } - - public function clearEntity() - { - unset($this->entity); - } - - /** - * Entity of this object. - * - * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountingPredictionResult.Entity entity = 1; - * @param \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Entity $var - * @return $this - */ - public function setEntity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OccupancyCountingPredictionResult\Entity::class); - $this->entity = $var; - - return $this; - } - - /** - * Count of the object. - * - * Generated from protobuf field int32 count = 2; - * @return int - */ - public function getCount() - { - return $this->count; - } - - /** - * Count of the object. - * - * Generated from protobuf field int32 count = 2; - * @param int $var - * @return $this - */ - public function setCount($var) - { - GPBUtil::checkInt32($var); - $this->count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/TrackInfo.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/TrackInfo.php deleted file mode 100644 index f643ed31937e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OccupancyCountingPredictionResult/TrackInfo.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.visionai.v1.OccupancyCountingPredictionResult.TrackInfo - */ -class TrackInfo extends \Google\Protobuf\Internal\Message -{ - /** - * An unique id to identify a track. It should be consistent across frames. - * - * Generated from protobuf field string track_id = 1; - */ - protected $track_id = ''; - /** - * Start timestamp of this track. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - */ - protected $start_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $track_id - * An unique id to identify a track. It should be consistent across frames. - * @type \Google\Protobuf\Timestamp $start_time - * Start timestamp of this track. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * An unique id to identify a track. It should be consistent across frames. - * - * Generated from protobuf field string track_id = 1; - * @return string - */ - public function getTrackId() - { - return $this->track_id; - } - - /** - * An unique id to identify a track. It should be consistent across frames. - * - * Generated from protobuf field string track_id = 1; - * @param string $var - * @return $this - */ - public function setTrackId($var) - { - GPBUtil::checkString($var, True); - $this->track_id = $var; - - return $this; - } - - /** - * Start timestamp of this track. - * - * 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); - } - - /** - * Start timestamp of this track. - * - * 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; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperationMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperationMetadata.php deleted file mode 100644 index 7e18c483aba4..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperationMetadata.php +++ /dev/null @@ -1,307 +0,0 @@ -google.cloud.visionai.v1.OperationMetadata - */ -class OperationMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $end_time = null; - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $target = ''; - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $verb = ''; - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $status_message = ''; - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $requested_cancellation = false; - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $api_version = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time the operation was created. - * @type \Google\Protobuf\Timestamp $end_time - * Output only. The time the operation finished running. - * @type string $target - * Output only. Server-defined resource path for the target of the operation. - * @type string $verb - * Output only. Name of the verb executed by the operation. - * @type string $status_message - * Output only. Human-readable status of the operation, if any. - * @type bool $requested_cancellation - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * @type string $api_version - * Output only. API version used to start the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Common::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The time the operation was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * Output only. The time the operation finished running. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2 [(.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. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getTarget() - { - return $this->target; - } - - /** - * Output only. Server-defined resource path for the target of the operation. - * - * Generated from protobuf field string target = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setTarget($var) - { - GPBUtil::checkString($var, True); - $this->target = $var; - - return $this; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getVerb() - { - return $this->verb; - } - - /** - * Output only. Name of the verb executed by the operation. - * - * Generated from protobuf field string verb = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setVerb($var) - { - GPBUtil::checkString($var, True); - $this->verb = $var; - - return $this; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getStatusMessage() - { - return $this->status_message; - } - - /** - * Output only. Human-readable status of the operation, if any. - * - * Generated from protobuf field string status_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setStatusMessage($var) - { - GPBUtil::checkString($var, True); - $this->status_message = $var; - - return $this; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getRequestedCancellation() - { - return $this->requested_cancellation; - } - - /** - * Output only. Identifies whether the user has requested cancellation - * of the operation. Operations that have successfully been cancelled - * have [Operation.error][] value with a - * [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - * `Code.CANCELLED`. - * - * Generated from protobuf field bool requested_cancellation = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setRequestedCancellation($var) - { - GPBUtil::checkBool($var); - $this->requested_cancellation = $var; - - return $this; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getApiVersion() - { - return $this->api_version; - } - - /** - * Output only. API version used to start the operation. - * - * Generated from protobuf field string api_version = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setApiVersion($var) - { - GPBUtil::checkString($var, True); - $this->api_version = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Operator.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Operator.php deleted file mode 100644 index 5b73591bb34f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Operator.php +++ /dev/null @@ -1,267 +0,0 @@ -google.cloud.visionai.v1.Operator - */ -class Operator extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the resource. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * The definition of the operator. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; - */ - protected $operator_definition = null; - /** - * The link to the docker image of the operator. - * - * Generated from protobuf field string docker_image = 6; - */ - protected $docker_image = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update timestamp. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs. - * @type \Google\Cloud\VisionAI\V1\OperatorDefinition $operator_definition - * The definition of the operator. - * @type string $docker_image - * The link to the docker image of the operator. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaResources::initOnce(); - parent::__construct($data); - } - - /** - * Name of the resource. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the resource. - * - * 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 create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * The definition of the operator. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; - * @return \Google\Cloud\VisionAI\V1\OperatorDefinition|null - */ - public function getOperatorDefinition() - { - return $this->operator_definition; - } - - public function hasOperatorDefinition() - { - return isset($this->operator_definition); - } - - public function clearOperatorDefinition() - { - unset($this->operator_definition); - } - - /** - * The definition of the operator. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperatorDefinition operator_definition = 5; - * @param \Google\Cloud\VisionAI\V1\OperatorDefinition $var - * @return $this - */ - public function setOperatorDefinition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperatorDefinition::class); - $this->operator_definition = $var; - - return $this; - } - - /** - * The link to the docker image of the operator. - * - * Generated from protobuf field string docker_image = 6; - * @return string - */ - public function getDockerImage() - { - return $this->docker_image; - } - - /** - * The link to the docker image of the operator. - * - * Generated from protobuf field string docker_image = 6; - * @param string $var - * @return $this - */ - public function setDockerImage($var) - { - GPBUtil::checkString($var, True); - $this->docker_image = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition.php deleted file mode 100644 index 23faac7707c2..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition.php +++ /dev/null @@ -1,291 +0,0 @@ -google.cloud.visionai.v1.OperatorDefinition - */ -class OperatorDefinition extends \Google\Protobuf\Internal\Message -{ - /** - * The name of this operator. - * Tentatively [A-Z][a-zA-Z0-9]*, e.g., BboxCounter, PetDetector, - * PetDetector1. - * - * Generated from protobuf field string operator = 1; - */ - protected $operator = ''; - /** - * Declares input arguments. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; - */ - private $input_args; - /** - * Declares output arguments. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; - */ - private $output_args; - /** - * Declares the attributes. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; - */ - private $attributes; - /** - * The resources for running the operator. - * - * Generated from protobuf field .google.cloud.visionai.v1.ResourceSpecification resources = 5; - */ - protected $resources = null; - /** - * Short description of the operator. - * - * Generated from protobuf field string short_description = 6; - */ - protected $short_description = ''; - /** - * Full description of the operator. - * - * Generated from protobuf field string description = 7; - */ - protected $description = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $operator - * The name of this operator. - * Tentatively [A-Z][a-zA-Z0-9]*, e.g., BboxCounter, PetDetector, - * PetDetector1. - * @type \Google\Cloud\VisionAI\V1\OperatorDefinition\ArgumentDefinition[] $input_args - * Declares input arguments. - * @type \Google\Cloud\VisionAI\V1\OperatorDefinition\ArgumentDefinition[] $output_args - * Declares output arguments. - * @type \Google\Cloud\VisionAI\V1\OperatorDefinition\AttributeDefinition[] $attributes - * Declares the attributes. - * @type \Google\Cloud\VisionAI\V1\ResourceSpecification $resources - * The resources for running the operator. - * @type string $short_description - * Short description of the operator. - * @type string $description - * Full description of the operator. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); - parent::__construct($data); - } - - /** - * The name of this operator. - * Tentatively [A-Z][a-zA-Z0-9]*, e.g., BboxCounter, PetDetector, - * PetDetector1. - * - * Generated from protobuf field string operator = 1; - * @return string - */ - public function getOperator() - { - return $this->operator; - } - - /** - * The name of this operator. - * Tentatively [A-Z][a-zA-Z0-9]*, e.g., BboxCounter, PetDetector, - * PetDetector1. - * - * Generated from protobuf field string operator = 1; - * @param string $var - * @return $this - */ - public function setOperator($var) - { - GPBUtil::checkString($var, True); - $this->operator = $var; - - return $this; - } - - /** - * Declares input arguments. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\OperatorDefinition\ArgumentDefinition> - */ - public function getInputArgs() - { - return $this->input_args; - } - - /** - * Declares input arguments. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition input_args = 2; - * @param \Google\Cloud\VisionAI\V1\OperatorDefinition\ArgumentDefinition[] $var - * @return $this - */ - public function setInputArgs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OperatorDefinition\ArgumentDefinition::class); - $this->input_args = $arr; - - return $this; - } - - /** - * Declares output arguments. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\OperatorDefinition\ArgumentDefinition> - */ - public function getOutputArgs() - { - return $this->output_args; - } - - /** - * Declares output arguments. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition output_args = 3; - * @param \Google\Cloud\VisionAI\V1\OperatorDefinition\ArgumentDefinition[] $var - * @return $this - */ - public function setOutputArgs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OperatorDefinition\ArgumentDefinition::class); - $this->output_args = $arr; - - return $this; - } - - /** - * Declares the attributes. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\OperatorDefinition\AttributeDefinition> - */ - public function getAttributes() - { - return $this->attributes; - } - - /** - * Declares the attributes. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition attributes = 4; - * @param \Google\Cloud\VisionAI\V1\OperatorDefinition\AttributeDefinition[] $var - * @return $this - */ - public function setAttributes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OperatorDefinition\AttributeDefinition::class); - $this->attributes = $arr; - - return $this; - } - - /** - * The resources for running the operator. - * - * Generated from protobuf field .google.cloud.visionai.v1.ResourceSpecification resources = 5; - * @return \Google\Cloud\VisionAI\V1\ResourceSpecification|null - */ - public function getResources() - { - return $this->resources; - } - - public function hasResources() - { - return isset($this->resources); - } - - public function clearResources() - { - unset($this->resources); - } - - /** - * The resources for running the operator. - * - * Generated from protobuf field .google.cloud.visionai.v1.ResourceSpecification resources = 5; - * @param \Google\Cloud\VisionAI\V1\ResourceSpecification $var - * @return $this - */ - public function setResources($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ResourceSpecification::class); - $this->resources = $var; - - return $this; - } - - /** - * Short description of the operator. - * - * Generated from protobuf field string short_description = 6; - * @return string - */ - public function getShortDescription() - { - return $this->short_description; - } - - /** - * Short description of the operator. - * - * Generated from protobuf field string short_description = 6; - * @param string $var - * @return $this - */ - public function setShortDescription($var) - { - GPBUtil::checkString($var, True); - $this->short_description = $var; - - return $this; - } - - /** - * Full description of the operator. - * - * Generated from protobuf field string description = 7; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Full description of the operator. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition/ArgumentDefinition.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition/ArgumentDefinition.php deleted file mode 100644 index 349c5ff5b874..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition/ArgumentDefinition.php +++ /dev/null @@ -1,114 +0,0 @@ -google.cloud.visionai.v1.OperatorDefinition.ArgumentDefinition - */ -class ArgumentDefinition extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the argument. - * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., video, audio, - * high_fps_frame. - * - * Generated from protobuf field string argument = 1; - */ - protected $argument = ''; - /** - * The data type of the argument. - * This should match the textual representation of a stream/Packet type. - * - * Generated from protobuf field string type = 2; - */ - protected $type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $argument - * The name of the argument. - * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., video, audio, - * high_fps_frame. - * @type string $type - * The data type of the argument. - * This should match the textual representation of a stream/Packet type. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); - parent::__construct($data); - } - - /** - * The name of the argument. - * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., video, audio, - * high_fps_frame. - * - * Generated from protobuf field string argument = 1; - * @return string - */ - public function getArgument() - { - return $this->argument; - } - - /** - * The name of the argument. - * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., video, audio, - * high_fps_frame. - * - * Generated from protobuf field string argument = 1; - * @param string $var - * @return $this - */ - public function setArgument($var) - { - GPBUtil::checkString($var, True); - $this->argument = $var; - - return $this; - } - - /** - * The data type of the argument. - * This should match the textual representation of a stream/Packet type. - * - * Generated from protobuf field string type = 2; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The data type of the argument. - * This should match the textual representation of a stream/Packet type. - * - * Generated from protobuf field string type = 2; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition/AttributeDefinition.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition/AttributeDefinition.php deleted file mode 100644 index a5ee0aa08cbd..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorDefinition/AttributeDefinition.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.visionai.v1.OperatorDefinition.AttributeDefinition - */ -class AttributeDefinition extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the attribute. - * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., max_frames_per_video, - * resize_height. - * - * Generated from protobuf field string attribute = 1; - */ - protected $attribute = ''; - /** - * The type of this attribute. - * See attribute_value.proto for possibilities. - * - * Generated from protobuf field string type = 2; - */ - protected $type = ''; - /** - * The default value for the attribute. - * - * Generated from protobuf field .google.cloud.visionai.v1.AttributeValue default_value = 3; - */ - protected $default_value = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $attribute - * The name of the attribute. - * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., max_frames_per_video, - * resize_height. - * @type string $type - * The type of this attribute. - * See attribute_value.proto for possibilities. - * @type \Google\Cloud\VisionAI\V1\AttributeValue $default_value - * The default value for the attribute. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); - parent::__construct($data); - } - - /** - * The name of the attribute. - * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., max_frames_per_video, - * resize_height. - * - * Generated from protobuf field string attribute = 1; - * @return string - */ - public function getAttribute() - { - return $this->attribute; - } - - /** - * The name of the attribute. - * Tentatively [a-z]([_a-z0-9]*[a-z0-9])?, e.g., max_frames_per_video, - * resize_height. - * - * Generated from protobuf field string attribute = 1; - * @param string $var - * @return $this - */ - public function setAttribute($var) - { - GPBUtil::checkString($var, True); - $this->attribute = $var; - - return $this; - } - - /** - * The type of this attribute. - * See attribute_value.proto for possibilities. - * - * Generated from protobuf field string type = 2; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The type of this attribute. - * See attribute_value.proto for possibilities. - * - * Generated from protobuf field string type = 2; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * The default value for the attribute. - * - * Generated from protobuf field .google.cloud.visionai.v1.AttributeValue default_value = 3; - * @return \Google\Cloud\VisionAI\V1\AttributeValue|null - */ - public function getDefaultValue() - { - return $this->default_value; - } - - public function hasDefaultValue() - { - return isset($this->default_value); - } - - public function clearDefaultValue() - { - unset($this->default_value); - } - - /** - * The default value for the attribute. - * - * Generated from protobuf field .google.cloud.visionai.v1.AttributeValue default_value = 3; - * @param \Google\Cloud\VisionAI\V1\AttributeValue $var - * @return $this - */ - public function setDefaultValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AttributeValue::class); - $this->default_value = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorQuery.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorQuery.php deleted file mode 100644 index 5a2ad119813e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/OperatorQuery.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.visionai.v1.OperatorQuery - */ -class OperatorQuery extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The canonical Name of the operator. e.g. OccupancyCounting. - * - * Generated from protobuf field string operator = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $operator = ''; - /** - * Optional. Tag of the operator. - * - * Generated from protobuf field string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $tag = ''; - /** - * Optional. Registry of the operator. - * - * Generated from protobuf field .google.cloud.visionai.v1.Registry registry = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $registry = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $operator - * Required. The canonical Name of the operator. e.g. OccupancyCounting. - * @type string $tag - * Optional. Tag of the operator. - * @type int $registry - * Optional. Registry of the operator. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The canonical Name of the operator. e.g. OccupancyCounting. - * - * Generated from protobuf field string operator = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getOperator() - { - return $this->operator; - } - - /** - * Required. The canonical Name of the operator. e.g. OccupancyCounting. - * - * Generated from protobuf field string operator = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setOperator($var) - { - GPBUtil::checkString($var, True); - $this->operator = $var; - - return $this; - } - - /** - * Optional. Tag of the operator. - * - * Generated from protobuf field string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getTag() - { - return $this->tag; - } - - /** - * Optional. Tag of the operator. - * - * Generated from protobuf field string tag = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setTag($var) - { - GPBUtil::checkString($var, True); - $this->tag = $var; - - return $this; - } - - /** - * Optional. Registry of the operator. - * - * Generated from protobuf field .google.cloud.visionai.v1.Registry registry = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getRegistry() - { - return $this->registry; - } - - /** - * Optional. Registry of the operator. - * - * Generated from protobuf field .google.cloud.visionai.v1.Registry registry = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setRegistry($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Registry::class); - $this->registry = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Packet.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Packet.php deleted file mode 100644 index afaf8e5c20d5..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Packet.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.visionai.v1.Packet - */ -class Packet extends \Google\Protobuf\Internal\Message -{ - /** - * The packet header. - * - * Generated from protobuf field .google.cloud.visionai.v1.PacketHeader header = 1; - */ - protected $header = null; - /** - * The payload of the packet. - * - * Generated from protobuf field bytes payload = 2; - */ - protected $payload = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\PacketHeader $header - * The packet header. - * @type string $payload - * The payload of the packet. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingResources::initOnce(); - parent::__construct($data); - } - - /** - * The packet header. - * - * Generated from protobuf field .google.cloud.visionai.v1.PacketHeader header = 1; - * @return \Google\Cloud\VisionAI\V1\PacketHeader|null - */ - public function getHeader() - { - return $this->header; - } - - public function hasHeader() - { - return isset($this->header); - } - - public function clearHeader() - { - unset($this->header); - } - - /** - * The packet header. - * - * Generated from protobuf field .google.cloud.visionai.v1.PacketHeader header = 1; - * @param \Google\Cloud\VisionAI\V1\PacketHeader $var - * @return $this - */ - public function setHeader($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PacketHeader::class); - $this->header = $var; - - return $this; - } - - /** - * The payload of the packet. - * - * Generated from protobuf field bytes payload = 2; - * @return string - */ - public function getPayload() - { - return $this->payload; - } - - /** - * The payload of the packet. - * - * Generated from protobuf field bytes payload = 2; - * @param string $var - * @return $this - */ - public function setPayload($var) - { - GPBUtil::checkString($var, False); - $this->payload = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketHeader.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketHeader.php deleted file mode 100644 index ad8c5d7fca14..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketHeader.php +++ /dev/null @@ -1,369 +0,0 @@ -google.cloud.visionai.v1.PacketHeader - */ -class PacketHeader extends \Google\Protobuf\Internal\Message -{ - /** - * Input only. The capture time of the packet. - * - * Generated from protobuf field .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $capture_time = null; - /** - * Input only. Immutable. The type of the payload. - * - * Generated from protobuf field .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $type = null; - /** - * Input only. This field is for users to attach user managed metadata. - * - * Generated from protobuf field .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $metadata = null; - /** - * Output only. Metadata that the server appends to each packet before sending - * it to receivers. You don't need to set a value for this field when sending - * packets. - * - * Generated from protobuf field .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $server_metadata = null; - /** - * Input only. Immutable. Metadata that the server needs to know where to - * write the packets to. It's only required for the first packet. - * - * Generated from protobuf field .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - */ - protected $series_metadata = null; - /** - * Immutable. Packet flag set. SDK will set the flag automatically. - * - * Generated from protobuf field int32 flags = 6 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $flags = 0; - /** - * Immutable. Header string for tracing across services. It should be set when - * the packet is first arrived in the stream server. - * The input format is a lowercase hex string: - * - version_id: 1 byte, currently must be zero - hex encoded (2 characters) - * - trace_id: 16 bytes (opaque blob) - hex encoded (32 characters) - * - span_id: 8 bytes (opaque blob) - hex encoded (16 characters) - * - trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2 - * characters) - * Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01" - * v trace_id span_id options - * - * Generated from protobuf field string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $trace_context = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $capture_time - * Input only. The capture time of the packet. - * @type \Google\Cloud\VisionAI\V1\PacketType $type - * Input only. Immutable. The type of the payload. - * @type \Google\Protobuf\Struct $metadata - * Input only. This field is for users to attach user managed metadata. - * @type \Google\Cloud\VisionAI\V1\ServerMetadata $server_metadata - * Output only. Metadata that the server appends to each packet before sending - * it to receivers. You don't need to set a value for this field when sending - * packets. - * @type \Google\Cloud\VisionAI\V1\SeriesMetadata $series_metadata - * Input only. Immutable. Metadata that the server needs to know where to - * write the packets to. It's only required for the first packet. - * @type int $flags - * Immutable. Packet flag set. SDK will set the flag automatically. - * @type string $trace_context - * Immutable. Header string for tracing across services. It should be set when - * the packet is first arrived in the stream server. - * The input format is a lowercase hex string: - * - version_id: 1 byte, currently must be zero - hex encoded (2 characters) - * - trace_id: 16 bytes (opaque blob) - hex encoded (32 characters) - * - span_id: 8 bytes (opaque blob) - hex encoded (16 characters) - * - trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2 - * characters) - * Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01" - * v trace_id span_id options - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingResources::initOnce(); - parent::__construct($data); - } - - /** - * Input only. The capture time of the packet. - * - * Generated from protobuf field .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCaptureTime() - { - return $this->capture_time; - } - - public function hasCaptureTime() - { - return isset($this->capture_time); - } - - public function clearCaptureTime() - { - unset($this->capture_time); - } - - /** - * Input only. The capture time of the packet. - * - * Generated from protobuf field .google.protobuf.Timestamp capture_time = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCaptureTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->capture_time = $var; - - return $this; - } - - /** - * Input only. Immutable. The type of the payload. - * - * Generated from protobuf field .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\VisionAI\V1\PacketType|null - */ - public function getType() - { - return $this->type; - } - - public function hasType() - { - return isset($this->type); - } - - public function clearType() - { - unset($this->type); - } - - /** - * Input only. Immutable. The type of the payload. - * - * Generated from protobuf field .google.cloud.visionai.v1.PacketType type = 2 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\VisionAI\V1\PacketType $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PacketType::class); - $this->type = $var; - - return $this; - } - - /** - * Input only. This field is for users to attach user managed metadata. - * - * Generated from protobuf field .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Protobuf\Struct|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * Input only. This field is for users to attach user managed metadata. - * - * Generated from protobuf field .google.protobuf.Struct metadata = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->metadata = $var; - - return $this; - } - - /** - * Output only. Metadata that the server appends to each packet before sending - * it to receivers. You don't need to set a value for this field when sending - * packets. - * - * Generated from protobuf field .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VisionAI\V1\ServerMetadata|null - */ - public function getServerMetadata() - { - return $this->server_metadata; - } - - public function hasServerMetadata() - { - return isset($this->server_metadata); - } - - public function clearServerMetadata() - { - unset($this->server_metadata); - } - - /** - * Output only. Metadata that the server appends to each packet before sending - * it to receivers. You don't need to set a value for this field when sending - * packets. - * - * Generated from protobuf field .google.cloud.visionai.v1.ServerMetadata server_metadata = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VisionAI\V1\ServerMetadata $var - * @return $this - */ - public function setServerMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ServerMetadata::class); - $this->server_metadata = $var; - - return $this; - } - - /** - * Input only. Immutable. Metadata that the server needs to know where to - * write the packets to. It's only required for the first packet. - * - * Generated from protobuf field .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Cloud\VisionAI\V1\SeriesMetadata|null - */ - public function getSeriesMetadata() - { - return $this->series_metadata; - } - - public function hasSeriesMetadata() - { - return isset($this->series_metadata); - } - - public function clearSeriesMetadata() - { - unset($this->series_metadata); - } - - /** - * Input only. Immutable. Metadata that the server needs to know where to - * write the packets to. It's only required for the first packet. - * - * Generated from protobuf field .google.cloud.visionai.v1.SeriesMetadata series_metadata = 5 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Cloud\VisionAI\V1\SeriesMetadata $var - * @return $this - */ - public function setSeriesMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\SeriesMetadata::class); - $this->series_metadata = $var; - - return $this; - } - - /** - * Immutable. Packet flag set. SDK will set the flag automatically. - * - * Generated from protobuf field int32 flags = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @return int - */ - public function getFlags() - { - return $this->flags; - } - - /** - * Immutable. Packet flag set. SDK will set the flag automatically. - * - * Generated from protobuf field int32 flags = 6 [(.google.api.field_behavior) = IMMUTABLE]; - * @param int $var - * @return $this - */ - public function setFlags($var) - { - GPBUtil::checkInt32($var); - $this->flags = $var; - - return $this; - } - - /** - * Immutable. Header string for tracing across services. It should be set when - * the packet is first arrived in the stream server. - * The input format is a lowercase hex string: - * - version_id: 1 byte, currently must be zero - hex encoded (2 characters) - * - trace_id: 16 bytes (opaque blob) - hex encoded (32 characters) - * - span_id: 8 bytes (opaque blob) - hex encoded (16 characters) - * - trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2 - * characters) - * Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01" - * v trace_id span_id options - * - * Generated from protobuf field string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE]; - * @return string - */ - public function getTraceContext() - { - return $this->trace_context; - } - - /** - * Immutable. Header string for tracing across services. It should be set when - * the packet is first arrived in the stream server. - * The input format is a lowercase hex string: - * - version_id: 1 byte, currently must be zero - hex encoded (2 characters) - * - trace_id: 16 bytes (opaque blob) - hex encoded (32 characters) - * - span_id: 8 bytes (opaque blob) - hex encoded (16 characters) - * - trace_options: 1 byte (LSB means tracing enabled) - hex encoded (2 - * characters) - * Example: "00-404142434445464748494a4b4c4d4e4f-6162636465666768-01" - * v trace_id span_id options - * - * Generated from protobuf field string trace_context = 7 [(.google.api.field_behavior) = IMMUTABLE]; - * @param string $var - * @return $this - */ - public function setTraceContext($var) - { - GPBUtil::checkString($var, True); - $this->trace_context = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketType.php deleted file mode 100644 index 2bf52d3080f5..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketType.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.visionai.v1.PacketType - */ -class PacketType extends \Google\Protobuf\Internal\Message -{ - /** - * The type class of the packet. Its possible values are: - * "gst", "protobuf", and "string". - * - * Generated from protobuf field string type_class = 1; - */ - protected $type_class = ''; - /** - * The type descriptor. - * - * Generated from protobuf field .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; - */ - protected $type_descriptor = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $type_class - * The type class of the packet. Its possible values are: - * "gst", "protobuf", and "string". - * @type \Google\Cloud\VisionAI\V1\PacketType\TypeDescriptor $type_descriptor - * The type descriptor. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingResources::initOnce(); - parent::__construct($data); - } - - /** - * The type class of the packet. Its possible values are: - * "gst", "protobuf", and "string". - * - * Generated from protobuf field string type_class = 1; - * @return string - */ - public function getTypeClass() - { - return $this->type_class; - } - - /** - * The type class of the packet. Its possible values are: - * "gst", "protobuf", and "string". - * - * Generated from protobuf field string type_class = 1; - * @param string $var - * @return $this - */ - public function setTypeClass($var) - { - GPBUtil::checkString($var, True); - $this->type_class = $var; - - return $this; - } - - /** - * The type descriptor. - * - * Generated from protobuf field .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; - * @return \Google\Cloud\VisionAI\V1\PacketType\TypeDescriptor|null - */ - public function getTypeDescriptor() - { - return $this->type_descriptor; - } - - public function hasTypeDescriptor() - { - return isset($this->type_descriptor); - } - - public function clearTypeDescriptor() - { - unset($this->type_descriptor); - } - - /** - * The type descriptor. - * - * Generated from protobuf field .google.cloud.visionai.v1.PacketType.TypeDescriptor type_descriptor = 2; - * @param \Google\Cloud\VisionAI\V1\PacketType\TypeDescriptor $var - * @return $this - */ - public function setTypeDescriptor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PacketType\TypeDescriptor::class); - $this->type_descriptor = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketType/TypeDescriptor.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketType/TypeDescriptor.php deleted file mode 100644 index 8e9f802853ee..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PacketType/TypeDescriptor.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.visionai.v1.PacketType.TypeDescriptor - */ -class TypeDescriptor extends \Google\Protobuf\Internal\Message -{ - /** - * The type of the packet. Its possible values is codec dependent. - * The fully qualified type name is always the concatenation of the - * value in `type_class` together with the value in `type`, separated by a - * '/'. - * Note that specific codecs can define their own type hierarchy, and so the - * type string here can in fact be separated by multiple '/'s of its own. - * Please see the open source SDK for specific codec documentation. - * - * Generated from protobuf field string type = 1; - */ - protected $type = ''; - protected $type_details; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\GstreamerBufferDescriptor $gstreamer_buffer_descriptor - * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type. - * @type \Google\Cloud\VisionAI\V1\RawImageDescriptor $raw_image_descriptor - * RawImageDescriptor is the descriptor for the raw image type. - * @type string $type - * The type of the packet. Its possible values is codec dependent. - * The fully qualified type name is always the concatenation of the - * value in `type_class` together with the value in `type`, separated by a - * '/'. - * Note that specific codecs can define their own type hierarchy, and so the - * type string here can in fact be separated by multiple '/'s of its own. - * Please see the open source SDK for specific codec documentation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingResources::initOnce(); - parent::__construct($data); - } - - /** - * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type. - * - * Generated from protobuf field .google.cloud.visionai.v1.GstreamerBufferDescriptor gstreamer_buffer_descriptor = 2; - * @return \Google\Cloud\VisionAI\V1\GstreamerBufferDescriptor|null - */ - public function getGstreamerBufferDescriptor() - { - return $this->readOneof(2); - } - - public function hasGstreamerBufferDescriptor() - { - return $this->hasOneof(2); - } - - /** - * GstreamerBufferDescriptor is the descriptor for gstreamer buffer type. - * - * Generated from protobuf field .google.cloud.visionai.v1.GstreamerBufferDescriptor gstreamer_buffer_descriptor = 2; - * @param \Google\Cloud\VisionAI\V1\GstreamerBufferDescriptor $var - * @return $this - */ - public function setGstreamerBufferDescriptor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\GstreamerBufferDescriptor::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * RawImageDescriptor is the descriptor for the raw image type. - * - * Generated from protobuf field .google.cloud.visionai.v1.RawImageDescriptor raw_image_descriptor = 3; - * @return \Google\Cloud\VisionAI\V1\RawImageDescriptor|null - */ - public function getRawImageDescriptor() - { - return $this->readOneof(3); - } - - public function hasRawImageDescriptor() - { - return $this->hasOneof(3); - } - - /** - * RawImageDescriptor is the descriptor for the raw image type. - * - * Generated from protobuf field .google.cloud.visionai.v1.RawImageDescriptor raw_image_descriptor = 3; - * @param \Google\Cloud\VisionAI\V1\RawImageDescriptor $var - * @return $this - */ - public function setRawImageDescriptor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\RawImageDescriptor::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The type of the packet. Its possible values is codec dependent. - * The fully qualified type name is always the concatenation of the - * value in `type_class` together with the value in `type`, separated by a - * '/'. - * Note that specific codecs can define their own type hierarchy, and so the - * type string here can in fact be separated by multiple '/'s of its own. - * Please see the open source SDK for specific codec documentation. - * - * Generated from protobuf field string type = 1; - * @return string - */ - public function getType() - { - return $this->type; - } - - /** - * The type of the packet. Its possible values is codec dependent. - * The fully qualified type name is always the concatenation of the - * value in `type_class` together with the value in `type`, separated by a - * '/'. - * Note that specific codecs can define their own type hierarchy, and so the - * type string here can in fact be separated by multiple '/'s of its own. - * Please see the open source SDK for specific codec documentation. - * - * Generated from protobuf field string type = 1; - * @param string $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkString($var, True); - $this->type = $var; - - return $this; - } - - /** - * @return string - */ - public function getTypeDetails() - { - return $this->whichOneof("type_details"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition.php deleted file mode 100644 index 60f40b17011f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.visionai.v1.Partition - */ -class Partition extends \Google\Protobuf\Internal\Message -{ - /** - * Partition of asset in time. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; - */ - protected $temporal_partition = null; - /** - * Partition of asset in space. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; - */ - protected $spatial_partition = null; - /** - * Partition of asset in time. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; - */ - protected $relative_temporal_partition = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $temporal_partition - * Partition of asset in time. - * @type \Google\Cloud\VisionAI\V1\Partition\SpatialPartition $spatial_partition - * Partition of asset in space. - * @type \Google\Cloud\VisionAI\V1\Partition\RelativeTemporalPartition $relative_temporal_partition - * Partition of asset in time. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Partition of asset in time. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; - * @return \Google\Cloud\VisionAI\V1\Partition\TemporalPartition|null - */ - public function getTemporalPartition() - { - return $this->temporal_partition; - } - - public function hasTemporalPartition() - { - return isset($this->temporal_partition); - } - - public function clearTemporalPartition() - { - unset($this->temporal_partition); - } - - /** - * Partition of asset in time. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition temporal_partition = 1; - * @param \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $var - * @return $this - */ - public function setTemporalPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Partition\TemporalPartition::class); - $this->temporal_partition = $var; - - return $this; - } - - /** - * Partition of asset in space. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; - * @return \Google\Cloud\VisionAI\V1\Partition\SpatialPartition|null - */ - public function getSpatialPartition() - { - return $this->spatial_partition; - } - - public function hasSpatialPartition() - { - return isset($this->spatial_partition); - } - - public function clearSpatialPartition() - { - unset($this->spatial_partition); - } - - /** - * Partition of asset in space. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.SpatialPartition spatial_partition = 2; - * @param \Google\Cloud\VisionAI\V1\Partition\SpatialPartition $var - * @return $this - */ - public function setSpatialPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Partition\SpatialPartition::class); - $this->spatial_partition = $var; - - return $this; - } - - /** - * Partition of asset in time. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; - * @return \Google\Cloud\VisionAI\V1\Partition\RelativeTemporalPartition|null - */ - public function getRelativeTemporalPartition() - { - return $this->relative_temporal_partition; - } - - public function hasRelativeTemporalPartition() - { - return isset($this->relative_temporal_partition); - } - - public function clearRelativeTemporalPartition() - { - unset($this->relative_temporal_partition); - } - - /** - * Partition of asset in time. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.RelativeTemporalPartition relative_temporal_partition = 3; - * @param \Google\Cloud\VisionAI\V1\Partition\RelativeTemporalPartition $var - * @return $this - */ - public function setRelativeTemporalPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Partition\RelativeTemporalPartition::class); - $this->relative_temporal_partition = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/RelativeTemporalPartition.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/RelativeTemporalPartition.php deleted file mode 100644 index e717a6195f8b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/RelativeTemporalPartition.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.visionai.v1.Partition.RelativeTemporalPartition - */ -class RelativeTemporalPartition extends \Google\Protobuf\Internal\Message -{ - /** - * Start time offset of the partition. - * - * Generated from protobuf field .google.protobuf.Duration start_offset = 1; - */ - protected $start_offset = null; - /** - * End time offset of the partition. - * - * Generated from protobuf field .google.protobuf.Duration end_offset = 2; - */ - protected $end_offset = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Duration $start_offset - * Start time offset of the partition. - * @type \Google\Protobuf\Duration $end_offset - * End time offset of the partition. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Start time offset of the partition. - * - * Generated from protobuf field .google.protobuf.Duration start_offset = 1; - * @return \Google\Protobuf\Duration|null - */ - public function getStartOffset() - { - return $this->start_offset; - } - - public function hasStartOffset() - { - return isset($this->start_offset); - } - - public function clearStartOffset() - { - unset($this->start_offset); - } - - /** - * Start time offset of the partition. - * - * Generated from protobuf field .google.protobuf.Duration start_offset = 1; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setStartOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->start_offset = $var; - - return $this; - } - - /** - * End time offset of the partition. - * - * Generated from protobuf field .google.protobuf.Duration end_offset = 2; - * @return \Google\Protobuf\Duration|null - */ - public function getEndOffset() - { - return $this->end_offset; - } - - public function hasEndOffset() - { - return isset($this->end_offset); - } - - public function clearEndOffset() - { - unset($this->end_offset); - } - - /** - * End time offset of the partition. - * - * Generated from protobuf field .google.protobuf.Duration end_offset = 2; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setEndOffset($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->end_offset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/SpatialPartition.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/SpatialPartition.php deleted file mode 100644 index e65d917c32a8..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/SpatialPartition.php +++ /dev/null @@ -1,209 +0,0 @@ -google.cloud.visionai.v1.Partition.SpatialPartition - */ -class SpatialPartition extends \Google\Protobuf\Internal\Message -{ - /** - * The minimum x coordinate value. - * - * Generated from protobuf field optional int64 x_min = 1; - */ - protected $x_min = null; - /** - * The minimum y coordinate value. - * - * Generated from protobuf field optional int64 y_min = 2; - */ - protected $y_min = null; - /** - * The maximum x coordinate value. - * - * Generated from protobuf field optional int64 x_max = 3; - */ - protected $x_max = null; - /** - * The maximum y coordinate value. - * - * Generated from protobuf field optional int64 y_max = 4; - */ - protected $y_max = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $x_min - * The minimum x coordinate value. - * @type int|string $y_min - * The minimum y coordinate value. - * @type int|string $x_max - * The maximum x coordinate value. - * @type int|string $y_max - * The maximum y coordinate value. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The minimum x coordinate value. - * - * Generated from protobuf field optional int64 x_min = 1; - * @return int|string - */ - public function getXMin() - { - return isset($this->x_min) ? $this->x_min : 0; - } - - public function hasXMin() - { - return isset($this->x_min); - } - - public function clearXMin() - { - unset($this->x_min); - } - - /** - * The minimum x coordinate value. - * - * Generated from protobuf field optional int64 x_min = 1; - * @param int|string $var - * @return $this - */ - public function setXMin($var) - { - GPBUtil::checkInt64($var); - $this->x_min = $var; - - return $this; - } - - /** - * The minimum y coordinate value. - * - * Generated from protobuf field optional int64 y_min = 2; - * @return int|string - */ - public function getYMin() - { - return isset($this->y_min) ? $this->y_min : 0; - } - - public function hasYMin() - { - return isset($this->y_min); - } - - public function clearYMin() - { - unset($this->y_min); - } - - /** - * The minimum y coordinate value. - * - * Generated from protobuf field optional int64 y_min = 2; - * @param int|string $var - * @return $this - */ - public function setYMin($var) - { - GPBUtil::checkInt64($var); - $this->y_min = $var; - - return $this; - } - - /** - * The maximum x coordinate value. - * - * Generated from protobuf field optional int64 x_max = 3; - * @return int|string - */ - public function getXMax() - { - return isset($this->x_max) ? $this->x_max : 0; - } - - public function hasXMax() - { - return isset($this->x_max); - } - - public function clearXMax() - { - unset($this->x_max); - } - - /** - * The maximum x coordinate value. - * - * Generated from protobuf field optional int64 x_max = 3; - * @param int|string $var - * @return $this - */ - public function setXMax($var) - { - GPBUtil::checkInt64($var); - $this->x_max = $var; - - return $this; - } - - /** - * The maximum y coordinate value. - * - * Generated from protobuf field optional int64 y_max = 4; - * @return int|string - */ - public function getYMax() - { - return isset($this->y_max) ? $this->y_max : 0; - } - - public function hasYMax() - { - return isset($this->y_max); - } - - public function clearYMax() - { - unset($this->y_max); - } - - /** - * The maximum y coordinate value. - * - * Generated from protobuf field optional int64 y_max = 4; - * @param int|string $var - * @return $this - */ - public function setYMax($var) - { - GPBUtil::checkInt64($var); - $this->y_max = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/TemporalPartition.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/TemporalPartition.php deleted file mode 100644 index 9c8760a59dcf..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Partition/TemporalPartition.php +++ /dev/null @@ -1,122 +0,0 @@ -google.cloud.visionai.v1.Partition.TemporalPartition - */ -class TemporalPartition extends \Google\Protobuf\Internal\Message -{ - /** - * Start time of the partition. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * End time of the partition. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - */ - protected $end_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * Start time of the partition. - * @type \Google\Protobuf\Timestamp $end_time - * End time of the partition. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Start time of the partition. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * Start time of the partition. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * End time of the partition. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEndTime() - { - return $this->end_time; - } - - public function hasEndTime() - { - return isset($this->end_time); - } - - public function clearEndTime() - { - unset($this->end_time); - } - - /** - * End time of the partition. - * - * Generated from protobuf field .google.protobuf.Timestamp end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->end_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonBlurConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonBlurConfig.php deleted file mode 100644 index ef69ac873438..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonBlurConfig.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.visionai.v1.PersonBlurConfig - */ -class PersonBlurConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Person blur type. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType person_blur_type = 1; - */ - protected $person_blur_type = 0; - /** - * Whether only blur faces other than the whole object in the processor. - * - * Generated from protobuf field bool faces_only = 2; - */ - protected $faces_only = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $person_blur_type - * Person blur type. - * @type bool $faces_only - * Whether only blur faces other than the whole object in the processor. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Person blur type. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType person_blur_type = 1; - * @return int - */ - public function getPersonBlurType() - { - return $this->person_blur_type; - } - - /** - * Person blur type. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType person_blur_type = 1; - * @param int $var - * @return $this - */ - public function setPersonBlurType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\PersonBlurConfig\PersonBlurType::class); - $this->person_blur_type = $var; - - return $this; - } - - /** - * Whether only blur faces other than the whole object in the processor. - * - * Generated from protobuf field bool faces_only = 2; - * @return bool - */ - public function getFacesOnly() - { - return $this->faces_only; - } - - /** - * Whether only blur faces other than the whole object in the processor. - * - * Generated from protobuf field bool faces_only = 2; - * @param bool $var - * @return $this - */ - public function setFacesOnly($var) - { - GPBUtil::checkBool($var); - $this->faces_only = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonBlurConfig/PersonBlurType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonBlurConfig/PersonBlurType.php deleted file mode 100644 index 5d6ade6b08a0..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonBlurConfig/PersonBlurType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.visionai.v1.PersonBlurConfig.PersonBlurType - */ -class PersonBlurType -{ - /** - * PersonBlur Type UNSPECIFIED. - * - * Generated from protobuf enum PERSON_BLUR_TYPE_UNSPECIFIED = 0; - */ - const PERSON_BLUR_TYPE_UNSPECIFIED = 0; - /** - * FaceBlur Type full occlusion. - * - * Generated from protobuf enum FULL_OCCULUSION = 1; - */ - const FULL_OCCULUSION = 1; - /** - * FaceBlur Type blur filter. - * - * Generated from protobuf enum BLUR_FILTER = 2; - */ - const BLUR_FILTER = 2; - - private static $valueToName = [ - self::PERSON_BLUR_TYPE_UNSPECIFIED => 'PERSON_BLUR_TYPE_UNSPECIFIED', - self::FULL_OCCULUSION => 'FULL_OCCULUSION', - self::BLUR_FILTER => 'BLUR_FILTER', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonVehicleDetectionConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonVehicleDetectionConfig.php deleted file mode 100644 index 43c0a9f7aa37..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonVehicleDetectionConfig.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.visionai.v1.PersonVehicleDetectionConfig - */ -class PersonVehicleDetectionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * At least one of enable_people_counting and enable_vehicle_counting fields - * must be set to true. - * Whether to count the appearances of people, output counts have 'people' as - * the key. - * - * Generated from protobuf field bool enable_people_counting = 1; - */ - protected $enable_people_counting = false; - /** - * Whether to count the appearances of vehicles, output counts will have - * 'vehicle' as the key. - * - * Generated from protobuf field bool enable_vehicle_counting = 2; - */ - protected $enable_vehicle_counting = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_people_counting - * At least one of enable_people_counting and enable_vehicle_counting fields - * must be set to true. - * Whether to count the appearances of people, output counts have 'people' as - * the key. - * @type bool $enable_vehicle_counting - * Whether to count the appearances of vehicles, output counts will have - * 'vehicle' as the key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * At least one of enable_people_counting and enable_vehicle_counting fields - * must be set to true. - * Whether to count the appearances of people, output counts have 'people' as - * the key. - * - * Generated from protobuf field bool enable_people_counting = 1; - * @return bool - */ - public function getEnablePeopleCounting() - { - return $this->enable_people_counting; - } - - /** - * At least one of enable_people_counting and enable_vehicle_counting fields - * must be set to true. - * Whether to count the appearances of people, output counts have 'people' as - * the key. - * - * Generated from protobuf field bool enable_people_counting = 1; - * @param bool $var - * @return $this - */ - public function setEnablePeopleCounting($var) - { - GPBUtil::checkBool($var); - $this->enable_people_counting = $var; - - return $this; - } - - /** - * Whether to count the appearances of vehicles, output counts will have - * 'vehicle' as the key. - * - * Generated from protobuf field bool enable_vehicle_counting = 2; - * @return bool - */ - public function getEnableVehicleCounting() - { - return $this->enable_vehicle_counting; - } - - /** - * Whether to count the appearances of vehicles, output counts will have - * 'vehicle' as the key. - * - * Generated from protobuf field bool enable_vehicle_counting = 2; - * @param bool $var - * @return $this - */ - public function setEnableVehicleCounting($var) - { - GPBUtil::checkBool($var); - $this->enable_vehicle_counting = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionConfig.php deleted file mode 100644 index 0fa363255e32..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionConfig.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig - */ -class PersonalProtectiveEquipmentDetectionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Whether to enable face coverage detection. - * - * Generated from protobuf field bool enable_face_coverage_detection = 1; - */ - protected $enable_face_coverage_detection = false; - /** - * Whether to enable head coverage detection. - * - * Generated from protobuf field bool enable_head_coverage_detection = 2; - */ - protected $enable_head_coverage_detection = false; - /** - * Whether to enable hands coverage detection. - * - * Generated from protobuf field bool enable_hands_coverage_detection = 3; - */ - protected $enable_hands_coverage_detection = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $enable_face_coverage_detection - * Whether to enable face coverage detection. - * @type bool $enable_head_coverage_detection - * Whether to enable head coverage detection. - * @type bool $enable_hands_coverage_detection - * Whether to enable hands coverage detection. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Whether to enable face coverage detection. - * - * Generated from protobuf field bool enable_face_coverage_detection = 1; - * @return bool - */ - public function getEnableFaceCoverageDetection() - { - return $this->enable_face_coverage_detection; - } - - /** - * Whether to enable face coverage detection. - * - * Generated from protobuf field bool enable_face_coverage_detection = 1; - * @param bool $var - * @return $this - */ - public function setEnableFaceCoverageDetection($var) - { - GPBUtil::checkBool($var); - $this->enable_face_coverage_detection = $var; - - return $this; - } - - /** - * Whether to enable head coverage detection. - * - * Generated from protobuf field bool enable_head_coverage_detection = 2; - * @return bool - */ - public function getEnableHeadCoverageDetection() - { - return $this->enable_head_coverage_detection; - } - - /** - * Whether to enable head coverage detection. - * - * Generated from protobuf field bool enable_head_coverage_detection = 2; - * @param bool $var - * @return $this - */ - public function setEnableHeadCoverageDetection($var) - { - GPBUtil::checkBool($var); - $this->enable_head_coverage_detection = $var; - - return $this; - } - - /** - * Whether to enable hands coverage detection. - * - * Generated from protobuf field bool enable_hands_coverage_detection = 3; - * @return bool - */ - public function getEnableHandsCoverageDetection() - { - return $this->enable_hands_coverage_detection; - } - - /** - * Whether to enable hands coverage detection. - * - * Generated from protobuf field bool enable_hands_coverage_detection = 3; - * @param bool $var - * @return $this - */ - public function setEnableHandsCoverageDetection($var) - { - GPBUtil::checkBool($var); - $this->enable_hands_coverage_detection = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput.php deleted file mode 100644 index 8ef3843f8e22..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput - */ -class PersonalProtectiveEquipmentDetectionOutput extends \Google\Protobuf\Internal\Message -{ - /** - * Current timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp current_time = 1; - */ - protected $current_time = null; - /** - * A list of DetectedPersons. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; - */ - private $detected_persons; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $current_time - * Current timestamp. - * @type \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\DetectedPerson[] $detected_persons - * A list of DetectedPersons. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * Current timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp current_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCurrentTime() - { - return $this->current_time; - } - - public function hasCurrentTime() - { - return isset($this->current_time); - } - - public function clearCurrentTime() - { - unset($this->current_time); - } - - /** - * Current timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp current_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCurrentTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->current_time = $var; - - return $this; - } - - /** - * A list of DetectedPersons. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\DetectedPerson> - */ - public function getDetectedPersons() - { - return $this->detected_persons; - } - - /** - * A list of DetectedPersons. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson detected_persons = 2; - * @param \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\DetectedPerson[] $var - * @return $this - */ - public function setDetectedPersons($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\DetectedPerson::class); - $this->detected_persons = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/DetectedPerson.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/DetectedPerson.php deleted file mode 100644 index 4ebb72e54bf7..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/DetectedPerson.php +++ /dev/null @@ -1,414 +0,0 @@ -google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.DetectedPerson - */ -class DetectedPerson extends \Google\Protobuf\Internal\Message -{ - /** - * The id of detected person. - * - * Generated from protobuf field int64 person_id = 1; - */ - protected $person_id = 0; - /** - * The info of detected person identified box. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; - */ - protected $detected_person_identified_box = null; - /** - * The info of detected person associated ppe identified boxes. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; - */ - private $detected_ppe_identified_boxes; - /** - * Coverage score for each body part. - * Coverage score for face. - * - * Generated from protobuf field optional float face_coverage_score = 4; - */ - protected $face_coverage_score = null; - /** - * Coverage score for eyes. - * - * Generated from protobuf field optional float eyes_coverage_score = 5; - */ - protected $eyes_coverage_score = null; - /** - * Coverage score for head. - * - * Generated from protobuf field optional float head_coverage_score = 6; - */ - protected $head_coverage_score = null; - /** - * Coverage score for hands. - * - * Generated from protobuf field optional float hands_coverage_score = 7; - */ - protected $hands_coverage_score = null; - /** - * Coverage score for body. - * - * Generated from protobuf field optional float body_coverage_score = 8; - */ - protected $body_coverage_score = null; - /** - * Coverage score for feet. - * - * Generated from protobuf field optional float feet_coverage_score = 9; - */ - protected $feet_coverage_score = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $person_id - * The id of detected person. - * @type \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PersonIdentifiedBox $detected_person_identified_box - * The info of detected person identified box. - * @type \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PPEIdentifiedBox[] $detected_ppe_identified_boxes - * The info of detected person associated ppe identified boxes. - * @type float $face_coverage_score - * Coverage score for each body part. - * Coverage score for face. - * @type float $eyes_coverage_score - * Coverage score for eyes. - * @type float $head_coverage_score - * Coverage score for head. - * @type float $hands_coverage_score - * Coverage score for hands. - * @type float $body_coverage_score - * Coverage score for body. - * @type float $feet_coverage_score - * Coverage score for feet. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * The id of detected person. - * - * Generated from protobuf field int64 person_id = 1; - * @return int|string - */ - public function getPersonId() - { - return $this->person_id; - } - - /** - * The id of detected person. - * - * Generated from protobuf field int64 person_id = 1; - * @param int|string $var - * @return $this - */ - public function setPersonId($var) - { - GPBUtil::checkInt64($var); - $this->person_id = $var; - - return $this; - } - - /** - * The info of detected person identified box. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; - * @return \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PersonIdentifiedBox|null - */ - public function getDetectedPersonIdentifiedBox() - { - return $this->detected_person_identified_box; - } - - public function hasDetectedPersonIdentifiedBox() - { - return isset($this->detected_person_identified_box); - } - - public function clearDetectedPersonIdentifiedBox() - { - unset($this->detected_person_identified_box); - } - - /** - * The info of detected person identified box. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox detected_person_identified_box = 2; - * @param \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PersonIdentifiedBox $var - * @return $this - */ - public function setDetectedPersonIdentifiedBox($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PersonIdentifiedBox::class); - $this->detected_person_identified_box = $var; - - return $this; - } - - /** - * The info of detected person associated ppe identified boxes. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PPEIdentifiedBox> - */ - public function getDetectedPpeIdentifiedBoxes() - { - return $this->detected_ppe_identified_boxes; - } - - /** - * The info of detected person associated ppe identified boxes. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox detected_ppe_identified_boxes = 3; - * @param \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PPEIdentifiedBox[] $var - * @return $this - */ - public function setDetectedPpeIdentifiedBoxes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PPEIdentifiedBox::class); - $this->detected_ppe_identified_boxes = $arr; - - return $this; - } - - /** - * Coverage score for each body part. - * Coverage score for face. - * - * Generated from protobuf field optional float face_coverage_score = 4; - * @return float - */ - public function getFaceCoverageScore() - { - return isset($this->face_coverage_score) ? $this->face_coverage_score : 0.0; - } - - public function hasFaceCoverageScore() - { - return isset($this->face_coverage_score); - } - - public function clearFaceCoverageScore() - { - unset($this->face_coverage_score); - } - - /** - * Coverage score for each body part. - * Coverage score for face. - * - * Generated from protobuf field optional float face_coverage_score = 4; - * @param float $var - * @return $this - */ - public function setFaceCoverageScore($var) - { - GPBUtil::checkFloat($var); - $this->face_coverage_score = $var; - - return $this; - } - - /** - * Coverage score for eyes. - * - * Generated from protobuf field optional float eyes_coverage_score = 5; - * @return float - */ - public function getEyesCoverageScore() - { - return isset($this->eyes_coverage_score) ? $this->eyes_coverage_score : 0.0; - } - - public function hasEyesCoverageScore() - { - return isset($this->eyes_coverage_score); - } - - public function clearEyesCoverageScore() - { - unset($this->eyes_coverage_score); - } - - /** - * Coverage score for eyes. - * - * Generated from protobuf field optional float eyes_coverage_score = 5; - * @param float $var - * @return $this - */ - public function setEyesCoverageScore($var) - { - GPBUtil::checkFloat($var); - $this->eyes_coverage_score = $var; - - return $this; - } - - /** - * Coverage score for head. - * - * Generated from protobuf field optional float head_coverage_score = 6; - * @return float - */ - public function getHeadCoverageScore() - { - return isset($this->head_coverage_score) ? $this->head_coverage_score : 0.0; - } - - public function hasHeadCoverageScore() - { - return isset($this->head_coverage_score); - } - - public function clearHeadCoverageScore() - { - unset($this->head_coverage_score); - } - - /** - * Coverage score for head. - * - * Generated from protobuf field optional float head_coverage_score = 6; - * @param float $var - * @return $this - */ - public function setHeadCoverageScore($var) - { - GPBUtil::checkFloat($var); - $this->head_coverage_score = $var; - - return $this; - } - - /** - * Coverage score for hands. - * - * Generated from protobuf field optional float hands_coverage_score = 7; - * @return float - */ - public function getHandsCoverageScore() - { - return isset($this->hands_coverage_score) ? $this->hands_coverage_score : 0.0; - } - - public function hasHandsCoverageScore() - { - return isset($this->hands_coverage_score); - } - - public function clearHandsCoverageScore() - { - unset($this->hands_coverage_score); - } - - /** - * Coverage score for hands. - * - * Generated from protobuf field optional float hands_coverage_score = 7; - * @param float $var - * @return $this - */ - public function setHandsCoverageScore($var) - { - GPBUtil::checkFloat($var); - $this->hands_coverage_score = $var; - - return $this; - } - - /** - * Coverage score for body. - * - * Generated from protobuf field optional float body_coverage_score = 8; - * @return float - */ - public function getBodyCoverageScore() - { - return isset($this->body_coverage_score) ? $this->body_coverage_score : 0.0; - } - - public function hasBodyCoverageScore() - { - return isset($this->body_coverage_score); - } - - public function clearBodyCoverageScore() - { - unset($this->body_coverage_score); - } - - /** - * Coverage score for body. - * - * Generated from protobuf field optional float body_coverage_score = 8; - * @param float $var - * @return $this - */ - public function setBodyCoverageScore($var) - { - GPBUtil::checkFloat($var); - $this->body_coverage_score = $var; - - return $this; - } - - /** - * Coverage score for feet. - * - * Generated from protobuf field optional float feet_coverage_score = 9; - * @return float - */ - public function getFeetCoverageScore() - { - return isset($this->feet_coverage_score) ? $this->feet_coverage_score : 0.0; - } - - public function hasFeetCoverageScore() - { - return isset($this->feet_coverage_score); - } - - public function clearFeetCoverageScore() - { - unset($this->feet_coverage_score); - } - - /** - * Coverage score for feet. - * - * Generated from protobuf field optional float feet_coverage_score = 9; - * @param float $var - * @return $this - */ - public function setFeetCoverageScore($var) - { - GPBUtil::checkFloat($var); - $this->feet_coverage_score = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/NormalizedBoundingBox.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/NormalizedBoundingBox.php deleted file mode 100644 index 548046f44657..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/NormalizedBoundingBox.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox - */ -class NormalizedBoundingBox extends \Google\Protobuf\Internal\Message -{ - /** - * Min in x coordinate. - * - * Generated from protobuf field float xmin = 1; - */ - protected $xmin = 0.0; - /** - * Min in y coordinate. - * - * Generated from protobuf field float ymin = 2; - */ - protected $ymin = 0.0; - /** - * Width of the bounding box. - * - * Generated from protobuf field float width = 3; - */ - protected $width = 0.0; - /** - * Height of the bounding box. - * - * Generated from protobuf field float height = 4; - */ - protected $height = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $xmin - * Min in x coordinate. - * @type float $ymin - * Min in y coordinate. - * @type float $width - * Width of the bounding box. - * @type float $height - * Height of the bounding box. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * Min in x coordinate. - * - * Generated from protobuf field float xmin = 1; - * @return float - */ - public function getXmin() - { - return $this->xmin; - } - - /** - * Min in x coordinate. - * - * Generated from protobuf field float xmin = 1; - * @param float $var - * @return $this - */ - public function setXmin($var) - { - GPBUtil::checkFloat($var); - $this->xmin = $var; - - return $this; - } - - /** - * Min in y coordinate. - * - * Generated from protobuf field float ymin = 2; - * @return float - */ - public function getYmin() - { - return $this->ymin; - } - - /** - * Min in y coordinate. - * - * Generated from protobuf field float ymin = 2; - * @param float $var - * @return $this - */ - public function setYmin($var) - { - GPBUtil::checkFloat($var); - $this->ymin = $var; - - return $this; - } - - /** - * Width of the bounding box. - * - * Generated from protobuf field float width = 3; - * @return float - */ - public function getWidth() - { - return $this->width; - } - - /** - * Width of the bounding box. - * - * Generated from protobuf field float width = 3; - * @param float $var - * @return $this - */ - public function setWidth($var) - { - GPBUtil::checkFloat($var); - $this->width = $var; - - return $this; - } - - /** - * Height of the bounding box. - * - * Generated from protobuf field float height = 4; - * @return float - */ - public function getHeight() - { - return $this->height; - } - - /** - * Height of the bounding box. - * - * Generated from protobuf field float height = 4; - * @param float $var - * @return $this - */ - public function setHeight($var) - { - GPBUtil::checkFloat($var); - $this->height = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PPEEntity.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PPEEntity.php deleted file mode 100644 index 8bf6bdc07c1f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PPEEntity.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity - */ -class PPEEntity extends \Google\Protobuf\Internal\Message -{ - /** - * Label id. - * - * Generated from protobuf field int64 ppe_label_id = 1; - */ - protected $ppe_label_id = 0; - /** - * Human readable string of the label (Examples: helmet, glove, mask). - * - * Generated from protobuf field string ppe_label_string = 2; - */ - protected $ppe_label_string = ''; - /** - * Human readable string of the super category label (Examples: head_cover, - * hands_cover, face_cover). - * - * Generated from protobuf field string ppe_supercategory_label_string = 3; - */ - protected $ppe_supercategory_label_string = ''; - /** - * Entity id. - * - * Generated from protobuf field int64 ppe_entity_id = 4; - */ - protected $ppe_entity_id = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $ppe_label_id - * Label id. - * @type string $ppe_label_string - * Human readable string of the label (Examples: helmet, glove, mask). - * @type string $ppe_supercategory_label_string - * Human readable string of the super category label (Examples: head_cover, - * hands_cover, face_cover). - * @type int|string $ppe_entity_id - * Entity id. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * Label id. - * - * Generated from protobuf field int64 ppe_label_id = 1; - * @return int|string - */ - public function getPpeLabelId() - { - return $this->ppe_label_id; - } - - /** - * Label id. - * - * Generated from protobuf field int64 ppe_label_id = 1; - * @param int|string $var - * @return $this - */ - public function setPpeLabelId($var) - { - GPBUtil::checkInt64($var); - $this->ppe_label_id = $var; - - return $this; - } - - /** - * Human readable string of the label (Examples: helmet, glove, mask). - * - * Generated from protobuf field string ppe_label_string = 2; - * @return string - */ - public function getPpeLabelString() - { - return $this->ppe_label_string; - } - - /** - * Human readable string of the label (Examples: helmet, glove, mask). - * - * Generated from protobuf field string ppe_label_string = 2; - * @param string $var - * @return $this - */ - public function setPpeLabelString($var) - { - GPBUtil::checkString($var, True); - $this->ppe_label_string = $var; - - return $this; - } - - /** - * Human readable string of the super category label (Examples: head_cover, - * hands_cover, face_cover). - * - * Generated from protobuf field string ppe_supercategory_label_string = 3; - * @return string - */ - public function getPpeSupercategoryLabelString() - { - return $this->ppe_supercategory_label_string; - } - - /** - * Human readable string of the super category label (Examples: head_cover, - * hands_cover, face_cover). - * - * Generated from protobuf field string ppe_supercategory_label_string = 3; - * @param string $var - * @return $this - */ - public function setPpeSupercategoryLabelString($var) - { - GPBUtil::checkString($var, True); - $this->ppe_supercategory_label_string = $var; - - return $this; - } - - /** - * Entity id. - * - * Generated from protobuf field int64 ppe_entity_id = 4; - * @return int|string - */ - public function getPpeEntityId() - { - return $this->ppe_entity_id; - } - - /** - * Entity id. - * - * Generated from protobuf field int64 ppe_entity_id = 4; - * @param int|string $var - * @return $this - */ - public function setPpeEntityId($var) - { - GPBUtil::checkInt64($var); - $this->ppe_entity_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PPEIdentifiedBox.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PPEIdentifiedBox.php deleted file mode 100644 index 773916621507..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PPEIdentifiedBox.php +++ /dev/null @@ -1,189 +0,0 @@ -google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEIdentifiedBox - */ -class PPEIdentifiedBox extends \Google\Protobuf\Internal\Message -{ - /** - * An unique id for this box. - * - * Generated from protobuf field int64 box_id = 1; - */ - protected $box_id = 0; - /** - * Bounding Box in the normalized coordinates. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; - */ - protected $normalized_bounding_box = null; - /** - * Confidence score associated with this box. - * - * Generated from protobuf field float confidence_score = 3; - */ - protected $confidence_score = 0.0; - /** - * PPE entity info. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; - */ - protected $ppe_entity = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $box_id - * An unique id for this box. - * @type \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\NormalizedBoundingBox $normalized_bounding_box - * Bounding Box in the normalized coordinates. - * @type float $confidence_score - * Confidence score associated with this box. - * @type \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PPEEntity $ppe_entity - * PPE entity info. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * An unique id for this box. - * - * Generated from protobuf field int64 box_id = 1; - * @return int|string - */ - public function getBoxId() - { - return $this->box_id; - } - - /** - * An unique id for this box. - * - * Generated from protobuf field int64 box_id = 1; - * @param int|string $var - * @return $this - */ - public function setBoxId($var) - { - GPBUtil::checkInt64($var); - $this->box_id = $var; - - return $this; - } - - /** - * Bounding Box in the normalized coordinates. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; - * @return \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\NormalizedBoundingBox|null - */ - public function getNormalizedBoundingBox() - { - return $this->normalized_bounding_box; - } - - public function hasNormalizedBoundingBox() - { - return isset($this->normalized_bounding_box); - } - - public function clearNormalizedBoundingBox() - { - unset($this->normalized_bounding_box); - } - - /** - * Bounding Box in the normalized coordinates. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; - * @param \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\NormalizedBoundingBox $var - * @return $this - */ - public function setNormalizedBoundingBox($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\NormalizedBoundingBox::class); - $this->normalized_bounding_box = $var; - - return $this; - } - - /** - * Confidence score associated with this box. - * - * Generated from protobuf field float confidence_score = 3; - * @return float - */ - public function getConfidenceScore() - { - return $this->confidence_score; - } - - /** - * Confidence score associated with this box. - * - * Generated from protobuf field float confidence_score = 3; - * @param float $var - * @return $this - */ - public function setConfidenceScore($var) - { - GPBUtil::checkFloat($var); - $this->confidence_score = $var; - - return $this; - } - - /** - * PPE entity info. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; - * @return \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PPEEntity|null - */ - public function getPpeEntity() - { - return $this->ppe_entity; - } - - public function hasPpeEntity() - { - return isset($this->ppe_entity); - } - - public function clearPpeEntity() - { - unset($this->ppe_entity); - } - - /** - * PPE entity info. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PPEEntity ppe_entity = 4; - * @param \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PPEEntity $var - * @return $this - */ - public function setPpeEntity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PPEEntity::class); - $this->ppe_entity = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PersonEntity.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PersonEntity.php deleted file mode 100644 index 12e3a7000fd7..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PersonEntity.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity - */ -class PersonEntity extends \Google\Protobuf\Internal\Message -{ - /** - * Entity id. - * - * Generated from protobuf field int64 person_entity_id = 1; - */ - protected $person_entity_id = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $person_entity_id - * Entity id. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * Entity id. - * - * Generated from protobuf field int64 person_entity_id = 1; - * @return int|string - */ - public function getPersonEntityId() - { - return $this->person_entity_id; - } - - /** - * Entity id. - * - * Generated from protobuf field int64 person_entity_id = 1; - * @param int|string $var - * @return $this - */ - public function setPersonEntityId($var) - { - GPBUtil::checkInt64($var); - $this->person_entity_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PersonIdentifiedBox.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PersonIdentifiedBox.php deleted file mode 100644 index b638832d3ce8..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/PersonalProtectiveEquipmentDetectionOutput/PersonIdentifiedBox.php +++ /dev/null @@ -1,190 +0,0 @@ -google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonIdentifiedBox - */ -class PersonIdentifiedBox extends \Google\Protobuf\Internal\Message -{ - /** - * An unique id for this box. - * - * Generated from protobuf field int64 box_id = 1; - */ - protected $box_id = 0; - /** - * Bounding Box in the normalized coordinates. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; - */ - protected $normalized_bounding_box = null; - /** - * Confidence score associated with this box. - * - * Generated from protobuf field float confidence_score = 3; - */ - protected $confidence_score = 0.0; - /** - * Person entity info. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; - */ - protected $person_entity = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $box_id - * An unique id for this box. - * @type \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\NormalizedBoundingBox $normalized_bounding_box - * Bounding Box in the normalized coordinates. - * @type float $confidence_score - * Confidence score associated with this box. - * @type \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PersonEntity $person_entity - * Person entity info. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * An unique id for this box. - * - * Generated from protobuf field int64 box_id = 1; - * @return int|string - */ - public function getBoxId() - { - return $this->box_id; - } - - /** - * An unique id for this box. - * - * Generated from protobuf field int64 box_id = 1; - * @param int|string $var - * @return $this - */ - public function setBoxId($var) - { - GPBUtil::checkInt64($var); - $this->box_id = $var; - - return $this; - } - - /** - * Bounding Box in the normalized coordinates. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; - * @return \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\NormalizedBoundingBox|null - */ - public function getNormalizedBoundingBox() - { - return $this->normalized_bounding_box; - } - - public function hasNormalizedBoundingBox() - { - return isset($this->normalized_bounding_box); - } - - public function clearNormalizedBoundingBox() - { - unset($this->normalized_bounding_box); - } - - /** - * Bounding Box in the normalized coordinates. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.NormalizedBoundingBox normalized_bounding_box = 2; - * @param \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\NormalizedBoundingBox $var - * @return $this - */ - public function setNormalizedBoundingBox($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\NormalizedBoundingBox::class); - $this->normalized_bounding_box = $var; - - return $this; - } - - /** - * Confidence score associated with this box. - * - * Generated from protobuf field float confidence_score = 3; - * @return float - */ - public function getConfidenceScore() - { - return $this->confidence_score; - } - - /** - * Confidence score associated with this box. - * - * Generated from protobuf field float confidence_score = 3; - * @param float $var - * @return $this - */ - public function setConfidenceScore($var) - { - GPBUtil::checkFloat($var); - $this->confidence_score = $var; - - return $this; - } - - /** - * Person entity info. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; - * @return \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PersonEntity|null - */ - public function getPersonEntity() - { - return $this->person_entity; - } - - public function hasPersonEntity() - { - return isset($this->person_entity); - } - - public function clearPersonEntity() - { - unset($this->person_entity); - } - - /** - * Person entity info. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionOutput.PersonEntity person_entity = 4; - * @param \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PersonEntity $var - * @return $this - */ - public function setPersonEntity($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionOutput\PersonEntity::class); - $this->person_entity = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Process.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Process.php deleted file mode 100644 index 9d17aa91df8f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Process.php +++ /dev/null @@ -1,427 +0,0 @@ -google.cloud.visionai.v1.Process - */ -class Process extends \Google\Protobuf\Internal\Message -{ - /** - * The name of resource. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Required. Reference to an existing Analysis resource. - * - * Generated from protobuf field string analysis = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $analysis = ''; - /** - * Optional. Attribute overrides of the Analyzers. - * Format for each single override item: - * "{analyzer_name}:{attribute_key}={value}" - * - * Generated from protobuf field repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $attribute_overrides; - /** - * Optional. Status of the Process. - * - * Generated from protobuf field .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $run_status = null; - /** - * Optional. Run mode of the Process. - * - * Generated from protobuf field .google.cloud.visionai.v1.RunMode run_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $run_mode = 0; - /** - * Optional. Event ID of the input/output streams. - * This is useful when you have a StreamSource/StreamSink operator in the - * Analysis, and you want to manually specify the Event to read from/write to. - * - * Generated from protobuf field string event_id = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $event_id = ''; - /** - * Optional. Optional: Batch ID of the Process. - * - * Generated from protobuf field string batch_id = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $batch_id = ''; - /** - * Optional. Optional: The number of retries for a process in submission mode - * the system should try before declaring failure. By default, no retry will - * be performed. - * - * Generated from protobuf field int32 retry_count = 10 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $retry_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update timestamp. - * @type string $analysis - * Required. Reference to an existing Analysis resource. - * @type string[] $attribute_overrides - * Optional. Attribute overrides of the Analyzers. - * Format for each single override item: - * "{analyzer_name}:{attribute_key}={value}" - * @type \Google\Cloud\VisionAI\V1\RunStatus $run_status - * Optional. Status of the Process. - * @type int $run_mode - * Optional. Run mode of the Process. - * @type string $event_id - * Optional. Event ID of the input/output streams. - * This is useful when you have a StreamSource/StreamSink operator in the - * Analysis, and you want to manually specify the Event to read from/write to. - * @type string $batch_id - * Optional. Optional: Batch ID of the Process. - * @type int $retry_count - * Optional. Optional: The number of retries for a process in submission mode - * the system should try before declaring failure. By default, no retry will - * be performed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaResources::initOnce(); - parent::__construct($data); - } - - /** - * The name of resource. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of resource. - * - * 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 create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Required. Reference to an existing Analysis resource. - * - * Generated from protobuf field string analysis = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getAnalysis() - { - return $this->analysis; - } - - /** - * Required. Reference to an existing Analysis resource. - * - * Generated from protobuf field string analysis = 4 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setAnalysis($var) - { - GPBUtil::checkString($var, True); - $this->analysis = $var; - - return $this; - } - - /** - * Optional. Attribute overrides of the Analyzers. - * Format for each single override item: - * "{analyzer_name}:{attribute_key}={value}" - * - * Generated from protobuf field repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getAttributeOverrides() - { - return $this->attribute_overrides; - } - - /** - * Optional. Attribute overrides of the Analyzers. - * Format for each single override item: - * "{analyzer_name}:{attribute_key}={value}" - * - * Generated from protobuf field repeated string attribute_overrides = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[] $var - * @return $this - */ - public function setAttributeOverrides($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->attribute_overrides = $arr; - - return $this; - } - - /** - * Optional. Status of the Process. - * - * Generated from protobuf field .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\VisionAI\V1\RunStatus|null - */ - public function getRunStatus() - { - return $this->run_status; - } - - public function hasRunStatus() - { - return isset($this->run_status); - } - - public function clearRunStatus() - { - unset($this->run_status); - } - - /** - * Optional. Status of the Process. - * - * Generated from protobuf field .google.cloud.visionai.v1.RunStatus run_status = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\VisionAI\V1\RunStatus $var - * @return $this - */ - public function setRunStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\RunStatus::class); - $this->run_status = $var; - - return $this; - } - - /** - * Optional. Run mode of the Process. - * - * Generated from protobuf field .google.cloud.visionai.v1.RunMode run_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getRunMode() - { - return $this->run_mode; - } - - /** - * Optional. Run mode of the Process. - * - * Generated from protobuf field .google.cloud.visionai.v1.RunMode run_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setRunMode($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\RunMode::class); - $this->run_mode = $var; - - return $this; - } - - /** - * Optional. Event ID of the input/output streams. - * This is useful when you have a StreamSource/StreamSink operator in the - * Analysis, and you want to manually specify the Event to read from/write to. - * - * Generated from protobuf field string event_id = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getEventId() - { - return $this->event_id; - } - - /** - * Optional. Event ID of the input/output streams. - * This is useful when you have a StreamSource/StreamSink operator in the - * Analysis, and you want to manually specify the Event to read from/write to. - * - * Generated from protobuf field string event_id = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setEventId($var) - { - GPBUtil::checkString($var, True); - $this->event_id = $var; - - return $this; - } - - /** - * Optional. Optional: Batch ID of the Process. - * - * Generated from protobuf field string batch_id = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getBatchId() - { - return $this->batch_id; - } - - /** - * Optional. Optional: Batch ID of the Process. - * - * Generated from protobuf field string batch_id = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setBatchId($var) - { - GPBUtil::checkString($var, True); - $this->batch_id = $var; - - return $this; - } - - /** - * Optional. Optional: The number of retries for a process in submission mode - * the system should try before declaring failure. By default, no retry will - * be performed. - * - * Generated from protobuf field int32 retry_count = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getRetryCount() - { - return $this->retry_count; - } - - /** - * Optional. Optional: The number of retries for a process in submission mode - * the system should try before declaring failure. By default, no retry will - * be performed. - * - * Generated from protobuf field int32 retry_count = 10 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setRetryCount($var) - { - GPBUtil::checkInt32($var); - $this->retry_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor.php deleted file mode 100644 index 4f20bf984362..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor.php +++ /dev/null @@ -1,593 +0,0 @@ -google.cloud.visionai.v1.Processor - */ -class Processor extends \Google\Protobuf\Internal\Message -{ - /** - * name of resource. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. [Output only] Create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. [Output only] Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Required. A user friendly display name for the processor. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $display_name = ''; - /** - * Illustrative sentences for describing the functionality of the processor. - * - * Generated from protobuf field string description = 10; - */ - protected $description = ''; - /** - * Output only. Processor Type. - * - * Generated from protobuf field .google.cloud.visionai.v1.Processor.ProcessorType processor_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $processor_type = 0; - /** - * Model Type. - * - * Generated from protobuf field .google.cloud.visionai.v1.ModelType model_type = 13; - */ - protected $model_type = 0; - /** - * Source info for customer created processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; - */ - protected $custom_processor_source_info = null; - /** - * Output only. State of the Processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.Processor.ProcessorState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. [Output only] The input / output specifications of a - * processor, each type of processor has fixed input / output specs which - * cannot be altered by customer. - * - * Generated from protobuf field .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $processor_io_spec = null; - /** - * Output only. The corresponding configuration can be used in the Application - * to customize the behavior of the processor. - * - * Generated from protobuf field string configuration_typeurl = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $configuration_typeurl = ''; - /** - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $supported_annotation_types; - /** - * Indicates if the processor supports post processing. - * - * Generated from protobuf field bool supports_post_processing = 17; - */ - protected $supports_post_processing = false; - /** - * Which instance types this processor supports; if empty, this default to - * STREAMING_PREDICTION. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; - */ - private $supported_instance_types; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * name of resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. [Output only] Create timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. [Output only] Update timestamp. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs. - * @type string $display_name - * Required. A user friendly display name for the processor. - * @type string $description - * Illustrative sentences for describing the functionality of the processor. - * @type int $processor_type - * Output only. Processor Type. - * @type int $model_type - * Model Type. - * @type \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo $custom_processor_source_info - * Source info for customer created processor. - * @type int $state - * Output only. State of the Processor. - * @type \Google\Cloud\VisionAI\V1\ProcessorIOSpec $processor_io_spec - * Output only. [Output only] The input / output specifications of a - * processor, each type of processor has fixed input / output specs which - * cannot be altered by customer. - * @type string $configuration_typeurl - * Output only. The corresponding configuration can be used in the Application - * to customize the behavior of the processor. - * @type int[] $supported_annotation_types - * @type bool $supports_post_processing - * Indicates if the processor supports post processing. - * @type int[] $supported_instance_types - * Which instance types this processor supports; if empty, this default to - * STREAMING_PREDICTION. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * name of resource. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * name of resource. - * - * 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. [Output only] Create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. [Output only] Create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. [Output only] Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. [Output only] Update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Required. A user friendly display name for the processor. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Required. A user friendly display name for the processor. - * - * Generated from protobuf field string display_name = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Illustrative sentences for describing the functionality of the processor. - * - * Generated from protobuf field string description = 10; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Illustrative sentences for describing the functionality of the processor. - * - * Generated from protobuf field string description = 10; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Output only. Processor Type. - * - * Generated from protobuf field .google.cloud.visionai.v1.Processor.ProcessorType processor_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getProcessorType() - { - return $this->processor_type; - } - - /** - * Output only. Processor Type. - * - * Generated from protobuf field .google.cloud.visionai.v1.Processor.ProcessorType processor_type = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setProcessorType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Processor\ProcessorType::class); - $this->processor_type = $var; - - return $this; - } - - /** - * Model Type. - * - * Generated from protobuf field .google.cloud.visionai.v1.ModelType model_type = 13; - * @return int - */ - public function getModelType() - { - return $this->model_type; - } - - /** - * Model Type. - * - * Generated from protobuf field .google.cloud.visionai.v1.ModelType model_type = 13; - * @param int $var - * @return $this - */ - public function setModelType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\ModelType::class); - $this->model_type = $var; - - return $this; - } - - /** - * Source info for customer created processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; - * @return \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo|null - */ - public function getCustomProcessorSourceInfo() - { - return $this->custom_processor_source_info; - } - - public function hasCustomProcessorSourceInfo() - { - return isset($this->custom_processor_source_info); - } - - public function clearCustomProcessorSourceInfo() - { - unset($this->custom_processor_source_info); - } - - /** - * Source info for customer created processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.CustomProcessorSourceInfo custom_processor_source_info = 7; - * @param \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo $var - * @return $this - */ - public function setCustomProcessorSourceInfo($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\CustomProcessorSourceInfo::class); - $this->custom_processor_source_info = $var; - - return $this; - } - - /** - * Output only. State of the Processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.Processor.ProcessorState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the Processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.Processor.ProcessorState state = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\Processor\ProcessorState::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. [Output only] The input / output specifications of a - * processor, each type of processor has fixed input / output specs which - * cannot be altered by customer. - * - * Generated from protobuf field .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\VisionAI\V1\ProcessorIOSpec|null - */ - public function getProcessorIoSpec() - { - return $this->processor_io_spec; - } - - public function hasProcessorIoSpec() - { - return isset($this->processor_io_spec); - } - - public function clearProcessorIoSpec() - { - unset($this->processor_io_spec); - } - - /** - * Output only. [Output only] The input / output specifications of a - * processor, each type of processor has fixed input / output specs which - * cannot be altered by customer. - * - * Generated from protobuf field .google.cloud.visionai.v1.ProcessorIOSpec processor_io_spec = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\VisionAI\V1\ProcessorIOSpec $var - * @return $this - */ - public function setProcessorIoSpec($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ProcessorIOSpec::class); - $this->processor_io_spec = $var; - - return $this; - } - - /** - * Output only. The corresponding configuration can be used in the Application - * to customize the behavior of the processor. - * - * Generated from protobuf field string configuration_typeurl = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getConfigurationTypeurl() - { - return $this->configuration_typeurl; - } - - /** - * Output only. The corresponding configuration can be used in the Application - * to customize the behavior of the processor. - * - * Generated from protobuf field string configuration_typeurl = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setConfigurationTypeurl($var) - { - GPBUtil::checkString($var, True); - $this->configuration_typeurl = $var; - - return $this; - } - - /** - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField - */ - public function getSupportedAnnotationTypes() - { - return $this->supported_annotation_types; - } - - /** - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotationType supported_annotation_types = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int[] $var - * @return $this - */ - public function setSupportedAnnotationTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\VisionAI\V1\StreamAnnotationType::class); - $this->supported_annotation_types = $arr; - - return $this; - } - - /** - * Indicates if the processor supports post processing. - * - * Generated from protobuf field bool supports_post_processing = 17; - * @return bool - */ - public function getSupportsPostProcessing() - { - return $this->supports_post_processing; - } - - /** - * Indicates if the processor supports post processing. - * - * Generated from protobuf field bool supports_post_processing = 17; - * @param bool $var - * @return $this - */ - public function setSupportsPostProcessing($var) - { - GPBUtil::checkBool($var); - $this->supports_post_processing = $var; - - return $this; - } - - /** - * Which instance types this processor supports; if empty, this default to - * STREAMING_PREDICTION. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; - * @return RepeatedField - */ - public function getSupportedInstanceTypes() - { - return $this->supported_instance_types; - } - - /** - * Which instance types this processor supports; if empty, this default to - * STREAMING_PREDICTION. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Instance.InstanceType supported_instance_types = 18; - * @param int[] $var - * @return $this - */ - public function setSupportedInstanceTypes($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\VisionAI\V1\Instance\InstanceType::class); - $this->supported_instance_types = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor/ProcessorState.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor/ProcessorState.php deleted file mode 100644 index e9bf8d9c2be1..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor/ProcessorState.php +++ /dev/null @@ -1,73 +0,0 @@ -google.cloud.visionai.v1.Processor.ProcessorState - */ -class ProcessorState -{ - /** - * Unspecified Processor state. - * - * Generated from protobuf enum PROCESSOR_STATE_UNSPECIFIED = 0; - */ - const PROCESSOR_STATE_UNSPECIFIED = 0; - /** - * Processor is being created (not ready for use). - * - * Generated from protobuf enum CREATING = 1; - */ - const CREATING = 1; - /** - * Processor is and ready for use. - * - * Generated from protobuf enum ACTIVE = 2; - */ - const ACTIVE = 2; - /** - * Processor is being deleted (not ready for use). - * - * Generated from protobuf enum DELETING = 3; - */ - const DELETING = 3; - /** - * Processor deleted or creation failed . - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - - private static $valueToName = [ - self::PROCESSOR_STATE_UNSPECIFIED => 'PROCESSOR_STATE_UNSPECIFIED', - self::CREATING => 'CREATING', - self::ACTIVE => 'ACTIVE', - self::DELETING => 'DELETING', - self::FAILED => 'FAILED', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor/ProcessorType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor/ProcessorType.php deleted file mode 100644 index dbb9777b2de7..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Processor/ProcessorType.php +++ /dev/null @@ -1,78 +0,0 @@ -google.cloud.visionai.v1.Processor.ProcessorType - */ -class ProcessorType -{ - /** - * Processor Type UNSPECIFIED. - * - * Generated from protobuf enum PROCESSOR_TYPE_UNSPECIFIED = 0; - */ - const PROCESSOR_TYPE_UNSPECIFIED = 0; - /** - * Processor Type PRETRAINED. - * Pretrained processor is developed by Vision AI App Platform with - * state-of-the-art vision data processing functionality, like occupancy - * counting or person blur. Pretrained processor is usually publicly - * available. - * - * Generated from protobuf enum PRETRAINED = 1; - */ - const PRETRAINED = 1; - /** - * Processor Type CUSTOM. - * Custom processors are specialized processors which are either uploaded by - * customers or imported from other GCP platform (for example Vertex AI). - * Custom processor is only visible to the creator. - * - * Generated from protobuf enum CUSTOM = 2; - */ - const CUSTOM = 2; - /** - * Processor Type CONNECTOR. - * Connector processors are special processors which perform I/O for the - * application, they do not processing the data but either deliver the data - * to other processors or receive data from other processors. - * - * Generated from protobuf enum CONNECTOR = 3; - */ - const CONNECTOR = 3; - - private static $valueToName = [ - self::PROCESSOR_TYPE_UNSPECIFIED => 'PROCESSOR_TYPE_UNSPECIFIED', - self::PRETRAINED => 'PRETRAINED', - self::CUSTOM => 'CUSTOM', - self::CONNECTOR => 'CONNECTOR', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorConfig.php deleted file mode 100644 index 53cc688d65f8..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorConfig.php +++ /dev/null @@ -1,618 +0,0 @@ -google.cloud.visionai.v1.ProcessorConfig - */ -class ProcessorConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Experimental configurations. Structured object containing not-yet-stable - * processor parameters. - * - * Generated from protobuf field .google.protobuf.Struct experimental_config = 26; - */ - protected $experimental_config = null; - protected $processor_config; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\VideoStreamInputConfig $video_stream_input_config - * Configs of stream input processor. - * @type \Google\Cloud\VisionAI\V1\AIEnabledDevicesInputConfig $ai_enabled_devices_input_config - * Config of AI-enabled input devices. - * @type \Google\Cloud\VisionAI\V1\MediaWarehouseConfig $media_warehouse_config - * Configs of media warehouse processor. - * @type \Google\Cloud\VisionAI\V1\PersonBlurConfig $person_blur_config - * Configs of person blur processor. - * @type \Google\Cloud\VisionAI\V1\OccupancyCountConfig $occupancy_count_config - * Configs of occupancy count processor. - * @type \Google\Cloud\VisionAI\V1\PersonVehicleDetectionConfig $person_vehicle_detection_config - * Configs of Person Vehicle Detection processor. - * @type \Google\Cloud\VisionAI\V1\VertexAutoMLVisionConfig $vertex_automl_vision_config - * Configs of Vertex AutoML vision processor. - * @type \Google\Cloud\VisionAI\V1\VertexAutoMLVideoConfig $vertex_automl_video_config - * Configs of Vertex AutoML video processor. - * @type \Google\Cloud\VisionAI\V1\VertexCustomConfig $vertex_custom_config - * Configs of Vertex Custom processor. - * @type \Google\Cloud\VisionAI\V1\GeneralObjectDetectionConfig $general_object_detection_config - * Configs of General Object Detection processor. - * @type \Google\Cloud\VisionAI\V1\BigQueryConfig $big_query_config - * Configs of BigQuery processor. - * @type \Google\Cloud\VisionAI\V1\GcsOutputConfig $gcs_output_config - * Configs of Cloud Storage output processor. - * @type \Google\Cloud\VisionAI\V1\ProductRecognizerConfig $product_recognizer_config - * Runtime configs of Product Recognizer processor. - * @type \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionConfig $personal_protective_equipment_detection_config - * Configs of personal_protective_equipment_detection_config - * @type \Google\Cloud\VisionAI\V1\TagRecognizerConfig $tag_recognizer_config - * Runtime configs of Tag Recognizer processor. - * @type \Google\Cloud\VisionAI\V1\UniversalInputConfig $universal_input_config - * Runtime configs of UniversalInput processor. - * @type \Google\Protobuf\Struct $experimental_config - * Experimental configurations. Structured object containing not-yet-stable - * processor parameters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Configs of stream input processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.VideoStreamInputConfig video_stream_input_config = 9; - * @return \Google\Cloud\VisionAI\V1\VideoStreamInputConfig|null - */ - public function getVideoStreamInputConfig() - { - return $this->readOneof(9); - } - - public function hasVideoStreamInputConfig() - { - return $this->hasOneof(9); - } - - /** - * Configs of stream input processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.VideoStreamInputConfig video_stream_input_config = 9; - * @param \Google\Cloud\VisionAI\V1\VideoStreamInputConfig $var - * @return $this - */ - public function setVideoStreamInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\VideoStreamInputConfig::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Config of AI-enabled input devices. - * - * Generated from protobuf field .google.cloud.visionai.v1.AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20; - * @return \Google\Cloud\VisionAI\V1\AIEnabledDevicesInputConfig|null - */ - public function getAiEnabledDevicesInputConfig() - { - return $this->readOneof(20); - } - - public function hasAiEnabledDevicesInputConfig() - { - return $this->hasOneof(20); - } - - /** - * Config of AI-enabled input devices. - * - * Generated from protobuf field .google.cloud.visionai.v1.AIEnabledDevicesInputConfig ai_enabled_devices_input_config = 20; - * @param \Google\Cloud\VisionAI\V1\AIEnabledDevicesInputConfig $var - * @return $this - */ - public function setAiEnabledDevicesInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AIEnabledDevicesInputConfig::class); - $this->writeOneof(20, $var); - - return $this; - } - - /** - * Configs of media warehouse processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.MediaWarehouseConfig media_warehouse_config = 10; - * @return \Google\Cloud\VisionAI\V1\MediaWarehouseConfig|null - */ - public function getMediaWarehouseConfig() - { - return $this->readOneof(10); - } - - public function hasMediaWarehouseConfig() - { - return $this->hasOneof(10); - } - - /** - * Configs of media warehouse processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.MediaWarehouseConfig media_warehouse_config = 10; - * @param \Google\Cloud\VisionAI\V1\MediaWarehouseConfig $var - * @return $this - */ - public function setMediaWarehouseConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\MediaWarehouseConfig::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Configs of person blur processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonBlurConfig person_blur_config = 11; - * @return \Google\Cloud\VisionAI\V1\PersonBlurConfig|null - */ - public function getPersonBlurConfig() - { - return $this->readOneof(11); - } - - public function hasPersonBlurConfig() - { - return $this->hasOneof(11); - } - - /** - * Configs of person blur processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonBlurConfig person_blur_config = 11; - * @param \Google\Cloud\VisionAI\V1\PersonBlurConfig $var - * @return $this - */ - public function setPersonBlurConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PersonBlurConfig::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Configs of occupancy count processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountConfig occupancy_count_config = 12; - * @return \Google\Cloud\VisionAI\V1\OccupancyCountConfig|null - */ - public function getOccupancyCountConfig() - { - return $this->readOneof(12); - } - - public function hasOccupancyCountConfig() - { - return $this->hasOneof(12); - } - - /** - * Configs of occupancy count processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.OccupancyCountConfig occupancy_count_config = 12; - * @param \Google\Cloud\VisionAI\V1\OccupancyCountConfig $var - * @return $this - */ - public function setOccupancyCountConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OccupancyCountConfig::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Configs of Person Vehicle Detection processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonVehicleDetectionConfig person_vehicle_detection_config = 15; - * @return \Google\Cloud\VisionAI\V1\PersonVehicleDetectionConfig|null - */ - public function getPersonVehicleDetectionConfig() - { - return $this->readOneof(15); - } - - public function hasPersonVehicleDetectionConfig() - { - return $this->hasOneof(15); - } - - /** - * Configs of Person Vehicle Detection processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonVehicleDetectionConfig person_vehicle_detection_config = 15; - * @param \Google\Cloud\VisionAI\V1\PersonVehicleDetectionConfig $var - * @return $this - */ - public function setPersonVehicleDetectionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PersonVehicleDetectionConfig::class); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * Configs of Vertex AutoML vision processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.VertexAutoMLVisionConfig vertex_automl_vision_config = 13; - * @return \Google\Cloud\VisionAI\V1\VertexAutoMLVisionConfig|null - */ - public function getVertexAutomlVisionConfig() - { - return $this->readOneof(13); - } - - public function hasVertexAutomlVisionConfig() - { - return $this->hasOneof(13); - } - - /** - * Configs of Vertex AutoML vision processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.VertexAutoMLVisionConfig vertex_automl_vision_config = 13; - * @param \Google\Cloud\VisionAI\V1\VertexAutoMLVisionConfig $var - * @return $this - */ - public function setVertexAutomlVisionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\VertexAutoMLVisionConfig::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * Configs of Vertex AutoML video processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.VertexAutoMLVideoConfig vertex_automl_video_config = 14; - * @return \Google\Cloud\VisionAI\V1\VertexAutoMLVideoConfig|null - */ - public function getVertexAutomlVideoConfig() - { - return $this->readOneof(14); - } - - public function hasVertexAutomlVideoConfig() - { - return $this->hasOneof(14); - } - - /** - * Configs of Vertex AutoML video processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.VertexAutoMLVideoConfig vertex_automl_video_config = 14; - * @param \Google\Cloud\VisionAI\V1\VertexAutoMLVideoConfig $var - * @return $this - */ - public function setVertexAutomlVideoConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\VertexAutoMLVideoConfig::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * Configs of Vertex Custom processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.VertexCustomConfig vertex_custom_config = 17; - * @return \Google\Cloud\VisionAI\V1\VertexCustomConfig|null - */ - public function getVertexCustomConfig() - { - return $this->readOneof(17); - } - - public function hasVertexCustomConfig() - { - return $this->hasOneof(17); - } - - /** - * Configs of Vertex Custom processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.VertexCustomConfig vertex_custom_config = 17; - * @param \Google\Cloud\VisionAI\V1\VertexCustomConfig $var - * @return $this - */ - public function setVertexCustomConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\VertexCustomConfig::class); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * Configs of General Object Detection processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.GeneralObjectDetectionConfig general_object_detection_config = 18; - * @return \Google\Cloud\VisionAI\V1\GeneralObjectDetectionConfig|null - */ - public function getGeneralObjectDetectionConfig() - { - return $this->readOneof(18); - } - - public function hasGeneralObjectDetectionConfig() - { - return $this->hasOneof(18); - } - - /** - * Configs of General Object Detection processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.GeneralObjectDetectionConfig general_object_detection_config = 18; - * @param \Google\Cloud\VisionAI\V1\GeneralObjectDetectionConfig $var - * @return $this - */ - public function setGeneralObjectDetectionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\GeneralObjectDetectionConfig::class); - $this->writeOneof(18, $var); - - return $this; - } - - /** - * Configs of BigQuery processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.BigQueryConfig big_query_config = 19; - * @return \Google\Cloud\VisionAI\V1\BigQueryConfig|null - */ - public function getBigQueryConfig() - { - return $this->readOneof(19); - } - - public function hasBigQueryConfig() - { - return $this->hasOneof(19); - } - - /** - * Configs of BigQuery processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.BigQueryConfig big_query_config = 19; - * @param \Google\Cloud\VisionAI\V1\BigQueryConfig $var - * @return $this - */ - public function setBigQueryConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\BigQueryConfig::class); - $this->writeOneof(19, $var); - - return $this; - } - - /** - * Configs of Cloud Storage output processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.GcsOutputConfig gcs_output_config = 27; - * @return \Google\Cloud\VisionAI\V1\GcsOutputConfig|null - */ - public function getGcsOutputConfig() - { - return $this->readOneof(27); - } - - public function hasGcsOutputConfig() - { - return $this->hasOneof(27); - } - - /** - * Configs of Cloud Storage output processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.GcsOutputConfig gcs_output_config = 27; - * @param \Google\Cloud\VisionAI\V1\GcsOutputConfig $var - * @return $this - */ - public function setGcsOutputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\GcsOutputConfig::class); - $this->writeOneof(27, $var); - - return $this; - } - - /** - * Runtime configs of Product Recognizer processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.ProductRecognizerConfig product_recognizer_config = 21; - * @return \Google\Cloud\VisionAI\V1\ProductRecognizerConfig|null - */ - public function getProductRecognizerConfig() - { - return $this->readOneof(21); - } - - public function hasProductRecognizerConfig() - { - return $this->hasOneof(21); - } - - /** - * Runtime configs of Product Recognizer processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.ProductRecognizerConfig product_recognizer_config = 21; - * @param \Google\Cloud\VisionAI\V1\ProductRecognizerConfig $var - * @return $this - */ - public function setProductRecognizerConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ProductRecognizerConfig::class); - $this->writeOneof(21, $var); - - return $this; - } - - /** - * Configs of personal_protective_equipment_detection_config - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22; - * @return \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionConfig|null - */ - public function getPersonalProtectiveEquipmentDetectionConfig() - { - return $this->readOneof(22); - } - - public function hasPersonalProtectiveEquipmentDetectionConfig() - { - return $this->hasOneof(22); - } - - /** - * Configs of personal_protective_equipment_detection_config - * - * Generated from protobuf field .google.cloud.visionai.v1.PersonalProtectiveEquipmentDetectionConfig personal_protective_equipment_detection_config = 22; - * @param \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionConfig $var - * @return $this - */ - public function setPersonalProtectiveEquipmentDetectionConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\PersonalProtectiveEquipmentDetectionConfig::class); - $this->writeOneof(22, $var); - - return $this; - } - - /** - * Runtime configs of Tag Recognizer processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.TagRecognizerConfig tag_recognizer_config = 25; - * @return \Google\Cloud\VisionAI\V1\TagRecognizerConfig|null - */ - public function getTagRecognizerConfig() - { - return $this->readOneof(25); - } - - public function hasTagRecognizerConfig() - { - return $this->hasOneof(25); - } - - /** - * Runtime configs of Tag Recognizer processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.TagRecognizerConfig tag_recognizer_config = 25; - * @param \Google\Cloud\VisionAI\V1\TagRecognizerConfig $var - * @return $this - */ - public function setTagRecognizerConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\TagRecognizerConfig::class); - $this->writeOneof(25, $var); - - return $this; - } - - /** - * Runtime configs of UniversalInput processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.UniversalInputConfig universal_input_config = 28; - * @return \Google\Cloud\VisionAI\V1\UniversalInputConfig|null - */ - public function getUniversalInputConfig() - { - return $this->readOneof(28); - } - - public function hasUniversalInputConfig() - { - return $this->hasOneof(28); - } - - /** - * Runtime configs of UniversalInput processor. - * - * Generated from protobuf field .google.cloud.visionai.v1.UniversalInputConfig universal_input_config = 28; - * @param \Google\Cloud\VisionAI\V1\UniversalInputConfig $var - * @return $this - */ - public function setUniversalInputConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\UniversalInputConfig::class); - $this->writeOneof(28, $var); - - return $this; - } - - /** - * Experimental configurations. Structured object containing not-yet-stable - * processor parameters. - * - * Generated from protobuf field .google.protobuf.Struct experimental_config = 26; - * @return \Google\Protobuf\Struct|null - */ - public function getExperimentalConfig() - { - return $this->experimental_config; - } - - public function hasExperimentalConfig() - { - return isset($this->experimental_config); - } - - public function clearExperimentalConfig() - { - unset($this->experimental_config); - } - - /** - * Experimental configurations. Structured object containing not-yet-stable - * processor parameters. - * - * Generated from protobuf field .google.protobuf.Struct experimental_config = 26; - * @param \Google\Protobuf\Struct $var - * @return $this - */ - public function setExperimentalConfig($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Struct::class); - $this->experimental_config = $var; - - return $this; - } - - /** - * @return string - */ - public function getProcessorConfig() - { - return $this->whichOneof("processor_config"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec.php deleted file mode 100644 index 3a0b389e50f9..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.visionai.v1.ProcessorIOSpec - */ -class ProcessorIOSpec extends \Google\Protobuf\Internal\Message -{ - /** - * For processors with input_channel_specs, the processor must be explicitly - * connected to another processor. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; - */ - private $graph_input_channel_specs; - /** - * The output artifact specifications for the current processor. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; - */ - private $graph_output_channel_specs; - /** - * The input resource that needs to be fed from the application instance. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; - */ - private $instance_resource_input_binding_specs; - /** - * The output resource that the processor will generate per instance. - * Other than the explicitly listed output bindings here, all the processors' - * GraphOutputChannels can be binded to stream resource. The bind name then is - * the same as the GraphOutputChannel's name. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; - */ - private $instance_resource_output_binding_specs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\ProcessorIOSpec\GraphInputChannelSpec[] $graph_input_channel_specs - * For processors with input_channel_specs, the processor must be explicitly - * connected to another processor. - * @type \Google\Cloud\VisionAI\V1\ProcessorIOSpec\GraphOutputChannelSpec[] $graph_output_channel_specs - * The output artifact specifications for the current processor. - * @type \Google\Cloud\VisionAI\V1\ProcessorIOSpec\InstanceResourceInputBindingSpec[] $instance_resource_input_binding_specs - * The input resource that needs to be fed from the application instance. - * @type \Google\Cloud\VisionAI\V1\ProcessorIOSpec\InstanceResourceOutputBindingSpec[] $instance_resource_output_binding_specs - * The output resource that the processor will generate per instance. - * Other than the explicitly listed output bindings here, all the processors' - * GraphOutputChannels can be binded to stream resource. The bind name then is - * the same as the GraphOutputChannel's name. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * For processors with input_channel_specs, the processor must be explicitly - * connected to another processor. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\ProcessorIOSpec\GraphInputChannelSpec> - */ - public function getGraphInputChannelSpecs() - { - return $this->graph_input_channel_specs; - } - - /** - * For processors with input_channel_specs, the processor must be explicitly - * connected to another processor. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec graph_input_channel_specs = 3; - * @param \Google\Cloud\VisionAI\V1\ProcessorIOSpec\GraphInputChannelSpec[] $var - * @return $this - */ - public function setGraphInputChannelSpecs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ProcessorIOSpec\GraphInputChannelSpec::class); - $this->graph_input_channel_specs = $arr; - - return $this; - } - - /** - * The output artifact specifications for the current processor. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\ProcessorIOSpec\GraphOutputChannelSpec> - */ - public function getGraphOutputChannelSpecs() - { - return $this->graph_output_channel_specs; - } - - /** - * The output artifact specifications for the current processor. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec graph_output_channel_specs = 4; - * @param \Google\Cloud\VisionAI\V1\ProcessorIOSpec\GraphOutputChannelSpec[] $var - * @return $this - */ - public function setGraphOutputChannelSpecs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ProcessorIOSpec\GraphOutputChannelSpec::class); - $this->graph_output_channel_specs = $arr; - - return $this; - } - - /** - * The input resource that needs to be fed from the application instance. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\ProcessorIOSpec\InstanceResourceInputBindingSpec> - */ - public function getInstanceResourceInputBindingSpecs() - { - return $this->instance_resource_input_binding_specs; - } - - /** - * The input resource that needs to be fed from the application instance. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec instance_resource_input_binding_specs = 5; - * @param \Google\Cloud\VisionAI\V1\ProcessorIOSpec\InstanceResourceInputBindingSpec[] $var - * @return $this - */ - public function setInstanceResourceInputBindingSpecs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ProcessorIOSpec\InstanceResourceInputBindingSpec::class); - $this->instance_resource_input_binding_specs = $arr; - - return $this; - } - - /** - * The output resource that the processor will generate per instance. - * Other than the explicitly listed output bindings here, all the processors' - * GraphOutputChannels can be binded to stream resource. The bind name then is - * the same as the GraphOutputChannel's name. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\ProcessorIOSpec\InstanceResourceOutputBindingSpec> - */ - public function getInstanceResourceOutputBindingSpecs() - { - return $this->instance_resource_output_binding_specs; - } - - /** - * The output resource that the processor will generate per instance. - * Other than the explicitly listed output bindings here, all the processors' - * GraphOutputChannels can be binded to stream resource. The bind name then is - * the same as the GraphOutputChannel's name. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec instance_resource_output_binding_specs = 6; - * @param \Google\Cloud\VisionAI\V1\ProcessorIOSpec\InstanceResourceOutputBindingSpec[] $var - * @return $this - */ - public function setInstanceResourceOutputBindingSpecs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ProcessorIOSpec\InstanceResourceOutputBindingSpec::class); - $this->instance_resource_output_binding_specs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/GraphInputChannelSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/GraphInputChannelSpec.php deleted file mode 100644 index 48cebf916fa0..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/GraphInputChannelSpec.php +++ /dev/null @@ -1,235 +0,0 @@ -google.cloud.visionai.v1.ProcessorIOSpec.GraphInputChannelSpec - */ -class GraphInputChannelSpec extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the current input channel. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The data types of the current input channel. - * When this field has more than 1 value, it means this input channel can be - * connected to either of these different data types. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataType data_type = 2; - */ - protected $data_type = 0; - /** - * If specified, only those detailed data types can be connected to the - * processor. For example, jpeg stream for MEDIA, or PredictionResult proto - * for PROTO type. If unspecified, then any proto is accepted. - * - * Generated from protobuf field repeated string accepted_data_type_uris = 5; - */ - private $accepted_data_type_uris; - /** - * Whether the current input channel is required by the processor. - * For example, for a processor with required video input and optional audio - * input, if video input is missing, the application will be rejected while - * the audio input can be missing as long as the video input exists. - * - * Generated from protobuf field bool required = 3; - */ - protected $required = false; - /** - * How many input edges can be connected to this input channel. 0 means - * unlimited. - * - * Generated from protobuf field int64 max_connection_allowed = 4; - */ - protected $max_connection_allowed = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the current input channel. - * @type int $data_type - * The data types of the current input channel. - * When this field has more than 1 value, it means this input channel can be - * connected to either of these different data types. - * @type string[] $accepted_data_type_uris - * If specified, only those detailed data types can be connected to the - * processor. For example, jpeg stream for MEDIA, or PredictionResult proto - * for PROTO type. If unspecified, then any proto is accepted. - * @type bool $required - * Whether the current input channel is required by the processor. - * For example, for a processor with required video input and optional audio - * input, if video input is missing, the application will be rejected while - * the audio input can be missing as long as the video input exists. - * @type int|string $max_connection_allowed - * How many input edges can be connected to this input channel. 0 means - * unlimited. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * The name of the current input channel. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the current input channel. - * - * 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 data types of the current input channel. - * When this field has more than 1 value, it means this input channel can be - * connected to either of these different data types. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataType data_type = 2; - * @return int - */ - public function getDataType() - { - return $this->data_type; - } - - /** - * The data types of the current input channel. - * When this field has more than 1 value, it means this input channel can be - * connected to either of these different data types. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataType data_type = 2; - * @param int $var - * @return $this - */ - public function setDataType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\DataType::class); - $this->data_type = $var; - - return $this; - } - - /** - * If specified, only those detailed data types can be connected to the - * processor. For example, jpeg stream for MEDIA, or PredictionResult proto - * for PROTO type. If unspecified, then any proto is accepted. - * - * Generated from protobuf field repeated string accepted_data_type_uris = 5; - * @return RepeatedField - */ - public function getAcceptedDataTypeUris() - { - return $this->accepted_data_type_uris; - } - - /** - * If specified, only those detailed data types can be connected to the - * processor. For example, jpeg stream for MEDIA, or PredictionResult proto - * for PROTO type. If unspecified, then any proto is accepted. - * - * Generated from protobuf field repeated string accepted_data_type_uris = 5; - * @param string[] $var - * @return $this - */ - public function setAcceptedDataTypeUris($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->accepted_data_type_uris = $arr; - - return $this; - } - - /** - * Whether the current input channel is required by the processor. - * For example, for a processor with required video input and optional audio - * input, if video input is missing, the application will be rejected while - * the audio input can be missing as long as the video input exists. - * - * Generated from protobuf field bool required = 3; - * @return bool - */ - public function getRequired() - { - return $this->required; - } - - /** - * Whether the current input channel is required by the processor. - * For example, for a processor with required video input and optional audio - * input, if video input is missing, the application will be rejected while - * the audio input can be missing as long as the video input exists. - * - * Generated from protobuf field bool required = 3; - * @param bool $var - * @return $this - */ - public function setRequired($var) - { - GPBUtil::checkBool($var); - $this->required = $var; - - return $this; - } - - /** - * How many input edges can be connected to this input channel. 0 means - * unlimited. - * - * Generated from protobuf field int64 max_connection_allowed = 4; - * @return int|string - */ - public function getMaxConnectionAllowed() - { - return $this->max_connection_allowed; - } - - /** - * How many input edges can be connected to this input channel. 0 means - * unlimited. - * - * Generated from protobuf field int64 max_connection_allowed = 4; - * @param int|string $var - * @return $this - */ - public function setMaxConnectionAllowed($var) - { - GPBUtil::checkInt64($var); - $this->max_connection_allowed = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/GraphOutputChannelSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/GraphOutputChannelSpec.php deleted file mode 100644 index b872059061b3..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/GraphOutputChannelSpec.php +++ /dev/null @@ -1,128 +0,0 @@ -google.cloud.visionai.v1.ProcessorIOSpec.GraphOutputChannelSpec - */ -class GraphOutputChannelSpec extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the current output channel. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The data type of the current output channel. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataType data_type = 2; - */ - protected $data_type = 0; - /** - * Generated from protobuf field string data_type_uri = 3; - */ - protected $data_type_uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name of the current output channel. - * @type int $data_type - * The data type of the current output channel. - * @type string $data_type_uri - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * The name of the current output channel. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of the current output channel. - * - * 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 data type of the current output channel. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataType data_type = 2; - * @return int - */ - public function getDataType() - { - return $this->data_type; - } - - /** - * The data type of the current output channel. - * - * Generated from protobuf field .google.cloud.visionai.v1.DataType data_type = 2; - * @param int $var - * @return $this - */ - public function setDataType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\DataType::class); - $this->data_type = $var; - - return $this; - } - - /** - * Generated from protobuf field string data_type_uri = 3; - * @return string - */ - public function getDataTypeUri() - { - return $this->data_type_uri; - } - - /** - * Generated from protobuf field string data_type_uri = 3; - * @param string $var - * @return $this - */ - public function setDataTypeUri($var) - { - GPBUtil::checkString($var, True); - $this->data_type_uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/InstanceResourceInputBindingSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/InstanceResourceInputBindingSpec.php deleted file mode 100644 index 712aba19b1d2..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/InstanceResourceInputBindingSpec.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceInputBindingSpec - */ -class InstanceResourceInputBindingSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the input binding, unique within the processor. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - protected $resource_type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $config_type_uri - * The configuration proto that includes the Googleapis resources. I.e. - * type.googleapis.com/google.cloud.vision.v1.StreamWithAnnotation - * @type string $resource_type_uri - * The direct type url of Googleapis resource. i.e. - * type.googleapis.com/google.cloud.vision.v1.Asset - * @type string $name - * Name of the input binding, unique within the processor. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * The configuration proto that includes the Googleapis resources. I.e. - * type.googleapis.com/google.cloud.vision.v1.StreamWithAnnotation - * - * Generated from protobuf field string config_type_uri = 2; - * @return string - */ - public function getConfigTypeUri() - { - return $this->readOneof(2); - } - - public function hasConfigTypeUri() - { - return $this->hasOneof(2); - } - - /** - * The configuration proto that includes the Googleapis resources. I.e. - * type.googleapis.com/google.cloud.vision.v1.StreamWithAnnotation - * - * Generated from protobuf field string config_type_uri = 2; - * @param string $var - * @return $this - */ - public function setConfigTypeUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The direct type url of Googleapis resource. i.e. - * type.googleapis.com/google.cloud.vision.v1.Asset - * - * Generated from protobuf field string resource_type_uri = 3; - * @return string - */ - public function getResourceTypeUri() - { - return $this->readOneof(3); - } - - public function hasResourceTypeUri() - { - return $this->hasOneof(3); - } - - /** - * The direct type url of Googleapis resource. i.e. - * type.googleapis.com/google.cloud.vision.v1.Asset - * - * Generated from protobuf field string resource_type_uri = 3; - * @param string $var - * @return $this - */ - public function setResourceTypeUri($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Name of the input binding, unique within the processor. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the input binding, unique within the processor. - * - * 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; - } - - /** - * @return string - */ - public function getResourceType() - { - return $this->whichOneof("resource_type"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/InstanceResourceOutputBindingSpec.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/InstanceResourceOutputBindingSpec.php deleted file mode 100644 index 4ef1721898b7..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProcessorIOSpec/InstanceResourceOutputBindingSpec.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.visionai.v1.ProcessorIOSpec.InstanceResourceOutputBindingSpec - */ -class InstanceResourceOutputBindingSpec extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the output binding, unique within the processor. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The resource type uri of the acceptable output resource. - * - * Generated from protobuf field string resource_type_uri = 2; - */ - protected $resource_type_uri = ''; - /** - * Whether the output resource needs to be explicitly set in the instance. - * If it is false, the processor will automatically generate it if required. - * - * Generated from protobuf field bool explicit = 3; - */ - protected $explicit = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the output binding, unique within the processor. - * @type string $resource_type_uri - * The resource type uri of the acceptable output resource. - * @type bool $explicit - * Whether the output resource needs to be explicitly set in the instance. - * If it is false, the processor will automatically generate it if required. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Name of the output binding, unique within the processor. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the output binding, unique within the processor. - * - * 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 resource type uri of the acceptable output resource. - * - * Generated from protobuf field string resource_type_uri = 2; - * @return string - */ - public function getResourceTypeUri() - { - return $this->resource_type_uri; - } - - /** - * The resource type uri of the acceptable output resource. - * - * Generated from protobuf field string resource_type_uri = 2; - * @param string $var - * @return $this - */ - public function setResourceTypeUri($var) - { - GPBUtil::checkString($var, True); - $this->resource_type_uri = $var; - - return $this; - } - - /** - * Whether the output resource needs to be explicitly set in the instance. - * If it is false, the processor will automatically generate it if required. - * - * Generated from protobuf field bool explicit = 3; - * @return bool - */ - public function getExplicit() - { - return $this->explicit; - } - - /** - * Whether the output resource needs to be explicitly set in the instance. - * If it is false, the processor will automatically generate it if required. - * - * Generated from protobuf field bool explicit = 3; - * @param bool $var - * @return $this - */ - public function setExplicit($var) - { - GPBUtil::checkBool($var); - $this->explicit = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProductRecognizerConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProductRecognizerConfig.php deleted file mode 100644 index 64161af49bc3..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ProductRecognizerConfig.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.visionai.v1.ProductRecognizerConfig - */ -class ProductRecognizerConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of retail endpoint to use. - * - * Generated from protobuf field string retail_endpoint = 1; - */ - protected $retail_endpoint = ''; - /** - * Confidence threshold to filter detection results. If not set, a system - * default value will be used. - * - * Generated from protobuf field float recognition_confidence_threshold = 2; - */ - protected $recognition_confidence_threshold = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $retail_endpoint - * The resource name of retail endpoint to use. - * @type float $recognition_confidence_threshold - * Confidence threshold to filter detection results. If not set, a system - * default value will be used. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of retail endpoint to use. - * - * Generated from protobuf field string retail_endpoint = 1; - * @return string - */ - public function getRetailEndpoint() - { - return $this->retail_endpoint; - } - - /** - * The resource name of retail endpoint to use. - * - * Generated from protobuf field string retail_endpoint = 1; - * @param string $var - * @return $this - */ - public function setRetailEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->retail_endpoint = $var; - - return $this; - } - - /** - * Confidence threshold to filter detection results. If not set, a system - * default value will be used. - * - * Generated from protobuf field float recognition_confidence_threshold = 2; - * @return float - */ - public function getRecognitionConfidenceThreshold() - { - return $this->recognition_confidence_threshold; - } - - /** - * Confidence threshold to filter detection results. If not set, a system - * default value will be used. - * - * Generated from protobuf field float recognition_confidence_threshold = 2; - * @param float $var - * @return $this - */ - public function setRecognitionConfidenceThreshold($var) - { - GPBUtil::checkFloat($var); - $this->recognition_confidence_threshold = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RawImageDescriptor.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RawImageDescriptor.php deleted file mode 100644 index 9f450c543efc..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RawImageDescriptor.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.visionai.v1.RawImageDescriptor - */ -class RawImageDescriptor extends \Google\Protobuf\Internal\Message -{ - /** - * Raw image format. Its possible values are: "srgb". - * - * Generated from protobuf field string format = 1; - */ - protected $format = ''; - /** - * The height of the image. - * - * Generated from protobuf field int32 height = 2; - */ - protected $height = 0; - /** - * The width of the image. - * - * Generated from protobuf field int32 width = 3; - */ - protected $width = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $format - * Raw image format. Its possible values are: "srgb". - * @type int $height - * The height of the image. - * @type int $width - * The width of the image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingResources::initOnce(); - parent::__construct($data); - } - - /** - * Raw image format. Its possible values are: "srgb". - * - * Generated from protobuf field string format = 1; - * @return string - */ - public function getFormat() - { - return $this->format; - } - - /** - * Raw image format. Its possible values are: "srgb". - * - * Generated from protobuf field string format = 1; - * @param string $var - * @return $this - */ - public function setFormat($var) - { - GPBUtil::checkString($var, True); - $this->format = $var; - - return $this; - } - - /** - * The height of the image. - * - * Generated from protobuf field int32 height = 2; - * @return int - */ - public function getHeight() - { - return $this->height; - } - - /** - * The height of the image. - * - * Generated from protobuf field int32 height = 2; - * @param int $var - * @return $this - */ - public function setHeight($var) - { - GPBUtil::checkInt32($var); - $this->height = $var; - - return $this; - } - - /** - * The width of the image. - * - * Generated from protobuf field int32 width = 3; - * @return int - */ - public function getWidth() - { - return $this->width; - } - - /** - * The width of the image. - * - * Generated from protobuf field int32 width = 3; - * @param int $var - * @return $this - */ - public function setWidth($var) - { - GPBUtil::checkInt32($var); - $this->width = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsControlResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsControlResponse.php deleted file mode 100644 index 7a43892f745e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsControlResponse.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.visionai.v1.ReceiveEventsControlResponse - */ -class ReceiveEventsControlResponse extends \Google\Protobuf\Internal\Message -{ - protected $control; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $heartbeat - * A server heartbeat. - * @type bool $writes_done_request - * A request to the receiver to complete any final writes followed by a - * `WritesDone`; e.g. issue any final `CommitRequest`s. - * May be ignored if `WritesDone` has already been issued at any point - * prior to receiving this message. - * If `WritesDone` does not get issued, then the server will forcefully - * cancel the connection, and the receiver will likely receive an - * uninformative after `Read` returns `false` and `Finish` is called. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - - /** - * A server heartbeat. - * - * Generated from protobuf field bool heartbeat = 1; - * @return bool - */ - public function getHeartbeat() - { - return $this->readOneof(1); - } - - public function hasHeartbeat() - { - return $this->hasOneof(1); - } - - /** - * A server heartbeat. - * - * Generated from protobuf field bool heartbeat = 1; - * @param bool $var - * @return $this - */ - public function setHeartbeat($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A request to the receiver to complete any final writes followed by a - * `WritesDone`; e.g. issue any final `CommitRequest`s. - * May be ignored if `WritesDone` has already been issued at any point - * prior to receiving this message. - * If `WritesDone` does not get issued, then the server will forcefully - * cancel the connection, and the receiver will likely receive an - * uninformative after `Read` returns `false` and `Finish` is called. - * - * Generated from protobuf field bool writes_done_request = 2; - * @return bool - */ - public function getWritesDoneRequest() - { - return $this->readOneof(2); - } - - public function hasWritesDoneRequest() - { - return $this->hasOneof(2); - } - - /** - * A request to the receiver to complete any final writes followed by a - * `WritesDone`; e.g. issue any final `CommitRequest`s. - * May be ignored if `WritesDone` has already been issued at any point - * prior to receiving this message. - * If `WritesDone` does not get issued, then the server will forcefully - * cancel the connection, and the receiver will likely receive an - * uninformative after `Read` returns `false` and `Finish` is called. - * - * Generated from protobuf field bool writes_done_request = 2; - * @param bool $var - * @return $this - */ - public function setWritesDoneRequest($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getControl() - { - return $this->whichOneof("control"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsRequest.php deleted file mode 100644 index 70ec5bfd5edb..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsRequest.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.visionai.v1.ReceiveEventsRequest - */ -class ReceiveEventsRequest extends \Google\Protobuf\Internal\Message -{ - protected $request; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\ReceiveEventsRequest\SetupRequest $setup_request - * The setup request to setup the RPC connection. - * @type \Google\Cloud\VisionAI\V1\CommitRequest $commit_request - * This request checkpoints the consumer's read progress. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - - /** - * The setup request to setup the RPC connection. - * - * Generated from protobuf field .google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest setup_request = 1; - * @return \Google\Cloud\VisionAI\V1\ReceiveEventsRequest\SetupRequest|null - */ - public function getSetupRequest() - { - return $this->readOneof(1); - } - - public function hasSetupRequest() - { - return $this->hasOneof(1); - } - - /** - * The setup request to setup the RPC connection. - * - * Generated from protobuf field .google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest setup_request = 1; - * @param \Google\Cloud\VisionAI\V1\ReceiveEventsRequest\SetupRequest $var - * @return $this - */ - public function setSetupRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ReceiveEventsRequest\SetupRequest::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * This request checkpoints the consumer's read progress. - * - * Generated from protobuf field .google.cloud.visionai.v1.CommitRequest commit_request = 2; - * @return \Google\Cloud\VisionAI\V1\CommitRequest|null - */ - public function getCommitRequest() - { - return $this->readOneof(2); - } - - public function hasCommitRequest() - { - return $this->hasOneof(2); - } - - /** - * This request checkpoints the consumer's read progress. - * - * Generated from protobuf field .google.cloud.visionai.v1.CommitRequest commit_request = 2; - * @param \Google\Cloud\VisionAI\V1\CommitRequest $var - * @return $this - */ - public function setCommitRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\CommitRequest::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getRequest() - { - return $this->whichOneof("request"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsRequest/SetupRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsRequest/SetupRequest.php deleted file mode 100644 index 901aa585652b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsRequest/SetupRequest.php +++ /dev/null @@ -1,300 +0,0 @@ -google.cloud.visionai.v1.ReceiveEventsRequest.SetupRequest - */ -class SetupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The cluster name. - * - * Generated from protobuf field string cluster = 1; - */ - protected $cluster = ''; - /** - * The stream name. The service will return the events for the given stream. - * - * Generated from protobuf field string stream = 2; - */ - protected $stream = ''; - /** - * A name for the receiver to self-identify. - * This is used to keep track of a receiver's read progress. - * - * Generated from protobuf field string receiver = 3; - */ - protected $receiver = ''; - /** - * Controller mode configuration for receiving events from the server. - * - * Generated from protobuf field .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; - */ - protected $controlled_mode = null; - /** - * The maximum duration of server silence before the client determines the - * server unreachable. - * The client must either receive an `Event` update or a heart beat message - * before this duration expires; otherwise, the client will automatically - * cancel the current connection and retry. - * - * Generated from protobuf field .google.protobuf.Duration heartbeat_interval = 5; - */ - protected $heartbeat_interval = null; - /** - * The grace period after which a `writes_done_request` is issued, that a - * `WritesDone` is expected from the client. - * The server is free to cancel the RPC should this expire. - * A system default will be chosen if unset. - * - * Generated from protobuf field .google.protobuf.Duration writes_done_grace_period = 6; - */ - protected $writes_done_grace_period = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cluster - * The cluster name. - * @type string $stream - * The stream name. The service will return the events for the given stream. - * @type string $receiver - * A name for the receiver to self-identify. - * This is used to keep track of a receiver's read progress. - * @type \Google\Cloud\VisionAI\V1\ControlledMode $controlled_mode - * Controller mode configuration for receiving events from the server. - * @type \Google\Protobuf\Duration $heartbeat_interval - * The maximum duration of server silence before the client determines the - * server unreachable. - * The client must either receive an `Event` update or a heart beat message - * before this duration expires; otherwise, the client will automatically - * cancel the current connection and retry. - * @type \Google\Protobuf\Duration $writes_done_grace_period - * The grace period after which a `writes_done_request` is issued, that a - * `WritesDone` is expected from the client. - * The server is free to cancel the RPC should this expire. - * A system default will be chosen if unset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - - /** - * The cluster name. - * - * Generated from protobuf field string cluster = 1; - * @return string - */ - public function getCluster() - { - return $this->cluster; - } - - /** - * The cluster name. - * - * Generated from protobuf field string cluster = 1; - * @param string $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkString($var, True); - $this->cluster = $var; - - return $this; - } - - /** - * The stream name. The service will return the events for the given stream. - * - * Generated from protobuf field string stream = 2; - * @return string - */ - public function getStream() - { - return $this->stream; - } - - /** - * The stream name. The service will return the events for the given stream. - * - * Generated from protobuf field string stream = 2; - * @param string $var - * @return $this - */ - public function setStream($var) - { - GPBUtil::checkString($var, True); - $this->stream = $var; - - return $this; - } - - /** - * A name for the receiver to self-identify. - * This is used to keep track of a receiver's read progress. - * - * Generated from protobuf field string receiver = 3; - * @return string - */ - public function getReceiver() - { - return $this->receiver; - } - - /** - * A name for the receiver to self-identify. - * This is used to keep track of a receiver's read progress. - * - * Generated from protobuf field string receiver = 3; - * @param string $var - * @return $this - */ - public function setReceiver($var) - { - GPBUtil::checkString($var, True); - $this->receiver = $var; - - return $this; - } - - /** - * Controller mode configuration for receiving events from the server. - * - * Generated from protobuf field .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; - * @return \Google\Cloud\VisionAI\V1\ControlledMode|null - */ - public function getControlledMode() - { - return $this->controlled_mode; - } - - public function hasControlledMode() - { - return isset($this->controlled_mode); - } - - public function clearControlledMode() - { - unset($this->controlled_mode); - } - - /** - * Controller mode configuration for receiving events from the server. - * - * Generated from protobuf field .google.cloud.visionai.v1.ControlledMode controlled_mode = 4; - * @param \Google\Cloud\VisionAI\V1\ControlledMode $var - * @return $this - */ - public function setControlledMode($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ControlledMode::class); - $this->controlled_mode = $var; - - return $this; - } - - /** - * The maximum duration of server silence before the client determines the - * server unreachable. - * The client must either receive an `Event` update or a heart beat message - * before this duration expires; otherwise, the client will automatically - * cancel the current connection and retry. - * - * Generated from protobuf field .google.protobuf.Duration heartbeat_interval = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getHeartbeatInterval() - { - return $this->heartbeat_interval; - } - - public function hasHeartbeatInterval() - { - return isset($this->heartbeat_interval); - } - - public function clearHeartbeatInterval() - { - unset($this->heartbeat_interval); - } - - /** - * The maximum duration of server silence before the client determines the - * server unreachable. - * The client must either receive an `Event` update or a heart beat message - * before this duration expires; otherwise, the client will automatically - * cancel the current connection and retry. - * - * Generated from protobuf field .google.protobuf.Duration heartbeat_interval = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setHeartbeatInterval($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->heartbeat_interval = $var; - - return $this; - } - - /** - * The grace period after which a `writes_done_request` is issued, that a - * `WritesDone` is expected from the client. - * The server is free to cancel the RPC should this expire. - * A system default will be chosen if unset. - * - * Generated from protobuf field .google.protobuf.Duration writes_done_grace_period = 6; - * @return \Google\Protobuf\Duration|null - */ - public function getWritesDoneGracePeriod() - { - return $this->writes_done_grace_period; - } - - public function hasWritesDoneGracePeriod() - { - return isset($this->writes_done_grace_period); - } - - public function clearWritesDoneGracePeriod() - { - unset($this->writes_done_grace_period); - } - - /** - * The grace period after which a `writes_done_request` is issued, that a - * `WritesDone` is expected from the client. - * The server is free to cancel the RPC should this expire. - * A system default will be chosen if unset. - * - * Generated from protobuf field .google.protobuf.Duration writes_done_grace_period = 6; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setWritesDoneGracePeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writes_done_grace_period = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsResponse.php deleted file mode 100644 index 06944e249e64..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceiveEventsResponse.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.visionai.v1.ReceiveEventsResponse - */ -class ReceiveEventsResponse extends \Google\Protobuf\Internal\Message -{ - protected $response; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\EventUpdate $event_update - * The event update message. - * @type \Google\Cloud\VisionAI\V1\ReceiveEventsControlResponse $control - * A control message from the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - - /** - * The event update message. - * - * Generated from protobuf field .google.cloud.visionai.v1.EventUpdate event_update = 1; - * @return \Google\Cloud\VisionAI\V1\EventUpdate|null - */ - public function getEventUpdate() - { - return $this->readOneof(1); - } - - public function hasEventUpdate() - { - return $this->hasOneof(1); - } - - /** - * The event update message. - * - * Generated from protobuf field .google.cloud.visionai.v1.EventUpdate event_update = 1; - * @param \Google\Cloud\VisionAI\V1\EventUpdate $var - * @return $this - */ - public function setEventUpdate($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\EventUpdate::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A control message from the server. - * - * Generated from protobuf field .google.cloud.visionai.v1.ReceiveEventsControlResponse control = 2; - * @return \Google\Cloud\VisionAI\V1\ReceiveEventsControlResponse|null - */ - public function getControl() - { - return $this->readOneof(2); - } - - public function hasControl() - { - return $this->hasOneof(2); - } - - /** - * A control message from the server. - * - * Generated from protobuf field .google.cloud.visionai.v1.ReceiveEventsControlResponse control = 2; - * @param \Google\Cloud\VisionAI\V1\ReceiveEventsControlResponse $var - * @return $this - */ - public function setControl($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ReceiveEventsControlResponse::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getResponse() - { - return $this->whichOneof("response"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsControlResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsControlResponse.php deleted file mode 100644 index f1f935e72e77..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsControlResponse.php +++ /dev/null @@ -1,126 +0,0 @@ -google.cloud.visionai.v1.ReceivePacketsControlResponse - */ -class ReceivePacketsControlResponse extends \Google\Protobuf\Internal\Message -{ - protected $control; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $heartbeat - * A server heartbeat. - * @type bool $writes_done_request - * A request to the receiver to complete any final writes followed by a - * `WritesDone`; e.g. issue any final `CommitRequest`s. - * May be ignored if `WritesDone` has already been issued at any point - * prior to receiving this message. - * If `WritesDone` does not get issued, then the server will forcefully - * cancel the connection, and the receiver will likely receive an - * uninformative after `Read` returns `false` and `Finish` is called. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - - /** - * A server heartbeat. - * - * Generated from protobuf field bool heartbeat = 1; - * @return bool - */ - public function getHeartbeat() - { - return $this->readOneof(1); - } - - public function hasHeartbeat() - { - return $this->hasOneof(1); - } - - /** - * A server heartbeat. - * - * Generated from protobuf field bool heartbeat = 1; - * @param bool $var - * @return $this - */ - public function setHeartbeat($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A request to the receiver to complete any final writes followed by a - * `WritesDone`; e.g. issue any final `CommitRequest`s. - * May be ignored if `WritesDone` has already been issued at any point - * prior to receiving this message. - * If `WritesDone` does not get issued, then the server will forcefully - * cancel the connection, and the receiver will likely receive an - * uninformative after `Read` returns `false` and `Finish` is called. - * - * Generated from protobuf field bool writes_done_request = 2; - * @return bool - */ - public function getWritesDoneRequest() - { - return $this->readOneof(2); - } - - public function hasWritesDoneRequest() - { - return $this->hasOneof(2); - } - - /** - * A request to the receiver to complete any final writes followed by a - * `WritesDone`; e.g. issue any final `CommitRequest`s. - * May be ignored if `WritesDone` has already been issued at any point - * prior to receiving this message. - * If `WritesDone` does not get issued, then the server will forcefully - * cancel the connection, and the receiver will likely receive an - * uninformative after `Read` returns `false` and `Finish` is called. - * - * Generated from protobuf field bool writes_done_request = 2; - * @param bool $var - * @return $this - */ - public function setWritesDoneRequest($var) - { - GPBUtil::checkBool($var); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getControl() - { - return $this->whichOneof("control"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsRequest.php deleted file mode 100644 index 2eb3c07681c1..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.visionai.v1.ReceivePacketsRequest - */ -class ReceivePacketsRequest extends \Google\Protobuf\Internal\Message -{ - protected $request; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\ReceivePacketsRequest\SetupRequest $setup_request - * The request to setup the initial state of session. - * The client must send and only send this as the first message. - * @type \Google\Cloud\VisionAI\V1\CommitRequest $commit_request - * This request checkpoints the consumer's read progress. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - - /** - * The request to setup the initial state of session. - * The client must send and only send this as the first message. - * - * Generated from protobuf field .google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest setup_request = 6; - * @return \Google\Cloud\VisionAI\V1\ReceivePacketsRequest\SetupRequest|null - */ - public function getSetupRequest() - { - return $this->readOneof(6); - } - - public function hasSetupRequest() - { - return $this->hasOneof(6); - } - - /** - * The request to setup the initial state of session. - * The client must send and only send this as the first message. - * - * Generated from protobuf field .google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest setup_request = 6; - * @param \Google\Cloud\VisionAI\V1\ReceivePacketsRequest\SetupRequest $var - * @return $this - */ - public function setSetupRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ReceivePacketsRequest\SetupRequest::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * This request checkpoints the consumer's read progress. - * - * Generated from protobuf field .google.cloud.visionai.v1.CommitRequest commit_request = 7; - * @return \Google\Cloud\VisionAI\V1\CommitRequest|null - */ - public function getCommitRequest() - { - return $this->readOneof(7); - } - - public function hasCommitRequest() - { - return $this->hasOneof(7); - } - - /** - * This request checkpoints the consumer's read progress. - * - * Generated from protobuf field .google.cloud.visionai.v1.CommitRequest commit_request = 7; - * @param \Google\Cloud\VisionAI\V1\CommitRequest $var - * @return $this - */ - public function setCommitRequest($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\CommitRequest::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getRequest() - { - return $this->whichOneof("request"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsRequest/SetupRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsRequest/SetupRequest.php deleted file mode 100644 index fb31baf633c7..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsRequest/SetupRequest.php +++ /dev/null @@ -1,306 +0,0 @@ -google.cloud.visionai.v1.ReceivePacketsRequest.SetupRequest - */ -class SetupRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The configurations that specify where packets are retrieved. - * - * Generated from protobuf field .google.cloud.visionai.v1.RequestMetadata metadata = 1; - */ - protected $metadata = null; - /** - * A name for the receiver to self-identify. - * This is used to keep track of a receiver's read progress. - * - * Generated from protobuf field string receiver = 2; - */ - protected $receiver = ''; - /** - * The maximum duration of server silence before the client determines the - * server unreachable. - * The client must either receive a `Packet` or a heart beat message before - * this duration expires; otherwise, the client will automatically cancel - * the current connection and retry. - * - * Generated from protobuf field .google.protobuf.Duration heartbeat_interval = 5; - */ - protected $heartbeat_interval = null; - /** - * The grace period after which a `writes_done_request` is issued, that a - * `WritesDone` is expected from the client. - * The server is free to cancel the RPC should this expire. - * A system default will be chosen if unset. - * - * Generated from protobuf field .google.protobuf.Duration writes_done_grace_period = 6; - */ - protected $writes_done_grace_period = null; - protected $consumer_mode; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\EagerMode $eager_receive_mode - * Options for configuring eager mode. - * @type \Google\Cloud\VisionAI\V1\ControlledMode $controlled_receive_mode - * Options for configuring controlled mode. - * @type \Google\Cloud\VisionAI\V1\RequestMetadata $metadata - * The configurations that specify where packets are retrieved. - * @type string $receiver - * A name for the receiver to self-identify. - * This is used to keep track of a receiver's read progress. - * @type \Google\Protobuf\Duration $heartbeat_interval - * The maximum duration of server silence before the client determines the - * server unreachable. - * The client must either receive a `Packet` or a heart beat message before - * this duration expires; otherwise, the client will automatically cancel - * the current connection and retry. - * @type \Google\Protobuf\Duration $writes_done_grace_period - * The grace period after which a `writes_done_request` is issued, that a - * `WritesDone` is expected from the client. - * The server is free to cancel the RPC should this expire. - * A system default will be chosen if unset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - - /** - * Options for configuring eager mode. - * - * Generated from protobuf field .google.cloud.visionai.v1.EagerMode eager_receive_mode = 3; - * @return \Google\Cloud\VisionAI\V1\EagerMode|null - */ - public function getEagerReceiveMode() - { - return $this->readOneof(3); - } - - public function hasEagerReceiveMode() - { - return $this->hasOneof(3); - } - - /** - * Options for configuring eager mode. - * - * Generated from protobuf field .google.cloud.visionai.v1.EagerMode eager_receive_mode = 3; - * @param \Google\Cloud\VisionAI\V1\EagerMode $var - * @return $this - */ - public function setEagerReceiveMode($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\EagerMode::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Options for configuring controlled mode. - * - * Generated from protobuf field .google.cloud.visionai.v1.ControlledMode controlled_receive_mode = 4; - * @return \Google\Cloud\VisionAI\V1\ControlledMode|null - */ - public function getControlledReceiveMode() - { - return $this->readOneof(4); - } - - public function hasControlledReceiveMode() - { - return $this->hasOneof(4); - } - - /** - * Options for configuring controlled mode. - * - * Generated from protobuf field .google.cloud.visionai.v1.ControlledMode controlled_receive_mode = 4; - * @param \Google\Cloud\VisionAI\V1\ControlledMode $var - * @return $this - */ - public function setControlledReceiveMode($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ControlledMode::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * The configurations that specify where packets are retrieved. - * - * Generated from protobuf field .google.cloud.visionai.v1.RequestMetadata metadata = 1; - * @return \Google\Cloud\VisionAI\V1\RequestMetadata|null - */ - public function getMetadata() - { - return $this->metadata; - } - - public function hasMetadata() - { - return isset($this->metadata); - } - - public function clearMetadata() - { - unset($this->metadata); - } - - /** - * The configurations that specify where packets are retrieved. - * - * Generated from protobuf field .google.cloud.visionai.v1.RequestMetadata metadata = 1; - * @param \Google\Cloud\VisionAI\V1\RequestMetadata $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\RequestMetadata::class); - $this->metadata = $var; - - return $this; - } - - /** - * A name for the receiver to self-identify. - * This is used to keep track of a receiver's read progress. - * - * Generated from protobuf field string receiver = 2; - * @return string - */ - public function getReceiver() - { - return $this->receiver; - } - - /** - * A name for the receiver to self-identify. - * This is used to keep track of a receiver's read progress. - * - * Generated from protobuf field string receiver = 2; - * @param string $var - * @return $this - */ - public function setReceiver($var) - { - GPBUtil::checkString($var, True); - $this->receiver = $var; - - return $this; - } - - /** - * The maximum duration of server silence before the client determines the - * server unreachable. - * The client must either receive a `Packet` or a heart beat message before - * this duration expires; otherwise, the client will automatically cancel - * the current connection and retry. - * - * Generated from protobuf field .google.protobuf.Duration heartbeat_interval = 5; - * @return \Google\Protobuf\Duration|null - */ - public function getHeartbeatInterval() - { - return $this->heartbeat_interval; - } - - public function hasHeartbeatInterval() - { - return isset($this->heartbeat_interval); - } - - public function clearHeartbeatInterval() - { - unset($this->heartbeat_interval); - } - - /** - * The maximum duration of server silence before the client determines the - * server unreachable. - * The client must either receive a `Packet` or a heart beat message before - * this duration expires; otherwise, the client will automatically cancel - * the current connection and retry. - * - * Generated from protobuf field .google.protobuf.Duration heartbeat_interval = 5; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setHeartbeatInterval($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->heartbeat_interval = $var; - - return $this; - } - - /** - * The grace period after which a `writes_done_request` is issued, that a - * `WritesDone` is expected from the client. - * The server is free to cancel the RPC should this expire. - * A system default will be chosen if unset. - * - * Generated from protobuf field .google.protobuf.Duration writes_done_grace_period = 6; - * @return \Google\Protobuf\Duration|null - */ - public function getWritesDoneGracePeriod() - { - return $this->writes_done_grace_period; - } - - public function hasWritesDoneGracePeriod() - { - return isset($this->writes_done_grace_period); - } - - public function clearWritesDoneGracePeriod() - { - unset($this->writes_done_grace_period); - } - - /** - * The grace period after which a `writes_done_request` is issued, that a - * `WritesDone` is expected from the client. - * The server is free to cancel the RPC should this expire. - * A system default will be chosen if unset. - * - * Generated from protobuf field .google.protobuf.Duration writes_done_grace_period = 6; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setWritesDoneGracePeriod($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->writes_done_grace_period = $var; - - return $this; - } - - /** - * @return string - */ - public function getConsumerMode() - { - return $this->whichOneof("consumer_mode"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsResponse.php deleted file mode 100644 index a52bf71879bd..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReceivePacketsResponse.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.visionai.v1.ReceivePacketsResponse - */ -class ReceivePacketsResponse extends \Google\Protobuf\Internal\Message -{ - protected $response; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Packet $packet - * A genuine data payload originating from the sender. - * @type \Google\Cloud\VisionAI\V1\ReceivePacketsControlResponse $control - * A control message from the server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - - /** - * A genuine data payload originating from the sender. - * - * Generated from protobuf field .google.cloud.visionai.v1.Packet packet = 1; - * @return \Google\Cloud\VisionAI\V1\Packet|null - */ - public function getPacket() - { - return $this->readOneof(1); - } - - public function hasPacket() - { - return $this->hasOneof(1); - } - - /** - * A genuine data payload originating from the sender. - * - * Generated from protobuf field .google.cloud.visionai.v1.Packet packet = 1; - * @param \Google\Cloud\VisionAI\V1\Packet $var - * @return $this - */ - public function setPacket($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Packet::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A control message from the server. - * - * Generated from protobuf field .google.cloud.visionai.v1.ReceivePacketsControlResponse control = 3; - * @return \Google\Cloud\VisionAI\V1\ReceivePacketsControlResponse|null - */ - public function getControl() - { - return $this->readOneof(3); - } - - public function hasControl() - { - return $this->hasOneof(3); - } - - /** - * A control message from the server. - * - * Generated from protobuf field .google.cloud.visionai.v1.ReceivePacketsControlResponse control = 3; - * @param \Google\Cloud\VisionAI\V1\ReceivePacketsControlResponse $var - * @return $this - */ - public function setControl($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ReceivePacketsControlResponse::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * @return string - */ - public function getResponse() - { - return $this->whichOneof("response"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Registry.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Registry.php deleted file mode 100644 index 4111d60cb3e4..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Registry.php +++ /dev/null @@ -1,65 +0,0 @@ -google.cloud.visionai.v1.Registry - */ -class Registry -{ - /** - * Registry is unspecified. - * - * Generated from protobuf enum REGISTRY_UNSPECIFIED = 0; - */ - const REGISTRY_UNSPECIFIED = 0; - /** - * Public Registry containing the public Operators released by Google. - * - * Generated from protobuf enum PUBLIC = 1; - */ - const PBPUBLIC = 1; - /** - * Private Registry containing the local registered operators. - * - * Generated from protobuf enum PRIVATE = 2; - */ - const PBPRIVATE = 2; - - private static $valueToName = [ - self::REGISTRY_UNSPECIFIED => 'REGISTRY_UNSPECIFIED', - self::PBPUBLIC => 'PUBLIC', - self::PBPRIVATE => 'PRIVATE', - ]; - - public static function name($value) - { - if (!isset(self::$valueToName[$value])) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no name defined for value %s', __CLASS__, $value)); - } - return self::$valueToName[$value]; - } - - - public static function value($name) - { - $const = __CLASS__ . '::' . strtoupper($name); - if (!defined($const)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReleaseLeaseRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReleaseLeaseRequest.php deleted file mode 100644 index 4be280c04833..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReleaseLeaseRequest.php +++ /dev/null @@ -1,135 +0,0 @@ -google.cloud.visionai.v1.ReleaseLeaseRequest - */ -class ReleaseLeaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Lease id. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * Series name. - * - * Generated from protobuf field string series = 2; - */ - protected $series = ''; - /** - * Lease owner. - * - * Generated from protobuf field string owner = 3; - */ - protected $owner = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Lease id. - * @type string $series - * Series name. - * @type string $owner - * Lease owner. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - - /** - * Lease id. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Lease id. - * - * 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; - } - - /** - * Series name. - * - * Generated from protobuf field string series = 2; - * @return string - */ - public function getSeries() - { - return $this->series; - } - - /** - * Series name. - * - * Generated from protobuf field string series = 2; - * @param string $var - * @return $this - */ - public function setSeries($var) - { - GPBUtil::checkString($var, True); - $this->series = $var; - - return $this; - } - - /** - * Lease owner. - * - * Generated from protobuf field string owner = 3; - * @return string - */ - public function getOwner() - { - return $this->owner; - } - - /** - * Lease owner. - * - * Generated from protobuf field string owner = 3; - * @param string $var - * @return $this - */ - public function setOwner($var) - { - GPBUtil::checkString($var, True); - $this->owner = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReleaseLeaseResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReleaseLeaseResponse.php deleted file mode 100644 index 52cdd04d46d4..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ReleaseLeaseResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.ReleaseLeaseResponse - */ -class ReleaseLeaseResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputRequest.php deleted file mode 100644 index aa744a3bc09c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputRequest.php +++ /dev/null @@ -1,199 +0,0 @@ -google.cloud.visionai.v1.RemoveApplicationStreamInputRequest - */ -class RemoveApplicationStreamInputRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The target stream to remove. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; - */ - private $target_stream_inputs; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * Please see {@see AppPlatformClient::applicationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\RemoveApplicationStreamInputRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * @type \Google\Cloud\VisionAI\V1\RemoveApplicationStreamInputRequest\TargetStreamInput[] $target_stream_inputs - * The target stream to remove. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * 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 target stream to remove. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\RemoveApplicationStreamInputRequest\TargetStreamInput> - */ - public function getTargetStreamInputs() - { - return $this->target_stream_inputs; - } - - /** - * The target stream to remove. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput target_stream_inputs = 2; - * @param \Google\Cloud\VisionAI\V1\RemoveApplicationStreamInputRequest\TargetStreamInput[] $var - * @return $this - */ - public function setTargetStreamInputs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\RemoveApplicationStreamInputRequest\TargetStreamInput::class); - $this->target_stream_inputs = $arr; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputRequest/TargetStreamInput.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputRequest/TargetStreamInput.php deleted file mode 100644 index ba1e30f536b4..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputRequest/TargetStreamInput.php +++ /dev/null @@ -1,60 +0,0 @@ -google.cloud.visionai.v1.RemoveApplicationStreamInputRequest.TargetStreamInput - */ -class TargetStreamInput extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string stream = 1 [(.google.api.resource_reference) = { - */ - protected $stream = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $stream - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string stream = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getStream() - { - return $this->stream; - } - - /** - * Generated from protobuf field string stream = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setStream($var) - { - GPBUtil::checkString($var, True); - $this->stream = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputResponse.php deleted file mode 100644 index 4feb4f9ce02f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveApplicationStreamInputResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.RemoveApplicationStreamInputResponse - */ -class RemoveApplicationStreamInputResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveCollectionItemRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveCollectionItemRequest.php deleted file mode 100644 index 71adf6246716..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveCollectionItemRequest.php +++ /dev/null @@ -1,90 +0,0 @@ -google.cloud.visionai.v1.RemoveCollectionItemRequest - */ -class RemoveCollectionItemRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The item to be removed. - * - * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $item = null; - - /** - * @param \Google\Cloud\VisionAI\V1\CollectionItem $item Required. The item to be removed. - * - * @return \Google\Cloud\VisionAI\V1\RemoveCollectionItemRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\CollectionItem $item): self - { - return (new self()) - ->setItem($item); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\CollectionItem $item - * Required. The item to be removed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The item to be removed. - * - * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\CollectionItem|null - */ - public function getItem() - { - return $this->item; - } - - public function hasItem() - { - return isset($this->item); - } - - public function clearItem() - { - unset($this->item); - } - - /** - * Required. The item to be removed. - * - * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\CollectionItem $var - * @return $this - */ - public function setItem($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\CollectionItem::class); - $this->item = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveCollectionItemResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveCollectionItemResponse.php deleted file mode 100644 index acf4616e8162..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveCollectionItemResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.visionai.v1.RemoveCollectionItemResponse - */ -class RemoveCollectionItemResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The item that has already been removed. - * - * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1; - */ - protected $item = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\CollectionItem $item - * The item that has already been removed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The item that has already been removed. - * - * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1; - * @return \Google\Cloud\VisionAI\V1\CollectionItem|null - */ - public function getItem() - { - return $this->item; - } - - public function hasItem() - { - return isset($this->item); - } - - public function clearItem() - { - unset($this->item); - } - - /** - * The item that has already been removed. - * - * Generated from protobuf field .google.cloud.visionai.v1.CollectionItem item = 1; - * @param \Google\Cloud\VisionAI\V1\CollectionItem $var - * @return $this - */ - public function setItem($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\CollectionItem::class); - $this->item = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetMetadata.php deleted file mode 100644 index 7699d78bd05f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetMetadata.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.visionai.v1.RemoveIndexAssetMetadata - */ -class RemoveIndexAssetMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The status of indexing this asset. - * - * Generated from protobuf field .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; - */ - protected $indexing_status = null; - /** - * The start time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 2; - */ - protected $start_time = null; - /** - * The update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\IndexingStatus $indexing_status - * The status of indexing this asset. - * @type \Google\Protobuf\Timestamp $start_time - * The start time of the operation. - * @type \Google\Protobuf\Timestamp $update_time - * The update time of the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The status of indexing this asset. - * - * Generated from protobuf field .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; - * @return \Google\Cloud\VisionAI\V1\IndexingStatus|null - */ - public function getIndexingStatus() - { - return $this->indexing_status; - } - - public function hasIndexingStatus() - { - return isset($this->indexing_status); - } - - public function clearIndexingStatus() - { - unset($this->indexing_status); - } - - /** - * The status of indexing this asset. - * - * Generated from protobuf field .google.cloud.visionai.v1.IndexingStatus indexing_status = 1; - * @param \Google\Cloud\VisionAI\V1\IndexingStatus $var - * @return $this - */ - public function setIndexingStatus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\IndexingStatus::class); - $this->indexing_status = $var; - - return $this; - } - - /** - * The start time of the operation. - * - * 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 of the operation. - * - * 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 update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetRequest.php deleted file mode 100644 index 5b5f85327568..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetRequest.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.visionai.v1.RemoveIndexAssetRequest - */ -class RemoveIndexAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the asset to index. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. The name of the index. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * - * Generated from protobuf field string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - */ - protected $index = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the asset to index. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * @type string $index - * Optional. The name of the index. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the asset to index. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the asset to index. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The name of the index. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * - * Generated from protobuf field string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @return string - */ - public function getIndex() - { - return $this->index; - } - - /** - * Optional. The name of the index. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * - * Generated from protobuf field string index = 2 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkString($var, True); - $this->index = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetResponse.php deleted file mode 100644 index ea18c294c1c2..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RemoveIndexAssetResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.RemoveIndexAssetResponse - */ -class RemoveIndexAssetResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RenewLeaseRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RenewLeaseRequest.php deleted file mode 100644 index 067dc619bd56..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RenewLeaseRequest.php +++ /dev/null @@ -1,179 +0,0 @@ -google.cloud.visionai.v1.RenewLeaseRequest - */ -class RenewLeaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Lease id. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * Series name. - * - * Generated from protobuf field string series = 2; - */ - protected $series = ''; - /** - * Lease owner. - * - * Generated from protobuf field string owner = 3; - */ - protected $owner = ''; - /** - * Lease term. - * - * Generated from protobuf field .google.protobuf.Duration term = 4; - */ - protected $term = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * Lease id. - * @type string $series - * Series name. - * @type string $owner - * Lease owner. - * @type \Google\Protobuf\Duration $term - * Lease term. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - - /** - * Lease id. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * Lease id. - * - * 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; - } - - /** - * Series name. - * - * Generated from protobuf field string series = 2; - * @return string - */ - public function getSeries() - { - return $this->series; - } - - /** - * Series name. - * - * Generated from protobuf field string series = 2; - * @param string $var - * @return $this - */ - public function setSeries($var) - { - GPBUtil::checkString($var, True); - $this->series = $var; - - return $this; - } - - /** - * Lease owner. - * - * Generated from protobuf field string owner = 3; - * @return string - */ - public function getOwner() - { - return $this->owner; - } - - /** - * Lease owner. - * - * Generated from protobuf field string owner = 3; - * @param string $var - * @return $this - */ - public function setOwner($var) - { - GPBUtil::checkString($var, True); - $this->owner = $var; - - return $this; - } - - /** - * Lease term. - * - * Generated from protobuf field .google.protobuf.Duration term = 4; - * @return \Google\Protobuf\Duration|null - */ - public function getTerm() - { - return $this->term; - } - - public function hasTerm() - { - return isset($this->term); - } - - public function clearTerm() - { - unset($this->term); - } - - /** - * Lease term. - * - * Generated from protobuf field .google.protobuf.Duration term = 4; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setTerm($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->term = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RequestMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RequestMetadata.php deleted file mode 100644 index b2f03fdc99ef..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RequestMetadata.php +++ /dev/null @@ -1,259 +0,0 @@ -google.cloud.visionai.v1.RequestMetadata - */ -class RequestMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Stream name. - * - * Generated from protobuf field string stream = 1; - */ - protected $stream = ''; - /** - * Evevt name. - * - * Generated from protobuf field string event = 2; - */ - protected $event = ''; - /** - * Series name. - * - * Generated from protobuf field string series = 3; - */ - protected $series = ''; - /** - * Lease id. - * - * Generated from protobuf field string lease_id = 4; - */ - protected $lease_id = ''; - /** - * Owner name. - * - * Generated from protobuf field string owner = 5; - */ - protected $owner = ''; - /** - * Lease term specifies how long the client wants the session to be maintained - * by the server after the client leaves. If the lease term is not set, the - * server will release the session immediately and the client cannot reconnect - * to the same session later. - * - * Generated from protobuf field .google.protobuf.Duration lease_term = 6; - */ - protected $lease_term = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $stream - * Stream name. - * @type string $event - * Evevt name. - * @type string $series - * Series name. - * @type string $lease_id - * Lease id. - * @type string $owner - * Owner name. - * @type \Google\Protobuf\Duration $lease_term - * Lease term specifies how long the client wants the session to be maintained - * by the server after the client leaves. If the lease term is not set, the - * server will release the session immediately and the client cannot reconnect - * to the same session later. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - - /** - * Stream name. - * - * Generated from protobuf field string stream = 1; - * @return string - */ - public function getStream() - { - return $this->stream; - } - - /** - * Stream name. - * - * Generated from protobuf field string stream = 1; - * @param string $var - * @return $this - */ - public function setStream($var) - { - GPBUtil::checkString($var, True); - $this->stream = $var; - - return $this; - } - - /** - * Evevt name. - * - * Generated from protobuf field string event = 2; - * @return string - */ - public function getEvent() - { - return $this->event; - } - - /** - * Evevt name. - * - * Generated from protobuf field string event = 2; - * @param string $var - * @return $this - */ - public function setEvent($var) - { - GPBUtil::checkString($var, True); - $this->event = $var; - - return $this; - } - - /** - * Series name. - * - * Generated from protobuf field string series = 3; - * @return string - */ - public function getSeries() - { - return $this->series; - } - - /** - * Series name. - * - * Generated from protobuf field string series = 3; - * @param string $var - * @return $this - */ - public function setSeries($var) - { - GPBUtil::checkString($var, True); - $this->series = $var; - - return $this; - } - - /** - * Lease id. - * - * Generated from protobuf field string lease_id = 4; - * @return string - */ - public function getLeaseId() - { - return $this->lease_id; - } - - /** - * Lease id. - * - * Generated from protobuf field string lease_id = 4; - * @param string $var - * @return $this - */ - public function setLeaseId($var) - { - GPBUtil::checkString($var, True); - $this->lease_id = $var; - - return $this; - } - - /** - * Owner name. - * - * Generated from protobuf field string owner = 5; - * @return string - */ - public function getOwner() - { - return $this->owner; - } - - /** - * Owner name. - * - * Generated from protobuf field string owner = 5; - * @param string $var - * @return $this - */ - public function setOwner($var) - { - GPBUtil::checkString($var, True); - $this->owner = $var; - - return $this; - } - - /** - * Lease term specifies how long the client wants the session to be maintained - * by the server after the client leaves. If the lease term is not set, the - * server will release the session immediately and the client cannot reconnect - * to the same session later. - * - * Generated from protobuf field .google.protobuf.Duration lease_term = 6; - * @return \Google\Protobuf\Duration|null - */ - public function getLeaseTerm() - { - return $this->lease_term; - } - - public function hasLeaseTerm() - { - return isset($this->lease_term); - } - - public function clearLeaseTerm() - { - unset($this->lease_term); - } - - /** - * Lease term specifies how long the client wants the session to be maintained - * by the server after the client leaves. If the lease term is not set, the - * server will release the session immediately and the client cannot reconnect - * to the same session later. - * - * Generated from protobuf field .google.protobuf.Duration lease_term = 6; - * @param \Google\Protobuf\Duration $var - * @return $this - */ - public function setLeaseTerm($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Duration::class); - $this->lease_term = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResolveOperatorInfoRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResolveOperatorInfoRequest.php deleted file mode 100644 index bae045771649..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResolveOperatorInfoRequest.php +++ /dev/null @@ -1,117 +0,0 @@ -google.cloud.visionai.v1.ResolveOperatorInfoRequest - */ -class ResolveOperatorInfoRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Parent value for ResolveOperatorInfoRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The operator queries. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - private $queries; - - /** - * @param string $parent Required. Parent value for ResolveOperatorInfoRequest. Please see - * {@see LiveVideoAnalyticsClient::locationName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\OperatorQuery[] $queries Required. The operator queries. - * - * @return \Google\Cloud\VisionAI\V1\ResolveOperatorInfoRequest - * - * @experimental - */ - public static function build(string $parent, array $queries): self - { - return (new self()) - ->setParent($parent) - ->setQueries($queries); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Parent value for ResolveOperatorInfoRequest. - * @type \Google\Cloud\VisionAI\V1\OperatorQuery[] $queries - * Required. The operator queries. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Parent value for ResolveOperatorInfoRequest. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * Required. Parent value for ResolveOperatorInfoRequest. - * - * 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 operator queries. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\OperatorQuery> - */ - public function getQueries() - { - return $this->queries; - } - - /** - * Required. The operator queries. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.OperatorQuery queries = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\OperatorQuery[] $var - * @return $this - */ - public function setQueries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\OperatorQuery::class); - $this->queries = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResolveOperatorInfoResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResolveOperatorInfoResponse.php deleted file mode 100644 index 3c57c9a05a3b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResolveOperatorInfoResponse.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.ResolveOperatorInfoResponse - */ -class ResolveOperatorInfoResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Operators with detailed information. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Operator operators = 1; - */ - private $operators; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Operator[] $operators - * Operators with detailed information. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Operators with detailed information. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Operator operators = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Operator> - */ - public function getOperators() - { - return $this->operators; - } - - /** - * Operators with detailed information. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Operator operators = 1; - * @param \Google\Cloud\VisionAI\V1\Operator[] $var - * @return $this - */ - public function setOperators($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Operator::class); - $this->operators = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResourceAnnotations.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResourceAnnotations.php deleted file mode 100644 index fa83b487bc47..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResourceAnnotations.php +++ /dev/null @@ -1,129 +0,0 @@ -google.cloud.visionai.v1.ResourceAnnotations - */ -class ResourceAnnotations extends \Google\Protobuf\Internal\Message -{ - /** - * Annotations that will be applied to the whole application. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; - */ - private $application_annotations; - /** - * Annotations that will be applied to the specific node of the application. - * If the same type of the annotations is applied to both application and - * node, the node annotation will be added in addition to the global - * application one. - * For example, if there is one active zone annotation for the whole - * application and one active zone annotation for the Occupancy Analytic - * processor, then the Occupancy Analytic processor will have two active zones - * defined. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; - */ - private $node_annotations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\StreamAnnotation[] $application_annotations - * Annotations that will be applied to the whole application. - * @type \Google\Cloud\VisionAI\V1\ApplicationNodeAnnotation[] $node_annotations - * Annotations that will be applied to the specific node of the application. - * If the same type of the annotations is applied to both application and - * node, the node annotation will be added in addition to the global - * application one. - * For example, if there is one active zone annotation for the whole - * application and one active zone annotation for the Occupancy Analytic - * processor, then the Occupancy Analytic processor will have two active zones - * defined. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Annotations that will be applied to the whole application. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\StreamAnnotation> - */ - public function getApplicationAnnotations() - { - return $this->application_annotations; - } - - /** - * Annotations that will be applied to the whole application. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 1; - * @param \Google\Cloud\VisionAI\V1\StreamAnnotation[] $var - * @return $this - */ - public function setApplicationAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\StreamAnnotation::class); - $this->application_annotations = $arr; - - return $this; - } - - /** - * Annotations that will be applied to the specific node of the application. - * If the same type of the annotations is applied to both application and - * node, the node annotation will be added in addition to the global - * application one. - * For example, if there is one active zone annotation for the whole - * application and one active zone annotation for the Occupancy Analytic - * processor, then the Occupancy Analytic processor will have two active zones - * defined. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\ApplicationNodeAnnotation> - */ - public function getNodeAnnotations() - { - return $this->node_annotations; - } - - /** - * Annotations that will be applied to the specific node of the application. - * If the same type of the annotations is applied to both application and - * node, the node annotation will be added in addition to the global - * application one. - * For example, if there is one active zone annotation for the whole - * application and one active zone annotation for the Occupancy Analytic - * processor, then the Occupancy Analytic processor will have two active zones - * defined. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationNodeAnnotation node_annotations = 2; - * @param \Google\Cloud\VisionAI\V1\ApplicationNodeAnnotation[] $var - * @return $this - */ - public function setNodeAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ApplicationNodeAnnotation::class); - $this->node_annotations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResourceSpecification.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResourceSpecification.php deleted file mode 100644 index 9c1222c4fde9..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ResourceSpecification.php +++ /dev/null @@ -1,337 +0,0 @@ -google.cloud.visionai.v1.ResourceSpecification - */ -class ResourceSpecification extends \Google\Protobuf\Internal\Message -{ - /** - * CPU specification. - * Examples: - * "100m", "0.5", "1", "2", ... correspond to - * 0.1, half, 1, or 2 cpus. - * Leave empty to let the system decide. - * Note that this does *not* determine the cpu vender/make, - * or its underlying clock speed and specific SIMD features. - * It is only the amount time it requires in timeslicing. - * - * Generated from protobuf field string cpu = 1; - */ - protected $cpu = ''; - /** - * CPU limit. - * Examples: - * "100m", "0.5", "1", "2", ... correspond to - * 0.1, half, 1, or 2 cpus. - * Leave empty to indicate no limit. - * - * Generated from protobuf field string cpu_limits = 5; - */ - protected $cpu_limits = ''; - /** - * Memory specification (in bytes). - * Examples: - * "128974848", "129e6", "129M", "123Mi", ... correspond to - * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes. - * Leave empty to let the system decide. - * - * Generated from protobuf field string memory = 2; - */ - protected $memory = ''; - /** - * Memory usage limits. - * Examples: - * "128974848", "129e6", "129M", "123Mi", ... correspond to - * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes. - * Leave empty to indicate no limit. - * - * Generated from protobuf field string memory_limits = 6; - */ - protected $memory_limits = ''; - /** - * Number of gpus. - * - * Generated from protobuf field int32 gpus = 3; - */ - protected $gpus = 0; - /** - * The maximum latency that this operator may use to process an element. - * If non positive, then a system default will be used. - * Operator developers should arrange for the system compute resources to be - * aligned with this latency budget; e.g. if you want a ML model to produce - * results within 500ms, then you should make sure you request enough - * cpu/gpu/memory to achieve that. - * - * Generated from protobuf field int32 latency_budget_ms = 4; - */ - protected $latency_budget_ms = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $cpu - * CPU specification. - * Examples: - * "100m", "0.5", "1", "2", ... correspond to - * 0.1, half, 1, or 2 cpus. - * Leave empty to let the system decide. - * Note that this does *not* determine the cpu vender/make, - * or its underlying clock speed and specific SIMD features. - * It is only the amount time it requires in timeslicing. - * @type string $cpu_limits - * CPU limit. - * Examples: - * "100m", "0.5", "1", "2", ... correspond to - * 0.1, half, 1, or 2 cpus. - * Leave empty to indicate no limit. - * @type string $memory - * Memory specification (in bytes). - * Examples: - * "128974848", "129e6", "129M", "123Mi", ... correspond to - * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes. - * Leave empty to let the system decide. - * @type string $memory_limits - * Memory usage limits. - * Examples: - * "128974848", "129e6", "129M", "123Mi", ... correspond to - * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes. - * Leave empty to indicate no limit. - * @type int $gpus - * Number of gpus. - * @type int $latency_budget_ms - * The maximum latency that this operator may use to process an element. - * If non positive, then a system default will be used. - * Operator developers should arrange for the system compute resources to be - * aligned with this latency budget; e.g. if you want a ML model to produce - * results within 500ms, then you should make sure you request enough - * cpu/gpu/memory to achieve that. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); - parent::__construct($data); - } - - /** - * CPU specification. - * Examples: - * "100m", "0.5", "1", "2", ... correspond to - * 0.1, half, 1, or 2 cpus. - * Leave empty to let the system decide. - * Note that this does *not* determine the cpu vender/make, - * or its underlying clock speed and specific SIMD features. - * It is only the amount time it requires in timeslicing. - * - * Generated from protobuf field string cpu = 1; - * @return string - */ - public function getCpu() - { - return $this->cpu; - } - - /** - * CPU specification. - * Examples: - * "100m", "0.5", "1", "2", ... correspond to - * 0.1, half, 1, or 2 cpus. - * Leave empty to let the system decide. - * Note that this does *not* determine the cpu vender/make, - * or its underlying clock speed and specific SIMD features. - * It is only the amount time it requires in timeslicing. - * - * Generated from protobuf field string cpu = 1; - * @param string $var - * @return $this - */ - public function setCpu($var) - { - GPBUtil::checkString($var, True); - $this->cpu = $var; - - return $this; - } - - /** - * CPU limit. - * Examples: - * "100m", "0.5", "1", "2", ... correspond to - * 0.1, half, 1, or 2 cpus. - * Leave empty to indicate no limit. - * - * Generated from protobuf field string cpu_limits = 5; - * @return string - */ - public function getCpuLimits() - { - return $this->cpu_limits; - } - - /** - * CPU limit. - * Examples: - * "100m", "0.5", "1", "2", ... correspond to - * 0.1, half, 1, or 2 cpus. - * Leave empty to indicate no limit. - * - * Generated from protobuf field string cpu_limits = 5; - * @param string $var - * @return $this - */ - public function setCpuLimits($var) - { - GPBUtil::checkString($var, True); - $this->cpu_limits = $var; - - return $this; - } - - /** - * Memory specification (in bytes). - * Examples: - * "128974848", "129e6", "129M", "123Mi", ... correspond to - * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes. - * Leave empty to let the system decide. - * - * Generated from protobuf field string memory = 2; - * @return string - */ - public function getMemory() - { - return $this->memory; - } - - /** - * Memory specification (in bytes). - * Examples: - * "128974848", "129e6", "129M", "123Mi", ... correspond to - * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes. - * Leave empty to let the system decide. - * - * Generated from protobuf field string memory = 2; - * @param string $var - * @return $this - */ - public function setMemory($var) - { - GPBUtil::checkString($var, True); - $this->memory = $var; - - return $this; - } - - /** - * Memory usage limits. - * Examples: - * "128974848", "129e6", "129M", "123Mi", ... correspond to - * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes. - * Leave empty to indicate no limit. - * - * Generated from protobuf field string memory_limits = 6; - * @return string - */ - public function getMemoryLimits() - { - return $this->memory_limits; - } - - /** - * Memory usage limits. - * Examples: - * "128974848", "129e6", "129M", "123Mi", ... correspond to - * 128974848 bytes, 129000000 bytes, 129 mebibytes, 123 megabytes. - * Leave empty to indicate no limit. - * - * Generated from protobuf field string memory_limits = 6; - * @param string $var - * @return $this - */ - public function setMemoryLimits($var) - { - GPBUtil::checkString($var, True); - $this->memory_limits = $var; - - return $this; - } - - /** - * Number of gpus. - * - * Generated from protobuf field int32 gpus = 3; - * @return int - */ - public function getGpus() - { - return $this->gpus; - } - - /** - * Number of gpus. - * - * Generated from protobuf field int32 gpus = 3; - * @param int $var - * @return $this - */ - public function setGpus($var) - { - GPBUtil::checkInt32($var); - $this->gpus = $var; - - return $this; - } - - /** - * The maximum latency that this operator may use to process an element. - * If non positive, then a system default will be used. - * Operator developers should arrange for the system compute resources to be - * aligned with this latency budget; e.g. if you want a ML model to produce - * results within 500ms, then you should make sure you request enough - * cpu/gpu/memory to achieve that. - * - * Generated from protobuf field int32 latency_budget_ms = 4; - * @return int - */ - public function getLatencyBudgetMs() - { - return $this->latency_budget_ms; - } - - /** - * The maximum latency that this operator may use to process an element. - * If non positive, then a system default will be used. - * Operator developers should arrange for the system compute resources to be - * aligned with this latency budget; e.g. if you want a ML model to produce - * results within 500ms, then you should make sure you request enough - * cpu/gpu/memory to achieve that. - * - * Generated from protobuf field int32 latency_budget_ms = 4; - * @param int $var - * @return $this - */ - public function setLatencyBudgetMs($var) - { - GPBUtil::checkInt32($var); - $this->latency_budget_ms = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunMode.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunMode.php deleted file mode 100644 index c61010e18051..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunMode.php +++ /dev/null @@ -1,63 +0,0 @@ -google.cloud.visionai.v1.RunMode - */ -class RunMode -{ - /** - * Mode is unspecified. - * - * Generated from protobuf enum RUN_MODE_UNSPECIFIED = 0; - */ - const RUN_MODE_UNSPECIFIED = 0; - /** - * Live mode. Meaning the Process is launched to handle live video - * source, and possible packet drops are expected. - * - * Generated from protobuf enum LIVE = 1; - */ - const LIVE = 1; - /** - * Submission mode. Meaning the Process is launched to handle bounded video - * files, with no packet drop. Completion status is tracked. - * - * Generated from protobuf enum SUBMISSION = 2; - */ - const SUBMISSION = 2; - - private static $valueToName = [ - self::RUN_MODE_UNSPECIFIED => 'RUN_MODE_UNSPECIFIED', - self::LIVE => 'LIVE', - self::SUBMISSION => 'SUBMISSION', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunStatus.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunStatus.php deleted file mode 100644 index 69dd5f260a67..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunStatus.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.visionai.v1.RunStatus - */ -class RunStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The state of the Process. - * - * Generated from protobuf field .google.cloud.visionai.v1.RunStatus.State state = 1; - */ - protected $state = 0; - /** - * The reason of becoming the state. - * - * Generated from protobuf field string reason = 2; - */ - protected $reason = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $state - * The state of the Process. - * @type string $reason - * The reason of becoming the state. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Lva::initOnce(); - parent::__construct($data); - } - - /** - * The state of the Process. - * - * Generated from protobuf field .google.cloud.visionai.v1.RunStatus.State state = 1; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * The state of the Process. - * - * Generated from protobuf field .google.cloud.visionai.v1.RunStatus.State state = 1; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\RunStatus\State::class); - $this->state = $var; - - return $this; - } - - /** - * The reason of becoming the state. - * - * Generated from protobuf field string reason = 2; - * @return string - */ - public function getReason() - { - return $this->reason; - } - - /** - * The reason of becoming the state. - * - * Generated from protobuf field string reason = 2; - * @param string $var - * @return $this - */ - public function setReason($var) - { - GPBUtil::checkString($var, True); - $this->reason = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunStatus/State.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunStatus/State.php deleted file mode 100644 index 40a59412f07f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/RunStatus/State.php +++ /dev/null @@ -1,84 +0,0 @@ -google.cloud.visionai.v1.RunStatus.State - */ -class State -{ - /** - * State is unspecified. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * INITIALIZING means the Process is scheduled but yet ready to handle - * real traffic. - * - * Generated from protobuf enum INITIALIZING = 1; - */ - const INITIALIZING = 1; - /** - * RUNNING means the Process is up running and handling traffic. - * - * Generated from protobuf enum RUNNING = 2; - */ - const RUNNING = 2; - /** - * COMPLETED means the Process has completed the processing, especially - * for non-streaming use case. - * - * Generated from protobuf enum COMPLETED = 3; - */ - const COMPLETED = 3; - /** - * FAILED means the Process failed to complete the processing. - * - * Generated from protobuf enum FAILED = 4; - */ - const FAILED = 4; - /** - * PENDING means the Process is created but yet to be scheduled. - * - * Generated from protobuf enum PENDING = 5; - */ - const PENDING = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::INITIALIZING => 'INITIALIZING', - self::RUNNING => 'RUNNING', - self::COMPLETED => 'COMPLETED', - self::FAILED => 'FAILED', - self::PENDING => 'PENDING', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy.php deleted file mode 100644 index a69907ba44b7..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.SchemaKeySortingStrategy - */ -class SchemaKeySortingStrategy extends \Google\Protobuf\Internal\Message -{ - /** - * Options in the front have high priority than those in the back. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option options = 1; - */ - private $options; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\SchemaKeySortingStrategy\Option[] $options - * Options in the front have high priority than those in the back. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Options in the front have high priority than those in the back. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option options = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\SchemaKeySortingStrategy\Option> - */ - public function getOptions() - { - return $this->options; - } - - /** - * Options in the front have high priority than those in the back. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option options = 1; - * @param \Google\Cloud\VisionAI\V1\SchemaKeySortingStrategy\Option[] $var - * @return $this - */ - public function setOptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\SchemaKeySortingStrategy\Option::class); - $this->options = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy/Option.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy/Option.php deleted file mode 100644 index 5d6cd242a852..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy/Option.php +++ /dev/null @@ -1,149 +0,0 @@ -google.cloud.visionai.v1.SchemaKeySortingStrategy.Option - */ -class Option extends \Google\Protobuf\Internal\Message -{ - /** - * The data used to sort. - * - * Generated from protobuf field string data_schema_key = 1; - */ - protected $data_schema_key = ''; - /** - * Whether to sort in decreasing order or increasing order. - * By default, results are sorted in incresing order. - * - * Generated from protobuf field bool sort_decreasing = 2; - */ - protected $sort_decreasing = false; - /** - * Aggregate method for the current data schema key. - * - * Generated from protobuf field optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; - */ - protected $aggregate_method = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $data_schema_key - * The data used to sort. - * @type bool $sort_decreasing - * Whether to sort in decreasing order or increasing order. - * By default, results are sorted in incresing order. - * @type int $aggregate_method - * Aggregate method for the current data schema key. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The data used to sort. - * - * Generated from protobuf field string data_schema_key = 1; - * @return string - */ - public function getDataSchemaKey() - { - return $this->data_schema_key; - } - - /** - * The data used to sort. - * - * Generated from protobuf field string data_schema_key = 1; - * @param string $var - * @return $this - */ - public function setDataSchemaKey($var) - { - GPBUtil::checkString($var, True); - $this->data_schema_key = $var; - - return $this; - } - - /** - * Whether to sort in decreasing order or increasing order. - * By default, results are sorted in incresing order. - * - * Generated from protobuf field bool sort_decreasing = 2; - * @return bool - */ - public function getSortDecreasing() - { - return $this->sort_decreasing; - } - - /** - * Whether to sort in decreasing order or increasing order. - * By default, results are sorted in incresing order. - * - * Generated from protobuf field bool sort_decreasing = 2; - * @param bool $var - * @return $this - */ - public function setSortDecreasing($var) - { - GPBUtil::checkBool($var); - $this->sort_decreasing = $var; - - return $this; - } - - /** - * Aggregate method for the current data schema key. - * - * Generated from protobuf field optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; - * @return int - */ - public function getAggregateMethod() - { - return isset($this->aggregate_method) ? $this->aggregate_method : 0; - } - - public function hasAggregateMethod() - { - return isset($this->aggregate_method); - } - - public function clearAggregateMethod() - { - unset($this->aggregate_method); - } - - /** - * Aggregate method for the current data schema key. - * - * Generated from protobuf field optional .google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod aggregate_method = 3; - * @param int $var - * @return $this - */ - public function setAggregateMethod($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\SchemaKeySortingStrategy\Option\AggregateMethod::class); - $this->aggregate_method = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy/Option/AggregateMethod.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy/Option/AggregateMethod.php deleted file mode 100644 index 946e6bb6714a..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SchemaKeySortingStrategy/Option/AggregateMethod.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.visionai.v1.SchemaKeySortingStrategy.Option.AggregateMethod - */ -class AggregateMethod -{ - /** - * The unspecified aggregate method will be overwritten as mentioned - * above. - * - * Generated from protobuf enum AGGREGATE_METHOD_UNSPECIFIED = 0; - */ - const AGGREGATE_METHOD_UNSPECIFIED = 0; - /** - * Take the (lexicographical or numerical) largest value to sort. - * - * Generated from protobuf enum AGGREGATE_METHOD_LARGEST = 1; - */ - const AGGREGATE_METHOD_LARGEST = 1; - /** - * Take the (lexicographical or numerical) smallest value to sort. - * - * Generated from protobuf enum AGGREGATE_METHOD_SMALLEST = 2; - */ - const AGGREGATE_METHOD_SMALLEST = 2; - - private static $valueToName = [ - self::AGGREGATE_METHOD_UNSPECIFIED => 'AGGREGATE_METHOD_UNSPECIFIED', - self::AGGREGATE_METHOD_LARGEST => 'AGGREGATE_METHOD_LARGEST', - self::AGGREGATE_METHOD_SMALLEST => 'AGGREGATE_METHOD_SMALLEST', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchAssetsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchAssetsRequest.php deleted file mode 100644 index 58bd4b7d79cc..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchAssetsRequest.php +++ /dev/null @@ -1,409 +0,0 @@ -google.cloud.visionai.v1.SearchAssetsRequest - */ -class SearchAssetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent corpus to search. - * Format: `projects/{project_id}/locations/{location_id}/corpora/{corpus_id}' - * - * Generated from protobuf field string corpus = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $corpus = ''; - /** - * The number of results to be returned in this page. If it's 0, the server - * will decide the appropriate page_size. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * The continuation token to fetch the next page. If empty, it means it is - * fetching the first page. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Time ranges that matching video content must fall within. If no ranges are - * provided, there will be no time restriction. This field is treated just - * like the criteria below, but defined separately for convenience as it is - * used frequently. Note that if the end_time is in the future, it will be - * clamped to the time the request was received. - * - * Generated from protobuf field .google.cloud.visionai.v1.DateTimeRangeArray content_time_ranges = 5; - */ - protected $content_time_ranges = null; - /** - * Criteria applied to search results. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Criteria criteria = 4; - */ - private $criteria; - /** - * Stores most recent facet selection state. Only facet groups with user's - * selection will be presented here. Selection state is either selected or - * unselected. Only selected facet buckets will be used as search criteria. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6; - */ - private $facet_selections; - /** - * A list of annotation keys to specify the annotations to be retrieved and - * returned with each search result. - * Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search - * strategy must not be NO_SEARCH. - * - * Generated from protobuf field repeated string result_annotation_keys = 8; - */ - private $result_annotation_keys; - /** - * Global search query. Allows user to search assets without needing to - * specify which field the value belongs to. - * - * Generated from protobuf field string search_query = 10; - */ - protected $search_query = ''; - protected $sort_spec; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\SchemaKeySortingStrategy $schema_key_sorting_strategy - * Sort by the value under the data schema key. - * @type string $corpus - * Required. The parent corpus to search. - * Format: `projects/{project_id}/locations/{location_id}/corpora/{corpus_id}' - * @type int $page_size - * The number of results to be returned in this page. If it's 0, the server - * will decide the appropriate page_size. - * @type string $page_token - * The continuation token to fetch the next page. If empty, it means it is - * fetching the first page. - * @type \Google\Cloud\VisionAI\V1\DateTimeRangeArray $content_time_ranges - * Time ranges that matching video content must fall within. If no ranges are - * provided, there will be no time restriction. This field is treated just - * like the criteria below, but defined separately for convenience as it is - * used frequently. Note that if the end_time is in the future, it will be - * clamped to the time the request was received. - * @type \Google\Cloud\VisionAI\V1\Criteria[] $criteria - * Criteria applied to search results. - * @type \Google\Cloud\VisionAI\V1\FacetGroup[] $facet_selections - * Stores most recent facet selection state. Only facet groups with user's - * selection will be presented here. Selection state is either selected or - * unselected. Only selected facet buckets will be used as search criteria. - * @type string[] $result_annotation_keys - * A list of annotation keys to specify the annotations to be retrieved and - * returned with each search result. - * Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search - * strategy must not be NO_SEARCH. - * @type string $search_query - * Global search query. Allows user to search assets without needing to - * specify which field the value belongs to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Sort by the value under the data schema key. - * - * Generated from protobuf field .google.cloud.visionai.v1.SchemaKeySortingStrategy schema_key_sorting_strategy = 9; - * @return \Google\Cloud\VisionAI\V1\SchemaKeySortingStrategy|null - */ - public function getSchemaKeySortingStrategy() - { - return $this->readOneof(9); - } - - public function hasSchemaKeySortingStrategy() - { - return $this->hasOneof(9); - } - - /** - * Sort by the value under the data schema key. - * - * Generated from protobuf field .google.cloud.visionai.v1.SchemaKeySortingStrategy schema_key_sorting_strategy = 9; - * @param \Google\Cloud\VisionAI\V1\SchemaKeySortingStrategy $var - * @return $this - */ - public function setSchemaKeySortingStrategy($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\SchemaKeySortingStrategy::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Required. The parent corpus to search. - * Format: `projects/{project_id}/locations/{location_id}/corpora/{corpus_id}' - * - * Generated from protobuf field string corpus = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getCorpus() - { - return $this->corpus; - } - - /** - * Required. The parent corpus to search. - * Format: `projects/{project_id}/locations/{location_id}/corpora/{corpus_id}' - * - * Generated from protobuf field string corpus = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCorpus($var) - { - GPBUtil::checkString($var, True); - $this->corpus = $var; - - return $this; - } - - /** - * The number of results to be returned in this page. If it's 0, the server - * will decide the appropriate page_size. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The number of results to be returned in this page. If it's 0, the server - * will decide the appropriate page_size. - * - * 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 continuation token to fetch the next page. If empty, it means it is - * fetching the first page. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The continuation token to fetch the next page. If empty, it means it is - * fetching the first page. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Time ranges that matching video content must fall within. If no ranges are - * provided, there will be no time restriction. This field is treated just - * like the criteria below, but defined separately for convenience as it is - * used frequently. Note that if the end_time is in the future, it will be - * clamped to the time the request was received. - * - * Generated from protobuf field .google.cloud.visionai.v1.DateTimeRangeArray content_time_ranges = 5; - * @return \Google\Cloud\VisionAI\V1\DateTimeRangeArray|null - */ - public function getContentTimeRanges() - { - return $this->content_time_ranges; - } - - public function hasContentTimeRanges() - { - return isset($this->content_time_ranges); - } - - public function clearContentTimeRanges() - { - unset($this->content_time_ranges); - } - - /** - * Time ranges that matching video content must fall within. If no ranges are - * provided, there will be no time restriction. This field is treated just - * like the criteria below, but defined separately for convenience as it is - * used frequently. Note that if the end_time is in the future, it will be - * clamped to the time the request was received. - * - * Generated from protobuf field .google.cloud.visionai.v1.DateTimeRangeArray content_time_ranges = 5; - * @param \Google\Cloud\VisionAI\V1\DateTimeRangeArray $var - * @return $this - */ - public function setContentTimeRanges($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DateTimeRangeArray::class); - $this->content_time_ranges = $var; - - return $this; - } - - /** - * Criteria applied to search results. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Criteria criteria = 4; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Criteria> - */ - public function getCriteria() - { - return $this->criteria; - } - - /** - * Criteria applied to search results. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Criteria criteria = 4; - * @param \Google\Cloud\VisionAI\V1\Criteria[] $var - * @return $this - */ - public function setCriteria($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Criteria::class); - $this->criteria = $arr; - - return $this; - } - - /** - * Stores most recent facet selection state. Only facet groups with user's - * selection will be presented here. Selection state is either selected or - * unselected. Only selected facet buckets will be used as search criteria. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\FacetGroup> - */ - public function getFacetSelections() - { - return $this->facet_selections; - } - - /** - * Stores most recent facet selection state. Only facet groups with user's - * selection will be presented here. Selection state is either selected or - * unselected. Only selected facet buckets will be used as search criteria. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetGroup facet_selections = 6; - * @param \Google\Cloud\VisionAI\V1\FacetGroup[] $var - * @return $this - */ - public function setFacetSelections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\FacetGroup::class); - $this->facet_selections = $arr; - - return $this; - } - - /** - * A list of annotation keys to specify the annotations to be retrieved and - * returned with each search result. - * Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search - * strategy must not be NO_SEARCH. - * - * Generated from protobuf field repeated string result_annotation_keys = 8; - * @return RepeatedField - */ - public function getResultAnnotationKeys() - { - return $this->result_annotation_keys; - } - - /** - * A list of annotation keys to specify the annotations to be retrieved and - * returned with each search result. - * Annotation granularity must be GRANULARITY_ASSET_LEVEL and its search - * strategy must not be NO_SEARCH. - * - * Generated from protobuf field repeated string result_annotation_keys = 8; - * @param string[] $var - * @return $this - */ - public function setResultAnnotationKeys($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->result_annotation_keys = $arr; - - return $this; - } - - /** - * Global search query. Allows user to search assets without needing to - * specify which field the value belongs to. - * - * Generated from protobuf field string search_query = 10; - * @return string - */ - public function getSearchQuery() - { - return $this->search_query; - } - - /** - * Global search query. Allows user to search assets without needing to - * specify which field the value belongs to. - * - * Generated from protobuf field string search_query = 10; - * @param string $var - * @return $this - */ - public function setSearchQuery($var) - { - GPBUtil::checkString($var, True); - $this->search_query = $var; - - return $this; - } - - /** - * @return string - */ - public function getSortSpec() - { - return $this->whichOneof("sort_spec"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchAssetsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchAssetsResponse.php deleted file mode 100644 index 56c1b3e6ce8b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchAssetsResponse.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.visionai.v1.SearchAssetsResponse - */ -class SearchAssetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Returned search results. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchResultItem search_result_items = 1; - */ - private $search_result_items; - /** - * The next-page continuation token. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * Facet search results of a given query, which contains user's - * already-selected facet values and updated facet search results. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetGroup facet_results = 3; - */ - private $facet_results; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\SearchResultItem[] $search_result_items - * Returned search results. - * @type string $next_page_token - * The next-page continuation token. - * @type \Google\Cloud\VisionAI\V1\FacetGroup[] $facet_results - * Facet search results of a given query, which contains user's - * already-selected facet values and updated facet search results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Returned search results. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchResultItem search_result_items = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\SearchResultItem> - */ - public function getSearchResultItems() - { - return $this->search_result_items; - } - - /** - * Returned search results. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchResultItem search_result_items = 1; - * @param \Google\Cloud\VisionAI\V1\SearchResultItem[] $var - * @return $this - */ - public function setSearchResultItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\SearchResultItem::class); - $this->search_result_items = $arr; - - return $this; - } - - /** - * The next-page continuation token. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The next-page continuation token. - * - * 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; - } - - /** - * Facet search results of a given query, which contains user's - * already-selected facet values and updated facet search results. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetGroup facet_results = 3; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\FacetGroup> - */ - public function getFacetResults() - { - return $this->facet_results; - } - - /** - * Facet search results of a given query, which contains user's - * already-selected facet values and updated facet search results. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.FacetGroup facet_results = 3; - * @param \Google\Cloud\VisionAI\V1\FacetGroup[] $var - * @return $this - */ - public function setFacetResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\FacetGroup::class); - $this->facet_results = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapability.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapability.php deleted file mode 100644 index 6d64cd2fa932..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapability.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.SearchCapability - */ -class SearchCapability extends \Google\Protobuf\Internal\Message -{ - /** - * The search capability to enable. - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchCapability.Type type = 1; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The search capability to enable. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The search capability to enable. - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchCapability.Type type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The search capability to enable. - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchCapability.Type type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\SearchCapability\Type::class); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapability/Type.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapability/Type.php deleted file mode 100644 index c12cf9696972..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapability/Type.php +++ /dev/null @@ -1,54 +0,0 @@ -google.cloud.visionai.v1.SearchCapability.Type - */ -class Type -{ - /** - * Unspecified search capability, should never be used. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Embedding search. - * - * Generated from protobuf enum EMBEDDING_SEARCH = 1; - */ - const EMBEDDING_SEARCH = 1; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::EMBEDDING_SEARCH => 'EMBEDDING_SEARCH', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapabilitySetting.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapabilitySetting.php deleted file mode 100644 index ad0d5d92cc47..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCapabilitySetting.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.SearchCapabilitySetting - */ -class SearchCapabilitySetting extends \Google\Protobuf\Internal\Message -{ - /** - * The metadata of search capability to enable. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchCapability search_capabilities = 1; - */ - private $search_capabilities; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\SearchCapability[] $search_capabilities - * The metadata of search capability to enable. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The metadata of search capability to enable. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchCapability search_capabilities = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\SearchCapability> - */ - public function getSearchCapabilities() - { - return $this->search_capabilities; - } - - /** - * The metadata of search capability to enable. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchCapability search_capabilities = 1; - * @param \Google\Cloud\VisionAI\V1\SearchCapability[] $var - * @return $this - */ - public function setSearchCapabilities($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\SearchCapability::class); - $this->search_capabilities = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchConfig.php deleted file mode 100644 index 3eb521fa1fe5..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchConfig.php +++ /dev/null @@ -1,176 +0,0 @@ -google.cloud.visionai.v1.SearchConfig - */ -class SearchConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the search configuration. - * For CustomSearchCriteria, search_config would be the search - * operator name. For Facets, search_config would be the facet - * dimension name. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Establishes a FacetDimension and associated specifications. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty facet_property = 2; - */ - protected $facet_property = null; - /** - * Creates a mapping between a custom SearchCriteria and one or more UGA keys. - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchCriteriaProperty search_criteria_property = 3; - */ - protected $search_criteria_property = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Resource name of the search configuration. - * For CustomSearchCriteria, search_config would be the search - * operator name. For Facets, search_config would be the facet - * dimension name. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` - * @type \Google\Cloud\VisionAI\V1\FacetProperty $facet_property - * Establishes a FacetDimension and associated specifications. - * @type \Google\Cloud\VisionAI\V1\SearchCriteriaProperty $search_criteria_property - * Creates a mapping between a custom SearchCriteria and one or more UGA keys. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the search configuration. - * For CustomSearchCriteria, search_config would be the search - * operator name. For Facets, search_config would be the facet - * dimension name. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource name of the search configuration. - * For CustomSearchCriteria, search_config would be the search - * operator name. For Facets, search_config would be the facet - * dimension name. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` - * - * 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; - } - - /** - * Establishes a FacetDimension and associated specifications. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty facet_property = 2; - * @return \Google\Cloud\VisionAI\V1\FacetProperty|null - */ - public function getFacetProperty() - { - return $this->facet_property; - } - - public function hasFacetProperty() - { - return isset($this->facet_property); - } - - public function clearFacetProperty() - { - unset($this->facet_property); - } - - /** - * Establishes a FacetDimension and associated specifications. - * - * Generated from protobuf field .google.cloud.visionai.v1.FacetProperty facet_property = 2; - * @param \Google\Cloud\VisionAI\V1\FacetProperty $var - * @return $this - */ - public function setFacetProperty($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\FacetProperty::class); - $this->facet_property = $var; - - return $this; - } - - /** - * Creates a mapping between a custom SearchCriteria and one or more UGA keys. - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchCriteriaProperty search_criteria_property = 3; - * @return \Google\Cloud\VisionAI\V1\SearchCriteriaProperty|null - */ - public function getSearchCriteriaProperty() - { - return $this->search_criteria_property; - } - - public function hasSearchCriteriaProperty() - { - return isset($this->search_criteria_property); - } - - public function clearSearchCriteriaProperty() - { - unset($this->search_criteria_property); - } - - /** - * Creates a mapping between a custom SearchCriteria and one or more UGA keys. - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchCriteriaProperty search_criteria_property = 3; - * @param \Google\Cloud\VisionAI\V1\SearchCriteriaProperty $var - * @return $this - */ - public function setSearchCriteriaProperty($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\SearchCriteriaProperty::class); - $this->search_criteria_property = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCriteriaProperty.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCriteriaProperty.php deleted file mode 100644 index daf1ea0d24bb..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchCriteriaProperty.php +++ /dev/null @@ -1,143 +0,0 @@ -google.cloud.visionai.v1.SearchCriteriaProperty - */ -class SearchCriteriaProperty extends \Google\Protobuf\Internal\Message -{ - /** - * Each mapped_field corresponds to a UGA key. To understand how this property - * works, take the following example. In the SearchConfig table, the - * user adds this entry: - * search_config { - * name: "person" - * search_criteria_property { - * mapped_fields: "player" - * mapped_fields: "coach" - * } - * } - * Now, when a user issues a query like: - * criteria { - * field: "person" - * text_array { - * txt_values: "Tom Brady" - * txt_values: "Bill Belichick" - * } - * } - * MWH search will return search documents where (player=Tom Brady || - * coach=Tom Brady || player=Bill Belichick || coach=Bill Belichick). - * - * Generated from protobuf field repeated string mapped_fields = 1; - */ - private $mapped_fields; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $mapped_fields - * Each mapped_field corresponds to a UGA key. To understand how this property - * works, take the following example. In the SearchConfig table, the - * user adds this entry: - * search_config { - * name: "person" - * search_criteria_property { - * mapped_fields: "player" - * mapped_fields: "coach" - * } - * } - * Now, when a user issues a query like: - * criteria { - * field: "person" - * text_array { - * txt_values: "Tom Brady" - * txt_values: "Bill Belichick" - * } - * } - * MWH search will return search documents where (player=Tom Brady || - * coach=Tom Brady || player=Bill Belichick || coach=Bill Belichick). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Each mapped_field corresponds to a UGA key. To understand how this property - * works, take the following example. In the SearchConfig table, the - * user adds this entry: - * search_config { - * name: "person" - * search_criteria_property { - * mapped_fields: "player" - * mapped_fields: "coach" - * } - * } - * Now, when a user issues a query like: - * criteria { - * field: "person" - * text_array { - * txt_values: "Tom Brady" - * txt_values: "Bill Belichick" - * } - * } - * MWH search will return search documents where (player=Tom Brady || - * coach=Tom Brady || player=Bill Belichick || coach=Bill Belichick). - * - * Generated from protobuf field repeated string mapped_fields = 1; - * @return RepeatedField - */ - public function getMappedFields() - { - return $this->mapped_fields; - } - - /** - * Each mapped_field corresponds to a UGA key. To understand how this property - * works, take the following example. In the SearchConfig table, the - * user adds this entry: - * search_config { - * name: "person" - * search_criteria_property { - * mapped_fields: "player" - * mapped_fields: "coach" - * } - * } - * Now, when a user issues a query like: - * criteria { - * field: "person" - * text_array { - * txt_values: "Tom Brady" - * txt_values: "Bill Belichick" - * } - * } - * MWH search will return search documents where (player=Tom Brady || - * coach=Tom Brady || player=Bill Belichick || coach=Bill Belichick). - * - * Generated from protobuf field repeated string mapped_fields = 1; - * @param string[] $var - * @return $this - */ - public function setMappedFields($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->mapped_fields = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchHypernym.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchHypernym.php deleted file mode 100644 index 30d67e2db570..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchHypernym.php +++ /dev/null @@ -1,148 +0,0 @@ -google.cloud.visionai.v1.SearchHypernym - */ -class SearchHypernym extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the SearchHypernym. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Optional. The hypernym. - * - * Generated from protobuf field string hypernym = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $hypernym = ''; - /** - * Optional. Hyponyms that the hypernym is mapped to. - * - * Generated from protobuf field repeated string hyponyms = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $hyponyms; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Resource name of the SearchHypernym. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` - * @type string $hypernym - * Optional. The hypernym. - * @type string[] $hyponyms - * Optional. Hyponyms that the hypernym is mapped to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the SearchHypernym. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource name of the SearchHypernym. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` - * - * 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; - } - - /** - * Optional. The hypernym. - * - * Generated from protobuf field string hypernym = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getHypernym() - { - return $this->hypernym; - } - - /** - * Optional. The hypernym. - * - * Generated from protobuf field string hypernym = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setHypernym($var) - { - GPBUtil::checkString($var, True); - $this->hypernym = $var; - - return $this; - } - - /** - * Optional. Hyponyms that the hypernym is mapped to. - * - * Generated from protobuf field repeated string hyponyms = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return RepeatedField - */ - public function getHyponyms() - { - return $this->hyponyms; - } - - /** - * Optional. Hyponyms that the hypernym is mapped to. - * - * Generated from protobuf field repeated string hyponyms = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string[] $var - * @return $this - */ - public function setHyponyms($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->hyponyms = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchIndexEndpointRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchIndexEndpointRequest.php deleted file mode 100644 index b56bcc9b5a15..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchIndexEndpointRequest.php +++ /dev/null @@ -1,310 +0,0 @@ -google.cloud.visionai.v1.SearchIndexEndpointRequest - */ -class SearchIndexEndpointRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The index endpoint to search. - * Format: - * `projects/{project_id}/locations/{location_id}/indexEndpoints/{index_endpoint_id}' - * - * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $index_endpoint = ''; - /** - * Criteria applied to search results. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Criteria criteria = 4; - */ - private $criteria; - /** - * Criteria to exclude from search results. - * Note that `fetch_matched_annotations` will be ignored. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Criteria exclusion_criteria = 7; - */ - private $exclusion_criteria; - /** - * Requested page size. API may return fewer results than requested. - * If negative, INVALID_ARGUMENT error will be returned. - * If unspecified or 0, API will pick a default size, which is 10. - * If the requested page size is larger than the maximum size, API will pick - * the maximum size, which is 200. - * - * Generated from protobuf field int32 page_size = 5; - */ - protected $page_size = 0; - /** - * The continuation token to fetch the next page. If empty, it means it is - * fetching the first page. - * - * Generated from protobuf field string page_token = 6; - */ - protected $page_token = ''; - protected $query; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\ImageQuery $image_query - * An image-only query. - * @type string $text_query - * A text-only query. - * @type string $index_endpoint - * Required. The index endpoint to search. - * Format: - * `projects/{project_id}/locations/{location_id}/indexEndpoints/{index_endpoint_id}' - * @type \Google\Cloud\VisionAI\V1\Criteria[] $criteria - * Criteria applied to search results. - * @type \Google\Cloud\VisionAI\V1\Criteria[] $exclusion_criteria - * Criteria to exclude from search results. - * Note that `fetch_matched_annotations` will be ignored. - * @type int $page_size - * Requested page size. API may return fewer results than requested. - * If negative, INVALID_ARGUMENT error will be returned. - * If unspecified or 0, API will pick a default size, which is 10. - * If the requested page size is larger than the maximum size, API will pick - * the maximum size, which is 200. - * @type string $page_token - * The continuation token to fetch the next page. If empty, it means it is - * fetching the first page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * An image-only query. - * - * Generated from protobuf field .google.cloud.visionai.v1.ImageQuery image_query = 2; - * @return \Google\Cloud\VisionAI\V1\ImageQuery|null - */ - public function getImageQuery() - { - return $this->readOneof(2); - } - - public function hasImageQuery() - { - return $this->hasOneof(2); - } - - /** - * An image-only query. - * - * Generated from protobuf field .google.cloud.visionai.v1.ImageQuery image_query = 2; - * @param \Google\Cloud\VisionAI\V1\ImageQuery $var - * @return $this - */ - public function setImageQuery($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\ImageQuery::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * A text-only query. - * - * Generated from protobuf field string text_query = 3; - * @return string - */ - public function getTextQuery() - { - return $this->readOneof(3); - } - - public function hasTextQuery() - { - return $this->hasOneof(3); - } - - /** - * A text-only query. - * - * Generated from protobuf field string text_query = 3; - * @param string $var - * @return $this - */ - public function setTextQuery($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Required. The index endpoint to search. - * Format: - * `projects/{project_id}/locations/{location_id}/indexEndpoints/{index_endpoint_id}' - * - * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getIndexEndpoint() - { - return $this->index_endpoint; - } - - /** - * Required. The index endpoint to search. - * Format: - * `projects/{project_id}/locations/{location_id}/indexEndpoints/{index_endpoint_id}' - * - * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setIndexEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->index_endpoint = $var; - - return $this; - } - - /** - * Criteria applied to search results. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Criteria criteria = 4; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Criteria> - */ - public function getCriteria() - { - return $this->criteria; - } - - /** - * Criteria applied to search results. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Criteria criteria = 4; - * @param \Google\Cloud\VisionAI\V1\Criteria[] $var - * @return $this - */ - public function setCriteria($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Criteria::class); - $this->criteria = $arr; - - return $this; - } - - /** - * Criteria to exclude from search results. - * Note that `fetch_matched_annotations` will be ignored. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Criteria exclusion_criteria = 7; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Criteria> - */ - public function getExclusionCriteria() - { - return $this->exclusion_criteria; - } - - /** - * Criteria to exclude from search results. - * Note that `fetch_matched_annotations` will be ignored. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Criteria exclusion_criteria = 7; - * @param \Google\Cloud\VisionAI\V1\Criteria[] $var - * @return $this - */ - public function setExclusionCriteria($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Criteria::class); - $this->exclusion_criteria = $arr; - - return $this; - } - - /** - * Requested page size. API may return fewer results than requested. - * If negative, INVALID_ARGUMENT error will be returned. - * If unspecified or 0, API will pick a default size, which is 10. - * If the requested page size is larger than the maximum size, API will pick - * the maximum size, which is 200. - * - * Generated from protobuf field int32 page_size = 5; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Requested page size. API may return fewer results than requested. - * If negative, INVALID_ARGUMENT error will be returned. - * If unspecified or 0, API will pick a default size, which is 10. - * If the requested page size is larger than the maximum size, API will pick - * the maximum size, which is 200. - * - * Generated from protobuf field int32 page_size = 5; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * The continuation token to fetch the next page. If empty, it means it is - * fetching the first page. - * - * Generated from protobuf field string page_token = 6; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * The continuation token to fetch the next page. If empty, it means it is - * fetching the first page. - * - * Generated from protobuf field string page_token = 6; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * @return string - */ - public function getQuery() - { - return $this->whichOneof("query"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchIndexEndpointResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchIndexEndpointResponse.php deleted file mode 100644 index 11e7d5b83e02..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchIndexEndpointResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.visionai.v1.SearchIndexEndpointResponse - */ -class SearchIndexEndpointResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Returned search results. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchResultItem search_result_items = 1; - */ - private $search_result_items; - /** - * The next-page continuation token. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\SearchResultItem[] $search_result_items - * Returned search results. - * @type string $next_page_token - * The next-page continuation token. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Returned search results. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchResultItem search_result_items = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\SearchResultItem> - */ - public function getSearchResultItems() - { - return $this->search_result_items; - } - - /** - * Returned search results. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.SearchResultItem search_result_items = 1; - * @param \Google\Cloud\VisionAI\V1\SearchResultItem[] $var - * @return $this - */ - public function setSearchResultItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\SearchResultItem::class); - $this->search_result_items = $arr; - - return $this; - } - - /** - * The next-page continuation token. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * The next-page continuation token. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchResultItem.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchResultItem.php deleted file mode 100644 index 9913836cdd08..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SearchResultItem.php +++ /dev/null @@ -1,304 +0,0 @@ -google.cloud.visionai.v1.SearchResultItem - */ -class SearchResultItem extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the asset. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string asset = 1; - */ - protected $asset = ''; - /** - * The matched asset segments. - * Deprecated: please use singular `segment` field. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Partition.TemporalPartition segments = 2 [deprecated = true]; - * @deprecated - */ - private $segments; - /** - * The matched asset segment. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition segment = 5; - */ - protected $segment = null; - /** - * Available to IMAGE corpus types. - * Relevance of this `SearchResultItem` to user search query (text query or - * image query). - * By default this represents cosine similarity between the query and the - * retrieved media content. The value is in the range of [-1, 1]. - * Note that search ranking is not only decided by this relevance score, but - * also other factors such as the match of annotations. - * - * Generated from protobuf field double relevance = 6; - */ - protected $relevance = 0.0; - /** - * Search result annotations specified by result_annotation_keys in search - * request. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Annotation requested_annotations = 3; - */ - private $requested_annotations; - /** - * Criteria or facet-selection based annotation matching results associated to - * this search result item. Only contains results for criteria or - * facet_selections with fetch_matched_annotations=true. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AnnotationMatchingResult annotation_matching_results = 4; - */ - private $annotation_matching_results; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $asset - * The resource name of the asset. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * @type \Google\Cloud\VisionAI\V1\Partition\TemporalPartition[] $segments - * The matched asset segments. - * Deprecated: please use singular `segment` field. - * @type \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $segment - * The matched asset segment. - * @type float $relevance - * Available to IMAGE corpus types. - * Relevance of this `SearchResultItem` to user search query (text query or - * image query). - * By default this represents cosine similarity between the query and the - * retrieved media content. The value is in the range of [-1, 1]. - * Note that search ranking is not only decided by this relevance score, but - * also other factors such as the match of annotations. - * @type \Google\Cloud\VisionAI\V1\Annotation[] $requested_annotations - * Search result annotations specified by result_annotation_keys in search - * request. - * @type \Google\Cloud\VisionAI\V1\AnnotationMatchingResult[] $annotation_matching_results - * Criteria or facet-selection based annotation matching results associated to - * this search result item. Only contains results for criteria or - * facet_selections with fetch_matched_annotations=true. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the asset. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string asset = 1; - * @return string - */ - public function getAsset() - { - return $this->asset; - } - - /** - * The resource name of the asset. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string asset = 1; - * @param string $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkString($var, True); - $this->asset = $var; - - return $this; - } - - /** - * The matched asset segments. - * Deprecated: please use singular `segment` field. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Partition.TemporalPartition segments = 2 [deprecated = true]; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Partition\TemporalPartition> - * @deprecated - */ - public function getSegments() - { - if ($this->segments->count() !== 0) { - @trigger_error('segments is deprecated.', E_USER_DEPRECATED); - } - return $this->segments; - } - - /** - * The matched asset segments. - * Deprecated: please use singular `segment` field. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Partition.TemporalPartition segments = 2 [deprecated = true]; - * @param \Google\Cloud\VisionAI\V1\Partition\TemporalPartition[] $var - * @return $this - * @deprecated - */ - public function setSegments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Partition\TemporalPartition::class); - if ($arr->count() !== 0) { - @trigger_error('segments is deprecated.', E_USER_DEPRECATED); - } - $this->segments = $arr; - - return $this; - } - - /** - * The matched asset segment. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition segment = 5; - * @return \Google\Cloud\VisionAI\V1\Partition\TemporalPartition|null - */ - public function getSegment() - { - return $this->segment; - } - - public function hasSegment() - { - return isset($this->segment); - } - - public function clearSegment() - { - unset($this->segment); - } - - /** - * The matched asset segment. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition.TemporalPartition segment = 5; - * @param \Google\Cloud\VisionAI\V1\Partition\TemporalPartition $var - * @return $this - */ - public function setSegment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Partition\TemporalPartition::class); - $this->segment = $var; - - return $this; - } - - /** - * Available to IMAGE corpus types. - * Relevance of this `SearchResultItem` to user search query (text query or - * image query). - * By default this represents cosine similarity between the query and the - * retrieved media content. The value is in the range of [-1, 1]. - * Note that search ranking is not only decided by this relevance score, but - * also other factors such as the match of annotations. - * - * Generated from protobuf field double relevance = 6; - * @return float - */ - public function getRelevance() - { - return $this->relevance; - } - - /** - * Available to IMAGE corpus types. - * Relevance of this `SearchResultItem` to user search query (text query or - * image query). - * By default this represents cosine similarity between the query and the - * retrieved media content. The value is in the range of [-1, 1]. - * Note that search ranking is not only decided by this relevance score, but - * also other factors such as the match of annotations. - * - * Generated from protobuf field double relevance = 6; - * @param float $var - * @return $this - */ - public function setRelevance($var) - { - GPBUtil::checkDouble($var); - $this->relevance = $var; - - return $this; - } - - /** - * Search result annotations specified by result_annotation_keys in search - * request. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Annotation requested_annotations = 3; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\Annotation> - */ - public function getRequestedAnnotations() - { - return $this->requested_annotations; - } - - /** - * Search result annotations specified by result_annotation_keys in search - * request. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.Annotation requested_annotations = 3; - * @param \Google\Cloud\VisionAI\V1\Annotation[] $var - * @return $this - */ - public function setRequestedAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\Annotation::class); - $this->requested_annotations = $arr; - - return $this; - } - - /** - * Criteria or facet-selection based annotation matching results associated to - * this search result item. Only contains results for criteria or - * facet_selections with fetch_matched_annotations=true. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AnnotationMatchingResult annotation_matching_results = 4; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\AnnotationMatchingResult> - */ - public function getAnnotationMatchingResults() - { - return $this->annotation_matching_results; - } - - /** - * Criteria or facet-selection based annotation matching results associated to - * this search result item. Only contains results for criteria or - * facet_selections with fetch_matched_annotations=true. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.AnnotationMatchingResult annotation_matching_results = 4; - * @param \Google\Cloud\VisionAI\V1\AnnotationMatchingResult[] $var - * @return $this - */ - public function setAnnotationMatchingResults($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\AnnotationMatchingResult::class); - $this->annotation_matching_results = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SendPacketsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SendPacketsRequest.php deleted file mode 100644 index d16b3fdf2f59..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SendPacketsRequest.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.visionai.v1.SendPacketsRequest - */ -class SendPacketsRequest extends \Google\Protobuf\Internal\Message -{ - protected $request; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Packet $packet - * Packets sent over the streaming rpc. - * @type \Google\Cloud\VisionAI\V1\RequestMetadata $metadata - * The first message of the streaming rpc including the request metadata. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - - /** - * Packets sent over the streaming rpc. - * - * Generated from protobuf field .google.cloud.visionai.v1.Packet packet = 1; - * @return \Google\Cloud\VisionAI\V1\Packet|null - */ - public function getPacket() - { - return $this->readOneof(1); - } - - public function hasPacket() - { - return $this->hasOneof(1); - } - - /** - * Packets sent over the streaming rpc. - * - * Generated from protobuf field .google.cloud.visionai.v1.Packet packet = 1; - * @param \Google\Cloud\VisionAI\V1\Packet $var - * @return $this - */ - public function setPacket($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Packet::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The first message of the streaming rpc including the request metadata. - * - * Generated from protobuf field .google.cloud.visionai.v1.RequestMetadata metadata = 2; - * @return \Google\Cloud\VisionAI\V1\RequestMetadata|null - */ - public function getMetadata() - { - return $this->readOneof(2); - } - - public function hasMetadata() - { - return $this->hasOneof(2); - } - - /** - * The first message of the streaming rpc including the request metadata. - * - * Generated from protobuf field .google.cloud.visionai.v1.RequestMetadata metadata = 2; - * @param \Google\Cloud\VisionAI\V1\RequestMetadata $var - * @return $this - */ - public function setMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\RequestMetadata::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getRequest() - { - return $this->whichOneof("request"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SendPacketsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SendPacketsResponse.php deleted file mode 100644 index 1cb06952b4e3..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SendPacketsResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.SendPacketsResponse - */ -class SendPacketsResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingService::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Series.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Series.php deleted file mode 100644 index b0627f93bcaf..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Series.php +++ /dev/null @@ -1,291 +0,0 @@ -google.cloud.visionai.v1.Series - */ -class Series extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the resource. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Annotations to allow clients to store small amounts of arbitrary data. - * - * Generated from protobuf field map annotations = 5; - */ - private $annotations; - /** - * Required. Stream that is associated with this series. - * - * Generated from protobuf field string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $stream = ''; - /** - * Required. Event that is associated with this series. - * - * Generated from protobuf field string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $event = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update timestamp. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Annotations to allow clients to store small amounts of arbitrary data. - * @type string $stream - * Required. Stream that is associated with this series. - * @type string $event - * Required. Event that is associated with this series. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsResources::initOnce(); - parent::__construct($data); - } - - /** - * Name of the resource. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the resource. - * - * 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 create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Annotations to allow clients to store small amounts of arbitrary data. - * - * Generated from protobuf field map annotations = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Annotations to allow clients to store small amounts of arbitrary data. - * - * Generated from protobuf field map annotations = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * Required. Stream that is associated with this series. - * - * Generated from protobuf field string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getStream() - { - return $this->stream; - } - - /** - * Required. Stream that is associated with this series. - * - * Generated from protobuf field string stream = 6 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setStream($var) - { - GPBUtil::checkString($var, True); - $this->stream = $var; - - return $this; - } - - /** - * Required. Event that is associated with this series. - * - * Generated from protobuf field string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getEvent() - { - return $this->event; - } - - /** - * Required. Event that is associated with this series. - * - * Generated from protobuf field string event = 7 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setEvent($var) - { - GPBUtil::checkString($var, True); - $this->event = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SeriesMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SeriesMetadata.php deleted file mode 100644 index a8e4d2177b23..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/SeriesMetadata.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.visionai.v1.SeriesMetadata - */ -class SeriesMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Series name. It's in the format of - * "projects/{project}/locations/{location}/clusters/{cluster}/series/{stream}". - * - * Generated from protobuf field string series = 1 [(.google.api.resource_reference) = { - */ - protected $series = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $series - * Series name. It's in the format of - * "projects/{project}/locations/{location}/clusters/{cluster}/series/{stream}". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingResources::initOnce(); - parent::__construct($data); - } - - /** - * Series name. It's in the format of - * "projects/{project}/locations/{location}/clusters/{cluster}/series/{stream}". - * - * Generated from protobuf field string series = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getSeries() - { - return $this->series; - } - - /** - * Series name. It's in the format of - * "projects/{project}/locations/{location}/clusters/{cluster}/series/{stream}". - * - * Generated from protobuf field string series = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSeries($var) - { - GPBUtil::checkString($var, True); - $this->series = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ServerMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ServerMetadata.php deleted file mode 100644 index b0768498a1dd..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ServerMetadata.php +++ /dev/null @@ -1,131 +0,0 @@ -google.cloud.visionai.v1.ServerMetadata - */ -class ServerMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The offset position for the packet in its stream. - * - * Generated from protobuf field int64 offset = 1; - */ - protected $offset = 0; - /** - * The timestamp at which the stream server receives this packet. This is - * based on the local clock of on the server side. It is guaranteed to be - * monotonically increasing for the packets within each session; however - * this timestamp is not comparable across packets sent to the same stream - * different sessions. Session here refers to one individual gRPC streaming - * request to the stream server. - * - * Generated from protobuf field .google.protobuf.Timestamp ingest_time = 2; - */ - protected $ingest_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $offset - * The offset position for the packet in its stream. - * @type \Google\Protobuf\Timestamp $ingest_time - * The timestamp at which the stream server receives this packet. This is - * based on the local clock of on the server side. It is guaranteed to be - * monotonically increasing for the packets within each session; however - * this timestamp is not comparable across packets sent to the same stream - * different sessions. Session here refers to one individual gRPC streaming - * request to the stream server. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamingResources::initOnce(); - parent::__construct($data); - } - - /** - * The offset position for the packet in its stream. - * - * Generated from protobuf field int64 offset = 1; - * @return int|string - */ - public function getOffset() - { - return $this->offset; - } - - /** - * The offset position for the packet in its stream. - * - * Generated from protobuf field int64 offset = 1; - * @param int|string $var - * @return $this - */ - public function setOffset($var) - { - GPBUtil::checkInt64($var); - $this->offset = $var; - - return $this; - } - - /** - * The timestamp at which the stream server receives this packet. This is - * based on the local clock of on the server side. It is guaranteed to be - * monotonically increasing for the packets within each session; however - * this timestamp is not comparable across packets sent to the same stream - * different sessions. Session here refers to one individual gRPC streaming - * request to the stream server. - * - * Generated from protobuf field .google.protobuf.Timestamp ingest_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getIngestTime() - { - return $this->ingest_time; - } - - public function hasIngestTime() - { - return isset($this->ingest_time); - } - - public function clearIngestTime() - { - unset($this->ingest_time); - } - - /** - * The timestamp at which the stream server receives this packet. This is - * based on the local clock of on the server side. It is guaranteed to be - * monotonically increasing for the packets within each session; however - * this timestamp is not comparable across packets sent to the same stream - * different sessions. Session here refers to one individual gRPC streaming - * request to the stream server. - * - * Generated from protobuf field .google.protobuf.Timestamp ingest_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setIngestTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->ingest_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Stream.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Stream.php deleted file mode 100644 index 517430c04f4b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/Stream.php +++ /dev/null @@ -1,335 +0,0 @@ -google.cloud.visionai.v1.Stream - */ -class Stream extends \Google\Protobuf\Internal\Message -{ - /** - * Name of the resource. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - */ - private $labels; - /** - * Annotations to allow clients to store small amounts of arbitrary data. - * - * Generated from protobuf field map annotations = 5; - */ - private $annotations; - /** - * The display name for the stream resource. - * - * Generated from protobuf field string display_name = 6; - */ - protected $display_name = ''; - /** - * Whether to enable the HLS playback service on this stream. - * - * Generated from protobuf field bool enable_hls_playback = 7; - */ - protected $enable_hls_playback = false; - /** - * The name of the media warehouse asset for long term storage of stream data. - * Format: projects/${p_id}/locations/${l_id}/corpora/${c_id}/assets/${a_id} - * Remain empty if the media warehouse storage is not needed for the stream. - * - * Generated from protobuf field string media_warehouse_asset = 8; - */ - protected $media_warehouse_asset = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Name of the resource. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The create timestamp. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The update timestamp. - * @type array|\Google\Protobuf\Internal\MapField $labels - * Labels as key value pairs. - * @type array|\Google\Protobuf\Internal\MapField $annotations - * Annotations to allow clients to store small amounts of arbitrary data. - * @type string $display_name - * The display name for the stream resource. - * @type bool $enable_hls_playback - * Whether to enable the HLS playback service on this stream. - * @type string $media_warehouse_asset - * The name of the media warehouse asset for long term storage of stream data. - * Format: projects/${p_id}/locations/${l_id}/corpora/${c_id}/assets/${a_id} - * Remain empty if the media warehouse storage is not needed for the stream. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsResources::initOnce(); - parent::__construct($data); - } - - /** - * Name of the resource. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the resource. - * - * 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 create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getCreateTime() - { - return $this->create_time; - } - - public function hasCreateTime() - { - return isset($this->create_time); - } - - public function clearCreateTime() - { - unset($this->create_time); - } - - /** - * Output only. The create timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * Output only. The update timestamp. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - * @return \Google\Protobuf\Internal\MapField - */ - public function getLabels() - { - return $this->labels; - } - - /** - * Labels as key value pairs. - * - * Generated from protobuf field map labels = 4; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setLabels($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->labels = $arr; - - return $this; - } - - /** - * Annotations to allow clients to store small amounts of arbitrary data. - * - * Generated from protobuf field map annotations = 5; - * @return \Google\Protobuf\Internal\MapField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Annotations to allow clients to store small amounts of arbitrary data. - * - * Generated from protobuf field map annotations = 5; - * @param array|\Google\Protobuf\Internal\MapField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); - $this->annotations = $arr; - - return $this; - } - - /** - * The display name for the stream resource. - * - * Generated from protobuf field string display_name = 6; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name for the stream resource. - * - * Generated from protobuf field string display_name = 6; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Whether to enable the HLS playback service on this stream. - * - * Generated from protobuf field bool enable_hls_playback = 7; - * @return bool - */ - public function getEnableHlsPlayback() - { - return $this->enable_hls_playback; - } - - /** - * Whether to enable the HLS playback service on this stream. - * - * Generated from protobuf field bool enable_hls_playback = 7; - * @param bool $var - * @return $this - */ - public function setEnableHlsPlayback($var) - { - GPBUtil::checkBool($var); - $this->enable_hls_playback = $var; - - return $this; - } - - /** - * The name of the media warehouse asset for long term storage of stream data. - * Format: projects/${p_id}/locations/${l_id}/corpora/${c_id}/assets/${a_id} - * Remain empty if the media warehouse storage is not needed for the stream. - * - * Generated from protobuf field string media_warehouse_asset = 8; - * @return string - */ - public function getMediaWarehouseAsset() - { - return $this->media_warehouse_asset; - } - - /** - * The name of the media warehouse asset for long term storage of stream data. - * Format: projects/${p_id}/locations/${l_id}/corpora/${c_id}/assets/${a_id} - * Remain empty if the media warehouse storage is not needed for the stream. - * - * Generated from protobuf field string media_warehouse_asset = 8; - * @param string $var - * @return $this - */ - public function setMediaWarehouseAsset($var) - { - GPBUtil::checkString($var, True); - $this->media_warehouse_asset = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotation.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotation.php deleted file mode 100644 index 08c771d5f215..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotation.php +++ /dev/null @@ -1,252 +0,0 @@ -google.cloud.visionai.v1.StreamAnnotation - */ -class StreamAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * ID of the annotation. It must be unique when used in the certain context. - * For example, all the annotations to one input streams of a Vision AI - * application. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * User-friendly name for the annotation. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * The Vision AI stream resource name. - * - * Generated from protobuf field string source_stream = 3; - */ - protected $source_stream = ''; - /** - * The actual type of Annotation. - * - * Generated from protobuf field .google.cloud.visionai.v1.StreamAnnotationType type = 4; - */ - protected $type = 0; - protected $annotation_payload; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\NormalizedPolygon $active_zone - * Annotation for type ACTIVE_ZONE - * @type \Google\Cloud\VisionAI\V1\NormalizedPolyline $crossing_line - * Annotation for type CROSSING_LINE - * @type string $id - * ID of the annotation. It must be unique when used in the certain context. - * For example, all the annotations to one input streams of a Vision AI - * application. - * @type string $display_name - * User-friendly name for the annotation. - * @type string $source_stream - * The Vision AI stream resource name. - * @type int $type - * The actual type of Annotation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * Annotation for type ACTIVE_ZONE - * - * Generated from protobuf field .google.cloud.visionai.v1.NormalizedPolygon active_zone = 5; - * @return \Google\Cloud\VisionAI\V1\NormalizedPolygon|null - */ - public function getActiveZone() - { - return $this->readOneof(5); - } - - public function hasActiveZone() - { - return $this->hasOneof(5); - } - - /** - * Annotation for type ACTIVE_ZONE - * - * Generated from protobuf field .google.cloud.visionai.v1.NormalizedPolygon active_zone = 5; - * @param \Google\Cloud\VisionAI\V1\NormalizedPolygon $var - * @return $this - */ - public function setActiveZone($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\NormalizedPolygon::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Annotation for type CROSSING_LINE - * - * Generated from protobuf field .google.cloud.visionai.v1.NormalizedPolyline crossing_line = 6; - * @return \Google\Cloud\VisionAI\V1\NormalizedPolyline|null - */ - public function getCrossingLine() - { - return $this->readOneof(6); - } - - public function hasCrossingLine() - { - return $this->hasOneof(6); - } - - /** - * Annotation for type CROSSING_LINE - * - * Generated from protobuf field .google.cloud.visionai.v1.NormalizedPolyline crossing_line = 6; - * @param \Google\Cloud\VisionAI\V1\NormalizedPolyline $var - * @return $this - */ - public function setCrossingLine($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\NormalizedPolyline::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * ID of the annotation. It must be unique when used in the certain context. - * For example, all the annotations to one input streams of a Vision AI - * application. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * ID of the annotation. It must be unique when used in the certain context. - * For example, all the annotations to one input streams of a Vision AI - * application. - * - * 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; - } - - /** - * User-friendly name for the annotation. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * User-friendly name for the annotation. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The Vision AI stream resource name. - * - * Generated from protobuf field string source_stream = 3; - * @return string - */ - public function getSourceStream() - { - return $this->source_stream; - } - - /** - * The Vision AI stream resource name. - * - * Generated from protobuf field string source_stream = 3; - * @param string $var - * @return $this - */ - public function setSourceStream($var) - { - GPBUtil::checkString($var, True); - $this->source_stream = $var; - - return $this; - } - - /** - * The actual type of Annotation. - * - * Generated from protobuf field .google.cloud.visionai.v1.StreamAnnotationType type = 4; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The actual type of Annotation. - * - * Generated from protobuf field .google.cloud.visionai.v1.StreamAnnotationType type = 4; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\StreamAnnotationType::class); - $this->type = $var; - - return $this; - } - - /** - * @return string - */ - public function getAnnotationPayload() - { - return $this->whichOneof("annotation_payload"); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotationType.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotationType.php deleted file mode 100644 index e208472c012e..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotationType.php +++ /dev/null @@ -1,66 +0,0 @@ -google.cloud.visionai.v1.StreamAnnotationType - */ -class StreamAnnotationType -{ - /** - * Type UNSPECIFIED. - * - * Generated from protobuf enum STREAM_ANNOTATION_TYPE_UNSPECIFIED = 0; - */ - const STREAM_ANNOTATION_TYPE_UNSPECIFIED = 0; - /** - * active_zone annotation defines a polygon on top of the content from an - * image/video based stream, following processing will only focus on the - * content inside the active zone. - * - * Generated from protobuf enum STREAM_ANNOTATION_TYPE_ACTIVE_ZONE = 1; - */ - const STREAM_ANNOTATION_TYPE_ACTIVE_ZONE = 1; - /** - * crossing_line annotation defines a polyline on top of the content from an - * image/video based Vision AI stream, events happening across the line will - * be captured. For example, the counts of people who goes acroos the line - * in Occupancy Analytic Processor. - * - * Generated from protobuf enum STREAM_ANNOTATION_TYPE_CROSSING_LINE = 2; - */ - const STREAM_ANNOTATION_TYPE_CROSSING_LINE = 2; - - private static $valueToName = [ - self::STREAM_ANNOTATION_TYPE_UNSPECIFIED => 'STREAM_ANNOTATION_TYPE_UNSPECIFIED', - self::STREAM_ANNOTATION_TYPE_ACTIVE_ZONE => 'STREAM_ANNOTATION_TYPE_ACTIVE_ZONE', - self::STREAM_ANNOTATION_TYPE_CROSSING_LINE => 'STREAM_ANNOTATION_TYPE_CROSSING_LINE', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotations.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotations.php deleted file mode 100644 index 04a1ff95fb15..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamAnnotations.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.StreamAnnotations - */ -class StreamAnnotations extends \Google\Protobuf\Internal\Message -{ - /** - * Multiple annotations. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation stream_annotations = 1; - */ - private $stream_annotations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\StreamAnnotation[] $stream_annotations - * Multiple annotations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * Multiple annotations. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation stream_annotations = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\StreamAnnotation> - */ - public function getStreamAnnotations() - { - return $this->stream_annotations; - } - - /** - * Multiple annotations. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation stream_annotations = 1; - * @param \Google\Cloud\VisionAI\V1\StreamAnnotation[] $var - * @return $this - */ - public function setStreamAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\StreamAnnotation::class); - $this->stream_annotations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamWithAnnotation.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamWithAnnotation.php deleted file mode 100644 index d7a321403fbf..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamWithAnnotation.php +++ /dev/null @@ -1,164 +0,0 @@ -google.cloud.visionai.v1.StreamWithAnnotation - */ -class StreamWithAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * Vision AI Stream resource name. - * - * Generated from protobuf field string stream = 1 [(.google.api.resource_reference) = { - */ - protected $stream = ''; - /** - * Annotations that will be applied to the whole application. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 2; - */ - private $application_annotations; - /** - * Annotations that will be applied to the specific node of the application. - * If the same type of the annotations is applied to both application and - * node, the node annotation will be added in addition to the global - * application one. - * For example, if there is one active zone annotation for the whole - * application and one active zone annotation for the Occupancy Analytic - * processor, then the Occupancy Analytic processor will have two active zones - * defined. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamWithAnnotation.NodeAnnotation node_annotations = 3; - */ - private $node_annotations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $stream - * Vision AI Stream resource name. - * @type \Google\Cloud\VisionAI\V1\StreamAnnotation[] $application_annotations - * Annotations that will be applied to the whole application. - * @type \Google\Cloud\VisionAI\V1\StreamWithAnnotation\NodeAnnotation[] $node_annotations - * Annotations that will be applied to the specific node of the application. - * If the same type of the annotations is applied to both application and - * node, the node annotation will be added in addition to the global - * application one. - * For example, if there is one active zone annotation for the whole - * application and one active zone annotation for the Occupancy Analytic - * processor, then the Occupancy Analytic processor will have two active zones - * defined. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Vision AI Stream resource name. - * - * Generated from protobuf field string stream = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getStream() - { - return $this->stream; - } - - /** - * Vision AI Stream resource name. - * - * Generated from protobuf field string stream = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setStream($var) - { - GPBUtil::checkString($var, True); - $this->stream = $var; - - return $this; - } - - /** - * Annotations that will be applied to the whole application. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\StreamAnnotation> - */ - public function getApplicationAnnotations() - { - return $this->application_annotations; - } - - /** - * Annotations that will be applied to the whole application. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation application_annotations = 2; - * @param \Google\Cloud\VisionAI\V1\StreamAnnotation[] $var - * @return $this - */ - public function setApplicationAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\StreamAnnotation::class); - $this->application_annotations = $arr; - - return $this; - } - - /** - * Annotations that will be applied to the specific node of the application. - * If the same type of the annotations is applied to both application and - * node, the node annotation will be added in addition to the global - * application one. - * For example, if there is one active zone annotation for the whole - * application and one active zone annotation for the Occupancy Analytic - * processor, then the Occupancy Analytic processor will have two active zones - * defined. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamWithAnnotation.NodeAnnotation node_annotations = 3; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\StreamWithAnnotation\NodeAnnotation> - */ - public function getNodeAnnotations() - { - return $this->node_annotations; - } - - /** - * Annotations that will be applied to the specific node of the application. - * If the same type of the annotations is applied to both application and - * node, the node annotation will be added in addition to the global - * application one. - * For example, if there is one active zone annotation for the whole - * application and one active zone annotation for the Occupancy Analytic - * processor, then the Occupancy Analytic processor will have two active zones - * defined. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamWithAnnotation.NodeAnnotation node_annotations = 3; - * @param \Google\Cloud\VisionAI\V1\StreamWithAnnotation\NodeAnnotation[] $var - * @return $this - */ - public function setNodeAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\StreamWithAnnotation\NodeAnnotation::class); - $this->node_annotations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamWithAnnotation/NodeAnnotation.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamWithAnnotation/NodeAnnotation.php deleted file mode 100644 index 47f8c1096442..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StreamWithAnnotation/NodeAnnotation.php +++ /dev/null @@ -1,101 +0,0 @@ -google.cloud.visionai.v1.StreamWithAnnotation.NodeAnnotation - */ -class NodeAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * The node name of the application graph. - * - * Generated from protobuf field string node = 1; - */ - protected $node = ''; - /** - * The node specific stream annotations. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; - */ - private $annotations; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $node - * The node name of the application graph. - * @type \Google\Cloud\VisionAI\V1\StreamAnnotation[] $annotations - * The node specific stream annotations. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * The node name of the application graph. - * - * Generated from protobuf field string node = 1; - * @return string - */ - public function getNode() - { - return $this->node; - } - - /** - * The node name of the application graph. - * - * Generated from protobuf field string node = 1; - * @param string $var - * @return $this - */ - public function setNode($var) - { - GPBUtil::checkString($var, True); - $this->node = $var; - - return $this; - } - - /** - * The node specific stream annotations. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\StreamAnnotation> - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * The node specific stream annotations. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamAnnotation annotations = 2; - * @param \Google\Cloud\VisionAI\V1\StreamAnnotation[] $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\StreamAnnotation::class); - $this->annotations = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StringArray.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StringArray.php deleted file mode 100644 index 1ba902fdc0b9..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/StringArray.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.visionai.v1.StringArray - */ -class StringArray extends \Google\Protobuf\Internal\Message -{ - /** - * String type values. - * - * Generated from protobuf field repeated string txt_values = 1; - */ - private $txt_values; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $txt_values - * String type values. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * String type values. - * - * Generated from protobuf field repeated string txt_values = 1; - * @return RepeatedField - */ - public function getTxtValues() - { - return $this->txt_values; - } - - /** - * String type values. - * - * Generated from protobuf field repeated string txt_values = 1; - * @param string[] $var - * @return $this - */ - public function setTxtValues($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->txt_values = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig.php deleted file mode 100644 index f5604f051e83..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.visionai.v1.TagParsingConfig - */ -class TagParsingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Each tag entity class may have an optional EntityParsingConfig which is - * used to help parse the entities of the class. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig entity_parsing_configs = 1; - */ - private $entity_parsing_configs; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\TagParsingConfig\EntityParsingConfig[] $entity_parsing_configs - * Each tag entity class may have an optional EntityParsingConfig which is - * used to help parse the entities of the class. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Each tag entity class may have an optional EntityParsingConfig which is - * used to help parse the entities of the class. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig entity_parsing_configs = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\TagParsingConfig\EntityParsingConfig> - */ - public function getEntityParsingConfigs() - { - return $this->entity_parsing_configs; - } - - /** - * Each tag entity class may have an optional EntityParsingConfig which is - * used to help parse the entities of the class. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig entity_parsing_configs = 1; - * @param \Google\Cloud\VisionAI\V1\TagParsingConfig\EntityParsingConfig[] $var - * @return $this - */ - public function setEntityParsingConfigs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\TagParsingConfig\EntityParsingConfig::class); - $this->entity_parsing_configs = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig/EntityParsingConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig/EntityParsingConfig.php deleted file mode 100644 index e0c4bdffebc3..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig/EntityParsingConfig.php +++ /dev/null @@ -1,139 +0,0 @@ -google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig - */ -class EntityParsingConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The tag entity class name. This should match the class name - * produced by the tag entity detection model. - * - * Generated from protobuf field string entity_class = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $entity_class = ''; - /** - * Optional. An regular expression hint. - * - * Generated from protobuf field string regex = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $regex = ''; - /** - * Optional. Entity matching strategy. - * - * Generated from protobuf field .google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig.EntityMatchingStrategy entity_matching_strategy = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $entity_matching_strategy = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $entity_class - * Required. The tag entity class name. This should match the class name - * produced by the tag entity detection model. - * @type string $regex - * Optional. An regular expression hint. - * @type int $entity_matching_strategy - * Optional. Entity matching strategy. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. The tag entity class name. This should match the class name - * produced by the tag entity detection model. - * - * Generated from protobuf field string entity_class = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getEntityClass() - { - return $this->entity_class; - } - - /** - * Required. The tag entity class name. This should match the class name - * produced by the tag entity detection model. - * - * Generated from protobuf field string entity_class = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setEntityClass($var) - { - GPBUtil::checkString($var, True); - $this->entity_class = $var; - - return $this; - } - - /** - * Optional. An regular expression hint. - * - * Generated from protobuf field string regex = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRegex() - { - return $this->regex; - } - - /** - * Optional. An regular expression hint. - * - * Generated from protobuf field string regex = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRegex($var) - { - GPBUtil::checkString($var, True); - $this->regex = $var; - - return $this; - } - - /** - * Optional. Entity matching strategy. - * - * Generated from protobuf field .google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig.EntityMatchingStrategy entity_matching_strategy = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getEntityMatchingStrategy() - { - return $this->entity_matching_strategy; - } - - /** - * Optional. Entity matching strategy. - * - * Generated from protobuf field .google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig.EntityMatchingStrategy entity_matching_strategy = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setEntityMatchingStrategy($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\VisionAI\V1\TagParsingConfig\EntityParsingConfig\EntityMatchingStrategy::class); - $this->entity_matching_strategy = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig/EntityParsingConfig/EntityMatchingStrategy.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig/EntityParsingConfig/EntityMatchingStrategy.php deleted file mode 100644 index b3caae3ca68a..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagParsingConfig/EntityParsingConfig/EntityMatchingStrategy.php +++ /dev/null @@ -1,62 +0,0 @@ -google.cloud.visionai.v1.TagParsingConfig.EntityParsingConfig.EntityMatchingStrategy - */ -class EntityMatchingStrategy -{ - /** - * If unspecified, multi-line matching will be used by default. - * - * Generated from protobuf enum ENTITY_MATCHING_STRATEGY_UNSPECIFIED = 0; - */ - const ENTITY_MATCHING_STRATEGY_UNSPECIFIED = 0; - /** - * Matches multiple lines of text. - * - * Generated from protobuf enum MULTI_LINE_MATCHING = 1; - */ - const MULTI_LINE_MATCHING = 1; - /** - * Matches the line with the maximum overlap area with entity bounding - * box. - * - * Generated from protobuf enum MAX_OVERLAP_AREA = 2; - */ - const MAX_OVERLAP_AREA = 2; - - private static $valueToName = [ - self::ENTITY_MATCHING_STRATEGY_UNSPECIFIED => 'ENTITY_MATCHING_STRATEGY_UNSPECIFIED', - self::MULTI_LINE_MATCHING => 'MULTI_LINE_MATCHING', - self::MAX_OVERLAP_AREA => 'MAX_OVERLAP_AREA', - ]; - - 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagRecognizerConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagRecognizerConfig.php deleted file mode 100644 index cc3512cbd514..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/TagRecognizerConfig.php +++ /dev/null @@ -1,115 +0,0 @@ -google.cloud.visionai.v1.TagRecognizerConfig - */ -class TagRecognizerConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Confidence threshold to filter detection results. If not set, a system - * default value will be used. - * - * Generated from protobuf field float entity_detection_confidence_threshold = 1; - */ - protected $entity_detection_confidence_threshold = 0.0; - /** - * Configuration to customize how tags are parsed. - * - * Generated from protobuf field .google.cloud.visionai.v1.TagParsingConfig tag_parsing_config = 2; - */ - protected $tag_parsing_config = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $entity_detection_confidence_threshold - * Confidence threshold to filter detection results. If not set, a system - * default value will be used. - * @type \Google\Cloud\VisionAI\V1\TagParsingConfig $tag_parsing_config - * Configuration to customize how tags are parsed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Confidence threshold to filter detection results. If not set, a system - * default value will be used. - * - * Generated from protobuf field float entity_detection_confidence_threshold = 1; - * @return float - */ - public function getEntityDetectionConfidenceThreshold() - { - return $this->entity_detection_confidence_threshold; - } - - /** - * Confidence threshold to filter detection results. If not set, a system - * default value will be used. - * - * Generated from protobuf field float entity_detection_confidence_threshold = 1; - * @param float $var - * @return $this - */ - public function setEntityDetectionConfidenceThreshold($var) - { - GPBUtil::checkFloat($var); - $this->entity_detection_confidence_threshold = $var; - - return $this; - } - - /** - * Configuration to customize how tags are parsed. - * - * Generated from protobuf field .google.cloud.visionai.v1.TagParsingConfig tag_parsing_config = 2; - * @return \Google\Cloud\VisionAI\V1\TagParsingConfig|null - */ - public function getTagParsingConfig() - { - return $this->tag_parsing_config; - } - - public function hasTagParsingConfig() - { - return isset($this->tag_parsing_config); - } - - public function clearTagParsingConfig() - { - unset($this->tag_parsing_config); - } - - /** - * Configuration to customize how tags are parsed. - * - * Generated from protobuf field .google.cloud.visionai.v1.TagParsingConfig tag_parsing_config = 2; - * @param \Google\Cloud\VisionAI\V1\TagParsingConfig $var - * @return $this - */ - public function setTagParsingConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\TagParsingConfig::class); - $this->tag_parsing_config = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployApplicationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployApplicationRequest.php deleted file mode 100644 index 007b4aa5ddfe..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployApplicationRequest.php +++ /dev/null @@ -1,165 +0,0 @@ -google.cloud.visionai.v1.UndeployApplicationRequest - */ -class UndeployApplicationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param string $name Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * Please see {@see AppPlatformClient::applicationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\UndeployApplicationRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployApplicationResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployApplicationResponse.php deleted file mode 100644 index fd6a1bacf294..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployApplicationResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.UndeployApplicationResponse - */ -class UndeployApplicationResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexMetadata.php deleted file mode 100644 index 1d0b658a74a5..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexMetadata.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.visionai.v1.UndeployIndexMetadata - */ -class UndeployIndexMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - */ - protected $operation_metadata = null; - /** - * Output only. The index being undeployed. - * - * Generated from protobuf field string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $deployed_index = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\OperationMetadata $operation_metadata - * Common metadata of the long-running operation. - * @type string $deployed_index - * Output only. The index being undeployed. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null - */ - public function getOperationMetadata() - { - return $this->operation_metadata; - } - - public function hasOperationMetadata() - { - return isset($this->operation_metadata); - } - - public function clearOperationMetadata() - { - unset($this->operation_metadata); - } - - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var - * @return $this - */ - public function setOperationMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); - $this->operation_metadata = $var; - - return $this; - } - - /** - * Output only. The index being undeployed. - * - * Generated from protobuf field string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getDeployedIndex() - { - return $this->deployed_index; - } - - /** - * Output only. The index being undeployed. - * - * Generated from protobuf field string deployed_index = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setDeployedIndex($var) - { - GPBUtil::checkString($var, True); - $this->deployed_index = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexRequest.php deleted file mode 100644 index 5d7e376f190f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.visionai.v1.UndeployIndexRequest - */ -class UndeployIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the IndexEndpoint resource on which the - * undeployment will act. Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` - * - * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $index_endpoint = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $index_endpoint - * Required. Resource name of the IndexEndpoint resource on which the - * undeployment will act. Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the IndexEndpoint resource on which the - * undeployment will act. Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` - * - * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getIndexEndpoint() - { - return $this->index_endpoint; - } - - /** - * Required. Resource name of the IndexEndpoint resource on which the - * undeployment will act. Format: - * `projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}` - * - * Generated from protobuf field string index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setIndexEndpoint($var) - { - GPBUtil::checkString($var, True); - $this->index_endpoint = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexResponse.php deleted file mode 100644 index 81244592ac59..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UndeployIndexResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.UndeployIndexResponse - */ -class UndeployIndexResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UniversalInputConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UniversalInputConfig.php deleted file mode 100644 index 01d619b140fb..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UniversalInputConfig.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.UniversalInputConfig - */ -class UniversalInputConfig extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAnalysisRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAnalysisRequest.php deleted file mode 100644 index 08f8caa811ef..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAnalysisRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.visionai.v1.UpdateAnalysisRequest - */ -class UpdateAnalysisRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Analysis resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Analysis analysis = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $analysis = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VisionAI\V1\Analysis $analysis Required. The resource being updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * Analysis resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\VisionAI\V1\UpdateAnalysisRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\Analysis $analysis, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAnalysis($analysis) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * Analysis resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\VisionAI\V1\Analysis $analysis - * Required. The resource being updated. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Analysis resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Field mask is used to specify the fields to be overwritten in the - * Analysis resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Analysis analysis = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Analysis|null - */ - public function getAnalysis() - { - return $this->analysis; - } - - public function hasAnalysis() - { - return isset($this->analysis); - } - - public function clearAnalysis() - { - unset($this->analysis); - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Analysis analysis = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Analysis $var - * @return $this - */ - public function setAnalysis($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Analysis::class); - $this->analysis = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAnnotationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAnnotationRequest.php deleted file mode 100644 index 07bfbdc8410d..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAnnotationRequest.php +++ /dev/null @@ -1,151 +0,0 @@ -google.cloud.visionai.v1.UpdateAnnotationRequest - */ -class UpdateAnnotationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The annotation to update. - * The annotation's `name` field is used to identify the annotation to be - * updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` - * - * Generated from protobuf field .google.cloud.visionai.v1.Annotation annotation = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $annotation = null; - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\VisionAI\V1\Annotation $annotation Required. The annotation to update. - * The annotation's `name` field is used to identify the annotation to be - * updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. - * - * @return \Google\Cloud\VisionAI\V1\UpdateAnnotationRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\Annotation $annotation, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAnnotation($annotation) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Annotation $annotation - * Required. The annotation to update. - * The annotation's `name` field is used to identify the annotation to be - * updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The annotation to update. - * The annotation's `name` field is used to identify the annotation to be - * updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` - * - * Generated from protobuf field .google.cloud.visionai.v1.Annotation annotation = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Annotation|null - */ - public function getAnnotation() - { - return $this->annotation; - } - - public function hasAnnotation() - { - return isset($this->annotation); - } - - public function clearAnnotation() - { - unset($this->annotation); - } - - /** - * Required. The annotation to update. - * The annotation's `name` field is used to identify the annotation to be - * updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}` - * - * Generated from protobuf field .google.cloud.visionai.v1.Annotation annotation = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Annotation $var - * @return $this - */ - public function setAnnotation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Annotation::class); - $this->annotation = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesRequest.php deleted file mode 100644 index 67bfe9bc4a6b..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesRequest.php +++ /dev/null @@ -1,232 +0,0 @@ -google.cloud.visionai.v1.UpdateApplicationInstancesRequest - */ -class UpdateApplicationInstancesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Generated from protobuf field repeated .google.cloud.visionai.v1.UpdateApplicationInstancesRequest.UpdateApplicationInstance application_instances = 2; - */ - private $application_instances; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * If true, Update Request will create one resource if the target resource - * doesn't exist, this time, the field_mask will be ignored. - * - * Generated from protobuf field bool allow_missing = 4; - */ - protected $allow_missing = false; - - /** - * @param string $name Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * Please see {@see AppPlatformClient::applicationName()} for help formatting this field. - * @param \Google\Cloud\VisionAI\V1\UpdateApplicationInstancesRequest\UpdateApplicationInstance[] $applicationInstances - * - * @return \Google\Cloud\VisionAI\V1\UpdateApplicationInstancesRequest - * - * @experimental - */ - public static function build(string $name, array $applicationInstances): self - { - return (new self()) - ->setName($name) - ->setApplicationInstances($applicationInstances); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * @type \Google\Cloud\VisionAI\V1\UpdateApplicationInstancesRequest\UpdateApplicationInstance[] $application_instances - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $allow_missing - * If true, Update Request will create one resource if the target resource - * doesn't exist, this time, the field_mask will be ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * 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; - } - - /** - * Generated from protobuf field repeated .google.cloud.visionai.v1.UpdateApplicationInstancesRequest.UpdateApplicationInstance application_instances = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\UpdateApplicationInstancesRequest\UpdateApplicationInstance> - */ - public function getApplicationInstances() - { - return $this->application_instances; - } - - /** - * Generated from protobuf field repeated .google.cloud.visionai.v1.UpdateApplicationInstancesRequest.UpdateApplicationInstance application_instances = 2; - * @param \Google\Cloud\VisionAI\V1\UpdateApplicationInstancesRequest\UpdateApplicationInstance[] $var - * @return $this - */ - public function setApplicationInstances($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\UpdateApplicationInstancesRequest\UpdateApplicationInstance::class); - $this->application_instances = $arr; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * If true, Update Request will create one resource if the target resource - * doesn't exist, this time, the field_mask will be ignored. - * - * Generated from protobuf field bool allow_missing = 4; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If true, Update Request will create one resource if the target resource - * doesn't exist, this time, the field_mask will be ignored. - * - * Generated from protobuf field bool allow_missing = 4; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesRequest/UpdateApplicationInstance.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesRequest/UpdateApplicationInstance.php deleted file mode 100644 index c2c385ebc9d2..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesRequest/UpdateApplicationInstance.php +++ /dev/null @@ -1,169 +0,0 @@ -google.cloud.visionai.v1.UpdateApplicationInstancesRequest.UpdateApplicationInstance - */ -class UpdateApplicationInstance extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in - * the Draft resource by the update. The fields specified in the update_mask - * are relative to the resource, not the full request. A field will be - * overwritten if it is in the mask. If the user does not provide a mask - * then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance = null; - /** - * Required. The id of the instance. - * - * Generated from protobuf field string instance_id = 3 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $instance_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in - * the Draft resource by the update. The fields specified in the update_mask - * are relative to the resource, not the full request. A field will be - * overwritten if it is in the mask. If the user does not provide a mask - * then all fields will be overwritten. - * @type \Google\Cloud\VisionAI\V1\Instance $instance - * Required. The resource being updated. - * @type string $instance_id - * Required. The id of the instance. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in - * the Draft resource by the update. The fields specified in the update_mask - * are relative to the resource, not the full request. A field will be - * overwritten if it is in the mask. If the user does not provide a mask - * then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in - * the Draft resource by the update. The fields specified in the update_mask - * are relative to the resource, not the full request. A field will be - * overwritten if it is in the mask. If the user does not provide a mask - * then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Instance|null - */ - public function getInstance() - { - return $this->instance; - } - - public function hasInstance() - { - return isset($this->instance); - } - - public function clearInstance() - { - unset($this->instance); - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Instance instance = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Instance $var - * @return $this - */ - public function setInstance($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Instance::class); - $this->instance = $var; - - return $this; - } - - /** - * Required. The id of the instance. - * - * Generated from protobuf field string instance_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getInstanceId() - { - return $this->instance_id; - } - - /** - * Required. The id of the instance. - * - * Generated from protobuf field string instance_id = 3 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setInstanceId($var) - { - GPBUtil::checkString($var, True); - $this->instance_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesResponse.php deleted file mode 100644 index a4ff01346eee..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationInstancesResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.UpdateApplicationInstancesResponse - */ -class UpdateApplicationInstancesResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationRequest.php deleted file mode 100644 index 9c429a9830ab..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.visionai.v1.UpdateApplicationRequest - */ -class UpdateApplicationRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * Application resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Application application = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $application = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VisionAI\V1\Application $application Required. The resource being updated. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * Application resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\VisionAI\V1\UpdateApplicationRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\Application $application, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setApplication($application) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * Application resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\VisionAI\V1\Application $application - * Required. The resource being updated. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * Application resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * Application resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Application application = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Application|null - */ - public function getApplication() - { - return $this->application; - } - - public function hasApplication() - { - return isset($this->application); - } - - public function clearApplication() - { - unset($this->application); - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Application application = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Application $var - * @return $this - */ - public function setApplication($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Application::class); - $this->application = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationStreamInputRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationStreamInputRequest.php deleted file mode 100644 index fa0914e3e5e6..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationStreamInputRequest.php +++ /dev/null @@ -1,241 +0,0 @@ -google.cloud.visionai.v1.UpdateApplicationStreamInputRequest - */ -class UpdateApplicationStreamInputRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The stream inputs to update, the stream resource name is the key of each - * StreamInput, and it must be unique within each application. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; - */ - private $application_stream_inputs; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * If true, UpdateApplicationStreamInput will insert stream input to - * application even if the target stream is not included in the application. - * - * Generated from protobuf field bool allow_missing = 4; - */ - protected $allow_missing = false; - - /** - * @param string $name Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * Please see {@see AppPlatformClient::applicationName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\UpdateApplicationStreamInputRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * @type \Google\Cloud\VisionAI\V1\ApplicationStreamInput[] $application_stream_inputs - * The stream inputs to update, the stream resource name is the key of each - * StreamInput, and it must be unique within each application. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $allow_missing - * If true, UpdateApplicationStreamInput will insert stream input to - * application even if the target stream is not included in the application. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. the name of the application to retrieve. - * Format: - * "projects/{project}/locations/{location}/applications/{application}" - * - * 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 stream inputs to update, the stream resource name is the key of each - * StreamInput, and it must be unique within each application. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\ApplicationStreamInput> - */ - public function getApplicationStreamInputs() - { - return $this->application_stream_inputs; - } - - /** - * The stream inputs to update, the stream resource name is the key of each - * StreamInput, and it must be unique within each application. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.ApplicationStreamInput application_stream_inputs = 2; - * @param \Google\Cloud\VisionAI\V1\ApplicationStreamInput[] $var - * @return $this - */ - public function setApplicationStreamInputs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\ApplicationStreamInput::class); - $this->application_stream_inputs = $arr; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * If true, UpdateApplicationStreamInput will insert stream input to - * application even if the target stream is not included in the application. - * - * Generated from protobuf field bool allow_missing = 4; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If true, UpdateApplicationStreamInput will insert stream input to - * application even if the target stream is not included in the application. - * - * Generated from protobuf field bool allow_missing = 4; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationStreamInputResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationStreamInputResponse.php deleted file mode 100644 index ba050f1642fe..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateApplicationStreamInputResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.UpdateApplicationStreamInputResponse - */ -class UpdateApplicationStreamInputResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAssetRequest.php deleted file mode 100644 index c0a37db5988f..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateAssetRequest.php +++ /dev/null @@ -1,152 +0,0 @@ -google.cloud.visionai.v1.UpdateAssetRequest - */ -class UpdateAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The asset to update. - * The asset's `name` field is used to identify the asset to be updated. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` - * - * Generated from protobuf field .google.cloud.visionai.v1.Asset asset = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $asset = null; - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\VisionAI\V1\Asset $asset Required. The asset to update. - * - * The asset's `name` field is used to identify the asset to be updated. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. - * - * @return \Google\Cloud\VisionAI\V1\UpdateAssetRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\Asset $asset, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setAsset($asset) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Asset $asset - * Required. The asset to update. - * The asset's `name` field is used to identify the asset to be updated. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The asset to update. - * The asset's `name` field is used to identify the asset to be updated. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` - * - * Generated from protobuf field .google.cloud.visionai.v1.Asset asset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Asset|null - */ - public function getAsset() - { - return $this->asset; - } - - public function hasAsset() - { - return isset($this->asset); - } - - public function clearAsset() - { - unset($this->asset); - } - - /** - * Required. The asset to update. - * The asset's `name` field is used to identify the asset to be updated. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}` - * - * Generated from protobuf field .google.cloud.visionai.v1.Asset asset = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Asset $var - * @return $this - */ - public function setAsset($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Asset::class); - $this->asset = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateClusterRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateClusterRequest.php deleted file mode 100644 index 097cdc1fa1c1..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateClusterRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.visionai.v1.UpdateClusterRequest - */ -class UpdateClusterRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Cluster resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.visionai.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $cluster = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VisionAI\V1\Cluster $cluster Required. The resource being updated - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * Cluster resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\VisionAI\V1\UpdateClusterRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\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\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * Cluster resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\VisionAI\V1\Cluster $cluster - * Required. The resource being updated - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Cluster resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Field mask is used to specify the fields to be overwritten in the - * Cluster resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; - } - - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.visionai.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Cluster|null - */ - public function getCluster() - { - return $this->cluster; - } - - public function hasCluster() - { - return isset($this->cluster); - } - - public function clearCluster() - { - unset($this->cluster); - } - - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.visionai.v1.Cluster cluster = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Cluster $var - * @return $this - */ - public function setCluster($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Cluster::class); - $this->cluster = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateCollectionRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateCollectionRequest.php deleted file mode 100644 index ea2fa74ba2c4..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateCollectionRequest.php +++ /dev/null @@ -1,182 +0,0 @@ -google.cloud.visionai.v1.UpdateCollectionRequest - */ -class UpdateCollectionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The collection to update. - * The collection's `name` field is used to identify the collection to be - * updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * - * Generated from protobuf field .google.cloud.visionai.v1.Collection collection = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $collection = null; - /** - * The list of fields to be updated. - * - Unset `update_mask` or set `update_mask` to be a single "*" only will - * update all updatable fields with the value provided in `collection`. - * - To update `display_name` value to empty string, set it in the - * `collection` - * to empty string, and set `update_mask` with "display_name". Same applies - * to other updatable string fields in the `collection`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\VisionAI\V1\Collection $collection Required. The collection to update. - * - * The collection's `name` field is used to identify the collection to be - * updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. - * - Unset `update_mask` or set `update_mask` to be a single "*" only will - * update all updatable fields with the value provided in `collection`. - * - To update `display_name` value to empty string, set it in the - * `collection` - * to empty string, and set `update_mask` with "display_name". Same applies - * to other updatable string fields in the `collection`. - * - * @return \Google\Cloud\VisionAI\V1\UpdateCollectionRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\Collection $collection, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCollection($collection) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Collection $collection - * Required. The collection to update. - * The collection's `name` field is used to identify the collection to be - * updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * - Unset `update_mask` or set `update_mask` to be a single "*" only will - * update all updatable fields with the value provided in `collection`. - * - To update `display_name` value to empty string, set it in the - * `collection` - * to empty string, and set `update_mask` with "display_name". Same applies - * to other updatable string fields in the `collection`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The collection to update. - * The collection's `name` field is used to identify the collection to be - * updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * - * Generated from protobuf field .google.cloud.visionai.v1.Collection collection = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Collection|null - */ - public function getCollection() - { - return $this->collection; - } - - public function hasCollection() - { - return isset($this->collection); - } - - public function clearCollection() - { - unset($this->collection); - } - - /** - * Required. The collection to update. - * The collection's `name` field is used to identify the collection to be - * updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * - * Generated from protobuf field .google.cloud.visionai.v1.Collection collection = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Collection $var - * @return $this - */ - public function setCollection($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Collection::class); - $this->collection = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * - Unset `update_mask` or set `update_mask` to be a single "*" only will - * update all updatable fields with the value provided in `collection`. - * - To update `display_name` value to empty string, set it in the - * `collection` - * to empty string, and set `update_mask` with "display_name". Same applies - * to other updatable string fields in the `collection`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. - * - Unset `update_mask` or set `update_mask` to be a single "*" only will - * update all updatable fields with the value provided in `collection`. - * - To update `display_name` value to empty string, set it in the - * `collection` - * to empty string, and set `update_mask` with "display_name". Same applies - * to other updatable string fields in the `collection`. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateCorpusRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateCorpusRequest.php deleted file mode 100644 index 8d9ec6423687..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateCorpusRequest.php +++ /dev/null @@ -1,136 +0,0 @@ -google.cloud.visionai.v1.UpdateCorpusRequest - */ -class UpdateCorpusRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The corpus which replaces the resource on the server. - * - * Generated from protobuf field .google.cloud.visionai.v1.Corpus corpus = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $corpus = null; - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\VisionAI\V1\Corpus $corpus Required. The corpus which replaces the resource on the server. - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. - * - * @return \Google\Cloud\VisionAI\V1\UpdateCorpusRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\Corpus $corpus, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCorpus($corpus) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Corpus $corpus - * Required. The corpus which replaces the resource on the server. - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The corpus which replaces the resource on the server. - * - * Generated from protobuf field .google.cloud.visionai.v1.Corpus corpus = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Corpus|null - */ - public function getCorpus() - { - return $this->corpus; - } - - public function hasCorpus() - { - return isset($this->corpus); - } - - public function clearCorpus() - { - unset($this->corpus); - } - - /** - * Required. The corpus which replaces the resource on the server. - * - * Generated from protobuf field .google.cloud.visionai.v1.Corpus corpus = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Corpus $var - * @return $this - */ - public function setCorpus($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Corpus::class); - $this->corpus = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateDataSchemaRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateDataSchemaRequest.php deleted file mode 100644 index 01cb58b6ebaf..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateDataSchemaRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.visionai.v1.UpdateDataSchemaRequest - */ -class UpdateDataSchemaRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The data schema's `name` field is used to identify the data - * schema to be updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchema data_schema = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $data_schema = null; - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\VisionAI\V1\DataSchema $dataSchema Required. The data schema's `name` field is used to identify the data - * schema to be updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. - * - * @return \Google\Cloud\VisionAI\V1\UpdateDataSchemaRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\DataSchema $dataSchema, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDataSchema($dataSchema) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\DataSchema $data_schema - * Required. The data schema's `name` field is used to identify the data - * schema to be updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The data schema's `name` field is used to identify the data - * schema to be updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchema data_schema = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\DataSchema|null - */ - public function getDataSchema() - { - return $this->data_schema; - } - - public function hasDataSchema() - { - return isset($this->data_schema); - } - - public function clearDataSchema() - { - unset($this->data_schema); - } - - /** - * Required. The data schema's `name` field is used to identify the data - * schema to be updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}` - * - * Generated from protobuf field .google.cloud.visionai.v1.DataSchema data_schema = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\DataSchema $var - * @return $this - */ - public function setDataSchema($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DataSchema::class); - $this->data_schema = $var; - - return $this; - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateDraftRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateDraftRequest.php deleted file mode 100644 index 4a99efb1d058..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateDraftRequest.php +++ /dev/null @@ -1,268 +0,0 @@ -google.cloud.visionai.v1.UpdateDraftRequest - */ -class UpdateDraftRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * Draft resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Draft draft = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $draft = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * If true, UpdateDraftRequest will create one resource if the target resource - * doesn't exist, this time, the field_mask will be ignored. - * - * Generated from protobuf field bool allow_missing = 4; - */ - protected $allow_missing = false; - - /** - * @param \Google\Cloud\VisionAI\V1\Draft $draft Required. The resource being updated. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * Draft resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\VisionAI\V1\UpdateDraftRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\Draft $draft, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setDraft($draft) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * Draft resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\VisionAI\V1\Draft $draft - * Required. The resource being updated. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @type bool $allow_missing - * If true, UpdateDraftRequest will create one resource if the target resource - * doesn't exist, this time, the field_mask will be ignored. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * Draft resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * Draft resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Draft draft = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Draft|null - */ - public function getDraft() - { - return $this->draft; - } - - public function hasDraft() - { - return isset($this->draft); - } - - public function clearDraft() - { - unset($this->draft); - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Draft draft = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Draft $var - * @return $this - */ - public function setDraft($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Draft::class); - $this->draft = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * If true, UpdateDraftRequest will create one resource if the target resource - * doesn't exist, this time, the field_mask will be ignored. - * - * Generated from protobuf field bool allow_missing = 4; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * If true, UpdateDraftRequest will create one resource if the target resource - * doesn't exist, this time, the field_mask will be ignored. - * - * Generated from protobuf field bool allow_missing = 4; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateEventRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateEventRequest.php deleted file mode 100644 index 97dbf644c2c4..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateEventRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.visionai.v1.UpdateEventRequest - */ -class UpdateEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Event resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $event = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VisionAI\V1\Event $event Required. The resource being updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * Event resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\VisionAI\V1\UpdateEventRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\Event $event, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setEvent($event) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * Event resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\VisionAI\V1\Event $event - * Required. The resource being updated. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Event resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Field mask is used to specify the fields to be overwritten in the - * Event resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Event|null - */ - public function getEvent() - { - return $this->event; - } - - public function hasEvent() - { - return isset($this->event); - } - - public function clearEvent() - { - unset($this->event); - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Event event = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Event $var - * @return $this - */ - public function setEvent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Event::class); - $this->event = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexEndpointMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexEndpointMetadata.php deleted file mode 100644 index fe0b86ea98e6..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexEndpointMetadata.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.visionai.v1.UpdateIndexEndpointMetadata - */ -class UpdateIndexEndpointMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - */ - protected $operation_metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\OperationMetadata $operation_metadata - * Common metadata of the long-running operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null - */ - public function getOperationMetadata() - { - return $this->operation_metadata; - } - - public function hasOperationMetadata() - { - return isset($this->operation_metadata); - } - - public function clearOperationMetadata() - { - unset($this->operation_metadata); - } - - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var - * @return $this - */ - public function setOperationMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); - $this->operation_metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexEndpointRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexEndpointRequest.php deleted file mode 100644 index c71496f82e53..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexEndpointRequest.php +++ /dev/null @@ -1,166 +0,0 @@ -google.cloud.visionai.v1.UpdateIndexEndpointRequest - */ -class UpdateIndexEndpointRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $index_endpoint = null; - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * IndexEndpoint resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. - * A field of the resource will be overwritten if it is in the mask. - * Empty field mask is not allowed. - * If the mask is "*", then this is a full replacement of the resource. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\VisionAI\V1\IndexEndpoint $indexEndpoint Required. The resource being updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * IndexEndpoint resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. - * A field of the resource will be overwritten if it is in the mask. - * Empty field mask is not allowed. - * If the mask is "*", then this is a full replacement of the resource. - * - * @return \Google\Cloud\VisionAI\V1\UpdateIndexEndpointRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\IndexEndpoint $indexEndpoint, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setIndexEndpoint($indexEndpoint) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\IndexEndpoint $index_endpoint - * Required. The resource being updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * IndexEndpoint resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. - * A field of the resource will be overwritten if it is in the mask. - * Empty field mask is not allowed. - * If the mask is "*", then this is a full replacement of the resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\IndexEndpoint|null - */ - public function getIndexEndpoint() - { - return $this->index_endpoint; - } - - public function hasIndexEndpoint() - { - return isset($this->index_endpoint); - } - - public function clearIndexEndpoint() - { - unset($this->index_endpoint); - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.IndexEndpoint index_endpoint = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\IndexEndpoint $var - * @return $this - */ - public function setIndexEndpoint($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\IndexEndpoint::class); - $this->index_endpoint = $var; - - return $this; - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * IndexEndpoint resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. - * A field of the resource will be overwritten if it is in the mask. - * Empty field mask is not allowed. - * If the mask is "*", then this is a full replacement of the resource. - * - * 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. Field mask is used to specify the fields to be overwritten in the - * IndexEndpoint resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. - * A field of the resource will be overwritten if it is in the mask. - * Empty field mask is not allowed. - * If the mask is "*", then this is a full replacement of the resource. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexMetadata.php deleted file mode 100644 index 298f2d59bd2c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexMetadata.php +++ /dev/null @@ -1,77 +0,0 @@ -google.cloud.visionai.v1.UpdateIndexMetadata - */ -class UpdateIndexMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - */ - protected $operation_metadata = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\OperationMetadata $operation_metadata - * Common metadata of the long-running operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - * @return \Google\Cloud\VisionAI\V1\OperationMetadata|null - */ - public function getOperationMetadata() - { - return $this->operation_metadata; - } - - public function hasOperationMetadata() - { - return isset($this->operation_metadata); - } - - public function clearOperationMetadata() - { - unset($this->operation_metadata); - } - - /** - * Common metadata of the long-running operation. - * - * Generated from protobuf field .google.cloud.visionai.v1.OperationMetadata operation_metadata = 1; - * @param \Google\Cloud\VisionAI\V1\OperationMetadata $var - * @return $this - */ - public function setOperationMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\OperationMetadata::class); - $this->operation_metadata = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexRequest.php deleted file mode 100644 index 11492af2ed4c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateIndexRequest.php +++ /dev/null @@ -1,161 +0,0 @@ -google.cloud.visionai.v1.UpdateIndexRequest - */ -class UpdateIndexRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Index index = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $index = null; - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Index resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field of the resource - * will be overwritten if it is in the mask. Empty field mask is not allowed. - * If the mask is "*", it triggers a full update of the index, and also a - * whole rebuild of index data. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\VisionAI\V1\Index $index Required. The resource being updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * Index resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field of the resource - * will be overwritten if it is in the mask. Empty field mask is not allowed. - * If the mask is "*", it triggers a full update of the index, and also a - * whole rebuild of index data. - * - * @return \Google\Cloud\VisionAI\V1\UpdateIndexRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\Index $index, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setIndex($index) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\Index $index - * Required. The resource being updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * Index resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field of the resource - * will be overwritten if it is in the mask. Empty field mask is not allowed. - * If the mask is "*", it triggers a full update of the index, and also a - * whole rebuild of index data. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Index index = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Index|null - */ - public function getIndex() - { - return $this->index; - } - - public function hasIndex() - { - return isset($this->index); - } - - public function clearIndex() - { - unset($this->index); - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Index index = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Index $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Index::class); - $this->index = $var; - - return $this; - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Index resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field of the resource - * will be overwritten if it is in the mask. Empty field mask is not allowed. - * If the mask is "*", it triggers a full update of the index, and also a - * whole rebuild of index data. - * - * 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. Field mask is used to specify the fields to be overwritten in the - * Index resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field of the resource - * will be overwritten if it is in the mask. Empty field mask is not allowed. - * If the mask is "*", it triggers a full update of the index, and also a - * whole rebuild of index data. - * - * 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/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateOperatorRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateOperatorRequest.php deleted file mode 100644 index eeb3e48c5322..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateOperatorRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.visionai.v1.UpdateOperatorRequest - */ -class UpdateOperatorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Operator resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.visionai.v1.Operator operator = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $operator = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VisionAI\V1\Operator $operator Required. The resource being updated - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * Operator resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\VisionAI\V1\UpdateOperatorRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\Operator $operator, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setOperator($operator) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * Operator resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\VisionAI\V1\Operator $operator - * Required. The resource being updated - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Operator resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Field mask is used to specify the fields to be overwritten in the - * Operator resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; - } - - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.visionai.v1.Operator operator = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Operator|null - */ - public function getOperator() - { - return $this->operator; - } - - public function hasOperator() - { - return isset($this->operator); - } - - public function clearOperator() - { - unset($this->operator); - } - - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.visionai.v1.Operator operator = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Operator $var - * @return $this - */ - public function setOperator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Operator::class); - $this->operator = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateProcessRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateProcessRequest.php deleted file mode 100644 index 7e6e5003a52c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateProcessRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.visionai.v1.UpdateProcessRequest - */ -class UpdateProcessRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Process resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $process = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VisionAI\V1\Process $process Required. The resource being updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * Process resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\VisionAI\V1\UpdateProcessRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\Process $process, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setProcess($process) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * Process resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\VisionAI\V1\Process $process - * Required. The resource being updated. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\LvaService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Process resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Field mask is used to specify the fields to be overwritten in the - * Process resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Process|null - */ - public function getProcess() - { - return $this->process; - } - - public function hasProcess() - { - return isset($this->process); - } - - public function clearProcess() - { - unset($this->process); - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Process process = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Process $var - * @return $this - */ - public function setProcess($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Process::class); - $this->process = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateProcessorRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateProcessorRequest.php deleted file mode 100644 index 94ea27b9de76..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateProcessorRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.visionai.v1.UpdateProcessorRequest - */ -class UpdateProcessorRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * Processor resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $processor = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VisionAI\V1\Processor $processor Required. The resource being updated. - * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask is used to specify the fields to be overwritten in the - * Processor resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\VisionAI\V1\UpdateProcessorRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\Processor $processor, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setProcessor($processor) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. Field mask is used to specify the fields to be overwritten in the - * Processor resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\VisionAI\V1\Processor $processor - * Required. The resource being updated. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * Processor resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Field mask is used to specify the fields to be overwritten in the - * Processor resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Processor|null - */ - public function getProcessor() - { - return $this->processor; - } - - public function hasProcessor() - { - return isset($this->processor); - } - - public function clearProcessor() - { - unset($this->processor); - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Processor processor = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Processor $var - * @return $this - */ - public function setProcessor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Processor::class); - $this->processor = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSearchConfigRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSearchConfigRequest.php deleted file mode 100644 index e3d0ec8fed55..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSearchConfigRequest.php +++ /dev/null @@ -1,157 +0,0 @@ -google.cloud.visionai.v1.UpdateSearchConfigRequest - */ -class UpdateSearchConfigRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The search configuration to update. - * The search configuration's `name` field is used to identify the resource to - * be updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchConfig search_config = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $search_config = null; - /** - * The list of fields to be updated. If left unset, all field paths will be - * updated/overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\VisionAI\V1\SearchConfig $searchConfig Required. The search configuration to update. - * - * The search configuration's `name` field is used to identify the resource to - * be updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. If left unset, all field paths will be - * updated/overwritten. - * - * @return \Google\Cloud\VisionAI\V1\UpdateSearchConfigRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\SearchConfig $searchConfig, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSearchConfig($searchConfig) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\SearchConfig $search_config - * Required. The search configuration to update. - * The search configuration's `name` field is used to identify the resource to - * be updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. If left unset, all field paths will be - * updated/overwritten. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The search configuration to update. - * The search configuration's `name` field is used to identify the resource to - * be updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchConfig search_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\SearchConfig|null - */ - public function getSearchConfig() - { - return $this->search_config; - } - - public function hasSearchConfig() - { - return isset($this->search_config); - } - - public function clearSearchConfig() - { - unset($this->search_config); - } - - /** - * Required. The search configuration to update. - * The search configuration's `name` field is used to identify the resource to - * be updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}` - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchConfig search_config = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\SearchConfig $var - * @return $this - */ - public function setSearchConfig($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\SearchConfig::class); - $this->search_config = $var; - - return $this; - } - - /** - * The list of fields to be updated. If left unset, all field paths will be - * updated/overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. If left unset, all field paths will be - * updated/overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSearchHypernymRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSearchHypernymRequest.php deleted file mode 100644 index eb217af11969..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSearchHypernymRequest.php +++ /dev/null @@ -1,156 +0,0 @@ -google.cloud.visionai.v1.UpdateSearchHypernymRequest - */ -class UpdateSearchHypernymRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The SearchHypernym to update. - * The search hypernym's `name` field is used to identify the search hypernym - * to be updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchHypernym search_hypernym = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $search_hypernym = null; - /** - * The list of fields to be updated. If left unset, all field paths will be - * updated/overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\VisionAI\V1\SearchHypernym $searchHypernym Required. The SearchHypernym to update. - * The search hypernym's `name` field is used to identify the search hypernym - * to be updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` - * @param \Google\Protobuf\FieldMask $updateMask The list of fields to be updated. If left unset, all field paths will be - * updated/overwritten. - * - * @return \Google\Cloud\VisionAI\V1\UpdateSearchHypernymRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\SearchHypernym $searchHypernym, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSearchHypernym($searchHypernym) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\SearchHypernym $search_hypernym - * Required. The SearchHypernym to update. - * The search hypernym's `name` field is used to identify the search hypernym - * to be updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` - * @type \Google\Protobuf\FieldMask $update_mask - * The list of fields to be updated. If left unset, all field paths will be - * updated/overwritten. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The SearchHypernym to update. - * The search hypernym's `name` field is used to identify the search hypernym - * to be updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchHypernym search_hypernym = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\SearchHypernym|null - */ - public function getSearchHypernym() - { - return $this->search_hypernym; - } - - public function hasSearchHypernym() - { - return isset($this->search_hypernym); - } - - public function clearSearchHypernym() - { - unset($this->search_hypernym); - } - - /** - * Required. The SearchHypernym to update. - * The search hypernym's `name` field is used to identify the search hypernym - * to be updated. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}` - * - * Generated from protobuf field .google.cloud.visionai.v1.SearchHypernym search_hypernym = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\SearchHypernym $var - * @return $this - */ - public function setSearchHypernym($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\SearchHypernym::class); - $this->search_hypernym = $var; - - return $this; - } - - /** - * The list of fields to be updated. If left unset, all field paths will be - * updated/overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @return \Google\Protobuf\FieldMask|null - */ - public function getUpdateMask() - { - return $this->update_mask; - } - - public function hasUpdateMask() - { - return isset($this->update_mask); - } - - public function clearUpdateMask() - { - unset($this->update_mask); - } - - /** - * The list of fields to be updated. If left unset, all field paths will be - * updated/overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSeriesRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSeriesRequest.php deleted file mode 100644 index 00e8e1a8711a..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateSeriesRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.visionai.v1.UpdateSeriesRequest - */ -class UpdateSeriesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Series resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field will be overwritten - * if it is in the mask. If the user does not provide a mask then all fields - * will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.visionai.v1.Series series = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $series = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VisionAI\V1\Series $series Required. The resource being updated - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * Series resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field will be overwritten - * if it is in the mask. If the user does not provide a mask then all fields - * will be overwritten. - * - * @return \Google\Cloud\VisionAI\V1\UpdateSeriesRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\Series $series, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSeries($series) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * Series resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field will be overwritten - * if it is in the mask. If the user does not provide a mask then all fields - * will be overwritten. - * @type \Google\Cloud\VisionAI\V1\Series $series - * Required. The resource being updated - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Series resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field will be overwritten - * if it is in the mask. If the user does not provide a mask then all fields - * will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Field mask is used to specify the fields to be overwritten in the - * Series resource by the update. The fields specified in the update_mask are - * relative to the resource, not the full request. A field will be overwritten - * if it is in the mask. If the user does not provide a mask then all fields - * will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; - } - - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.visionai.v1.Series series = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Series|null - */ - public function getSeries() - { - return $this->series; - } - - public function hasSeries() - { - return isset($this->series); - } - - public function clearSeries() - { - unset($this->series); - } - - /** - * Required. The resource being updated - * - * Generated from protobuf field .google.cloud.visionai.v1.Series series = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Series $var - * @return $this - */ - public function setSeries($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Series::class); - $this->series = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateStreamRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateStreamRequest.php deleted file mode 100644 index 87ca07d05322..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UpdateStreamRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.cloud.visionai.v1.UpdateStreamRequest - */ -class UpdateStreamRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Stream resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Stream stream = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $stream = null; - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Cloud\VisionAI\V1\Stream $stream Required. The resource being updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. Field mask is used to specify the fields to be overwritten in the - * Stream resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * @return \Google\Cloud\VisionAI\V1\UpdateStreamRequest - * - * @experimental - */ - public static function build(\Google\Cloud\VisionAI\V1\Stream $stream, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setStream($stream) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\FieldMask $update_mask - * Required. Field mask is used to specify the fields to be overwritten in the - * Stream resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * @type \Google\Cloud\VisionAI\V1\Stream $stream - * Required. The resource being updated. - * @type string $request_id - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\StreamsService::initOnce(); - parent::__construct($data); - } - - /** - * Required. Field mask is used to specify the fields to be overwritten in the - * Stream resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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. Field mask is used to specify the fields to be overwritten in the - * Stream resource by the update. - * The fields specified in the update_mask are relative to the resource, not - * the full request. A field will be overwritten if it is in the mask. If the - * user does not provide a mask then all fields will be overwritten. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 1 [(.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; - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Stream stream = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\VisionAI\V1\Stream|null - */ - public function getStream() - { - return $this->stream; - } - - public function hasStream() - { - return isset($this->stream); - } - - public function clearStream() - { - unset($this->stream); - } - - /** - * Required. The resource being updated. - * - * Generated from protobuf field .google.cloud.visionai.v1.Stream stream = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\VisionAI\V1\Stream $var - * @return $this - */ - public function setStream($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Stream::class); - $this->stream = $var; - - return $this; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. An optional request ID to identify requests. Specify a unique - * request ID so that if you must retry your request, the server will know to - * ignore the request if it has already been completed. The server will - * guarantee that for at least 60 minutes since the first request. - * For example, consider a situation where you make an initial request and the - * request times out. If you make the request again with the same request ID, - * the server can check if original operation with the same request ID was - * received, and if so, will ignore the second request. This prevents clients - * from accidentally creating duplicate commitments. - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * - * Generated from protobuf field string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetMetadata.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetMetadata.php deleted file mode 100644 index e478856726ec..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetMetadata.php +++ /dev/null @@ -1,121 +0,0 @@ -google.cloud.visionai.v1.UploadAssetMetadata - */ -class UploadAssetMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The start time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - */ - protected $start_time = null; - /** - * The update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - */ - protected $update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $start_time - * The start time of the operation. - * @type \Google\Protobuf\Timestamp $update_time - * The update time of the operation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The start time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getStartTime() - { - return $this->start_time; - } - - public function hasStartTime() - { - return isset($this->start_time); - } - - public function clearStartTime() - { - unset($this->start_time); - } - - /** - * The start time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->start_time = $var; - - return $this; - } - - /** - * The update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getUpdateTime() - { - return $this->update_time; - } - - public function hasUpdateTime() - { - return isset($this->update_time); - } - - public function clearUpdateTime() - { - unset($this->update_time); - } - - /** - * The update time of the operation. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetRequest.php deleted file mode 100644 index 308f74eb14c6..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -google.cloud.visionai.v1.UploadAssetRequest - */ -class UploadAssetRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the asset to upload. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The source of the asset. - * - * Generated from protobuf field .google.cloud.visionai.v1.AssetSource asset_source = 2; - */ - protected $asset_source = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The resource name of the asset to upload. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * @type \Google\Cloud\VisionAI\V1\AssetSource $asset_source - * The source of the asset. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the asset to upload. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. The resource name of the asset to upload. - * Format: - * `projects/{project_number}/locations/{location_id}/corpora/{corpus_id}/assets/{asset_id}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The source of the asset. - * - * Generated from protobuf field .google.cloud.visionai.v1.AssetSource asset_source = 2; - * @return \Google\Cloud\VisionAI\V1\AssetSource|null - */ - public function getAssetSource() - { - return $this->asset_source; - } - - public function hasAssetSource() - { - return isset($this->asset_source); - } - - public function clearAssetSource() - { - unset($this->asset_source); - } - - /** - * The source of the asset. - * - * Generated from protobuf field .google.cloud.visionai.v1.AssetSource asset_source = 2; - * @param \Google\Cloud\VisionAI\V1\AssetSource $var - * @return $this - */ - public function setAssetSource($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AssetSource::class); - $this->asset_source = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetResponse.php deleted file mode 100644 index 76582fb83be4..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UploadAssetResponse.php +++ /dev/null @@ -1,33 +0,0 @@ -google.cloud.visionai.v1.UploadAssetResponse - */ -class UploadAssetResponse extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UserSpecifiedAnnotation.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UserSpecifiedAnnotation.php deleted file mode 100644 index 0af0bf076fbe..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/UserSpecifiedAnnotation.php +++ /dev/null @@ -1,163 +0,0 @@ -google.cloud.visionai.v1.UserSpecifiedAnnotation - */ -class UserSpecifiedAnnotation extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Key of the annotation. The key must be set with type by - * CreateDataSchema. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $key = ''; - /** - * Value of the annotation. The value must be able to convert - * to the type according to the data schema. - * - * Generated from protobuf field .google.cloud.visionai.v1.AnnotationValue value = 2; - */ - protected $value = null; - /** - * Partition information in time and space for the sub-asset level annotation. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition partition = 3; - */ - protected $partition = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * Required. Key of the annotation. The key must be set with type by - * CreateDataSchema. - * @type \Google\Cloud\VisionAI\V1\AnnotationValue $value - * Value of the annotation. The value must be able to convert - * to the type according to the data schema. - * @type \Google\Cloud\VisionAI\V1\Partition $partition - * Partition information in time and space for the sub-asset level annotation. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. Key of the annotation. The key must be set with type by - * CreateDataSchema. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * Required. Key of the annotation. The key must be set with type by - * CreateDataSchema. - * - * Generated from protobuf field string key = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * Value of the annotation. The value must be able to convert - * to the type according to the data schema. - * - * Generated from protobuf field .google.cloud.visionai.v1.AnnotationValue value = 2; - * @return \Google\Cloud\VisionAI\V1\AnnotationValue|null - */ - public function getValue() - { - return $this->value; - } - - public function hasValue() - { - return isset($this->value); - } - - public function clearValue() - { - unset($this->value); - } - - /** - * Value of the annotation. The value must be able to convert - * to the type according to the data schema. - * - * Generated from protobuf field .google.cloud.visionai.v1.AnnotationValue value = 2; - * @param \Google\Cloud\VisionAI\V1\AnnotationValue $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\AnnotationValue::class); - $this->value = $var; - - return $this; - } - - /** - * Partition information in time and space for the sub-asset level annotation. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition partition = 3; - * @return \Google\Cloud\VisionAI\V1\Partition|null - */ - public function getPartition() - { - return $this->partition; - } - - public function hasPartition() - { - return isset($this->partition); - } - - public function clearPartition() - { - unset($this->partition); - } - - /** - * Partition information in time and space for the sub-asset level annotation. - * - * Generated from protobuf field .google.cloud.visionai.v1.Partition partition = 3; - * @param \Google\Cloud\VisionAI\V1\Partition $var - * @return $this - */ - public function setPartition($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\Partition::class); - $this->partition = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexAutoMLVideoConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexAutoMLVideoConfig.php deleted file mode 100644 index ef4d65a85010..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexAutoMLVideoConfig.php +++ /dev/null @@ -1,185 +0,0 @@ -google.cloud.visionai.v1.VertexAutoMLVideoConfig - */ -class VertexAutoMLVideoConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Only entities with higher score than the threshold will be returned. - * Value 0.0 means returns all the detected entities. - * - * Generated from protobuf field float confidence_threshold = 1; - */ - protected $confidence_threshold = 0.0; - /** - * Labels specified in this field won't be returned. - * - * Generated from protobuf field repeated string blocked_labels = 2; - */ - private $blocked_labels; - /** - * At most this many predictions will be returned per output frame. - * Value 0 means to return all the detected entities. - * - * Generated from protobuf field int32 max_predictions = 3; - */ - protected $max_predictions = 0; - /** - * Only Bounding Box whose size is larger than this limit will be returned. - * Object Tracking only. - * Value 0.0 means to return all the detected entities. - * - * Generated from protobuf field float bounding_box_size_limit = 4; - */ - protected $bounding_box_size_limit = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $confidence_threshold - * Only entities with higher score than the threshold will be returned. - * Value 0.0 means returns all the detected entities. - * @type string[] $blocked_labels - * Labels specified in this field won't be returned. - * @type int $max_predictions - * At most this many predictions will be returned per output frame. - * Value 0 means to return all the detected entities. - * @type float $bounding_box_size_limit - * Only Bounding Box whose size is larger than this limit will be returned. - * Object Tracking only. - * Value 0.0 means to return all the detected entities. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Only entities with higher score than the threshold will be returned. - * Value 0.0 means returns all the detected entities. - * - * Generated from protobuf field float confidence_threshold = 1; - * @return float - */ - public function getConfidenceThreshold() - { - return $this->confidence_threshold; - } - - /** - * Only entities with higher score than the threshold will be returned. - * Value 0.0 means returns all the detected entities. - * - * Generated from protobuf field float confidence_threshold = 1; - * @param float $var - * @return $this - */ - public function setConfidenceThreshold($var) - { - GPBUtil::checkFloat($var); - $this->confidence_threshold = $var; - - return $this; - } - - /** - * Labels specified in this field won't be returned. - * - * Generated from protobuf field repeated string blocked_labels = 2; - * @return RepeatedField - */ - public function getBlockedLabels() - { - return $this->blocked_labels; - } - - /** - * Labels specified in this field won't be returned. - * - * Generated from protobuf field repeated string blocked_labels = 2; - * @param string[] $var - * @return $this - */ - public function setBlockedLabels($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->blocked_labels = $arr; - - return $this; - } - - /** - * At most this many predictions will be returned per output frame. - * Value 0 means to return all the detected entities. - * - * Generated from protobuf field int32 max_predictions = 3; - * @return int - */ - public function getMaxPredictions() - { - return $this->max_predictions; - } - - /** - * At most this many predictions will be returned per output frame. - * Value 0 means to return all the detected entities. - * - * Generated from protobuf field int32 max_predictions = 3; - * @param int $var - * @return $this - */ - public function setMaxPredictions($var) - { - GPBUtil::checkInt32($var); - $this->max_predictions = $var; - - return $this; - } - - /** - * Only Bounding Box whose size is larger than this limit will be returned. - * Object Tracking only. - * Value 0.0 means to return all the detected entities. - * - * Generated from protobuf field float bounding_box_size_limit = 4; - * @return float - */ - public function getBoundingBoxSizeLimit() - { - return $this->bounding_box_size_limit; - } - - /** - * Only Bounding Box whose size is larger than this limit will be returned. - * Object Tracking only. - * Value 0.0 means to return all the detected entities. - * - * Generated from protobuf field float bounding_box_size_limit = 4; - * @param float $var - * @return $this - */ - public function setBoundingBoxSizeLimit($var) - { - GPBUtil::checkFloat($var); - $this->bounding_box_size_limit = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexAutoMLVisionConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexAutoMLVisionConfig.php deleted file mode 100644 index efc46084f96c..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexAutoMLVisionConfig.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.visionai.v1.VertexAutoMLVisionConfig - */ -class VertexAutoMLVisionConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Only entities with higher score than the threshold will be returned. - * Value 0.0 means to return all the detected entities. - * - * Generated from protobuf field float confidence_threshold = 1; - */ - protected $confidence_threshold = 0.0; - /** - * At most this many predictions will be returned per output frame. - * Value 0 means to return all the detected entities. - * - * Generated from protobuf field int32 max_predictions = 2; - */ - protected $max_predictions = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $confidence_threshold - * Only entities with higher score than the threshold will be returned. - * Value 0.0 means to return all the detected entities. - * @type int $max_predictions - * At most this many predictions will be returned per output frame. - * Value 0 means to return all the detected entities. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Only entities with higher score than the threshold will be returned. - * Value 0.0 means to return all the detected entities. - * - * Generated from protobuf field float confidence_threshold = 1; - * @return float - */ - public function getConfidenceThreshold() - { - return $this->confidence_threshold; - } - - /** - * Only entities with higher score than the threshold will be returned. - * Value 0.0 means to return all the detected entities. - * - * Generated from protobuf field float confidence_threshold = 1; - * @param float $var - * @return $this - */ - public function setConfidenceThreshold($var) - { - GPBUtil::checkFloat($var); - $this->confidence_threshold = $var; - - return $this; - } - - /** - * At most this many predictions will be returned per output frame. - * Value 0 means to return all the detected entities. - * - * Generated from protobuf field int32 max_predictions = 2; - * @return int - */ - public function getMaxPredictions() - { - return $this->max_predictions; - } - - /** - * At most this many predictions will be returned per output frame. - * Value 0 means to return all the detected entities. - * - * Generated from protobuf field int32 max_predictions = 2; - * @param int $var - * @return $this - */ - public function setMaxPredictions($var) - { - GPBUtil::checkInt32($var); - $this->max_predictions = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexCustomConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexCustomConfig.php deleted file mode 100644 index 25af76fc7a99..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VertexCustomConfig.php +++ /dev/null @@ -1,351 +0,0 @@ -google.cloud.visionai.v1.VertexCustomConfig - */ -class VertexCustomConfig extends \Google\Protobuf\Internal\Message -{ - /** - * The max prediction frame per second. This attribute sets how fast the - * operator sends prediction requests to Vertex AI endpoint. Default value is - * 0, which means there is no max prediction fps limit. The operator sends - * prediction requests at input fps. - * - * Generated from protobuf field int32 max_prediction_fps = 1; - */ - protected $max_prediction_fps = 0; - /** - * A description of resources that are dedicated to the DeployedModel, and - * that need a higher degree of manual configuration. - * - * Generated from protobuf field .google.cloud.visionai.v1.DedicatedResources dedicated_resources = 2; - */ - protected $dedicated_resources = null; - /** - * If not empty, the prediction result will be sent to the specified cloud - * function for post processing. - * * The cloud function will receive AppPlatformCloudFunctionRequest where - * the annotations field will be the json format of proto PredictResponse. - * * The cloud function should return AppPlatformCloudFunctionResponse with - * PredictResponse stored in the annotations field. - * * To drop the prediction output, simply clear the payload field in the - * returned AppPlatformCloudFunctionResponse. - * - * Generated from protobuf field string post_processing_cloud_function = 3; - */ - protected $post_processing_cloud_function = ''; - /** - * If true, the prediction request received by custom model will also contain - * metadata with the following schema: - * 'appPlatformMetadata': { - * 'ingestionTime': DOUBLE; (UNIX timestamp) - * 'application': STRING; - * 'instanceId': STRING; - * 'node': STRING; - * 'processor': STRING; - * } - * - * Generated from protobuf field bool attach_application_metadata = 4; - */ - protected $attach_application_metadata = false; - /** - * Optional. By setting the configuration_input_topic, processor will - * subscribe to given topic, only pub/sub topic is supported now. Example - * channel: - * //pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic - * message schema should be: - * message Message { - * // The ID of the stream that associates with the application instance. - * string stream_id = 1; - * // The target fps. By default, the custom processor will *not* send any - * data to the Vertex Prediction container. Note that once the - * dynamic_config_input_topic is set, max_prediction_fps will not work and be - * preceded by the fps set inside the topic. - * int32 fps = 2; - * } - * - * Generated from protobuf field optional string dynamic_config_input_topic = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $dynamic_config_input_topic = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $max_prediction_fps - * The max prediction frame per second. This attribute sets how fast the - * operator sends prediction requests to Vertex AI endpoint. Default value is - * 0, which means there is no max prediction fps limit. The operator sends - * prediction requests at input fps. - * @type \Google\Cloud\VisionAI\V1\DedicatedResources $dedicated_resources - * A description of resources that are dedicated to the DeployedModel, and - * that need a higher degree of manual configuration. - * @type string $post_processing_cloud_function - * If not empty, the prediction result will be sent to the specified cloud - * function for post processing. - * * The cloud function will receive AppPlatformCloudFunctionRequest where - * the annotations field will be the json format of proto PredictResponse. - * * The cloud function should return AppPlatformCloudFunctionResponse with - * PredictResponse stored in the annotations field. - * * To drop the prediction output, simply clear the payload field in the - * returned AppPlatformCloudFunctionResponse. - * @type bool $attach_application_metadata - * If true, the prediction request received by custom model will also contain - * metadata with the following schema: - * 'appPlatformMetadata': { - * 'ingestionTime': DOUBLE; (UNIX timestamp) - * 'application': STRING; - * 'instanceId': STRING; - * 'node': STRING; - * 'processor': STRING; - * } - * @type string $dynamic_config_input_topic - * Optional. By setting the configuration_input_topic, processor will - * subscribe to given topic, only pub/sub topic is supported now. Example - * channel: - * //pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic - * message schema should be: - * message Message { - * // The ID of the stream that associates with the application instance. - * string stream_id = 1; - * // The target fps. By default, the custom processor will *not* send any - * data to the Vertex Prediction container. Note that once the - * dynamic_config_input_topic is set, max_prediction_fps will not work and be - * preceded by the fps set inside the topic. - * int32 fps = 2; - * } - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * The max prediction frame per second. This attribute sets how fast the - * operator sends prediction requests to Vertex AI endpoint. Default value is - * 0, which means there is no max prediction fps limit. The operator sends - * prediction requests at input fps. - * - * Generated from protobuf field int32 max_prediction_fps = 1; - * @return int - */ - public function getMaxPredictionFps() - { - return $this->max_prediction_fps; - } - - /** - * The max prediction frame per second. This attribute sets how fast the - * operator sends prediction requests to Vertex AI endpoint. Default value is - * 0, which means there is no max prediction fps limit. The operator sends - * prediction requests at input fps. - * - * Generated from protobuf field int32 max_prediction_fps = 1; - * @param int $var - * @return $this - */ - public function setMaxPredictionFps($var) - { - GPBUtil::checkInt32($var); - $this->max_prediction_fps = $var; - - return $this; - } - - /** - * A description of resources that are dedicated to the DeployedModel, and - * that need a higher degree of manual configuration. - * - * Generated from protobuf field .google.cloud.visionai.v1.DedicatedResources dedicated_resources = 2; - * @return \Google\Cloud\VisionAI\V1\DedicatedResources|null - */ - public function getDedicatedResources() - { - return $this->dedicated_resources; - } - - public function hasDedicatedResources() - { - return isset($this->dedicated_resources); - } - - public function clearDedicatedResources() - { - unset($this->dedicated_resources); - } - - /** - * A description of resources that are dedicated to the DeployedModel, and - * that need a higher degree of manual configuration. - * - * Generated from protobuf field .google.cloud.visionai.v1.DedicatedResources dedicated_resources = 2; - * @param \Google\Cloud\VisionAI\V1\DedicatedResources $var - * @return $this - */ - public function setDedicatedResources($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\DedicatedResources::class); - $this->dedicated_resources = $var; - - return $this; - } - - /** - * If not empty, the prediction result will be sent to the specified cloud - * function for post processing. - * * The cloud function will receive AppPlatformCloudFunctionRequest where - * the annotations field will be the json format of proto PredictResponse. - * * The cloud function should return AppPlatformCloudFunctionResponse with - * PredictResponse stored in the annotations field. - * * To drop the prediction output, simply clear the payload field in the - * returned AppPlatformCloudFunctionResponse. - * - * Generated from protobuf field string post_processing_cloud_function = 3; - * @return string - */ - public function getPostProcessingCloudFunction() - { - return $this->post_processing_cloud_function; - } - - /** - * If not empty, the prediction result will be sent to the specified cloud - * function for post processing. - * * The cloud function will receive AppPlatformCloudFunctionRequest where - * the annotations field will be the json format of proto PredictResponse. - * * The cloud function should return AppPlatformCloudFunctionResponse with - * PredictResponse stored in the annotations field. - * * To drop the prediction output, simply clear the payload field in the - * returned AppPlatformCloudFunctionResponse. - * - * Generated from protobuf field string post_processing_cloud_function = 3; - * @param string $var - * @return $this - */ - public function setPostProcessingCloudFunction($var) - { - GPBUtil::checkString($var, True); - $this->post_processing_cloud_function = $var; - - return $this; - } - - /** - * If true, the prediction request received by custom model will also contain - * metadata with the following schema: - * 'appPlatformMetadata': { - * 'ingestionTime': DOUBLE; (UNIX timestamp) - * 'application': STRING; - * 'instanceId': STRING; - * 'node': STRING; - * 'processor': STRING; - * } - * - * Generated from protobuf field bool attach_application_metadata = 4; - * @return bool - */ - public function getAttachApplicationMetadata() - { - return $this->attach_application_metadata; - } - - /** - * If true, the prediction request received by custom model will also contain - * metadata with the following schema: - * 'appPlatformMetadata': { - * 'ingestionTime': DOUBLE; (UNIX timestamp) - * 'application': STRING; - * 'instanceId': STRING; - * 'node': STRING; - * 'processor': STRING; - * } - * - * Generated from protobuf field bool attach_application_metadata = 4; - * @param bool $var - * @return $this - */ - public function setAttachApplicationMetadata($var) - { - GPBUtil::checkBool($var); - $this->attach_application_metadata = $var; - - return $this; - } - - /** - * Optional. By setting the configuration_input_topic, processor will - * subscribe to given topic, only pub/sub topic is supported now. Example - * channel: - * //pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic - * message schema should be: - * message Message { - * // The ID of the stream that associates with the application instance. - * string stream_id = 1; - * // The target fps. By default, the custom processor will *not* send any - * data to the Vertex Prediction container. Note that once the - * dynamic_config_input_topic is set, max_prediction_fps will not work and be - * preceded by the fps set inside the topic. - * int32 fps = 2; - * } - * - * Generated from protobuf field optional string dynamic_config_input_topic = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getDynamicConfigInputTopic() - { - return isset($this->dynamic_config_input_topic) ? $this->dynamic_config_input_topic : ''; - } - - public function hasDynamicConfigInputTopic() - { - return isset($this->dynamic_config_input_topic); - } - - public function clearDynamicConfigInputTopic() - { - unset($this->dynamic_config_input_topic); - } - - /** - * Optional. By setting the configuration_input_topic, processor will - * subscribe to given topic, only pub/sub topic is supported now. Example - * channel: - * //pubsub.googleapis.com/projects/visionai-testing-stable/topics/test-topic - * message schema should be: - * message Message { - * // The ID of the stream that associates with the application instance. - * string stream_id = 1; - * // The target fps. By default, the custom processor will *not* send any - * data to the Vertex Prediction container. Note that once the - * dynamic_config_input_topic is set, max_prediction_fps will not work and be - * preceded by the fps set inside the topic. - * int32 fps = 2; - * } - * - * Generated from protobuf field optional string dynamic_config_input_topic = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setDynamicConfigInputTopic($var) - { - GPBUtil::checkString($var, True); - $this->dynamic_config_input_topic = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoActionRecognitionPredictionResult.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoActionRecognitionPredictionResult.php deleted file mode 100644 index d686effc8957..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoActionRecognitionPredictionResult.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.visionai.v1.VideoActionRecognitionPredictionResult - */ -class VideoActionRecognitionPredictionResult extends \Google\Protobuf\Internal\Message -{ - /** - * The beginning, inclusive, of the video's time segment in which the - * actions have been identified. - * - * Generated from protobuf field .google.protobuf.Timestamp segment_start_time = 1; - */ - protected $segment_start_time = null; - /** - * The end, inclusive, of the video's time segment in which the actions have - * been identified. Particularly, if the end is the same as the start, it - * means the identification happens on a specific video frame. - * - * Generated from protobuf field .google.protobuf.Timestamp segment_end_time = 2; - */ - protected $segment_end_time = null; - /** - * All of the actions identified in the time range. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.VideoActionRecognitionPredictionResult.IdentifiedAction actions = 3; - */ - private $actions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $segment_start_time - * The beginning, inclusive, of the video's time segment in which the - * actions have been identified. - * @type \Google\Protobuf\Timestamp $segment_end_time - * The end, inclusive, of the video's time segment in which the actions have - * been identified. Particularly, if the end is the same as the start, it - * means the identification happens on a specific video frame. - * @type \Google\Cloud\VisionAI\V1\VideoActionRecognitionPredictionResult\IdentifiedAction[] $actions - * All of the actions identified in the time range. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * The beginning, inclusive, of the video's time segment in which the - * actions have been identified. - * - * Generated from protobuf field .google.protobuf.Timestamp segment_start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSegmentStartTime() - { - return $this->segment_start_time; - } - - public function hasSegmentStartTime() - { - return isset($this->segment_start_time); - } - - public function clearSegmentStartTime() - { - unset($this->segment_start_time); - } - - /** - * The beginning, inclusive, of the video's time segment in which the - * actions have been identified. - * - * Generated from protobuf field .google.protobuf.Timestamp segment_start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSegmentStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->segment_start_time = $var; - - return $this; - } - - /** - * The end, inclusive, of the video's time segment in which the actions have - * been identified. Particularly, if the end is the same as the start, it - * means the identification happens on a specific video frame. - * - * Generated from protobuf field .google.protobuf.Timestamp segment_end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSegmentEndTime() - { - return $this->segment_end_time; - } - - public function hasSegmentEndTime() - { - return isset($this->segment_end_time); - } - - public function clearSegmentEndTime() - { - unset($this->segment_end_time); - } - - /** - * The end, inclusive, of the video's time segment in which the actions have - * been identified. Particularly, if the end is the same as the start, it - * means the identification happens on a specific video frame. - * - * Generated from protobuf field .google.protobuf.Timestamp segment_end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSegmentEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->segment_end_time = $var; - - return $this; - } - - /** - * All of the actions identified in the time range. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.VideoActionRecognitionPredictionResult.IdentifiedAction actions = 3; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\VideoActionRecognitionPredictionResult\IdentifiedAction> - */ - public function getActions() - { - return $this->actions; - } - - /** - * All of the actions identified in the time range. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.VideoActionRecognitionPredictionResult.IdentifiedAction actions = 3; - * @param \Google\Cloud\VisionAI\V1\VideoActionRecognitionPredictionResult\IdentifiedAction[] $var - * @return $this - */ - public function setActions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\VideoActionRecognitionPredictionResult\IdentifiedAction::class); - $this->actions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoActionRecognitionPredictionResult/IdentifiedAction.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoActionRecognitionPredictionResult/IdentifiedAction.php deleted file mode 100644 index 2a758ed563f6..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoActionRecognitionPredictionResult/IdentifiedAction.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.visionai.v1.VideoActionRecognitionPredictionResult.IdentifiedAction - */ -class IdentifiedAction extends \Google\Protobuf\Internal\Message -{ - /** - * The resource ID of the AnnotationSpec that had been identified. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * The display name of the AnnotationSpec that had been identified. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * The Model's confidence in correction of this identification, higher - * value means higher confidence. - * - * Generated from protobuf field float confidence = 3; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * The resource ID of the AnnotationSpec that had been identified. - * @type string $display_name - * The display name of the AnnotationSpec that had been identified. - * @type float $confidence - * The Model's confidence in correction of this identification, higher - * value means higher confidence. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * The resource ID of the AnnotationSpec that had been identified. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The resource ID of the AnnotationSpec that had been identified. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The display name of the AnnotationSpec that had been identified. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the AnnotationSpec that had been identified. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The Model's confidence in correction of this identification, higher - * value means higher confidence. - * - * Generated from protobuf field float confidence = 3; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * The Model's confidence in correction of this identification, higher - * value means higher confidence. - * - * Generated from protobuf field float confidence = 3; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoClassificationPredictionResult.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoClassificationPredictionResult.php deleted file mode 100644 index 41236f0febbf..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoClassificationPredictionResult.php +++ /dev/null @@ -1,171 +0,0 @@ -google.cloud.visionai.v1.VideoClassificationPredictionResult - */ -class VideoClassificationPredictionResult extends \Google\Protobuf\Internal\Message -{ - /** - * The beginning, inclusive, of the video's time segment in which the - * classifications have been identified. - * - * Generated from protobuf field .google.protobuf.Timestamp segment_start_time = 1; - */ - protected $segment_start_time = null; - /** - * The end, inclusive, of the video's time segment in which the - * classifications have been identified. Particularly, if the end is the same - * as the start, it means the identification happens on a specific video - * frame. - * - * Generated from protobuf field .google.protobuf.Timestamp segment_end_time = 2; - */ - protected $segment_end_time = null; - /** - * All of the classifications identified in the time range. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.VideoClassificationPredictionResult.IdentifiedClassification classifications = 3; - */ - private $classifications; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $segment_start_time - * The beginning, inclusive, of the video's time segment in which the - * classifications have been identified. - * @type \Google\Protobuf\Timestamp $segment_end_time - * The end, inclusive, of the video's time segment in which the - * classifications have been identified. Particularly, if the end is the same - * as the start, it means the identification happens on a specific video - * frame. - * @type \Google\Cloud\VisionAI\V1\VideoClassificationPredictionResult\IdentifiedClassification[] $classifications - * All of the classifications identified in the time range. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * The beginning, inclusive, of the video's time segment in which the - * classifications have been identified. - * - * Generated from protobuf field .google.protobuf.Timestamp segment_start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSegmentStartTime() - { - return $this->segment_start_time; - } - - public function hasSegmentStartTime() - { - return isset($this->segment_start_time); - } - - public function clearSegmentStartTime() - { - unset($this->segment_start_time); - } - - /** - * The beginning, inclusive, of the video's time segment in which the - * classifications have been identified. - * - * Generated from protobuf field .google.protobuf.Timestamp segment_start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSegmentStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->segment_start_time = $var; - - return $this; - } - - /** - * The end, inclusive, of the video's time segment in which the - * classifications have been identified. Particularly, if the end is the same - * as the start, it means the identification happens on a specific video - * frame. - * - * Generated from protobuf field .google.protobuf.Timestamp segment_end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSegmentEndTime() - { - return $this->segment_end_time; - } - - public function hasSegmentEndTime() - { - return isset($this->segment_end_time); - } - - public function clearSegmentEndTime() - { - unset($this->segment_end_time); - } - - /** - * The end, inclusive, of the video's time segment in which the - * classifications have been identified. Particularly, if the end is the same - * as the start, it means the identification happens on a specific video - * frame. - * - * Generated from protobuf field .google.protobuf.Timestamp segment_end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSegmentEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->segment_end_time = $var; - - return $this; - } - - /** - * All of the classifications identified in the time range. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.VideoClassificationPredictionResult.IdentifiedClassification classifications = 3; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\VideoClassificationPredictionResult\IdentifiedClassification> - */ - public function getClassifications() - { - return $this->classifications; - } - - /** - * All of the classifications identified in the time range. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.VideoClassificationPredictionResult.IdentifiedClassification classifications = 3; - * @param \Google\Cloud\VisionAI\V1\VideoClassificationPredictionResult\IdentifiedClassification[] $var - * @return $this - */ - public function setClassifications($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\VideoClassificationPredictionResult\IdentifiedClassification::class); - $this->classifications = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoClassificationPredictionResult/IdentifiedClassification.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoClassificationPredictionResult/IdentifiedClassification.php deleted file mode 100644 index ddb8f49abd55..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoClassificationPredictionResult/IdentifiedClassification.php +++ /dev/null @@ -1,141 +0,0 @@ -google.cloud.visionai.v1.VideoClassificationPredictionResult.IdentifiedClassification - */ -class IdentifiedClassification extends \Google\Protobuf\Internal\Message -{ - /** - * The resource ID of the AnnotationSpec that had been identified. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * The display name of the AnnotationSpec that had been identified. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * The Model's confidence in correction of this identification, higher - * value means higher confidence. - * - * Generated from protobuf field float confidence = 3; - */ - protected $confidence = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * The resource ID of the AnnotationSpec that had been identified. - * @type string $display_name - * The display name of the AnnotationSpec that had been identified. - * @type float $confidence - * The Model's confidence in correction of this identification, higher - * value means higher confidence. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * The resource ID of the AnnotationSpec that had been identified. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The resource ID of the AnnotationSpec that had been identified. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The display name of the AnnotationSpec that had been identified. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the AnnotationSpec that had been identified. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The Model's confidence in correction of this identification, higher - * value means higher confidence. - * - * Generated from protobuf field float confidence = 3; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * The Model's confidence in correction of this identification, higher - * value means higher confidence. - * - * Generated from protobuf field float confidence = 3; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult.php deleted file mode 100644 index e4dd8ccee5bc..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.visionai.v1.VideoObjectTrackingPredictionResult - */ -class VideoObjectTrackingPredictionResult extends \Google\Protobuf\Internal\Message -{ - /** - * The beginning, inclusive, of the video's time segment in which the - * current identifications happens. - * - * Generated from protobuf field .google.protobuf.Timestamp segment_start_time = 1; - */ - protected $segment_start_time = null; - /** - * The end, inclusive, of the video's time segment in which the current - * identifications happen. Particularly, if the end is the same as the start, - * it means the identifications happen on a specific video frame. - * - * Generated from protobuf field .google.protobuf.Timestamp segment_end_time = 2; - */ - protected $segment_end_time = null; - /** - * All of the objects detected in the specified time range. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.DetectedObject objects = 3; - */ - private $objects; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Protobuf\Timestamp $segment_start_time - * The beginning, inclusive, of the video's time segment in which the - * current identifications happens. - * @type \Google\Protobuf\Timestamp $segment_end_time - * The end, inclusive, of the video's time segment in which the current - * identifications happen. Particularly, if the end is the same as the start, - * it means the identifications happen on a specific video frame. - * @type \Google\Cloud\VisionAI\V1\VideoObjectTrackingPredictionResult\DetectedObject[] $objects - * All of the objects detected in the specified time range. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * The beginning, inclusive, of the video's time segment in which the - * current identifications happens. - * - * Generated from protobuf field .google.protobuf.Timestamp segment_start_time = 1; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSegmentStartTime() - { - return $this->segment_start_time; - } - - public function hasSegmentStartTime() - { - return isset($this->segment_start_time); - } - - public function clearSegmentStartTime() - { - unset($this->segment_start_time); - } - - /** - * The beginning, inclusive, of the video's time segment in which the - * current identifications happens. - * - * Generated from protobuf field .google.protobuf.Timestamp segment_start_time = 1; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSegmentStartTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->segment_start_time = $var; - - return $this; - } - - /** - * The end, inclusive, of the video's time segment in which the current - * identifications happen. Particularly, if the end is the same as the start, - * it means the identifications happen on a specific video frame. - * - * Generated from protobuf field .google.protobuf.Timestamp segment_end_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getSegmentEndTime() - { - return $this->segment_end_time; - } - - public function hasSegmentEndTime() - { - return isset($this->segment_end_time); - } - - public function clearSegmentEndTime() - { - unset($this->segment_end_time); - } - - /** - * The end, inclusive, of the video's time segment in which the current - * identifications happen. Particularly, if the end is the same as the start, - * it means the identifications happen on a specific video frame. - * - * Generated from protobuf field .google.protobuf.Timestamp segment_end_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setSegmentEndTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->segment_end_time = $var; - - return $this; - } - - /** - * All of the objects detected in the specified time range. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.DetectedObject objects = 3; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\VideoObjectTrackingPredictionResult\DetectedObject> - */ - public function getObjects() - { - return $this->objects; - } - - /** - * All of the objects detected in the specified time range. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.DetectedObject objects = 3; - * @param \Google\Cloud\VisionAI\V1\VideoObjectTrackingPredictionResult\DetectedObject[] $var - * @return $this - */ - public function setObjects($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\VideoObjectTrackingPredictionResult\DetectedObject::class); - $this->objects = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult/BoundingBox.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult/BoundingBox.php deleted file mode 100644 index 2c4a5db021fb..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult/BoundingBox.php +++ /dev/null @@ -1,171 +0,0 @@ -google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.BoundingBox - */ -class BoundingBox extends \Google\Protobuf\Internal\Message -{ - /** - * The leftmost coordinate of the bounding box. - * - * Generated from protobuf field float x_min = 1; - */ - protected $x_min = 0.0; - /** - * The rightmost coordinate of the bounding box. - * - * Generated from protobuf field float x_max = 2; - */ - protected $x_max = 0.0; - /** - * The topmost coordinate of the bounding box. - * - * Generated from protobuf field float y_min = 3; - */ - protected $y_min = 0.0; - /** - * The bottommost coordinate of the bounding box. - * - * Generated from protobuf field float y_max = 4; - */ - protected $y_max = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type float $x_min - * The leftmost coordinate of the bounding box. - * @type float $x_max - * The rightmost coordinate of the bounding box. - * @type float $y_min - * The topmost coordinate of the bounding box. - * @type float $y_max - * The bottommost coordinate of the bounding box. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * The leftmost coordinate of the bounding box. - * - * Generated from protobuf field float x_min = 1; - * @return float - */ - public function getXMin() - { - return $this->x_min; - } - - /** - * The leftmost coordinate of the bounding box. - * - * Generated from protobuf field float x_min = 1; - * @param float $var - * @return $this - */ - public function setXMin($var) - { - GPBUtil::checkFloat($var); - $this->x_min = $var; - - return $this; - } - - /** - * The rightmost coordinate of the bounding box. - * - * Generated from protobuf field float x_max = 2; - * @return float - */ - public function getXMax() - { - return $this->x_max; - } - - /** - * The rightmost coordinate of the bounding box. - * - * Generated from protobuf field float x_max = 2; - * @param float $var - * @return $this - */ - public function setXMax($var) - { - GPBUtil::checkFloat($var); - $this->x_max = $var; - - return $this; - } - - /** - * The topmost coordinate of the bounding box. - * - * Generated from protobuf field float y_min = 3; - * @return float - */ - public function getYMin() - { - return $this->y_min; - } - - /** - * The topmost coordinate of the bounding box. - * - * Generated from protobuf field float y_min = 3; - * @param float $var - * @return $this - */ - public function setYMin($var) - { - GPBUtil::checkFloat($var); - $this->y_min = $var; - - return $this; - } - - /** - * The bottommost coordinate of the bounding box. - * - * Generated from protobuf field float y_max = 4; - * @return float - */ - public function getYMax() - { - return $this->y_max; - } - - /** - * The bottommost coordinate of the bounding box. - * - * Generated from protobuf field float y_max = 4; - * @param float $var - * @return $this - */ - public function setYMax($var) - { - GPBUtil::checkFloat($var); - $this->y_max = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult/DetectedObject.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult/DetectedObject.php deleted file mode 100644 index 9dc8d4bd9447..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoObjectTrackingPredictionResult/DetectedObject.php +++ /dev/null @@ -1,231 +0,0 @@ -google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.DetectedObject - */ -class DetectedObject extends \Google\Protobuf\Internal\Message -{ - /** - * The resource ID of the AnnotationSpec that had been identified. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * The display name of the AnnotationSpec that had been identified. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * Boundingbox. - * - * Generated from protobuf field .google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.BoundingBox bounding_box = 3; - */ - protected $bounding_box = null; - /** - * The Model's confidence in correction of this identification, higher - * value means higher confidence. - * - * Generated from protobuf field float confidence = 4; - */ - protected $confidence = 0.0; - /** - * The same object may be identified on muitiple frames which are typical - * adjacent. The set of frames where a particular object has been detected - * form a track. This track_id can be used to trace down all frames for an - * detected object. - * - * Generated from protobuf field int64 track_id = 5; - */ - protected $track_id = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * The resource ID of the AnnotationSpec that had been identified. - * @type string $display_name - * The display name of the AnnotationSpec that had been identified. - * @type \Google\Cloud\VisionAI\V1\VideoObjectTrackingPredictionResult\BoundingBox $bounding_box - * Boundingbox. - * @type float $confidence - * The Model's confidence in correction of this identification, higher - * value means higher confidence. - * @type int|string $track_id - * The same object may be identified on muitiple frames which are typical - * adjacent. The set of frames where a particular object has been detected - * form a track. This track_id can be used to trace down all frames for an - * detected object. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Annotations::initOnce(); - parent::__construct($data); - } - - /** - * The resource ID of the AnnotationSpec that had been identified. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The resource ID of the AnnotationSpec that had been identified. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The display name of the AnnotationSpec that had been identified. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The display name of the AnnotationSpec that had been identified. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Boundingbox. - * - * Generated from protobuf field .google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.BoundingBox bounding_box = 3; - * @return \Google\Cloud\VisionAI\V1\VideoObjectTrackingPredictionResult\BoundingBox|null - */ - public function getBoundingBox() - { - return $this->bounding_box; - } - - public function hasBoundingBox() - { - return isset($this->bounding_box); - } - - public function clearBoundingBox() - { - unset($this->bounding_box); - } - - /** - * Boundingbox. - * - * Generated from protobuf field .google.cloud.visionai.v1.VideoObjectTrackingPredictionResult.BoundingBox bounding_box = 3; - * @param \Google\Cloud\VisionAI\V1\VideoObjectTrackingPredictionResult\BoundingBox $var - * @return $this - */ - public function setBoundingBox($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\VisionAI\V1\VideoObjectTrackingPredictionResult\BoundingBox::class); - $this->bounding_box = $var; - - return $this; - } - - /** - * The Model's confidence in correction of this identification, higher - * value means higher confidence. - * - * Generated from protobuf field float confidence = 4; - * @return float - */ - public function getConfidence() - { - return $this->confidence; - } - - /** - * The Model's confidence in correction of this identification, higher - * value means higher confidence. - * - * Generated from protobuf field float confidence = 4; - * @param float $var - * @return $this - */ - public function setConfidence($var) - { - GPBUtil::checkFloat($var); - $this->confidence = $var; - - return $this; - } - - /** - * The same object may be identified on muitiple frames which are typical - * adjacent. The set of frames where a particular object has been detected - * form a track. This track_id can be used to trace down all frames for an - * detected object. - * - * Generated from protobuf field int64 track_id = 5; - * @return int|string - */ - public function getTrackId() - { - return $this->track_id; - } - - /** - * The same object may be identified on muitiple frames which are typical - * adjacent. The set of frames where a particular object has been detected - * form a track. This track_id can be used to trace down all frames for an - * detected object. - * - * Generated from protobuf field int64 track_id = 5; - * @param int|string $var - * @return $this - */ - public function setTrackId($var) - { - GPBUtil::checkInt64($var); - $this->track_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoStreamInputConfig.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoStreamInputConfig.php deleted file mode 100644 index 80b657d61e47..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/VideoStreamInputConfig.php +++ /dev/null @@ -1,108 +0,0 @@ -google.cloud.visionai.v1.VideoStreamInputConfig - */ -class VideoStreamInputConfig extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field repeated string streams = 1 [deprecated = true]; - * @deprecated - */ - private $streams; - /** - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamWithAnnotation streams_with_annotation = 2 [deprecated = true]; - * @deprecated - */ - private $streams_with_annotation; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string[] $streams - * @type \Google\Cloud\VisionAI\V1\StreamWithAnnotation[] $streams_with_annotation - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Platform::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field repeated string streams = 1 [deprecated = true]; - * @return RepeatedField - * @deprecated - */ - public function getStreams() - { - if ($this->streams->count() !== 0) { - @trigger_error('streams is deprecated.', E_USER_DEPRECATED); - } - return $this->streams; - } - - /** - * Generated from protobuf field repeated string streams = 1 [deprecated = true]; - * @param string[] $var - * @return $this - * @deprecated - */ - public function setStreams($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - if ($arr->count() !== 0) { - @trigger_error('streams is deprecated.', E_USER_DEPRECATED); - } - $this->streams = $arr; - - return $this; - } - - /** - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamWithAnnotation streams_with_annotation = 2 [deprecated = true]; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\StreamWithAnnotation> - * @deprecated - */ - public function getStreamsWithAnnotation() - { - if ($this->streams_with_annotation->count() !== 0) { - @trigger_error('streams_with_annotation is deprecated.', E_USER_DEPRECATED); - } - return $this->streams_with_annotation; - } - - /** - * Generated from protobuf field repeated .google.cloud.visionai.v1.StreamWithAnnotation streams_with_annotation = 2 [deprecated = true]; - * @param \Google\Cloud\VisionAI\V1\StreamWithAnnotation[] $var - * @return $this - * @deprecated - */ - public function setStreamsWithAnnotation($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\StreamWithAnnotation::class); - if ($arr->count() !== 0) { - @trigger_error('streams_with_annotation is deprecated.', E_USER_DEPRECATED); - } - $this->streams_with_annotation = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewCollectionItemsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewCollectionItemsRequest.php deleted file mode 100644 index 65b2b971e949..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewCollectionItemsRequest.php +++ /dev/null @@ -1,178 +0,0 @@ -google.cloud.visionai.v1.ViewCollectionItemsRequest - */ -class ViewCollectionItemsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The collection to view. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * - * Generated from protobuf field string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $collection = ''; - /** - * The maximum number of collections to return. The service may return fewer - * than this value. If unspecified, at most 50 collections will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ViewCollectionItemsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ViewCollectionItemsRequest` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $collection Required. The collection to view. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * Please see {@see WarehouseClient::collectionName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ViewCollectionItemsRequest - * - * @experimental - */ - public static function build(string $collection): self - { - return (new self()) - ->setCollection($collection); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $collection - * Required. The collection to view. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * @type int $page_size - * The maximum number of collections to return. The service may return fewer - * than this value. If unspecified, at most 50 collections will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * A page token, received from a previous `ViewCollectionItemsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ViewCollectionItemsRequest` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The collection to view. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * - * Generated from protobuf field string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getCollection() - { - return $this->collection; - } - - /** - * Required. The collection to view. Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}` - * - * Generated from protobuf field string collection = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setCollection($var) - { - GPBUtil::checkString($var, True); - $this->collection = $var; - - return $this; - } - - /** - * The maximum number of collections to return. The service may return fewer - * than this value. If unspecified, at most 50 collections will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of collections to return. The service may return fewer - * than this value. If unspecified, at most 50 collections will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ViewCollectionItemsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ViewCollectionItemsRequest` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ViewCollectionItemsRequest` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to - * `ViewCollectionItemsRequest` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewCollectionItemsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewCollectionItemsResponse.php deleted file mode 100644 index ef4793dded76..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewCollectionItemsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.visionai.v1.ViewCollectionItemsResponse - */ -class ViewCollectionItemsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The items from the specified collection. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.CollectionItem items = 1; - */ - private $items; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\CollectionItem[] $items - * The items from the specified collection. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The items from the specified collection. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.CollectionItem items = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\CollectionItem> - */ - public function getItems() - { - return $this->items; - } - - /** - * The items from the specified collection. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.CollectionItem items = 1; - * @param \Google\Cloud\VisionAI\V1\CollectionItem[] $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\CollectionItem::class); - $this->items = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewIndexedAssetsRequest.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewIndexedAssetsRequest.php deleted file mode 100644 index d8bfeb6fd205..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewIndexedAssetsRequest.php +++ /dev/null @@ -1,229 +0,0 @@ -google.cloud.visionai.v1.ViewIndexedAssetsRequest - */ -class ViewIndexedAssetsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The index that owns this collection of assets. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * - * Generated from protobuf field string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $index = ''; - /** - * The maximum number of assets to return. The service may return fewer than - * this value. - * If unspecified, at most 50 assets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A page token, received from a previous `ViewIndexedAssets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ViewIndexedAssets` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * The filter applied to the returned list. - * Only the following filterings are supported: - * "asset_id = xxxx", which returns asset with specified id. - * "asset_id = xxxx, yyyy, zzzz", which returns assets with specified ids. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - - /** - * @param string $index Required. The index that owns this collection of assets. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * Please see {@see WarehouseClient::indexName()} for help formatting this field. - * - * @return \Google\Cloud\VisionAI\V1\ViewIndexedAssetsRequest - * - * @experimental - */ - public static function build(string $index): self - { - return (new self()) - ->setIndex($index); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $index - * Required. The index that owns this collection of assets. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * @type int $page_size - * The maximum number of assets to return. The service may return fewer than - * this value. - * If unspecified, at most 50 assets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * @type string $page_token - * A page token, received from a previous `ViewIndexedAssets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ViewIndexedAssets` must - * match the call that provided the page token. - * @type string $filter - * The filter applied to the returned list. - * Only the following filterings are supported: - * "asset_id = xxxx", which returns asset with specified id. - * "asset_id = xxxx, yyyy, zzzz", which returns assets with specified ids. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * Required. The index that owns this collection of assets. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * - * Generated from protobuf field string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getIndex() - { - return $this->index; - } - - /** - * Required. The index that owns this collection of assets. - * Format: - * `projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}` - * - * Generated from protobuf field string index = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setIndex($var) - { - GPBUtil::checkString($var, True); - $this->index = $var; - - return $this; - } - - /** - * The maximum number of assets to return. The service may return fewer than - * this value. - * If unspecified, at most 50 assets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of assets to return. The service may return fewer than - * this value. - * If unspecified, at most 50 assets will be returned. - * The maximum value is 1000; values above 1000 will be coerced to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous `ViewIndexedAssets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ViewIndexedAssets` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous `ViewIndexedAssets` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ViewIndexedAssets` must - * match the call that provided the page token. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The filter applied to the returned list. - * Only the following filterings are supported: - * "asset_id = xxxx", which returns asset with specified id. - * "asset_id = xxxx, yyyy, zzzz", which returns assets with specified ids. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * The filter applied to the returned list. - * Only the following filterings are supported: - * "asset_id = xxxx", which returns asset with specified id. - * "asset_id = xxxx, yyyy, zzzz", which returns assets with specified ids. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewIndexedAssetsResponse.php b/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewIndexedAssetsResponse.php deleted file mode 100644 index d036ba002b67..000000000000 --- a/owl-bot-staging/VisionAi/v1/proto/src/Google/Cloud/VisionAI/V1/ViewIndexedAssetsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.visionai.v1.ViewIndexedAssetsResponse - */ -class ViewIndexedAssetsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The assets from the specified index. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.IndexedAsset indexed_assets = 1; - */ - private $indexed_assets; - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\VisionAI\V1\IndexedAsset[] $indexed_assets - * The assets from the specified index. - * @type string $next_page_token - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Visionai\V1\Warehouse::initOnce(); - parent::__construct($data); - } - - /** - * The assets from the specified index. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.IndexedAsset indexed_assets = 1; - * @return RepeatedField<\Google\Cloud\VisionAI\V1\IndexedAsset> - */ - public function getIndexedAssets() - { - return $this->indexed_assets; - } - - /** - * The assets from the specified index. - * - * Generated from protobuf field repeated .google.cloud.visionai.v1.IndexedAsset indexed_assets = 1; - * @param \Google\Cloud\VisionAI\V1\IndexedAsset[] $var - * @return $this - */ - public function setIndexedAssets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\VisionAI\V1\IndexedAsset::class); - $this->indexed_assets = $arr; - - return $this; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token, which can be sent as `page_token` to retrieve the next page. - * If this field is omitted, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @param string $var - * @return $this - */ - public function setNextPageToken($var) - { - GPBUtil::checkString($var, True); - $this->next_page_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/add_application_stream_input.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/add_application_stream_input.php deleted file mode 100644 index dd56a1b4657a..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/add_application_stream_input.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appPlatformClient->addApplicationStreamInput($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AddApplicationStreamInputResponse $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - - add_application_stream_input_sample($formattedName); -} -// [END visionai_v1_generated_AppPlatform_AddApplicationStreamInput_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_application.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_application.php deleted file mode 100644 index 5aed9aae6629..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_application.php +++ /dev/null @@ -1,94 +0,0 @@ -setDisplayName($applicationDisplayName); - $request = (new CreateApplicationRequest()) - ->setParent($formattedParent) - ->setApplicationId($applicationId) - ->setApplication($application); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appPlatformClient->createApplication($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Application $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 = AppPlatformClient::locationName('[PROJECT]', '[LOCATION]'); - $applicationId = '[APPLICATION_ID]'; - $applicationDisplayName = '[DISPLAY_NAME]'; - - create_application_sample($formattedParent, $applicationId, $applicationDisplayName); -} -// [END visionai_v1_generated_AppPlatform_CreateApplication_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_application_instances.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_application_instances.php deleted file mode 100644 index 486c6912f55f..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_application_instances.php +++ /dev/null @@ -1,108 +0,0 @@ -setDisplayName($applicationInstancesInstanceDisplayName); - $applicationInstance = (new ApplicationInstance()) - ->setInstanceId($applicationInstancesInstanceId) - ->setInstance($applicationInstancesInstance); - $applicationInstances = [$applicationInstance,]; - $request = (new CreateApplicationInstancesRequest()) - ->setName($formattedName) - ->setApplicationInstances($applicationInstances); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appPlatformClient->createApplicationInstances($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var CreateApplicationInstancesResponse $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $applicationInstancesInstanceId = '[INSTANCE_ID]'; - $applicationInstancesInstanceDisplayName = '[DISPLAY_NAME]'; - - create_application_instances_sample( - $formattedName, - $applicationInstancesInstanceId, - $applicationInstancesInstanceDisplayName - ); -} -// [END visionai_v1_generated_AppPlatform_CreateApplicationInstances_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_draft.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_draft.php deleted file mode 100644 index 7c5a4aa0cd7f..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_draft.php +++ /dev/null @@ -1,94 +0,0 @@ -setDisplayName($draftDisplayName); - $request = (new CreateDraftRequest()) - ->setParent($formattedParent) - ->setDraftId($draftId) - ->setDraft($draft); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appPlatformClient->createDraft($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Draft $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $draftId = '[DRAFT_ID]'; - $draftDisplayName = '[DISPLAY_NAME]'; - - create_draft_sample($formattedParent, $draftId, $draftDisplayName); -} -// [END visionai_v1_generated_AppPlatform_CreateDraft_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_processor.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_processor.php deleted file mode 100644 index c16201248aec..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/create_processor.php +++ /dev/null @@ -1,94 +0,0 @@ -setDisplayName($processorDisplayName); - $request = (new CreateProcessorRequest()) - ->setParent($formattedParent) - ->setProcessorId($processorId) - ->setProcessor($processor); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appPlatformClient->createProcessor($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Processor $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 = AppPlatformClient::locationName('[PROJECT]', '[LOCATION]'); - $processorId = '[PROCESSOR_ID]'; - $processorDisplayName = '[DISPLAY_NAME]'; - - create_processor_sample($formattedParent, $processorId, $processorDisplayName); -} -// [END visionai_v1_generated_AppPlatform_CreateProcessor_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_application.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_application.php deleted file mode 100644 index be0802bb65e4..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_application.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appPlatformClient->deleteApplication($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - - delete_application_sample($formattedName); -} -// [END visionai_v1_generated_AppPlatform_DeleteApplication_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_application_instances.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_application_instances.php deleted file mode 100644 index 7c5ba7783947..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_application_instances.php +++ /dev/null @@ -1,99 +0,0 @@ -setName($formattedName) - ->setInstanceIds($formattedInstanceIds); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appPlatformClient->deleteApplicationInstances($request); - $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 -{ - $formattedName = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $formattedInstanceIdsElement = AppPlatformClient::instanceName( - '[PROJECT]', - '[LOCATION]', - '[APPLICATION]', - '[INSTANCE]' - ); - - delete_application_instances_sample($formattedName, $formattedInstanceIdsElement); -} -// [END visionai_v1_generated_AppPlatform_DeleteApplicationInstances_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_draft.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_draft.php deleted file mode 100644 index 130b169b3291..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_draft.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appPlatformClient->deleteDraft($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AppPlatformClient::draftName( - '[PROJECT]', - '[LOCATION]', - '[APPLICATION]', - '[DRAFT]' - ); - - delete_draft_sample($formattedName); -} -// [END visionai_v1_generated_AppPlatform_DeleteDraft_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_processor.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_processor.php deleted file mode 100644 index 5bca684444bf..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/delete_processor.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appPlatformClient->deleteProcessor($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AppPlatformClient::processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - - delete_processor_sample($formattedName); -} -// [END visionai_v1_generated_AppPlatform_DeleteProcessor_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/deploy_application.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/deploy_application.php deleted file mode 100644 index a9f91e693700..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/deploy_application.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appPlatformClient->deployApplication($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DeployApplicationResponse $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - - deploy_application_sample($formattedName); -} -// [END visionai_v1_generated_AppPlatform_DeployApplication_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_application.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_application.php deleted file mode 100644 index d11903ba1108..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_application.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Application $response */ - $response = $appPlatformClient->getApplication($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - - get_application_sample($formattedName); -} -// [END visionai_v1_generated_AppPlatform_GetApplication_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_draft.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_draft.php deleted file mode 100644 index aeb8d3e9fcd1..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_draft.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Draft $response */ - $response = $appPlatformClient->getDraft($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AppPlatformClient::draftName( - '[PROJECT]', - '[LOCATION]', - '[APPLICATION]', - '[DRAFT]' - ); - - get_draft_sample($formattedName); -} -// [END visionai_v1_generated_AppPlatform_GetDraft_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_instance.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_instance.php deleted file mode 100644 index e9c8fc0bb266..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_instance.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Instance $response */ - $response = $appPlatformClient->getInstance($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AppPlatformClient::instanceName( - '[PROJECT]', - '[LOCATION]', - '[APPLICATION]', - '[INSTANCE]' - ); - - get_instance_sample($formattedName); -} -// [END visionai_v1_generated_AppPlatform_GetInstance_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_location.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_location.php deleted file mode 100644 index 2f72cf60f261..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_AppPlatform_GetLocation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_processor.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_processor.php deleted file mode 100644 index 9839b49a67d7..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/get_processor.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Processor $response */ - $response = $appPlatformClient->getProcessor($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = AppPlatformClient::processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - - get_processor_sample($formattedName); -} -// [END visionai_v1_generated_AppPlatform_GetProcessor_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_applications.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_applications.php deleted file mode 100644 index dd907d117125..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_applications.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $appPlatformClient->listApplications($request); - - /** @var Application $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 = AppPlatformClient::locationName('[PROJECT]', '[LOCATION]'); - - list_applications_sample($formattedParent); -} -// [END visionai_v1_generated_AppPlatform_ListApplications_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_drafts.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_drafts.php deleted file mode 100644 index c1dbeed51d3f..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_drafts.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $appPlatformClient->listDrafts($request); - - /** @var Draft $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - - list_drafts_sample($formattedParent); -} -// [END visionai_v1_generated_AppPlatform_ListDrafts_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_instances.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_instances.php deleted file mode 100644 index dc90d36034ab..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_instances.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $appPlatformClient->listInstances($request); - - /** @var Instance $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - - list_instances_sample($formattedParent); -} -// [END visionai_v1_generated_AppPlatform_ListInstances_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_locations.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_locations.php deleted file mode 100644 index dd4eb9ceefd0..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_AppPlatform_ListLocations_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_prebuilt_processors.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_prebuilt_processors.php deleted file mode 100644 index adbb59ca7d20..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_prebuilt_processors.php +++ /dev/null @@ -1,72 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var ListPrebuiltProcessorsResponse $response */ - $response = $appPlatformClient->listPrebuiltProcessors($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = AppPlatformClient::locationName('[PROJECT]', '[LOCATION]'); - - list_prebuilt_processors_sample($formattedParent); -} -// [END visionai_v1_generated_AppPlatform_ListPrebuiltProcessors_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_processors.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_processors.php deleted file mode 100644 index 0a2e6b1829a7..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/list_processors.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $appPlatformClient->listProcessors($request); - - /** @var Processor $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 = AppPlatformClient::locationName('[PROJECT]', '[LOCATION]'); - - list_processors_sample($formattedParent); -} -// [END visionai_v1_generated_AppPlatform_ListProcessors_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/remove_application_stream_input.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/remove_application_stream_input.php deleted file mode 100644 index 638f7b3c0cc5..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/remove_application_stream_input.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appPlatformClient->removeApplicationStreamInput($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var RemoveApplicationStreamInputResponse $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - - remove_application_stream_input_sample($formattedName); -} -// [END visionai_v1_generated_AppPlatform_RemoveApplicationStreamInput_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/undeploy_application.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/undeploy_application.php deleted file mode 100644 index dc6dd023d975..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/undeploy_application.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appPlatformClient->undeployApplication($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var UndeployApplicationResponse $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - - undeploy_application_sample($formattedName); -} -// [END visionai_v1_generated_AppPlatform_UndeployApplication_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application.php deleted file mode 100644 index 5b1371d65bc0..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application.php +++ /dev/null @@ -1,84 +0,0 @@ -setDisplayName($applicationDisplayName); - $request = (new UpdateApplicationRequest()) - ->setApplication($application); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appPlatformClient->updateApplication($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Application $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 -{ - $applicationDisplayName = '[DISPLAY_NAME]'; - - update_application_sample($applicationDisplayName); -} -// [END visionai_v1_generated_AppPlatform_UpdateApplication_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application_instances.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application_instances.php deleted file mode 100644 index 9acb0acccff9..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application_instances.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appPlatformClient->updateApplicationInstances($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var UpdateApplicationInstancesResponse $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - - update_application_instances_sample($formattedName); -} -// [END visionai_v1_generated_AppPlatform_UpdateApplicationInstances_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application_stream_input.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application_stream_input.php deleted file mode 100644 index a90413cf4b5a..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_application_stream_input.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appPlatformClient->updateApplicationStreamInput($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var UpdateApplicationStreamInputResponse $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 = AppPlatformClient::applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - - update_application_stream_input_sample($formattedName); -} -// [END visionai_v1_generated_AppPlatform_UpdateApplicationStreamInput_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_draft.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_draft.php deleted file mode 100644 index 0a38e66b3ec3..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_draft.php +++ /dev/null @@ -1,84 +0,0 @@ -setDisplayName($draftDisplayName); - $request = (new UpdateDraftRequest()) - ->setDraft($draft); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appPlatformClient->updateDraft($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Draft $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 -{ - $draftDisplayName = '[DISPLAY_NAME]'; - - update_draft_sample($draftDisplayName); -} -// [END visionai_v1_generated_AppPlatform_UpdateDraft_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_processor.php b/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_processor.php deleted file mode 100644 index a838d5f53263..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/AppPlatformClient/update_processor.php +++ /dev/null @@ -1,84 +0,0 @@ -setDisplayName($processorDisplayName); - $request = (new UpdateProcessorRequest()) - ->setProcessor($processor); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $appPlatformClient->updateProcessor($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Processor $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 -{ - $processorDisplayName = '[DISPLAY_NAME]'; - - update_processor_sample($processorDisplayName); -} -// [END visionai_v1_generated_AppPlatform_UpdateProcessor_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/get_location.php b/owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/get_location.php deleted file mode 100644 index 390fd6ae708a..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_HealthCheckService_GetLocation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/health_check.php b/owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/health_check.php deleted file mode 100644 index 0781f697b971..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/health_check.php +++ /dev/null @@ -1,57 +0,0 @@ -healthCheck($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_HealthCheckService_HealthCheck_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/list_locations.php b/owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/list_locations.php deleted file mode 100644 index 15bbaed7bfe0..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/HealthCheckServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_HealthCheckService_ListLocations_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/batch_run_process.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/batch_run_process.php deleted file mode 100644 index ebfffcce734b..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/batch_run_process.php +++ /dev/null @@ -1,120 +0,0 @@ -setAnalysis($formattedRequestsProcessAnalysis); - $createProcessRequest = (new CreateProcessRequest()) - ->setParent($formattedRequestsParent) - ->setProcessId($requestsProcessId) - ->setProcess($requestsProcess); - $requests = [$createProcessRequest,]; - $request = (new BatchRunProcessRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $liveVideoAnalyticsClient->batchRunProcess($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var BatchRunProcessResponse $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 = LiveVideoAnalyticsClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $formattedRequestsParent = LiveVideoAnalyticsClient::clusterName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]' - ); - $requestsProcessId = '[PROCESS_ID]'; - $formattedRequestsProcessAnalysis = LiveVideoAnalyticsClient::analysisName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]', - '[ANALYSIS]' - ); - - batch_run_process_sample( - $formattedParent, - $formattedRequestsParent, - $requestsProcessId, - $formattedRequestsProcessAnalysis - ); -} -// [END visionai_v1_generated_LiveVideoAnalytics_BatchRunProcess_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_analysis.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_analysis.php deleted file mode 100644 index 4703d663973b..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_analysis.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent) - ->setAnalysisId($analysisId) - ->setAnalysis($analysis); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $liveVideoAnalyticsClient->createAnalysis($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Analysis $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 = LiveVideoAnalyticsClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $analysisId = '[ANALYSIS_ID]'; - - create_analysis_sample($formattedParent, $analysisId); -} -// [END visionai_v1_generated_LiveVideoAnalytics_CreateAnalysis_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_operator.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_operator.php deleted file mode 100644 index 582f864c2dc7..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_operator.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent) - ->setOperatorId($operatorId) - ->setOperator($operator); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $liveVideoAnalyticsClient->createOperator($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Operator $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 = LiveVideoAnalyticsClient::locationName('[PROJECT]', '[LOCATION]'); - $operatorId = '[OPERATOR_ID]'; - - create_operator_sample($formattedParent, $operatorId); -} -// [END visionai_v1_generated_LiveVideoAnalytics_CreateOperator_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_process.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_process.php deleted file mode 100644 index 792fdf354c52..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/create_process.php +++ /dev/null @@ -1,100 +0,0 @@ -setAnalysis($formattedProcessAnalysis); - $request = (new CreateProcessRequest()) - ->setParent($formattedParent) - ->setProcessId($processId) - ->setProcess($process); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $liveVideoAnalyticsClient->createProcess($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Process $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 = LiveVideoAnalyticsClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $processId = '[PROCESS_ID]'; - $formattedProcessAnalysis = LiveVideoAnalyticsClient::analysisName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]', - '[ANALYSIS]' - ); - - create_process_sample($formattedParent, $processId, $formattedProcessAnalysis); -} -// [END visionai_v1_generated_LiveVideoAnalytics_CreateProcess_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_analysis.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_analysis.php deleted file mode 100644 index 5e64d59b0374..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_analysis.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $liveVideoAnalyticsClient->deleteAnalysis($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = LiveVideoAnalyticsClient::analysisName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]', - '[ANALYSIS]' - ); - - delete_analysis_sample($formattedName); -} -// [END visionai_v1_generated_LiveVideoAnalytics_DeleteAnalysis_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_operator.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_operator.php deleted file mode 100644 index 2e17d7a6f3bb..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_operator.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $liveVideoAnalyticsClient->deleteOperator($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = LiveVideoAnalyticsClient::operatorName('[PROJECT]', '[LOCATION]', '[OPERATOR]'); - - delete_operator_sample($formattedName); -} -// [END visionai_v1_generated_LiveVideoAnalytics_DeleteOperator_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_process.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_process.php deleted file mode 100644 index ebd07c95d747..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/delete_process.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $liveVideoAnalyticsClient->deleteProcess($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = LiveVideoAnalyticsClient::processName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]', - '[PROCESS]' - ); - - delete_process_sample($formattedName); -} -// [END visionai_v1_generated_LiveVideoAnalytics_DeleteProcess_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_analysis.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_analysis.php deleted file mode 100644 index 444a8b2b47a4..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_analysis.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Analysis $response */ - $response = $liveVideoAnalyticsClient->getAnalysis($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = LiveVideoAnalyticsClient::analysisName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]', - '[ANALYSIS]' - ); - - get_analysis_sample($formattedName); -} -// [END visionai_v1_generated_LiveVideoAnalytics_GetAnalysis_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_location.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_location.php deleted file mode 100644 index 0ce63e469c98..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_LiveVideoAnalytics_GetLocation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_operator.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_operator.php deleted file mode 100644 index 0effb2efeb25..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_operator.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Operator $response */ - $response = $liveVideoAnalyticsClient->getOperator($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = LiveVideoAnalyticsClient::operatorName('[PROJECT]', '[LOCATION]', '[OPERATOR]'); - - get_operator_sample($formattedName); -} -// [END visionai_v1_generated_LiveVideoAnalytics_GetOperator_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_process.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_process.php deleted file mode 100644 index f89a8e8e4407..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/get_process.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Process $response */ - $response = $liveVideoAnalyticsClient->getProcess($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = LiveVideoAnalyticsClient::processName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]', - '[PROCESS]' - ); - - get_process_sample($formattedName); -} -// [END visionai_v1_generated_LiveVideoAnalytics_GetProcess_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_analyses.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_analyses.php deleted file mode 100644 index bfdc9cc2a546..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_analyses.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $liveVideoAnalyticsClient->listAnalyses($request); - - /** @var Analysis $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 = LiveVideoAnalyticsClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - - list_analyses_sample($formattedParent); -} -// [END visionai_v1_generated_LiveVideoAnalytics_ListAnalyses_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_locations.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_locations.php deleted file mode 100644 index ca3e8dcce026..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_LiveVideoAnalytics_ListLocations_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_operators.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_operators.php deleted file mode 100644 index ca9416ccba45..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_operators.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $liveVideoAnalyticsClient->listOperators($request); - - /** @var Operator $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 = LiveVideoAnalyticsClient::locationName('[PROJECT]', '[LOCATION]'); - - list_operators_sample($formattedParent); -} -// [END visionai_v1_generated_LiveVideoAnalytics_ListOperators_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_processes.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_processes.php deleted file mode 100644 index 02cce1710502..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_processes.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $liveVideoAnalyticsClient->listProcesses($request); - - /** @var Process $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 = LiveVideoAnalyticsClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - - list_processes_sample($formattedParent); -} -// [END visionai_v1_generated_LiveVideoAnalytics_ListProcesses_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_public_operators.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_public_operators.php deleted file mode 100644 index b57de4a629de..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/list_public_operators.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $liveVideoAnalyticsClient->listPublicOperators($request); - - /** @var Operator $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 = LiveVideoAnalyticsClient::locationName('[PROJECT]', '[LOCATION]'); - - list_public_operators_sample($formattedParent); -} -// [END visionai_v1_generated_LiveVideoAnalytics_ListPublicOperators_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/resolve_operator_info.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/resolve_operator_info.php deleted file mode 100644 index 715e12222e4d..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/resolve_operator_info.php +++ /dev/null @@ -1,78 +0,0 @@ -setOperator($queriesOperator); - $queries = [$operatorQuery,]; - $request = (new ResolveOperatorInfoRequest()) - ->setParent($formattedParent) - ->setQueries($queries); - - // Call the API and handle any network failures. - try { - /** @var ResolveOperatorInfoResponse $response */ - $response = $liveVideoAnalyticsClient->resolveOperatorInfo($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = LiveVideoAnalyticsClient::locationName('[PROJECT]', '[LOCATION]'); - $queriesOperator = '[OPERATOR]'; - - resolve_operator_info_sample($formattedParent, $queriesOperator); -} -// [END visionai_v1_generated_LiveVideoAnalytics_ResolveOperatorInfo_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_analysis.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_analysis.php deleted file mode 100644 index 1e671ca5da76..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_analysis.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setAnalysis($analysis); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $liveVideoAnalyticsClient->updateAnalysis($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Analysis $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 visionai_v1_generated_LiveVideoAnalytics_UpdateAnalysis_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_operator.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_operator.php deleted file mode 100644 index b095358c5716..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_operator.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setOperator($operator); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $liveVideoAnalyticsClient->updateOperator($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Operator $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 visionai_v1_generated_LiveVideoAnalytics_UpdateOperator_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_process.php b/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_process.php deleted file mode 100644 index 04b84327a76f..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/LiveVideoAnalyticsClient/update_process.php +++ /dev/null @@ -1,93 +0,0 @@ -setAnalysis($formattedProcessAnalysis); - $request = (new UpdateProcessRequest()) - ->setUpdateMask($updateMask) - ->setProcess($process); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $liveVideoAnalyticsClient->updateProcess($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Process $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 -{ - $formattedProcessAnalysis = LiveVideoAnalyticsClient::analysisName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]', - '[ANALYSIS]' - ); - - update_process_sample($formattedProcessAnalysis); -} -// [END visionai_v1_generated_LiveVideoAnalytics_UpdateProcess_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/acquire_lease.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/acquire_lease.php deleted file mode 100644 index 010295edec89..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/acquire_lease.php +++ /dev/null @@ -1,57 +0,0 @@ -acquireLease($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_StreamingService_AcquireLease_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/get_location.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/get_location.php deleted file mode 100644 index ea3ab01257be..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_StreamingService_GetLocation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/list_locations.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/list_locations.php deleted file mode 100644 index e560653219ef..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_StreamingService_ListLocations_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/receive_events.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/receive_events.php deleted file mode 100644 index 275626173d7e..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/receive_events.php +++ /dev/null @@ -1,63 +0,0 @@ -receiveEvents(); - $stream->writeAll([$request,]); - - /** @var ReceiveEventsResponse $element */ - foreach ($stream->closeWriteAndReadAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_StreamingService_ReceiveEvents_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/receive_packets.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/receive_packets.php deleted file mode 100644 index bb08b45c377d..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/receive_packets.php +++ /dev/null @@ -1,63 +0,0 @@ -receivePackets(); - $stream->writeAll([$request,]); - - /** @var ReceivePacketsResponse $element */ - foreach ($stream->closeWriteAndReadAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_StreamingService_ReceivePackets_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/release_lease.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/release_lease.php deleted file mode 100644 index 6e2968fbc08d..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/release_lease.php +++ /dev/null @@ -1,57 +0,0 @@ -releaseLease($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_StreamingService_ReleaseLease_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/renew_lease.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/renew_lease.php deleted file mode 100644 index 58964d400e39..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/renew_lease.php +++ /dev/null @@ -1,57 +0,0 @@ -renewLease($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_StreamingService_RenewLease_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/send_packets.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/send_packets.php deleted file mode 100644 index 8f38ad3e0fae..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamingServiceClient/send_packets.php +++ /dev/null @@ -1,63 +0,0 @@ -sendPackets(); - $stream->writeAll([$request,]); - - /** @var SendPacketsResponse $element */ - foreach ($stream->closeWriteAndReadAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_StreamingService_SendPackets_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_cluster.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_cluster.php deleted file mode 100644 index c61c4025cabc..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_cluster.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent) - ->setClusterId($clusterId) - ->setCluster($cluster); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $streamsServiceClient->createCluster($request); - $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 = StreamsServiceClient::locationName('[PROJECT]', '[LOCATION]'); - $clusterId = '[CLUSTER_ID]'; - - create_cluster_sample($formattedParent, $clusterId); -} -// [END visionai_v1_generated_StreamsService_CreateCluster_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_event.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_event.php deleted file mode 100644 index f8f447fbb2ba..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_event.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent) - ->setEventId($eventId) - ->setEvent($event); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $streamsServiceClient->createEvent($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Event $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 = StreamsServiceClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $eventId = '[EVENT_ID]'; - - create_event_sample($formattedParent, $eventId); -} -// [END visionai_v1_generated_StreamsService_CreateEvent_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_series.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_series.php deleted file mode 100644 index 1f0dc3dafc87..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_series.php +++ /dev/null @@ -1,110 +0,0 @@ -setStream($formattedSeriesStream) - ->setEvent($formattedSeriesEvent); - $request = (new CreateSeriesRequest()) - ->setParent($formattedParent) - ->setSeriesId($seriesId) - ->setSeries($series); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $streamsServiceClient->createSeries($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Series $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 = StreamsServiceClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $seriesId = '[SERIES_ID]'; - $formattedSeriesStream = StreamsServiceClient::streamName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]', - '[STREAM]' - ); - $formattedSeriesEvent = StreamsServiceClient::eventName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]', - '[EVENT]' - ); - - create_series_sample($formattedParent, $seriesId, $formattedSeriesStream, $formattedSeriesEvent); -} -// [END visionai_v1_generated_StreamsService_CreateSeries_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_stream.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_stream.php deleted file mode 100644 index e5a9249bc876..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/create_stream.php +++ /dev/null @@ -1,88 +0,0 @@ -setParent($formattedParent) - ->setStreamId($streamId) - ->setStream($stream); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $streamsServiceClient->createStream($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Stream $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 = StreamsServiceClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $streamId = '[STREAM_ID]'; - - create_stream_sample($formattedParent, $streamId); -} -// [END visionai_v1_generated_StreamsService_CreateStream_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_cluster.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_cluster.php deleted file mode 100644 index 68588949ec65..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_cluster.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $streamsServiceClient->deleteCluster($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StreamsServiceClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - - delete_cluster_sample($formattedName); -} -// [END visionai_v1_generated_StreamsService_DeleteCluster_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_event.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_event.php deleted file mode 100644 index 10ffaa142459..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_event.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $streamsServiceClient->deleteEvent($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StreamsServiceClient::eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); - - delete_event_sample($formattedName); -} -// [END visionai_v1_generated_StreamsService_DeleteEvent_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_series.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_series.php deleted file mode 100644 index cc1ea000f2ac..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_series.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $streamsServiceClient->deleteSeries($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StreamsServiceClient::seriesName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]', - '[SERIES]' - ); - - delete_series_sample($formattedName); -} -// [END visionai_v1_generated_StreamsService_DeleteSeries_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_stream.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_stream.php deleted file mode 100644 index a0e01e63b5d4..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/delete_stream.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $streamsServiceClient->deleteStream($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StreamsServiceClient::streamName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]', - '[STREAM]' - ); - - delete_stream_sample($formattedName); -} -// [END visionai_v1_generated_StreamsService_DeleteStream_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/generate_stream_hls_token.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/generate_stream_hls_token.php deleted file mode 100644 index 5b52706aea34..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/generate_stream_hls_token.php +++ /dev/null @@ -1,70 +0,0 @@ -setStream($stream); - - // Call the API and handle any network failures. - try { - /** @var GenerateStreamHlsTokenResponse $response */ - $response = $streamsServiceClient->generateStreamHlsToken($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $stream = '[STREAM]'; - - generate_stream_hls_token_sample($stream); -} -// [END visionai_v1_generated_StreamsService_GenerateStreamHlsToken_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_cluster.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_cluster.php deleted file mode 100644 index 2d4e5d62bb9f..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_cluster.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Cluster $response */ - $response = $streamsServiceClient->getCluster($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StreamsServiceClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - - get_cluster_sample($formattedName); -} -// [END visionai_v1_generated_StreamsService_GetCluster_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_event.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_event.php deleted file mode 100644 index dd737c5e646f..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_event.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Event $response */ - $response = $streamsServiceClient->getEvent($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StreamsServiceClient::eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); - - get_event_sample($formattedName); -} -// [END visionai_v1_generated_StreamsService_GetEvent_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_location.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_location.php deleted file mode 100644 index e85b7b27dcb8..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_StreamsService_GetLocation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_series.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_series.php deleted file mode 100644 index 1cc004e107be..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_series.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Series $response */ - $response = $streamsServiceClient->getSeries($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StreamsServiceClient::seriesName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]', - '[SERIES]' - ); - - get_series_sample($formattedName); -} -// [END visionai_v1_generated_StreamsService_GetSeries_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_stream.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_stream.php deleted file mode 100644 index 143f3e0ff55d..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_stream.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Stream $response */ - $response = $streamsServiceClient->getStream($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = StreamsServiceClient::streamName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]', - '[STREAM]' - ); - - get_stream_sample($formattedName); -} -// [END visionai_v1_generated_StreamsService_GetStream_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_stream_thumbnail.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_stream_thumbnail.php deleted file mode 100644 index 908c6d5f5258..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/get_stream_thumbnail.php +++ /dev/null @@ -1,85 +0,0 @@ -setStream($stream) - ->setGcsObjectName($gcsObjectName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $streamsServiceClient->getStreamThumbnail($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var GetStreamThumbnailResponse $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 -{ - $stream = '[STREAM]'; - $gcsObjectName = '[GCS_OBJECT_NAME]'; - - get_stream_thumbnail_sample($stream, $gcsObjectName); -} -// [END visionai_v1_generated_StreamsService_GetStreamThumbnail_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_clusters.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_clusters.php deleted file mode 100644 index 0c1103f1fc20..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_clusters.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $streamsServiceClient->listClusters($request); - - /** @var Cluster $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 = StreamsServiceClient::locationName('[PROJECT]', '[LOCATION]'); - - list_clusters_sample($formattedParent); -} -// [END visionai_v1_generated_StreamsService_ListClusters_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_events.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_events.php deleted file mode 100644 index 5f04748b5318..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_events.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $streamsServiceClient->listEvents($request); - - /** @var Event $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 = StreamsServiceClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - - list_events_sample($formattedParent); -} -// [END visionai_v1_generated_StreamsService_ListEvents_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_locations.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_locations.php deleted file mode 100644 index 6795225018fb..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_StreamsService_ListLocations_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_series.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_series.php deleted file mode 100644 index afb3504f1824..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_series.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $streamsServiceClient->listSeries($request); - - /** @var Series $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 = StreamsServiceClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - - list_series_sample($formattedParent); -} -// [END visionai_v1_generated_StreamsService_ListSeries_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_streams.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_streams.php deleted file mode 100644 index 8a184d8f084a..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/list_streams.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $streamsServiceClient->listStreams($request); - - /** @var Stream $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 = StreamsServiceClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - - list_streams_sample($formattedParent); -} -// [END visionai_v1_generated_StreamsService_ListStreams_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/materialize_channel.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/materialize_channel.php deleted file mode 100644 index 4a4fa4651feb..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/materialize_channel.php +++ /dev/null @@ -1,115 +0,0 @@ -setStream($formattedChannelStream) - ->setEvent($formattedChannelEvent); - $request = (new MaterializeChannelRequest()) - ->setParent($formattedParent) - ->setChannelId($channelId) - ->setChannel($channel); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $streamsServiceClient->materializeChannel($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Channel $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 = StreamsServiceClient::clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $channelId = '[CHANNEL_ID]'; - $formattedChannelStream = StreamsServiceClient::streamName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]', - '[STREAM]' - ); - $formattedChannelEvent = StreamsServiceClient::eventName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]', - '[EVENT]' - ); - - materialize_channel_sample( - $formattedParent, - $channelId, - $formattedChannelStream, - $formattedChannelEvent - ); -} -// [END visionai_v1_generated_StreamsService_MaterializeChannel_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_cluster.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_cluster.php deleted file mode 100644 index d0a799c6c5f2..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_cluster.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setCluster($cluster); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $streamsServiceClient->updateCluster($request); - $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 visionai_v1_generated_StreamsService_UpdateCluster_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_event.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_event.php deleted file mode 100644 index 39f2184be6ba..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_event.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setEvent($event); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $streamsServiceClient->updateEvent($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Event $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 visionai_v1_generated_StreamsService_UpdateEvent_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_series.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_series.php deleted file mode 100644 index 2c04f25d9cd2..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_series.php +++ /dev/null @@ -1,102 +0,0 @@ -setStream($formattedSeriesStream) - ->setEvent($formattedSeriesEvent); - $request = (new UpdateSeriesRequest()) - ->setUpdateMask($updateMask) - ->setSeries($series); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $streamsServiceClient->updateSeries($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Series $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 -{ - $formattedSeriesStream = StreamsServiceClient::streamName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]', - '[STREAM]' - ); - $formattedSeriesEvent = StreamsServiceClient::eventName( - '[PROJECT]', - '[LOCATION]', - '[CLUSTER]', - '[EVENT]' - ); - - update_series_sample($formattedSeriesStream, $formattedSeriesEvent); -} -// [END visionai_v1_generated_StreamsService_UpdateSeries_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_stream.php b/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_stream.php deleted file mode 100644 index a7ed5d56d707..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/StreamsServiceClient/update_stream.php +++ /dev/null @@ -1,74 +0,0 @@ -setUpdateMask($updateMask) - ->setStream($stream); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $streamsServiceClient->updateStream($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Stream $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 visionai_v1_generated_StreamsService_UpdateStream_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/add_collection_item.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/add_collection_item.php deleted file mode 100644 index a6cea93de292..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/add_collection_item.php +++ /dev/null @@ -1,92 +0,0 @@ -setCollection($formattedItemCollection) - ->setType($itemType) - ->setItemResource($itemItemResource); - $request = (new AddCollectionItemRequest()) - ->setItem($item); - - // Call the API and handle any network failures. - try { - /** @var AddCollectionItemResponse $response */ - $response = $warehouseClient->addCollectionItem($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedItemCollection = WarehouseClient::collectionName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[COLLECTION]' - ); - $itemType = Type::TYPE_UNSPECIFIED; - $itemItemResource = '[ITEM_RESOURCE]'; - - add_collection_item_sample($formattedItemCollection, $itemType, $itemItemResource); -} -// [END visionai_v1_generated_Warehouse_AddCollectionItem_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/analyze_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/analyze_asset.php deleted file mode 100644 index 4cf744cf67b7..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/analyze_asset.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $warehouseClient->analyzeAsset($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AnalyzeAssetResponse $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 = WarehouseClient::assetName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[ASSET]' - ); - - analyze_asset_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_AnalyzeAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/analyze_corpus.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/analyze_corpus.php deleted file mode 100644 index eaf35eabb280..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/analyze_corpus.php +++ /dev/null @@ -1,85 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $warehouseClient->analyzeCorpus($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var AnalyzeCorpusResponse $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 = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - - analyze_corpus_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_AnalyzeCorpus_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/clip_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/clip_asset.php deleted file mode 100644 index 26c3b1dcba92..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/clip_asset.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName) - ->setTemporalPartition($temporalPartition); - - // Call the API and handle any network failures. - try { - /** @var ClipAssetResponse $response */ - $response = $warehouseClient->clipAsset($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::assetName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[ASSET]' - ); - - clip_asset_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_ClipAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_annotation.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_annotation.php deleted file mode 100644 index 489be36522f6..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_annotation.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent) - ->setAnnotation($annotation); - - // Call the API and handle any network failures. - try { - /** @var Annotation $response */ - $response = $warehouseClient->createAnnotation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WarehouseClient::assetName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[ASSET]' - ); - - create_annotation_sample($formattedParent); -} -// [END visionai_v1_generated_Warehouse_CreateAnnotation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_asset.php deleted file mode 100644 index eb1178924c25..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_asset.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent) - ->setAsset($asset); - - // Call the API and handle any network failures. - try { - /** @var Asset $response */ - $response = $warehouseClient->createAsset($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - - create_asset_sample($formattedParent); -} -// [END visionai_v1_generated_Warehouse_CreateAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_collection.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_collection.php deleted file mode 100644 index 85d642dc501a..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_collection.php +++ /dev/null @@ -1,86 +0,0 @@ -setParent($formattedParent) - ->setCollection($collection); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $warehouseClient->createCollection($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Collection $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 = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - - create_collection_sample($formattedParent); -} -// [END visionai_v1_generated_Warehouse_CreateCollection_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_corpus.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_corpus.php deleted file mode 100644 index 541e7b41d6f1..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_corpus.php +++ /dev/null @@ -1,88 +0,0 @@ -setDisplayName($corpusDisplayName); - $request = (new CreateCorpusRequest()) - ->setParent($parent) - ->setCorpus($corpus); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $warehouseClient->createCorpus($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Corpus $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 -{ - $parent = '[PARENT]'; - $corpusDisplayName = '[DISPLAY_NAME]'; - - create_corpus_sample($parent, $corpusDisplayName); -} -// [END visionai_v1_generated_Warehouse_CreateCorpus_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_data_schema.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_data_schema.php deleted file mode 100644 index 18ff16bd913a..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_data_schema.php +++ /dev/null @@ -1,81 +0,0 @@ -setKey($dataSchemaKey); - $request = (new CreateDataSchemaRequest()) - ->setParent($formattedParent) - ->setDataSchema($dataSchema); - - // Call the API and handle any network failures. - try { - /** @var DataSchema $response */ - $response = $warehouseClient->createDataSchema($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $dataSchemaKey = '[KEY]'; - - create_data_schema_sample($formattedParent, $dataSchemaKey); -} -// [END visionai_v1_generated_Warehouse_CreateDataSchema_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_index.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_index.php deleted file mode 100644 index 5a4d82c69f17..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_index.php +++ /dev/null @@ -1,87 +0,0 @@ -setParent($formattedParent) - ->setIndex($index); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $warehouseClient->createIndex($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Index $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - - create_index_sample($formattedParent); -} -// [END visionai_v1_generated_Warehouse_CreateIndex_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_index_endpoint.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_index_endpoint.php deleted file mode 100644 index 227c7f404242..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_index_endpoint.php +++ /dev/null @@ -1,85 +0,0 @@ -setParent($formattedParent) - ->setIndexEndpoint($indexEndpoint); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $warehouseClient->createIndexEndpoint($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var IndexEndpoint $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 = WarehouseClient::locationName('[PROJECT]', '[LOCATION]'); - - create_index_endpoint_sample($formattedParent); -} -// [END visionai_v1_generated_Warehouse_CreateIndexEndpoint_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_search_config.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_search_config.php deleted file mode 100644 index 3aa0b98a303b..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_search_config.php +++ /dev/null @@ -1,95 +0,0 @@ -setParent($formattedParent) - ->setSearchConfig($searchConfig) - ->setSearchConfigId($searchConfigId); - - // Call the API and handle any network failures. - try { - /** @var SearchConfig $response */ - $response = $warehouseClient->createSearchConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $searchConfigId = '[SEARCH_CONFIG_ID]'; - - create_search_config_sample($formattedParent, $searchConfigId); -} -// [END visionai_v1_generated_Warehouse_CreateSearchConfig_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_search_hypernym.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_search_hypernym.php deleted file mode 100644 index 23e64fad4ae2..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/create_search_hypernym.php +++ /dev/null @@ -1,74 +0,0 @@ -setParent($formattedParent) - ->setSearchHypernym($searchHypernym); - - // Call the API and handle any network failures. - try { - /** @var SearchHypernym $response */ - $response = $warehouseClient->createSearchHypernym($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - - create_search_hypernym_sample($formattedParent); -} -// [END visionai_v1_generated_Warehouse_CreateSearchHypernym_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_annotation.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_annotation.php deleted file mode 100644 index af98ce93bd3f..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_annotation.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $warehouseClient->deleteAnnotation($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::annotationName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[ASSET]', - '[ANNOTATION]' - ); - - delete_annotation_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_DeleteAnnotation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_asset.php deleted file mode 100644 index 68fd359198f3..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_asset.php +++ /dev/null @@ -1,87 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $warehouseClient->deleteAsset($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::assetName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[ASSET]' - ); - - delete_asset_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_DeleteAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_collection.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_collection.php deleted file mode 100644 index 97e826258e60..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_collection.php +++ /dev/null @@ -1,86 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $warehouseClient->deleteCollection($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::collectionName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[COLLECTION]' - ); - - delete_collection_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_DeleteCollection_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_corpus.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_corpus.php deleted file mode 100644 index e56a86c494dd..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_corpus.php +++ /dev/null @@ -1,70 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $warehouseClient->deleteCorpus($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - - delete_corpus_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_DeleteCorpus_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_data_schema.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_data_schema.php deleted file mode 100644 index d49554c51a92..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_data_schema.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $warehouseClient->deleteDataSchema($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::dataSchemaName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[DATA_SCHEMA]' - ); - - delete_data_schema_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_DeleteDataSchema_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_index.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_index.php deleted file mode 100644 index d52f094b6979..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_index.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $warehouseClient->deleteIndex($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::indexName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[INDEX]' - ); - - delete_index_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_DeleteIndex_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_index_endpoint.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_index_endpoint.php deleted file mode 100644 index e495ad597a1c..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_index_endpoint.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $warehouseClient->deleteIndexEndpoint($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - printf('Operation completed successfully.' . PHP_EOL); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); - - delete_index_endpoint_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_DeleteIndexEndpoint_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_search_config.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_search_config.php deleted file mode 100644 index e01198f4c6c1..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_search_config.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $warehouseClient->deleteSearchConfig($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::searchConfigName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[SEARCH_CONFIG]' - ); - - delete_search_config_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_DeleteSearchConfig_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_search_hypernym.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_search_hypernym.php deleted file mode 100644 index 5c8057763663..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/delete_search_hypernym.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $warehouseClient->deleteSearchHypernym($request); - printf('Call completed successfully.' . PHP_EOL); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::searchHypernymName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[SEARCH_HYPERNYM]' - ); - - delete_search_hypernym_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_DeleteSearchHypernym_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/deploy_index.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/deploy_index.php deleted file mode 100644 index de234fa5d6bc..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/deploy_index.php +++ /dev/null @@ -1,105 +0,0 @@ -setIndex($formattedDeployedIndexIndex); - $request = (new DeployIndexRequest()) - ->setIndexEndpoint($formattedIndexEndpoint) - ->setDeployedIndex($deployedIndex); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $warehouseClient->deployIndex($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var DeployIndexResponse $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 -{ - $formattedIndexEndpoint = WarehouseClient::indexEndpointName( - '[PROJECT]', - '[LOCATION]', - '[INDEX_ENDPOINT]' - ); - $formattedDeployedIndexIndex = WarehouseClient::indexName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[INDEX]' - ); - - deploy_index_sample($formattedIndexEndpoint, $formattedDeployedIndexIndex); -} -// [END visionai_v1_generated_Warehouse_DeployIndex_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/generate_hls_uri.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/generate_hls_uri.php deleted file mode 100644 index b2c209506383..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/generate_hls_uri.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var GenerateHlsUriResponse $response */ - $response = $warehouseClient->generateHlsUri($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::assetName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[ASSET]' - ); - - generate_hls_uri_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_GenerateHlsUri_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/generate_retrieval_url.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/generate_retrieval_url.php deleted file mode 100644 index ec77778d908e..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/generate_retrieval_url.php +++ /dev/null @@ -1,80 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var GenerateRetrievalUrlResponse $response */ - $response = $warehouseClient->generateRetrievalUrl($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::assetName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[ASSET]' - ); - - generate_retrieval_url_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_GenerateRetrievalUrl_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_annotation.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_annotation.php deleted file mode 100644 index 02b67df2c4fd..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_annotation.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Annotation $response */ - $response = $warehouseClient->getAnnotation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::annotationName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[ASSET]', - '[ANNOTATION]' - ); - - get_annotation_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_GetAnnotation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_asset.php deleted file mode 100644 index c5c461774b24..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_asset.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Asset $response */ - $response = $warehouseClient->getAsset($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::assetName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[ASSET]' - ); - - get_asset_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_GetAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_collection.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_collection.php deleted file mode 100644 index 84d0802e8a25..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_collection.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Collection $response */ - $response = $warehouseClient->getCollection($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::collectionName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[COLLECTION]' - ); - - get_collection_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_GetCollection_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_corpus.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_corpus.php deleted file mode 100644 index 8876c6e038e9..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_corpus.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Corpus $response */ - $response = $warehouseClient->getCorpus($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - - get_corpus_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_GetCorpus_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_data_schema.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_data_schema.php deleted file mode 100644 index 89f584ef7fee..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_data_schema.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var DataSchema $response */ - $response = $warehouseClient->getDataSchema($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::dataSchemaName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[DATA_SCHEMA]' - ); - - get_data_schema_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_GetDataSchema_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_index.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_index.php deleted file mode 100644 index 751c1ffc2888..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_index.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Index $response */ - $response = $warehouseClient->getIndex($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::indexName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[INDEX]' - ); - - get_index_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_GetIndex_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_index_endpoint.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_index_endpoint.php deleted file mode 100644 index d77fc83dc760..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_index_endpoint.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var IndexEndpoint $response */ - $response = $warehouseClient->getIndexEndpoint($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); - - get_index_endpoint_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_GetIndexEndpoint_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_location.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_location.php deleted file mode 100644 index 227fce7a1c5a..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_location.php +++ /dev/null @@ -1,57 +0,0 @@ -getLocation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_Warehouse_GetLocation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_search_config.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_search_config.php deleted file mode 100644 index a463c6592944..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_search_config.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SearchConfig $response */ - $response = $warehouseClient->getSearchConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::searchConfigName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[SEARCH_CONFIG]' - ); - - get_search_config_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_GetSearchConfig_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_search_hypernym.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_search_hypernym.php deleted file mode 100644 index c7f2dbf381e1..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/get_search_hypernym.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SearchHypernym $response */ - $response = $warehouseClient->getSearchHypernym($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedName = WarehouseClient::searchHypernymName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[SEARCH_HYPERNYM]' - ); - - get_search_hypernym_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_GetSearchHypernym_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/import_assets.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/import_assets.php deleted file mode 100644 index 287dcb71d77f..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/import_assets.php +++ /dev/null @@ -1,87 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $warehouseClient->importAssets($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var ImportAssetsResponse $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 = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - - import_assets_sample($formattedParent); -} -// [END visionai_v1_generated_Warehouse_ImportAssets_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/index_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/index_asset.php deleted file mode 100644 index aea82348820d..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/index_asset.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $warehouseClient->indexAsset($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var IndexAssetResponse $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 = WarehouseClient::assetName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[ASSET]' - ); - - index_asset_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_IndexAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/ingest_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/ingest_asset.php deleted file mode 100644 index 33f1d07e7982..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/ingest_asset.php +++ /dev/null @@ -1,66 +0,0 @@ -ingestAsset(); - $stream->writeAll([$request,]); - - /** @var IngestAssetResponse $element */ - foreach ($stream->closeWriteAndReadAll() as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_Warehouse_IngestAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_annotations.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_annotations.php deleted file mode 100644 index b4d177fa07ae..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_annotations.php +++ /dev/null @@ -1,62 +0,0 @@ -listAnnotations($request); - - /** @var Annotation $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_Warehouse_ListAnnotations_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_assets.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_assets.php deleted file mode 100644 index 820c78d09514..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_assets.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $warehouseClient->listAssets($request); - - /** @var Asset $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 = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - - list_assets_sample($formattedParent); -} -// [END visionai_v1_generated_Warehouse_ListAssets_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_collections.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_collections.php deleted file mode 100644 index a3ccc98cd615..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_collections.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $warehouseClient->listCollections($request); - - /** @var Collection $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 = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - - list_collections_sample($formattedParent); -} -// [END visionai_v1_generated_Warehouse_ListCollections_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_corpora.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_corpora.php deleted file mode 100644 index 299dce544274..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_corpora.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($parent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $warehouseClient->listCorpora($request); - - /** @var Corpus $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $parent = '[PARENT]'; - - list_corpora_sample($parent); -} -// [END visionai_v1_generated_Warehouse_ListCorpora_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_data_schemas.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_data_schemas.php deleted file mode 100644 index 8542b6ad92d8..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_data_schemas.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $warehouseClient->listDataSchemas($request); - - /** @var DataSchema $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 = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - - list_data_schemas_sample($formattedParent); -} -// [END visionai_v1_generated_Warehouse_ListDataSchemas_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_index_endpoints.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_index_endpoints.php deleted file mode 100644 index 5df9a7324c8d..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_index_endpoints.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $warehouseClient->listIndexEndpoints($request); - - /** @var IndexEndpoint $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 = WarehouseClient::locationName('[PROJECT]', '[LOCATION]'); - - list_index_endpoints_sample($formattedParent); -} -// [END visionai_v1_generated_Warehouse_ListIndexEndpoints_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_indexes.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_indexes.php deleted file mode 100644 index 9edaeae47654..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_indexes.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $warehouseClient->listIndexes($request); - - /** @var Index $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedParent = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - - list_indexes_sample($formattedParent); -} -// [END visionai_v1_generated_Warehouse_ListIndexes_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_locations.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_locations.php deleted file mode 100644 index cbdd1c9b3f35..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_locations.php +++ /dev/null @@ -1,62 +0,0 @@ -listLocations($request); - - /** @var Location $element */ - foreach ($response as $element) { - printf('Element data: %s' . PHP_EOL, $element->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_Warehouse_ListLocations_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_search_configs.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_search_configs.php deleted file mode 100644 index 7915b0730877..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_search_configs.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $warehouseClient->listSearchConfigs($request); - - /** @var SearchConfig $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 = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - - list_search_configs_sample($formattedParent); -} -// [END visionai_v1_generated_Warehouse_ListSearchConfigs_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_search_hypernyms.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_search_hypernyms.php deleted file mode 100644 index 908b82001d0f..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/list_search_hypernyms.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $warehouseClient->listSearchHypernyms($request); - - /** @var SearchHypernym $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 = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - - list_search_hypernyms_sample($formattedParent); -} -// [END visionai_v1_generated_Warehouse_ListSearchHypernyms_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/remove_collection_item.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/remove_collection_item.php deleted file mode 100644 index 2726bfd4ef07..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/remove_collection_item.php +++ /dev/null @@ -1,92 +0,0 @@ -setCollection($formattedItemCollection) - ->setType($itemType) - ->setItemResource($itemItemResource); - $request = (new RemoveCollectionItemRequest()) - ->setItem($item); - - // Call the API and handle any network failures. - try { - /** @var RemoveCollectionItemResponse $response */ - $response = $warehouseClient->removeCollectionItem($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $formattedItemCollection = WarehouseClient::collectionName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[COLLECTION]' - ); - $itemType = Type::TYPE_UNSPECIFIED; - $itemItemResource = '[ITEM_RESOURCE]'; - - remove_collection_item_sample($formattedItemCollection, $itemType, $itemItemResource); -} -// [END visionai_v1_generated_Warehouse_RemoveCollectionItem_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/remove_index_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/remove_index_asset.php deleted file mode 100644 index b25427581cf5..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/remove_index_asset.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $warehouseClient->removeIndexAsset($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var RemoveIndexAssetResponse $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 = WarehouseClient::assetName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[ASSET]' - ); - - remove_index_asset_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_RemoveIndexAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/search_assets.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/search_assets.php deleted file mode 100644 index c82afae4bbb4..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/search_assets.php +++ /dev/null @@ -1,77 +0,0 @@ -setCorpus($formattedCorpus); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $warehouseClient->searchAssets($request); - - /** @var SearchResultItem $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 -{ - $formattedCorpus = WarehouseClient::corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - - search_assets_sample($formattedCorpus); -} -// [END visionai_v1_generated_Warehouse_SearchAssets_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/search_index_endpoint.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/search_index_endpoint.php deleted file mode 100644 index 0b63dad50a9a..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/search_index_endpoint.php +++ /dev/null @@ -1,82 +0,0 @@ -setIndexEndpoint($formattedIndexEndpoint); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $warehouseClient->searchIndexEndpoint($request); - - /** @var SearchResultItem $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 -{ - $formattedIndexEndpoint = WarehouseClient::indexEndpointName( - '[PROJECT]', - '[LOCATION]', - '[INDEX_ENDPOINT]' - ); - - search_index_endpoint_sample($formattedIndexEndpoint); -} -// [END visionai_v1_generated_Warehouse_SearchIndexEndpoint_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/undeploy_index.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/undeploy_index.php deleted file mode 100644 index c90e9fd3515d..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/undeploy_index.php +++ /dev/null @@ -1,89 +0,0 @@ -setIndexEndpoint($formattedIndexEndpoint); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $warehouseClient->undeployIndex($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var UndeployIndexResponse $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 -{ - $formattedIndexEndpoint = WarehouseClient::indexEndpointName( - '[PROJECT]', - '[LOCATION]', - '[INDEX_ENDPOINT]' - ); - - undeploy_index_sample($formattedIndexEndpoint); -} -// [END visionai_v1_generated_Warehouse_UndeployIndex_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_annotation.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_annotation.php deleted file mode 100644 index 0cd6615617d8..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_annotation.php +++ /dev/null @@ -1,59 +0,0 @@ -setAnnotation($annotation); - - // Call the API and handle any network failures. - try { - /** @var Annotation $response */ - $response = $warehouseClient->updateAnnotation($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_Warehouse_UpdateAnnotation_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_asset.php deleted file mode 100644 index 1b3a268048c8..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_asset.php +++ /dev/null @@ -1,59 +0,0 @@ -setAsset($asset); - - // Call the API and handle any network failures. - try { - /** @var Asset $response */ - $response = $warehouseClient->updateAsset($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_Warehouse_UpdateAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_collection.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_collection.php deleted file mode 100644 index 25d2e0530ea1..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_collection.php +++ /dev/null @@ -1,59 +0,0 @@ -setCollection($collection); - - // Call the API and handle any network failures. - try { - /** @var Collection $response */ - $response = $warehouseClient->updateCollection($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_Warehouse_UpdateCollection_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_corpus.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_corpus.php deleted file mode 100644 index 03026323d620..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_corpus.php +++ /dev/null @@ -1,73 +0,0 @@ -setDisplayName($corpusDisplayName); - $request = (new UpdateCorpusRequest()) - ->setCorpus($corpus); - - // Call the API and handle any network failures. - try { - /** @var Corpus $response */ - $response = $warehouseClient->updateCorpus($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $corpusDisplayName = '[DISPLAY_NAME]'; - - update_corpus_sample($corpusDisplayName); -} -// [END visionai_v1_generated_Warehouse_UpdateCorpus_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_data_schema.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_data_schema.php deleted file mode 100644 index 61c6cf3120ce..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_data_schema.php +++ /dev/null @@ -1,75 +0,0 @@ -setKey($dataSchemaKey); - $request = (new UpdateDataSchemaRequest()) - ->setDataSchema($dataSchema); - - // Call the API and handle any network failures. - try { - /** @var DataSchema $response */ - $response = $warehouseClient->updateDataSchema($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} - -/** - * Helper to execute the sample. - * - * This sample has been automatically generated and should be regarded as a code - * template only. It will require modifications to work: - * - It may require correct/in-range values for request initialization. - * - It may require specifying regional endpoints when creating the service client, - * please see the apiEndpoint client configuration option for more details. - */ -function callSample(): void -{ - $dataSchemaKey = '[KEY]'; - - update_data_schema_sample($dataSchemaKey); -} -// [END visionai_v1_generated_Warehouse_UpdateDataSchema_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_index.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_index.php deleted file mode 100644 index b945f64f5945..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_index.php +++ /dev/null @@ -1,76 +0,0 @@ -setIndex($index) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $warehouseClient->updateIndex($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var Index $result */ - $result = $response->getResult(); - printf('Operation successful with response data: %s' . PHP_EOL, $result->serializeToJsonString()); - } else { - /** @var Status $error */ - $error = $response->getError(); - printf('Operation failed with error data: %s' . PHP_EOL, $error->serializeToJsonString()); - } - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_Warehouse_UpdateIndex_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_index_endpoint.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_index_endpoint.php deleted file mode 100644 index 1bf57b9537b5..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_index_endpoint.php +++ /dev/null @@ -1,74 +0,0 @@ -setIndexEndpoint($indexEndpoint) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $warehouseClient->updateIndexEndpoint($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var IndexEndpoint $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 visionai_v1_generated_Warehouse_UpdateIndexEndpoint_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_search_config.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_search_config.php deleted file mode 100644 index f2c758ad1b9b..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_search_config.php +++ /dev/null @@ -1,72 +0,0 @@ -setSearchConfig($searchConfig); - - // Call the API and handle any network failures. - try { - /** @var SearchConfig $response */ - $response = $warehouseClient->updateSearchConfig($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_Warehouse_UpdateSearchConfig_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_search_hypernym.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_search_hypernym.php deleted file mode 100644 index 56efb5c6cbed..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/update_search_hypernym.php +++ /dev/null @@ -1,59 +0,0 @@ -setSearchHypernym($searchHypernym); - - // Call the API and handle any network failures. - try { - /** @var SearchHypernym $response */ - $response = $warehouseClient->updateSearchHypernym($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END visionai_v1_generated_Warehouse_UpdateSearchHypernym_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/upload_asset.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/upload_asset.php deleted file mode 100644 index 95d38353d345..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/upload_asset.php +++ /dev/null @@ -1,99 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var OperationResponse $response */ - $response = $warehouseClient->uploadAsset($request); - $response->pollUntilComplete(); - - if ($response->operationSucceeded()) { - /** @var UploadAssetResponse $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 = WarehouseClient::assetName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[ASSET]' - ); - - upload_asset_sample($formattedName); -} -// [END visionai_v1_generated_Warehouse_UploadAsset_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/view_collection_items.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/view_collection_items.php deleted file mode 100644 index ad210365825b..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/view_collection_items.php +++ /dev/null @@ -1,82 +0,0 @@ -setCollection($formattedCollection); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $warehouseClient->viewCollectionItems($request); - - /** @var CollectionItem $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 -{ - $formattedCollection = WarehouseClient::collectionName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[COLLECTION]' - ); - - view_collection_items_sample($formattedCollection); -} -// [END visionai_v1_generated_Warehouse_ViewCollectionItems_sync] diff --git a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/view_indexed_assets.php b/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/view_indexed_assets.php deleted file mode 100644 index 859d1ff27a7f..000000000000 --- a/owl-bot-staging/VisionAi/v1/samples/V1/WarehouseClient/view_indexed_assets.php +++ /dev/null @@ -1,83 +0,0 @@ -setIndex($formattedIndex); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $warehouseClient->viewIndexedAssets($request); - - /** @var IndexedAsset $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 -{ - $formattedIndex = WarehouseClient::indexName( - '[PROJECT_NUMBER]', - '[LOCATION]', - '[CORPUS]', - '[INDEX]' - ); - - view_indexed_assets_sample($formattedIndex); -} -// [END visionai_v1_generated_Warehouse_ViewIndexedAssets_sync] diff --git a/owl-bot-staging/VisionAi/v1/src/V1/Client/AppPlatformClient.php b/owl-bot-staging/VisionAi/v1/src/V1/Client/AppPlatformClient.php deleted file mode 100644 index 11347dd7b817..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/Client/AppPlatformClient.php +++ /dev/null @@ -1,1204 +0,0 @@ - addApplicationStreamInputAsync(AddApplicationStreamInputRequest $request, array $optionalArgs = []) - * @method PromiseInterface createApplicationAsync(CreateApplicationRequest $request, array $optionalArgs = []) - * @method PromiseInterface createApplicationInstancesAsync(CreateApplicationInstancesRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDraftAsync(CreateDraftRequest $request, array $optionalArgs = []) - * @method PromiseInterface createProcessorAsync(CreateProcessorRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteApplicationAsync(DeleteApplicationRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteApplicationInstancesAsync(DeleteApplicationInstancesRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDraftAsync(DeleteDraftRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteProcessorAsync(DeleteProcessorRequest $request, array $optionalArgs = []) - * @method PromiseInterface deployApplicationAsync(DeployApplicationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getApplicationAsync(GetApplicationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDraftAsync(GetDraftRequest $request, array $optionalArgs = []) - * @method PromiseInterface getInstanceAsync(GetInstanceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getProcessorAsync(GetProcessorRequest $request, array $optionalArgs = []) - * @method PromiseInterface listApplicationsAsync(ListApplicationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDraftsAsync(ListDraftsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listInstancesAsync(ListInstancesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPrebuiltProcessorsAsync(ListPrebuiltProcessorsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listProcessorsAsync(ListProcessorsRequest $request, array $optionalArgs = []) - * @method PromiseInterface removeApplicationStreamInputAsync(RemoveApplicationStreamInputRequest $request, array $optionalArgs = []) - * @method PromiseInterface undeployApplicationAsync(UndeployApplicationRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateApplicationAsync(UpdateApplicationRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateApplicationInstancesAsync(UpdateApplicationInstancesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateApplicationStreamInputAsync(UpdateApplicationStreamInputRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDraftAsync(UpdateDraftRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateProcessorAsync(UpdateProcessorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class AppPlatformClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.visionai.v1.AppPlatform'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'visionai.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'visionai.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/app_platform_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/app_platform_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/app_platform_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/app_platform_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a application - * resource. - * - * @param string $project - * @param string $location - * @param string $application - * - * @return string The formatted application resource. - */ - public static function applicationName(string $project, string $location, string $application): string - { - return self::getPathTemplate('application')->render([ - 'project' => $project, - 'location' => $location, - 'application' => $application, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a draft - * resource. - * - * @param string $project - * @param string $location - * @param string $application - * @param string $draft - * - * @return string The formatted draft resource. - */ - public static function draftName(string $project, string $location, string $application, string $draft): string - { - return self::getPathTemplate('draft')->render([ - 'project' => $project, - 'location' => $location, - 'application' => $application, - 'draft' => $draft, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a instance - * resource. - * - * @param string $project - * @param string $location - * @param string $application - * @param string $instance - * - * @return string The formatted instance resource. - */ - public static function instanceName(string $project, string $location, string $application, string $instance): string - { - return self::getPathTemplate('instance')->render([ - 'project' => $project, - 'location' => $location, - 'application' => $application, - '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 processor - * resource. - * - * @param string $project - * @param string $location - * @param string $processor - * - * @return string The formatted processor resource. - */ - public static function processorName(string $project, string $location, string $processor): string - { - return self::getPathTemplate('processor')->render([ - 'project' => $project, - 'location' => $location, - 'processor' => $processor, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a stream - * resource. - * - * @param string $project - * @param string $location - * @param string $cluster - * @param string $stream - * - * @return string The formatted stream resource. - */ - public static function streamName(string $project, string $location, string $cluster, string $stream): string - { - return self::getPathTemplate('stream')->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - 'stream' => $stream, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - application: projects/{project}/locations/{location}/applications/{application} - * - draft: projects/{project}/locations/{location}/applications/{application}/drafts/{draft} - * - instance: projects/{project}/locations/{location}/applications/{application}/instances/{instance} - * - location: projects/{project}/locations/{location} - * - processor: projects/{project}/locations/{location}/processors/{processor} - * - stream: projects/{project}/locations/{location}/clusters/{cluster}/streams/{stream} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'visionai.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\VisionAI\V1\AppPlatformClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new AppPlatformClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Adds target stream input to the Application. - * If the Application is deployed, the corresponding new Application instance - * will be created. If the stream has already been in the Application, the RPC - * will fail. - * - * The async variant is {@see AppPlatformClient::addApplicationStreamInputAsync()} - * . - * - * @example samples/V1/AppPlatformClient/add_application_stream_input.php - * - * @param AddApplicationStreamInputRequest $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 addApplicationStreamInput(AddApplicationStreamInputRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('AddApplicationStreamInput', $request, $callOptions)->wait(); - } - - /** - * Creates a new Application in a given project and location. - * - * The async variant is {@see AppPlatformClient::createApplicationAsync()} . - * - * @example samples/V1/AppPlatformClient/create_application.php - * - * @param CreateApplicationRequest $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 createApplication(CreateApplicationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateApplication', $request, $callOptions)->wait(); - } - - /** - * Adds target stream input to the Application. - * If the Application is deployed, the corresponding new Application instance - * will be created. If the stream has already been in the Application, the RPC - * will fail. - * - * The async variant is {@see AppPlatformClient::createApplicationInstancesAsync()} - * . - * - * @example samples/V1/AppPlatformClient/create_application_instances.php - * - * @param CreateApplicationInstancesRequest $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 createApplicationInstances(CreateApplicationInstancesRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateApplicationInstances', $request, $callOptions)->wait(); - } - - /** - * Creates a new Draft in a given project and location. - * - * The async variant is {@see AppPlatformClient::createDraftAsync()} . - * - * @example samples/V1/AppPlatformClient/create_draft.php - * - * @param CreateDraftRequest $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 createDraft(CreateDraftRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateDraft', $request, $callOptions)->wait(); - } - - /** - * Creates a new Processor in a given project and location. - * - * The async variant is {@see AppPlatformClient::createProcessorAsync()} . - * - * @example samples/V1/AppPlatformClient/create_processor.php - * - * @param CreateProcessorRequest $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 createProcessor(CreateProcessorRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateProcessor', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Application. - * - * The async variant is {@see AppPlatformClient::deleteApplicationAsync()} . - * - * @example samples/V1/AppPlatformClient/delete_application.php - * - * @param DeleteApplicationRequest $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 deleteApplication(DeleteApplicationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteApplication', $request, $callOptions)->wait(); - } - - /** - * Remove target stream input to the Application, if the Application is - * deployed, the corresponding instance based will be deleted. If the stream - * is not in the Application, the RPC will fail. - * - * The async variant is {@see AppPlatformClient::deleteApplicationInstancesAsync()} - * . - * - * @example samples/V1/AppPlatformClient/delete_application_instances.php - * - * @param DeleteApplicationInstancesRequest $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 deleteApplicationInstances(DeleteApplicationInstancesRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteApplicationInstances', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Draft. - * - * The async variant is {@see AppPlatformClient::deleteDraftAsync()} . - * - * @example samples/V1/AppPlatformClient/delete_draft.php - * - * @param DeleteDraftRequest $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 deleteDraft(DeleteDraftRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteDraft', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Processor. - * - * The async variant is {@see AppPlatformClient::deleteProcessorAsync()} . - * - * @example samples/V1/AppPlatformClient/delete_processor.php - * - * @param DeleteProcessorRequest $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 deleteProcessor(DeleteProcessorRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteProcessor', $request, $callOptions)->wait(); - } - - /** - * Deploys a single Application. - * - * The async variant is {@see AppPlatformClient::deployApplicationAsync()} . - * - * @example samples/V1/AppPlatformClient/deploy_application.php - * - * @param DeployApplicationRequest $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 deployApplication(DeployApplicationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeployApplication', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Application. - * - * The async variant is {@see AppPlatformClient::getApplicationAsync()} . - * - * @example samples/V1/AppPlatformClient/get_application.php - * - * @param GetApplicationRequest $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 Application - * - * @throws ApiException Thrown if the API call fails. - */ - public function getApplication(GetApplicationRequest $request, array $callOptions = []): Application - { - return $this->startApiCall('GetApplication', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Draft. - * - * The async variant is {@see AppPlatformClient::getDraftAsync()} . - * - * @example samples/V1/AppPlatformClient/get_draft.php - * - * @param GetDraftRequest $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 Draft - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDraft(GetDraftRequest $request, array $callOptions = []): Draft - { - return $this->startApiCall('GetDraft', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Instance. - * - * The async variant is {@see AppPlatformClient::getInstanceAsync()} . - * - * @example samples/V1/AppPlatformClient/get_instance.php - * - * @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(); - } - - /** - * Gets details of a single Processor. - * - * The async variant is {@see AppPlatformClient::getProcessorAsync()} . - * - * @example samples/V1/AppPlatformClient/get_processor.php - * - * @param GetProcessorRequest $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 Processor - * - * @throws ApiException Thrown if the API call fails. - */ - public function getProcessor(GetProcessorRequest $request, array $callOptions = []): Processor - { - return $this->startApiCall('GetProcessor', $request, $callOptions)->wait(); - } - - /** - * Lists Applications in a given project and location. - * - * The async variant is {@see AppPlatformClient::listApplicationsAsync()} . - * - * @example samples/V1/AppPlatformClient/list_applications.php - * - * @param ListApplicationsRequest $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 listApplications(ListApplicationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListApplications', $request, $callOptions); - } - - /** - * Lists Drafts in a given project and location. - * - * The async variant is {@see AppPlatformClient::listDraftsAsync()} . - * - * @example samples/V1/AppPlatformClient/list_drafts.php - * - * @param ListDraftsRequest $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 listDrafts(ListDraftsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDrafts', $request, $callOptions); - } - - /** - * Lists Instances in a given project and location. - * - * The async variant is {@see AppPlatformClient::listInstancesAsync()} . - * - * @example samples/V1/AppPlatformClient/list_instances.php - * - * @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 PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listInstances(ListInstancesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListInstances', $request, $callOptions); - } - - /** - * ListPrebuiltProcessors is a custom pass-through verb that Lists Prebuilt - * Processors. - * - * The async variant is {@see AppPlatformClient::listPrebuiltProcessorsAsync()} . - * - * @example samples/V1/AppPlatformClient/list_prebuilt_processors.php - * - * @param ListPrebuiltProcessorsRequest $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 ListPrebuiltProcessorsResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listPrebuiltProcessors(ListPrebuiltProcessorsRequest $request, array $callOptions = []): ListPrebuiltProcessorsResponse - { - return $this->startApiCall('ListPrebuiltProcessors', $request, $callOptions)->wait(); - } - - /** - * Lists Processors in a given project and location. - * - * The async variant is {@see AppPlatformClient::listProcessorsAsync()} . - * - * @example samples/V1/AppPlatformClient/list_processors.php - * - * @param ListProcessorsRequest $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 listProcessors(ListProcessorsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListProcessors', $request, $callOptions); - } - - /** - * Remove target stream input to the Application, if the Application is - * deployed, the corresponding instance based will be deleted. If the stream - * is not in the Application, the RPC will fail. - * - * The async variant is - * {@see AppPlatformClient::removeApplicationStreamInputAsync()} . - * - * @example samples/V1/AppPlatformClient/remove_application_stream_input.php - * - * @param RemoveApplicationStreamInputRequest $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 removeApplicationStreamInput(RemoveApplicationStreamInputRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RemoveApplicationStreamInput', $request, $callOptions)->wait(); - } - - /** - * Undeploys a single Application. - * - * The async variant is {@see AppPlatformClient::undeployApplicationAsync()} . - * - * @example samples/V1/AppPlatformClient/undeploy_application.php - * - * @param UndeployApplicationRequest $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 undeployApplication(UndeployApplicationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UndeployApplication', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single Application. - * - * The async variant is {@see AppPlatformClient::updateApplicationAsync()} . - * - * @example samples/V1/AppPlatformClient/update_application.php - * - * @param UpdateApplicationRequest $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 updateApplication(UpdateApplicationRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateApplication', $request, $callOptions)->wait(); - } - - /** - * Adds target stream input to the Application. - * If the Application is deployed, the corresponding new Application instance - * will be created. If the stream has already been in the Application, the RPC - * will fail. - * - * The async variant is {@see AppPlatformClient::updateApplicationInstancesAsync()} - * . - * - * @example samples/V1/AppPlatformClient/update_application_instances.php - * - * @param UpdateApplicationInstancesRequest $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 updateApplicationInstances(UpdateApplicationInstancesRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateApplicationInstances', $request, $callOptions)->wait(); - } - - /** - * Update target stream input to the Application, if the Application is - * deployed, the corresponding instance based will be deployed. For - * CreateOrUpdate behavior, set allow_missing to true. - * - * The async variant is - * {@see AppPlatformClient::updateApplicationStreamInputAsync()} . - * - * @example samples/V1/AppPlatformClient/update_application_stream_input.php - * - * @param UpdateApplicationStreamInputRequest $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 updateApplicationStreamInput(UpdateApplicationStreamInputRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateApplicationStreamInput', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single Draft. - * - * The async variant is {@see AppPlatformClient::updateDraftAsync()} . - * - * @example samples/V1/AppPlatformClient/update_draft.php - * - * @param UpdateDraftRequest $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 updateDraft(UpdateDraftRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateDraft', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single Processor. - * - * The async variant is {@see AppPlatformClient::updateProcessorAsync()} . - * - * @example samples/V1/AppPlatformClient/update_processor.php - * - * @param UpdateProcessorRequest $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 updateProcessor(UpdateProcessorRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateProcessor', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see AppPlatformClient::getLocationAsync()} . - * - * @example samples/V1/AppPlatformClient/get_location.php - * - * @param GetLocationRequest $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 Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see AppPlatformClient::listLocationsAsync()} . - * - * @example samples/V1/AppPlatformClient/list_locations.php - * - * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/Client/HealthCheckServiceClient.php b/owl-bot-staging/VisionAi/v1/src/V1/Client/HealthCheckServiceClient.php deleted file mode 100644 index 2d0542d1870f..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/Client/HealthCheckServiceClient.php +++ /dev/null @@ -1,314 +0,0 @@ - healthCheckAsync(HealthCheckRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class HealthCheckServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.visionai.v1.HealthCheckService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'visionai.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'visionai.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/health_check_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/health_check_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/health_check_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/health_check_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a cluster - * resource. - * - * @param string $project - * @param string $location - * @param string $cluster - * - * @return string The formatted cluster resource. - */ - public static function clusterName(string $project, string $location, string $cluster): string - { - return self::getPathTemplate('cluster')->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - cluster: projects/{project}/locations/{location}/clusters/{cluster} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'visionai.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\VisionAI\V1\HealthCheckServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new HealthCheckServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * HealthCheck method checks the health status of the cluster. - * - * The async variant is {@see HealthCheckServiceClient::healthCheckAsync()} . - * - * @example samples/V1/HealthCheckServiceClient/health_check.php - * - * @param HealthCheckRequest $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 HealthCheckResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function healthCheck(HealthCheckRequest $request, array $callOptions = []): HealthCheckResponse - { - return $this->startApiCall('HealthCheck', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see HealthCheckServiceClient::getLocationAsync()} . - * - * @example samples/V1/HealthCheckServiceClient/get_location.php - * - * @param GetLocationRequest $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 Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see HealthCheckServiceClient::listLocationsAsync()} . - * - * @example samples/V1/HealthCheckServiceClient/list_locations.php - * - * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/Client/LiveVideoAnalyticsClient.php b/owl-bot-staging/VisionAi/v1/src/V1/Client/LiveVideoAnalyticsClient.php deleted file mode 100644 index 7a73ff65995a..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/Client/LiveVideoAnalyticsClient.php +++ /dev/null @@ -1,933 +0,0 @@ - batchRunProcessAsync(BatchRunProcessRequest $request, array $optionalArgs = []) - * @method PromiseInterface createAnalysisAsync(CreateAnalysisRequest $request, array $optionalArgs = []) - * @method PromiseInterface createOperatorAsync(CreateOperatorRequest $request, array $optionalArgs = []) - * @method PromiseInterface createProcessAsync(CreateProcessRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAnalysisAsync(DeleteAnalysisRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteOperatorAsync(DeleteOperatorRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteProcessAsync(DeleteProcessRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAnalysisAsync(GetAnalysisRequest $request, array $optionalArgs = []) - * @method PromiseInterface getOperatorAsync(GetOperatorRequest $request, array $optionalArgs = []) - * @method PromiseInterface getProcessAsync(GetProcessRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAnalysesAsync(ListAnalysesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listOperatorsAsync(ListOperatorsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listProcessesAsync(ListProcessesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listPublicOperatorsAsync(ListPublicOperatorsRequest $request, array $optionalArgs = []) - * @method PromiseInterface resolveOperatorInfoAsync(ResolveOperatorInfoRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAnalysisAsync(UpdateAnalysisRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateOperatorAsync(UpdateOperatorRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateProcessAsync(UpdateProcessRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class LiveVideoAnalyticsClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.visionai.v1.LiveVideoAnalytics'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'visionai.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'visionai.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/live_video_analytics_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/live_video_analytics_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/live_video_analytics_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/live_video_analytics_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a analysis - * resource. - * - * @param string $project - * @param string $location - * @param string $cluster - * @param string $analysis - * - * @return string The formatted analysis resource. - */ - public static function analysisName(string $project, string $location, string $cluster, string $analysis): string - { - return self::getPathTemplate('analysis')->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - 'analysis' => $analysis, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a cluster - * resource. - * - * @param string $project - * @param string $location - * @param string $cluster - * - * @return string The formatted cluster resource. - */ - public static function clusterName(string $project, string $location, string $cluster): string - { - return self::getPathTemplate('cluster')->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - ]); - } - - /** - * 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 operator - * resource. - * - * @param string $project - * @param string $location - * @param string $operator - * - * @return string The formatted operator resource. - */ - public static function operatorName(string $project, string $location, string $operator): string - { - return self::getPathTemplate('operator')->render([ - 'project' => $project, - 'location' => $location, - 'operator' => $operator, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a process - * resource. - * - * @param string $project - * @param string $location - * @param string $cluster - * @param string $process - * - * @return string The formatted process resource. - */ - public static function processName(string $project, string $location, string $cluster, string $process): string - { - return self::getPathTemplate('process')->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - 'process' => $process, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - analysis: projects/{project}/locations/{location}/clusters/{cluster}/analyses/{analysis} - * - cluster: projects/{project}/locations/{location}/clusters/{cluster} - * - location: projects/{project}/locations/{location} - * - operator: projects/{project}/locations/{location}/operators/{operator} - * - process: projects/{project}/locations/{location}/clusters/{cluster}/processes/{process} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'visionai.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\VisionAI\V1\LiveVideoAnalyticsClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new LiveVideoAnalyticsClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Run all of the processes to "completion". Max time for each process is - * the LRO time limit. - * - * The async variant is {@see LiveVideoAnalyticsClient::batchRunProcessAsync()} . - * - * @example samples/V1/LiveVideoAnalyticsClient/batch_run_process.php - * - * @param BatchRunProcessRequest $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 batchRunProcess(BatchRunProcessRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('BatchRunProcess', $request, $callOptions)->wait(); - } - - /** - * Creates a new Analysis in a given project and location. - * - * The async variant is {@see LiveVideoAnalyticsClient::createAnalysisAsync()} . - * - * @example samples/V1/LiveVideoAnalyticsClient/create_analysis.php - * - * @param CreateAnalysisRequest $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 createAnalysis(CreateAnalysisRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateAnalysis', $request, $callOptions)->wait(); - } - - /** - * Creates a new Operator in a given project and location. - * - * The async variant is {@see LiveVideoAnalyticsClient::createOperatorAsync()} . - * - * @example samples/V1/LiveVideoAnalyticsClient/create_operator.php - * - * @param CreateOperatorRequest $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 createOperator(CreateOperatorRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateOperator', $request, $callOptions)->wait(); - } - - /** - * Creates a new Process in a given project and location. - * - * The async variant is {@see LiveVideoAnalyticsClient::createProcessAsync()} . - * - * @example samples/V1/LiveVideoAnalyticsClient/create_process.php - * - * @param CreateProcessRequest $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 createProcess(CreateProcessRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateProcess', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Analysis. - * - * The async variant is {@see LiveVideoAnalyticsClient::deleteAnalysisAsync()} . - * - * @example samples/V1/LiveVideoAnalyticsClient/delete_analysis.php - * - * @param DeleteAnalysisRequest $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 deleteAnalysis(DeleteAnalysisRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAnalysis', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Operator. - * - * The async variant is {@see LiveVideoAnalyticsClient::deleteOperatorAsync()} . - * - * @example samples/V1/LiveVideoAnalyticsClient/delete_operator.php - * - * @param DeleteOperatorRequest $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 deleteOperator(DeleteOperatorRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteOperator', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Process. - * - * The async variant is {@see LiveVideoAnalyticsClient::deleteProcessAsync()} . - * - * @example samples/V1/LiveVideoAnalyticsClient/delete_process.php - * - * @param DeleteProcessRequest $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 deleteProcess(DeleteProcessRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteProcess', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Analysis. - * - * The async variant is {@see LiveVideoAnalyticsClient::getAnalysisAsync()} . - * - * @example samples/V1/LiveVideoAnalyticsClient/get_analysis.php - * - * @param GetAnalysisRequest $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 Analysis - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAnalysis(GetAnalysisRequest $request, array $callOptions = []): Analysis - { - return $this->startApiCall('GetAnalysis', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Operator. - * - * The async variant is {@see LiveVideoAnalyticsClient::getOperatorAsync()} . - * - * @example samples/V1/LiveVideoAnalyticsClient/get_operator.php - * - * @param GetOperatorRequest $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 Operator - * - * @throws ApiException Thrown if the API call fails. - */ - public function getOperator(GetOperatorRequest $request, array $callOptions = []): Operator - { - return $this->startApiCall('GetOperator', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Process. - * - * The async variant is {@see LiveVideoAnalyticsClient::getProcessAsync()} . - * - * @example samples/V1/LiveVideoAnalyticsClient/get_process.php - * - * @param GetProcessRequest $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 Process - * - * @throws ApiException Thrown if the API call fails. - */ - public function getProcess(GetProcessRequest $request, array $callOptions = []): Process - { - return $this->startApiCall('GetProcess', $request, $callOptions)->wait(); - } - - /** - * Lists Analyses in a given project and location. - * - * The async variant is {@see LiveVideoAnalyticsClient::listAnalysesAsync()} . - * - * @example samples/V1/LiveVideoAnalyticsClient/list_analyses.php - * - * @param ListAnalysesRequest $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 listAnalyses(ListAnalysesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAnalyses', $request, $callOptions); - } - - /** - * Lists Operators in a given project and location. - * - * The async variant is {@see LiveVideoAnalyticsClient::listOperatorsAsync()} . - * - * @example samples/V1/LiveVideoAnalyticsClient/list_operators.php - * - * @param ListOperatorsRequest $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 listOperators(ListOperatorsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListOperators', $request, $callOptions); - } - - /** - * Lists Processes in a given project and location. - * - * The async variant is {@see LiveVideoAnalyticsClient::listProcessesAsync()} . - * - * @example samples/V1/LiveVideoAnalyticsClient/list_processes.php - * - * @param ListProcessesRequest $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 listProcesses(ListProcessesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListProcesses', $request, $callOptions); - } - - /** - * ListPublicOperators returns all the operators in public registry. - * - * The async variant is {@see LiveVideoAnalyticsClient::listPublicOperatorsAsync()} - * . - * - * @example samples/V1/LiveVideoAnalyticsClient/list_public_operators.php - * - * @param ListPublicOperatorsRequest $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 listPublicOperators(ListPublicOperatorsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListPublicOperators', $request, $callOptions); - } - - /** - * ResolveOperatorInfo returns the operator information based on the request. - * - * The async variant is {@see LiveVideoAnalyticsClient::resolveOperatorInfoAsync()} - * . - * - * @example samples/V1/LiveVideoAnalyticsClient/resolve_operator_info.php - * - * @param ResolveOperatorInfoRequest $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 ResolveOperatorInfoResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function resolveOperatorInfo(ResolveOperatorInfoRequest $request, array $callOptions = []): ResolveOperatorInfoResponse - { - return $this->startApiCall('ResolveOperatorInfo', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single Analysis. - * - * The async variant is {@see LiveVideoAnalyticsClient::updateAnalysisAsync()} . - * - * @example samples/V1/LiveVideoAnalyticsClient/update_analysis.php - * - * @param UpdateAnalysisRequest $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 updateAnalysis(UpdateAnalysisRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateAnalysis', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single Operator. - * - * The async variant is {@see LiveVideoAnalyticsClient::updateOperatorAsync()} . - * - * @example samples/V1/LiveVideoAnalyticsClient/update_operator.php - * - * @param UpdateOperatorRequest $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 updateOperator(UpdateOperatorRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateOperator', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single Process. - * - * The async variant is {@see LiveVideoAnalyticsClient::updateProcessAsync()} . - * - * @example samples/V1/LiveVideoAnalyticsClient/update_process.php - * - * @param UpdateProcessRequest $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 updateProcess(UpdateProcessRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateProcess', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see LiveVideoAnalyticsClient::getLocationAsync()} . - * - * @example samples/V1/LiveVideoAnalyticsClient/get_location.php - * - * @param GetLocationRequest $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 Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see LiveVideoAnalyticsClient::listLocationsAsync()} . - * - * @example samples/V1/LiveVideoAnalyticsClient/list_locations.php - * - * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/Client/StreamingServiceClient.php b/owl-bot-staging/VisionAi/v1/src/V1/Client/StreamingServiceClient.php deleted file mode 100644 index ac585968892b..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/Client/StreamingServiceClient.php +++ /dev/null @@ -1,436 +0,0 @@ - acquireLeaseAsync(AcquireLeaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface releaseLeaseAsync(ReleaseLeaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface renewLeaseAsync(RenewLeaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class StreamingServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.visionai.v1.StreamingService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'visionai.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'visionai.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/streaming_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/streaming_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/streaming_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/streaming_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a series - * resource. - * - * @param string $project - * @param string $location - * @param string $cluster - * @param string $series - * - * @return string The formatted series resource. - */ - public static function seriesName(string $project, string $location, string $cluster, string $series): string - { - return self::getPathTemplate('series')->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - 'series' => $series, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - series: projects/{project}/locations/{location}/clusters/{cluster}/series/{series} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'visionai.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\VisionAI\V1\StreamingServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new StreamingServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * AcquireLease acquires a lease. - * - * The async variant is {@see StreamingServiceClient::acquireLeaseAsync()} . - * - * @example samples/V1/StreamingServiceClient/acquire_lease.php - * - * @param AcquireLeaseRequest $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 Lease - * - * @throws ApiException Thrown if the API call fails. - */ - public function acquireLease(AcquireLeaseRequest $request, array $callOptions = []): Lease - { - return $this->startApiCall('AcquireLease', $request, $callOptions)->wait(); - } - - /** - * Receive events given the stream name. - * - * @example samples/V1/StreamingServiceClient/receive_events.php - * - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return BidiStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function receiveEvents(array $callOptions = []): BidiStream - { - return $this->startApiCall('ReceiveEvents', null, $callOptions); - } - - /** - * Receive packets from the series. - * - * @example samples/V1/StreamingServiceClient/receive_packets.php - * - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return BidiStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function receivePackets(array $callOptions = []): BidiStream - { - return $this->startApiCall('ReceivePackets', null, $callOptions); - } - - /** - * RleaseLease releases a lease. - * - * The async variant is {@see StreamingServiceClient::releaseLeaseAsync()} . - * - * @example samples/V1/StreamingServiceClient/release_lease.php - * - * @param ReleaseLeaseRequest $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 ReleaseLeaseResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function releaseLease(ReleaseLeaseRequest $request, array $callOptions = []): ReleaseLeaseResponse - { - return $this->startApiCall('ReleaseLease', $request, $callOptions)->wait(); - } - - /** - * RenewLease renews a lease. - * - * The async variant is {@see StreamingServiceClient::renewLeaseAsync()} . - * - * @example samples/V1/StreamingServiceClient/renew_lease.php - * - * @param RenewLeaseRequest $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 Lease - * - * @throws ApiException Thrown if the API call fails. - */ - public function renewLease(RenewLeaseRequest $request, array $callOptions = []): Lease - { - return $this->startApiCall('RenewLease', $request, $callOptions)->wait(); - } - - /** - * Send packets to the series. - * - * @example samples/V1/StreamingServiceClient/send_packets.php - * - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return BidiStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function sendPackets(array $callOptions = []): BidiStream - { - return $this->startApiCall('SendPackets', null, $callOptions); - } - - /** - * Gets information about a location. - * - * The async variant is {@see StreamingServiceClient::getLocationAsync()} . - * - * @example samples/V1/StreamingServiceClient/get_location.php - * - * @param GetLocationRequest $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 Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see StreamingServiceClient::listLocationsAsync()} . - * - * @example samples/V1/StreamingServiceClient/list_locations.php - * - * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/Client/StreamsServiceClient.php b/owl-bot-staging/VisionAi/v1/src/V1/Client/StreamsServiceClient.php deleted file mode 100644 index a4c045cc89c8..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/Client/StreamsServiceClient.php +++ /dev/null @@ -1,1099 +0,0 @@ - createClusterAsync(CreateClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface createEventAsync(CreateEventRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSeriesAsync(CreateSeriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface createStreamAsync(CreateStreamRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteClusterAsync(DeleteClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteEventAsync(DeleteEventRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSeriesAsync(DeleteSeriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteStreamAsync(DeleteStreamRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateStreamHlsTokenAsync(GenerateStreamHlsTokenRequest $request, array $optionalArgs = []) - * @method PromiseInterface getClusterAsync(GetClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface getEventAsync(GetEventRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSeriesAsync(GetSeriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface getStreamAsync(GetStreamRequest $request, array $optionalArgs = []) - * @method PromiseInterface getStreamThumbnailAsync(GetStreamThumbnailRequest $request, array $optionalArgs = []) - * @method PromiseInterface listClustersAsync(ListClustersRequest $request, array $optionalArgs = []) - * @method PromiseInterface listEventsAsync(ListEventsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSeriesAsync(ListSeriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listStreamsAsync(ListStreamsRequest $request, array $optionalArgs = []) - * @method PromiseInterface materializeChannelAsync(MaterializeChannelRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateClusterAsync(UpdateClusterRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateEventAsync(UpdateEventRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSeriesAsync(UpdateSeriesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateStreamAsync(UpdateStreamRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class StreamsServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.visionai.v1.StreamsService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'visionai.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'visionai.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/streams_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/streams_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/streams_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/streams_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a channel - * resource. - * - * @param string $project - * @param string $location - * @param string $cluster - * @param string $channel - * - * @return string The formatted channel resource. - */ - public static function channelName(string $project, string $location, string $cluster, string $channel): string - { - return self::getPathTemplate('channel')->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - 'channel' => $channel, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a cluster - * resource. - * - * @param string $project - * @param string $location - * @param string $cluster - * - * @return string The formatted cluster resource. - */ - public static function clusterName(string $project, string $location, string $cluster): string - { - return self::getPathTemplate('cluster')->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a event - * resource. - * - * @param string $project - * @param string $location - * @param string $cluster - * @param string $event - * - * @return string The formatted event resource. - */ - public static function eventName(string $project, string $location, string $cluster, string $event): string - { - return self::getPathTemplate('event')->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - 'event' => $event, - ]); - } - - /** - * 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 series - * resource. - * - * @param string $project - * @param string $location - * @param string $cluster - * @param string $series - * - * @return string The formatted series resource. - */ - public static function seriesName(string $project, string $location, string $cluster, string $series): string - { - return self::getPathTemplate('series')->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - 'series' => $series, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a stream - * resource. - * - * @param string $project - * @param string $location - * @param string $cluster - * @param string $stream - * - * @return string The formatted stream resource. - */ - public static function streamName(string $project, string $location, string $cluster, string $stream): string - { - return self::getPathTemplate('stream')->render([ - 'project' => $project, - 'location' => $location, - 'cluster' => $cluster, - 'stream' => $stream, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - channel: projects/{project}/locations/{location}/clusters/{cluster}/channels/{channel} - * - cluster: projects/{project}/locations/{location}/clusters/{cluster} - * - event: projects/{project}/locations/{location}/clusters/{cluster}/events/{event} - * - location: projects/{project}/locations/{location} - * - series: projects/{project}/locations/{location}/clusters/{cluster}/series/{series} - * - stream: projects/{project}/locations/{location}/clusters/{cluster}/streams/{stream} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'visionai.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\VisionAI\V1\StreamsServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new StreamsServiceClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Creates a new Cluster in a given project and location. - * - * The async variant is {@see StreamsServiceClient::createClusterAsync()} . - * - * @example samples/V1/StreamsServiceClient/create_cluster.php - * - * @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(); - } - - /** - * Creates a new Event in a given project and location. - * - * The async variant is {@see StreamsServiceClient::createEventAsync()} . - * - * @example samples/V1/StreamsServiceClient/create_event.php - * - * @param CreateEventRequest $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 createEvent(CreateEventRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateEvent', $request, $callOptions)->wait(); - } - - /** - * Creates a new Series in a given project and location. - * - * The async variant is {@see StreamsServiceClient::createSeriesAsync()} . - * - * @example samples/V1/StreamsServiceClient/create_series.php - * - * @param CreateSeriesRequest $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 createSeries(CreateSeriesRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateSeries', $request, $callOptions)->wait(); - } - - /** - * Creates a new Stream in a given project and location. - * - * The async variant is {@see StreamsServiceClient::createStreamAsync()} . - * - * @example samples/V1/StreamsServiceClient/create_stream.php - * - * @param CreateStreamRequest $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 createStream(CreateStreamRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateStream', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Cluster. - * - * The async variant is {@see StreamsServiceClient::deleteClusterAsync()} . - * - * @example samples/V1/StreamsServiceClient/delete_cluster.php - * - * @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. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteCluster(DeleteClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteCluster', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Event. - * - * The async variant is {@see StreamsServiceClient::deleteEventAsync()} . - * - * @example samples/V1/StreamsServiceClient/delete_event.php - * - * @param DeleteEventRequest $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 deleteEvent(DeleteEventRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteEvent', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Series. - * - * The async variant is {@see StreamsServiceClient::deleteSeriesAsync()} . - * - * @example samples/V1/StreamsServiceClient/delete_series.php - * - * @param DeleteSeriesRequest $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 deleteSeries(DeleteSeriesRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteSeries', $request, $callOptions)->wait(); - } - - /** - * Deletes a single Stream. - * - * The async variant is {@see StreamsServiceClient::deleteStreamAsync()} . - * - * @example samples/V1/StreamsServiceClient/delete_stream.php - * - * @param DeleteStreamRequest $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 deleteStream(DeleteStreamRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteStream', $request, $callOptions)->wait(); - } - - /** - * Generate the JWT auth token required to get the stream HLS contents. - * - * The async variant is {@see StreamsServiceClient::generateStreamHlsTokenAsync()} - * . - * - * @example samples/V1/StreamsServiceClient/generate_stream_hls_token.php - * - * @param GenerateStreamHlsTokenRequest $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 GenerateStreamHlsTokenResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateStreamHlsToken(GenerateStreamHlsTokenRequest $request, array $callOptions = []): GenerateStreamHlsTokenResponse - { - return $this->startApiCall('GenerateStreamHlsToken', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Cluster. - * - * The async variant is {@see StreamsServiceClient::getClusterAsync()} . - * - * @example samples/V1/StreamsServiceClient/get_cluster.php - * - * @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 details of a single Event. - * - * The async variant is {@see StreamsServiceClient::getEventAsync()} . - * - * @example samples/V1/StreamsServiceClient/get_event.php - * - * @param GetEventRequest $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 Event - * - * @throws ApiException Thrown if the API call fails. - */ - public function getEvent(GetEventRequest $request, array $callOptions = []): Event - { - return $this->startApiCall('GetEvent', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Series. - * - * The async variant is {@see StreamsServiceClient::getSeriesAsync()} . - * - * @example samples/V1/StreamsServiceClient/get_series.php - * - * @param GetSeriesRequest $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 Series - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSeries(GetSeriesRequest $request, array $callOptions = []): Series - { - return $this->startApiCall('GetSeries', $request, $callOptions)->wait(); - } - - /** - * Gets details of a single Stream. - * - * The async variant is {@see StreamsServiceClient::getStreamAsync()} . - * - * @example samples/V1/StreamsServiceClient/get_stream.php - * - * @param GetStreamRequest $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 Stream - * - * @throws ApiException Thrown if the API call fails. - */ - public function getStream(GetStreamRequest $request, array $callOptions = []): Stream - { - return $this->startApiCall('GetStream', $request, $callOptions)->wait(); - } - - /** - * Gets the thumbnail (image snapshot) of a single Stream. - * - * The async variant is {@see StreamsServiceClient::getStreamThumbnailAsync()} . - * - * @example samples/V1/StreamsServiceClient/get_stream_thumbnail.php - * - * @param GetStreamThumbnailRequest $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 getStreamThumbnail(GetStreamThumbnailRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('GetStreamThumbnail', $request, $callOptions)->wait(); - } - - /** - * Lists Clusters in a given project and location. - * - * The async variant is {@see StreamsServiceClient::listClustersAsync()} . - * - * @example samples/V1/StreamsServiceClient/list_clusters.php - * - * @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 PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listClusters(ListClustersRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListClusters', $request, $callOptions); - } - - /** - * Lists Events in a given project and location. - * - * The async variant is {@see StreamsServiceClient::listEventsAsync()} . - * - * @example samples/V1/StreamsServiceClient/list_events.php - * - * @param ListEventsRequest $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 listEvents(ListEventsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListEvents', $request, $callOptions); - } - - /** - * Lists Series in a given project and location. - * - * The async variant is {@see StreamsServiceClient::listSeriesAsync()} . - * - * @example samples/V1/StreamsServiceClient/list_series.php - * - * @param ListSeriesRequest $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 listSeries(ListSeriesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSeries', $request, $callOptions); - } - - /** - * Lists Streams in a given project and location. - * - * The async variant is {@see StreamsServiceClient::listStreamsAsync()} . - * - * @example samples/V1/StreamsServiceClient/list_streams.php - * - * @param ListStreamsRequest $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 listStreams(ListStreamsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListStreams', $request, $callOptions); - } - - /** - * Materialize a channel. - * - * The async variant is {@see StreamsServiceClient::materializeChannelAsync()} . - * - * @example samples/V1/StreamsServiceClient/materialize_channel.php - * - * @param MaterializeChannelRequest $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 materializeChannel(MaterializeChannelRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('MaterializeChannel', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single Cluster. - * - * The async variant is {@see StreamsServiceClient::updateClusterAsync()} . - * - * @example samples/V1/StreamsServiceClient/update_cluster.php - * - * @param UpdateClusterRequest $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(UpdateClusterRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateCluster', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single Event. - * - * The async variant is {@see StreamsServiceClient::updateEventAsync()} . - * - * @example samples/V1/StreamsServiceClient/update_event.php - * - * @param UpdateEventRequest $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 updateEvent(UpdateEventRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateEvent', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single Event. - * - * The async variant is {@see StreamsServiceClient::updateSeriesAsync()} . - * - * @example samples/V1/StreamsServiceClient/update_series.php - * - * @param UpdateSeriesRequest $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 updateSeries(UpdateSeriesRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateSeries', $request, $callOptions)->wait(); - } - - /** - * Updates the parameters of a single Stream. - * - * The async variant is {@see StreamsServiceClient::updateStreamAsync()} . - * - * @example samples/V1/StreamsServiceClient/update_stream.php - * - * @param UpdateStreamRequest $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 updateStream(UpdateStreamRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateStream', $request, $callOptions)->wait(); - } - - /** - * Gets information about a location. - * - * The async variant is {@see StreamsServiceClient::getLocationAsync()} . - * - * @example samples/V1/StreamsServiceClient/get_location.php - * - * @param GetLocationRequest $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 Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see StreamsServiceClient::listLocationsAsync()} . - * - * @example samples/V1/StreamsServiceClient/list_locations.php - * - * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/Client/WarehouseClient.php b/owl-bot-staging/VisionAi/v1/src/V1/Client/WarehouseClient.php deleted file mode 100644 index 4000dfb3f499..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/Client/WarehouseClient.php +++ /dev/null @@ -1,2361 +0,0 @@ - addCollectionItemAsync(AddCollectionItemRequest $request, array $optionalArgs = []) - * @method PromiseInterface analyzeAssetAsync(AnalyzeAssetRequest $request, array $optionalArgs = []) - * @method PromiseInterface analyzeCorpusAsync(AnalyzeCorpusRequest $request, array $optionalArgs = []) - * @method PromiseInterface clipAssetAsync(ClipAssetRequest $request, array $optionalArgs = []) - * @method PromiseInterface createAnnotationAsync(CreateAnnotationRequest $request, array $optionalArgs = []) - * @method PromiseInterface createAssetAsync(CreateAssetRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCollectionAsync(CreateCollectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCorpusAsync(CreateCorpusRequest $request, array $optionalArgs = []) - * @method PromiseInterface createDataSchemaAsync(CreateDataSchemaRequest $request, array $optionalArgs = []) - * @method PromiseInterface createIndexAsync(CreateIndexRequest $request, array $optionalArgs = []) - * @method PromiseInterface createIndexEndpointAsync(CreateIndexEndpointRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSearchConfigAsync(CreateSearchConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSearchHypernymAsync(CreateSearchHypernymRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAnnotationAsync(DeleteAnnotationRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteAssetAsync(DeleteAssetRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCollectionAsync(DeleteCollectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteCorpusAsync(DeleteCorpusRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteDataSchemaAsync(DeleteDataSchemaRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteIndexAsync(DeleteIndexRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteIndexEndpointAsync(DeleteIndexEndpointRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSearchConfigAsync(DeleteSearchConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSearchHypernymAsync(DeleteSearchHypernymRequest $request, array $optionalArgs = []) - * @method PromiseInterface deployIndexAsync(DeployIndexRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateHlsUriAsync(GenerateHlsUriRequest $request, array $optionalArgs = []) - * @method PromiseInterface generateRetrievalUrlAsync(GenerateRetrievalUrlRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAnnotationAsync(GetAnnotationRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAssetAsync(GetAssetRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCollectionAsync(GetCollectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCorpusAsync(GetCorpusRequest $request, array $optionalArgs = []) - * @method PromiseInterface getDataSchemaAsync(GetDataSchemaRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIndexAsync(GetIndexRequest $request, array $optionalArgs = []) - * @method PromiseInterface getIndexEndpointAsync(GetIndexEndpointRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSearchConfigAsync(GetSearchConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSearchHypernymAsync(GetSearchHypernymRequest $request, array $optionalArgs = []) - * @method PromiseInterface importAssetsAsync(ImportAssetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface indexAssetAsync(IndexAssetRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAnnotationsAsync(ListAnnotationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAssetsAsync(ListAssetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCollectionsAsync(ListCollectionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCorporaAsync(ListCorporaRequest $request, array $optionalArgs = []) - * @method PromiseInterface listDataSchemasAsync(ListDataSchemasRequest $request, array $optionalArgs = []) - * @method PromiseInterface listIndexEndpointsAsync(ListIndexEndpointsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listIndexesAsync(ListIndexesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSearchConfigsAsync(ListSearchConfigsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSearchHypernymsAsync(ListSearchHypernymsRequest $request, array $optionalArgs = []) - * @method PromiseInterface removeCollectionItemAsync(RemoveCollectionItemRequest $request, array $optionalArgs = []) - * @method PromiseInterface removeIndexAssetAsync(RemoveIndexAssetRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchAssetsAsync(SearchAssetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchIndexEndpointAsync(SearchIndexEndpointRequest $request, array $optionalArgs = []) - * @method PromiseInterface undeployIndexAsync(UndeployIndexRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAnnotationAsync(UpdateAnnotationRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateAssetAsync(UpdateAssetRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCollectionAsync(UpdateCollectionRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCorpusAsync(UpdateCorpusRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateDataSchemaAsync(UpdateDataSchemaRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateIndexAsync(UpdateIndexRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateIndexEndpointAsync(UpdateIndexEndpointRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSearchConfigAsync(UpdateSearchConfigRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSearchHypernymAsync(UpdateSearchHypernymRequest $request, array $optionalArgs = []) - * @method PromiseInterface uploadAssetAsync(UploadAssetRequest $request, array $optionalArgs = []) - * @method PromiseInterface viewCollectionItemsAsync(ViewCollectionItemsRequest $request, array $optionalArgs = []) - * @method PromiseInterface viewIndexedAssetsAsync(ViewIndexedAssetsRequest $request, array $optionalArgs = []) - * @method PromiseInterface getLocationAsync(GetLocationRequest $request, array $optionalArgs = []) - * @method PromiseInterface listLocationsAsync(ListLocationsRequest $request, array $optionalArgs = []) - */ -final class WarehouseClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.visionai.v1.Warehouse'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'warehouse-visionai.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'warehouse-visionai.UNIVERSE_DOMAIN'; - - /** The default port of the service. */ - private const DEFAULT_SERVICE_PORT = 443; - - /** The name of the code generator, to be included in the agent header. */ - private const CODEGEN_NAME = 'gapic'; - - /** The default scopes required by the service. */ - public static $serviceScopes = [ - 'https://www.googleapis.com/auth/cloud-platform', - ]; - - private $operationsClient; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/warehouse_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/warehouse_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/warehouse_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/warehouse_rest_client_config.php', - ], - ], - ]; - } - - /** - * Return an OperationsClient object with the same endpoint as $this. - * - * @return OperationsClient - */ - public function getOperationsClient() - { - return $this->operationsClient; - } - - /** - * Resume an existing long running operation that was previously started by a long - * running API method. If $methodName is not provided, or does not match a long - * running API method, then the operation can still be resumed, but the - * OperationResponse object will not deserialize the final response. - * - * @param string $operationName The name of the long running operation - * @param string $methodName The name of the method used to start the operation - * - * @return OperationResponse - */ - public function resumeOperation($operationName, $methodName = null) - { - $options = $this->descriptors[$methodName]['longRunning'] ?? []; - $operation = new OperationResponse($operationName, $this->getOperationsClient(), $options); - $operation->reload(); - return $operation; - } - - /** - * Create the default operation client for the service. - * - * @param array $options ClientOptions for the client. - * - * @return OperationsClient - */ - private function createOperationsClient(array $options) - { - // Unset client-specific configuration options - unset($options['serviceName'], $options['clientConfig'], $options['descriptorsConfigPath']); - - if (isset($options['operationsClient'])) { - return $options['operationsClient']; - } - - return new OperationsClient($options); - } - - /** - * Formats a string containing the fully-qualified path to represent a annotation - * resource. - * - * @param string $projectNumber - * @param string $location - * @param string $corpus - * @param string $asset - * @param string $annotation - * - * @return string The formatted annotation resource. - */ - public static function annotationName(string $projectNumber, string $location, string $corpus, string $asset, string $annotation): string - { - return self::getPathTemplate('annotation')->render([ - 'project_number' => $projectNumber, - 'location' => $location, - 'corpus' => $corpus, - 'asset' => $asset, - 'annotation' => $annotation, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a asset - * resource. - * - * @param string $projectNumber - * @param string $location - * @param string $corpus - * @param string $asset - * - * @return string The formatted asset resource. - */ - public static function assetName(string $projectNumber, string $location, string $corpus, string $asset): string - { - return self::getPathTemplate('asset')->render([ - 'project_number' => $projectNumber, - 'location' => $location, - 'corpus' => $corpus, - 'asset' => $asset, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a collection - * resource. - * - * @param string $projectNumber - * @param string $location - * @param string $corpus - * @param string $collection - * - * @return string The formatted collection resource. - */ - public static function collectionName(string $projectNumber, string $location, string $corpus, string $collection): string - { - return self::getPathTemplate('collection')->render([ - 'project_number' => $projectNumber, - 'location' => $location, - 'corpus' => $corpus, - 'collection' => $collection, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a corpus - * resource. - * - * @param string $projectNumber - * @param string $location - * @param string $corpus - * - * @return string The formatted corpus resource. - */ - public static function corpusName(string $projectNumber, string $location, string $corpus): string - { - return self::getPathTemplate('corpus')->render([ - 'project_number' => $projectNumber, - 'location' => $location, - 'corpus' => $corpus, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a data_schema - * resource. - * - * @param string $projectNumber - * @param string $location - * @param string $corpus - * @param string $dataSchema - * - * @return string The formatted data_schema resource. - */ - public static function dataSchemaName(string $projectNumber, string $location, string $corpus, string $dataSchema): string - { - return self::getPathTemplate('dataSchema')->render([ - 'project_number' => $projectNumber, - 'location' => $location, - 'corpus' => $corpus, - 'data_schema' => $dataSchema, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a index - * resource. - * - * @param string $projectNumber - * @param string $location - * @param string $corpus - * @param string $index - * - * @return string The formatted index resource. - */ - public static function indexName(string $projectNumber, string $location, string $corpus, string $index): string - { - return self::getPathTemplate('index')->render([ - 'project_number' => $projectNumber, - 'location' => $location, - 'corpus' => $corpus, - 'index' => $index, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * index_endpoint resource. - * - * @param string $project - * @param string $location - * @param string $indexEndpoint - * - * @return string The formatted index_endpoint resource. - */ - public static function indexEndpointName(string $project, string $location, string $indexEndpoint): string - { - return self::getPathTemplate('indexEndpoint')->render([ - 'project' => $project, - 'location' => $location, - 'index_endpoint' => $indexEndpoint, - ]); - } - - /** - * 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 - * search_config resource. - * - * @param string $projectNumber - * @param string $location - * @param string $corpus - * @param string $searchConfig - * - * @return string The formatted search_config resource. - */ - public static function searchConfigName(string $projectNumber, string $location, string $corpus, string $searchConfig): string - { - return self::getPathTemplate('searchConfig')->render([ - 'project_number' => $projectNumber, - 'location' => $location, - 'corpus' => $corpus, - 'search_config' => $searchConfig, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * search_hypernym resource. - * - * @param string $projectNumber - * @param string $location - * @param string $corpus - * @param string $searchHypernym - * - * @return string The formatted search_hypernym resource. - */ - public static function searchHypernymName(string $projectNumber, string $location, string $corpus, string $searchHypernym): string - { - return self::getPathTemplate('searchHypernym')->render([ - 'project_number' => $projectNumber, - 'location' => $location, - 'corpus' => $corpus, - 'search_hypernym' => $searchHypernym, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - annotation: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation} - * - asset: projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset} - * - collection: projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection} - * - corpus: projects/{project_number}/locations/{location}/corpora/{corpus} - * - dataSchema: projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema} - * - index: projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index} - * - indexEndpoint: projects/{project}/locations/{location}/indexEndpoints/{index_endpoint} - * - location: projects/{project}/locations/{location} - * - searchConfig: projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config} - * - searchHypernym: projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym} - * - * The optional $template argument can be supplied to specify a particular pattern, - * and must match one of the templates listed above. If no $template argument is - * provided, or if the $template argument does not match one of the templates - * listed, then parseName will check each of the supported templates, and return - * the first match. - * - * @param string $formattedName The formatted name string - * @param ?string $template Optional name of template to match - * - * @return array An associative array from name component IDs to component values. - * - * @throws ValidationException If $formattedName could not be matched. - */ - public static function parseName(string $formattedName, ?string $template = null): array - { - return self::parseFormattedName($formattedName, $template); - } - - /** - * Constructor. - * - * @param array|ClientOptions $options { - * Optional. Options for configuring the service API wrapper. - * - * @type string $apiEndpoint - * The address of the API remote host. May optionally include the port, formatted - * as ":". Default 'warehouse-visionai.googleapis.com:443'. - * @type FetchAuthTokenInterface|CredentialsWrapper $credentials - * This option should only be used with a pre-constructed - * {@see FetchAuthTokenInterface} or {@see CredentialsWrapper} object. Note that - * when one of these objects are provided, any settings in $credentialsConfig will - * be ignored. - * **Important**: If you are providing a path to a credentials file, or a decoded - * credentials file as a PHP array, this usage is now DEPRECATED. Providing an - * unvalidated credential configuration to Google APIs can compromise the security - * of your systems and data. It is recommended to create the credentials explicitly - * ``` - * use Google\Auth\Credentials\ServiceAccountCredentials; - * use Google\Cloud\VisionAI\V1\WarehouseClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new WarehouseClient(['credentials' => $creds]); - * ``` - * {@see - * https://cloud.google.com/docs/authentication/external/externally-sourced-credentials} - * @type array $credentialsConfig - * Options used to configure credentials, including auth token caching, for the - * client. For a full list of supporting configuration options, see - * {@see \Google\ApiCore\CredentialsWrapper::build()} . - * @type bool $disableRetries - * Determines whether or not retries defined by the client configuration should be - * disabled. Defaults to `false`. - * @type string|array $clientConfig - * Client method configuration, including retry settings. This option can be either - * a path to a JSON file, or a PHP array containing the decoded JSON data. By - * default this settings points to the default client config file, which is - * provided in the resources folder. - * @type string|TransportInterface $transport - * The transport used for executing network requests. May be either the string - * `rest` or `grpc`. Defaults to `grpc` if gRPC support is detected on the system. - * *Advanced usage*: Additionally, it is possible to pass in an already - * instantiated {@see \Google\ApiCore\Transport\TransportInterface} object. Note - * that when this object is provided, any settings in $transportConfig, and any - * $apiEndpoint setting, will be ignored. - * @type array $transportConfig - * Configuration options that will be used to construct the transport. Options for - * each supported transport type should be passed in a key for that transport. For - * example: - * $transportConfig = [ - * 'grpc' => [...], - * 'rest' => [...], - * ]; - * See the {@see \Google\ApiCore\Transport\GrpcTransport::build()} and - * {@see \Google\ApiCore\Transport\RestTransport::build()} methods for the - * supported options. - * @type callable $clientCertSource - * A callable which returns the client cert as a string. This can be used to - * provide a certificate and private key to the transport layer for mTLS. - * @type false|LoggerInterface $logger - * A PSR-3 compliant logger. If set to false, logging is disabled, ignoring the - * 'GOOGLE_SDK_PHP_LOGGING' environment flag - * @type string $universeDomain - * The service domain for the client. Defaults to 'googleapis.com'. - * } - * - * @throws ValidationException - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($clientOptions); - $this->operationsClient = $this->createOperationsClient($clientOptions); - } - - /** Handles execution of the async variants for each documented method. */ - public function __call($method, $args) - { - if (substr($method, -5) !== 'Async') { - trigger_error('Call to undefined method ' . __CLASS__ . "::$method()", E_USER_ERROR); - } - - array_unshift($args, substr($method, 0, -5)); - return call_user_func_array([$this, 'startAsyncCall'], $args); - } - - /** - * Adds an item into a Collection. - * - * The async variant is {@see WarehouseClient::addCollectionItemAsync()} . - * - * @example samples/V1/WarehouseClient/add_collection_item.php - * - * @param AddCollectionItemRequest $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 AddCollectionItemResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function addCollectionItem(AddCollectionItemRequest $request, array $callOptions = []): AddCollectionItemResponse - { - return $this->startApiCall('AddCollectionItem', $request, $callOptions)->wait(); - } - - /** - * Analyze asset to power search capability. - * - * The async variant is {@see WarehouseClient::analyzeAssetAsync()} . - * - * @example samples/V1/WarehouseClient/analyze_asset.php - * - * @param AnalyzeAssetRequest $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 analyzeAsset(AnalyzeAssetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('AnalyzeAsset', $request, $callOptions)->wait(); - } - - /** - * Analyzes a corpus. - * - * The async variant is {@see WarehouseClient::analyzeCorpusAsync()} . - * - * @example samples/V1/WarehouseClient/analyze_corpus.php - * - * @param AnalyzeCorpusRequest $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 analyzeCorpus(AnalyzeCorpusRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('AnalyzeCorpus', $request, $callOptions)->wait(); - } - - /** - * Supported by STREAM_VIDEO corpus type. - * Generates clips for downloading. The api takes in a time range, and - * generates a clip of the first content available after start_time and - * before end_time, which may overflow beyond these bounds. - * Returned clips are truncated if the total size of the clips are larger - * than 100MB. - * - * The async variant is {@see WarehouseClient::clipAssetAsync()} . - * - * @example samples/V1/WarehouseClient/clip_asset.php - * - * @param ClipAssetRequest $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 ClipAssetResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function clipAsset(ClipAssetRequest $request, array $callOptions = []): ClipAssetResponse - { - return $this->startApiCall('ClipAsset', $request, $callOptions)->wait(); - } - - /** - * Creates annotation inside asset. - * - * The async variant is {@see WarehouseClient::createAnnotationAsync()} . - * - * @example samples/V1/WarehouseClient/create_annotation.php - * - * @param CreateAnnotationRequest $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 Annotation - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAnnotation(CreateAnnotationRequest $request, array $callOptions = []): Annotation - { - return $this->startApiCall('CreateAnnotation', $request, $callOptions)->wait(); - } - - /** - * Creates an asset inside corpus. - * - * The async variant is {@see WarehouseClient::createAssetAsync()} . - * - * @example samples/V1/WarehouseClient/create_asset.php - * - * @param CreateAssetRequest $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 Asset - * - * @throws ApiException Thrown if the API call fails. - */ - public function createAsset(CreateAssetRequest $request, array $callOptions = []): Asset - { - return $this->startApiCall('CreateAsset', $request, $callOptions)->wait(); - } - - /** - * Creates a collection. - * - * The async variant is {@see WarehouseClient::createCollectionAsync()} . - * - * @example samples/V1/WarehouseClient/create_collection.php - * - * @param CreateCollectionRequest $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 createCollection(CreateCollectionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCollection', $request, $callOptions)->wait(); - } - - /** - * Creates a corpus inside a project. - * - * The async variant is {@see WarehouseClient::createCorpusAsync()} . - * - * @example samples/V1/WarehouseClient/create_corpus.php - * - * @param CreateCorpusRequest $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 createCorpus(CreateCorpusRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateCorpus', $request, $callOptions)->wait(); - } - - /** - * Creates data schema inside corpus. - * - * The async variant is {@see WarehouseClient::createDataSchemaAsync()} . - * - * @example samples/V1/WarehouseClient/create_data_schema.php - * - * @param CreateDataSchemaRequest $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 DataSchema - * - * @throws ApiException Thrown if the API call fails. - */ - public function createDataSchema(CreateDataSchemaRequest $request, array $callOptions = []): DataSchema - { - return $this->startApiCall('CreateDataSchema', $request, $callOptions)->wait(); - } - - /** - * Creates an Index under the corpus. - * - * The async variant is {@see WarehouseClient::createIndexAsync()} . - * - * @example samples/V1/WarehouseClient/create_index.php - * - * @param CreateIndexRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function createIndex(CreateIndexRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateIndex', $request, $callOptions)->wait(); - } - - /** - * Creates an IndexEndpoint. - * - * The async variant is {@see WarehouseClient::createIndexEndpointAsync()} . - * - * @example samples/V1/WarehouseClient/create_index_endpoint.php - * - * @param CreateIndexEndpointRequest $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 createIndexEndpoint(CreateIndexEndpointRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('CreateIndexEndpoint', $request, $callOptions)->wait(); - } - - /** - * Creates a search configuration inside a corpus. - * - * Please follow the rules below to create a valid CreateSearchConfigRequest. - * --- General Rules --- - * 1. Request.search_config_id must not be associated with an existing - * SearchConfig. - * 2. Request must contain at least one non-empty search_criteria_property or - * facet_property. - * 3. mapped_fields must not be empty, and must map to existing UGA keys. - * 4. All mapped_fields must be of the same type. - * 5. All mapped_fields must share the same granularity. - * 6. All mapped_fields must share the same semantic SearchConfig match - * options. - * For property-specific rules, please reference the comments for - * FacetProperty and SearchCriteriaProperty. - * - * The async variant is {@see WarehouseClient::createSearchConfigAsync()} . - * - * @example samples/V1/WarehouseClient/create_search_config.php - * - * @param CreateSearchConfigRequest $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 SearchConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSearchConfig(CreateSearchConfigRequest $request, array $callOptions = []): SearchConfig - { - return $this->startApiCall('CreateSearchConfig', $request, $callOptions)->wait(); - } - - /** - * Creates a SearchHypernym inside a corpus. - * - * The async variant is {@see WarehouseClient::createSearchHypernymAsync()} . - * - * @example samples/V1/WarehouseClient/create_search_hypernym.php - * - * @param CreateSearchHypernymRequest $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 SearchHypernym - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSearchHypernym(CreateSearchHypernymRequest $request, array $callOptions = []): SearchHypernym - { - return $this->startApiCall('CreateSearchHypernym', $request, $callOptions)->wait(); - } - - /** - * Deletes annotation inside asset. - * - * The async variant is {@see WarehouseClient::deleteAnnotationAsync()} . - * - * @example samples/V1/WarehouseClient/delete_annotation.php - * - * @param DeleteAnnotationRequest $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 deleteAnnotation(DeleteAnnotationRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteAnnotation', $request, $callOptions)->wait(); - } - - /** - * Deletes asset inside corpus. - * - * The async variant is {@see WarehouseClient::deleteAssetAsync()} . - * - * @example samples/V1/WarehouseClient/delete_asset.php - * - * @param DeleteAssetRequest $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 deleteAsset(DeleteAssetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteAsset', $request, $callOptions)->wait(); - } - - /** - * Deletes a collection. - * - * The async variant is {@see WarehouseClient::deleteCollectionAsync()} . - * - * @example samples/V1/WarehouseClient/delete_collection.php - * - * @param DeleteCollectionRequest $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 deleteCollection(DeleteCollectionRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteCollection', $request, $callOptions)->wait(); - } - - /** - * Deletes a corpus only if its empty. - * Returns empty response. - * - * The async variant is {@see WarehouseClient::deleteCorpusAsync()} . - * - * @example samples/V1/WarehouseClient/delete_corpus.php - * - * @param DeleteCorpusRequest $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 deleteCorpus(DeleteCorpusRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteCorpus', $request, $callOptions)->wait(); - } - - /** - * Deletes data schema inside corpus. - * - * The async variant is {@see WarehouseClient::deleteDataSchemaAsync()} . - * - * @example samples/V1/WarehouseClient/delete_data_schema.php - * - * @param DeleteDataSchemaRequest $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 deleteDataSchema(DeleteDataSchemaRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteDataSchema', $request, $callOptions)->wait(); - } - - /** - * Delete a single Index. In order to delete an index, the caller must - * make sure that it is not deployed to any index endpoint. - * - * The async variant is {@see WarehouseClient::deleteIndexAsync()} . - * - * @example samples/V1/WarehouseClient/delete_index.php - * - * @param DeleteIndexRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return OperationResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteIndex(DeleteIndexRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteIndex', $request, $callOptions)->wait(); - } - - /** - * Deletes an IndexEndpoint. - * - * The async variant is {@see WarehouseClient::deleteIndexEndpointAsync()} . - * - * @example samples/V1/WarehouseClient/delete_index_endpoint.php - * - * @param DeleteIndexEndpointRequest $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 deleteIndexEndpoint(DeleteIndexEndpointRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeleteIndexEndpoint', $request, $callOptions)->wait(); - } - - /** - * Deletes a search configuration inside a corpus. - * - * For a DeleteSearchConfigRequest to be valid, - * Request.search_configuration.name must already exist. - * - * The async variant is {@see WarehouseClient::deleteSearchConfigAsync()} . - * - * @example samples/V1/WarehouseClient/delete_search_config.php - * - * @param DeleteSearchConfigRequest $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 deleteSearchConfig(DeleteSearchConfigRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteSearchConfig', $request, $callOptions)->wait(); - } - - /** - * Deletes a SearchHypernym inside a corpus. - * - * The async variant is {@see WarehouseClient::deleteSearchHypernymAsync()} . - * - * @example samples/V1/WarehouseClient/delete_search_hypernym.php - * - * @param DeleteSearchHypernymRequest $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 deleteSearchHypernym(DeleteSearchHypernymRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteSearchHypernym', $request, $callOptions)->wait(); - } - - /** - * Deploys an Index to IndexEndpoint. - * - * The async variant is {@see WarehouseClient::deployIndexAsync()} . - * - * @example samples/V1/WarehouseClient/deploy_index.php - * - * @param DeployIndexRequest $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 deployIndex(DeployIndexRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('DeployIndex', $request, $callOptions)->wait(); - } - - /** - * Generates a uri for an HLS manifest. The api takes in a collection of time - * ranges, and generates a URI for an HLS manifest that covers all the - * requested time ranges. - * - * The async variant is {@see WarehouseClient::generateHlsUriAsync()} . - * - * @example samples/V1/WarehouseClient/generate_hls_uri.php - * - * @param GenerateHlsUriRequest $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 GenerateHlsUriResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateHlsUri(GenerateHlsUriRequest $request, array $callOptions = []): GenerateHlsUriResponse - { - return $this->startApiCall('GenerateHlsUri', $request, $callOptions)->wait(); - } - - /** - * Generates a signed url for downloading the asset. - * For video warehouse, please see comment of UploadAsset about how to allow - * retrieval of cloud storage files in a different project. - * - * The async variant is {@see WarehouseClient::generateRetrievalUrlAsync()} . - * - * @example samples/V1/WarehouseClient/generate_retrieval_url.php - * - * @param GenerateRetrievalUrlRequest $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 GenerateRetrievalUrlResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function generateRetrievalUrl(GenerateRetrievalUrlRequest $request, array $callOptions = []): GenerateRetrievalUrlResponse - { - return $this->startApiCall('GenerateRetrievalUrl', $request, $callOptions)->wait(); - } - - /** - * Reads annotation inside asset. - * - * The async variant is {@see WarehouseClient::getAnnotationAsync()} . - * - * @example samples/V1/WarehouseClient/get_annotation.php - * - * @param GetAnnotationRequest $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 Annotation - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAnnotation(GetAnnotationRequest $request, array $callOptions = []): Annotation - { - return $this->startApiCall('GetAnnotation', $request, $callOptions)->wait(); - } - - /** - * Reads an asset inside corpus. - * - * The async variant is {@see WarehouseClient::getAssetAsync()} . - * - * @example samples/V1/WarehouseClient/get_asset.php - * - * @param GetAssetRequest $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 Asset - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAsset(GetAssetRequest $request, array $callOptions = []): Asset - { - return $this->startApiCall('GetAsset', $request, $callOptions)->wait(); - } - - /** - * Gets a collection. - * - * The async variant is {@see WarehouseClient::getCollectionAsync()} . - * - * @example samples/V1/WarehouseClient/get_collection.php - * - * @param GetCollectionRequest $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 Collection - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCollection(GetCollectionRequest $request, array $callOptions = []): Collection - { - return $this->startApiCall('GetCollection', $request, $callOptions)->wait(); - } - - /** - * Gets corpus details inside a project. - * - * The async variant is {@see WarehouseClient::getCorpusAsync()} . - * - * @example samples/V1/WarehouseClient/get_corpus.php - * - * @param GetCorpusRequest $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 Corpus - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCorpus(GetCorpusRequest $request, array $callOptions = []): Corpus - { - return $this->startApiCall('GetCorpus', $request, $callOptions)->wait(); - } - - /** - * Gets data schema inside corpus. - * - * The async variant is {@see WarehouseClient::getDataSchemaAsync()} . - * - * @example samples/V1/WarehouseClient/get_data_schema.php - * - * @param GetDataSchemaRequest $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 DataSchema - * - * @throws ApiException Thrown if the API call fails. - */ - public function getDataSchema(GetDataSchemaRequest $request, array $callOptions = []): DataSchema - { - return $this->startApiCall('GetDataSchema', $request, $callOptions)->wait(); - } - - /** - * Gets the details of a single Index under a Corpus. - * - * The async variant is {@see WarehouseClient::getIndexAsync()} . - * - * @example samples/V1/WarehouseClient/get_index.php - * - * @param GetIndexRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Index - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIndex(GetIndexRequest $request, array $callOptions = []): Index - { - return $this->startApiCall('GetIndex', $request, $callOptions)->wait(); - } - - /** - * Gets an IndexEndpoint. - * - * The async variant is {@see WarehouseClient::getIndexEndpointAsync()} . - * - * @example samples/V1/WarehouseClient/get_index_endpoint.php - * - * @param GetIndexEndpointRequest $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 IndexEndpoint - * - * @throws ApiException Thrown if the API call fails. - */ - public function getIndexEndpoint(GetIndexEndpointRequest $request, array $callOptions = []): IndexEndpoint - { - return $this->startApiCall('GetIndexEndpoint', $request, $callOptions)->wait(); - } - - /** - * Gets a search configuration inside a corpus. - * - * The async variant is {@see WarehouseClient::getSearchConfigAsync()} . - * - * @example samples/V1/WarehouseClient/get_search_config.php - * - * @param GetSearchConfigRequest $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 SearchConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSearchConfig(GetSearchConfigRequest $request, array $callOptions = []): SearchConfig - { - return $this->startApiCall('GetSearchConfig', $request, $callOptions)->wait(); - } - - /** - * Gets a SearchHypernym inside a corpus. - * - * The async variant is {@see WarehouseClient::getSearchHypernymAsync()} . - * - * @example samples/V1/WarehouseClient/get_search_hypernym.php - * - * @param GetSearchHypernymRequest $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 SearchHypernym - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSearchHypernym(GetSearchHypernymRequest $request, array $callOptions = []): SearchHypernym - { - return $this->startApiCall('GetSearchHypernym', $request, $callOptions)->wait(); - } - - /** - * Imports assets (images plus annotations) from a meta file on cloud storage. - * Each row in the meta file is corresponding to an image (specified by a - * cloud storage uri) and its annotations. - * - * The async variant is {@see WarehouseClient::importAssetsAsync()} . - * - * @example samples/V1/WarehouseClient/import_assets.php - * - * @param ImportAssetsRequest $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 importAssets(ImportAssetsRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('ImportAssets', $request, $callOptions)->wait(); - } - - /** - * Index one asset for search. - * Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND - * - * The async variant is {@see WarehouseClient::indexAssetAsync()} . - * - * @example samples/V1/WarehouseClient/index_asset.php - * - * @param IndexAssetRequest $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 indexAsset(IndexAssetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('IndexAsset', $request, $callOptions)->wait(); - } - - /** - * Ingests data for the asset. It is not allowed to ingest a data chunk which - * is already expired according to TTL. - * This method is only available via the gRPC API (not HTTP since - * bi-directional streaming is not supported via HTTP). - * - * @example samples/V1/WarehouseClient/ingest_asset.php - * - * @param array $callOptions { - * Optional. - * - * @type int $timeoutMillis - * Timeout to use for this call. - * } - * - * @return BidiStream - * - * @throws ApiException Thrown if the API call fails. - */ - public function ingestAsset(array $callOptions = []): BidiStream - { - return $this->startApiCall('IngestAsset', null, $callOptions); - } - - /** - * Lists a list of annotations inside asset. - * - * The async variant is {@see WarehouseClient::listAnnotationsAsync()} . - * - * @example samples/V1/WarehouseClient/list_annotations.php - * - * @param ListAnnotationsRequest $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 listAnnotations(ListAnnotationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAnnotations', $request, $callOptions); - } - - /** - * Lists an list of assets inside corpus. - * - * The async variant is {@see WarehouseClient::listAssetsAsync()} . - * - * @example samples/V1/WarehouseClient/list_assets.php - * - * @param ListAssetsRequest $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 listAssets(ListAssetsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAssets', $request, $callOptions); - } - - /** - * Lists collections inside a corpus. - * - * The async variant is {@see WarehouseClient::listCollectionsAsync()} . - * - * @example samples/V1/WarehouseClient/list_collections.php - * - * @param ListCollectionsRequest $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 listCollections(ListCollectionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCollections', $request, $callOptions); - } - - /** - * Lists all corpora in a project. - * - * The async variant is {@see WarehouseClient::listCorporaAsync()} . - * - * @example samples/V1/WarehouseClient/list_corpora.php - * - * @param ListCorporaRequest $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 listCorpora(ListCorporaRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCorpora', $request, $callOptions); - } - - /** - * Lists a list of data schemas inside corpus. - * - * The async variant is {@see WarehouseClient::listDataSchemasAsync()} . - * - * @example samples/V1/WarehouseClient/list_data_schemas.php - * - * @param ListDataSchemasRequest $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 listDataSchemas(ListDataSchemasRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListDataSchemas', $request, $callOptions); - } - - /** - * Lists all IndexEndpoints in a project. - * - * The async variant is {@see WarehouseClient::listIndexEndpointsAsync()} . - * - * @example samples/V1/WarehouseClient/list_index_endpoints.php - * - * @param ListIndexEndpointsRequest $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 listIndexEndpoints(ListIndexEndpointsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListIndexEndpoints', $request, $callOptions); - } - - /** - * List all Indexes in a given Corpus. - * - * The async variant is {@see WarehouseClient::listIndexesAsync()} . - * - * @example samples/V1/WarehouseClient/list_indexes.php - * - * @param ListIndexesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return PagedListResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function listIndexes(ListIndexesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListIndexes', $request, $callOptions); - } - - /** - * Lists all search configurations inside a corpus. - * - * The async variant is {@see WarehouseClient::listSearchConfigsAsync()} . - * - * @example samples/V1/WarehouseClient/list_search_configs.php - * - * @param ListSearchConfigsRequest $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 listSearchConfigs(ListSearchConfigsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSearchConfigs', $request, $callOptions); - } - - /** - * Lists SearchHypernyms inside a corpus. - * - * The async variant is {@see WarehouseClient::listSearchHypernymsAsync()} . - * - * @example samples/V1/WarehouseClient/list_search_hypernyms.php - * - * @param ListSearchHypernymsRequest $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 listSearchHypernyms(ListSearchHypernymsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSearchHypernyms', $request, $callOptions); - } - - /** - * Removes an item from a collection. - * - * The async variant is {@see WarehouseClient::removeCollectionItemAsync()} . - * - * @example samples/V1/WarehouseClient/remove_collection_item.php - * - * @param RemoveCollectionItemRequest $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 RemoveCollectionItemResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function removeCollectionItem(RemoveCollectionItemRequest $request, array $callOptions = []): RemoveCollectionItemResponse - { - return $this->startApiCall('RemoveCollectionItem', $request, $callOptions)->wait(); - } - - /** - * Remove one asset's index data for search. - * Supported corpus type: Corpus.Type.VIDEO_ON_DEMAND - * - * The async variant is {@see WarehouseClient::removeIndexAssetAsync()} . - * - * @example samples/V1/WarehouseClient/remove_index_asset.php - * - * @param RemoveIndexAssetRequest $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 removeIndexAsset(RemoveIndexAssetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('RemoveIndexAsset', $request, $callOptions)->wait(); - } - - /** - * Search media asset. - * - * The async variant is {@see WarehouseClient::searchAssetsAsync()} . - * - * @example samples/V1/WarehouseClient/search_assets.php - * - * @param SearchAssetsRequest $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 searchAssets(SearchAssetsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchAssets', $request, $callOptions); - } - - /** - * Search a deployed index endpoint (IMAGE corpus type only). - * - * The async variant is {@see WarehouseClient::searchIndexEndpointAsync()} . - * - * @example samples/V1/WarehouseClient/search_index_endpoint.php - * - * @param SearchIndexEndpointRequest $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 searchIndexEndpoint(SearchIndexEndpointRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchIndexEndpoint', $request, $callOptions); - } - - /** - * Undeploys an Index from IndexEndpoint. - * - * The async variant is {@see WarehouseClient::undeployIndexAsync()} . - * - * @example samples/V1/WarehouseClient/undeploy_index.php - * - * @param UndeployIndexRequest $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 undeployIndex(UndeployIndexRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UndeployIndex', $request, $callOptions)->wait(); - } - - /** - * Updates annotation inside asset. - * - * The async variant is {@see WarehouseClient::updateAnnotationAsync()} . - * - * @example samples/V1/WarehouseClient/update_annotation.php - * - * @param UpdateAnnotationRequest $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 Annotation - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAnnotation(UpdateAnnotationRequest $request, array $callOptions = []): Annotation - { - return $this->startApiCall('UpdateAnnotation', $request, $callOptions)->wait(); - } - - /** - * Updates an asset inside corpus. - * - * The async variant is {@see WarehouseClient::updateAssetAsync()} . - * - * @example samples/V1/WarehouseClient/update_asset.php - * - * @param UpdateAssetRequest $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 Asset - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateAsset(UpdateAssetRequest $request, array $callOptions = []): Asset - { - return $this->startApiCall('UpdateAsset', $request, $callOptions)->wait(); - } - - /** - * Updates a collection. - * - * The async variant is {@see WarehouseClient::updateCollectionAsync()} . - * - * @example samples/V1/WarehouseClient/update_collection.php - * - * @param UpdateCollectionRequest $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 Collection - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateCollection(UpdateCollectionRequest $request, array $callOptions = []): Collection - { - return $this->startApiCall('UpdateCollection', $request, $callOptions)->wait(); - } - - /** - * Updates a corpus in a project. - * - * The async variant is {@see WarehouseClient::updateCorpusAsync()} . - * - * @example samples/V1/WarehouseClient/update_corpus.php - * - * @param UpdateCorpusRequest $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 Corpus - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateCorpus(UpdateCorpusRequest $request, array $callOptions = []): Corpus - { - return $this->startApiCall('UpdateCorpus', $request, $callOptions)->wait(); - } - - /** - * Updates data schema inside corpus. - * - * The async variant is {@see WarehouseClient::updateDataSchemaAsync()} . - * - * @example samples/V1/WarehouseClient/update_data_schema.php - * - * @param UpdateDataSchemaRequest $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 DataSchema - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateDataSchema(UpdateDataSchemaRequest $request, array $callOptions = []): DataSchema - { - return $this->startApiCall('UpdateDataSchema', $request, $callOptions)->wait(); - } - - /** - * Updates an Index under the corpus. - * Users can perform a metadata-only update or trigger a full index rebuild - * with different update_mask values. - * - * The async variant is {@see WarehouseClient::updateIndexAsync()} . - * - * @example samples/V1/WarehouseClient/update_index.php - * - * @param UpdateIndexRequest $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 updateIndex(UpdateIndexRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateIndex', $request, $callOptions)->wait(); - } - - /** - * Updates an IndexEndpoint. - * - * The async variant is {@see WarehouseClient::updateIndexEndpointAsync()} . - * - * @example samples/V1/WarehouseClient/update_index_endpoint.php - * - * @param UpdateIndexEndpointRequest $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 updateIndexEndpoint(UpdateIndexEndpointRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UpdateIndexEndpoint', $request, $callOptions)->wait(); - } - - /** - * Updates a search configuration inside a corpus. - * - * Please follow the rules below to create a valid UpdateSearchConfigRequest. - * --- General Rules --- - * 1. Request.search_configuration.name must already exist. - * 2. Request must contain at least one non-empty search_criteria_property or - * facet_property. - * 3. mapped_fields must not be empty, and must map to existing UGA keys. - * 4. All mapped_fields must be of the same type. - * 5. All mapped_fields must share the same granularity. - * 6. All mapped_fields must share the same semantic SearchConfig match - * options. - * For property-specific rules, please reference the comments for - * FacetProperty and SearchCriteriaProperty. - * - * The async variant is {@see WarehouseClient::updateSearchConfigAsync()} . - * - * @example samples/V1/WarehouseClient/update_search_config.php - * - * @param UpdateSearchConfigRequest $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 SearchConfig - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSearchConfig(UpdateSearchConfigRequest $request, array $callOptions = []): SearchConfig - { - return $this->startApiCall('UpdateSearchConfig', $request, $callOptions)->wait(); - } - - /** - * Updates a SearchHypernym inside a corpus. - * - * The async variant is {@see WarehouseClient::updateSearchHypernymAsync()} . - * - * @example samples/V1/WarehouseClient/update_search_hypernym.php - * - * @param UpdateSearchHypernymRequest $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 SearchHypernym - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSearchHypernym(UpdateSearchHypernymRequest $request, array $callOptions = []): SearchHypernym - { - return $this->startApiCall('UpdateSearchHypernym', $request, $callOptions)->wait(); - } - - /** - * Upload asset by specifing the asset Cloud Storage uri. - * For video warehouse, it requires users who call this API have read access - * to the cloud storage file. Once it is uploaded, it can be retrieved by - * GenerateRetrievalUrl API which by default, only can retrieve cloud storage - * files from the same project of the warehouse. To allow retrieval cloud - * storage files that are in a separate project, it requires to find the - * vision ai service account (Go to IAM, check checkbox to show "Include - * Google-provided role grants", search for "Cloud Vision AI Service Agent") - * and grant the read access of the cloud storage files to that service - * account. - * - * The async variant is {@see WarehouseClient::uploadAssetAsync()} . - * - * @example samples/V1/WarehouseClient/upload_asset.php - * - * @param UploadAssetRequest $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 uploadAsset(UploadAssetRequest $request, array $callOptions = []): OperationResponse - { - return $this->startApiCall('UploadAsset', $request, $callOptions)->wait(); - } - - /** - * View items inside a collection. - * - * The async variant is {@see WarehouseClient::viewCollectionItemsAsync()} . - * - * @example samples/V1/WarehouseClient/view_collection_items.php - * - * @param ViewCollectionItemsRequest $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 viewCollectionItems(ViewCollectionItemsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ViewCollectionItems', $request, $callOptions); - } - - /** - * Lists assets inside an index. - * - * The async variant is {@see WarehouseClient::viewIndexedAssetsAsync()} . - * - * @example samples/V1/WarehouseClient/view_indexed_assets.php - * - * @param ViewIndexedAssetsRequest $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 viewIndexedAssets(ViewIndexedAssetsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ViewIndexedAssets', $request, $callOptions); - } - - /** - * Gets information about a location. - * - * The async variant is {@see WarehouseClient::getLocationAsync()} . - * - * @example samples/V1/WarehouseClient/get_location.php - * - * @param GetLocationRequest $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 Location - * - * @throws ApiException Thrown if the API call fails. - */ - public function getLocation(GetLocationRequest $request, array $callOptions = []): Location - { - return $this->startApiCall('GetLocation', $request, $callOptions)->wait(); - } - - /** - * Lists information about the supported locations for this service. - * - * The async variant is {@see WarehouseClient::listLocationsAsync()} . - * - * @example samples/V1/WarehouseClient/list_locations.php - * - * @param ListLocationsRequest $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 listLocations(ListLocationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListLocations', $request, $callOptions); - } -} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/gapic_metadata.json b/owl-bot-staging/VisionAi/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 71820dca81da..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,808 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.visionai.v1", - "libraryPackage": "Google\\Cloud\\VisionAI\\V1", - "services": { - "LiveVideoAnalytics": { - "clients": { - "grpc": { - "libraryClient": "LiveVideoAnalyticsGapicClient", - "rpcs": { - "BatchRunProcess": { - "methods": [ - "batchRunProcess" - ] - }, - "CreateAnalysis": { - "methods": [ - "createAnalysis" - ] - }, - "CreateOperator": { - "methods": [ - "createOperator" - ] - }, - "CreateProcess": { - "methods": [ - "createProcess" - ] - }, - "DeleteAnalysis": { - "methods": [ - "deleteAnalysis" - ] - }, - "DeleteOperator": { - "methods": [ - "deleteOperator" - ] - }, - "DeleteProcess": { - "methods": [ - "deleteProcess" - ] - }, - "GetAnalysis": { - "methods": [ - "getAnalysis" - ] - }, - "GetOperator": { - "methods": [ - "getOperator" - ] - }, - "GetProcess": { - "methods": [ - "getProcess" - ] - }, - "ListAnalyses": { - "methods": [ - "listAnalyses" - ] - }, - "ListOperators": { - "methods": [ - "listOperators" - ] - }, - "ListProcesses": { - "methods": [ - "listProcesses" - ] - }, - "ListPublicOperators": { - "methods": [ - "listPublicOperators" - ] - }, - "ResolveOperatorInfo": { - "methods": [ - "resolveOperatorInfo" - ] - }, - "UpdateAnalysis": { - "methods": [ - "updateAnalysis" - ] - }, - "UpdateOperator": { - "methods": [ - "updateOperator" - ] - }, - "UpdateProcess": { - "methods": [ - "updateProcess" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "AppPlatform": { - "clients": { - "grpc": { - "libraryClient": "AppPlatformGapicClient", - "rpcs": { - "AddApplicationStreamInput": { - "methods": [ - "addApplicationStreamInput" - ] - }, - "CreateApplication": { - "methods": [ - "createApplication" - ] - }, - "CreateApplicationInstances": { - "methods": [ - "createApplicationInstances" - ] - }, - "CreateDraft": { - "methods": [ - "createDraft" - ] - }, - "CreateProcessor": { - "methods": [ - "createProcessor" - ] - }, - "DeleteApplication": { - "methods": [ - "deleteApplication" - ] - }, - "DeleteApplicationInstances": { - "methods": [ - "deleteApplicationInstances" - ] - }, - "DeleteDraft": { - "methods": [ - "deleteDraft" - ] - }, - "DeleteProcessor": { - "methods": [ - "deleteProcessor" - ] - }, - "DeployApplication": { - "methods": [ - "deployApplication" - ] - }, - "GetApplication": { - "methods": [ - "getApplication" - ] - }, - "GetDraft": { - "methods": [ - "getDraft" - ] - }, - "GetInstance": { - "methods": [ - "getInstance" - ] - }, - "GetProcessor": { - "methods": [ - "getProcessor" - ] - }, - "ListApplications": { - "methods": [ - "listApplications" - ] - }, - "ListDrafts": { - "methods": [ - "listDrafts" - ] - }, - "ListInstances": { - "methods": [ - "listInstances" - ] - }, - "ListPrebuiltProcessors": { - "methods": [ - "listPrebuiltProcessors" - ] - }, - "ListProcessors": { - "methods": [ - "listProcessors" - ] - }, - "RemoveApplicationStreamInput": { - "methods": [ - "removeApplicationStreamInput" - ] - }, - "UndeployApplication": { - "methods": [ - "undeployApplication" - ] - }, - "UpdateApplication": { - "methods": [ - "updateApplication" - ] - }, - "UpdateApplicationInstances": { - "methods": [ - "updateApplicationInstances" - ] - }, - "UpdateApplicationStreamInput": { - "methods": [ - "updateApplicationStreamInput" - ] - }, - "UpdateDraft": { - "methods": [ - "updateDraft" - ] - }, - "UpdateProcessor": { - "methods": [ - "updateProcessor" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "StreamingService": { - "clients": { - "grpc": { - "libraryClient": "StreamingServiceGapicClient", - "rpcs": { - "AcquireLease": { - "methods": [ - "acquireLease" - ] - }, - "ReceiveEvents": { - "methods": [ - "receiveEvents" - ] - }, - "ReceivePackets": { - "methods": [ - "receivePackets" - ] - }, - "ReleaseLease": { - "methods": [ - "releaseLease" - ] - }, - "RenewLease": { - "methods": [ - "renewLease" - ] - }, - "SendPackets": { - "methods": [ - "sendPackets" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "StreamsService": { - "clients": { - "grpc": { - "libraryClient": "StreamsServiceGapicClient", - "rpcs": { - "CreateCluster": { - "methods": [ - "createCluster" - ] - }, - "CreateEvent": { - "methods": [ - "createEvent" - ] - }, - "CreateSeries": { - "methods": [ - "createSeries" - ] - }, - "CreateStream": { - "methods": [ - "createStream" - ] - }, - "DeleteCluster": { - "methods": [ - "deleteCluster" - ] - }, - "DeleteEvent": { - "methods": [ - "deleteEvent" - ] - }, - "DeleteSeries": { - "methods": [ - "deleteSeries" - ] - }, - "DeleteStream": { - "methods": [ - "deleteStream" - ] - }, - "GenerateStreamHlsToken": { - "methods": [ - "generateStreamHlsToken" - ] - }, - "GetCluster": { - "methods": [ - "getCluster" - ] - }, - "GetEvent": { - "methods": [ - "getEvent" - ] - }, - "GetSeries": { - "methods": [ - "getSeries" - ] - }, - "GetStream": { - "methods": [ - "getStream" - ] - }, - "GetStreamThumbnail": { - "methods": [ - "getStreamThumbnail" - ] - }, - "ListClusters": { - "methods": [ - "listClusters" - ] - }, - "ListEvents": { - "methods": [ - "listEvents" - ] - }, - "ListSeries": { - "methods": [ - "listSeries" - ] - }, - "ListStreams": { - "methods": [ - "listStreams" - ] - }, - "MaterializeChannel": { - "methods": [ - "materializeChannel" - ] - }, - "UpdateCluster": { - "methods": [ - "updateCluster" - ] - }, - "UpdateEvent": { - "methods": [ - "updateEvent" - ] - }, - "UpdateSeries": { - "methods": [ - "updateSeries" - ] - }, - "UpdateStream": { - "methods": [ - "updateStream" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "Warehouse": { - "clients": { - "grpc": { - "libraryClient": "WarehouseGapicClient", - "rpcs": { - "AddCollectionItem": { - "methods": [ - "addCollectionItem" - ] - }, - "AnalyzeAsset": { - "methods": [ - "analyzeAsset" - ] - }, - "AnalyzeCorpus": { - "methods": [ - "analyzeCorpus" - ] - }, - "ClipAsset": { - "methods": [ - "clipAsset" - ] - }, - "CreateAnnotation": { - "methods": [ - "createAnnotation" - ] - }, - "CreateAsset": { - "methods": [ - "createAsset" - ] - }, - "CreateCollection": { - "methods": [ - "createCollection" - ] - }, - "CreateCorpus": { - "methods": [ - "createCorpus" - ] - }, - "CreateDataSchema": { - "methods": [ - "createDataSchema" - ] - }, - "CreateIndex": { - "methods": [ - "createIndex" - ] - }, - "CreateIndexEndpoint": { - "methods": [ - "createIndexEndpoint" - ] - }, - "CreateSearchConfig": { - "methods": [ - "createSearchConfig" - ] - }, - "CreateSearchHypernym": { - "methods": [ - "createSearchHypernym" - ] - }, - "DeleteAnnotation": { - "methods": [ - "deleteAnnotation" - ] - }, - "DeleteAsset": { - "methods": [ - "deleteAsset" - ] - }, - "DeleteCollection": { - "methods": [ - "deleteCollection" - ] - }, - "DeleteCorpus": { - "methods": [ - "deleteCorpus" - ] - }, - "DeleteDataSchema": { - "methods": [ - "deleteDataSchema" - ] - }, - "DeleteIndex": { - "methods": [ - "deleteIndex" - ] - }, - "DeleteIndexEndpoint": { - "methods": [ - "deleteIndexEndpoint" - ] - }, - "DeleteSearchConfig": { - "methods": [ - "deleteSearchConfig" - ] - }, - "DeleteSearchHypernym": { - "methods": [ - "deleteSearchHypernym" - ] - }, - "DeployIndex": { - "methods": [ - "deployIndex" - ] - }, - "GenerateHlsUri": { - "methods": [ - "generateHlsUri" - ] - }, - "GenerateRetrievalUrl": { - "methods": [ - "generateRetrievalUrl" - ] - }, - "GetAnnotation": { - "methods": [ - "getAnnotation" - ] - }, - "GetAsset": { - "methods": [ - "getAsset" - ] - }, - "GetCollection": { - "methods": [ - "getCollection" - ] - }, - "GetCorpus": { - "methods": [ - "getCorpus" - ] - }, - "GetDataSchema": { - "methods": [ - "getDataSchema" - ] - }, - "GetIndex": { - "methods": [ - "getIndex" - ] - }, - "GetIndexEndpoint": { - "methods": [ - "getIndexEndpoint" - ] - }, - "GetSearchConfig": { - "methods": [ - "getSearchConfig" - ] - }, - "GetSearchHypernym": { - "methods": [ - "getSearchHypernym" - ] - }, - "ImportAssets": { - "methods": [ - "importAssets" - ] - }, - "IndexAsset": { - "methods": [ - "indexAsset" - ] - }, - "IngestAsset": { - "methods": [ - "ingestAsset" - ] - }, - "ListAnnotations": { - "methods": [ - "listAnnotations" - ] - }, - "ListAssets": { - "methods": [ - "listAssets" - ] - }, - "ListCollections": { - "methods": [ - "listCollections" - ] - }, - "ListCorpora": { - "methods": [ - "listCorpora" - ] - }, - "ListDataSchemas": { - "methods": [ - "listDataSchemas" - ] - }, - "ListIndexEndpoints": { - "methods": [ - "listIndexEndpoints" - ] - }, - "ListIndexes": { - "methods": [ - "listIndexes" - ] - }, - "ListSearchConfigs": { - "methods": [ - "listSearchConfigs" - ] - }, - "ListSearchHypernyms": { - "methods": [ - "listSearchHypernyms" - ] - }, - "RemoveCollectionItem": { - "methods": [ - "removeCollectionItem" - ] - }, - "RemoveIndexAsset": { - "methods": [ - "removeIndexAsset" - ] - }, - "SearchAssets": { - "methods": [ - "searchAssets" - ] - }, - "SearchIndexEndpoint": { - "methods": [ - "searchIndexEndpoint" - ] - }, - "UndeployIndex": { - "methods": [ - "undeployIndex" - ] - }, - "UpdateAnnotation": { - "methods": [ - "updateAnnotation" - ] - }, - "UpdateAsset": { - "methods": [ - "updateAsset" - ] - }, - "UpdateCollection": { - "methods": [ - "updateCollection" - ] - }, - "UpdateCorpus": { - "methods": [ - "updateCorpus" - ] - }, - "UpdateDataSchema": { - "methods": [ - "updateDataSchema" - ] - }, - "UpdateIndex": { - "methods": [ - "updateIndex" - ] - }, - "UpdateIndexEndpoint": { - "methods": [ - "updateIndexEndpoint" - ] - }, - "UpdateSearchConfig": { - "methods": [ - "updateSearchConfig" - ] - }, - "UpdateSearchHypernym": { - "methods": [ - "updateSearchHypernym" - ] - }, - "UploadAsset": { - "methods": [ - "uploadAsset" - ] - }, - "ViewCollectionItems": { - "methods": [ - "viewCollectionItems" - ] - }, - "ViewIndexedAssets": { - "methods": [ - "viewIndexedAssets" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - }, - "HealthCheckService": { - "clients": { - "grpc": { - "libraryClient": "HealthCheckServiceGapicClient", - "rpcs": { - "HealthCheck": { - "methods": [ - "healthCheck" - ] - }, - "GetLocation": { - "methods": [ - "getLocation" - ] - }, - "ListLocations": { - "methods": [ - "listLocations" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_client_config.json b/owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_client_config.json deleted file mode 100644 index 084950364e9b..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_client_config.json +++ /dev/null @@ -1,162 +0,0 @@ -{ - "interfaces": { - "google.cloud.visionai.v1.AppPlatform": { - "retry_codes": { - "no_retry_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - } - }, - "methods": { - "AddApplicationStreamInput": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateApplication": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateApplicationInstances": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateDraft": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateProcessor": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteApplication": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteApplicationInstances": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteDraft": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteProcessor": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeployApplication": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetApplication": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetDraft": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetInstance": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetProcessor": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListApplications": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListDrafts": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListInstances": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListPrebuiltProcessors": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListProcessors": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RemoveApplicationStreamInput": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UndeployApplication": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateApplication": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateApplicationInstances": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateApplicationStreamInput": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateDraft": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateProcessor": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_descriptor_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_descriptor_config.php deleted file mode 100644 index a67f3985e097..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_descriptor_config.php +++ /dev/null @@ -1,536 +0,0 @@ - [ - 'google.cloud.visionai.v1.AppPlatform' => [ - 'AddApplicationStreamInput' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\AddApplicationStreamInputResponse', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateApplication' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Application', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateApplicationInstances' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\CreateApplicationInstancesResponse', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateDraft' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Draft', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateProcessor' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Processor', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteApplication' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteApplicationInstances' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Instance', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteDraft' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteProcessor' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeployApplication' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\DeployApplicationResponse', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RemoveApplicationStreamInput' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\RemoveApplicationStreamInputResponse', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UndeployApplication' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\UndeployApplicationResponse', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateApplication' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Application', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'application.name', - 'fieldAccessors' => [ - 'getApplication', - 'getName', - ], - ], - ], - ], - 'UpdateApplicationInstances' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\UpdateApplicationInstancesResponse', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateApplicationStreamInput' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\UpdateApplicationStreamInputResponse', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateDraft' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Draft', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'draft.name', - 'fieldAccessors' => [ - 'getDraft', - 'getName', - ], - ], - ], - ], - 'UpdateProcessor' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Processor', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'processor.name', - 'fieldAccessors' => [ - 'getProcessor', - 'getName', - ], - ], - ], - ], - 'GetApplication' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Application', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDraft' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Draft', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Instance', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetProcessor' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Processor', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListApplications' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getApplications', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListApplicationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDrafts' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDrafts', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListDraftsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListInstances' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getInstances', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListInstancesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPrebuiltProcessors' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListPrebuiltProcessorsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListProcessors' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getProcessors', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListProcessorsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'application' => 'projects/{project}/locations/{location}/applications/{application}', - 'draft' => 'projects/{project}/locations/{location}/applications/{application}/drafts/{draft}', - 'instance' => 'projects/{project}/locations/{location}/applications/{application}/instances/{instance}', - 'location' => 'projects/{project}/locations/{location}', - 'processor' => 'projects/{project}/locations/{location}/processors/{processor}', - 'stream' => 'projects/{project}/locations/{location}/clusters/{cluster}/streams/{stream}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_rest_client_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_rest_client_config.php deleted file mode 100644 index ac9056e937fa..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/resources/app_platform_rest_client_config.php +++ /dev/null @@ -1,443 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.visionai.v1.AppPlatform' => [ - 'AddApplicationStreamInput' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}:addStreamInput', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateApplication' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/applications', - 'body' => 'application', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'application_id', - ], - ], - 'CreateApplicationInstances' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}:createApplicationInstances', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateDraft' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/applications/*}/drafts', - 'body' => 'draft', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'draft_id', - ], - ], - 'CreateProcessor' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/processors', - 'body' => 'processor', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'processor_id', - ], - ], - 'DeleteApplication' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteApplicationInstances' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}:deleteApplicationInstances', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteDraft' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*/drafts/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteProcessor' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeployApplication' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}:deploy', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetApplication' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDraft' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*/drafts/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetInstance' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*/instances/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetProcessor' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/processors/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListApplications' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/applications', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDrafts' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/applications/*}/drafts', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListInstances' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/applications/*}/instances', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListPrebuiltProcessors' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/processors:prebuilt', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListProcessors' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/processors', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RemoveApplicationStreamInput' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}:removeStreamInput', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UndeployApplication' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}:undeploy', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateApplication' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{application.name=projects/*/locations/*/applications/*}', - 'body' => 'application', - 'placeholders' => [ - 'application.name' => [ - 'getters' => [ - 'getApplication', - 'getName', - ], - ], - ], - ], - 'UpdateApplicationInstances' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}:updateApplicationInstances', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateApplicationStreamInput' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/applications/*}:updateStreamInput', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateDraft' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{draft.name=projects/*/locations/*/applications/*/drafts/*}', - 'body' => 'draft', - 'placeholders' => [ - 'draft.name' => [ - 'getters' => [ - 'getDraft', - 'getName', - ], - ], - ], - ], - 'UpdateProcessor' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{processor.name=projects/*/locations/*/processors/*}', - 'body' => 'processor', - 'placeholders' => [ - 'processor.name' => [ - 'getters' => [ - 'getProcessor', - 'getName', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/warehouseOperations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/collections/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/imageIndexes/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/indexes/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_client_config.json b/owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_client_config.json deleted file mode 100644 index f970b482c726..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_client_config.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "interfaces": { - "google.cloud.visionai.v1.HealthCheckService": { - "retry_codes": { - "no_retry_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - } - }, - "methods": { - "HealthCheck": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_descriptor_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_descriptor_config.php deleted file mode 100644 index f443149bde46..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_descriptor_config.php +++ /dev/null @@ -1,77 +0,0 @@ - [ - 'google.cloud.visionai.v1.HealthCheckService' => [ - 'HealthCheck' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\HealthCheckResponse', - 'headerParams' => [ - [ - 'keyName' => 'cluster', - 'fieldAccessors' => [ - 'getCluster', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'cluster' => 'projects/{project}/locations/{location}/clusters/{cluster}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_rest_client_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_rest_client_config.php deleted file mode 100644 index c5feeb2a7cf5..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/resources/health_check_service_rest_client_config.php +++ /dev/null @@ -1,141 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.visionai.v1.HealthCheckService' => [ - 'HealthCheck' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{cluster=projects/*/locations/*/clusters/*}:healthCheck', - 'placeholders' => [ - 'cluster' => [ - 'getters' => [ - 'getCluster', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/warehouseOperations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/collections/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/imageIndexes/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/indexes/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_client_config.json b/owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_client_config.json deleted file mode 100644 index f501637b755f..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_client_config.json +++ /dev/null @@ -1,174 +0,0 @@ -{ - "interfaces": { - "google.cloud.visionai.v1.LiveVideoAnalytics": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_5_codes": [], - "no_retry_6_codes": [], - "no_retry_7_codes": [], - "no_retry_8_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "no_retry_5_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - }, - "no_retry_6_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - }, - "no_retry_7_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 300000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 300000, - "total_timeout_millis": 300000 - }, - "no_retry_8_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "BatchRunProcess": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateAnalysis": { - "timeout_millis": 300000, - "retry_codes_name": "no_retry_7_codes", - "retry_params_name": "no_retry_7_params" - }, - "CreateOperator": { - "timeout_millis": 300000, - "retry_codes_name": "no_retry_5_codes", - "retry_params_name": "no_retry_5_params" - }, - "CreateProcess": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteAnalysis": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_8_codes", - "retry_params_name": "no_retry_8_params" - }, - "DeleteOperator": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_8_codes", - "retry_params_name": "no_retry_8_params" - }, - "DeleteProcess": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAnalysis": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_8_codes", - "retry_params_name": "no_retry_8_params" - }, - "GetOperator": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_8_codes", - "retry_params_name": "no_retry_8_params" - }, - "GetProcess": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAnalyses": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_8_codes", - "retry_params_name": "no_retry_8_params" - }, - "ListOperators": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_8_codes", - "retry_params_name": "no_retry_8_params" - }, - "ListProcesses": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListPublicOperators": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ResolveOperatorInfo": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateAnalysis": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_8_codes", - "retry_params_name": "no_retry_8_params" - }, - "UpdateOperator": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_8_codes", - "retry_params_name": "no_retry_8_params" - }, - "UpdateProcess": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_descriptor_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_descriptor_config.php deleted file mode 100644 index 655e224af82c..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_descriptor_config.php +++ /dev/null @@ -1,390 +0,0 @@ - [ - 'google.cloud.visionai.v1.LiveVideoAnalytics' => [ - 'BatchRunProcess' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\BatchRunProcessResponse', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateAnalysis' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Analysis', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateOperator' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Operator', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateProcess' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Process', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAnalysis' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperator' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteProcess' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateAnalysis' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Analysis', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'analysis.name', - 'fieldAccessors' => [ - 'getAnalysis', - 'getName', - ], - ], - ], - ], - 'UpdateOperator' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Operator', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'operator.name', - 'fieldAccessors' => [ - 'getOperator', - 'getName', - ], - ], - ], - ], - 'UpdateProcess' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Process', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'process.name', - 'fieldAccessors' => [ - 'getProcess', - 'getName', - ], - ], - ], - ], - 'GetAnalysis' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Analysis', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetOperator' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Operator', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetProcess' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Process', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAnalyses' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAnalyses', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListAnalysesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListOperators' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getOperators', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListOperatorsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListProcesses' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getProcesses', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListProcessesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListPublicOperators' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getOperators', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListPublicOperatorsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ResolveOperatorInfo' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ResolveOperatorInfoResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'analysis' => 'projects/{project}/locations/{location}/clusters/{cluster}/analyses/{analysis}', - 'cluster' => 'projects/{project}/locations/{location}/clusters/{cluster}', - 'location' => 'projects/{project}/locations/{location}', - 'operator' => 'projects/{project}/locations/{location}/operators/{operator}', - 'process' => 'projects/{project}/locations/{location}/clusters/{cluster}/processes/{process}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_rest_client_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_rest_client_config.php deleted file mode 100644 index 256fd0496286..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/resources/live_video_analytics_rest_client_config.php +++ /dev/null @@ -1,357 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.visionai.v1.LiveVideoAnalytics' => [ - 'BatchRunProcess' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/processes:batchRun', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateAnalysis' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/analyses', - 'body' => 'analysis', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'analysis_id', - ], - ], - 'CreateOperator' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/operators', - 'body' => 'operator', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'operator_id', - ], - ], - 'CreateProcess' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/processes', - 'body' => 'process', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'process_id', - ], - ], - 'DeleteAnalysis' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/analyses/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperator' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operators/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteProcess' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/processes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAnalysis' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/analyses/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperator' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operators/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetProcess' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/processes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAnalyses' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/analyses', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListOperators' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/operators', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListProcesses' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/processes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListPublicOperators' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:listPublicOperators', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ResolveOperatorInfo' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}:resolveOperatorInfo', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateAnalysis' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{analysis.name=projects/*/locations/*/clusters/*/analyses/*}', - 'body' => 'analysis', - 'placeholders' => [ - 'analysis.name' => [ - 'getters' => [ - 'getAnalysis', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateOperator' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{operator.name=projects/*/locations/*/operators/*}', - 'body' => 'operator', - 'placeholders' => [ - 'operator.name' => [ - 'getters' => [ - 'getOperator', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateProcess' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{process.name=projects/*/locations/*/clusters/*/processes/*}', - 'body' => 'process', - 'placeholders' => [ - 'process.name' => [ - 'getters' => [ - 'getProcess', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/warehouseOperations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/collections/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/imageIndexes/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/indexes/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_client_config.json b/owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_client_config.json deleted file mode 100644 index 2cbad19092bc..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_client_config.json +++ /dev/null @@ -1,56 +0,0 @@ -{ - "interfaces": { - "google.cloud.visionai.v1.StreamingService": { - "retry_codes": { - "no_retry_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - } - }, - "methods": { - "AcquireLease": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ReceiveEvents": { - "timeout_millis": 60000 - }, - "ReceivePackets": { - "timeout_millis": 60000 - }, - "ReleaseLease": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "RenewLease": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "SendPackets": { - "timeout_millis": 60000 - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_descriptor_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_descriptor_config.php deleted file mode 100644 index 043b1e8727d9..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_descriptor_config.php +++ /dev/null @@ -1,122 +0,0 @@ - [ - 'google.cloud.visionai.v1.StreamingService' => [ - 'AcquireLease' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Lease', - 'headerParams' => [ - [ - 'keyName' => 'series', - 'fieldAccessors' => [ - 'getSeries', - ], - ], - ], - ], - 'ReceiveEvents' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ReceiveEventsResponse', - ], - 'ReceivePackets' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ReceivePacketsResponse', - ], - 'ReleaseLease' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ReleaseLeaseResponse', - 'headerParams' => [ - [ - 'keyName' => 'series', - 'fieldAccessors' => [ - 'getSeries', - ], - ], - ], - ], - 'RenewLease' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Lease', - 'headerParams' => [ - [ - 'keyName' => 'series', - 'fieldAccessors' => [ - 'getSeries', - ], - ], - ], - ], - 'SendPackets' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\SendPacketsResponse', - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'series' => 'projects/{project}/locations/{location}/clusters/{cluster}/series/{series}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_rest_client_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_rest_client_config.php deleted file mode 100644 index bc4a9ad4d344..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/resources/streaming_service_rest_client_config.php +++ /dev/null @@ -1,166 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.visionai.v1.StreamingService' => [ - 'AcquireLease' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{series=projects/*/locations/*/clusters/*/series/*}:acquireLease', - 'body' => '*', - 'placeholders' => [ - 'series' => [ - 'getters' => [ - 'getSeries', - ], - ], - ], - ], - 'ReleaseLease' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{series=projects/*/locations/*/clusters/*/series/*}:releaseLease', - 'body' => '*', - 'placeholders' => [ - 'series' => [ - 'getters' => [ - 'getSeries', - ], - ], - ], - ], - 'RenewLease' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{series=projects/*/locations/*/clusters/*/series/*}:renewLease', - 'body' => '*', - 'placeholders' => [ - 'series' => [ - 'getters' => [ - 'getSeries', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/warehouseOperations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/collections/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/imageIndexes/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/indexes/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_client_config.json b/owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_client_config.json deleted file mode 100644 index f28b50dbc88b..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_client_config.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "interfaces": { - "google.cloud.visionai.v1.StreamsService": { - "retry_codes": { - "no_retry_codes": [] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - } - }, - "methods": { - "CreateCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateEvent": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateSeries": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "CreateStream": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteEvent": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteSeries": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteStream": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GenerateStreamHlsToken": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetEvent": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetSeries": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetStream": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetStreamThumbnail": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListClusters": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListEvents": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListSeries": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListStreams": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "MaterializeChannel": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateCluster": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateEvent": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateSeries": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateStream": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_descriptor_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_descriptor_config.php deleted file mode 100644 index b784acc6cc5c..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_descriptor_config.php +++ /dev/null @@ -1,480 +0,0 @@ - [ - 'google.cloud.visionai.v1.StreamsService' => [ - 'CreateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Cluster', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateEvent' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Event', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSeries' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Series', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateStream' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Stream', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteEvent' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSeries' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteStream' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetStreamThumbnail' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\GetStreamThumbnailResponse', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'stream', - 'fieldAccessors' => [ - 'getStream', - ], - ], - ], - ], - 'MaterializeChannel' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Channel', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCluster' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Cluster', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'cluster.name', - 'fieldAccessors' => [ - 'getCluster', - 'getName', - ], - ], - ], - ], - 'UpdateEvent' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Event', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'event.name', - 'fieldAccessors' => [ - 'getEvent', - 'getName', - ], - ], - ], - ], - 'UpdateSeries' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Series', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'series.name', - 'fieldAccessors' => [ - 'getSeries', - 'getName', - ], - ], - ], - ], - 'UpdateStream' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Stream', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\OperationMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'stream.name', - 'fieldAccessors' => [ - 'getStream', - 'getName', - ], - ], - ], - ], - 'GenerateStreamHlsToken' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\GenerateStreamHlsTokenResponse', - 'headerParams' => [ - [ - 'keyName' => 'stream', - 'fieldAccessors' => [ - 'getStream', - ], - ], - ], - ], - 'GetCluster' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Cluster', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetEvent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Event', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSeries' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Series', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetStream' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Stream', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListClusters' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getClusters', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListClustersResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListEvents' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getEvents', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListEventsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSeries' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSeries', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListSeriesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListStreams' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getStreams', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListStreamsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'channel' => 'projects/{project}/locations/{location}/clusters/{cluster}/channels/{channel}', - 'cluster' => 'projects/{project}/locations/{location}/clusters/{cluster}', - 'event' => 'projects/{project}/locations/{location}/clusters/{cluster}/events/{event}', - 'location' => 'projects/{project}/locations/{location}', - 'series' => 'projects/{project}/locations/{location}/clusters/{cluster}/series/{series}', - 'stream' => 'projects/{project}/locations/{location}/clusters/{cluster}/streams/{stream}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_rest_client_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_rest_client_config.php deleted file mode 100644 index 260e717ba04f..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/resources/streams_service_rest_client_config.php +++ /dev/null @@ -1,425 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.visionai.v1.StreamsService' => [ - 'CreateCluster' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clusters', - 'body' => 'cluster', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'cluster_id', - ], - ], - 'CreateEvent' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/events', - 'body' => 'event', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'event_id', - ], - ], - 'CreateSeries' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/series', - 'body' => 'series', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'series_id', - ], - ], - 'CreateStream' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/streams', - 'body' => 'stream', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'stream_id', - ], - ], - 'DeleteCluster' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteEvent' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/events/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSeries' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/series/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteStream' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/streams/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateStreamHlsToken' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{stream=projects/*/locations/*/clusters/*/streams/*}:generateStreamHlsToken', - 'body' => '*', - 'placeholders' => [ - 'stream' => [ - 'getters' => [ - 'getStream', - ], - ], - ], - ], - 'GetCluster' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetEvent' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/events/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSeries' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/series/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetStream' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/clusters/*/streams/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetStreamThumbnail' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{stream=projects/*/locations/*/clusters/*/streams/*}:getThumbnail', - 'body' => '*', - 'placeholders' => [ - 'stream' => [ - 'getters' => [ - 'getStream', - ], - ], - ], - ], - 'ListClusters' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/clusters', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListEvents' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/events', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSeries' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/series', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListStreams' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/streams', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'MaterializeChannel' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/clusters/*}/channels', - 'body' => 'channel', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'channel_id', - ], - ], - 'UpdateCluster' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{cluster.name=projects/*/locations/*/clusters/*}', - 'body' => 'cluster', - 'placeholders' => [ - 'cluster.name' => [ - 'getters' => [ - 'getCluster', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateEvent' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{event.name=projects/*/locations/*/clusters/*/events/*}', - 'body' => 'event', - 'placeholders' => [ - 'event.name' => [ - 'getters' => [ - 'getEvent', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateSeries' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{series.name=projects/*/locations/*/clusters/*/series/*}', - 'body' => 'series', - 'placeholders' => [ - 'series.name' => [ - 'getters' => [ - 'getSeries', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateStream' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{stream.name=projects/*/locations/*/clusters/*/streams/*}', - 'body' => 'stream', - 'placeholders' => [ - 'stream.name' => [ - 'getters' => [ - 'getStream', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/warehouseOperations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/collections/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/imageIndexes/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/indexes/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_client_config.json b/owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_client_config.json deleted file mode 100644 index 175cc5790575..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_client_config.json +++ /dev/null @@ -1,369 +0,0 @@ -{ - "interfaces": { - "google.cloud.visionai.v1.Warehouse": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "retry_policy_2_codes": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "no_retry_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 0, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 0, - "total_timeout_millis": 0 - }, - "retry_policy_1_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - }, - "retry_policy_2_params": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 2.5, - "max_retry_delay_millis": 120000, - "initial_rpc_timeout_millis": 120000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 120000, - "total_timeout_millis": 120000 - } - }, - "methods": { - "AddCollectionItem": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "AnalyzeAsset": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "AnalyzeCorpus": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ClipAsset": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateAnnotation": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "CreateAsset": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "CreateCollection": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateCorpus": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "CreateDataSchema": { - "timeout_millis": 120000, - "retry_codes_name": "retry_policy_2_codes", - "retry_params_name": "retry_policy_2_params" - }, - "CreateIndex": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateIndexEndpoint": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateSearchConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateSearchHypernym": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteAnnotation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteAsset": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteCollection": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteCorpus": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteDataSchema": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteIndex": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteIndexEndpoint": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteSearchConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteSearchHypernym": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeployIndex": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GenerateHlsUri": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GenerateRetrievalUrl": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAnnotation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAsset": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetCollection": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetCorpus": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetDataSchema": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIndex": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetIndexEndpoint": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetSearchConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetSearchHypernym": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ImportAssets": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "IndexAsset": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "IngestAsset": { - "timeout_millis": 120000 - }, - "ListAnnotations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListAssets": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListCollections": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListCorpora": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListDataSchemas": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListIndexEndpoints": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListIndexes": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListSearchConfigs": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListSearchHypernyms": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RemoveCollectionItem": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "RemoveIndexAsset": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SearchAssets": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SearchIndexEndpoint": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UndeployIndex": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateAnnotation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateAsset": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateCollection": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateCorpus": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateDataSchema": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateIndex": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateIndexEndpoint": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateSearchConfig": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateSearchHypernym": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UploadAsset": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ViewCollectionItems": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ViewIndexedAssets": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetLocation": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListLocations": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_descriptor_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_descriptor_config.php deleted file mode 100644 index 186e82ddf8e0..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_descriptor_config.php +++ /dev/null @@ -1,1066 +0,0 @@ - [ - 'google.cloud.visionai.v1.Warehouse' => [ - 'AnalyzeAsset' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\AnalyzeAssetResponse', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\AnalyzeAssetMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'AnalyzeCorpus' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\AnalyzeCorpusResponse', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\AnalyzeCorpusMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateCollection' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Collection', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\CreateCollectionMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateCorpus' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Corpus', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\CreateCorpusMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateIndex' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Index', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\CreateIndexMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateIndexEndpoint' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\IndexEndpoint', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\CreateIndexEndpointMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAsset' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\DeleteAssetMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCollection' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\DeleteCollectionMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteIndex' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\DeleteIndexMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteIndexEndpoint' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Protobuf\GPBEmpty', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\DeleteIndexEndpointMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeployIndex' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\DeployIndexResponse', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\DeployIndexMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'index_endpoint', - 'fieldAccessors' => [ - 'getIndexEndpoint', - ], - ], - ], - ], - 'ImportAssets' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\ImportAssetsResponse', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\ImportAssetsMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'IndexAsset' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\IndexAssetResponse', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\IndexAssetMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'RemoveIndexAsset' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\RemoveIndexAssetResponse', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\RemoveIndexAssetMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UndeployIndex' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\UndeployIndexResponse', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\UndeployIndexMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'index_endpoint', - 'fieldAccessors' => [ - 'getIndexEndpoint', - ], - ], - ], - ], - 'UpdateIndex' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\Index', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\UpdateIndexMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'index.name', - 'fieldAccessors' => [ - 'getIndex', - 'getName', - ], - ], - ], - ], - 'UpdateIndexEndpoint' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\IndexEndpoint', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\UpdateIndexEndpointMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'index_endpoint.name', - 'fieldAccessors' => [ - 'getIndexEndpoint', - 'getName', - ], - ], - ], - ], - 'UploadAsset' => [ - 'longRunning' => [ - 'operationReturnType' => '\Google\Cloud\VisionAI\V1\UploadAssetResponse', - 'metadataReturnType' => '\Google\Cloud\VisionAI\V1\UploadAssetMetadata', - 'initialPollDelayMillis' => '500', - 'pollDelayMultiplier' => '1.5', - 'maxPollDelayMillis' => '5000', - 'totalPollTimeoutMillis' => '300000', - ], - 'callType' => \Google\ApiCore\Call::LONGRUNNING_CALL, - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'AddCollectionItem' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\AddCollectionItemResponse', - 'headerParams' => [ - [ - 'keyName' => 'item.collection', - 'fieldAccessors' => [ - 'getItem', - 'getCollection', - ], - ], - ], - ], - 'ClipAsset' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ClipAssetResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateAnnotation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Annotation', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateAsset' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Asset', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDataSchema' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\DataSchema', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSearchConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\SearchConfig', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSearchHypernym' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\SearchHypernym', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAnnotation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCorpus' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteDataSchema' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSearchConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSearchHypernym' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GenerateHlsUri' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\GenerateHlsUriResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GenerateRetrievalUrl' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\GenerateRetrievalUrlResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAnnotation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Annotation', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetAsset' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Asset', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCollection' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Collection', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCorpus' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Corpus', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetDataSchema' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\DataSchema', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIndex' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Index', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetIndexEndpoint' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\IndexEndpoint', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSearchConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\SearchConfig', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSearchHypernym' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\SearchHypernym', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'IngestAsset' => [ - 'grpcStreaming' => [ - 'grpcStreamingType' => 'BidiStreaming', - ], - 'callType' => \Google\ApiCore\Call::BIDI_STREAMING_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\IngestAssetResponse', - ], - 'ListAnnotations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAnnotations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListAnnotationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListAssets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAssets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListAssetsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListCollections' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCollections', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListCollectionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListCorpora' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCorpora', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListCorporaResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListDataSchemas' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getDataSchemas', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListDataSchemasResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListIndexEndpoints' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getIndexEndpoints', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListIndexEndpointsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListIndexes' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getIndexes', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListIndexesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSearchConfigs' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSearchConfigs', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListSearchConfigsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSearchHypernyms' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSearchHypernyms', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ListSearchHypernymsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'RemoveCollectionItem' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\RemoveCollectionItemResponse', - 'headerParams' => [ - [ - 'keyName' => 'item.collection', - 'fieldAccessors' => [ - 'getItem', - 'getCollection', - ], - ], - ], - ], - 'SearchAssets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSearchResultItems', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\SearchAssetsResponse', - 'headerParams' => [ - [ - 'keyName' => 'corpus', - 'fieldAccessors' => [ - 'getCorpus', - ], - ], - ], - ], - 'SearchIndexEndpoint' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSearchResultItems', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\SearchIndexEndpointResponse', - 'headerParams' => [ - [ - 'keyName' => 'index_endpoint', - 'fieldAccessors' => [ - 'getIndexEndpoint', - ], - ], - ], - ], - 'UpdateAnnotation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Annotation', - 'headerParams' => [ - [ - 'keyName' => 'annotation.name', - 'fieldAccessors' => [ - 'getAnnotation', - 'getName', - ], - ], - ], - ], - 'UpdateAsset' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Asset', - 'headerParams' => [ - [ - 'keyName' => 'asset.name', - 'fieldAccessors' => [ - 'getAsset', - 'getName', - ], - ], - ], - ], - 'UpdateCollection' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Collection', - 'headerParams' => [ - [ - 'keyName' => 'collection.name', - 'fieldAccessors' => [ - 'getCollection', - 'getName', - ], - ], - ], - ], - 'UpdateCorpus' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\Corpus', - 'headerParams' => [ - [ - 'keyName' => 'corpus.name', - 'fieldAccessors' => [ - 'getCorpus', - 'getName', - ], - ], - ], - ], - 'UpdateDataSchema' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\DataSchema', - 'headerParams' => [ - [ - 'keyName' => 'data_schema.name', - 'fieldAccessors' => [ - 'getDataSchema', - 'getName', - ], - ], - ], - ], - 'UpdateSearchConfig' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\SearchConfig', - 'headerParams' => [ - [ - 'keyName' => 'search_config.name', - 'fieldAccessors' => [ - 'getSearchConfig', - 'getName', - ], - ], - ], - ], - 'UpdateSearchHypernym' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\SearchHypernym', - 'headerParams' => [ - [ - 'keyName' => 'search_hypernym.name', - 'fieldAccessors' => [ - 'getSearchHypernym', - 'getName', - ], - ], - ], - ], - 'ViewCollectionItems' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getItems', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ViewCollectionItemsResponse', - 'headerParams' => [ - [ - 'keyName' => 'collection', - 'fieldAccessors' => [ - 'getCollection', - ], - ], - ], - ], - 'ViewIndexedAssets' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getIndexedAssets', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\VisionAI\V1\ViewIndexedAssetsResponse', - 'headerParams' => [ - [ - 'keyName' => 'index', - 'fieldAccessors' => [ - 'getIndex', - ], - ], - ], - ], - 'GetLocation' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Location\Location', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'ListLocations' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getLocations', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Location\ListLocationsResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - 'interfaceOverride' => 'google.cloud.location.Locations', - ], - 'templateMap' => [ - 'annotation' => 'projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}/annotations/{annotation}', - 'asset' => 'projects/{project_number}/locations/{location}/corpora/{corpus}/assets/{asset}', - 'collection' => 'projects/{project_number}/locations/{location}/corpora/{corpus}/collections/{collection}', - 'corpus' => 'projects/{project_number}/locations/{location}/corpora/{corpus}', - 'dataSchema' => 'projects/{project_number}/locations/{location}/corpora/{corpus}/dataSchemas/{data_schema}', - 'index' => 'projects/{project_number}/locations/{location}/corpora/{corpus}/indexes/{index}', - 'indexEndpoint' => 'projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}', - 'location' => 'projects/{project}/locations/{location}', - 'searchConfig' => 'projects/{project_number}/locations/{location}/corpora/{corpus}/searchConfigs/{search_config}', - 'searchHypernym' => 'projects/{project_number}/locations/{location}/corpora/{corpus}/searchHypernyms/{search_hypernym}', - ], - ], - ], -]; diff --git a/owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_rest_client_config.php b/owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_rest_client_config.php deleted file mode 100644 index 71ebb103a480..000000000000 --- a/owl-bot-staging/VisionAi/v1/src/V1/resources/warehouse_rest_client_config.php +++ /dev/null @@ -1,865 +0,0 @@ - [ - 'google.cloud.location.Locations' => [ - 'GetLocation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListLocations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*}/locations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - 'google.cloud.visionai.v1.Warehouse' => [ - 'AddCollectionItem' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{item.collection=projects/*/locations/*/corpora/*/collections/*}:addCollectionItem', - 'body' => '*', - 'placeholders' => [ - 'item.collection' => [ - 'getters' => [ - 'getItem', - 'getCollection', - ], - ], - ], - ], - 'AnalyzeAsset' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*}:analyze', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'AnalyzeCorpus' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*}:analyze', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ClipAsset' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*}:clip', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateAnnotation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*/assets/*}/annotations', - 'body' => 'annotation', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateAsset' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/assets', - 'body' => 'asset', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateCollection' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/collections', - 'body' => 'collection', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateCorpus' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/corpora', - 'body' => 'corpus', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateDataSchema' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/dataSchemas', - 'body' => 'data_schema', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateIndex' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/indexes', - 'body' => 'index', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateIndexEndpoint' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/indexEndpoints', - 'body' => 'index_endpoint', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSearchConfig' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/searchConfigs', - 'body' => 'search_config', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'search_config_id', - ], - ], - 'CreateSearchHypernym' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/searchHypernyms', - 'body' => 'search_hypernym', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteAnnotation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*/annotations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteAsset' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCollection' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/collections/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteCorpus' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteDataSchema' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/dataSchemas/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteIndex' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/indexes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteIndexEndpoint' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSearchConfig' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/searchConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSearchHypernym' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/searchHypernyms/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeployIndex' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:deployIndex', - 'body' => '*', - 'placeholders' => [ - 'index_endpoint' => [ - 'getters' => [ - 'getIndexEndpoint', - ], - ], - ], - ], - 'GenerateHlsUri' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*}:generateHlsUri', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GenerateRetrievalUrl' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*}:generateRetrievalUrl', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAnnotation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*/annotations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetAsset' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCollection' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/collections/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCorpus' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetDataSchema' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/dataSchemas/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIndex' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/indexes/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetIndexEndpoint' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSearchConfig' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/searchConfigs/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSearchHypernym' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/searchHypernyms/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ImportAssets' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/assets:import', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'IndexAsset' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*}:index', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAnnotations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*/assets/*}/annotations', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListAssets' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/assets', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListCollections' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/collections', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListCorpora' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/corpora', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListDataSchemas' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/dataSchemas', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListIndexEndpoints' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*}/indexEndpoints', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListIndexes' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/indexes', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSearchConfigs' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/searchConfigs', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSearchHypernyms' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=projects/*/locations/*/corpora/*}/searchHypernyms', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'RemoveCollectionItem' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{item.collection=projects/*/locations/*/corpora/*/collections/*}:removeCollectionItem', - 'body' => '*', - 'placeholders' => [ - 'item.collection' => [ - 'getters' => [ - 'getItem', - 'getCollection', - ], - ], - ], - ], - 'RemoveIndexAsset' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*}:removeIndex', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'SearchAssets' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{corpus=projects/*/locations/*/corpora/*}:searchAssets', - 'body' => '*', - 'placeholders' => [ - 'corpus' => [ - 'getters' => [ - 'getCorpus', - ], - ], - ], - ], - 'SearchIndexEndpoint' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:searchIndexEndpoint', - 'body' => '*', - 'placeholders' => [ - 'index_endpoint' => [ - 'getters' => [ - 'getIndexEndpoint', - ], - ], - ], - ], - 'UndeployIndex' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{index_endpoint=projects/*/locations/*/indexEndpoints/*}:undeployIndex', - 'body' => '*', - 'placeholders' => [ - 'index_endpoint' => [ - 'getters' => [ - 'getIndexEndpoint', - ], - ], - ], - ], - 'UpdateAnnotation' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{annotation.name=projects/*/locations/*/corpora/*/assets/*/annotations/*}', - 'body' => 'annotation', - 'placeholders' => [ - 'annotation.name' => [ - 'getters' => [ - 'getAnnotation', - 'getName', - ], - ], - ], - ], - 'UpdateAsset' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{asset.name=projects/*/locations/*/corpora/*/assets/*}', - 'body' => 'asset', - 'placeholders' => [ - 'asset.name' => [ - 'getters' => [ - 'getAsset', - 'getName', - ], - ], - ], - ], - 'UpdateCollection' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{collection.name=projects/*/locations/*/corpora/*/collections/*}', - 'body' => 'collection', - 'placeholders' => [ - 'collection.name' => [ - 'getters' => [ - 'getCollection', - 'getName', - ], - ], - ], - ], - 'UpdateCorpus' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{corpus.name=projects/*/locations/*/corpora/*}', - 'body' => 'corpus', - 'placeholders' => [ - 'corpus.name' => [ - 'getters' => [ - 'getCorpus', - 'getName', - ], - ], - ], - ], - 'UpdateDataSchema' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{data_schema.name=projects/*/locations/*/corpora/*/dataSchemas/*}', - 'body' => 'data_schema', - 'placeholders' => [ - 'data_schema.name' => [ - 'getters' => [ - 'getDataSchema', - 'getName', - ], - ], - ], - ], - 'UpdateIndex' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{index.name=projects/*/locations/*/corpora/*/indexes/*}', - 'body' => 'index', - 'placeholders' => [ - 'index.name' => [ - 'getters' => [ - 'getIndex', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateIndexEndpoint' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{index_endpoint.name=projects/*/locations/*/indexEndpoints/*}', - 'body' => 'index_endpoint', - 'placeholders' => [ - 'index_endpoint.name' => [ - 'getters' => [ - 'getIndexEndpoint', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateSearchConfig' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{search_config.name=projects/*/locations/*/corpora/*/searchConfigs/*}', - 'body' => 'search_config', - 'placeholders' => [ - 'search_config.name' => [ - 'getters' => [ - 'getSearchConfig', - 'getName', - ], - ], - ], - ], - 'UpdateSearchHypernym' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{search_hypernym.name=projects/*/locations/*/corpora/*/searchHypernyms/*}', - 'body' => 'search_hypernym', - 'placeholders' => [ - 'search_hypernym.name' => [ - 'getters' => [ - 'getSearchHypernym', - 'getName', - ], - ], - ], - ], - 'UploadAsset' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*}:upload', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ViewCollectionItems' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{collection=projects/*/locations/*/corpora/*/collections/*}:viewCollectionItems', - 'placeholders' => [ - 'collection' => [ - 'getters' => [ - 'getCollection', - ], - ], - ], - ], - 'ViewIndexedAssets' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{index=projects/*/locations/*/corpora/*/indexes/*}:viewAssets', - 'placeholders' => [ - 'index' => [ - 'getters' => [ - 'getIndex', - ], - ], - ], - ], - ], - 'google.longrunning.Operations' => [ - 'CancelOperation' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}:cancel', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteOperation' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetOperation' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/operations/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/warehouseOperations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/assets/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/collections/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/imageIndexes/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/indexes/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/corpora/*/operations/*}', - ], - [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*/indexEndpoints/*/operations/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListOperations' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=projects/*/locations/*}/operations', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/AppPlatformClientTest.php b/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/AppPlatformClientTest.php deleted file mode 100644 index 73c36aa7f5bf..000000000000 --- a/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/AppPlatformClientTest.php +++ /dev/null @@ -1,3108 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return AppPlatformClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new AppPlatformClient($options); - } - - /** @test */ - public function addApplicationStreamInputTest() - { - $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/addApplicationStreamInputTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AddApplicationStreamInputResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/addApplicationStreamInputTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new AddApplicationStreamInputRequest()) - ->setName($formattedName); - $response = $gapicClient->addApplicationStreamInput($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/AddApplicationStreamInput', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addApplicationStreamInputTest'); - $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 addApplicationStreamInputExceptionTest() - { - $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/addApplicationStreamInputTest'); - $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new AddApplicationStreamInputRequest()) - ->setName($formattedName); - $response = $gapicClient->addApplicationStreamInput($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addApplicationStreamInputTest'); - 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 createApplicationTest() - { - $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/createApplicationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Application(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createApplicationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $applicationId = 'applicationId-1287148950'; - $application = new Application(); - $applicationDisplayName = 'applicationDisplayName-1104148739'; - $application->setDisplayName($applicationDisplayName); - $request = (new CreateApplicationRequest()) - ->setParent($formattedParent) - ->setApplicationId($applicationId) - ->setApplication($application); - $response = $gapicClient->createApplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/CreateApplication', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getApplicationId(); - $this->assertProtobufEquals($applicationId, $actualValue); - $actualValue = $actualApiRequestObject->getApplication(); - $this->assertProtobufEquals($application, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createApplicationTest'); - $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 createApplicationExceptionTest() - { - $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/createApplicationTest'); - $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->locationName('[PROJECT]', '[LOCATION]'); - $applicationId = 'applicationId-1287148950'; - $application = new Application(); - $applicationDisplayName = 'applicationDisplayName-1104148739'; - $application->setDisplayName($applicationDisplayName); - $request = (new CreateApplicationRequest()) - ->setParent($formattedParent) - ->setApplicationId($applicationId) - ->setApplication($application); - $response = $gapicClient->createApplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createApplicationTest'); - 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 createApplicationInstancesTest() - { - $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/createApplicationInstancesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new CreateApplicationInstancesResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createApplicationInstancesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $applicationInstances = []; - $request = (new CreateApplicationInstancesRequest()) - ->setName($formattedName) - ->setApplicationInstances($applicationInstances); - $response = $gapicClient->createApplicationInstances($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/CreateApplicationInstances', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getApplicationInstances(); - $this->assertProtobufEquals($applicationInstances, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createApplicationInstancesTest'); - $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 createApplicationInstancesExceptionTest() - { - $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/createApplicationInstancesTest'); - $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $applicationInstances = []; - $request = (new CreateApplicationInstancesRequest()) - ->setName($formattedName) - ->setApplicationInstances($applicationInstances); - $response = $gapicClient->createApplicationInstances($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createApplicationInstancesTest'); - 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 createDraftTest() - { - $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/createDraftTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Draft(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createDraftTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $draftId = 'draftId-841643911'; - $draft = new Draft(); - $draftDisplayName = 'draftDisplayName67266060'; - $draft->setDisplayName($draftDisplayName); - $request = (new CreateDraftRequest()) - ->setParent($formattedParent) - ->setDraftId($draftId) - ->setDraft($draft); - $response = $gapicClient->createDraft($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/CreateDraft', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getDraftId(); - $this->assertProtobufEquals($draftId, $actualValue); - $actualValue = $actualApiRequestObject->getDraft(); - $this->assertProtobufEquals($draft, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDraftTest'); - $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 createDraftExceptionTest() - { - $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/createDraftTest'); - $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $draftId = 'draftId-841643911'; - $draft = new Draft(); - $draftDisplayName = 'draftDisplayName67266060'; - $draft->setDisplayName($draftDisplayName); - $request = (new CreateDraftRequest()) - ->setParent($formattedParent) - ->setDraftId($draftId) - ->setDraft($draft); - $response = $gapicClient->createDraft($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createDraftTest'); - 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 createProcessorTest() - { - $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/createProcessorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $configurationTypeurl = 'configurationTypeurl1710815660'; - $supportsPostProcessing = false; - $expectedResponse = new Processor(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setConfigurationTypeurl($configurationTypeurl); - $expectedResponse->setSupportsPostProcessing($supportsPostProcessing); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createProcessorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $processorId = 'processorId2008089576'; - $processor = new Processor(); - $processorDisplayName = 'processorDisplayName-841022853'; - $processor->setDisplayName($processorDisplayName); - $request = (new CreateProcessorRequest()) - ->setParent($formattedParent) - ->setProcessorId($processorId) - ->setProcessor($processor); - $response = $gapicClient->createProcessor($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/CreateProcessor', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getProcessorId(); - $this->assertProtobufEquals($processorId, $actualValue); - $actualValue = $actualApiRequestObject->getProcessor(); - $this->assertProtobufEquals($processor, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createProcessorTest'); - $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 createProcessorExceptionTest() - { - $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/createProcessorTest'); - $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->locationName('[PROJECT]', '[LOCATION]'); - $processorId = 'processorId2008089576'; - $processor = new Processor(); - $processorDisplayName = 'processorDisplayName-841022853'; - $processor->setDisplayName($processorDisplayName); - $request = (new CreateProcessorRequest()) - ->setParent($formattedParent) - ->setProcessorId($processorId) - ->setProcessor($processor); - $response = $gapicClient->createProcessor($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createProcessorTest'); - 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 deleteApplicationTest() - { - $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/deleteApplicationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteApplicationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new DeleteApplicationRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteApplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/DeleteApplication', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteApplicationTest'); - $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 deleteApplicationExceptionTest() - { - $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/deleteApplicationTest'); - $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new DeleteApplicationRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteApplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteApplicationTest'); - 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 deleteApplicationInstancesTest() - { - $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/deleteApplicationInstancesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteApplicationInstancesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $formattedInstanceIds = [ - $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[APPLICATION]', '[INSTANCE]'), - ]; - $request = (new DeleteApplicationInstancesRequest()) - ->setName($formattedName) - ->setInstanceIds($formattedInstanceIds); - $response = $gapicClient->deleteApplicationInstances($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/DeleteApplicationInstances', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualApiRequestObject->getInstanceIds(); - $this->assertProtobufEquals($formattedInstanceIds, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteApplicationInstancesTest'); - $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 deleteApplicationInstancesExceptionTest() - { - $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/deleteApplicationInstancesTest'); - $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $formattedInstanceIds = [ - $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[APPLICATION]', '[INSTANCE]'), - ]; - $request = (new DeleteApplicationInstancesRequest()) - ->setName($formattedName) - ->setInstanceIds($formattedInstanceIds); - $response = $gapicClient->deleteApplicationInstances($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteApplicationInstancesTest'); - 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 deleteDraftTest() - { - $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/deleteDraftTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteDraftTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->draftName('[PROJECT]', '[LOCATION]', '[APPLICATION]', '[DRAFT]'); - $request = (new DeleteDraftRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDraft($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/DeleteDraft', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDraftTest'); - $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 deleteDraftExceptionTest() - { - $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/deleteDraftTest'); - $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->draftName('[PROJECT]', '[LOCATION]', '[APPLICATION]', '[DRAFT]'); - $request = (new DeleteDraftRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteDraft($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteDraftTest'); - 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 deleteProcessorTest() - { - $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/deleteProcessorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteProcessorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $request = (new DeleteProcessorRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteProcessor($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/DeleteProcessor', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteProcessorTest'); - $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 deleteProcessorExceptionTest() - { - $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/deleteProcessorTest'); - $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->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $request = (new DeleteProcessorRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteProcessor($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteProcessorTest'); - 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 deployApplicationTest() - { - $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/deployApplicationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new DeployApplicationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deployApplicationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new DeployApplicationRequest()) - ->setName($formattedName); - $response = $gapicClient->deployApplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/DeployApplication', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deployApplicationTest'); - $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 deployApplicationExceptionTest() - { - $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/deployApplicationTest'); - $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new DeployApplicationRequest()) - ->setName($formattedName); - $response = $gapicClient->deployApplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deployApplicationTest'); - 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 getApplicationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Application(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new GetApplicationRequest()) - ->setName($formattedName); - $response = $gapicClient->getApplication($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/GetApplication', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getApplicationExceptionTest() - { - $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new GetApplicationRequest()) - ->setName($formattedName); - try { - $gapicClient->getApplication($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 getDraftTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Draft(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->draftName('[PROJECT]', '[LOCATION]', '[APPLICATION]', '[DRAFT]'); - $request = (new GetDraftRequest()) - ->setName($formattedName); - $response = $gapicClient->getDraft($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/GetDraft', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDraftExceptionTest() - { - $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->draftName('[PROJECT]', '[LOCATION]', '[APPLICATION]', '[DRAFT]'); - $request = (new GetDraftRequest()) - ->setName($formattedName); - try { - $gapicClient->getDraft($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'; - $description = 'description-1724546052'; - $expectedResponse = new Instance(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->instanceName('[PROJECT]', '[LOCATION]', '[APPLICATION]', '[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.cloud.visionai.v1.AppPlatform/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]', '[LOCATION]', '[APPLICATION]', '[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 getProcessorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $configurationTypeurl = 'configurationTypeurl1710815660'; - $supportsPostProcessing = false; - $expectedResponse = new Processor(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setConfigurationTypeurl($configurationTypeurl); - $expectedResponse->setSupportsPostProcessing($supportsPostProcessing); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $request = (new GetProcessorRequest()) - ->setName($formattedName); - $response = $gapicClient->getProcessor($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/GetProcessor', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProcessorExceptionTest() - { - $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->processorName('[PROJECT]', '[LOCATION]', '[PROCESSOR]'); - $request = (new GetProcessorRequest()) - ->setName($formattedName); - try { - $gapicClient->getProcessor($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 listApplicationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $applicationsElement = new Application(); - $applications = [ - $applicationsElement, - ]; - $expectedResponse = new ListApplicationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setApplications($applications); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListApplicationsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listApplications($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getApplications()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/ListApplications', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listApplicationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListApplicationsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listApplications($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 listDraftsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $draftsElement = new Draft(); - $drafts = [ - $draftsElement, - ]; - $expectedResponse = new ListDraftsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDrafts($drafts); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new ListDraftsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDrafts($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDrafts()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/ListDrafts', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDraftsExceptionTest() - { - $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new ListDraftsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDrafts($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 = ''; - $instancesElement = new Instance(); - $instances = [ - $instancesElement, - ]; - $expectedResponse = new ListInstancesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setInstances($instances); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new ListInstancesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listInstances($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getInstances()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $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 listPrebuiltProcessorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ListPrebuiltProcessorsResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListPrebuiltProcessorsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPrebuiltProcessors($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/ListPrebuiltProcessors', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPrebuiltProcessorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListPrebuiltProcessorsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPrebuiltProcessors($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 listProcessorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $processorsElement = new Processor(); - $processors = [ - $processorsElement, - ]; - $expectedResponse = new ListProcessorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProcessors($processors); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListProcessorsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listProcessors($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProcessors()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/ListProcessors', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProcessorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListProcessorsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listProcessors($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 removeApplicationStreamInputTest() - { - $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/removeApplicationStreamInputTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new RemoveApplicationStreamInputResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/removeApplicationStreamInputTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new RemoveApplicationStreamInputRequest()) - ->setName($formattedName); - $response = $gapicClient->removeApplicationStreamInput($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/RemoveApplicationStreamInput', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/removeApplicationStreamInputTest'); - $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 removeApplicationStreamInputExceptionTest() - { - $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/removeApplicationStreamInputTest'); - $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new RemoveApplicationStreamInputRequest()) - ->setName($formattedName); - $response = $gapicClient->removeApplicationStreamInput($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/removeApplicationStreamInputTest'); - 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 undeployApplicationTest() - { - $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/undeployApplicationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new UndeployApplicationResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/undeployApplicationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new UndeployApplicationRequest()) - ->setName($formattedName); - $response = $gapicClient->undeployApplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/UndeployApplication', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeployApplicationTest'); - $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 undeployApplicationExceptionTest() - { - $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/undeployApplicationTest'); - $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new UndeployApplicationRequest()) - ->setName($formattedName); - $response = $gapicClient->undeployApplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeployApplicationTest'); - 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 updateApplicationTest() - { - $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/updateApplicationTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Application(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateApplicationTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $application = new Application(); - $applicationDisplayName = 'applicationDisplayName-1104148739'; - $application->setDisplayName($applicationDisplayName); - $request = (new UpdateApplicationRequest()) - ->setApplication($application); - $response = $gapicClient->updateApplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/UpdateApplication', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getApplication(); - $this->assertProtobufEquals($application, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateApplicationTest'); - $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 updateApplicationExceptionTest() - { - $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/updateApplicationTest'); - $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 - $application = new Application(); - $applicationDisplayName = 'applicationDisplayName-1104148739'; - $application->setDisplayName($applicationDisplayName); - $request = (new UpdateApplicationRequest()) - ->setApplication($application); - $response = $gapicClient->updateApplication($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateApplicationTest'); - 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 updateApplicationInstancesTest() - { - $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/updateApplicationInstancesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new UpdateApplicationInstancesResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateApplicationInstancesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new UpdateApplicationInstancesRequest()) - ->setName($formattedName); - $response = $gapicClient->updateApplicationInstances($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/UpdateApplicationInstances', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateApplicationInstancesTest'); - $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 updateApplicationInstancesExceptionTest() - { - $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/updateApplicationInstancesTest'); - $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new UpdateApplicationInstancesRequest()) - ->setName($formattedName); - $response = $gapicClient->updateApplicationInstances($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateApplicationInstancesTest'); - 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 updateApplicationStreamInputTest() - { - $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/updateApplicationStreamInputTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new UpdateApplicationStreamInputResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateApplicationStreamInputTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new UpdateApplicationStreamInputRequest()) - ->setName($formattedName); - $response = $gapicClient->updateApplicationStreamInput($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/UpdateApplicationStreamInput', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateApplicationStreamInputTest'); - $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 updateApplicationStreamInputExceptionTest() - { - $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/updateApplicationStreamInputTest'); - $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->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new UpdateApplicationStreamInputRequest()) - ->setName($formattedName); - $response = $gapicClient->updateApplicationStreamInput($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateApplicationStreamInputTest'); - 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 updateDraftTest() - { - $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/updateDraftTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Draft(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateDraftTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $draft = new Draft(); - $draftDisplayName = 'draftDisplayName67266060'; - $draft->setDisplayName($draftDisplayName); - $request = (new UpdateDraftRequest()) - ->setDraft($draft); - $response = $gapicClient->updateDraft($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/UpdateDraft', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getDraft(); - $this->assertProtobufEquals($draft, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDraftTest'); - $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 updateDraftExceptionTest() - { - $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/updateDraftTest'); - $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 - $draft = new Draft(); - $draftDisplayName = 'draftDisplayName67266060'; - $draft->setDisplayName($draftDisplayName); - $request = (new UpdateDraftRequest()) - ->setDraft($draft); - $response = $gapicClient->updateDraft($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateDraftTest'); - 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 updateProcessorTest() - { - $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/updateProcessorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $configurationTypeurl = 'configurationTypeurl1710815660'; - $supportsPostProcessing = false; - $expectedResponse = new Processor(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setConfigurationTypeurl($configurationTypeurl); - $expectedResponse->setSupportsPostProcessing($supportsPostProcessing); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateProcessorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $processor = new Processor(); - $processorDisplayName = 'processorDisplayName-841022853'; - $processor->setDisplayName($processorDisplayName); - $request = (new UpdateProcessorRequest()) - ->setProcessor($processor); - $response = $gapicClient->updateProcessor($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/UpdateProcessor', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getProcessor(); - $this->assertProtobufEquals($processor, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateProcessorTest'); - $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 updateProcessorExceptionTest() - { - $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/updateProcessorTest'); - $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 - $processor = new Processor(); - $processorDisplayName = 'processorDisplayName-841022853'; - $processor->setDisplayName($processorDisplayName); - $request = (new UpdateProcessorRequest()) - ->setProcessor($processor); - $response = $gapicClient->updateProcessor($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateProcessorTest'); - 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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($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 addApplicationStreamInputAsyncTest() - { - $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/addApplicationStreamInputTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AddApplicationStreamInputResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/addApplicationStreamInputTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->applicationName('[PROJECT]', '[LOCATION]', '[APPLICATION]'); - $request = (new AddApplicationStreamInputRequest()) - ->setName($formattedName); - $response = $gapicClient->addApplicationStreamInputAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.AppPlatform/AddApplicationStreamInput', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/addApplicationStreamInputTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/HealthCheckServiceClientTest.php b/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/HealthCheckServiceClientTest.php deleted file mode 100644 index 0d9884c7c31c..000000000000 --- a/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/HealthCheckServiceClientTest.php +++ /dev/null @@ -1,274 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return HealthCheckServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new HealthCheckServiceClient($options); - } - - /** @test */ - public function healthCheckTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $healthy = false; - $reason = 'reason-934964668'; - $expectedResponse = new HealthCheckResponse(); - $expectedResponse->setHealthy($healthy); - $expectedResponse->setReason($reason); - $transport->addResponse($expectedResponse); - $request = new HealthCheckRequest(); - $response = $gapicClient->healthCheck($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.HealthCheckService/HealthCheck', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function healthCheckExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new HealthCheckRequest(); - try { - $gapicClient->healthCheck($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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($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 healthCheckAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $healthy = false; - $reason = 'reason-934964668'; - $expectedResponse = new HealthCheckResponse(); - $expectedResponse->setHealthy($healthy); - $expectedResponse->setReason($reason); - $transport->addResponse($expectedResponse); - $request = new HealthCheckRequest(); - $response = $gapicClient->healthCheckAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.HealthCheckService/HealthCheck', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/LiveVideoAnalyticsClientTest.php b/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/LiveVideoAnalyticsClientTest.php deleted file mode 100644 index db47981fd6c9..000000000000 --- a/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/LiveVideoAnalyticsClientTest.php +++ /dev/null @@ -1,2167 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return LiveVideoAnalyticsClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new LiveVideoAnalyticsClient($options); - } - - /** @test */ - public function batchRunProcessTest() - { - $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/batchRunProcessTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $batchId2 = 'batchId2-268397581'; - $expectedResponse = new BatchRunProcessResponse(); - $expectedResponse->setBatchId($batchId2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchRunProcessTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $requests = []; - $request = (new BatchRunProcessRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - $response = $gapicClient->batchRunProcess($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/BatchRunProcess', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchRunProcessTest'); - $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 batchRunProcessExceptionTest() - { - $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/batchRunProcessTest'); - $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]', '[LOCATION]', '[CLUSTER]'); - $requests = []; - $request = (new BatchRunProcessRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - $response = $gapicClient->batchRunProcess($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchRunProcessTest'); - 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 createAnalysisTest() - { - $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/createAnalysisTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $disableEventWatch = false; - $expectedResponse = new Analysis(); - $expectedResponse->setName($name); - $expectedResponse->setDisableEventWatch($disableEventWatch); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createAnalysisTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $analysisId = 'analysisId774898014'; - $analysis = new Analysis(); - $request = (new CreateAnalysisRequest()) - ->setParent($formattedParent) - ->setAnalysisId($analysisId) - ->setAnalysis($analysis); - $response = $gapicClient->createAnalysis($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/CreateAnalysis', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getAnalysisId(); - $this->assertProtobufEquals($analysisId, $actualValue); - $actualValue = $actualApiRequestObject->getAnalysis(); - $this->assertProtobufEquals($analysis, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAnalysisTest'); - $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 createAnalysisExceptionTest() - { - $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/createAnalysisTest'); - $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]', '[LOCATION]', '[CLUSTER]'); - $analysisId = 'analysisId774898014'; - $analysis = new Analysis(); - $request = (new CreateAnalysisRequest()) - ->setParent($formattedParent) - ->setAnalysisId($analysisId) - ->setAnalysis($analysis); - $response = $gapicClient->createAnalysis($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createAnalysisTest'); - 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 createOperatorTest() - { - $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/createOperatorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $dockerImage = 'dockerImage872637052'; - $expectedResponse = new Operator(); - $expectedResponse->setName($name); - $expectedResponse->setDockerImage($dockerImage); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createOperatorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $operatorId = 'operatorId135321238'; - $operator = new Operator(); - $request = (new CreateOperatorRequest()) - ->setParent($formattedParent) - ->setOperatorId($operatorId) - ->setOperator($operator); - $response = $gapicClient->createOperator($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/CreateOperator', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getOperatorId(); - $this->assertProtobufEquals($operatorId, $actualValue); - $actualValue = $actualApiRequestObject->getOperator(); - $this->assertProtobufEquals($operator, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createOperatorTest'); - $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 createOperatorExceptionTest() - { - $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/createOperatorTest'); - $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->locationName('[PROJECT]', '[LOCATION]'); - $operatorId = 'operatorId135321238'; - $operator = new Operator(); - $request = (new CreateOperatorRequest()) - ->setParent($formattedParent) - ->setOperatorId($operatorId) - ->setOperator($operator); - $response = $gapicClient->createOperator($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createOperatorTest'); - 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 createProcessTest() - { - $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/createProcessTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $analysis = 'analysis-1024445732'; - $eventId = 'eventId278118624'; - $batchId = 'batchId-1694132160'; - $retryCount = 928040776; - $expectedResponse = new Process(); - $expectedResponse->setName($name); - $expectedResponse->setAnalysis($analysis); - $expectedResponse->setEventId($eventId); - $expectedResponse->setBatchId($batchId); - $expectedResponse->setRetryCount($retryCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createProcessTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $processId = 'processId422185195'; - $process = new Process(); - $processAnalysis = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[ANALYSIS]'); - $process->setAnalysis($processAnalysis); - $request = (new CreateProcessRequest()) - ->setParent($formattedParent) - ->setProcessId($processId) - ->setProcess($process); - $response = $gapicClient->createProcess($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/CreateProcess', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getProcessId(); - $this->assertProtobufEquals($processId, $actualValue); - $actualValue = $actualApiRequestObject->getProcess(); - $this->assertProtobufEquals($process, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createProcessTest'); - $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 createProcessExceptionTest() - { - $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/createProcessTest'); - $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]', '[LOCATION]', '[CLUSTER]'); - $processId = 'processId422185195'; - $process = new Process(); - $processAnalysis = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[ANALYSIS]'); - $process->setAnalysis($processAnalysis); - $request = (new CreateProcessRequest()) - ->setParent($formattedParent) - ->setProcessId($processId) - ->setProcess($process); - $response = $gapicClient->createProcess($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createProcessTest'); - 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 deleteAnalysisTest() - { - $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/deleteAnalysisTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAnalysisTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[ANALYSIS]'); - $request = (new DeleteAnalysisRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAnalysis($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/DeleteAnalysis', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAnalysisTest'); - $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 deleteAnalysisExceptionTest() - { - $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/deleteAnalysisTest'); - $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->analysisName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[ANALYSIS]'); - $request = (new DeleteAnalysisRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAnalysis($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAnalysisTest'); - 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 deleteOperatorTest() - { - $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/deleteOperatorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteOperatorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->operatorName('[PROJECT]', '[LOCATION]', '[OPERATOR]'); - $request = (new DeleteOperatorRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteOperator($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/DeleteOperator', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteOperatorTest'); - $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 deleteOperatorExceptionTest() - { - $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/deleteOperatorTest'); - $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->operatorName('[PROJECT]', '[LOCATION]', '[OPERATOR]'); - $request = (new DeleteOperatorRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteOperator($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteOperatorTest'); - 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 deleteProcessTest() - { - $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/deleteProcessTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteProcessTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->processName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[PROCESS]'); - $request = (new DeleteProcessRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteProcess($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/DeleteProcess', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteProcessTest'); - $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 deleteProcessExceptionTest() - { - $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/deleteProcessTest'); - $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->processName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[PROCESS]'); - $request = (new DeleteProcessRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteProcess($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteProcessTest'); - 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 getAnalysisTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $disableEventWatch = false; - $expectedResponse = new Analysis(); - $expectedResponse->setName($name2); - $expectedResponse->setDisableEventWatch($disableEventWatch); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[ANALYSIS]'); - $request = (new GetAnalysisRequest()) - ->setName($formattedName); - $response = $gapicClient->getAnalysis($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/GetAnalysis', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAnalysisExceptionTest() - { - $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->analysisName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[ANALYSIS]'); - $request = (new GetAnalysisRequest()) - ->setName($formattedName); - try { - $gapicClient->getAnalysis($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 getOperatorTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $dockerImage = 'dockerImage872637052'; - $expectedResponse = new Operator(); - $expectedResponse->setName($name2); - $expectedResponse->setDockerImage($dockerImage); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->operatorName('[PROJECT]', '[LOCATION]', '[OPERATOR]'); - $request = (new GetOperatorRequest()) - ->setName($formattedName); - $response = $gapicClient->getOperator($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/GetOperator', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getOperatorExceptionTest() - { - $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->operatorName('[PROJECT]', '[LOCATION]', '[OPERATOR]'); - $request = (new GetOperatorRequest()) - ->setName($formattedName); - try { - $gapicClient->getOperator($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 getProcessTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $analysis = 'analysis-1024445732'; - $eventId = 'eventId278118624'; - $batchId = 'batchId-1694132160'; - $retryCount = 928040776; - $expectedResponse = new Process(); - $expectedResponse->setName($name2); - $expectedResponse->setAnalysis($analysis); - $expectedResponse->setEventId($eventId); - $expectedResponse->setBatchId($batchId); - $expectedResponse->setRetryCount($retryCount); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->processName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[PROCESS]'); - $request = (new GetProcessRequest()) - ->setName($formattedName); - $response = $gapicClient->getProcess($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/GetProcess', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getProcessExceptionTest() - { - $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->processName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[PROCESS]'); - $request = (new GetProcessRequest()) - ->setName($formattedName); - try { - $gapicClient->getProcess($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 listAnalysesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $analysesElement = new Analysis(); - $analyses = [ - $analysesElement, - ]; - $expectedResponse = new ListAnalysesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAnalyses($analyses); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new ListAnalysesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAnalyses($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAnalyses()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/ListAnalyses', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAnalysesExceptionTest() - { - $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]', '[LOCATION]', '[CLUSTER]'); - $request = (new ListAnalysesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAnalyses($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 listOperatorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $operatorsElement = new Operator(); - $operators = [ - $operatorsElement, - ]; - $expectedResponse = new ListOperatorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setOperators($operators); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListOperatorsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listOperators($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getOperators()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/ListOperators', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listOperatorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListOperatorsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listOperators($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 listProcessesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $processesElement = new Process(); - $processes = [ - $processesElement, - ]; - $expectedResponse = new ListProcessesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setProcesses($processes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new ListProcessesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listProcesses($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getProcesses()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/ListProcesses', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listProcessesExceptionTest() - { - $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]', '[LOCATION]', '[CLUSTER]'); - $request = (new ListProcessesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listProcesses($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 listPublicOperatorsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $operatorsElement = new Operator(); - $operators = [ - $operatorsElement, - ]; - $expectedResponse = new ListPublicOperatorsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setOperators($operators); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListPublicOperatorsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listPublicOperators($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getOperators()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/ListPublicOperators', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listPublicOperatorsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListPublicOperatorsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listPublicOperators($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 resolveOperatorInfoTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ResolveOperatorInfoResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $queries = []; - $request = (new ResolveOperatorInfoRequest()) - ->setParent($formattedParent) - ->setQueries($queries); - $response = $gapicClient->resolveOperatorInfo($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/ResolveOperatorInfo', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getQueries(); - $this->assertProtobufEquals($queries, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function resolveOperatorInfoExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $queries = []; - $request = (new ResolveOperatorInfoRequest()) - ->setParent($formattedParent) - ->setQueries($queries); - try { - $gapicClient->resolveOperatorInfo($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 updateAnalysisTest() - { - $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/updateAnalysisTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $disableEventWatch = false; - $expectedResponse = new Analysis(); - $expectedResponse->setName($name); - $expectedResponse->setDisableEventWatch($disableEventWatch); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateAnalysisTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $analysis = new Analysis(); - $request = (new UpdateAnalysisRequest()) - ->setUpdateMask($updateMask) - ->setAnalysis($analysis); - $response = $gapicClient->updateAnalysis($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/UpdateAnalysis', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getAnalysis(); - $this->assertProtobufEquals($analysis, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAnalysisTest'); - $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 updateAnalysisExceptionTest() - { - $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/updateAnalysisTest'); - $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 - $updateMask = new FieldMask(); - $analysis = new Analysis(); - $request = (new UpdateAnalysisRequest()) - ->setUpdateMask($updateMask) - ->setAnalysis($analysis); - $response = $gapicClient->updateAnalysis($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateAnalysisTest'); - 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 updateOperatorTest() - { - $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/updateOperatorTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $dockerImage = 'dockerImage872637052'; - $expectedResponse = new Operator(); - $expectedResponse->setName($name); - $expectedResponse->setDockerImage($dockerImage); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateOperatorTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $operator = new Operator(); - $request = (new UpdateOperatorRequest()) - ->setUpdateMask($updateMask) - ->setOperator($operator); - $response = $gapicClient->updateOperator($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/UpdateOperator', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getOperator(); - $this->assertProtobufEquals($operator, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateOperatorTest'); - $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 updateOperatorExceptionTest() - { - $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/updateOperatorTest'); - $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 - $updateMask = new FieldMask(); - $operator = new Operator(); - $request = (new UpdateOperatorRequest()) - ->setUpdateMask($updateMask) - ->setOperator($operator); - $response = $gapicClient->updateOperator($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateOperatorTest'); - 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 updateProcessTest() - { - $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/updateProcessTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $analysis = 'analysis-1024445732'; - $eventId = 'eventId278118624'; - $batchId = 'batchId-1694132160'; - $retryCount = 928040776; - $expectedResponse = new Process(); - $expectedResponse->setName($name); - $expectedResponse->setAnalysis($analysis); - $expectedResponse->setEventId($eventId); - $expectedResponse->setBatchId($batchId); - $expectedResponse->setRetryCount($retryCount); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateProcessTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $process = new Process(); - $processAnalysis = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[ANALYSIS]'); - $process->setAnalysis($processAnalysis); - $request = (new UpdateProcessRequest()) - ->setUpdateMask($updateMask) - ->setProcess($process); - $response = $gapicClient->updateProcess($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/UpdateProcess', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getProcess(); - $this->assertProtobufEquals($process, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateProcessTest'); - $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 updateProcessExceptionTest() - { - $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/updateProcessTest'); - $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 - $updateMask = new FieldMask(); - $process = new Process(); - $processAnalysis = $gapicClient->analysisName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[ANALYSIS]'); - $process->setAnalysis($processAnalysis); - $request = (new UpdateProcessRequest()) - ->setUpdateMask($updateMask) - ->setProcess($process); - $response = $gapicClient->updateProcess($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateProcessTest'); - 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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($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 batchRunProcessAsyncTest() - { - $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/batchRunProcessTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $batchId2 = 'batchId2-268397581'; - $expectedResponse = new BatchRunProcessResponse(); - $expectedResponse->setBatchId($batchId2); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/batchRunProcessTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $requests = []; - $request = (new BatchRunProcessRequest()) - ->setParent($formattedParent) - ->setRequests($requests); - $response = $gapicClient->batchRunProcessAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.LiveVideoAnalytics/BatchRunProcess', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getRequests(); - $this->assertProtobufEquals($requests, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/batchRunProcessTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } -} diff --git a/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/StreamingServiceClientTest.php b/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/StreamingServiceClientTest.php deleted file mode 100644 index a1b3e13e1629..000000000000 --- a/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/StreamingServiceClientTest.php +++ /dev/null @@ -1,666 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return StreamingServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new StreamingServiceClient($options); - } - - /** @test */ - public function acquireLeaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $series2 = 'series21367099498'; - $owner2 = 'owner2-1054728794'; - $expectedResponse = new Lease(); - $expectedResponse->setId($id); - $expectedResponse->setSeries($series2); - $expectedResponse->setOwner($owner2); - $transport->addResponse($expectedResponse); - $request = new AcquireLeaseRequest(); - $response = $gapicClient->acquireLease($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamingService/AcquireLease', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function acquireLeaseExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new AcquireLeaseRequest(); - try { - $gapicClient->acquireLease($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 receiveEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ReceiveEventsResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new ReceiveEventsResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new ReceiveEventsResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $request = new ReceiveEventsRequest(); - $request2 = new ReceiveEventsRequest(); - $request3 = new ReceiveEventsRequest(); - $bidi = $gapicClient->receiveEvents(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamingService/ReceiveEvents', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function receiveEventsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->receiveEvents(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function receivePacketsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ReceivePacketsResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new ReceivePacketsResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new ReceivePacketsResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $request = new ReceivePacketsRequest(); - $request2 = new ReceivePacketsRequest(); - $request3 = new ReceivePacketsRequest(); - $bidi = $gapicClient->receivePackets(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamingService/ReceivePackets', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function receivePacketsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->receivePackets(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function releaseLeaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ReleaseLeaseResponse(); - $transport->addResponse($expectedResponse); - $request = new ReleaseLeaseRequest(); - $response = $gapicClient->releaseLease($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamingService/ReleaseLease', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function releaseLeaseExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ReleaseLeaseRequest(); - try { - $gapicClient->releaseLease($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 renewLeaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id2 = 'id23227150'; - $series2 = 'series21367099498'; - $owner2 = 'owner2-1054728794'; - $expectedResponse = new Lease(); - $expectedResponse->setId($id2); - $expectedResponse->setSeries($series2); - $expectedResponse->setOwner($owner2); - $transport->addResponse($expectedResponse); - $request = new RenewLeaseRequest(); - $response = $gapicClient->renewLease($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamingService/RenewLease', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function renewLeaseExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new RenewLeaseRequest(); - try { - $gapicClient->renewLease($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 sendPacketsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new SendPacketsResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new SendPacketsResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new SendPacketsResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $request = new SendPacketsRequest(); - $request2 = new SendPacketsRequest(); - $request3 = new SendPacketsRequest(); - $bidi = $gapicClient->sendPackets(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamingService/SendPackets', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function sendPacketsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->sendPackets(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($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 acquireLeaseAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $id = 'id3355'; - $series2 = 'series21367099498'; - $owner2 = 'owner2-1054728794'; - $expectedResponse = new Lease(); - $expectedResponse->setId($id); - $expectedResponse->setSeries($series2); - $expectedResponse->setOwner($owner2); - $transport->addResponse($expectedResponse); - $request = new AcquireLeaseRequest(); - $response = $gapicClient->acquireLeaseAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamingService/AcquireLease', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/StreamsServiceClientTest.php b/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/StreamsServiceClientTest.php deleted file mode 100644 index 060367825a77..000000000000 --- a/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/StreamsServiceClientTest.php +++ /dev/null @@ -1,2786 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return StreamsServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new StreamsServiceClient($options); - } - - /** @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'; - $dataplaneServiceEndpoint = 'dataplaneServiceEndpoint-1081162868'; - $pscTarget = 'pscTarget333587440'; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setDataplaneServiceEndpoint($dataplaneServiceEndpoint); - $expectedResponse->setPscTarget($pscTarget); - $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->locationName('[PROJECT]', '[LOCATION]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $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.cloud.visionai.v1.StreamsService/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->locationName('[PROJECT]', '[LOCATION]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $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 createEventTest() - { - $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/createEventTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Event(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createEventTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $eventId = 'eventId278118624'; - $event = new Event(); - $request = (new CreateEventRequest()) - ->setParent($formattedParent) - ->setEventId($eventId) - ->setEvent($event); - $response = $gapicClient->createEvent($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/CreateEvent', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getEventId(); - $this->assertProtobufEquals($eventId, $actualValue); - $actualValue = $actualApiRequestObject->getEvent(); - $this->assertProtobufEquals($event, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEventTest'); - $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 createEventExceptionTest() - { - $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/createEventTest'); - $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]', '[LOCATION]', '[CLUSTER]'); - $eventId = 'eventId278118624'; - $event = new Event(); - $request = (new CreateEventRequest()) - ->setParent($formattedParent) - ->setEventId($eventId) - ->setEvent($event); - $response = $gapicClient->createEvent($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createEventTest'); - 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 createSeriesTest() - { - $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/createSeriesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $stream = 'stream-891990144'; - $event = 'event96891546'; - $expectedResponse = new Series(); - $expectedResponse->setName($name); - $expectedResponse->setStream($stream); - $expectedResponse->setEvent($event); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createSeriesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $seriesId = 'seriesId-569586717'; - $series = new Series(); - $seriesStream = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); - $series->setStream($seriesStream); - $seriesEvent = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); - $series->setEvent($seriesEvent); - $request = (new CreateSeriesRequest()) - ->setParent($formattedParent) - ->setSeriesId($seriesId) - ->setSeries($series); - $response = $gapicClient->createSeries($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/CreateSeries', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getSeriesId(); - $this->assertProtobufEquals($seriesId, $actualValue); - $actualValue = $actualApiRequestObject->getSeries(); - $this->assertProtobufEquals($series, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSeriesTest'); - $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 createSeriesExceptionTest() - { - $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/createSeriesTest'); - $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]', '[LOCATION]', '[CLUSTER]'); - $seriesId = 'seriesId-569586717'; - $series = new Series(); - $seriesStream = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); - $series->setStream($seriesStream); - $seriesEvent = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); - $series->setEvent($seriesEvent); - $request = (new CreateSeriesRequest()) - ->setParent($formattedParent) - ->setSeriesId($seriesId) - ->setSeries($series); - $response = $gapicClient->createSeries($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createSeriesTest'); - 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 createStreamTest() - { - $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/createStreamTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $enableHlsPlayback = false; - $mediaWarehouseAsset = 'mediaWarehouseAsset-234837991'; - $expectedResponse = new Stream(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEnableHlsPlayback($enableHlsPlayback); - $expectedResponse->setMediaWarehouseAsset($mediaWarehouseAsset); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createStreamTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $streamId = 'streamId-315624902'; - $stream = new Stream(); - $request = (new CreateStreamRequest()) - ->setParent($formattedParent) - ->setStreamId($streamId) - ->setStream($stream); - $response = $gapicClient->createStream($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/CreateStream', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getStreamId(); - $this->assertProtobufEquals($streamId, $actualValue); - $actualValue = $actualApiRequestObject->getStream(); - $this->assertProtobufEquals($stream, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createStreamTest'); - $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 createStreamExceptionTest() - { - $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/createStreamTest'); - $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]', '[LOCATION]', '[CLUSTER]'); - $streamId = 'streamId-315624902'; - $stream = new Stream(); - $request = (new CreateStreamRequest()) - ->setParent($formattedParent) - ->setStreamId($streamId) - ->setStream($stream); - $response = $gapicClient->createStream($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createStreamTest'); - 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 deleteClusterTest() - { - $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/deleteClusterTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteClusterTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new DeleteClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/DeleteCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); - $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 deleteClusterExceptionTest() - { - $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/deleteClusterTest'); - $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->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new DeleteClusterRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCluster($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteClusterTest'); - 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 deleteEventTest() - { - $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/deleteEventTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteEventTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); - $request = (new DeleteEventRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteEvent($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/DeleteEvent', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEventTest'); - $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 deleteEventExceptionTest() - { - $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/deleteEventTest'); - $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->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); - $request = (new DeleteEventRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteEvent($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteEventTest'); - 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 deleteSeriesTest() - { - $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/deleteSeriesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteSeriesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->seriesName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[SERIES]'); - $request = (new DeleteSeriesRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSeries($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/DeleteSeries', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSeriesTest'); - $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 deleteSeriesExceptionTest() - { - $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/deleteSeriesTest'); - $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->seriesName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[SERIES]'); - $request = (new DeleteSeriesRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSeries($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteSeriesTest'); - 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 deleteStreamTest() - { - $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/deleteStreamTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteStreamTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); - $request = (new DeleteStreamRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteStream($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/DeleteStream', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteStreamTest'); - $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 deleteStreamExceptionTest() - { - $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/deleteStreamTest'); - $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->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); - $request = (new DeleteStreamRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteStream($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteStreamTest'); - 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 generateStreamHlsTokenTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $token = 'token110541305'; - $expectedResponse = new GenerateStreamHlsTokenResponse(); - $expectedResponse->setToken($token); - $transport->addResponse($expectedResponse); - // Mock request - $stream = 'stream-891990144'; - $request = (new GenerateStreamHlsTokenRequest()) - ->setStream($stream); - $response = $gapicClient->generateStreamHlsToken($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/GenerateStreamHlsToken', $actualFuncCall); - $actualValue = $actualRequestObject->getStream(); - $this->assertProtobufEquals($stream, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateStreamHlsTokenExceptionTest() - { - $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 - $stream = 'stream-891990144'; - $request = (new GenerateStreamHlsTokenRequest()) - ->setStream($stream); - try { - $gapicClient->generateStreamHlsToken($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'; - $dataplaneServiceEndpoint = 'dataplaneServiceEndpoint-1081162868'; - $pscTarget = 'pscTarget333587440'; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name2); - $expectedResponse->setDataplaneServiceEndpoint($dataplaneServiceEndpoint); - $expectedResponse->setPscTarget($pscTarget); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[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.cloud.visionai.v1.StreamsService/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]', '[LOCATION]', '[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 getEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Event(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); - $request = (new GetEventRequest()) - ->setName($formattedName); - $response = $gapicClient->getEvent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/GetEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getEventExceptionTest() - { - $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->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); - $request = (new GetEventRequest()) - ->setName($formattedName); - try { - $gapicClient->getEvent($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 getSeriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $stream = 'stream-891990144'; - $event = 'event96891546'; - $expectedResponse = new Series(); - $expectedResponse->setName($name2); - $expectedResponse->setStream($stream); - $expectedResponse->setEvent($event); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->seriesName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[SERIES]'); - $request = (new GetSeriesRequest()) - ->setName($formattedName); - $response = $gapicClient->getSeries($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/GetSeries', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSeriesExceptionTest() - { - $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->seriesName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[SERIES]'); - $request = (new GetSeriesRequest()) - ->setName($formattedName); - try { - $gapicClient->getSeries($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 getStreamTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $enableHlsPlayback = false; - $mediaWarehouseAsset = 'mediaWarehouseAsset-234837991'; - $expectedResponse = new Stream(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEnableHlsPlayback($enableHlsPlayback); - $expectedResponse->setMediaWarehouseAsset($mediaWarehouseAsset); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); - $request = (new GetStreamRequest()) - ->setName($formattedName); - $response = $gapicClient->getStream($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/GetStream', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getStreamExceptionTest() - { - $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->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); - $request = (new GetStreamRequest()) - ->setName($formattedName); - try { - $gapicClient->getStream($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 getStreamThumbnailTest() - { - $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/getStreamThumbnailTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GetStreamThumbnailResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/getStreamThumbnailTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $stream = 'stream-891990144'; - $gcsObjectName = 'gcsObjectName867287651'; - $request = (new GetStreamThumbnailRequest()) - ->setStream($stream) - ->setGcsObjectName($gcsObjectName); - $response = $gapicClient->getStreamThumbnail($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/GetStreamThumbnail', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getStream(); - $this->assertProtobufEquals($stream, $actualValue); - $actualValue = $actualApiRequestObject->getGcsObjectName(); - $this->assertProtobufEquals($gcsObjectName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/getStreamThumbnailTest'); - $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 getStreamThumbnailExceptionTest() - { - $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/getStreamThumbnailTest'); - $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 - $stream = 'stream-891990144'; - $gcsObjectName = 'gcsObjectName867287651'; - $request = (new GetStreamThumbnailRequest()) - ->setStream($stream) - ->setGcsObjectName($gcsObjectName); - $response = $gapicClient->getStreamThumbnail($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/getStreamThumbnailTest'); - 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 listClustersTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $clustersElement = new Cluster(); - $clusters = [ - $clustersElement, - ]; - $expectedResponse = new ListClustersResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setClusters($clusters); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListClustersRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listClusters($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getClusters()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/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->locationName('[PROJECT]', '[LOCATION]'); - $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 listEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $eventsElement = new Event(); - $events = [ - $eventsElement, - ]; - $expectedResponse = new ListEventsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setEvents($events); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new ListEventsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listEvents($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getEvents()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/ListEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listEventsExceptionTest() - { - $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]', '[LOCATION]', '[CLUSTER]'); - $request = (new ListEventsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listEvents($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 listSeriesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $seriesElement = new Series(); - $series = [ - $seriesElement, - ]; - $expectedResponse = new ListSeriesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSeries($series); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new ListSeriesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSeries($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSeries()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/ListSeries', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSeriesExceptionTest() - { - $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]', '[LOCATION]', '[CLUSTER]'); - $request = (new ListSeriesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSeries($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 listStreamsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $streamsElement = new Stream(); - $streams = [ - $streamsElement, - ]; - $expectedResponse = new ListStreamsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setStreams($streams); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $request = (new ListStreamsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listStreams($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getStreams()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/ListStreams', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listStreamsExceptionTest() - { - $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]', '[LOCATION]', '[CLUSTER]'); - $request = (new ListStreamsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listStreams($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 materializeChannelTest() - { - $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/materializeChannelTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $stream = 'stream-891990144'; - $event = 'event96891546'; - $expectedResponse = new Channel(); - $expectedResponse->setName($name); - $expectedResponse->setStream($stream); - $expectedResponse->setEvent($event); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/materializeChannelTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->clusterName('[PROJECT]', '[LOCATION]', '[CLUSTER]'); - $channelId = 'channelId-1930808873'; - $channel = new Channel(); - $channelStream = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); - $channel->setStream($channelStream); - $channelEvent = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); - $channel->setEvent($channelEvent); - $request = (new MaterializeChannelRequest()) - ->setParent($formattedParent) - ->setChannelId($channelId) - ->setChannel($channel); - $response = $gapicClient->materializeChannel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/MaterializeChannel', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getChannelId(); - $this->assertProtobufEquals($channelId, $actualValue); - $actualValue = $actualApiRequestObject->getChannel(); - $this->assertProtobufEquals($channel, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/materializeChannelTest'); - $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 materializeChannelExceptionTest() - { - $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/materializeChannelTest'); - $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]', '[LOCATION]', '[CLUSTER]'); - $channelId = 'channelId-1930808873'; - $channel = new Channel(); - $channelStream = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); - $channel->setStream($channelStream); - $channelEvent = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); - $channel->setEvent($channelEvent); - $request = (new MaterializeChannelRequest()) - ->setParent($formattedParent) - ->setChannelId($channelId) - ->setChannel($channel); - $response = $gapicClient->materializeChannel($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/materializeChannelTest'); - 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); - $name = 'name3373707'; - $dataplaneServiceEndpoint = 'dataplaneServiceEndpoint-1081162868'; - $pscTarget = 'pscTarget333587440'; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setDataplaneServiceEndpoint($dataplaneServiceEndpoint); - $expectedResponse->setPscTarget($pscTarget); - $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 - $updateMask = new FieldMask(); - $cluster = new Cluster(); - $request = (new UpdateClusterRequest()) - ->setUpdateMask($updateMask) - ->setCluster($cluster); - $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.cloud.visionai.v1.StreamsService/UpdateCluster', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getCluster(); - $this->assertProtobufEquals($cluster, $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 - $updateMask = new FieldMask(); - $cluster = new Cluster(); - $request = (new UpdateClusterRequest()) - ->setUpdateMask($updateMask) - ->setCluster($cluster); - $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 updateEventTest() - { - $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/updateEventTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $expectedResponse = new Event(); - $expectedResponse->setName($name); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateEventTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $event = new Event(); - $request = (new UpdateEventRequest()) - ->setUpdateMask($updateMask) - ->setEvent($event); - $response = $gapicClient->updateEvent($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/UpdateEvent', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getEvent(); - $this->assertProtobufEquals($event, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEventTest'); - $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 updateEventExceptionTest() - { - $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/updateEventTest'); - $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 - $updateMask = new FieldMask(); - $event = new Event(); - $request = (new UpdateEventRequest()) - ->setUpdateMask($updateMask) - ->setEvent($event); - $response = $gapicClient->updateEvent($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateEventTest'); - 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 updateSeriesTest() - { - $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/updateSeriesTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $stream = 'stream-891990144'; - $event = 'event96891546'; - $expectedResponse = new Series(); - $expectedResponse->setName($name); - $expectedResponse->setStream($stream); - $expectedResponse->setEvent($event); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateSeriesTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $series = new Series(); - $seriesStream = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); - $series->setStream($seriesStream); - $seriesEvent = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); - $series->setEvent($seriesEvent); - $request = (new UpdateSeriesRequest()) - ->setUpdateMask($updateMask) - ->setSeries($series); - $response = $gapicClient->updateSeries($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/UpdateSeries', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getSeries(); - $this->assertProtobufEquals($series, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSeriesTest'); - $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 updateSeriesExceptionTest() - { - $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/updateSeriesTest'); - $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 - $updateMask = new FieldMask(); - $series = new Series(); - $seriesStream = $gapicClient->streamName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[STREAM]'); - $series->setStream($seriesStream); - $seriesEvent = $gapicClient->eventName('[PROJECT]', '[LOCATION]', '[CLUSTER]', '[EVENT]'); - $series->setEvent($seriesEvent); - $request = (new UpdateSeriesRequest()) - ->setUpdateMask($updateMask) - ->setSeries($series); - $response = $gapicClient->updateSeries($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateSeriesTest'); - 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 updateStreamTest() - { - $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/updateStreamTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $enableHlsPlayback = false; - $mediaWarehouseAsset = 'mediaWarehouseAsset-234837991'; - $expectedResponse = new Stream(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setEnableHlsPlayback($enableHlsPlayback); - $expectedResponse->setMediaWarehouseAsset($mediaWarehouseAsset); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateStreamTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $updateMask = new FieldMask(); - $stream = new Stream(); - $request = (new UpdateStreamRequest()) - ->setUpdateMask($updateMask) - ->setStream($stream); - $response = $gapicClient->updateStream($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/UpdateStream', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $actualValue = $actualApiRequestObject->getStream(); - $this->assertProtobufEquals($stream, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateStreamTest'); - $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 updateStreamExceptionTest() - { - $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/updateStreamTest'); - $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 - $updateMask = new FieldMask(); - $stream = new Stream(); - $request = (new UpdateStreamRequest()) - ->setUpdateMask($updateMask) - ->setStream($stream); - $response = $gapicClient->updateStream($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateStreamTest'); - 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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($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 createClusterAsyncTest() - { - $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'; - $dataplaneServiceEndpoint = 'dataplaneServiceEndpoint-1081162868'; - $pscTarget = 'pscTarget333587440'; - $expectedResponse = new Cluster(); - $expectedResponse->setName($name); - $expectedResponse->setDataplaneServiceEndpoint($dataplaneServiceEndpoint); - $expectedResponse->setPscTarget($pscTarget); - $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->locationName('[PROJECT]', '[LOCATION]'); - $clusterId = 'clusterId240280960'; - $cluster = new Cluster(); - $request = (new CreateClusterRequest()) - ->setParent($formattedParent) - ->setClusterId($clusterId) - ->setCluster($cluster); - $response = $gapicClient->createClusterAsync($request)->wait(); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.StreamsService/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()); - } -} diff --git a/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/WarehouseClientTest.php b/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/WarehouseClientTest.php deleted file mode 100644 index 3815efbeb373..000000000000 --- a/owl-bot-staging/VisionAi/v1/tests/Unit/V1/Client/WarehouseClientTest.php +++ /dev/null @@ -1,5732 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return WarehouseClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new WarehouseClient($options); - } - - /** @test */ - public function addCollectionItemTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new AddCollectionItemResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $item = new CollectionItem(); - $itemCollection = $gapicClient->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); - $item->setCollection($itemCollection); - $itemType = Type::TYPE_UNSPECIFIED; - $item->setType($itemType); - $itemItemResource = 'itemItemResource24554228'; - $item->setItemResource($itemItemResource); - $request = (new AddCollectionItemRequest()) - ->setItem($item); - $response = $gapicClient->addCollectionItem($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/AddCollectionItem', $actualFuncCall); - $actualValue = $actualRequestObject->getItem(); - $this->assertProtobufEquals($item, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function addCollectionItemExceptionTest() - { - $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 - $item = new CollectionItem(); - $itemCollection = $gapicClient->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); - $item->setCollection($itemCollection); - $itemType = Type::TYPE_UNSPECIFIED; - $item->setType($itemType); - $itemItemResource = 'itemItemResource24554228'; - $item->setItemResource($itemItemResource); - $request = (new AddCollectionItemRequest()) - ->setItem($item); - try { - $gapicClient->addCollectionItem($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 analyzeAssetTest() - { - $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/analyzeAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AnalyzeAssetResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/analyzeAssetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $request = (new AnalyzeAssetRequest()) - ->setName($formattedName); - $response = $gapicClient->analyzeAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/AnalyzeAsset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/analyzeAssetTest'); - $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 analyzeAssetExceptionTest() - { - $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/analyzeAssetTest'); - $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $request = (new AnalyzeAssetRequest()) - ->setName($formattedName); - $response = $gapicClient->analyzeAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/analyzeAssetTest'); - 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 analyzeCorpusTest() - { - $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/analyzeCorpusTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new AnalyzeCorpusResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/analyzeCorpusTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new AnalyzeCorpusRequest()) - ->setName($formattedName); - $response = $gapicClient->analyzeCorpus($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/AnalyzeCorpus', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/analyzeCorpusTest'); - $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 analyzeCorpusExceptionTest() - { - $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/analyzeCorpusTest'); - $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new AnalyzeCorpusRequest()) - ->setName($formattedName); - $response = $gapicClient->analyzeCorpus($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/analyzeCorpusTest'); - 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 clipAssetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new ClipAssetResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $temporalPartition = new TemporalPartition(); - $request = (new ClipAssetRequest()) - ->setName($formattedName) - ->setTemporalPartition($temporalPartition); - $response = $gapicClient->clipAsset($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/ClipAsset', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $actualValue = $actualRequestObject->getTemporalPartition(); - $this->assertProtobufEquals($temporalPartition, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function clipAssetExceptionTest() - { - $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $temporalPartition = new TemporalPartition(); - $request = (new ClipAssetRequest()) - ->setName($formattedName) - ->setTemporalPartition($temporalPartition); - try { - $gapicClient->clipAsset($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 createAnnotationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Annotation(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $annotation = new Annotation(); - $request = (new CreateAnnotationRequest()) - ->setParent($formattedParent) - ->setAnnotation($annotation); - $response = $gapicClient->createAnnotation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/CreateAnnotation', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAnnotation(); - $this->assertProtobufEquals($annotation, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAnnotationExceptionTest() - { - $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $annotation = new Annotation(); - $request = (new CreateAnnotationRequest()) - ->setParent($formattedParent) - ->setAnnotation($annotation); - try { - $gapicClient->createAnnotation($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 createAssetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $asset = new Asset(); - $request = (new CreateAssetRequest()) - ->setParent($formattedParent) - ->setAsset($asset); - $response = $gapicClient->createAsset($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/CreateAsset', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getAsset(); - $this->assertProtobufEquals($asset, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createAssetExceptionTest() - { - $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $asset = new Asset(); - $request = (new CreateAssetRequest()) - ->setParent($formattedParent) - ->setAsset($asset); - try { - $gapicClient->createAsset($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 createCollectionTest() - { - $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/createCollectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Collection(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCollectionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $collection = new Collection(); - $request = (new CreateCollectionRequest()) - ->setParent($formattedParent) - ->setCollection($collection); - $response = $gapicClient->createCollection($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/CreateCollection', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getCollection(); - $this->assertProtobufEquals($collection, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCollectionTest'); - $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 createCollectionExceptionTest() - { - $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/createCollectionTest'); - $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $collection = new Collection(); - $request = (new CreateCollectionRequest()) - ->setParent($formattedParent) - ->setCollection($collection); - $response = $gapicClient->createCollection($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCollectionTest'); - 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 createCorpusTest() - { - $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/createCorpusTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $satisfiesPzs = false; - $satisfiesPzi = false; - $expectedResponse = new Corpus(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createCorpusTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $parent = 'parent-995424086'; - $corpus = new Corpus(); - $corpusDisplayName = 'corpusDisplayName351425925'; - $corpus->setDisplayName($corpusDisplayName); - $request = (new CreateCorpusRequest()) - ->setParent($parent) - ->setCorpus($corpus); - $response = $gapicClient->createCorpus($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/CreateCorpus', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $actualValue = $actualApiRequestObject->getCorpus(); - $this->assertProtobufEquals($corpus, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCorpusTest'); - $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 createCorpusExceptionTest() - { - $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/createCorpusTest'); - $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 - $parent = 'parent-995424086'; - $corpus = new Corpus(); - $corpusDisplayName = 'corpusDisplayName351425925'; - $corpus->setDisplayName($corpusDisplayName); - $request = (new CreateCorpusRequest()) - ->setParent($parent) - ->setCorpus($corpus); - $response = $gapicClient->createCorpus($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createCorpusTest'); - 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 createDataSchemaTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $key = 'key106079'; - $expectedResponse = new DataSchema(); - $expectedResponse->setName($name); - $expectedResponse->setKey($key); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $dataSchema = new DataSchema(); - $dataSchemaKey = 'dataSchemaKey-1958334348'; - $dataSchema->setKey($dataSchemaKey); - $request = (new CreateDataSchemaRequest()) - ->setParent($formattedParent) - ->setDataSchema($dataSchema); - $response = $gapicClient->createDataSchema($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/CreateDataSchema', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getDataSchema(); - $this->assertProtobufEquals($dataSchema, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createDataSchemaExceptionTest() - { - $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $dataSchema = new DataSchema(); - $dataSchemaKey = 'dataSchemaKey-1958334348'; - $dataSchema->setKey($dataSchemaKey); - $request = (new CreateDataSchemaRequest()) - ->setParent($formattedParent) - ->setDataSchema($dataSchema); - try { - $gapicClient->createDataSchema($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 createIndexTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createIndexTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $entireCorpus = true; - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $satisfiesPzs = false; - $satisfiesPzi = false; - $expectedResponse = new Index(); - $expectedResponse->setEntireCorpus($entireCorpus); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createIndexTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $index = new Index(); - $request = (new CreateIndexRequest()) - ->setParent($formattedParent) - ->setIndex($index); - $response = $gapicClient->createIndex($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/CreateIndex', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getIndex(); - $this->assertProtobufEquals($index, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIndexTest'); - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - $this->assertTrue($response->isDone()); - $this->assertEquals($expectedResponse, $response->getResult()); - $apiRequestsEmpty = $transport->popReceivedCalls(); - $this->assertSame(0, count($apiRequestsEmpty)); - $operationsRequests = $operationsTransport->popReceivedCalls(); - $this->assertSame(1, count($operationsRequests)); - $actualOperationsFuncCall = $operationsRequests[0]->getFuncCall(); - $actualOperationsRequestObject = $operationsRequests[0]->getRequestObject(); - $this->assertSame('/google.longrunning.Operations/GetOperation', $actualOperationsFuncCall); - $this->assertEquals($expectedOperationsRequestObject, $actualOperationsRequestObject); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createIndexExceptionTest() - { - $operationsTransport = $this->createTransport(); - $operationsClient = new OperationsClient([ - 'apiEndpoint' => '', - 'transport' => $operationsTransport, - 'credentials' => $this->createCredentials(), - ]); - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - 'operationsClient' => $operationsClient, - ]); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - // Mock response - $incompleteOperation = new Operation(); - $incompleteOperation->setName('operations/createIndexTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $operationsTransport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $index = new Index(); - $request = (new CreateIndexRequest()) - ->setParent($formattedParent) - ->setIndex($index); - $response = $gapicClient->createIndex($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIndexTest'); - try { - $response->pollUntilComplete([ - 'initialPollDelayMillis' => 1, - ]); - // If the pollUntilComplete() method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stubs are exhausted - $transport->popReceivedCalls(); - $operationsTransport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - $this->assertTrue($operationsTransport->isExhausted()); - } - - /** @test */ - public function createIndexEndpointTest() - { - $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/createIndexEndpointTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $satisfiesPzs = false; - $satisfiesPzi = false; - $expectedResponse = new IndexEndpoint(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/createIndexEndpointTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $indexEndpoint = new IndexEndpoint(); - $request = (new CreateIndexEndpointRequest()) - ->setParent($formattedParent) - ->setIndexEndpoint($indexEndpoint); - $response = $gapicClient->createIndexEndpoint($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/CreateIndexEndpoint', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualApiRequestObject->getIndexEndpoint(); - $this->assertProtobufEquals($indexEndpoint, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIndexEndpointTest'); - $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 createIndexEndpointExceptionTest() - { - $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/createIndexEndpointTest'); - $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->locationName('[PROJECT]', '[LOCATION]'); - $indexEndpoint = new IndexEndpoint(); - $request = (new CreateIndexEndpointRequest()) - ->setParent($formattedParent) - ->setIndexEndpoint($indexEndpoint); - $response = $gapicClient->createIndexEndpoint($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/createIndexEndpointTest'); - 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 createSearchConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new SearchConfig(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $searchConfig = new SearchConfig(); - $searchConfigId = 'searchConfigId-2124186271'; - $request = (new CreateSearchConfigRequest()) - ->setParent($formattedParent) - ->setSearchConfig($searchConfig) - ->setSearchConfigId($searchConfigId); - $response = $gapicClient->createSearchConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/CreateSearchConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSearchConfig(); - $this->assertProtobufEquals($searchConfig, $actualValue); - $actualValue = $actualRequestObject->getSearchConfigId(); - $this->assertProtobufEquals($searchConfigId, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSearchConfigExceptionTest() - { - $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $searchConfig = new SearchConfig(); - $searchConfigId = 'searchConfigId-2124186271'; - $request = (new CreateSearchConfigRequest()) - ->setParent($formattedParent) - ->setSearchConfig($searchConfig) - ->setSearchConfigId($searchConfigId); - try { - $gapicClient->createSearchConfig($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 createSearchHypernymTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $hypernym = 'hypernym-114309610'; - $expectedResponse = new SearchHypernym(); - $expectedResponse->setName($name); - $expectedResponse->setHypernym($hypernym); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $searchHypernym = new SearchHypernym(); - $request = (new CreateSearchHypernymRequest()) - ->setParent($formattedParent) - ->setSearchHypernym($searchHypernym); - $response = $gapicClient->createSearchHypernym($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/CreateSearchHypernym', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSearchHypernym(); - $this->assertProtobufEquals($searchHypernym, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSearchHypernymExceptionTest() - { - $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $searchHypernym = new SearchHypernym(); - $request = (new CreateSearchHypernymRequest()) - ->setParent($formattedParent) - ->setSearchHypernym($searchHypernym); - try { - $gapicClient->createSearchHypernym($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 deleteAnnotationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->annotationName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]', '[ANNOTATION]'); - $request = (new DeleteAnnotationRequest()) - ->setName($formattedName); - $gapicClient->deleteAnnotation($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeleteAnnotation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteAnnotationExceptionTest() - { - $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->annotationName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]', '[ANNOTATION]'); - $request = (new DeleteAnnotationRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteAnnotation($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 deleteAssetTest() - { - $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/deleteAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteAssetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $request = (new DeleteAssetRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeleteAsset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAssetTest'); - $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 deleteAssetExceptionTest() - { - $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/deleteAssetTest'); - $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $request = (new DeleteAssetRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteAssetTest'); - 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 deleteCollectionTest() - { - $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/deleteCollectionTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteCollectionTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); - $request = (new DeleteCollectionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCollection($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeleteCollection', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCollectionTest'); - $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 deleteCollectionExceptionTest() - { - $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/deleteCollectionTest'); - $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->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); - $request = (new DeleteCollectionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteCollection($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteCollectionTest'); - 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 deleteCorpusTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new DeleteCorpusRequest()) - ->setName($formattedName); - $gapicClient->deleteCorpus($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeleteCorpus', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteCorpusExceptionTest() - { - $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new DeleteCorpusRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteCorpus($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 deleteDataSchemaTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataSchemaName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[DATA_SCHEMA]'); - $request = (new DeleteDataSchemaRequest()) - ->setName($formattedName); - $gapicClient->deleteDataSchema($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeleteDataSchema', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteDataSchemaExceptionTest() - { - $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->dataSchemaName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[DATA_SCHEMA]'); - $request = (new DeleteDataSchemaRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteDataSchema($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 deleteIndexTest() - { - $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/deleteIndexTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteIndexTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->indexName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[INDEX]'); - $request = (new DeleteIndexRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteIndex($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeleteIndex', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteIndexTest'); - $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 deleteIndexExceptionTest() - { - $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/deleteIndexTest'); - $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->indexName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[INDEX]'); - $request = (new DeleteIndexRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteIndex($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteIndexTest'); - 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 deleteIndexEndpointTest() - { - $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/deleteIndexEndpointTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new GPBEmpty(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deleteIndexEndpointTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); - $request = (new DeleteIndexEndpointRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteIndexEndpoint($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeleteIndexEndpoint', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteIndexEndpointTest'); - $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 deleteIndexEndpointExceptionTest() - { - $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/deleteIndexEndpointTest'); - $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->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); - $request = (new DeleteIndexEndpointRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteIndexEndpoint($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deleteIndexEndpointTest'); - 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 deleteSearchConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->searchConfigName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[SEARCH_CONFIG]'); - $request = (new DeleteSearchConfigRequest()) - ->setName($formattedName); - $gapicClient->deleteSearchConfig($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeleteSearchConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSearchConfigExceptionTest() - { - $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->searchConfigName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[SEARCH_CONFIG]'); - $request = (new DeleteSearchConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteSearchConfig($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 deleteSearchHypernymTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->searchHypernymName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[SEARCH_HYPERNYM]'); - $request = (new DeleteSearchHypernymRequest()) - ->setName($formattedName); - $gapicClient->deleteSearchHypernym($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeleteSearchHypernym', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSearchHypernymExceptionTest() - { - $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->searchHypernymName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[SEARCH_HYPERNYM]'); - $request = (new DeleteSearchHypernymRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteSearchHypernym($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 deployIndexTest() - { - $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/deployIndexTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new DeployIndexResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/deployIndexTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedIndexEndpoint = $gapicClient->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); - $deployedIndex = new DeployedIndex(); - $deployedIndexIndex = $gapicClient->indexName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[INDEX]'); - $deployedIndex->setIndex($deployedIndexIndex); - $request = (new DeployIndexRequest()) - ->setIndexEndpoint($formattedIndexEndpoint) - ->setDeployedIndex($deployedIndex); - $response = $gapicClient->deployIndex($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/DeployIndex', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getIndexEndpoint(); - $this->assertProtobufEquals($formattedIndexEndpoint, $actualValue); - $actualValue = $actualApiRequestObject->getDeployedIndex(); - $this->assertProtobufEquals($deployedIndex, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deployIndexTest'); - $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 deployIndexExceptionTest() - { - $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/deployIndexTest'); - $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 - $formattedIndexEndpoint = $gapicClient->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); - $deployedIndex = new DeployedIndex(); - $deployedIndexIndex = $gapicClient->indexName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[INDEX]'); - $deployedIndex->setIndex($deployedIndexIndex); - $request = (new DeployIndexRequest()) - ->setIndexEndpoint($formattedIndexEndpoint) - ->setDeployedIndex($deployedIndex); - $response = $gapicClient->deployIndex($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/deployIndexTest'); - 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 generateHlsUriTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $uri = 'uri116076'; - $expectedResponse = new GenerateHlsUriResponse(); - $expectedResponse->setUri($uri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $request = (new GenerateHlsUriRequest()) - ->setName($formattedName); - $response = $gapicClient->generateHlsUri($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/GenerateHlsUri', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateHlsUriExceptionTest() - { - $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $request = (new GenerateHlsUriRequest()) - ->setName($formattedName); - try { - $gapicClient->generateHlsUri($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 generateRetrievalUrlTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $signedUri = 'signedUri-979536439'; - $expectedResponse = new GenerateRetrievalUrlResponse(); - $expectedResponse->setSignedUri($signedUri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $request = (new GenerateRetrievalUrlRequest()) - ->setName($formattedName); - $response = $gapicClient->generateRetrievalUrl($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/GenerateRetrievalUrl', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function generateRetrievalUrlExceptionTest() - { - $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $request = (new GenerateRetrievalUrlRequest()) - ->setName($formattedName); - try { - $gapicClient->generateRetrievalUrl($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 getAnnotationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Annotation(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->annotationName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]', '[ANNOTATION]'); - $request = (new GetAnnotationRequest()) - ->setName($formattedName); - $response = $gapicClient->getAnnotation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/GetAnnotation', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAnnotationExceptionTest() - { - $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->annotationName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]', '[ANNOTATION]'); - $request = (new GetAnnotationRequest()) - ->setName($formattedName); - try { - $gapicClient->getAnnotation($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 getAssetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $request = (new GetAssetRequest()) - ->setName($formattedName); - $response = $gapicClient->getAsset($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/GetAsset', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAssetExceptionTest() - { - $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $request = (new GetAssetRequest()) - ->setName($formattedName); - try { - $gapicClient->getAsset($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 getCollectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Collection(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); - $request = (new GetCollectionRequest()) - ->setName($formattedName); - $response = $gapicClient->getCollection($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/GetCollection', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCollectionExceptionTest() - { - $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->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); - $request = (new GetCollectionRequest()) - ->setName($formattedName); - try { - $gapicClient->getCollection($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 getCorpusTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $satisfiesPzs = false; - $satisfiesPzi = false; - $expectedResponse = new Corpus(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new GetCorpusRequest()) - ->setName($formattedName); - $response = $gapicClient->getCorpus($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/GetCorpus', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCorpusExceptionTest() - { - $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new GetCorpusRequest()) - ->setName($formattedName); - try { - $gapicClient->getCorpus($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 getDataSchemaTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $key = 'key106079'; - $expectedResponse = new DataSchema(); - $expectedResponse->setName($name2); - $expectedResponse->setKey($key); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->dataSchemaName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[DATA_SCHEMA]'); - $request = (new GetDataSchemaRequest()) - ->setName($formattedName); - $response = $gapicClient->getDataSchema($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/GetDataSchema', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getDataSchemaExceptionTest() - { - $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->dataSchemaName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[DATA_SCHEMA]'); - $request = (new GetDataSchemaRequest()) - ->setName($formattedName); - try { - $gapicClient->getDataSchema($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIndexTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $entireCorpus = true; - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $satisfiesPzs = false; - $satisfiesPzi = false; - $expectedResponse = new Index(); - $expectedResponse->setEntireCorpus($entireCorpus); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->indexName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[INDEX]'); - $request = (new GetIndexRequest()) - ->setName($formattedName); - $response = $gapicClient->getIndex($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/GetIndex', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIndexExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedName = $gapicClient->indexName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[INDEX]'); - $request = (new GetIndexRequest()) - ->setName($formattedName); - try { - $gapicClient->getIndex($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIndexEndpointTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $satisfiesPzs = false; - $satisfiesPzi = false; - $expectedResponse = new IndexEndpoint(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); - $request = (new GetIndexEndpointRequest()) - ->setName($formattedName); - $response = $gapicClient->getIndexEndpoint($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/GetIndexEndpoint', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getIndexEndpointExceptionTest() - { - $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->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); - $request = (new GetIndexEndpointRequest()) - ->setName($formattedName); - try { - $gapicClient->getIndexEndpoint($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 getSearchConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new SearchConfig(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->searchConfigName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[SEARCH_CONFIG]'); - $request = (new GetSearchConfigRequest()) - ->setName($formattedName); - $response = $gapicClient->getSearchConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/GetSearchConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSearchConfigExceptionTest() - { - $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->searchConfigName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[SEARCH_CONFIG]'); - $request = (new GetSearchConfigRequest()) - ->setName($formattedName); - try { - $gapicClient->getSearchConfig($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 getSearchHypernymTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $hypernym = 'hypernym-114309610'; - $expectedResponse = new SearchHypernym(); - $expectedResponse->setName($name2); - $expectedResponse->setHypernym($hypernym); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->searchHypernymName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[SEARCH_HYPERNYM]'); - $request = (new GetSearchHypernymRequest()) - ->setName($formattedName); - $response = $gapicClient->getSearchHypernym($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/GetSearchHypernym', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSearchHypernymExceptionTest() - { - $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->searchHypernymName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[SEARCH_HYPERNYM]'); - $request = (new GetSearchHypernymRequest()) - ->setName($formattedName); - try { - $gapicClient->getSearchHypernym($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 importAssetsTest() - { - $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/importAssetsTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new ImportAssetsResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/importAssetsTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new ImportAssetsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->importAssets($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/ImportAssets', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importAssetsTest'); - $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 importAssetsExceptionTest() - { - $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/importAssetsTest'); - $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new ImportAssetsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->importAssets($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/importAssetsTest'); - 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 indexAssetTest() - { - $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/indexAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new IndexAssetResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/indexAssetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $request = (new IndexAssetRequest()) - ->setName($formattedName); - $response = $gapicClient->indexAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/IndexAsset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/indexAssetTest'); - $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 indexAssetExceptionTest() - { - $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/indexAssetTest'); - $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $request = (new IndexAssetRequest()) - ->setName($formattedName); - $response = $gapicClient->indexAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/indexAssetTest'); - 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 ingestAssetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new IngestAssetResponse(); - $transport->addResponse($expectedResponse); - $expectedResponse2 = new IngestAssetResponse(); - $transport->addResponse($expectedResponse2); - $expectedResponse3 = new IngestAssetResponse(); - $transport->addResponse($expectedResponse3); - // Mock request - $request = new IngestAssetRequest(); - $request2 = new IngestAssetRequest(); - $request3 = new IngestAssetRequest(); - $bidi = $gapicClient->ingestAsset(); - $this->assertInstanceOf(BidiStream::class, $bidi); - $bidi->write($request); - $responses = []; - $responses[] = $bidi->read(); - $bidi->writeAll([ - $request2, - $request3, - ]); - foreach ($bidi->closeWriteAndReadAll() as $response) { - $responses[] = $response; - } - - $expectedResponses = []; - $expectedResponses[] = $expectedResponse; - $expectedResponses[] = $expectedResponse2; - $expectedResponses[] = $expectedResponse3; - $this->assertEquals($expectedResponses, $responses); - $createStreamRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($createStreamRequests)); - $streamFuncCall = $createStreamRequests[0]->getFuncCall(); - $streamRequestObject = $createStreamRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/IngestAsset', $streamFuncCall); - $this->assertNull($streamRequestObject); - $callObjects = $transport->popCallObjects(); - $this->assertSame(1, count($callObjects)); - $bidiCall = $callObjects[0]; - $writeRequests = $bidiCall->popReceivedCalls(); - $expectedRequests = []; - $expectedRequests[] = $request; - $expectedRequests[] = $request2; - $expectedRequests[] = $request3; - $this->assertEquals($expectedRequests, $writeRequests); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function ingestAssetExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->setStreamingStatus($status); - $this->assertTrue($transport->isExhausted()); - $bidi = $gapicClient->ingestAsset(); - $results = $bidi->closeWriteAndReadAll(); - try { - iterator_to_array($results); - // If the close stream method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAnnotationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $annotationsElement = new Annotation(); - $annotations = [ - $annotationsElement, - ]; - $expectedResponse = new ListAnnotationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAnnotations($annotations); - $transport->addResponse($expectedResponse); - $request = new ListAnnotationsRequest(); - $response = $gapicClient->listAnnotations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAnnotations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/ListAnnotations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAnnotationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListAnnotationsRequest(); - try { - $gapicClient->listAnnotations($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 listAssetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $assetsElement = new Asset(); - $assets = [ - $assetsElement, - ]; - $expectedResponse = new ListAssetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAssets($assets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new ListAssetsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAssets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAssets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/ListAssets', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAssetsExceptionTest() - { - $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new ListAssetsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAssets($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 listCollectionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $collectionsElement = new Collection(); - $collections = [ - $collectionsElement, - ]; - $expectedResponse = new ListCollectionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCollections($collections); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new ListCollectionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCollections($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCollections()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/ListCollections', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCollectionsExceptionTest() - { - $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new ListCollectionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCollections($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 listCorporaTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $corporaElement = new Corpus(); - $corpora = [ - $corporaElement, - ]; - $expectedResponse = new ListCorporaResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCorpora($corpora); - $transport->addResponse($expectedResponse); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListCorporaRequest()) - ->setParent($parent); - $response = $gapicClient->listCorpora($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCorpora()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/ListCorpora', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($parent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCorporaExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $parent = 'parent-995424086'; - $request = (new ListCorporaRequest()) - ->setParent($parent); - try { - $gapicClient->listCorpora($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 listDataSchemasTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $dataSchemasElement = new DataSchema(); - $dataSchemas = [ - $dataSchemasElement, - ]; - $expectedResponse = new ListDataSchemasResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setDataSchemas($dataSchemas); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new ListDataSchemasRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listDataSchemas($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getDataSchemas()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/ListDataSchemas', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listDataSchemasExceptionTest() - { - $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new ListDataSchemasRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listDataSchemas($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 listIndexEndpointsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $indexEndpointsElement = new IndexEndpoint(); - $indexEndpoints = [ - $indexEndpointsElement, - ]; - $expectedResponse = new ListIndexEndpointsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setIndexEndpoints($indexEndpoints); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListIndexEndpointsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listIndexEndpoints($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getIndexEndpoints()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/ListIndexEndpoints', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIndexEndpointsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->locationName('[PROJECT]', '[LOCATION]'); - $request = (new ListIndexEndpointsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listIndexEndpoints($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIndexesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $indexesElement = new Index(); - $indexes = [ - $indexesElement, - ]; - $expectedResponse = new ListIndexesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setIndexes($indexes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new ListIndexesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listIndexes($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getIndexes()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/ListIndexes', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listIndexesExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - // Mock request - $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new ListIndexesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listIndexes($request); - // If the $gapicClient method call did not throw, fail the test - $this->fail('Expected an ApiException, but no exception was thrown.'); - } catch (ApiException $ex) { - $this->assertEquals($status->code, $ex->getCode()); - $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); - } - // Call popReceivedCalls to ensure the stub is exhausted - $transport->popReceivedCalls(); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSearchConfigsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $searchConfigsElement = new SearchConfig(); - $searchConfigs = [ - $searchConfigsElement, - ]; - $expectedResponse = new ListSearchConfigsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSearchConfigs($searchConfigs); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new ListSearchConfigsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSearchConfigs($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSearchConfigs()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/ListSearchConfigs', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSearchConfigsExceptionTest() - { - $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new ListSearchConfigsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSearchConfigs($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 listSearchHypernymsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $searchHypernymsElement = new SearchHypernym(); - $searchHypernyms = [ - $searchHypernymsElement, - ]; - $expectedResponse = new ListSearchHypernymsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSearchHypernyms($searchHypernyms); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new ListSearchHypernymsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSearchHypernyms($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSearchHypernyms()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/ListSearchHypernyms', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSearchHypernymsExceptionTest() - { - $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->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new ListSearchHypernymsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSearchHypernyms($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 removeCollectionItemTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new RemoveCollectionItemResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $item = new CollectionItem(); - $itemCollection = $gapicClient->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); - $item->setCollection($itemCollection); - $itemType = Type::TYPE_UNSPECIFIED; - $item->setType($itemType); - $itemItemResource = 'itemItemResource24554228'; - $item->setItemResource($itemItemResource); - $request = (new RemoveCollectionItemRequest()) - ->setItem($item); - $response = $gapicClient->removeCollectionItem($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/RemoveCollectionItem', $actualFuncCall); - $actualValue = $actualRequestObject->getItem(); - $this->assertProtobufEquals($item, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function removeCollectionItemExceptionTest() - { - $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 - $item = new CollectionItem(); - $itemCollection = $gapicClient->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); - $item->setCollection($itemCollection); - $itemType = Type::TYPE_UNSPECIFIED; - $item->setType($itemType); - $itemItemResource = 'itemItemResource24554228'; - $item->setItemResource($itemItemResource); - $request = (new RemoveCollectionItemRequest()) - ->setItem($item); - try { - $gapicClient->removeCollectionItem($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 removeIndexAssetTest() - { - $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/removeIndexAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new RemoveIndexAssetResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/removeIndexAssetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $request = (new RemoveIndexAssetRequest()) - ->setName($formattedName); - $response = $gapicClient->removeIndexAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/RemoveIndexAsset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/removeIndexAssetTest'); - $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 removeIndexAssetExceptionTest() - { - $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/removeIndexAssetTest'); - $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $request = (new RemoveIndexAssetRequest()) - ->setName($formattedName); - $response = $gapicClient->removeIndexAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/removeIndexAssetTest'); - 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 searchAssetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $searchResultItemsElement = new SearchResultItem(); - $searchResultItems = [ - $searchResultItemsElement, - ]; - $expectedResponse = new SearchAssetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSearchResultItems($searchResultItems); - $transport->addResponse($expectedResponse); - // Mock request - $formattedCorpus = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new SearchAssetsRequest()) - ->setCorpus($formattedCorpus); - $response = $gapicClient->searchAssets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSearchResultItems()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/SearchAssets', $actualFuncCall); - $actualValue = $actualRequestObject->getCorpus(); - $this->assertProtobufEquals($formattedCorpus, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchAssetsExceptionTest() - { - $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 - $formattedCorpus = $gapicClient->corpusName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]'); - $request = (new SearchAssetsRequest()) - ->setCorpus($formattedCorpus); - try { - $gapicClient->searchAssets($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 searchIndexEndpointTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $searchResultItemsElement = new SearchResultItem(); - $searchResultItems = [ - $searchResultItemsElement, - ]; - $expectedResponse = new SearchIndexEndpointResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSearchResultItems($searchResultItems); - $transport->addResponse($expectedResponse); - // Mock request - $formattedIndexEndpoint = $gapicClient->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); - $request = (new SearchIndexEndpointRequest()) - ->setIndexEndpoint($formattedIndexEndpoint); - $response = $gapicClient->searchIndexEndpoint($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSearchResultItems()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/SearchIndexEndpoint', $actualFuncCall); - $actualValue = $actualRequestObject->getIndexEndpoint(); - $this->assertProtobufEquals($formattedIndexEndpoint, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchIndexEndpointExceptionTest() - { - $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 - $formattedIndexEndpoint = $gapicClient->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); - $request = (new SearchIndexEndpointRequest()) - ->setIndexEndpoint($formattedIndexEndpoint); - try { - $gapicClient->searchIndexEndpoint($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 undeployIndexTest() - { - $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/undeployIndexTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new UndeployIndexResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/undeployIndexTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedIndexEndpoint = $gapicClient->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); - $request = (new UndeployIndexRequest()) - ->setIndexEndpoint($formattedIndexEndpoint); - $response = $gapicClient->undeployIndex($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/UndeployIndex', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getIndexEndpoint(); - $this->assertProtobufEquals($formattedIndexEndpoint, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeployIndexTest'); - $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 undeployIndexExceptionTest() - { - $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/undeployIndexTest'); - $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 - $formattedIndexEndpoint = $gapicClient->indexEndpointName('[PROJECT]', '[LOCATION]', '[INDEX_ENDPOINT]'); - $request = (new UndeployIndexRequest()) - ->setIndexEndpoint($formattedIndexEndpoint); - $response = $gapicClient->undeployIndex($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/undeployIndexTest'); - 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 updateAnnotationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Annotation(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $annotation = new Annotation(); - $request = (new UpdateAnnotationRequest()) - ->setAnnotation($annotation); - $response = $gapicClient->updateAnnotation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/UpdateAnnotation', $actualFuncCall); - $actualValue = $actualRequestObject->getAnnotation(); - $this->assertProtobufEquals($annotation, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAnnotationExceptionTest() - { - $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 - $annotation = new Annotation(); - $request = (new UpdateAnnotationRequest()) - ->setAnnotation($annotation); - try { - $gapicClient->updateAnnotation($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 updateAssetTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Asset(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $asset = new Asset(); - $request = (new UpdateAssetRequest()) - ->setAsset($asset); - $response = $gapicClient->updateAsset($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/UpdateAsset', $actualFuncCall); - $actualValue = $actualRequestObject->getAsset(); - $this->assertProtobufEquals($asset, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateAssetExceptionTest() - { - $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 - $asset = new Asset(); - $request = (new UpdateAssetRequest()) - ->setAsset($asset); - try { - $gapicClient->updateAsset($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 updateCollectionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $expectedResponse = new Collection(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $transport->addResponse($expectedResponse); - // Mock request - $collection = new Collection(); - $request = (new UpdateCollectionRequest()) - ->setCollection($collection); - $response = $gapicClient->updateCollection($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/UpdateCollection', $actualFuncCall); - $actualValue = $actualRequestObject->getCollection(); - $this->assertProtobufEquals($collection, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCollectionExceptionTest() - { - $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 - $collection = new Collection(); - $request = (new UpdateCollectionRequest()) - ->setCollection($collection); - try { - $gapicClient->updateCollection($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 updateCorpusTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $satisfiesPzs = false; - $satisfiesPzi = false; - $expectedResponse = new Corpus(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $transport->addResponse($expectedResponse); - // Mock request - $corpus = new Corpus(); - $corpusDisplayName = 'corpusDisplayName351425925'; - $corpus->setDisplayName($corpusDisplayName); - $request = (new UpdateCorpusRequest()) - ->setCorpus($corpus); - $response = $gapicClient->updateCorpus($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/UpdateCorpus', $actualFuncCall); - $actualValue = $actualRequestObject->getCorpus(); - $this->assertProtobufEquals($corpus, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCorpusExceptionTest() - { - $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 - $corpus = new Corpus(); - $corpusDisplayName = 'corpusDisplayName351425925'; - $corpus->setDisplayName($corpusDisplayName); - $request = (new UpdateCorpusRequest()) - ->setCorpus($corpus); - try { - $gapicClient->updateCorpus($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 updateDataSchemaTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $key = 'key106079'; - $expectedResponse = new DataSchema(); - $expectedResponse->setName($name); - $expectedResponse->setKey($key); - $transport->addResponse($expectedResponse); - // Mock request - $dataSchema = new DataSchema(); - $dataSchemaKey = 'dataSchemaKey-1958334348'; - $dataSchema->setKey($dataSchemaKey); - $request = (new UpdateDataSchemaRequest()) - ->setDataSchema($dataSchema); - $response = $gapicClient->updateDataSchema($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/UpdateDataSchema', $actualFuncCall); - $actualValue = $actualRequestObject->getDataSchema(); - $this->assertProtobufEquals($dataSchema, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateDataSchemaExceptionTest() - { - $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 - $dataSchema = new DataSchema(); - $dataSchemaKey = 'dataSchemaKey-1958334348'; - $dataSchema->setKey($dataSchemaKey); - $request = (new UpdateDataSchemaRequest()) - ->setDataSchema($dataSchema); - try { - $gapicClient->updateDataSchema($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 updateIndexTest() - { - $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/updateIndexTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $entireCorpus = true; - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $satisfiesPzs = false; - $satisfiesPzi = false; - $expectedResponse = new Index(); - $expectedResponse->setEntireCorpus($entireCorpus); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateIndexTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $index = new Index(); - $updateMask = new FieldMask(); - $request = (new UpdateIndexRequest()) - ->setIndex($index) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateIndex($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/UpdateIndex', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getIndex(); - $this->assertProtobufEquals($index, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateIndexTest'); - $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 updateIndexExceptionTest() - { - $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/updateIndexTest'); - $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 - $index = new Index(); - $updateMask = new FieldMask(); - $request = (new UpdateIndexRequest()) - ->setIndex($index) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateIndex($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateIndexTest'); - 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 updateIndexEndpointTest() - { - $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/updateIndexEndpointTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $satisfiesPzs = false; - $satisfiesPzi = false; - $expectedResponse = new IndexEndpoint(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setSatisfiesPzs($satisfiesPzs); - $expectedResponse->setSatisfiesPzi($satisfiesPzi); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/updateIndexEndpointTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $indexEndpoint = new IndexEndpoint(); - $updateMask = new FieldMask(); - $request = (new UpdateIndexEndpointRequest()) - ->setIndexEndpoint($indexEndpoint) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateIndexEndpoint($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/UpdateIndexEndpoint', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getIndexEndpoint(); - $this->assertProtobufEquals($indexEndpoint, $actualValue); - $actualValue = $actualApiRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateIndexEndpointTest'); - $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 updateIndexEndpointExceptionTest() - { - $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/updateIndexEndpointTest'); - $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 - $indexEndpoint = new IndexEndpoint(); - $updateMask = new FieldMask(); - $request = (new UpdateIndexEndpointRequest()) - ->setIndexEndpoint($indexEndpoint) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateIndexEndpoint($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/updateIndexEndpointTest'); - 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 updateSearchConfigTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new SearchConfig(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $searchConfig = new SearchConfig(); - $request = (new UpdateSearchConfigRequest()) - ->setSearchConfig($searchConfig); - $response = $gapicClient->updateSearchConfig($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/UpdateSearchConfig', $actualFuncCall); - $actualValue = $actualRequestObject->getSearchConfig(); - $this->assertProtobufEquals($searchConfig, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSearchConfigExceptionTest() - { - $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 - $searchConfig = new SearchConfig(); - $request = (new UpdateSearchConfigRequest()) - ->setSearchConfig($searchConfig); - try { - $gapicClient->updateSearchConfig($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 updateSearchHypernymTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $hypernym = 'hypernym-114309610'; - $expectedResponse = new SearchHypernym(); - $expectedResponse->setName($name); - $expectedResponse->setHypernym($hypernym); - $transport->addResponse($expectedResponse); - // Mock request - $searchHypernym = new SearchHypernym(); - $request = (new UpdateSearchHypernymRequest()) - ->setSearchHypernym($searchHypernym); - $response = $gapicClient->updateSearchHypernym($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/UpdateSearchHypernym', $actualFuncCall); - $actualValue = $actualRequestObject->getSearchHypernym(); - $this->assertProtobufEquals($searchHypernym, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSearchHypernymExceptionTest() - { - $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 - $searchHypernym = new SearchHypernym(); - $request = (new UpdateSearchHypernymRequest()) - ->setSearchHypernym($searchHypernym); - try { - $gapicClient->updateSearchHypernym($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 uploadAssetTest() - { - $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/uploadAssetTest'); - $incompleteOperation->setDone(false); - $transport->addResponse($incompleteOperation); - $expectedResponse = new UploadAssetResponse(); - $anyResponse = new Any(); - $anyResponse->setValue($expectedResponse->serializeToString()); - $completeOperation = new Operation(); - $completeOperation->setName('operations/uploadAssetTest'); - $completeOperation->setDone(true); - $completeOperation->setResponse($anyResponse); - $operationsTransport->addResponse($completeOperation); - // Mock request - $formattedName = $gapicClient->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $request = (new UploadAssetRequest()) - ->setName($formattedName); - $response = $gapicClient->uploadAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $apiRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($apiRequests)); - $operationsRequestsEmpty = $operationsTransport->popReceivedCalls(); - $this->assertSame(0, count($operationsRequestsEmpty)); - $actualApiFuncCall = $apiRequests[0]->getFuncCall(); - $actualApiRequestObject = $apiRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/UploadAsset', $actualApiFuncCall); - $actualValue = $actualApiRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/uploadAssetTest'); - $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 uploadAssetExceptionTest() - { - $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/uploadAssetTest'); - $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->assetName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[ASSET]'); - $request = (new UploadAssetRequest()) - ->setName($formattedName); - $response = $gapicClient->uploadAsset($request); - $this->assertFalse($response->isDone()); - $this->assertNull($response->getResult()); - $expectedOperationsRequestObject = new GetOperationRequest(); - $expectedOperationsRequestObject->setName('operations/uploadAssetTest'); - 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 viewCollectionItemsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $itemsElement = new CollectionItem(); - $items = [ - $itemsElement, - ]; - $expectedResponse = new ViewCollectionItemsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setItems($items); - $transport->addResponse($expectedResponse); - // Mock request - $formattedCollection = $gapicClient->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); - $request = (new ViewCollectionItemsRequest()) - ->setCollection($formattedCollection); - $response = $gapicClient->viewCollectionItems($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getItems()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/ViewCollectionItems', $actualFuncCall); - $actualValue = $actualRequestObject->getCollection(); - $this->assertProtobufEquals($formattedCollection, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function viewCollectionItemsExceptionTest() - { - $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 - $formattedCollection = $gapicClient->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); - $request = (new ViewCollectionItemsRequest()) - ->setCollection($formattedCollection); - try { - $gapicClient->viewCollectionItems($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 viewIndexedAssetsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $indexedAssetsElement = new IndexedAsset(); - $indexedAssets = [ - $indexedAssetsElement, - ]; - $expectedResponse = new ViewIndexedAssetsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setIndexedAssets($indexedAssets); - $transport->addResponse($expectedResponse); - // Mock request - $formattedIndex = $gapicClient->indexName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[INDEX]'); - $request = (new ViewIndexedAssetsRequest()) - ->setIndex($formattedIndex); - $response = $gapicClient->viewIndexedAssets($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getIndexedAssets()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/ViewIndexedAssets', $actualFuncCall); - $actualValue = $actualRequestObject->getIndex(); - $this->assertProtobufEquals($formattedIndex, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function viewIndexedAssetsExceptionTest() - { - $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 - $formattedIndex = $gapicClient->indexName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[INDEX]'); - $request = (new ViewIndexedAssetsRequest()) - ->setIndex($formattedIndex); - try { - $gapicClient->viewIndexedAssets($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 getLocationTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $locationId = 'locationId552319461'; - $displayName = 'displayName1615086568'; - $expectedResponse = new Location(); - $expectedResponse->setName($name2); - $expectedResponse->setLocationId($locationId); - $expectedResponse->setDisplayName($displayName); - $transport->addResponse($expectedResponse); - $request = new GetLocationRequest(); - $response = $gapicClient->getLocation($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/GetLocation', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getLocationExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new GetLocationRequest(); - try { - $gapicClient->getLocation($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 listLocationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $locationsElement = new Location(); - $locations = [ - $locationsElement, - ]; - $expectedResponse = new ListLocationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setLocations($locations); - $transport->addResponse($expectedResponse); - $request = new ListLocationsRequest(); - $response = $gapicClient->listLocations($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getLocations()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.location.Locations/ListLocations', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listLocationsExceptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - $status = new stdClass(); - $status->code = Code::DATA_LOSS; - $status->details = 'internal error'; - $expectedExceptionMessage = json_encode([ - 'message' => 'internal error', - 'code' => Code::DATA_LOSS, - 'status' => 'DATA_LOSS', - 'details' => [], - ], JSON_PRETTY_PRINT); - $transport->addResponse(null, $status); - $request = new ListLocationsRequest(); - try { - $gapicClient->listLocations($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 addCollectionItemAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new AddCollectionItemResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $item = new CollectionItem(); - $itemCollection = $gapicClient->collectionName('[PROJECT_NUMBER]', '[LOCATION]', '[CORPUS]', '[COLLECTION]'); - $item->setCollection($itemCollection); - $itemType = Type::TYPE_UNSPECIFIED; - $item->setType($itemType); - $itemItemResource = 'itemItemResource24554228'; - $item->setItemResource($itemItemResource); - $request = (new AddCollectionItemRequest()) - ->setItem($item); - $response = $gapicClient->addCollectionItemAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.visionai.v1.Warehouse/AddCollectionItem', $actualFuncCall); - $actualValue = $actualRequestObject->getItem(); - $this->assertProtobufEquals($item, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -}